Operating System - HP-UX
1819791 Members
3282 Online
109607 Solutions
New Discussion юеВ

GDB 6.0 core: not in executable format: File format not recognized

 
SOLVED
Go to solution
ShivS
Frequent Advisor

GDB 6.0 core: not in executable format: File format not recognized


Hi All,

I am facing the following problems while using GDB to debug the core file:

$ gdb issueHolders core
GNU gdb 6.0
Copyright 2003 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 "hppa2.0w-hp-hpux11.11"..."/tfsw/ocp/v1.0/bin/apps/issueHolders": not in executable format: File format not recognized

"/tfsw/ocp/v1.0/bin/apps/core" is not a core dump: File format not recognized
(gdb) core core
"/tfsw/ocp/v1.0/bin/apps/core" is not a core dump: File format not recognized
(gdb) q


$ uname -a:
HP-UX ocpdev1 B.11.11 U 9000/800 ocpdev1 unlimited-user license

$ file core
core: ELF-64 core file - PA-RISC 2.0

$ ls -ltr issueHolders
-rwxrwxrwx 1 tuxdev tuxedo 5392752 Aug 5 12:04 issueHolders*


Can somebody please tell me what is going wrong here?

Thanks
ShivS
13 REPLIES 13
Jini Susan George
Occasional Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi Shiv,

Looks like you are using the GNU gdb. We would suggest you use WDB to debug corefiles and applications on HP-UX. The path is /opt/langtools/bin/gdb. If WDB is not present at the mentioned path, please download it (the latest version 6.0) and install it from http://www.hp.com/go/wdb.

Hope this helps.
- Jini.

ShivS
Frequent Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi Jini,

I went to the website http://www.hp.com/go/wdb to download the latest WDB version, but I dont see any link to download the latest version. Do you see any link for download?

Thanks
Shiv
Stephan._1
Trusted Contributor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi ShivS,

you need an active DSSP Account to see anything there (Developer & Solution Partner Program).

If you don't have one, you can ask a hp partner or the support guy's about it.

hth
Share what you know, learn what you don't.
ShivS
Frequent Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi SVO,

I created a DSPP account and now I am able to see the download links.

Thanks
Shiv
ShivS
Frequent Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi Jini,

I have installed HP WDB 6.0 on my machine and now I am getting the following error and warning:

