[oe] How can I use gdb in oe?

Mats Kärrman Mats.Karrman at tritech.se
Wed Apr 9 07:28:24 UTC 2014


Hi,

Assuming that you mean to debug programs on your target...

Prerequisites:
- a network connection between your target and your development host (it's possible to use a tty too).
- OE built SDK installed on your host.
- gdbserver package installed on your target.
- your binary (my-program) on target
- an unstripped version of your binary in the working directory on host.

The exact commands below will vary with the install path of your SDK (/usr/local/oecore-x86_64 in my case)
and target specifics (e.g. powerpc, ppce300c3... in my case).

On target:
# gdbserver :2345 my-program

On host:
$ source /usr/local/oecore-x86_64/environment-setup-ppce300c3-oe-linux
$ powerpc-oe-linux-gdb my-program
(gdb) set sysroot /usr/local/oecore-x86_64/sysroots/ppce300c3-oe-linux
(gdb) target remote <target-ip>:2345
(gdb) br main
(gdb) cont
...

Good Luck!
// Mats

________________________________________
From: openembedded-devel-bounces at lists.openembedded.org [openembedded-devel-bounces at lists.openembedded.org] on behalf of Journeyer J. Joh [oosaprogrammer at gmail.com]
Sent: Tuesday, April 08, 2014 4:20 PM
To: openembedded-devel at lists.openembedded.org
Subject: [oe] How can I use gdb in oe?

Hello,

I use open-embedded in my company.
It is used in Qualcomm's communication module - specifically on AP
(Qualcomm's chipset is composed of MDM + AP).

And when I compile oe linux, I use bitbake.

In this environment I'd like to use gdb to debug applications for this oe
linux.

How can I use gdb in this?
I have experience in using gdb in just PC environment. Not in embedded env..

Thank you very much in advance!

Sincerely
Journeyer

----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------
--
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel at lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel



More information about the Openembedded-devel mailing list