Re: gdb and variadic functions
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Krister" == Krister Olofsson <[email protected]> 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