This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [hppa-hpux] Core file support for hppa64-hp-hpux11.11
> Date: Fri, 18 Nov 2005 07:44:04 +0800
> From: Randolph Chung <randolph@tausq.org>
>
> > Ok, so your problem is that the core file is marked as "UNIX - System
> > V", so there's no way to tell that this is a HP-UX core file.
>
> Yes.
>
> > What I'd do, is create BFD sections out of those HP_CORE_XXX program
> > headers, and then in GDB, check for one of those sections. There's
> > one program header that looks particularly promising: HP_CORE_KERNEL.
> > That one contains the string HP-UX. That'd certainly convince me that
> > this is a HP-UX core file.
>
> [...]
>
> > Actually I think it makes sense to modify your BFD patch such that it
> > gives all HP_CORE_XXX program headers a sensible name:
>
> Sure, I'll do that.
>
> So basically you want:
> 1) BFD to name the HP_CORE_KERNEL phdr as a "core.kernel" section
> 2) GDB in its OSABI sniffer will look for this section and check that
> its contents contains "HP-UX"
>
> right?
Yes. The section will come out as .core.kernel in objdump. Perhaps
it should be .hp.core.kernel. I'll leave the naming decision to you
and/or the binutils maintainers. But I think that's better than
having all those .proc0, .proc1, .proc2 sections that we have now.
And it makes it easier to pick the right one from GDB.
Mark