public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdb-5.3 with bdm patches segfaults whem reading symbols
@ 2003-10-07 20:05 Josef Wolf
  0 siblings, 0 replies; only message in thread
From: Josef Wolf @ 2003-10-07 20:05 UTC (permalink / raw)
  To: bdm-devel, gdb

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 --

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-07 20:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-07 20:05 gdb-5.3 with bdm patches segfaults whem reading symbols Josef Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).