LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Crosstool from x86 linux to alpha linux lacks detailed debug information (https://www.linuxquestions.org/questions/linux-general-1/crosstool-from-x86-linux-to-alpha-linux-lacks-detailed-debug-information-800671/)

LeoPorter 04-07-2010 05:01 PM

Crosstool from x86 linux to alpha linux lacks detailed debug information
 
I have a working build of crosstool - it was built for gcc 3.4.3 using glibc 2.3.5 going from 32-bit x86 linux to 64-bit alpha linux. As far as I can tell -- it compiles correctly (output of alpha emulation matches expected) but it has a major flaw. When I use the cross compiler and attempt to add detailed debug information, it compiles, but does not have the debug information.

For example, when I execute:
> /home/leporter/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gcc-3.4.3 -g -o hello main.c
OR
> /home/leporter/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gcc-3.4.3 -gstabs -o hello main.c

I get a working alpha binary for hello world. BUT - when I run objdump - this is what I get

> /home/leporter/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-objdump -g hello

hello: file format elf64-alpha

/home/leporter/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-objdump: hello: no recognized debugging information

Frustratingly - if I use my x86 gcc version 3.4.6 to do the compilation (same arguments, just using the x86 compiler, not the cross compiler) - it correctly embeds the debug information.

Has anyone else had problems with detailed debug information in crosstool? I'd greatly appreciate advice.

Leo

theNbomr 04-08-2010 11:50 AM

This sounds like a problem difficult to diagnose. It may be easier to move to crosstool-NG, which is more up-to-date, and is still actively supported.
--- rod.

LeoPorter 04-09-2010 10:27 AM

Quote:

Originally Posted by theNbomr (Post 3928740)
This sounds like a problem difficult to diagnose. It may be easier to move to crosstool-NG, which is more up-to-date, and is still actively supported.
--- rod.

Hi Rod - thank you. I'll look into crosstool-NG. I had visions of diving into gcc myself and I'm not a big fan of that.

Thanks again,

Leo


All times are GMT -5. The time now is 03:40 PM.