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: Put a NT_PSTATUS note on solaris cores.

On Thu, Oct 8, 2009 at 6:36 PM, Pedro Alves <> wrote:

> 2009-10-09 ?Pedro Alves ?<>
> ? ? ? ?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.

Paul Pluzhnikov

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