This is the mail archive of the
mailing list for the GDB project.
Re: Fix auxv parsing on Solaris
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com, Joel Brobecker <brobecker at adacore dot com>
- Date: Thu, 17 Apr 2008 13:50:42 -0400
- Subject: Re: Fix auxv parsing on Solaris
- References: <firstname.lastname@example.org>
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
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): 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
> +2008-04-10 Vladimir Prus <email@example.com>
> + Issue #2775.
> + gdb/
Wrong issue tracker and ChangeLog :-)