binutils-gdb/gdb/testsuite/gdb.dap
Tom Tromey 30baee6865 Use frame.name() in FrameDecorator
A co-worker pointed out that gdb's DAP implementation might return an
integer for the name of a stack frame, like:

    {"id": 1, "name": 93824992310799, ...}

This can be seen currently in the logs of the bt-nodebug.exp test
case.

What is happening is that FrameDecorator falls back on returning the
PC when the frame's function symbol cannot be found, relying on the
gdb core to look up the minsym and print its name.

This can actually yield the wrong answer sometimes, because it falls
into the get_frame_pc / get_frame_address_in_block problem -- if the
frame is at a call to a noreturn function, the PC in this case might
appear to be in the next function in memory.  For more on this, see:

    https://sourceware.org/bugzilla/show_bug.cgi?id=8416

and related bugs.

However, there's a different approach we can take: the code here can
simply use Frame.name.  This handles the PC problem correctly, and
gets us the information we need.
2023-08-03 09:35:38 -06:00
..
ada-scopes
catch-exception
ada-scopes.exp
args-env.c
args-env.exp
attach.c
attach.exp
basic-dap.c
basic-dap.exp Implement DAP "source" request 2023-08-01 13:14:47 -06:00
bt-inner.c
bt-main.c
bt-nodebug.exp Use frame.name() in FrameDecorator 2023-08-03 09:35:38 -06:00
catch-exception.exp
cond-bp.c
cond-bp.exp
cwd.exp
cxx-exception.cc Add DAP support for C++ exceptions 2023-08-01 12:59:02 -06:00
cxx-exception.exp Add DAP support for C++ exceptions 2023-08-01 12:59:02 -06:00
frameless.c
frameless.exp
hover.c
hover.exp Implement ValueFormat for DAP 2023-08-01 13:03:31 -06:00
log-message.c
log-message.exp
memory.c Respect supportsMemoryReferences in DAP 2023-08-01 13:00:57 -06:00
memory.exp Respect supportsMemoryReferences in DAP 2023-08-01 13:00:57 -06:00
modules-solib.c
modules.c
modules.exp
pause.exp
remote-dap.exp
scopes.c
scopes.exp
sources.c Implement DAP "source" request 2023-08-01 13:14:47 -06:00
sources.exp Implement DAP "source" request 2023-08-01 13:14:47 -06:00
stop-at-main.exp
terminate.exp
type_check.exp
type_check.py