Debugger: Use Python for GDB stack extraction in native mixed mode

Change-Id: I7ca4a080c9b5e5992f44e5f3d8aa5af7296abe99
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2014-12-12 09:22:57 +01:00
parent bf9b63174e
commit 20396d7809
3 changed files with 52 additions and 36 deletions
+12 -5
View File
@@ -1697,8 +1697,8 @@ class Dumper(DumperBase):
return typeobj
def stackListFrames(self, n):
self.prepare("options:pe")
def stackListFrames(self, n, options):
self.prepare("options:" + options + ",pe")
self.output = []
frame = gdb.newest_frame()
@@ -1912,9 +1912,16 @@ registerCommand("reload", reloadDumper)
#######################################################################
def stackListFrames(arg):
args = arg.split(' ')
limit = int(args[1]) if len(args) >= 2 else 1000
return theDumper.stackListFrames(limit)
try:
args = arg.split(' ')
limit = int(args[0]) if len(args) > 0 else 10000
if limit <= 0:
limit = 10000
options = args[1] if len(args) > 1 else ""
return theDumper.stackListFrames(limit, options)
except:
import traceback
traceback.print_exc()
registerCommand("stackListFrames", stackListFrames)