All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about remote debugging via gdbserver
@ 2014-04-12 16:27 Federico Vitali
  2014-04-14 14:30 ` Rudolf Streif
  0 siblings, 1 reply; 6+ messages in thread
From: Federico Vitali @ 2014-04-12 16:27 UTC (permalink / raw)
  To: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

Hi everyone,

I'm wondering if it is possible to debug an installed library on the target
via gdbserver.
I try to explain: suppose that I'm developing an application using
gstreamel libraries.

I set up eclipse / gdb to work with my target on the network. When I reach
a gst funciont
(e.g. gst_init) I would like to jump into the line of code of gstreamer
which implements
that function. Is there a way to instruct eclipse to fetch symbols and
sources from local filesystem,
eg:

symbols:
/opt/poky/1.5.1/sysroots/armv6-vfp-poky-linux-gnueabi/usr/lib/.debug/libgstbase-0.10.so.0.30.0
sources: /usr/src/debug/gstreamer/0.10.36-r2/gstreamer-0.10.36/


Thank you in advance!

Federico

[-- Attachment #2: Type: text/html, Size: 921 bytes --]

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

* Re: Question about remote debugging via gdbserver
  2014-04-12 16:27 Question about remote debugging via gdbserver Federico Vitali
@ 2014-04-14 14:30 ` Rudolf Streif
  2014-04-16  9:33   ` Federico Vitali
  0 siblings, 1 reply; 6+ messages in thread
From: Rudolf Streif @ 2014-04-14 14:30 UTC (permalink / raw)
  To: Federico Vitali; +Cc: Yocto list discussion


[-- Attachment #1.1: Type: text/plain, Size: 1164 bytes --]

Hi Frederico,

Yes, you can do that. You can just add a source path to the debug
configuration in Eclipse. See attached screenshot.

[image: Inline image 1]
Rudi

On Sat, Apr 12, 2014 at 9:27 AM, Federico Vitali <fede.vitali@gmail.com>wrote:

> Hi everyone,
>
> I'm wondering if it is possible to debug an installed library on the
> target via gdbserver.
> I try to explain: suppose that I'm developing an application using
> gstreamel libraries.
>
> I set up eclipse / gdb to work with my target on the network. When I reach
> a gst funciont
> (e.g. gst_init) I would like to jump into the line of code of gstreamer
> which implements
> that function. Is there a way to instruct eclipse to fetch symbols and
> sources from local filesystem,
> eg:
>
> symbols:
> /opt/poky/1.5.1/sysroots/armv6-vfp-poky-linux-gnueabi/usr/lib/.debug/libgstbase-0.10.so.0.30.0
> sources: /usr/src/debug/gstreamer/0.10.36-r2/gstreamer-0.10.36/
>
>
> Thank you in advance!
>
> Federico
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>

[-- Attachment #1.2: Type: text/html, Size: 2128 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 109376 bytes --]

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

* Re: Question about remote debugging via gdbserver
  2014-04-14 14:30 ` Rudolf Streif
@ 2014-04-16  9:33   ` Federico Vitali
  2014-04-16 19:22     ` Rudolf Streif
  0 siblings, 1 reply; 6+ messages in thread
From: Federico Vitali @ 2014-04-16  9:33 UTC (permalink / raw)
  To: Rudolf Streif; +Cc: Yocto list discussion


[-- Attachment #1.1: Type: text/plain, Size: 1597 bytes --]

Thank you Rudolf!
I knew that I can add source paths to the debugger.
I see in your debug profiles that you have some binaries eg "ls". Did you
import that binary from sysrootfs on your build machine? Can you please
tell me the steps before adding the path?

Thank you again
Il giorno 14/apr/2014 16:30, "Rudolf Streif" <rstreif@linuxfoundation.org>
ha scritto:

> Hi Frederico,
>
> Yes, you can do that. You can just add a source path to the debug
> configuration in Eclipse. See attached screenshot.
>
> [image: Inline image 1]
> Rudi
>
> On Sat, Apr 12, 2014 at 9:27 AM, Federico Vitali <fede.vitali@gmail.com>wrote:
>
>> Hi everyone,
>>
>> I'm wondering if it is possible to debug an installed library on the
>> target via gdbserver.
>> I try to explain: suppose that I'm developing an application using
>> gstreamel libraries.
>>
>> I set up eclipse / gdb to work with my target on the network. When I
>> reach a gst funciont
>> (e.g. gst_init) I would like to jump into the line of code of gstreamer
>> which implements
>> that function. Is there a way to instruct eclipse to fetch symbols and
>> sources from local filesystem,
>> eg:
>>
>> symbols:
>> /opt/poky/1.5.1/sysroots/armv6-vfp-poky-linux-gnueabi/usr/lib/.debug/libgstbase-0.10.so.0.30.0
>> sources: /usr/src/debug/gstreamer/0.10.36-r2/gstreamer-0.10.36/
>>
>>
>> Thank you in advance!
>>
>> Federico
>>
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 2779 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 109376 bytes --]

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

