This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb and variadic functions
- From: Krister Olofsson <krister dot olofsson at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 29 Oct 2013 16:16:29 +0100
- Subject: Re: gdb and variadic functions
- Authentication-results: sourceware.org; auth=none
- References: <526FCDDB dot 9090707 at gmail dot com> <87vc0g8670 dot fsf at fleche dot redhat dot com>
Hi,
yes I know that the versions is very old but it's the latest released
for FreeBSD/ARM that I can find. Porting a new version could take some
time...
//Krister
On 10/29/2013 04:09 PM, Tom Tromey wrote:
>>>>>> "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
>