mirror of https://github.com/pwndbg/pwndbg
Fix: Undefined info command: "win" (#1775)
* Return no cmd window size when info win is not avaiable * Update pwndbg/ui.py --------- Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
This commit is contained in:
parent
0db1eeadca
commit
52d729f574
|
@ -93,7 +93,12 @@ def get_cmd_window_size():
|
|||
Output of "info win" in non-TUI mode:
|
||||
(gdb) info win
|
||||
The TUI is not active."""
|
||||
info_out = gdb.execute("info win", to_string=True).split()
|
||||
try:
|
||||
info_out = gdb.execute("info win", to_string=True).split()
|
||||
except gdb.error:
|
||||
# Return None if the command is not compiled into GDB
|
||||
# (gdb.error: Undefined info command: "win". Try "help info")
|
||||
return None, None
|
||||
if "cmd" not in info_out:
|
||||
# if TUI is not enabled, info win will output "The TUI is not active."
|
||||
return None, None
|
||||
|
|
Loading…
Reference in New Issue