Don't print all pwndbg function on startup (#2962)

* Don't print all pwndbg function on startup.

* fix python310 quoting

* fix test_loads.py test
pull/2967/head
k4lizen 7 months ago committed by GitHub
parent e555cd1548
commit 05bd01a140
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -53,14 +53,11 @@ last_alive_state = False
def show_hint() -> None:
funcs_list_str = ", ".join(
message.notice("$" + f.name) for f in pwndbg.gdblib.functions.functions
)
hint_lines = (
"loaded %i pwndbg commands. Type %s for a list."
% (len(pwndbg.commands.commands), message.notice("pwndbg [filter]")),
f"created {funcs_list_str} GDB functions (can be used with print/break)",
f"loaded {len(pwndbg.commands.commands)} pwndbg commands."
f" Type {message.notice('pwndbg [filter]')} for a list.",
f"created {len(pwndbg.gdblib.functions.functions)} GDB functions (can be used"
f" with print/break). Type {message.notice('help function')} to see them.",
)
for line in hint_lines:

@ -10,7 +10,8 @@ from .utils import run_gdb_with_script
HELLO = [
"pwndbg: loaded ### pwndbg commands. Type pwndbg [filter] for a list.",
"pwndbg: created xxx GDB functions (can be used with print/break)",
"pwndbg: created xxx GDB functions (can be used with print/break)."
" Type help function to see them.",
]
BINARY = tests.binaries.get("div_zero.out")

@ -61,6 +61,6 @@ def run_gdb_with_script(
# It also shows every single registered function, so we change it to xxx
# so as to not break this test every time a new function is added
output = re.sub(r"created (\$\w+, )*\$\w+ GDB functions", r"created xxx GDB functions", output)
output = re.sub(r"created [0-9]+ GDB functions", r"created xxx GDB functions", output)
return output

Loading…
Cancel
Save