Commit 3388e88a authored by hjk's avatar hjk

debugger: catch python exception

Iterating through gdb.Frame.blocks() also yields function-local struct
definitions that cause later errors when attempting to use them as
local variable. This is arguably a gdb issue as it is inconsistent with
the result of plain old "info locals" output.

Reviewed-by: Friedemann Kleint
parent d0baf43b
......@@ -491,9 +491,12 @@ def listOfLocals(varList):
item = Item(0, "local", name, name)
try:
item.value = frame.read_var(name) # this is a gdb value
except RuntimeError:
# happens for void foo() { std::string s; std::wstring w; }
#warn(" FRAME READ VAR ERROR: %s (%s): " % (symbol, name))
except:
# RuntimeError: happens for
# void foo() { std::string s; std::wstring w; }
# ValueError: happens for (as of 2010/11/4)
# a local struct as found e.g. in
# gcc sources in gcc.c, int execute()
continue
#warn("ITEM %s: " % item.value)
items.append(item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment