mirror of
https://github.com/tromey/gdb-gui.git
synced 2025-12-16 07:10:04 +01:00
handle case where symtab is None
This commit is contained in:
@@ -122,7 +122,10 @@ def get_current_location():
|
|||||||
frame = gdb.selected_frame()
|
frame = gdb.selected_frame()
|
||||||
sal = frame.find_sal()
|
sal = frame.find_sal()
|
||||||
symtab = sal.symtab
|
symtab = sal.symtab
|
||||||
filename = symtab.fullname()
|
if symtab is not None:
|
||||||
|
filename = symtab.fullname()
|
||||||
|
else:
|
||||||
|
filename = None
|
||||||
lineno = sal.line
|
lineno = sal.line
|
||||||
except gdb.error:
|
except gdb.error:
|
||||||
# FIXME: should use the static location as set by list etc.
|
# FIXME: should use the static location as set by list etc.
|
||||||
|
|||||||
Reference in New Issue
Block a user