* RE: arm gdbserver and shared object function resolution
@ 2002-04-29 16:34 Kevin "Squail" Endres
2002-04-29 17:14 ` Kevin Buettner
0 siblings, 1 reply; 10+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-29 16:34 UTC (permalink / raw)
To: 'Daniel Jacobowitz', gdb
note: I can now load the symbols from the file on the host (and thus resolve
the function to an address and set a breakpoint). However - if i target the
remote target after setting the breakpoint i get the following error:
warning: shared library handler failed to enable breakpoint. is the issue
with the current cross target gdb or is it with gdbserver?
:]k
-----Original Message-----
From: Kevin "Squail" Endres [mailto:kevine@wildseed.com]
Sent: Monday, April 29, 2002 4:12 PM
To: 'Daniel Jacobowitz'; gdb@sources.redhat.com
Subject: RE: arm gdbserver and shared object function resolution
seems that it doesnt work in the current snapshot...
:]k
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@mvista.com]
Sent: Monday, April 29, 2002 3:19 PM
To: gdb@sources.redhat.com
Subject: Re: arm gdbserver and shared object function resolution
On Mon, Apr 29, 2002 at 03:08:08PM -0700, Kevin Squail Endres wrote:
>
> I am using gdbserver from current cvs hosted and targeted for arm along
with
> gdb-5.1.1 hosted on i386 and target for arm.
>
> I am trying to set a breakpoint on a function inside a .so - i am doing
the
> following
>
> assume exec foo with function in shared object test
>
> target: running foo under gdbserver
>
> host:
> 1) open foo under cross gdb
> 2) target remote
> 3) set break point at main
> 4) continue
> 5) attempt to set breakpoint in function in .so
>
> cant resolve symbols!! (NOTE: host .so has symbols)
>
> Further: if i use targer native gdb - set a breakpoint at main - run -
then
> set a break at function everything works as expected.
>
> Any info on why the above scenario is failing would be much appreciated!
Because GDB 5.1.1 doesn't support remote debugging of shared libraries
on ARM. Please try a current snapshot instead.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: arm gdbserver and shared object function resolution
2002-04-29 16:34 arm gdbserver and shared object function resolution Kevin "Squail" Endres
@ 2002-04-29 17:14 ` Kevin Buettner
0 siblings, 0 replies; 10+ messages in thread
From: Kevin Buettner @ 2002-04-29 17:14 UTC (permalink / raw)
To: Kevin "Squail" Endres, gdb
On Apr 29, 4:34pm, Kevin \Squail\ Endres wrote:
> note: I can now load the symbols from the file on the host (and thus resolve
> the function to an address and set a breakpoint). However - if i target the
> remote target after setting the breakpoint i get the following error:
>
> warning: shared library handler failed to enable breakpoint. is the issue
> with the current cross target gdb or is it with gdbserver?
It is critical that GDB be able to find your target's dynamic linker
and load its symbols. To do this, you normally use
``set solib-absolute-prefix'' to tell gdb where to find the sys-root
for the target's libraries. If you're not doing this, then perhaps
that's your problem?
It is also important for the libraries in the sys-root location on
the host to be exactly the same as those found on the target. All
kinds of strange things can happen if this is not the case.
Kevin
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: arm gdbserver and shared object function resolution
@ 2002-05-06 9:33 Kevin "Squail" Endres
0 siblings, 0 replies; 10+ messages in thread
From: Kevin "Squail" Endres @ 2002-05-06 9:33 UTC (permalink / raw)
To: 'Daniel Jacobowitz', Kevin "Squail" Endres
Cc: 'Kevin Buettner', 'gdb@sources.redhat.com'
sent the following out earlier...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Got it now thanks to Kevins patience and help
Issues with native arm gdb were true low memory errors.
Issue with cross targeted remote were solved by:
1) the current snapshot of gdb (04-29-02).
2) making a copy of my target syslibs (ones linked in to my app being
debugged) on my host
CAVEAT: on first attempt i just used the libraries (glibc-2.2.3) from the
toolchain (built from sources)
these libraries did not work. I had to use a build of libc with
--libdir=/lib (which i did for libraries in the RFS of my target)
3) set solib-absolute-prefix to location of sys-libs on my host machine -
NOTE: target and host libs do not need to be in the same directory (i.e. -
target libs in /lib host instance of target libs in /target/lib -
`solib-absolute-prefix /target`).
:]k
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>
:]k
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@mvista.com]
Sent: Tuesday, April 30, 2002 8:00 AM
To: Kevin Squail Endres
Cc: 'Kevin Buettner'; 'gdb@sources.redhat.com'
Subject: Re: arm gdbserver and shared object function resolution
On Mon, Apr 29, 2002 at 05:59:03PM -0700, Kevin Squail Endres wrote:
>
>
> my symbols are loading correctly.
>
> What I need to do: Break into the debugger inside a shared object either
> remotely or locally - platform is arm.
>
> using 5.2 (the current snapshot was a little flaky..) I am seeing the
> following behavior
> (Note: arm target)
>
> native arm gdb:
> run gdb targeted at app, set break at main - run - set break at function
> inside shared object - run
> RESULT: gdb dies (out of memory)
>
> run app - run gdb targeted at app - attach to pid - set break at function
> inside shared object
> RESULT: gdb dies (out of memory)
>
> cross-targeted:
> run target - run cross (read in symbol file) - set break - continue - i
get
> the error below.
Did you try Kevin's suggestion about solib-absolute-prefix? That
should fix your warning about shared library breakpoints.
-----Original Message-----
> It is critical that GDB be able to find your target's dynamic linker
> and load its symbols. To do this, you normally use
> ``set solib-absolute-prefix'' to tell gdb where to find the sys-root
> for the target's libraries. If you're not doing this, then perhaps
> that's your problem?
>
> It is also important for the libraries in the sys-root location on
> the host to be exactly the same as those found on the target. All
> kinds of strange things can happen if this is not the case.
>
> Kevin
>
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: arm gdbserver and shared object function resolution
@ 2002-04-30 16:31 Kevin "Squail" Endres
0 siblings, 0 replies; 10+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-30 16:31 UTC (permalink / raw)
To: 'Daniel Jacobowitz'
Cc: 'Kevin Buettner', 'gdb@sources.redhat.com'
Got it now thanks to Kevins patience and help
Issues with native arm gdb were true low memory errors.
Issue with cross targeted remote were solved by:
1) the current snapshot of gdb (04-29-02).
2) making a copy of my target syslibs (ones linked in to my app being
debugged) on my host
CAVEAT: on first attempt i just used the libraries (glibc-2.2.3) from the
toolchain (built from sources)
these libraries did not work. I had to use a build of libc with
--libdir=/lib (which i did for libraries in the RFS of my target)
3) set solib-absolute-prefix to location of sys-libs on my host machine -
NOTE: target and host libs do not need to be in the same directory (i.e. -
target libs in /lib host instance of target libs in /target/lib -
`solib-absolute-prefix /target`).
:]k
riginal Message-----
From: Daniel Jacobowitz [mailto:drow@mvista.com]
Sent: Tuesday, April 30, 2002 8:00 AM
To: Kevin Squail Endres
Cc: 'Kevin Buettner'; 'gdb@sources.redhat.com'
Subject: Re: arm gdbserver and shared object function resolution
On Mon, Apr 29, 2002 at 05:59:03PM -0700, Kevin Squail Endres wrote:
>
>
> my symbols are loading correctly.
>
> What I need to do: Break into the debugger inside a shared object either
> remotely or locally - platform is arm.
>
> using 5.2 (the current snapshot was a little flaky..) I am seeing the
> following behavior
> (Note: arm target)
>
> native arm gdb:
> run gdb targeted at app, set break at main - run - set break at function
> inside shared object - run
> RESULT: gdb dies (out of memory)
>
> run app - run gdb targeted at app - attach to pid - set break at function
> inside shared object
> RESULT: gdb dies (out of memory)
>
> cross-targeted:
> run target - run cross (read in symbol file) - set break - continue - i
get
> the error below.
Did you try Kevin's suggestion about solib-absolute-prefix? That
should fix your warning about shared library breakpoints.
-----Original Message-----
> It is critical that GDB be able to find your target's dynamic linker
> and load its symbols. To do this, you normally use
> ``set solib-absolute-prefix'' to tell gdb where to find the sys-root
> for the target's libraries. If you're not doing this, then perhaps
> that's your problem?
>
> It is also important for the libraries in the sys-root location on
> the host to be exactly the same as those found on the target. All
> kinds of strange things can happen if this is not the case.
>
> Kevin
>
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: arm gdbserver and shared object function resolution
@ 2002-04-29 17:59 Kevin "Squail" Endres
2002-04-30 8:01 ` Daniel Jacobowitz
0 siblings, 1 reply; 10+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-29 17:59 UTC (permalink / raw)
To: 'Kevin Buettner'; +Cc: 'gdb@sources.redhat.com'
my symbols are loading correctly.
What I need to do: Break into the debugger inside a shared object either
remotely or locally - platform is arm.
using 5.2 (the current snapshot was a little flaky..) I am seeing the
following behavior
(Note: arm target)
native arm gdb:
run gdb targeted at app, set break at main - run - set break at function
inside shared object - run
RESULT: gdb dies (out of memory)
run app - run gdb targeted at app - attach to pid - set break at function
inside shared object
RESULT: gdb dies (out of memory)
cross-targeted:
run target - run cross (read in symbol file) - set break - continue - i get
the error below.
Tho i am sure i am doing something incorrectly it appears:
1) Arm Cross target remote debugging does not support breaks in shared
libraries as of the current snapshot
2) there is a bug in the current native arm gdb that prevents setting a
breakpoint in a shared library and tripping the breakpoint (without running
out of memory)
Any help is greatly appreciated.
:]k
-----Original Message-----
From: Kevin Buettner [mailto:kevinb@redhat.com]
Sent: Monday, April 29, 2002 5:14 PM
To: Kevin "Squail" Endres; gdb@sources.redhat.com
Subject: Re: arm gdbserver and shared object function resolution
On Apr 29, 4:34pm, Kevin \Squail\ Endres wrote:
> note: I can now load the symbols from the file on the host (and thus
resolve
> the function to an address and set a breakpoint). However - if i target
the
> remote target after setting the breakpoint i get the following error:
>
> warning: shared library handler failed to enable breakpoint. is the issue
> with the current cross target gdb or is it with gdbserver?
It is critical that GDB be able to find your target's dynamic linker
and load its symbols. To do this, you normally use
``set solib-absolute-prefix'' to tell gdb where to find the sys-root
for the target's libraries. If you're not doing this, then perhaps
that's your problem?
It is also important for the libraries in the sys-root location on
the host to be exactly the same as those found on the target. All
kinds of strange things can happen if this is not the case.
Kevin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: arm gdbserver and shared object function resolution
2002-04-29 17:59 Kevin "Squail" Endres
@ 2002-04-30 8:01 ` Daniel Jacobowitz
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2002-04-30 8:01 UTC (permalink / raw)
To: Kevin Squail Endres
Cc: 'Kevin Buettner', 'gdb@sources.redhat.com'
On Mon, Apr 29, 2002 at 05:59:03PM -0700, Kevin Squail Endres wrote:
>
>
> my symbols are loading correctly.
>
> What I need to do: Break into the debugger inside a shared object either
> remotely or locally - platform is arm.
>
> using 5.2 (the current snapshot was a little flaky..) I am seeing the
> following behavior
> (Note: arm target)
>
> native arm gdb:
> run gdb targeted at app, set break at main - run - set break at function
> inside shared object - run
> RESULT: gdb dies (out of memory)
>
> run app - run gdb targeted at app - attach to pid - set break at function
> inside shared object
> RESULT: gdb dies (out of memory)
>
> cross-targeted:
> run target - run cross (read in symbol file) - set break - continue - i get
> the error below.
Did you try Kevin's suggestion about solib-absolute-prefix? That
should fix your warning about shared library breakpoints.
-----Original Message-----
> It is critical that GDB be able to find your target's dynamic linker
> and load its symbols. To do this, you normally use
> ``set solib-absolute-prefix'' to tell gdb where to find the sys-root
> for the target's libraries. If you're not doing this, then perhaps
> that's your problem?
>
> It is also important for the libraries in the sys-root location on
> the host to be exactly the same as those found on the target. All
> kinds of strange things can happen if this is not the case.
>
> Kevin
>
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: arm gdbserver and shared object function resolution
@ 2002-04-29 16:11 Kevin "Squail" Endres
0 siblings, 0 replies; 10+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-29 16:11 UTC (permalink / raw)
To: 'Daniel Jacobowitz', gdb
seems that it doesnt work in the current snapshot...
:]k
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@mvista.com]
Sent: Monday, April 29, 2002 3:19 PM
To: gdb@sources.redhat.com
Subject: Re: arm gdbserver and shared object function resolution
On Mon, Apr 29, 2002 at 03:08:08PM -0700, Kevin Squail Endres wrote:
>
> I am using gdbserver from current cvs hosted and targeted for arm along
with
> gdb-5.1.1 hosted on i386 and target for arm.
>
> I am trying to set a breakpoint on a function inside a .so - i am doing
the
> following
>
> assume exec foo with function in shared object test
>
> target: running foo under gdbserver
>
> host:
> 1) open foo under cross gdb
> 2) target remote
> 3) set break point at main
> 4) continue
> 5) attempt to set breakpoint in function in .so
>
> cant resolve symbols!! (NOTE: host .so has symbols)
>
> Further: if i use targer native gdb - set a breakpoint at main - run -
then
> set a break at function everything works as expected.
>
> Any info on why the above scenario is failing would be much appreciated!
Because GDB 5.1.1 doesn't support remote debugging of shared libraries
on ARM. Please try a current snapshot instead.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: arm gdbserver and shared object function resolution
@ 2002-04-29 15:20 Kevin "Squail" Endres
0 siblings, 0 replies; 10+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-29 15:20 UTC (permalink / raw)
To: 'Daniel Jacobowitz', gdb
Thanks!
:]k
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@mvista.com]
Sent: Monday, April 29, 2002 3:19 PM
To: gdb@sources.redhat.com
Subject: Re: arm gdbserver and shared object function resolution
On Mon, Apr 29, 2002 at 03:08:08PM -0700, Kevin Squail Endres wrote:
>
> I am using gdbserver from current cvs hosted and targeted for arm along
with
> gdb-5.1.1 hosted on i386 and target for arm.
>
> I am trying to set a breakpoint on a function inside a .so - i am doing
the
> following
>
> assume exec foo with function in shared object test
>
> target: running foo under gdbserver
>
> host:
> 1) open foo under cross gdb
> 2) target remote
> 3) set break point at main
> 4) continue
> 5) attempt to set breakpoint in function in .so
>
> cant resolve symbols!! (NOTE: host .so has symbols)
>
> Further: if i use targer native gdb - set a breakpoint at main - run -
then
> set a break at function everything works as expected.
>
> Any info on why the above scenario is failing would be much appreciated!
Because GDB 5.1.1 doesn't support remote debugging of shared libraries
on ARM. Please try a current snapshot instead.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* arm gdbserver and shared object function resolution
@ 2002-04-29 15:08 Kevin "Squail" Endres
2002-04-29 15:19 ` Daniel Jacobowitz
0 siblings, 1 reply; 10+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-29 15:08 UTC (permalink / raw)
To: gdb
I am using gdbserver from current cvs hosted and targeted for arm along with
gdb-5.1.1 hosted on i386 and target for arm.
I am trying to set a breakpoint on a function inside a .so - i am doing the
following
assume exec foo with function in shared object test
target: running foo under gdbserver
host:
1) open foo under cross gdb
2) target remote
3) set break point at main
4) continue
5) attempt to set breakpoint in function in .so
cant resolve symbols!! (NOTE: host .so has symbols)
Further: if i use targer native gdb - set a breakpoint at main - run - then
set a break at function everything works as expected.
Any info on why the above scenario is failing would be much appreciated!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: arm gdbserver and shared object function resolution
2002-04-29 15:08 Kevin "Squail" Endres
@ 2002-04-29 15:19 ` Daniel Jacobowitz
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2002-04-29 15:19 UTC (permalink / raw)
To: gdb
On Mon, Apr 29, 2002 at 03:08:08PM -0700, Kevin Squail Endres wrote:
>
> I am using gdbserver from current cvs hosted and targeted for arm along with
> gdb-5.1.1 hosted on i386 and target for arm.
>
> I am trying to set a breakpoint on a function inside a .so - i am doing the
> following
>
> assume exec foo with function in shared object test
>
> target: running foo under gdbserver
>
> host:
> 1) open foo under cross gdb
> 2) target remote
> 3) set break point at main
> 4) continue
> 5) attempt to set breakpoint in function in .so
>
> cant resolve symbols!! (NOTE: host .so has symbols)
>
> Further: if i use targer native gdb - set a breakpoint at main - run - then
> set a break at function everything works as expected.
>
> Any info on why the above scenario is failing would be much appreciated!
Because GDB 5.1.1 doesn't support remote debugging of shared libraries
on ARM. Please try a current snapshot instead.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-05-06 16:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-29 16:34 arm gdbserver and shared object function resolution Kevin "Squail" Endres
2002-04-29 17:14 ` Kevin Buettner
-- strict thread matches above, loose matches on Subject: below --
2002-05-06 9:33 Kevin "Squail" Endres
2002-04-30 16:31 Kevin "Squail" Endres
2002-04-29 17:59 Kevin "Squail" Endres
2002-04-30 8:01 ` Daniel Jacobowitz
2002-04-29 16:11 Kevin "Squail" Endres
2002-04-29 15:20 Kevin "Squail" Endres
2002-04-29 15:08 Kevin "Squail" Endres
2002-04-29 15:19 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox