This is the mail archive of the gdb@sources.redhat.com 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]

gdb-5.3 with bdm patches segfaults whem reading symbols


Hello!

[ I crosspost this to the gdb list since it seems to me that the problem
  might be gdb related. If you wonder what those bdm branches are, please
  check the URLs below. ]

I have problems to get the m68k branch of the bdm stuff to work. Immediately
after startup, gdb-5.3 segfaults even before I have a chance to enter a
command. The m683xx branch runs very fine with exaclty the same configure
settings. The segfault happens with both, coff and elf. The segfault happens
in read_one_sym() at gdb/coffread.c:1139. The offending call is

  bfd_coff_swap_sym_in(symfile_bfd,...)

This is a macro which expands to

  coff_backend_info(symfile_bfd)->_bfd_coff_swap_sym_in(symfile_bfd,...)

Which finally expands to

  ((bfd_coff_backend_data *)(symfile_bfd)->xvec->backend_data)
              ->_bfd_coff_swap_sym_in(symfile_bfd,...)

Unfortunately, _bfd_coff_swap_sym_in is a pointer to nirvana, so the
subroutine call segfaults. I have grepped gdb/bfd sources for
bfd_coff_swap_sym_in but I could not find the place where this pointer
gets a sane value. How is this supposed to work? Who is responsible to
fill coff_backend_info with sane data?

BTW: If it makes any difference, here are my configure options:

$SRCDIR/configure --prefix=/usr/local/crossgcc --enable-languages=c
 --build=i486-linux --host=i486-linux --enable-commonbfdlib --nfp --gas -v
 --target=m68k-bdm-coff --enable-targets=m68k-elf,m68k-ieee
 --with-gnu-ld --with-gnu-as --with-newlib --with-stabs

m68k branch:
  http://cvs.sourceforge.net/viewcvs.py/bdm/bdm/gdb/patches/gdb-5.3-m68k.patch

m683xx branch:
  http://cvs.sourceforge.net/viewcvs.py/bdm/bdm/m683xx/gdb-5.3-bdm-683xx-patch

-- 
Please visit and sign http://petition-eurolinux.org and http://www.ffii.org
-- Josef Wolf -- jw@raven.inka.de --


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