Skip to content

Commit

Permalink
check if layout exist before add: glibc, syscall (#108)
Browse files Browse the repository at this point in the history
check if layout exist before add: glibc, syscall
  • Loading branch information
therealdreg authored Apr 23, 2024
1 parent 603dfde commit 4a96333
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions scripts/libc_function_args/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ def extract_called_function_name() -> str:

return function_name


#
# Register the context pane
#
register_external_context_pane(
GLIBC_FUNCTION_ARGS_CONTEXT_PANE_INDEX,
GlibcFunctionArguments.pane_content,
pane_title_function=GlibcFunctionArguments.pane_title,
condition=GlibcFunctionArguments.only_if_call,
)
if GLIBC_FUNCTION_ARGS_CONTEXT_PANE_INDEX not in gef.config["context.layout"]:
#
# Register the context pane
#
register_external_context_pane(
GLIBC_FUNCTION_ARGS_CONTEXT_PANE_INDEX,
GlibcFunctionArguments.pane_content,
pane_title_function=GlibcFunctionArguments.pane_title,
condition=GlibcFunctionArguments.only_if_call,
)
12 changes: 6 additions & 6 deletions scripts/syscall_args/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ def __syscall_args_pane_content() -> None:
def __syscall_args_pane_title() -> str:
return CONTEXT_PANE_DESCRIPTION


#
# Register a callback to `syscall-args` to automatically detect when a syscall is hit
#
register_external_context_pane(
CONTEXT_PANE_INDEX, __syscall_args_pane_content, pane_title_function=__syscall_args_pane_title, condition=__syscall_args_pane_condition)
if CONTEXT_PANE_INDEX not in gef.config["context.layout"]:
#
# Register a callback to `syscall-args` to automatically detect when a syscall is hit
#
register_external_context_pane(
CONTEXT_PANE_INDEX, __syscall_args_pane_content, pane_title_function=__syscall_args_pane_title, condition=__syscall_args_pane_condition)

0 comments on commit 4a96333

Please sign in to comment.