13def btload (limit = 100):
14 retry = True
15 last_iframe = -1
16 while retry:
17 frame = gdb.newest_frame()
18 iframe = 0
19 retry = False
20 while frame and frame.is_valid() and iframe < limit:
21 if frame.name() is None:
22 lib = findlib (frame.pc())
23 if lib and lib != 'libubsan.so' and lib != 'libasan.so':
24 retry = True
25 break
26 if frame.name() == 'ApplicationMgr::executeRun':
27 break
28 if frame.name() == '_Py_UnixMain':
29 break
30 frame = frame.older()
31 iframe = iframe + 1
32 if iframe <= last_iframe: break
33 last_iframe = iframe
34 return
35
36