All of lore.kernel.org
 help / color / mirror / Atom feed
* Debugging gdb built by Yocto
@ 2020-02-18 16:26 Patrick Doyle
  2020-02-19 22:05 ` [yocto] " Khem Raj
  2020-02-19 22:19 ` Richard Purdie
  0 siblings, 2 replies; 6+ messages in thread
From: Patrick Doyle @ 2020-02-18 16:26 UTC (permalink / raw)
  To: Yocto discussion list

Does anybody have any tips or tricks for how I might debug the
(cross-canadian) gdb built by Yocto's SDK?

I need to add some printf's to the gdb code to help track down why
something isn't working, but none of my traditional
get-ready-to-debug-this-code techniques are working.

How can I run the gdb that I just built?  Note that I am presuming that I can

$ bitbake gdb-cross-canadian-mipsel -ccompile -f

to rebuild gdb after I add a printf or two to it... but I can't figure
out how to run gdb without going through the sdk installation step.

$ bitbake gdb-cross-canadian-mipsel -cdevshell
# ../build-mipsel-poky-linux/gdb/gdb
bash: ../build-mipsel-poky-linux/gdb/gdb: No such file or directory
# file ../build-mipsel-poky-linux/gdb/gdb
../build-mipsel-poky-linux/gdb/gdb: ELF 64-bit LSB shared object,
x86-64, version 1 (GNU/Linux), dynamically linked, interpreter
/opt/iro, BuildID[sha1]=7f985bbe4cb6c97558b159860b2498f6389b254e, for
GNU/Linux 3.2.0, not stripped
# ldd ../build-mipsel-poky-linux/gdb/gdb
../build-mipsel-poky-linux/gdb/gdb: /lib/x86_64-linux-gnu/libm.so.6:
version `GLIBC_2.29' not found (required by
../build-mipsel-poky-linux/gdb/gdb)
    linux-vdso.so.1 =>  (0x00007fff8a0c2000)
 ...

# LD_LIBRARY_PATH=../recipe-sysroot-native/usr/libexec:../recipe-sysroot-native/usr/lib
../build-mipsel-poky-linux/gdb/gdb
bash: ../build-mipsel-poky-linux/gdb/gdb: No such file or directory

None of the techniques from my bag-of-tricks works.

I guess I could go grab the source myself, manually apply the patches
myself, build it, and see if that works.

Or I could sit down real hard and think about why I am trying to debug
the canadian-cross built tool on my development host... perhaps I
should try debugging the native (cross)-gdb on my native host.  I'll
go try that now, but, in the mean time, I thought it was about time
for me to ask others for some clues.

Any clues or pointers?

--wpd

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-24 14:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-18 16:26 Debugging gdb built by Yocto Patrick Doyle
2020-02-19 22:05 ` [yocto] " Khem Raj
2020-02-19 22:19 ` Richard Purdie
2020-02-20 13:52   ` Patrick Doyle
2020-02-20 21:18     ` Khem Raj
2020-02-24 14:56       ` Patrick Doyle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.