gdb and variadic functions
Tom Tromey
tromey@redhat.com
Tue Oct 29 15:09:00 GMT 2013
>>>>> "Krister" == Krister Olofsson <krister.olofsson@gmail.com> writes:
Krister> Building with -gstabs results in wrong value of argc and building with
Krister> -fvar-tracking gives wrong values of arguments in variadic functions.
It's better not to use stabs.
Krister> gcc version 4.2.1 20070719 [FreeBSD]
Krister> GNU gdb 6.1.1 [FreeBSD]
You're using an old version of gcc and an amazingly old version of gdb.
Using more current versions makes your test case work for me. So the
simple answer is that you are probably seeing a bug that was fixed
sometime in the last 6 years (gcc) or 9 years (gdb).
Offhand I don't know what the bug might be.
Tom
More information about the Gdb
mailing list