Skip to content

Commit

Permalink
Silence "program is not running" errors in gdb stop hook
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed May 26, 2018
1 parent cb209cb commit b7167d5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ish-gdb.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ end

define hook-stop
python
symtab = gdb.selected_frame().find_sal().symtab
if symtab is not None and symtab.filename.endswith('.S'):
gdb.execute('set disassemble-next-line on')
try:
symtab = gdb.selected_frame().find_sal().symtab
except:
pass
else:
gdb.execute('set disassemble-next-line auto')
if symtab is not None and symtab.filename.endswith('.S'):
gdb.execute('set disassemble-next-line on')
else:
gdb.execute('set disassemble-next-line auto')
end
end

0 comments on commit b7167d5

Please sign in to comment.