Re: Debugging gdb built by Yocto


Patrick Doyle <wpdster@...>
 

On Thu, Feb 20, 2020 at 4:18 PM Khem Raj <raj.khem@...> wrote:
On Thu, 2020-02-20 at 08:52 -0500, Patrick Doyle wrote:
I am trying to understand why I can't get stack traces from cores
file
on a mipsel system. At the moment (after strategic additions of
breakpoints, printf statements, and more breakpoints, and lots of
internet combing), I am chasing down a rabbit hole related to the
facts that the MIPS build uses/produces PIE code (Position
Independent
Executables, which is somehow different than Position Independent
Code), a new ELF tag (MIPS_RLD_MAP_REL) was added 5 years ago to
binutils, gdb looks for that tag, but the musl dynamic loader is not
aware of it. I don't know if this is the root cause of my problem or
just (another) rabbit hole. If anybody has any suggestions, I'm all
ears.
You must be on to something here, since musl does not do anything with
MIPS_RLD_MAP*, does this all work well with glibc/mips in same settings
?
I haven't tried this with glibc/mips with the same settings, but I
expect it would work in that scenario, as I see support for
MIPS_RLD_MAP_REL in the glibc sources.

If anybody is interested, I have attached the two patches we applied
to get core dumps to work. I am planning to clean them up a bit and
submit them upstream and/or to Yocto/OE's repo, but, in case I don't
(or I forget), and since you expressed an interest in this, I am
including them here.

I'm not sure if my email will make it to the list with attachments or
not. We'll see.

--wpd

Join yocto@lists.yoctoproject.org to automatically receive all group messages.