This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug corefiles/14944] "Couldn't find general-purpose registers incore file." while reading 32-bit core files on Solaris 11.


http://sourceware.org/bugzilla/show_bug.cgi?id=14944

--- Comment #6 from Pedro Alves <palves at redhat dot com> 2012-12-12 11:55:26 UTC ---
Best would be to pick up an x86_64 GNU/Linux box, and follow through the code
figuring out how things are supposed to work in this same scenario.

The core handling code in gdb starts in corelow.c.  Architecture and OS hooks
go through gdbarch callbacks.  The actually reading of the core files is done
by the bfd library.  bfd only "thinks" in terms of sections, so in order to get
at e.g., the registers for each of the core's threads, GDB will look for
sections name .reg/NNN.  These are so called pseudo-sections, because they
don't really exist on the core -- bfd made them up.  You can find the code that
does that in bfd/elf.c, look for make_pseudosection, and the various "grok"
routines.

My guess is that the change to use the new proc API make it so some #ifdef
(like HAVE_PRSTATUS_T, HAVE_PRPSINFO_T, etc.) now has different results. 
There's desire to get rid of the #ifdefery in the first place.  So if indeed
the problem is related to that, the best fix would be to make the Solaris core
bfd support code host independent (so cross debugging of cores works), like
other targets already are -- see the elf_backend_grok_prstatus hook, etc.,
though you may likely find a simpler fix.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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