]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Handle linesStartAt1 in DAP
authorTom Tromey <tromey@adacore.com>
Mon, 16 Dec 2024 17:44:55 +0000 (10:44 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 6 Jan 2025 14:32:11 +0000 (07:32 -0700)
commit8ac42dbf5001416e6b741c5361be14186afde5b0
treea05b26736fc12b4813f00d487cba2e5b6e0796d8
parent350609bb98cee92c6b4fbd334b99066683b9e5c1
Handle linesStartAt1 in DAP

The DAP initialize request has a "linesStartAt1" option, where the
client can indicate that it prefers whether line numbers be 0-based or
1-based.

This patch implements this.  I audited all the line-related code in
the DAP implementation.

Note that while a similar option exists for column numbers, gdb
doesn't handle these yet, so nothing is done here.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32468
gdb/python/lib/gdb/dap/breakpoint.py
gdb/python/lib/gdb/dap/bt.py
gdb/python/lib/gdb/dap/disassemble.py
gdb/python/lib/gdb/dap/locations.py
gdb/python/lib/gdb/dap/scopes.py
gdb/python/lib/gdb/dap/server.py
gdb/testsuite/gdb.dap/line-zero.exp [new file with mode: 0644]
gdb/testsuite/lib/dap-support.exp