This widget could not be displayed.
Operating System - Linux
1845516 Members
2583 Online
110244 Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
New Discussion
This widget could not be displayed.
This widget could not be displayed.

Re: 32bit C binaries core dumping on HP-UX11i

 
Stephen Worrall
New Member

32bit C binaries core dumping on HP-UX11i

I am migrating a home grown c application from 10:20 to 11i. I need to keep it as 32bit because some parts of the system will still be running on 10:20 servers. The app is comprised of a number of daemon processes which communicate via JMS queues.

I have switched to native threads (becaue HP-UX11 doesn't need green threads) and successfully recompiled the binaries (and JNI inrerface) using DAportable and PA_RISC to keep it all 32 bit, but my program crashes as soon as I try to start it.

"getconf HW_CPU_SUPP_BITS" returns 64, does this mean I can't run a 32 bit binary, or is it something else?
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: 32bit C binaries core dumping on HP-UX11i

Hi:

> getconf HW_CPU_SUPP_BITS" returns 64, does this mean I can't run a 32 bit binary, or is it something else?

This simply means that your hardware runs a 64-bit kernel. That doesn't mean that this isn't capable of running 32-bit code.

The reason for the "crash" is important in diagnosis. Do you have a core file, and what was the fault that created it?

Regards!

...JRF...
Stephen Worrall
New Member

Re: 32bit C binaries core dumping on HP-UX11i

Hi,

OOPS! That was the thing I forgot to mention, I have got a core file, but it's been a few years since I did any development and I can't remember the command to run the debugger.

I did suspect that there shouldn't be a problem running 32bit binaries, but it crashed so quickly, I was hoping for an easy solution.
Stephen Worrall
New Member

Re: 32bit C binaries core dumping on HP-UX11i

Sorry James, I just re-read the points guidelines and I should have assigned 4-7. I'll be more generous next time.
Kenan Erdey
Honored Contributor

Re: 32bit C binaries core dumping on HP-UX11i

Hi,

you can use gdb for analyzing core file.

Kenan.
Computers have lots of memory but no imagination
Dennis Handly
Acclaimed Contributor

Re: 32bit C binaries core dumping on HP-UX11i

gdb executable core
(gdb) bt

Of course compiling it with -g will enable you to print out variables.
Stephen Worrall
New Member

Re: 32bit C binaries core dumping on HP-UX11i

Thank you both.

In the mean time I had worked out that I used to use xdb, but as this is a new server that was supposed to be for test, rather than development, it hasn't been installed.

gdb shows me that my programs are crashing in /usr/lib/libc.2 when trying to createJVM
Venkatesh BL
Honored Contributor

Re: 32bit C binaries core dumping on HP-UX11i

Also, 'file' command would tell you if the binary is 32-bit or 64-bit.

Ex:
# file ./a.out
./a.out: ELF-32 executable object file - IA64

So, its a 32-bit ELF binary.
Dennis Handly
Acclaimed Contributor

Re: 32bit C binaries core dumping on HP-UX11i

>but as this is a new server that was supposed to be for test, rather than development, it hasn't been installed.

xdb was last supported on 10.20.

>gdb shows me that my programs are crashing in libc.2 when trying to createJVM

What's the stack trace look like?
Stephen Worrall
New Member

Re: 32bit C binaries core dumping on HP-UX11i

Thanks everybody, I am making progress.

My JNI interface was compiled in 64bit (file libjniqueue.sl). I've added +DAportable to the cc command and the core dumping has stopped.

The bad new: my programs are still not starting, but now they just shut down nicely without saying why.

I think it's with me now to add some debug lines (or run it inside gdb). I'll post an update later