* bug#48731: 26.3; GDB doesn't draw breakpoints with <MULTIPLE> addresses/locations
@ 2021-05-29 16:54 Niall Ryan
0 siblings, 0 replies; only message in thread
From: Niall Ryan @ 2021-05-29 16:54 UTC (permalink / raw)
To: 48731
[-- Attachment #1: Type: text/plain, Size: 2593 bytes --]
------
Bug Description:
Issue:
'gdb' with gdb-many-windows, fails to draw breakpoints in the bar
on the left of each window if the gdb breakpoint has <MULTIPLE>
addresses/multiple locations.
<MULTIPLE> addresses can occur if a shared library breakpoint is set.
The issue appears to manifest in the function gdb-place-breakpoints()
- For each breakpoint, the function uses
(bindat-get-field breakpoint 'line)
to determine the linenumber of the breakpoint
- However, this fails for breakpoints as the line field (if
present), is at a lower level of the list tree, in one of the items in
the sublist "locations"
Example:
Note: I am creating these breakpoints as follows. On gdb
startup, the shared library symbols are loaded and set with:
- add-symbol-file -readnow handmade.so
- b handmade.cpp:224
The breakpoint will initially be drawn in the relevant buffer
The value of gdb-breakpoint-list is at first:
((#1="1"
(number . #1#)
(type . "breakpoint")
(disp . "keep")
(enabled . "y")
(addr . "0x000000000000c168")
(func . "GameUpdateAndRender(game_memory*, game_input*,
game_render_commands*)")
(file . "../cpp/code/handmade.cpp")
(fullname . "/home/niall/software/handmadehero/sdl/cpp/code/handmade.cpp")
(line . "224")
(thread-groups "i1")
(times . "0")
(original-location . "handmade.cpp:224")))
(bindat-get-field breakpoint 'line) initially succeeds and the
breakpoint is drawn.
However, on running the program, once the shared library is actually
loaded, the value of gdb-breakpoint-list becomes
((#1="1"
(number . #1#)
(type . "breakpoint")
(disp . "keep")
(enabled . "y")
(addr . "")
(times . "1")
(original-location . "handmade.cpp:224")
(locations
((number . "1.1")
(enabled . "y")
(addr . "")
(pending . "handmade.cpp:224")
(thread-groups "i1"))
((number . "1.2")
(enabled . "y")
(addr . "0x00007ffff7f4e168")
(func . "GameUpdateAndRender(game_memory*, game_input*,
game_render_commands*)")
(file . "../cpp/code/handmade.cpp")
(fullname . "/home/niall/software/handmadehero/sdl/cpp/code/handmade.cpp")
(line . "224")
(thread-groups "i1")))))
And (bindat-get-field breakpoint 'line) fails,
and the breakpoint is no longer drawn (it is initially wiped in
gdb-place-breakpoints)
I hope this helps someone.
Niall
P.S.
I am not well expierienced with lisp, so apologies for any terminology
errors.
-----------------------------End Bug description-------
In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14)
of 2020-03-26, modified by Debian built on lcy01-amd64-020
Windowing system distributor 'The X.Org Foundation
[-- Attachment #2: Type: text/html, Size: 6103 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-29 16:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-29 16:54 bug#48731: 26.3; GDB doesn't draw breakpoints with <MULTIPLE> addresses/locations Niall Ryan
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).