Fix exception in repeated command function (#2038)

pull/2039/head
Gulshan Singh 2 years ago committed by GitHub
parent 5c5bf5ae3a
commit ba8c7bdece
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -172,7 +172,13 @@ class Command(gdb.Command):
last_line = lines[-1]
number_str, command = last_line.split(maxsplit=1)
number = int(number_str)
try:
number = int(number_str)
except ValueError:
# In rare cases GDB will output a warning after executing `show commands`
# (i.e. "warning: (Internal error: pc 0x0 in read in CU, but not in
# symtab.)").
return False
# A new command was entered by the user
if number not in Command.history:

Loading…
Cancel
Save