* Remote debugging with gdbserver on ARM
@ 2007-02-14 15:34 Pelle Svensson
2007-02-15 20:29 ` Daniel Jacobowitz
0 siblings, 1 reply; 9+ messages in thread
From: Pelle Svensson @ 2007-02-14 15:34 UTC (permalink / raw)
To: gdb
Hi,
I need some help!!!
I tried for a copule of days to get something out of a remote debugging. I'm
using eclipse/gdb
on i386 targeting ARM using gdbserver.
Setup
====
Starting the ARM target as:
gdbserver linuxhost:1027 application.
Issue launch debug session on eclipse with:
TCP/IP connection on port 1027
shared library path: (i386host)//home/dev/nfs/targetfs/lib, (target path is
/lib)
Load shared library symbols automatically is active
Stop on shared library events is active
Stop st main() on startup is active
issued set solib-absolute-prefix /dev/null
issued set unwindonsignal on
breakpoint set at main()
breakpoint set at other_function()
Messages at startup
=============
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Cannot access memory at address 0x0
Ignoring packet error, continuing...
Stopped due to shared library event
[Switching to Thread 16384]
Problems!!
=======
On launch I end up at the breakpoint on main()
o>int main(int argc,char **argv, char ** env)
>{
>
>#ifdef _DEBUG
> if (getenv("BOX2_NOOUTPUT") != NULL) _do_output = 0;
> if (getenv("BOX2_DISPLAY") != NULL) _ggi_open_name = "box2";
>#endif /* _DEBUG */
I can singel step once to 'if (getenv...' but next step is lost and a
message says:
Cannot access memory at address 0x0
If I hit resume the program seems to be running but the program is stuck
somewhere which it is not doing without the debugger attached.
Any ideas...
_________________________________________________________________
Motionera roligare med MSN Hälsa http://e-health.msn.se/
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Remote debugging with gdbserver on ARM
2007-02-14 15:34 Remote debugging with gdbserver on ARM Pelle Svensson
@ 2007-02-15 20:29 ` Daniel Jacobowitz
2007-02-16 12:55 ` Pelle Svensson
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-15 20:29 UTC (permalink / raw)
To: Pelle Svensson; +Cc: gdb
On Wed, Feb 14, 2007 at 04:14:04PM +0100, Pelle Svensson wrote:
> shared library path: (i386host)//home/dev/nfs/targetfs/lib, (target path is
> /lib)
> issued set solib-absolute-prefix /dev/null
Making your front end not do these, but instead set the prefix...
> warning: Unable to find dynamic linker breakpoint function.
> GDB will be unable to debug shared library initializers
> and track explicitly loaded dynamic code.
...may make this warning go away. I don't know if that will help.
> I can singel step once to 'if (getenv...' but next step is lost and a
> message says:
> Cannot access memory at address 0x0
Try a current release of GDB please, along with the above fix.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Remote debugging with gdbserver on ARM
2007-02-15 20:29 ` Daniel Jacobowitz
@ 2007-02-16 12:55 ` Pelle Svensson
2007-02-16 16:02 ` Daniel Jacobowitz
0 siblings, 1 reply; 9+ messages in thread
From: Pelle Svensson @ 2007-02-16 12:55 UTC (permalink / raw)
To: drow; +Cc: gdb
>From: Daniel Jacobowitz <drow@false.org>
>To: Pelle Svensson <pelle2004@hotmail.com>
>CC: gdb@sourceware.org
>Subject: Re: Remote debugging with gdbserver on ARM
>Date: Thu, 15 Feb 2007 10:46:13 -0500
>
>On Wed, Feb 14, 2007 at 04:14:04PM +0100, Pelle Svensson wrote:
> > shared library path: (i386host)//home/dev/nfs/targetfs/lib, (target path
>is
> > /lib)
>
> > issued set solib-absolute-prefix /dev/null
>
>Making your front end not do these, but instead set the prefix...
Things work much better with release 6.6 and not setting
solib-absolute-prefix.
There is still a 'Cannot access memory at address 0x0' before reaching
main().
Stepping works find in main().
Program runs much longer now, but stops at SIG32.
Console stuff:
=========
Cannot access memory at address 0x0
Cannot access memory at address 0x0
info program
Debugging a target over a serial line.
Program stopped at 0x40077228.
It stopped with signal SIG32, Real-time event 32.
Type "info stack" or "info registers" for more information.
info stack
#0 0x40077228 in ?? () from /lib/libpthread.so.0
After issued 'signal SIG32' for continuing things seems to be not right, can
it be the
access at adress 0x0 or that the libpthread dosen't have any debug-info?
_________________________________________________________________
Senaste nytt om Paris och Lindsey http://starlounge.msn.se/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Remote debugging with gdbserver on ARM
2007-02-16 12:55 ` Pelle Svensson
@ 2007-02-16 16:02 ` Daniel Jacobowitz
2007-02-16 16:06 ` Pelle Svensson
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-16 16:02 UTC (permalink / raw)
To: Pelle Svensson; +Cc: gdb
On Fri, Feb 16, 2007 at 01:43:42PM +0100, Pelle Svensson wrote:
> After issued 'signal SIG32' for continuing things seems to be not right,
> can it be the
> access at adress 0x0 or that the libpthread dosen't have any debug-info?
You will need an unstripped libpthread.so on the host system, and
libthread_db linked to gdbserver on the target system.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Remote debugging with gdbserver on ARM
2007-02-16 16:02 ` Daniel Jacobowitz
@ 2007-02-16 16:06 ` Pelle Svensson
2007-02-16 16:50 ` Daniel Jacobowitz
0 siblings, 1 reply; 9+ messages in thread
From: Pelle Svensson @ 2007-02-16 16:06 UTC (permalink / raw)
To: drow; +Cc: gdb
>From: Daniel Jacobowitz <drow@false.org>
>To: Pelle Svensson <pelle2004@hotmail.com>
>CC: gdb@sourceware.org
>Subject: Re: Remote debugging with gdbserver on ARM
>Date: Fri, 16 Feb 2007 07:56:14 -0500
>
>On Fri, Feb 16, 2007 at 01:43:42PM +0100, Pelle Svensson wrote:
> > After issued 'signal SIG32' for continuing things seems to be not right,
> > can it be the
> > access at adress 0x0 or that the libpthread dosen't have any debug-info?
>
>You will need an unstripped libpthread.so on the host system, and
>libthread_db linked to gdbserver on the target system.
>
I'm now using all runtime libs with debug-info included.
It still not working correct and I think this has to be corrected.
After I load symbols on all modules some of them are probaly using wrong
symbol path
lippthread, libc, libm, libld, ld-linux - use /lib/
libggi, libgii, libgg - use /<...nfs path...>/lib/ path
It seems that libs present in the i386-host and the arm-target are taken
from /lib/ (i386)
and libs only present in the nfs location is taken from the correct location
/<...nfs path...>/lib/.
Target console complain about
gdb: error initializing thread_db library: version missmatch between
lithread_db and libpthread
solib-absolute-prefix: Prefix for loading absolute shared library symbol
files is "".
solib-search-path: The search path for loading non-absolute shared library
symbol files is /<...nfs path...>/lib.
_________________________________________________________________
Schlagersignaler till mobilen http://msn.cellus.se/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Remote debugging with gdbserver on ARM
2007-02-16 16:06 ` Pelle Svensson
@ 2007-02-16 16:50 ` Daniel Jacobowitz
2007-02-17 2:46 ` Pelle Svensson
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-16 16:50 UTC (permalink / raw)
To: Pelle Svensson; +Cc: gdb
On Fri, Feb 16, 2007 at 04:14:34PM +0100, Pelle Svensson wrote:
> solib-absolute-prefix: Prefix for loading absolute shared library symbol
> files is "".
Set this to /<...nfs path...>
> solib-search-path: The search path for loading non-absolute shared library
> symbol files is /<...nfs path...>/lib.
Don't set this.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Remote debugging with gdbserver on ARM
2007-02-16 16:50 ` Daniel Jacobowitz
@ 2007-02-17 2:46 ` Pelle Svensson
0 siblings, 0 replies; 9+ messages in thread
From: Pelle Svensson @ 2007-02-17 2:46 UTC (permalink / raw)
To: drow; +Cc: gdb
>From: Daniel Jacobowitz <drow@false.org>
>To: Pelle Svensson <pelle2004@hotmail.com>
>CC: gdb@sourceware.org
>Subject: Re: Remote debugging with gdbserver on ARM
>Date: Fri, 16 Feb 2007 11:05:56 -0500
>
>On Fri, Feb 16, 2007 at 04:14:34PM +0100, Pelle Svensson wrote:
> > solib-absolute-prefix: Prefix for loading absolute shared library
>symbol
> > files is "".
>
>Set this to /<...nfs path...>
>
> > solib-search-path: The search path for loading non-absolute shared
>library
> > symbol files is /<...nfs path...>/lib.
>
>Don't set this.
>
Now it works perfect!
Many thanks for your prompt assistance!
_________________________________________________________________
Tips för husbygget på MSN http://alltombostad.msn.se/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Remote debugging with gdbserver on ARM
@ 2007-02-15 0:43 Doug Abbott
0 siblings, 0 replies; 9+ messages in thread
From: Doug Abbott @ 2007-02-15 0:43 UTC (permalink / raw)
To: gdb
Hi,
What version of GDB are you using? I had similar problems with version
6.3 and found hints on this list about changes to the handling of the
breakpoint trap in the ARM port that caused problems. I changed to 6.4
and the problems went away.
Doug
==============================================
Pelle Svensson wrote:
Hi,
I need some help!!!
I tried for a copule of days to get something out of a remote debugging.
I'm using eclipse/gdb
on i386 targeting ARM using gdbserver.
Setup
====
Starting the ARM target as:
gdbserver linuxhost:1027 application.
Issue launch debug session on eclipse with:
TCP/IP connection on port 1027
shared library path: (i386host)//home/dev/nfs/targetfs/lib, (target path
is /lib)
Load shared library symbols automatically is active
Stop on shared library events is active
Stop st main() on startup is active
issued set solib-absolute-prefix /dev/null
issued set unwindonsignal on
breakpoint set at main()
breakpoint set at other_function()
Messages at startup
=============
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Cannot access memory at address 0x0
Ignoring packet error, continuing...
Stopped due to shared library event
[Switching to Thread 16384]
Problems!!
=======
On launch I end up at the breakpoint on main()
o>int main(int argc,char **argv, char ** env)
> {
>
> #ifdef _DEBUG
> if (getenv("BOX2_NOOUTPUT") != NULL) _do_output = 0;
> if (getenv("BOX2_DISPLAY") != NULL) _ggi_open_name = "box2";
> #endif /* _DEBUG */
I can singel step once to 'if (getenv...' but next step is lost and a
message says:
Cannot access memory at address 0x0
If I hit resume the program seems to be running but the program is stuck
somewhere which it is not doing without the debugger attached.
Any ideas...
_________________________________________________________________
Motionera roligare med MSN Hälsa http://e-health.msn.se/
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Remote debugging with gdbserver on ARM
@ 2007-02-15 18:26 Pelle Svensson
0 siblings, 0 replies; 9+ messages in thread
From: Pelle Svensson @ 2007-02-15 18:26 UTC (permalink / raw)
To: gdb, doug
>Hi,
>
>What version of GDB are you using? I had similar problems with version 6.3
>and found hints on this >list about changes to the handling of the
>breakpoint trap in the ARM port that caused problems. I >changed to 6.4 and
>the problems went away.
>
>Doug
Hi,
I'm using 6.3.
Will try 6.4 and see if that helps..
/Thanks
_________________________________________________________________
Trött på att pendla? - Sök jobb där du bor!
http://match.se.msn.com/channel/index.aspx?trackingid=1002962
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-02-16 17:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14 15:34 Remote debugging with gdbserver on ARM Pelle Svensson
2007-02-15 20:29 ` Daniel Jacobowitz
2007-02-16 12:55 ` Pelle Svensson
2007-02-16 16:02 ` Daniel Jacobowitz
2007-02-16 16:06 ` Pelle Svensson
2007-02-16 16:50 ` Daniel Jacobowitz
2007-02-17 2:46 ` Pelle Svensson
2007-02-15 0:43 Doug Abbott
2007-02-15 18:26 Pelle Svensson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox