---------------------- Forwarded by Bart Durinck/ICOS on 05/03/2000 06:10
PM ---------------------------
Bart Durinck
05/03/2000 05:14 PM
To: [EMAIL PROTECTED]
cc:
Subject: Re: Using GDB with MRI cross compiler ? (Document link not
converted)
Why not GNU all the way?! Then you'll have all the GNU power ;-)
Ie. use GNU CC and binutils configured for m68k-coff... That's what we do.
And we used MRI before. There's even a switch for GNU 'as' that makes it
understand MRI syntax!
There is a CrossGCC Faq somewhere on the web on how to build cross-platform
tools.
Look at sourceware.cygnus.com...
Bart
[EMAIL PROTECTED] on 05/03/2000 05:04:14 PM
To: [EMAIL PROTECTED]
cc: (bcc: Bart Durinck/ICOS)
Subject: Using GDB with MRI cross compiler ?
Hello,
On Sparc-SUN-Solaris2.6 :
I want to use gdb on m68 target with GDB 4.18.
Lot of soft already exist on this target. These softs were built with
the MRI tools (microtech: mcc68k v4.4, asm68k v7.0, lnk68k v7.0)
throught platine utilities
(v4.30).
A) First I try to convert ieee executable file ( output of MRI linker
with symbol table and debug informations .xray) into a elf file with
objcopy (GNU binary utilities
2.9.1). In gdb, most of symbol were lost and none is a debbuging
symbol. So, I try to convert ieee output file of MRI tools into Coff or
Aout format with objcopy
but GDB doen't recognized these output !
So i suppose that the debbuging symbole are the results of GCC and
objcopy should not convert all the symbol available in ieee into elf.
Something is wrong or not
?
########################################
In mtoto.C : 3 functions, 4 globals var & some internal var.
prod mtoto.c -> mtoto.obj (All symbol are in ieee file)
########################################
convert ieee into elf format with objcopy: objcopy [-vVSpgxX] [-I
bfdname] [-O bfdname] [-F bfdname] [-b byte]
................... [--verbose] [--version] [--help] in-file
[out-file]
objcopy: supported targets: elf32-sparc a.out-sunos-big a.out-zero-big
trad-core ieee coff-m68k versados elf32-m68k srec symbolsrec tekhex
binary ihex
########################################
millot@vador : objcopy -I ieee -O elf32-m68k etoto.xray etoto-elf.bin
millot@vador : mon-gdb etoto-elf.bin
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.GDB is free software,
covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "--host=sparc-sun-solaris2.6
--target=m68k-monitor-none"...
(no debugging symbols found)...
(gdb) info var
All defined variables:
(gdb) info func
All defined functions:
Non-debugging symbols:
00000000 ieee empty
00000000 mtoto
04080000 _test_pos
04080082 _etoto_essai
04081000 _varglobal1
(gdb)
########################################################################
#
B) I try to link with GNU LD the relogeable file issued from MRI
compiler /assembler.
First the numerical named section isn't accepted in MRI script file
using objcopy. Change the name into alphanumerical works well.
But the ieee input format seems to be unrecognized.
########################################
millot@vador : objdump -i
BFD header file version 2.9.1
elf32-sparc
(header big endian, data big endian) sparc a.out-sunos-big
(header big endian, data big endian) m68k sparc a.out-zero-big
(header big endian, data big endian) m68k sparc trad-core
(header big endian, data big endian) ieee
(header endianness unknown, data endianness unknown) m68k
sparccoff-m68k
(header big endian, data big endian) m68k versados
(header big endian, data big endian) m68k sparc elf32-m68k
(header big endian, data big endian) m68k srec
(header endianness unknown, data endianness unknown) m68k sparc
symbolsrec
(header endianness unknown, data endianness unknown) m68k sparc
tekhex
(header endianness unknown, data endianness unknown) m68k sparc
binary
(header endianness unknown, data endianness unknown) m68k sparc ihex
(header endianness unknown, data endianness unknown) m68k sparc
elf32-sparc a.out-sunos-big a.out-zero-big trad-core ieee
m68k ----------- a.out-sunos-big a.out-zero-big --------- ieee
sparc elf32-sparc a.out-sunos-big a.out-zero-big --------- ieee
coff-m68k versados elf32-m68k srec symbolsrec tekhex binary
ihex
m68k coff-m68k versados elf32-m68k srec symbolsrec tekhex binary
ihex
sparc --------- versados ---------- srec symbolsrec tekhex binary
ihex
########################################
file essai-ld.pro:
CHIP 68040
PUBLIC A.TAMPON=004080000H
PUBLIC TYPBOOT=1
ORDER 1, 2
SECT code, 004010000H
SECT 3, 004011000H
LOAD mcpboot.obj
millot@vador : ld-m68 --mri-script=essai-ld.pro --oformat elf32-m68k
ld-m68:essai-ld.pro:4: parse error in MRI style script
#########################################
CHIP 68040
PUBLIC A.TAMPON=004080000H
PUBLIC TYPBOOT=1
ORDER un, deux
SECT code, 004010000H
SECT trois, 004011000H
LOAD mcpboot.obj
millot@vador : ld-m68 --mri-script=essai-ld.pro
ld-m68: bfd assertion fail ieee.c:404
ld-m68: warning: m68k:68040 architecture of input file `mcpboot.obj' is
incompatible with sparc output
ld-m68: final link failed: Memory exhausted
+++++++++++++++++++++++++++++++++++++++++++
ld-m68 --oformat elf32-m68k --mri-script=essai-ld.pro
ld-m68:a.out: can not set architecture: No such file or directory
###############################################
I have a bad configuration or option or you know a tool which permits
use MRI tools with gdb ?
Your help would be greatly appreciated.
Thanks
Beno?t
Sent via Deja.com http://www.deja.com/
Before you buy.