Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

gdb 64-bit can't read core file from 32-bit application

alex_tanukiJul 7 2014 — edited Jul 8 2014

Hello,

On my machine, a 32-bit application generated a core file. When I tried to load it with gdb, there are lot of errors and warning.

$ gdb myapp core
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 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 "i386-pc-solaris2.10".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from wrapper...done.

warning: Couldn't find general-purpose registers in core file.
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New Thread 2 (LWP 2)]
[New Thread 3 (LWP 3)]
[New Thread 4 (LWP 4)]

warning: Couldn't find general-purpose registers in core file.

warning: Couldn't find general-purpose registers in core file.
Error in re-setting breakpoint -1: PC register is not available
Error in re-setting breakpoint -2: PC register is not available
Error in re-setting breakpoint -3: PC register is not available
Error in re-setting breakpoint -4: PC register is not available
Core was generated by `/export/home/chris/myapp /export/home/c'.

warning: Couldn't find general-purpose registers in core file.
#0   in ?? ()

My application is 32 bit:

$file myapp
myapp: ELF 32-bit LSB executable 80386 Version 1 [SSE2 SSE CMOV FPU], dynamically linked, not stripped

I tried with different architecture but no success

(gdb) set archi
Requires an argument. Valid arguments are i386, i386:x86-64, i386:x64-32, i8086, 
i386:intel, i386:x86-64:intel, i386:x64-32:intel, 
i386:nacl, i386:x86-64:nacl, i386:x64-32:nacl, auto

If I debug a 64-bit application, then there is no problem.

More info on my machine:

$cat /etc/release
Solaris 10 5/09 s10x_u7wos_08 X86
$ uname -a
SunOS jupiter 5.10 Generic_139556-08 i86pc i386 i86pc
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2014
Added on Jul 7 2014
1 comment
2,756 views