powerpc-wrs-vxworks executable problem

Ben Sapp bsapp@nua.lampf.lanl.gov
Fri Oct 1 00:00:00 GMT 1999


I have a Wind River version of gcc 2.7 for the powerpc on a Sun.  I also
compiled gdb 4.17,binutils 2.9.1, and gcc 2.8.1 for IRIX.  The IRIX and
Sun compilers work in that the program does what it is supposed to do. 
The problem is that the IRIX compilers do not let me debug correctly. 
For example I can set a breakpoint an it will claim to set the
breakpoint and then when I run the program it will either ignore the
breakpoint or get completely confused about where the breakpoint is.  I
have done a comparison of the the compiling steps and here is the
information I have that seems relevant:  

objdump --headers infile.o

This reveals one extra section is put in with the IRIX version.  It is
called .sdata.  I made the compiler not put this section in in one file
by changing the source as follows:
-------------------------------------
Original:(with .sdata section)
struct mystruct *mystructptr = NULL;

Changed:(without .sdata section)
struct mystruct *mystructptr;
-------------------------------------
The debugger was still confused.  Next, I examined the .s file produced
by both.   They were very similar except for the .stab declarations. 
Here are some examples of the differences:

IRIX:
.stabs "INT8:t(11,1)=(0,2)",128,0,76,0
.stabs "INT16:t(11,2)=(0,8)",128,0,77,0

Sun:
.stabs "INT8:t(0,2)",128,0,76,0
.stabs "INT16:t(0,8)",128,0,77,0

Almost always the numbers in the parens to the right of the '=' in the
IRIX version are the same as the Sun version.   I compiled .s file from
the Sun gcc compiler on the IRIX machine.  It still confused gdb.  

I also tried '-gdwarf' option, but this caused gdb to crash.
 
Does any one have a solution?  Does any one no where the problem comes
from?  If a solution is a good deal of work that is O.K. I just need a
lead to go on.    

Thank you.   

-- 
Ben Sapp                         Los Alamos National Laboratory
email: < mailto:bsapp@lanl.gov >   Phone: (505)667-3277
Fax:   (505)665-7920             URL:   http://www.neutrino.lanl.gov/
--



More information about the Gcc-help mailing list