add show-flags and show-compact-regs to ctx regs banner

Hopefully his will improve the discoverability/UX for users who are not
aware of those options.

This is how the new registers banner looks like:
```
[ REGISTERS / show-flags off / show-compact-regs off ]
```

Fwiw it is 54 chars long (without "---" before and after) so its length
should be fine.
pull/1203/head
disconnect3d 3 years ago committed by Disconnect3d
parent 55ab0ae091
commit 86e4679f79

@ -482,7 +482,11 @@ def context_regs(target=sys.stdout, with_banner=True, width=None):
if pwndbg.config.show_compact_regs:
regs = compact_regs(regs, target=target, width=width)
banner = [pwndbg.ui.banner("registers", target=target, width=width)]
info = " / show-flags %s / show-compact-regs %s" % (
"on" if pwndbg.config.show_flags else "off",
"on" if pwndbg.config.show_compact_regs else "off",
)
banner = [pwndbg.ui.banner("registers", target=target, width=width, extra=info)]
return banner + regs if with_banner else regs

Loading…
Cancel
Save