public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* need help with untyped core dumps and multi-arch
@ 2000-10-24 15:29 J.T. Conklin
  2000-10-27 10:38 ` J.T. Conklin
  0 siblings, 1 reply; 2+ messages in thread
From: J.T. Conklin @ 2000-10-24 15:29 UTC (permalink / raw)
  To: gdb, binutils

We've been using a core dump format I came up with (it is similar 
to the 4.4BSD core dump format, but has extra info in the headers 
that identify the processor type and byte-order).

Now that the powerpc-port is multi-arched, I get a failure in set_
gdbarch_from_file(), as gdbarch_update_p() is not able to set the
architecture from the core dump file.  The problem is bfd_get_arch_
info() returns bfd_arch_unknown.

My bfd core dump implementation is written very much like the cisco
implementation, which as far as I can tell does nothing to handle
this.  Fortunately, unlike Cisco, I can extract the processor type 
from the core dump format.  I see there is a bfd_set_arch_info() 
function, but there does not appear to be anything that actually
uses it, so I'm not sure that's how I should be approaching this.

Any clues would be appreciated,

        --jtc

-- 
J.T. Conklin
RedBack Networks

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: need help with untyped core dumps and multi-arch
  2000-10-24 15:29 need help with untyped core dumps and multi-arch J.T. Conklin
@ 2000-10-27 10:38 ` J.T. Conklin
  0 siblings, 0 replies; 2+ messages in thread
From: J.T. Conklin @ 2000-10-27 10:38 UTC (permalink / raw)
  To: gdb; +Cc: binutils

>>>>> "jtc" == J T Conklin <jtc@redback.com> writes:
jtc> Now that the powerpc-port is multi-arched, I get a failure in set_
jtc> gdbarch_from_file(), as gdbarch_update_p() is not able to set the
jtc> architecture from the core dump file.  The problem is bfd_get_arch_
jtc> info() returns bfd_arch_unknown.

After thinking about this for a few days, I've convinced myself that
while BFD could probably be made to return the target architecture of
our crash dump files, that GDB needs to handle untyped core dumps for
those formats that don't the target arch (e.g. Cisco dump format).

A quick hack that works fine for me, is to remove the call to
set_gdbarch_from_file() in corelow.c:core_open().  But I suspect that
this isn't the right fix --- presumably there was a reason to set the
architecture from the core dump file.  Anyone know the scoop here?

My best guess is that we need a function to set the architecture from
a bfd if it is known, otherwise to leave things as they are.  In that
case, GDB would continue to use the architecture of the exec file.

Thoughts?

        --jtc

-- 
J.T. Conklin
RedBack Networks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-10-27 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-24 15:29 need help with untyped core dumps and multi-arch J.T. Conklin
2000-10-27 10:38 ` J.T. Conklin

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