diff --git a/pwndbg/gdblib/nearpc.py b/pwndbg/gdblib/nearpc.py index db7c81e7e..636019e7f 100644 --- a/pwndbg/gdblib/nearpc.py +++ b/pwndbg/gdblib/nearpc.py @@ -57,7 +57,7 @@ show_args = pwndbg.gdblib.config.add_param( "nearpc-show-args", True, "whether to show call arguments below instruction" ) show_opcode_bytes = pwndbg.gdblib.config.add_param( - "nearpc-opcode-bytes", + "nearpc-num-opcode-bytes", 0, "number of opcode bytes to print for each instruction", param_class=gdb.PARAM_ZUINTEGER, diff --git a/tests/gdb-tests/tests/test_nearpc.py b/tests/gdb-tests/tests/test_nearpc.py index e2151273a..70843c257 100644 --- a/tests/gdb-tests/tests/test_nearpc.py +++ b/tests/gdb-tests/tests/test_nearpc.py @@ -120,7 +120,7 @@ OPCODE_SEPERATOR_TESTS_EXPECTED_OUTPUT = { def test_nearpc_opcode_bytes(start_binary, opcode_bytes): start_binary(SYSCALLS_BINARY) gdb.execute("nextsyscall") - gdb.execute(f"set nearpc-opcode-bytes {opcode_bytes}") + gdb.execute(f"set nearpc-num-opcode-bytes {opcode_bytes}") dis = gdb.execute("nearpc", to_string=True) expected = ( " 0x400080 {0} <_start> mov eax, 0\n" @@ -145,7 +145,7 @@ def test_nearpc_opcode_bytes(start_binary, opcode_bytes): def test_nearpc_opcode_seperator(start_binary, separator_bytes): start_binary(SYSCALLS_BINARY) gdb.execute("nextsyscall") - gdb.execute("set nearpc-opcode-bytes 5") + gdb.execute("set nearpc-num-opcode-bytes 5") gdb.execute(f"set nearpc-opcode-separator-bytes {separator_bytes}") dis = gdb.execute("nearpc", to_string=True) excepted = ( @@ -171,7 +171,7 @@ def test_nearpc_opcode_invalid_config(): expected = "integer -1 out of range" try: # We try to catch the output since GDB < 9 won't raise the exception - assert gdb.execute("set nearpc-opcode-bytes -1", to_string=True).rstrip() == expected + assert gdb.execute("set nearpc-num-opcode-bytes -1", to_string=True).rstrip() == expected except gdb.error as e: assert expected == str(e)