Fix DAP stackTrace through frames without debuginfo
authorTom Tromey <tromey@adacore.com>
Tue, 14 Feb 2023 16:25:55 +0000 (09:25 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 6 Mar 2023 15:15:04 +0000 (08:15 -0700)
commit68ca7890ddaeb849c390295ecd914087da463497
tree62ae6d0e11730458202151c31f48dd272534e58a
parentc52e4861c61926a1e22e56837487b819e2dc3cc8
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.
gdb/python/lib/gdb/dap/bt.py
gdb/testsuite/gdb.dap/bt-inner.c [new file with mode: 0644]
gdb/testsuite/gdb.dap/bt-main.c [new file with mode: 0644]
gdb/testsuite/gdb.dap/bt-nodebug.exp [new file with mode: 0644]