Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Laurent GUERBY <laurent@guerby.net>
To: gdb@sourceware.org
Subject: Re: GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux
Date: Sat, 28 Feb 2009 12:37:00 -0000	[thread overview]
Message-ID: <1235824612.11347.446.camel@localhost> (raw)
In-Reply-To: <1235812429.11347.438.camel@localhost>

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
> 
> 
> 


  reply	other threads:[~2009-02-28 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28  9:14 GDB 6.8 on sparc64-linux not working Laurent GUERBY
2009-02-28 12:37 ` Laurent GUERBY [this message]
2009-02-28 13:02   ` GDB 6.8 on sparc64-linux not working, idem on powerpc64-linux Mark Kettenis
2009-02-28 13:31     ` Laurent GUERBY
2009-03-01 15:09       ` Laurent GUERBY

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1235824612.11347.446.camel@localhost \
    --to=laurent@guerby.net \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox