Patrick Doyle <wpdster@...>
On Wed, Feb 19, 2020 at 5:19 PM Richard Purdie
On Tue, 2020-02-18 at 11:26 -0500, Patrick Doyle wrote:Thank you. That is, indeed, what I want. It demonstrates the sameDoes anybody have any tips or tricks for how I might debug theDo you perhaps want gdb-cross-mipsel ?
problem, and I can debug it.
Aside... it's quite a mind bending experience to debug gdb with gdb :-)
$ gdb gdb-cross-mipsel
(gdb) break main
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