Operating System - HP-UX
1753797 Members
7976 Online
108805 Solutions
New Discussion юеВ

Re: " Core" not in executable format: File format not recognized - HP Itanium

 
Adarsh Thampan
Advisor

" Core" not in executable format: File format not recognized - HP Itanium

Hi ,

I see the following error when I try to debug a core file into gdb.

# gdb core
HP gdb 6.1 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2009 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.1 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
.."/core": not in executable format: File format not recognized

I have attached the elfdump output of core file as well .
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: " Core" not in executable format: File format not recognized - HP Itanium

A corefile is useless without the executable and every shlib that is used.
$ gdb executable core

If you need to move to another machine, the gdb packcore command can help.
Adarsh Thampan
Advisor

Re: " Core" not in executable format: File format not recognized - HP Itanium

Thanks that did help.


I run my program pr0sign and it crashes , when I check the core file , I find that the trigger of the crash happens at

#27 0x60000000d5830a70:0 in RtEventLog::Initialize (this=0x7fff2d00)
at ./RtEvtLog.CPP:1109

Now I run the program pr0sign in gdb , and try to set a brek point at the above point .

/users/yadvecha/ISLHPIA02/RTWIN/720/Source/HPIA23DebugUni> gdb pr0sign
HP gdb 6.1 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2009 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.1 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
(gdb) break main
Breakpoint 1 at 0x4011a90:1: file /users/mainsoft-v52-orig/mw/MainWin.C, line 319 from /home/yadvecha/ISLHPIA02/RTWIN/720/Source/HPIA23DebugUni/pr0sign.
(gdb) break /users/yadvecha/ISLHPIA02/RTWIN/720/Source/RTEVTLOG.CPP:1109
Breakpoint 2 (deferred) at "/users/yadvecha/ISLHPIA02/RTWIN/720/Source/RTEVTLOG.CPP:1109" ("/users/yadvecha/ISLHPIA02/RTWIN/720/Source/RTEVTLOG.CPP:1109" was not found).
Breakpoint deferred until a shared library containing "/users/yadvecha/ISLHPIA02/RTWIN/720/Source/RTEVTLOG.CPP:1109" is loaded.


Why does it show the above message ( unable to set breakpoint & defer it) , why am I unable to set the breakpoint 2 ?

Also If i run the gdb , it never stops at the breakpoint mentioned above.

Thanks.
Dennis Handly
Acclaimed Contributor

Re: " Core" not in executable format: File format not recognized - HP Itanium

>I find that the trigger of the crash happens at
#27 0x60000000d5830a70:0 in RtEventLog::Initialize ./RtEvtLog.CPP:1109

This is the statement after the call. You could set a breakpoint at the beginning of RtEventLog::Initialize and then step through it.
Or set a breakpoint just before the call:
b * 0x60000000d5830a70-16

>Why does it show the above message, why am I unable to set the breakpoint 2?

Because it never returns from that call?

Why do you think stopping in RtEventLog::Initialize will help? You want to step through all 27 frames to see where it goes wrong?
You can use the frame command to look at locals after the abort.
Dennis Handly
Acclaimed Contributor

Re: " Core" not in executable format: File format not recognized - HP Itanium

>Thanks that did help.

If you are happy with the answers you got, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
http://forums.itrc.hp.com/service/forums/pageList.do?userId=WW387958&listType=unassigned