1833055 Members
2441 Online
110049 Solutions
New Discussion

64 Bit GDB

 
Pattabhi
Frequent Advisor

64 Bit GDB

Hi All,

Has any one compiled 64 bit gdb on HPUX(RISC).
I am using a gcc compiler and i am passing the following parameters
cc="gcc -m64" ./configure, once the installion is done and i do a file on the output file, it says

# file gdb
gdb: PA-RISC2.0 shared executable dynamically linked -not stripped

Does this mean that it is a 64 bit file? the same parameter on soalris did produce a 64 bit executable.

Any thoughts?

Regards,
pattabhi Raman
6 REPLIES 6
Marco A.
Esteemed Contributor

Re: 64 Bit GDB

Hello Pattabhi,

Certain binaries do not execute on a PA-RISC 1.1 system (HP-UX 10.20, some HP-UX 11.0 systems), because they were inadvertantly compiled for PA-RISC 2.0 only.

Example.:

$file myprog.c

s800 shared executable dynamically linked -not stripped
(this is PA_RISC 1.0 compatible and will ALSO run on PA_RISC 1.1)

$file myprog1.c

PA-RISC1.1 shared executable dynamically linked -not stripped
(this is PA_RISC 1.1 compatible ONLY)

You can specify the target architecture version at compile time by
specifying the +DAversion option on the cc(1) compiler:

$cc myprog1.c +DA1.1 -omyprog1
(compiles code for PA_RISC 1.1)

Specifying +DA1.0 or simply using the cc(1) default version compiles
code compatible with both PA_RISC 1.0 and PA_RISC 1.1 systems.

I hope this helps,

Marc0
Just unplug and plug in again ....
Dennis Handly
Acclaimed Contributor

Re: 64 Bit GDB

>Does this mean that it is a 64 bit file?

No. This is still 32 bit.

>Marco: Specifying +DA1.0 or simply using the cc(1) default version compiles code compatible with both PA_RISC 1.0

+DA1.0 is NOT supported. All PA1.0 machines are not supported on 10.20

The +DA default compiles only for the current machine.
Pattabhi
Frequent Advisor

Re: 64 Bit GDB

What do you have say on this?

The same steps followed on Solaris gave me this output

file /usr/local/bin/gdb
/usr/local/bin/gdb: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped

But why not on HP?
IS there a way or any options that i need to use to compile gdb for 64 bit mode.
Marco A.
Esteemed Contributor

Re: 64 Bit GDB

That problem is due to the processor version, for example from PA-RISC 1 to PA-RISC 2 , and actually yes, the problem is in Sun too .
Just unplug and plug in again ....
Bill Hassell
Honored Contributor

Re: 64 Bit GDB

PA 1.anything cannot run any 64bit code and cannot run a 64bit operating system. Only PA2.0 and later are 64bit capable. The compiler ignores 64bit flags if your current OS is only 32bits (which would always be the case on a PA 1.1 or earlier CPU). The PA-RISC2.0 flag simple means that it is a 32bit executable that takes advantage of some additional features of the newer processor. But once you move your code to a 64bit version of HP-UX, you can get the ELF binary file - of course, that ELF file will not run on any 32bit version of HP-UX, regardless of the hardware.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: 64 Bit GDB

>Bill: The compiler ignores 64bit flags if your current OS is only 32bits

This is not true. HP compilers will allow you to specify +DD64 or a +DA option on a machine that doesn't support it.