arm core analysis on x86 host
Daniel Jacobowitz
drow@false.org
Wed Mar 30 18:18:00 GMT 2005
On Wed, Mar 30, 2005 at 08:01:56PM +0200, Mark Kettenis wrote:
> It looks to me from tracing this through on i386, that the reason
> it works is because foo-*-linux* configurations default to
> GDB_OSABI_LINUX and none of the OS/ABI sniffers trigger on the core
> file. An accident, basically.
>
> Not completely accidental. If we don't have the means to determine
> the OS/ABI it makes sense to default to the target (implicitly)
> selected by the user.
Well, yes. This is one of the reasons I added the default osabi
mechanism. At least I think it was me :-)
> The reason this doesn't work for ARM is because the sniffer tags
> the core file as GDB_OSABI_ARM_APCS. I've been meaning to change
> the way ARM OS/ABI detection works, which will "fix" this as a side
> effect; I will move that up my list and try to do it today.
>
> Well, if there is some sort of standard ARM APCS core file this is
> perfectly OK. In that case we shouldn't think about this as a Linux
> core file, but an ARM APCS core file. There should be an ARM APCS
> architecture vector with a regset_from_core_section() that knows how
> to interpret it.
>
> But i guess that's not the case.
Right. APCS is simply the default for "unknown" ABIs; the sniffer is
being over-eager. Patch forthcoming.
> There are several possibilities. Yes, sniffers should be as clever as
> they can possibly be. But the regset_from_core_section() functions
> can be made cleverer too. And the core file reading code in BFD can
> help too by generating core file sections with meaningful names.
I wonder if we should fall back to the executable's OSABI in some case?
Anyway, not an urgent question.
--
Daniel Jacobowitz
CodeSourcery, LLC
More information about the Gdb
mailing list