public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdb & 64-bit Solaris - does it work?
@ 2003-07-18 16:02 Chuck Aude
  2003-07-18 21:50 ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Aude @ 2003-07-18 16:02 UTC (permalink / raw)
  To: gdb

Has anyone had any luck getting any version of gdb to work on a 64-bit 
Solaris 7 binary built with gcc 3.2? I have tried both gdb-5.3 and 
gdb-6.0 (last night's CVS image) and end up with the same "Cannot insert 
breakpoint" error. Searching the gdb mailing list, reveals many other 
people getting the same error and the gdb bug database has several bugs 
related to this.

Does gdb support debugging 64-bit Solaris binaries or am I trying to 
make it do something it can't do?

Here's another example of the error:

[caude@phobos]$ more hello.c
#include <stdio.h>

int
main(int argc, char **argv)
{
         printf ("Hello World\n");
}
[caude@phobos]$ gcc-3.2 -m64 -g -o hello hello.c
[caude@phobos]$ gdb64-5.3 hello
GNU gdb 5.3
Copyright 2002 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-sun-solaris2.7"...
(gdb) run
Starting program: /home/jupiter8/caude/hello
Hello World

Program exited with code 014.
(gdb) br main
Breakpoint 1 at 0x860: file hello.c, line 6.
(gdb) run
Starting program: /home/jupiter8/caude/hello
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x860: I/O error.
The same program may be running in another process.
(gdb) q
The program is running.  Exit anyway? (y or n) y

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb & 64-bit Solaris - does it work?
  2003-07-18 16:02 gdb & 64-bit Solaris - does it work? Chuck Aude
@ 2003-07-18 21:50 ` Andrew Cagney
  2003-07-21 16:24   ` Chuck Aude
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2003-07-18 21:50 UTC (permalink / raw)
  To: Chuck Aude; +Cc: gdb

> Has anyone had any luck getting any version of gdb to work on a 64-bit Solaris 7 binary built with gcc 3.2? I have tried both gdb-5.3 and gdb-6.0 (last night's CVS image) and end up with the same "Cannot insert breakpoint" error. Searching the gdb mailing list, reveals many other people getting the same error and the gdb bug database has several bugs related to this.
> 
> Does gdb support debugging 64-bit Solaris binaries or am I trying to make it do something it can't do?
> 
> Here's another example of the error:
> 
> [caude@phobos]$ more hello.c
> #include <stdio.h>
> 
> int
> main(int argc, char **argv)
> {
>         printf ("Hello World\n");
> }
> [caude@phobos]$ gcc-3.2 -m64 -g -o hello hello.c
> [caude@phobos]$ gdb64-5.3 hello
> GNU gdb 5.3
> Copyright 2002 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-sun-solaris2.7"...
> (gdb) run
> Starting program: /home/jupiter8/caude/hello
> Hello World
> 
> Program exited with code 014.
> (gdb) br main
> Breakpoint 1 at 0x860: file hello.c, line 6.

Is main really at 0x860?  What does nm indicate?

> (gdb) run
> Starting program: /home/jupiter8/caude/hello
> Warning:
> Cannot insert breakpoint 1.
> Error accessing memory address 0x860: I/O error.
> The same program may be running in another process.
> (gdb) q
> The program is running.  Exit anyway? (y or n) y

Was GDB configured with:
	CC="gcc -m64" .../configure
before the build?  It oterwize won't groak a 64 bit binary.

I people are noticing bugs in the sparc but not much is happening to fix 
them :-(

Andrew



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb & 64-bit Solaris - does it work?
  2003-07-18 21:50 ` Andrew Cagney
@ 2003-07-21 16:24   ` Chuck Aude
  0 siblings, 0 replies; 3+ messages in thread
From: Chuck Aude @ 2003-07-21 16:24 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb


Andrew Cagney wrote:

>> Has anyone had any luck getting any version of gdb to work on a 
>> 64-bit Solaris 7 binary built with gcc 3.2? I have tried both gdb-5.3 
>> and gdb-6.0 (last night's CVS image) and end up with the same "Cannot 
>> insert breakpoint" error. Searching the gdb mailing list, reveals 
>> many other people getting the same error and the gdb bug database has 
>> several bugs related to this.
>>
>> Does gdb support debugging 64-bit Solaris binaries or am I trying to 
>> make it do something it can't do?
>>
>> Here's another example of the error:
>>
>> [caude@phobos]$ more hello.c
>> #include <stdio.h>
>>
>> int
>> main(int argc, char **argv)
>> {
>>         printf ("Hello World\n");
>> }
>> [caude@phobos]$ gcc-3.2 -m64 -g -o hello hello.c
>> [caude@phobos]$ gdb64-5.3 hello
>> GNU gdb 5.3
>> Copyright 2002 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-sun-solaris2.7"...
>> (gdb) run
>> Starting program: /home/jupiter8/caude/hello
>> Hello World
>>
>> Program exited with code 014.
>> (gdb) br main
>> Breakpoint 1 at 0x860: file hello.c, line 6.
>
>
> Is main really at 0x860?  What does nm indicate?

No it is not. It looks gdb is trying to insert the breakpoint at the 
wrong address:

[caude@phobos /home/jupiter8/caude]$ gcc-3.2 -g -m64 -o hello hello.c
[caude@phobos /home/jupiter8/caude]$ nm -t x hello | grep main
[79]    |0x000100000850|0x000000000040|FUNC |GLOB |0    |9      |main
[caude@phobos /home/jupiter8/caude]$ gdb64-5.3 hello
GNU gdb 5.3
Copyright 2002 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-sun-solaris2.7"...
(gdb) br main
Breakpoint 1 at 0x860: file hello.c, line 6.

>> (gdb) run
>> Starting program: /home/jupiter8/caude/hello
>> Warning:
>> Cannot insert breakpoint 1.
>> Error accessing memory address 0x860: I/O error.
>> The same program may be running in another process.
>> (gdb) q
>> The program is running.  Exit anyway? (y or n) y
>
>
> Was GDB configured with:
>     CC="gcc -m64" .../configure
> before the build?  It oterwize won't groak a 64 bit binary.

Yes, that is exactly how we built gdb.

> I people are noticing bugs in the sparc but not much is happening to 
> fix them :-(
>
> Andrew

It appears that the problem may be with gcc v3.2. I was able use gcc 
v3.3 and debug a 64-bit test binary using gdb v5.3 without any problems...

- Chuck


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-21 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-18 16:02 gdb & 64-bit Solaris - does it work? Chuck Aude
2003-07-18 21:50 ` Andrew Cagney
2003-07-21 16:24   ` Chuck Aude

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).