[oe] How can I use gdb in oe?

Brian Hutchinson b.hutchman at gmail.com
Thu Apr 10 02:25:15 UTC 2014


Hi Journeyer,

I assume you know how to add gdbserver to your root filesystem image or
install the gdbserver package on your target.

Mats instructions were spot on for connecting to the target.

There are a bunch of examples/tutorials that explain attaching to processes
etc. like this one:
http://sourceware.org/gdb/onlinedocs/gdb/Server.html

Regards,

Brian



On Wed, Apr 9, 2014 at 10:08 PM, Journeyer J. Joh
<oosaprogrammer at gmail.com>wrote:

> Hi Mats Kärrman,
>
> Thank you for kind concern!
> I will try your method.
> Thank you very much!
>
> Sincerely
> Journeyer
> Seoul
>
> ----------------------------------------
> 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
> ----------------------------------------
>
>
> 2014-04-09 16:28 GMT+09:00 Mats Kärrman <Mats.Karrman at tritech.se>:
>
> > 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
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >
> --
> _______________________________________________
> 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