GNU bug report logs -
#48731
26.3; GDB doesn't draw breakpoints with <MULTIPLE> addresses/locations
Previous Next
To reply to this bug, email your comments to 48731 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48731
; Package
emacs
.
(Sat, 29 May 2021 17:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Niall Ryan <niall.christopher.ryan <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 29 May 2021 17:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
------
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
[Message part 2 (text/html, inline)]
This bug report was last modified 3 years and 178 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.