From 089d965a4bf769c1c42accb069a4086321ebe599 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 10 May 2015 10:57:09 -0600 Subject: [PATCH] handle case where symtab is None --- gui/source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/source.py b/gui/source.py index 5b48260..7192c67 100644 --- a/gui/source.py +++ b/gui/source.py @@ -122,7 +122,10 @@ def get_current_location(): frame = gdb.selected_frame() sal = frame.find_sal() symtab = sal.symtab - filename = symtab.fullname() + if symtab is not None: + filename = symtab.fullname() + else: + filename = None lineno = sal.line except gdb.error: # FIXME: should use the static location as set by list etc.