On Wed, Feb 19, 2020 at 5:19 PM Richard Purdie
<richard.purdie@...> wrote:
On Tue, 2020-02-18 at 11:26 -0500, Patrick Doyle wrote:
Does anybody have any tips or tricks for how I might debug the
(cross-canadian) gdb built by Yocto's SDK?
Do you perhaps want gdb-cross-mipsel ?
cross-canadian is designed to be run as part of the SDK.
Thank you. That is, indeed, what I want. It demonstrates the same
problem, and I can debug it.
Aside... it's quite a mind bending experience to debug gdb with gdb :-)
Just imagine...
$ gdb gdb-cross-mipsel
(gdb) break main
(gdb) run
(gdb)
That last "(gdb)" prompt is from the gdb I'm debugging :-)
Also aside... and totally off topic, except that I'm sure some might
be wondering why I feel the need to debug gdb...
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.
--wpd