* sysroot for use with GDB
@ 2012-12-03 12:42 Wolfgang Denk
2012-12-05 12:38 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2012-12-03 12:42 UTC (permalink / raw)
To: yocto; +Cc: hs
Hello,
according to the documentation [1] the right way to debug applications
on the target is to load the target library information in GDB using
set solib-absolute-prefix /path/to/tmp/rootfs
i. e. referring it to the libraries in the target root file system
image. Assuming the target root file system uses by defualt stripped
libraries, we need to set up a copy of the rootfs with debug
information included.
But do we really have to? Why cannot we use the libraries present in
the SDK's sysroot directory (i. e. what OECORE_TARGET_SYSROOT points
to) ?
Trying to do so, we see that it fails. Our current suspicion is that
maybe prelinking of the target images and libraries introduces some
incompatibility. Is this a reasonable assumption, and if so, is this
a problem that should be fixed, or unavoidable for some reason? Or is
there a problem with the libraries in OECORE_TARGET_SYSROOT ?
All help welcome - thanks in advance.
[1] http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#platdev-gdb-remotedebug-launch-gdb
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"Beware of bugs in the above code; I have only proved it correct, not
tried it." - Donald Knuth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sysroot for use with GDB
2012-12-03 12:42 sysroot for use with GDB Wolfgang Denk
@ 2012-12-05 12:38 ` Wolfgang Denk
2012-12-05 13:14 ` Wolfgang Denk
2012-12-05 19:32 ` Mark Hatle
0 siblings, 2 replies; 4+ messages in thread
From: Wolfgang Denk @ 2012-12-05 12:38 UTC (permalink / raw)
To: yocto; +Cc: hs
Hello,
nobody here who could help out?
In message <20121203124234.6327B200FF8@gemini.denx.de> I wrote:
>
> according to the documentation [1] the right way to debug applications
> on the target is to load the target library information in GDB using
>
> set solib-absolute-prefix /path/to/tmp/rootfs
>
> i. e. referring it to the libraries in the target root file system
> image. Assuming the target root file system uses by defualt stripped
> libraries, we need to set up a copy of the rootfs with debug
> information included.
>
> But do we really have to? Why cannot we use the libraries present in
> the SDK's sysroot directory (i. e. what OECORE_TARGET_SYSROOT points
> to) ?
It appears that documentation and code are inconsistent; at least the
eclipse plugin generates a .gdbinit script which contains a
set sysroot /opt/poky/1.3/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
statement, i. e. it uses OECORE_TARGET_SYSROOT as I thought should
work - but it doesn't.
> Trying to do so, we see that it fails. Our current suspicion is that
> maybe prelinking of the target images and libraries introduces some
> incompatibility. Is this a reasonable assumption, and if so, is this
> a problem that should be fixed, or unavoidable for some reason? Or is
> there a problem with the libraries in OECORE_TARGET_SYSROOT ?
>
> All help welcome - thanks in advance.
>
> [1] http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#platdev-gdb-remotedebug-launch-gdb
OK, guess I should enter a bug in bugzilla, then?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Humanity has the stars in its future, and that future is too
important to be lost under the burden of juvenile folly and ignorant
superstition. - Isaac Asimov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sysroot for use with GDB
2012-12-05 12:38 ` Wolfgang Denk
@ 2012-12-05 13:14 ` Wolfgang Denk
2012-12-05 19:32 ` Mark Hatle
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2012-12-05 13:14 UTC (permalink / raw)
To: yocto; +Cc: hs
Hello,
In message <20121205123818.C17EB200FF2@gemini.denx.de> I wrote:
>
> OK, guess I should enter a bug in bugzilla, then?
Done that; please see Bug 3540 - remote target debugging broken
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3540
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
I can type faster than I can move a mouse, so I find menu-driven
drawing packages time consuming and frustrating. - W. R. Stevens
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sysroot for use with GDB
2012-12-05 12:38 ` Wolfgang Denk
2012-12-05 13:14 ` Wolfgang Denk
@ 2012-12-05 19:32 ` Mark Hatle
1 sibling, 0 replies; 4+ messages in thread
From: Mark Hatle @ 2012-12-05 19:32 UTC (permalink / raw)
To: yocto
On 12/5/12 6:38 AM, Wolfgang Denk wrote:
> Hello,
>
> nobody here who could help out?
>
> In message <20121203124234.6327B200FF8@gemini.denx.de> I wrote:
>>
>> according to the documentation [1] the right way to debug applications
>> on the target is to load the target library information in GDB using
>>
>> set solib-absolute-prefix /path/to/tmp/rootfs
>>
>> i. e. referring it to the libraries in the target root file system
>> image. Assuming the target root file system uses by defualt stripped
>> libraries, we need to set up a copy of the rootfs with debug
>> information included.
>>
>> But do we really have to? Why cannot we use the libraries present in
>> the SDK's sysroot directory (i. e. what OECORE_TARGET_SYSROOT points
>> to) ?
>
> It appears that documentation and code are inconsistent; at least the
> eclipse plugin generates a .gdbinit script which contains a
>
> set sysroot /opt/poky/1.3/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
>
> statement, i. e. it uses OECORE_TARGET_SYSROOT as I thought should
> work - but it doesn't.
>
>> Trying to do so, we see that it fails. Our current suspicion is that
>> maybe prelinking of the target images and libraries introduces some
>> incompatibility. Is this a reasonable assumption, and if so, is this
>> a problem that should be fixed, or unavoidable for some reason? Or is
>> there a problem with the libraries in OECORE_TARGET_SYSROOT ?
Prelinking should not cause a problem. GDB knows how to translate the debuginfo
addresses to the end runtime addresses.
The only thing I've seen in the past that has caused a problem is when the dbg
stuff was not installed into the sysroot. GDB will fall back into loading the
binaries from the sysroot, which will not contain the debug info causing problems.
It's best if you can set the sysroot to the same filesystem as being executed,
but if you can't this is reasonable.
>> All help welcome - thanks in advance.
>>
>> [1] http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#platdev-gdb-remotedebug-launch-gdb
>
> OK, guess I should enter a bug in bugzilla, then?
>
> Best regards,
>
> Wolfgang Denk
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-05 19:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 12:42 sysroot for use with GDB Wolfgang Denk
2012-12-05 12:38 ` Wolfgang Denk
2012-12-05 13:14 ` Wolfgang Denk
2012-12-05 19:32 ` Mark Hatle
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.