diff options
author | Gregory Anders <greg@gpanders.com> | 2023-09-01 16:02:20 -0500 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-09-20 10:59:47 -0600 |
commit | 0b7de6d3ee07653e97e65a2968742c93b7102f62 (patch) | |
tree | 4f90cf6e3dfa02f9bd013e86db73b02eb5a7c0df /gdbsupport/gdb_wait.h | |
parent | 61830fcb31d9b66c7af76eefc152b66a170fb49c (diff) | |
download | gdb-0b7de6d3ee07653e97e65a2968742c93b7102f62.zip gdb-0b7de6d3ee07653e97e65a2968742c93b7102f62.tar.gz gdb-0b7de6d3ee07653e97e65a2968742c93b7102f62.tar.bz2 |
gdb/dap: only include sourceReference if file path does not exist
According to the DAP specification if the "sourceReference" field is
included in a Source object, then the DAP client _must_ make a "source"
request to the debugger to retrieve file contents, even if the Source
object also includes path information.
If the Source's path field is a valid path that the DAP client is able
to read from the filesystem, having to make another request to the
debugger to get the file contents is wasteful and leads to incorrect
results (DAP clients will try to get the contents from the server and
display those contents as a file with the name in "source.path", but
this will conflict with the _acutal_ existing file at "source.path").
Instead, only set "sourceReference" if the source file path does not
exist.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdbsupport/gdb_wait.h')
0 files changed, 0 insertions, 0 deletions