This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix auxv parsing on Solaris

On Thu, Apr 10, 2008 at 10:23:36AM +0400, Vladimir Prus wrote:
> Presently, gdb does not properly parse auxv data on Solaris when GDB is
> built as 64-bit binary, and the program been debugger is 32-bit. On Solaris,
> 32-or-64-bitness of the application accessing /proc/*/auxv determines format
> of the data read, while GDB presently only uses size of target types during
> parsing. 

Joel, you'll be interested in this patch; it was also broken for
64-bit binaries.  Turns out the auxv layout on 64-bit Solaris is
different than on 64-bit Linux.  It's int tag, padding, long value
instead of long tag, long value.

So this patch will fix native GDB on 64-bit SPARC Solaris, although
I suspect it may not fix info auxv from 64-bit core files.  We can
address that separately...

>         * target.h (struct target_ops): New field to_auxv_parse.
>         * auxv.c (default_auxv_parse): New, renamed from previous
>         target_auxv_parse.
>         (target_auxv_parse): Try to call target method.  Fallback to
>         default_auxv_parse if not found.
>         * procfs.c (procfs_auxv_parse): New.
>         (init_procfs_ops): On Solaris, in 64-bit mode, install
>         procfs_auxv_parse.


> +2008-04-10  Vladimir Prus  <>
> +
> +	Issue #2775.
> +	gdb/

Wrong issue tracker and ChangeLog :-)

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]