mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Fix DAP stackTrace through frames without debuginfo
The DAP stackTrace implementation did not fully account for frames without debuginfo. Attemping this would yield a result like: {"request_seq": 5, "type": "response", "command": "stackTrace", "success": false, "message": "'NoneType' object has no attribute 'filename'", "seq": 11} This patch fixes the problem by adding another check for None.
This commit is contained in:
@ -69,7 +69,7 @@ def _backtrace(thread_id, levels, startFrame):
|
||||
"instructionPointerReference": hex(current_frame.pc()),
|
||||
}
|
||||
sal = _safe_sal(current_frame)
|
||||
if sal is not None:
|
||||
if sal is not None and sal.symtab is not None:
|
||||
newframe["source"] = {
|
||||
"name": os.path.basename(sal.symtab.filename),
|
||||
"path": sal.symtab.filename,
|
||||
|
Reference in New Issue
Block a user