This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Put a NT_PSTATUS note on solaris cores.
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 11 Oct 2009 14:21:14 -0700
- Subject: Re: Put a NT_PSTATUS note on solaris cores.
- References: <200910090236.10584.pedro@codesourcery.com>
On Thu, Oct 8, 2009 at 6:36 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> 2009-10-09 ?Pedro Alves ?<pedro@codesourcery.com>
>
> ? ? ? ?gdb/
> ? ? ? ?* procfs.c (procfs_make_note_section): Always output a NT_PSTATUS
> ? ? ? ?note when NEW_PROC_API is defined.
This causes build failure on 32-bit solaris-10:
gcc -g -O2 \
-o gdb gdb.o libgdb.a \
../readline/libreadline.a ../opcodes/libopcodes.a
../bfd/libbfd.a ./../intl/libintl.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a -ldl -lcurses -lz -lsocket -lnsl -lm
-lpython2.4 -lexpat ../libiberty/libiberty.a gnulib/libgnu.a
Undefined first referenced
symbol in file
elfcore_write_pstatus libgdb.a(procfs.o)
ld: fatal: Symbol referencing errors. No output written to gdb
collect2: ld returned 1 exit status
bfd/elf.c defines elfcore_write_pstatus only when HAVE_PSTATUS_T
From bfd/config.log:
configure:14057: checking for pstatus_t in sys/procfs.h
configure:14075: gcc -c -g -O2 conftest.c >&5
conftest.c: In function `main':
conftest.c:81: error: `pstatus_t' undeclared (first use in this function)
This appears to be a bfd configury bug: AFAIC, pstatus_t is defined if
'#include <procfs.h>, but not if '#include <sys/procfs.h>', because
the former defines _STRUCTURED_PROC to 1, and the latter to 0.
Not sure what the proper fix is.
Thanks,
--
Paul Pluzhnikov