* Re: Question about remote debugging via gdbserver
  2014-04-16  9:33   ` Federico Vitali
@ 2014-04-16 19:22     ` Rudolf Streif
  2014-04-18  8:28       ` Federico Vitali
  0 siblings, 1 reply; 6+ messages in thread
From: Rudolf Streif @ 2014-04-16 19:22 UTC (permalink / raw)
  To: Federico Vitali; +Cc: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

Hi Federico,

I knew that I can add source paths to the debugger.
>
Ok, if that's not the issue what exactly is not working for you?


> I see in your debug profiles that you have some binaries eg "ls". Did you
> import that binary from sysrootfs on your build machine? Can you please
> tell me the steps before adding the path?
>
No, that's actually sample code of a simple ls application that I use for
teaching a class on Linux APIs.

Cheers,
Rudi

[-- Attachment #2: Type: text/html, Size: 875 bytes --]

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

* Re: Question about remote debugging via gdbserver
  2014-04-16 19:22     ` Rudolf Streif
@ 2014-04-18  8:28       ` Federico Vitali
  2014-04-28 18:30         ` Rudolf Streif
  0 siblings, 1 reply; 6+ messages in thread
From: Federico Vitali @ 2014-04-18  8:28 UTC (permalink / raw)
  To: Rudolf Streif; +Cc: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

Goodmorning Rudolf,

thank you again for your time.

I have not explained my goal very well, so I try to explain with a specific
example.
I'm working with gstreamer for a project I'm following for my company.
Let's take
the gstreamer "hello world" application, here is the source code:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html#section-helloworld

I've succesfully built and deployed the application. I can debug and follow
the code of the application line
by line with eclipse. Now, if I want to enter into a function of gstreamer
libs (e.g. gst_pipeline_new),
what should I have to do?

Federico





2014-04-16 21:22 GMT+02:00 Rudolf Streif <rstreif@linuxfoundation.org>:

> Hi Federico,
>
> I knew that I can add source paths to the debugger.
>>
> Ok, if that's not the issue what exactly is not working for you?
>
>
>> I see in your debug profiles that you have some binaries eg "ls". Did you
>> import that binary from sysrootfs on your build machine? Can you please
>> tell me the steps before adding the path?
>>
> No, that's actually sample code of a simple ls application that I use for
> teaching a class on Linux APIs.
>
> Cheers,
> Rudi
>

[-- Attachment #2: Type: text/html, Size: 2469 bytes --]

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

* Re: Question about remote debugging via gdbserver
  2014-04-18  8:28       ` Federico Vitali
@ 2014-04-28 18:30         ` Rudolf Streif
  0 siblings, 0 replies; 6+ messages in thread
From: Rudolf Streif @ 2014-04-28 18:30 UTC (permalink / raw)
  To: Federico Vitali; +Cc: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 1925 bytes --]

Hi Frederico,

Sorry for the delayed response.

If you want to step into code for which the debugger does not have the
source info Eclipse should actually tell you. But as a prerequisite you
will need to install the dev and debug packages for gstreamer (and
eventually others) to the root file system you are using on your
development host. For that you need to tell YP to include them which you do
by adding dev-pkg and dbg-pkg to EXTRA_IMAGE_INSTALL in the conf/local.conf
file of your build environment.

Rudi


On Fri, Apr 18, 2014 at 1:28 AM, Federico Vitali <fede.vitali@gmail.com>wrote:

> Goodmorning Rudolf,
>
> thank you again for your time.
>
> I have not explained my goal very well, so I try to explain with a
> specific example.
> I'm working with gstreamer for a project I'm following for my company.
> Let's take
> the gstreamer "hello world" application, here is the source code:
>
>
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html#section-helloworld
>
> I've succesfully built and deployed the application. I can debug and
> follow the code of the application line
> by line with eclipse. Now, if I want to enter into a function of gstreamer
> libs (e.g. gst_pipeline_new),
> what should I have to do?
>
> Federico
>
>
>
>
>
> 2014-04-16 21:22 GMT+02:00 Rudolf Streif <rstreif@linuxfoundation.org>:
>
> Hi Federico,
>>
>> I knew that I can add source paths to the debugger.
>>>
>> Ok, if that's not the issue what exactly is not working for you?
>>
>>
>>> I see in your debug profiles that you have some binaries eg "ls". Did
>>> you import that binary from sysrootfs on your build machine? Can you please
>>> tell me the steps before adding the path?
>>>
>> No, that's actually sample code of a simple ls application that I use for
>> teaching a class on Linux APIs.
>>
>> Cheers,
>> Rudi
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3644 bytes --]

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

end of thread, other threads:[~2014-04-28 18:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-12 16:27 Question about remote debugging via gdbserver Federico Vitali
2014-04-14 14:30 ` Rudolf Streif
2014-04-16  9:33   ` Federico Vitali
2014-04-16 19:22     ` Rudolf Streif
2014-04-18  8:28       ` Federico Vitali
2014-04-28 18:30         ` Rudolf Streif

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.