This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc-3.0/3.0.3 and gdb-5.1



System is SunBlade-100, under Solaris-2.8.

gcc-2.95.2 (from Sunfreeware CD).

I compiled gcc-3.0 to 64-bit binary capable of generating 64-bit
binaries with /usr/ccs/as and /usr/ccs/bin/ld). It seems to work.
I tried to use gdb (with a binary generated with -g option) and it
did not work. So, I compled gdb-5.1 sources with 64-bit compiler
too. No success again. Partial gdb session is follows:

...
(gdb) b main
Cannot access memory at address 0x894
(gdb) run
Starting program: /local/home/ishwar/asm-new/a.out
Hello, world!!

Program exited normally.
(gdb) delete 1
No breakpoint number 1.
(gdb) b main
Cannot access memory at address 0x894
(gdb) b printf
Cannot access memory at address 0xffffffff7f28d2fc
(gdb) run
Starting program: /local/home/ishwar/asm-new/a.out
Hello, world!!

Program exited normally.
----

If the C-program is compiled without -g, the behavior is different.

...
This GDB was configured as "sparc-sun-solaris2.8"...
(no debugging symbols found)...
(gdb) b main
Breakpoint 1 at 0x100000898
(gdb) b printf
Breakpoint 2 at 0x100100b00
(gdb) run
Starting program: /local/home/ishwar/asm-new/a.out
(no debugging symbols found)...Breakpoint 2 at 0xffffffff7f28d300
(no debugging symbols found)...(no debugging symbols found)...
Breakpoint 1, 0x100000898 in main ()
(gdb) cont
Continuing.

Breakpoint 2, 0xffffffff7f28d300 in printf () from /usr/lib/64/libc.so.1
(gdb) cont
Continuing.
Hello, world!!

Program exited normally.

---

Looks like that gdb-5.1 does not have support for 64-bit version of
gcc-3.0?

-ishwar



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]