==============================
ocpdev1:/tfsw/ocp/production/bin/apps>gdb issueHolders core
Detected 64-bit executable.
Invoking /opt/langtools/bin/gdb64.
HP gdb 6.0 for PA-RISC 2.0 (wide), HP-UX 11i
and target hppa2.0w-hp-hpux11.00.
Copyright 1986 - 2009 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.0 (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.
..


warning: Couldn't find general-purpose registers in core file. If this corefile is generated using dumpcore or gcore, you may try 'set live-core 1' or run fixcore on the corefile and reload the corefile.

Error trying to get information about dynamic linker.
==============================

Note that the core was generated by the executable issueHolders.

Any ideas on how to fix the warnings and error?

Thanks in advance.
Shiv.
Dennis Handly
Acclaimed Contributor
Solution

Re: GDB 6.0 core: not in executable format: File format not recognized

>Any ideas on how to fix the warnings and error?

It is likely the corefile is truncated, what is its size?
For ELF corefiles, you can do:
elfdump -S -o core
If you don't see CoreProc and CoreStck it has been truncated and useless.
ShivS
Frequent Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi Dennis,

Following are the outputs from file and elfdump commands:


$ file core
core: ELF-64 core file - PA-RISC 2.0

$ elfdump -S -o core

core:

*** Program Header ***

Type Offset Vaddr FSize Memsz

NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000
NULL 0000000000000000 0000000000000000 0000000000000000 0000000000000000

Can you suggest some next steps? Thanks in advance for your help.

Thanks
Shiv
Dennis Handly
Acclaimed Contributor

Re: GDB 6.0 core: not in executable format: File format not recognized

>Following are the outputs from file and elfdump commands:
>Can you suggest some next steps?

You didn't provide the size.
The corefile is corrupt, remove it and go about your business.

If you need to debug it next time, check ulimit to see the size:
ulimit -a
coredump(blocks) 4194303 (2 Gb)
ShivS
Frequent Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi Dennis,

The size of core file is 2147483646 bytes i.e. 1.999 GB.

The ulimit output is:
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303

Do you think I need to increase the coredump size? If yes, how should I do that?

Thanks
Shiv.
ShivS
Frequent Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi Dennis,

I increased the core dump size to unlimited using the following command:

ulimit -c unlimited.

After this, the core that was produced was of size 4337787128 (i.e. 4.04 GB).

The elfdump gave me the following error:
elfdump -S -o core
elfdump: I/O error: core Value too large to be stored in data type (elfdumperr 2501)

However, now the HP gdb (version 6.0) is working fine and I am able to debug as shown below:

gdb issueHolders core
Detected 64-bit executable.
Invoking /opt/langtools/bin/gdb64.
HP gdb 6.0 for PA-RISC 2.0 (wide), HP-UX 11i
and target hppa2.0w-hp-hpux11.00.
Copyright 1986 - 2009 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.0 (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 was generated by `issueHolders'.
Program terminated with signal 10, Bus error.
BUS_UNKNOWN - Unknown Error

warning: Load module /opt/oracle/product/9.2.0/lib/libclntsh.sl.9.0 has been stripped.
Debugging information is not available.


warning: Load module /opt/oracle/product/9.2.0/lib/libwtc9.sl has been stripped.
Debugging information is not available.

#0 0x40000000001ae2d4 in ItemList::initPass (this=0x0, val=false) at itemList.cc:142
142 numSorted = 0;
(gdb) where
#0 0x40000000001ae2d4 in ItemList::initPass (this=0x0, val=false) at itemList.cc:142
#1 0x400000000008e800 in IssueHolders::processHoldings (this=0x8000000100006058) at issueHolders.cc:478
#2 0x400000000008c274 in IssueHolders::runReport (this=0x8000000100006058, req=0x800003ffefff2b68) at issueHolders.cc:215
#3 0x4000000000078288 in issueHolders (transb=0x80000001000a12d0) at issueHolders.cc:107
#4 0xc00000000116d840 in _tmsvcdsp+0xce0 () from /opt/bea/tuxedo8.1/lib/libtux.sl
#5 0xc00000000118fae4 in _tmrunserver+0x1dc () from /opt/bea/tuxedo8.1/lib/libtux.sl
#6 0xc00000000116c668 in _tmstartserver+0x1e8 () from /opt/bea/tuxedo8.1/lib/libtux.sl
#7 0x4000000000077628 in main (argc=14, argv=0x800003ffefff1d20) at BS-4b6e.c:76
Current language: auto; currently c++
(gdb) frame 0
#0 0x40000000001ae2d4 in ItemList::initPass (this=0x0, val=false) at itemList.cc:142
142 numSorted = 0;
(gdb) list
137 //---------------------------------------------------------------------------
138 // initPass() - initializes the pass[] array to the given value
139 //---------------------------------------------------------------------------
140 void ItemList::initPass(bool val)
141 {
142 numSorted = 0;
143 memset(pass, val, maxItems * sizeof(bool));
144 }
145
146 //---------------------------------------------------------------------------
(gdb)


So looks like my problem is solved.

But can you please let me know why elfdump is giving that error and how should I solve that?

Thanks in advance.

Shiv.
Dennis Handly
Acclaimed Contributor

Re: GDB 6.0 core: not in executable format: File format not recognized

>So looks like my problem is solved.

You mean just the fact you can now debug? :-)
Your "this" pointer can't be NULL.

>But can you please let me know why elfdump is giving that error and how should I solve that?

Make sure you have the latest linker patch, PHSS_39749. Unfortunately there is nothing obvious where it says largefile (> 2 Gb) corefiles is fixed. Only my initial enhancement where it works on core files.
ShivS
Frequent Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

Hi Dennis,

Thanks for patch information. I will apply it on my system.

Thanks again!
Shiv
ShivS
Frequent Advisor

Re: GDB 6.0 core: not in executable format: File format not recognized

The HP GDB 6.0 is working fine on my system and I am able to debug core files now.

Thanks
Shiv