This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb-6.3 simulator problem when built on cygwin


Hi,
I have used following source code snapshots to build SH(ELF) toolchain,
1) binutils-050128
2) gcc-4.0-20050116
3) newlib-1.13.0
I have built GDB for SH-ELF target using gdb-6.3 source for Windows
(using cygwin-1.5.9-1) and for Linux.

I have a trivial test program using "printf" to print integer with
format specifier "%d".
This test program is then compiled for SH4 using cygwin based windows
tool chain. When I try to run output file using GDB simulator on
windows, I get the following error --
"sh-elf-run: can't load a.out: File format not recognized"

Same output file runs on Linux correctly.
The "printf" works perfectly without using any format specifiers in
windows as well as Linux.

The test program & command lines for compilation & running are as -
**************************  test.c ************************** 
int main()
{
 int j=10; 
 printf("\nValue of j is %d\n",j);
 return 0; 
}

command line to compile the program -
>sh-elf-gcc -m4 test.c

command line to run the output file -
>sh-elf-run a.out
*************************************************************

The output file of the program compiled for following targets gives
problem - SH4, SH4A, SH4A-NOFPU, SH4A-SINGLE, SH4A-SINGLE-ONLY.

Kindly suggest the solution for this problem. 
Is there any problem in building the GDB on Cygwin ? I have used same
build process for Linux and Cygwin.

Thanks in advance.

Regards,
Nitin Shah.
KPIT Cummins InfoSystems Ltd.
Pune, India

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH and H8 Series.
The following site also offers free technical support to its users. 
Visit http://www.kpitgnutools.com for details. 
Latest versions of KPIT GNU tools are released on February 4, 2005.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]