* GDB 6.8 on sparc64-linux not working
@ 2009-02-28 9:14 Laurent GUERBY
2009-02-28 12:37 ` GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux Laurent GUERBY
0 siblings, 1 reply; 5+ messages in thread
From: Laurent GUERBY @ 2009-02-28 9:14 UTC (permalink / raw)
To: gdb
Hi,
I built GDB 6.8 on sparc64-linux (running debian etch / kernel Debian
2.6.18.dfsg.1-24) as follows:
./configure --prefix=/opt/cfarm/gdb-6.8-64 --target=sparc64-unknown-linux-gnu --disable-nls
With this GDB I'm unable to breakpoint on a simple C program compiled in
64 bits as shown below. System provided GDB 6.4.90 seems to work a bit
better (however it doesn't work when threading is present hence
my try of a newer GCC).
Any idea?
For access to the platform feel free to request an account on the
GCC Compile Farm which is open to all free software developpers, not
only GCC, following instructions given here:
http://gcc.gnu.org/wiki/CompileFarm
Current platforms (running Linux):
* i686
* x86_64, including three bi-quad core with 16 GB of RAM
* armv5tel
* powerpc
* powerpc64
* sparc
* sparc64 (sparcv9)
* alpha
* mipsel
* mips64el
* ia64
The machine I used for sparc64-linux is "gcc54".
I also noticed the archive for gdb-testresults seems empty, is there
another place to look for? Automatic testers via crontab are of course
allowed on the compile farm.
Sincerely,
Laurent
guerby@gcc54:~/tmp$ cat ttt.c
#include <stdio.h>
int main(void) {
printf("hello\n");
return 0;
}
guerby@gcc54:~/tmp$ gcc -g -m64 ttt.c
guerby@gcc54:~/tmp$ file ./a.out
./a.out: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), for GNU/Linux 2.4.18, dynamically linked (uses shared libs), for GNU/Linux 2.4.18, not stripped
guerby@gcc54:~/tmp$ gdb ./a.out
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc64-unknown-linux-gnu"...
(gdb) set debug infrun 1
(gdb) r
Starting program: /home/guerby/tmp/a.out
infrun: wait_for_inferior (treat_exec_as_sigtrap=1)
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xf7ec90000033f398
infrun: quietly stopped
infrun: stop_stepping
infrun: resume (step=0, signal=0)
infrun: wait_for_inferior (treat_exec_as_sigtrap=1)
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xf7ec90000033f398
infrun: quietly stopped
infrun: stop_stepping
infrun: proceed (addr=0xffffffffffffffff, signal=0, step=0)
infrun: resume (step=0, signal=0)
infrun: wait_for_inferior (treat_exec_as_sigtrap=0)
hello
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_EXITED
Program exited normally.
infrun: stop_stepping
(gdb) b main
Breakpoint 1 at 0x100550: file ttt.c, line 3.
(gdb) r
Starting program: /home/guerby/tmp/a.out
infrun: wait_for_inferior (treat_exec_as_sigtrap=1)
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xf7ec90000034ec88
infrun: quietly stopped
infrun: stop_stepping
infrun: resume (step=0, signal=0)
infrun: wait_for_inferior (treat_exec_as_sigtrap=1)
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xf7ec90000034ec88
infrun: quietly stopped
infrun: stop_stepping
infrun: proceed (addr=0xffffffffffffffff, signal=0, step=0)
infrun: resume (step=0, signal=0)
infrun: wait_for_inferior (treat_exec_as_sigtrap=0)
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xf7ec90000033fdd0
infrun: random signal 5
Program received signal SIGTRAP, Trace/breakpoint trap.
infrun: stop_stepping
0xf7ec90000033fdd0 in ?? ()
(gdb) bt
#0 0xf7ec90000033fdd0 in ?? ()
#1 0xffffc9e000000008 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) n
Cannot find bounds of current function
(gdb) q
guerby@gcc54:~/tmp$ /usr/bin/gdb a.out
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-linux-gnu"...
warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default sparc:v9 settings.
Using host libthread_db library "/lib/v9/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x100550: file ttt.c, line 3.
(gdb) r
Starting program: /home/guerby/tmp/a.out
warning: no shared library support for this OS / ABI
Breakpoint 1, main () at ttt.c:3
3 printf("hello\n");
(gdb) n
hello
4 return 0;
(gdb) q
The program is running. Exit anyway? (y or n) y
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux
2009-02-28 9:14 GDB 6.8 on sparc64-linux not working Laurent GUERBY
@ 2009-02-28 12:37 ` Laurent GUERBY
2009-02-28 13:02 ` Mark Kettenis
0 siblings, 1 reply; 5+ messages in thread
From: Laurent GUERBY @ 2009-02-28 12:37 UTC (permalink / raw)
To: gdb
FYI the issue looks similar on powerpc64-linux (gcc40 machine on the
compile farm).
Laurent
guerby@gcc40:~/tmp$ cat toto.c
int main(void) { return 0;}
guerby@gcc40:~/tmp$ gcc -m64 -g toto.c
guerby@gcc40:~/tmp$ file ./a.out
./a.out: ELF 64-bit MSB executable, PowerPC 64-bit or cisco 7500, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), for GNU/Linux 2.6.0, not stripped
guerby@gcc40:~/tmp$ /opt/cfarm/gdb-6.8-64/bin/powerpc64-linux-gnu-gdb ./a.out
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=powerpc64-unknown-linux-gnu --target=powerpc64-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x1000044c: file toto.c, line 1.
(gdb) r
Starting program: /home/guerby/tmp/a.out
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x100000
Program received signal SIGTRAP, Trace/breakpoint trap.
0x1000044c0002d032 in ?? ()
(gdb) bt
#0 0x1000044c0002d032 in ?? ()
#1 0x0007d5a400000000 in ?? ()
Cannot access memory at address 0xfffff4f010018940
(gdb) n
Cannot find bounds of current function
On Sat, 2009-02-28 at 10:13 +0100, Laurent GUERBY wrote:
> Hi,
>
> I built GDB 6.8 on sparc64-linux (running debian etch / kernel Debian
> 2.6.18.dfsg.1-24) as follows:
>
> ./configure --prefix=/opt/cfarm/gdb-6.8-64 --target=sparc64-unknown-linux-gnu --disable-nls
>
> With this GDB I'm unable to breakpoint on a simple C program compiled in
> 64 bits as shown below. System provided GDB 6.4.90 seems to work a bit
> better (however it doesn't work when threading is present hence
> my try of a newer GCC).
>
> Any idea?
>
> For access to the platform feel free to request an account on the
> GCC Compile Farm which is open to all free software developpers, not
> only GCC, following instructions given here:
>
> http://gcc.gnu.org/wiki/CompileFarm
>
> Current platforms (running Linux):
>
> * i686
> * x86_64, including three bi-quad core with 16 GB of RAM
> * armv5tel
> * powerpc
> * powerpc64
> * sparc
> * sparc64 (sparcv9)
> * alpha
> * mipsel
> * mips64el
> * ia64
>
> The machine I used for sparc64-linux is "gcc54".
>
> I also noticed the archive for gdb-testresults seems empty, is there
> another place to look for? Automatic testers via crontab are of course
> allowed on the compile farm.
>
> Sincerely,
>
> Laurent
>
> guerby@gcc54:~/tmp$ cat ttt.c
> #include <stdio.h>
> int main(void) {
> printf("hello\n");
> return 0;
> }
> guerby@gcc54:~/tmp$ gcc -g -m64 ttt.c
> guerby@gcc54:~/tmp$ file ./a.out
> ./a.out: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), for GNU/Linux 2.4.18, dynamically linked (uses shared libs), for GNU/Linux 2.4.18, not stripped
> guerby@gcc54:~/tmp$ gdb ./a.out
> GNU gdb 6.8
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "sparc64-unknown-linux-gnu"...
> (gdb) set debug infrun 1
> (gdb) r
> Starting program: /home/guerby/tmp/a.out
> infrun: wait_for_inferior (treat_exec_as_sigtrap=1)
> infrun: infwait_normal_state
> infrun: TARGET_WAITKIND_STOPPED
> infrun: stop_pc = 0xf7ec90000033f398
> infrun: quietly stopped
> infrun: stop_stepping
> infrun: resume (step=0, signal=0)
> infrun: wait_for_inferior (treat_exec_as_sigtrap=1)
> infrun: infwait_normal_state
> infrun: TARGET_WAITKIND_STOPPED
> infrun: stop_pc = 0xf7ec90000033f398
> infrun: quietly stopped
> infrun: stop_stepping
> infrun: proceed (addr=0xffffffffffffffff, signal=0, step=0)
> infrun: resume (step=0, signal=0)
> infrun: wait_for_inferior (treat_exec_as_sigtrap=0)
> hello
> infrun: infwait_normal_state
> infrun: TARGET_WAITKIND_EXITED
>
> Program exited normally.
> infrun: stop_stepping
> (gdb) b main
> Breakpoint 1 at 0x100550: file ttt.c, line 3.
> (gdb) r
> Starting program: /home/guerby/tmp/a.out
> infrun: wait_for_inferior (treat_exec_as_sigtrap=1)
> infrun: infwait_normal_state
> infrun: TARGET_WAITKIND_STOPPED
> infrun: stop_pc = 0xf7ec90000034ec88
> infrun: quietly stopped
> infrun: stop_stepping
> infrun: resume (step=0, signal=0)
> infrun: wait_for_inferior (treat_exec_as_sigtrap=1)
> infrun: infwait_normal_state
> infrun: TARGET_WAITKIND_STOPPED
> infrun: stop_pc = 0xf7ec90000034ec88
> infrun: quietly stopped
> infrun: stop_stepping
> infrun: proceed (addr=0xffffffffffffffff, signal=0, step=0)
> infrun: resume (step=0, signal=0)
> infrun: wait_for_inferior (treat_exec_as_sigtrap=0)
> infrun: infwait_normal_state
> infrun: TARGET_WAITKIND_STOPPED
> infrun: stop_pc = 0xf7ec90000033fdd0
> infrun: random signal 5
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> infrun: stop_stepping
> 0xf7ec90000033fdd0 in ?? ()
> (gdb) bt
> #0 0xf7ec90000033fdd0 in ?? ()
> #1 0xffffc9e000000008 in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> (gdb) n
> Cannot find bounds of current function
> (gdb) q
> guerby@gcc54:~/tmp$ /usr/bin/gdb a.out
> GNU gdb 6.4.90-debian
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "sparc-linux-gnu"...
> warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
> of GDB. Attempting to continue with the default sparc:v9 settings.
>
> Using host libthread_db library "/lib/v9/libthread_db.so.1".
>
> (gdb) b main
> Breakpoint 1 at 0x100550: file ttt.c, line 3.
> (gdb) r
> Starting program: /home/guerby/tmp/a.out
> warning: no shared library support for this OS / ABI
>
> Breakpoint 1, main () at ttt.c:3
> 3 printf("hello\n");
> (gdb) n
> hello
> 4 return 0;
> (gdb) q
> The program is running. Exit anyway? (y or n) y
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux
2009-02-28 12:37 ` GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux Laurent GUERBY
@ 2009-02-28 13:02 ` Mark Kettenis
2009-02-28 13:31 ` Laurent GUERBY
0 siblings, 1 reply; 5+ messages in thread
From: Mark Kettenis @ 2009-02-28 13:02 UTC (permalink / raw)
To: laurent; +Cc: gdb
> From: Laurent GUERBY <laurent@guerby.net>
> Date: Sat, 28 Feb 2009 13:36:52 +0100
>
> (gdb) b main
> Breakpoint 1 at 0x1000044c: file toto.c, line 1.
> (gdb) r
> Starting program: /home/guerby/tmp/a.out
> warning: no loadable sections found in added symbol-file system-supplied DSO at 0x100000
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x1000044c0002d032 in ?? ()
> (gdb) bt
> #0 0x1000044c0002d032 in ?? ()
> #1 0x0007d5a400000000 in ?? ()
> Cannot access memory at address 0xfffff4f010018940
> (gdb) n
> Cannot find bounds of current function
This (and the sparc64 issue) smells like a mismatch between bitness of
gdb and the program you're trying to debug. What does file(1) report
when you run it on your gdb binary and your program's binary?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux
2009-02-28 13:02 ` Mark Kettenis
@ 2009-02-28 13:31 ` Laurent GUERBY
2009-03-01 15:09 ` Laurent GUERBY
0 siblings, 1 reply; 5+ messages in thread
From: Laurent GUERBY @ 2009-02-28 13:31 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb
On Sat, 2009-02-28 at 14:02 +0100, Mark Kettenis wrote:
> > From: Laurent GUERBY <laurent@guerby.net>
> > Date: Sat, 28 Feb 2009 13:36:52 +0100
> >
> > (gdb) b main
> > Breakpoint 1 at 0x1000044c: file toto.c, line 1.
> > (gdb) r
> > Starting program: /home/guerby/tmp/a.out
> > warning: no loadable sections found in added symbol-file system-supplied DSO at 0x100000
> >
> > Program received signal SIGTRAP, Trace/breakpoint trap.
> > 0x1000044c0002d032 in ?? ()
> > (gdb) bt
> > #0 0x1000044c0002d032 in ?? ()
> > #1 0x0007d5a400000000 in ?? ()
> > Cannot access memory at address 0xfffff4f010018940
> > (gdb) n
> > Cannot find bounds of current function
>
> This (and the sparc64 issue) smells like a mismatch between bitness of
> gdb and the program you're trying to debug. What does file(1) report
> when you run it on your gdb binary and your program's binary?
I built GDB as 32 bits indeed, I thought the host choice would not impact
the target debugability but it looks like I was wrong. I'm not
familiar (yet) with the GDB documentation, is this mentionned somewhere?
On powerpc64 rebuilding as 64 bits cured the issue, on sparc64 I will
report soon.
Thanks for your help!
Laurent.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux
2009-02-28 13:31 ` Laurent GUERBY
@ 2009-03-01 15:09 ` Laurent GUERBY
0 siblings, 0 replies; 5+ messages in thread
From: Laurent GUERBY @ 2009-03-01 15:09 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb
On Sat, 2009-02-28 at 14:31 +0100, Laurent GUERBY wrote:
> On Sat, 2009-02-28 at 14:02 +0100, Mark Kettenis wrote:
> > > From: Laurent GUERBY <laurent@guerby.net>
> > > Date: Sat, 28 Feb 2009 13:36:52 +0100
> > >
> > > (gdb) b main
> > > Breakpoint 1 at 0x1000044c: file toto.c, line 1.
> > > (gdb) r
> > > Starting program: /home/guerby/tmp/a.out
> > > warning: no loadable sections found in added symbol-file system-supplied DSO at 0x100000
> > >
> > > Program received signal SIGTRAP, Trace/breakpoint trap.
> > > 0x1000044c0002d032 in ?? ()
> > > (gdb) bt
> > > #0 0x1000044c0002d032 in ?? ()
> > > #1 0x0007d5a400000000 in ?? ()
> > > Cannot access memory at address 0xfffff4f010018940
> > > (gdb) n
> > > Cannot find bounds of current function
> >
> > This (and the sparc64 issue) smells like a mismatch between bitness of
> > gdb and the program you're trying to debug. What does file(1) report
> > when you run it on your gdb binary and your program's binary?
>
> I built GDB as 32 bits indeed, I thought the host choice would not impact
> the target debugability but it looks like I was wrong. I'm not
> familiar (yet) with the GDB documentation, is this mentionned somewhere?
>
> On powerpc64 rebuilding as 64 bits cured the issue, on sparc64 I will
> report soon.
On sparc64 and mips64el it worked fine too.
Sincerely,
Laurent
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-01 15:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-28 9:14 GDB 6.8 on sparc64-linux not working Laurent GUERBY
2009-02-28 12:37 ` GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux Laurent GUERBY
2009-02-28 13:02 ` Mark Kettenis
2009-02-28 13:31 ` Laurent GUERBY
2009-03-01 15:09 ` Laurent GUERBY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox