GDB 13.2: breakpoint at wrong line after unrelated change

Paul Smith psmith@gnu.org
Sat Mar 16 19:57:11 GMT 2024


On Sat, 2024-03-16 at 12:33 -0400, Simon Marchi wrote:
> Here, GDB stopped at the very first instruction of the function.  The
> arguments are wrong:
> If I step past the prologue, they become correct:

Everything you discovered is identical to my situation in every way,
and you got a little further than I did.  It's interesting that as long
as I don't invoke my perfect-forwarding fmt templated function it
works; as soon as I do GDB seems to misinterpret the handling of the
entire binary.

It seems this is a bug in GDB, after all.  I feel like you're in a
better position to file a bug (with a deeper understanding of the
problem) but if you would prefer me to do so I can.  I'm certainly
willing to test out any proposed fixes, if any were forthcoming.  I do
have the infrastructure here to build and test GDB.


In the meantime I will look into what I can do to work around this
issue as it's causing some of my tests to fail (we have a suite of GDB
Python macros we use and we wrote tests of these macros in our test
suite, which are failing due to this problem).  I don't really want to
delay deployment of my fmt changes until this GDB issue is fixed. 
Perhaps I can modify the tests to add a "step" call, if it detects this
incorrect prologue skip situation or something like that.

Thanks!

-- 
Paul D. Smith <psmith@gnu.org>            Find some GNU Make tips at:
https://www.gnu.org                       http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist





More information about the Gdb mailing list