This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: need help with untyped core dumps and multi-arch


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

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