re-adds handling for `lines is None` in `nearpc` (#3420)

* handling lines is None in `nearpc`

* future proof
pull/3422/head^2
jxuanli 3 weeks ago committed by GitHub
parent 5369d4149a
commit b5b410aa9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -275,7 +275,7 @@ class ArchSymbols:
self.bpf_map_heuristic_func = "bpf_map_free_id"
self.current_task_heuristic_func = "common_cpu_up"
def disass(self, name, lines=None):
def disass(self, name, lines=5):
sym = pwndbg.aglib.symbol.lookup_symbol(name)
if sym is None:
return None

@ -88,7 +88,7 @@ opcode_separator_bytes = pwndbg.config.add_param(
def nearpc(
pc: int = None,
lines: int = None,
lines: int = 5, # consistent with previous nearpc_lines
back_lines: int = 0,
total_lines: int = None,
emulate=False,

Loading…
Cancel
Save