debugging a 32-bit code by DDD on a 64-bit laptop
I compiled one routine (m15gui.c) belonging to a big Monte Carlo package with compiler option -g to build the symbol table just for this routine only. It sounds confusing. But what I did is to append the routine source file "m15gui.c" to the GNUmakefile as follows: SRCS := marsmain.f m1505.f m5gui.c Then I replaced the original compiler and linker options: CFLAGS := -O3 -xarch=v8 LDFLAGS := -fast -xarch=v8 -xlang=f77 -L/usr/openwin/lib with the following: CFLAGS := -g -xarch=v8 LDFLAGS := -fast -g -C -xs -xildoff -xarch=v8 -xlang=f77 -L/usr/openwin/lib It compiled fine. The program I wish to debug resides in /home/mauede/mars15/dev When I launch DDD and open the program a message window pops up. The title is: DDD No Source The message reads as follows: /home/mauede/mars15/dev/sysdeps/i386/elf/start.S: no such file or directory OK Help I swear there is no such directory: sysdeps/i386/elf in my working directory: /home/mauede/mars15/dev Please, notice that my laptop is 64-bit and the message above sounds like it's searching for some 32-bit feature ... ? I'm debugging a 32-bit code....... Are the DDD settings to be changed ? If this is the case then how shall I change them ??? Isn't "elf" something system related ? Thank you so much for your help, -- Maura E.M B
On Monday 15 May 2006 18:25, Maura Edeweiss Monville wrote: [...]
Then I replaced the original compiler and linker options: CFLAGS := -O3 -xarch=v8 LDFLAGS := -fast -xarch=v8 -xlang=f77 -L/usr/openwin/lib
with the following: CFLAGS := -g -xarch=v8 LDFLAGS := -fast -g -C -xs -xildoff -xarch=v8 -xlang=f77 -L/usr/openwin/lib
Ummmm? What is xarch=v8 expected to do on an x86 architecture? I've only seen it in Solaris (and there it basically means "use an older, mostly 32-bit CPU model").
Yes. You're right. The GNUmakefile I edited is made jup of a number of
sections, one for each system the program has been ported to.
I mae the changes in the wrong section.
When I realized that I made the changes in the Linux section and recreated
the executable. I launched DDD and opened the new executable. This time
DDD does show the source code. If I click on File-->Open-Source a drop
down menu pops up showing a list of Fortran and C source files.
But it is still complaining with the same messsage:
/home/mauede/mars15/sysdeps/i386/elf/start.S: No such file or directory.
Moreover ddd is using the 64-bit libraries as declared in the first lines
it prints out in the execution window:
GNU DDD 3.3.10 (x86_64-suse-linux), by Dorothea LUsing host libthread_db
library "/lib64/tls/libthread_db.so.1".
(gdb) list init.c:1
Line number 1 is out of range for "init.c".
(gdb) in init.c
(gdb) list m1505.f:1
Line 1 of "m1505.f" starts at address 0x804ecb0
On Monday 15 May 2006 18:25, Maura Edeweiss Monville wrote: [...]
Then I replaced the original compiler and linker options: CFLAGS := -O3 -xarch=v8 LDFLAGS := -fast -xarch=v8 -xlang=f77 -L/usr/openwin/lib
with the following: CFLAGS := -g -xarch=v8 LDFLAGS := -fast -g -C -xs -xildoff -xarch=v8 -xlang=f77 -L/usr/openwin/lib
Ummmm? What is xarch=v8 expected to do on an x86 architecture? I've only seen it in Solaris (and there it basically means "use an older, mostly 32-bit CPU model").
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e
participants (2)
-
Ken Jennings
-
Maura Edeweiss Monville