* RE: Porting GDB - Where to start?
@ 2002-11-26 0:15 James Sampson
2002-11-26 7:01 ` Andrew Cagney
0 siblings, 1 reply; 11+ messages in thread
From: James Sampson @ 2002-11-26 0:15 UTC (permalink / raw)
To: Andrew Cagney; +Cc: GDB Archive
>> It's an ELF port, but xstormy16 is still probably your best bet.
>
>Yes.
>
>(GDB ports are object file netural. Handling elf, xcoff, coff, ... is a
>bfd problem and as long as BFD can handle it, so can GDB. The only
>potential got-ya is the debug info, use GCC and you should be safe >there.)
Ok then :-)
A couple of questions:
1. Why is xstormy16 the best place to start?.
2. Since I can't use GCC to make target specific code for a C55x I must use
CCS (Code Composer Studio) from TI. What could a "got-ya" be?.
Best Regards
James
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Porting GDB - Where to start?
2002-11-26 0:15 Porting GDB - Where to start? James Sampson
@ 2002-11-26 7:01 ` Andrew Cagney
2002-12-03 22:48 ` Jim Blandy
0 siblings, 1 reply; 11+ messages in thread
From: Andrew Cagney @ 2002-11-26 7:01 UTC (permalink / raw)
To: James Sampson; +Cc: GDB Archive
>>> It's an ELF port, but xstormy16 is still probably your best bet.
>
>>
>>Yes.
>>
>>(GDB ports are object file netural. Handling elf, xcoff, coff, ... is a
>>bfd problem and as long as BFD can handle it, so can GDB. The only
>>potential got-ya is the debug info, use GCC and you should be safe >there.)
>
>
> Ok then :-)
>
> A couple of questions:
>
> 1. Why is xstormy16 the best place to start?.
Being fairly new, and for a relatively straightforward architecture, it
doesn't come with much baggage. It's roughly 1000 lines long, while the
MIPS is a wopping 6000 lines!
> 2. Since I can't use GCC to make target specific code for a C55x I must use
> CCS (Code Composer Studio) from TI. What could a "got-ya" be?.
There is a good chance that after you've kind of got the target `mostly'
working, you will spend time debugging problems in the symtab code.
This is because, when it comes to debug info, no two compilers are
alike. Consequently, is a very good chance that GDB won't properly
handle the debug info being output by this compiler.
Anyway, a first step is to find out what the debug info is and if GDB
has any support for it at all .... One way is to compile a simple
program using `-g -S' and then look at the assembler that is created.
If it contains ``.stabn'' lines its stabs, if it contains ``.debug_...''
symbols it's dwarf2 (or dwarf1?). Beyond that, you may want to post the
contents here.
(btw, anyone got an easier way of identifying the debug info?)
Andrew
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Porting GDB - Where to start?
@ 2002-11-26 7:53 James Sampson
2002-12-01 13:18 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: James Sampson @ 2002-11-26 7:53 UTC (permalink / raw)
To: Andrew Cagney; +Cc: GDB Archive
>> 1. Why is xstormy16 the best place to start?.
>
>Being fairly new, and for a relatively straightforward architecture, it
>doesn't come with much baggage. It's roughly 1000 lines long, while the
>MIPS is a wopping 6000 lines!
Ok! - I had the impression it had more than 200Kb of source code. Is it
because a lot of the code is similar from target to target, and doesn't need
much change? (I assume you mean a 1000 lines of code which has to be more or
less produced)
>> 2. Since I can't use GCC to make target specific code for a C55x I must use
>> CCS (Code Composer Studio) from TI. What could a "got-ya" be?.
>
>There is a good chance that after you've kind of got the target `mostly'
>working, you will spend time debugging problems in the symtab code.
>This is because, when it comes to debug info, no two compilers are
>alike. Consequently, is a very good chance that GDB won't properly
>handle the debug info being output by this compiler.
>
>Anyway, a first step is to find out what the debug info is and if GDB
>has any support for it at all .... One way is to compile a simple
>program using `-g -S' and then look at the assembler that is created.
>If it contains ``.stabn'' lines its stabs, if it contains ``.debug_...''
>symbols it's dwarf2 (or dwarf1?). Beyond that, you may want to post the
>contents here.
In CCS you have the option to use COFF or DWARF. I was planning on using COFF,
because I have noticed some C54x COFF file thingies in the BFD, which could be
usable :-D. Do you know if they are?.
>(btw, anyone got an easier way of identifying the debug info?)
Not me :-D
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Porting GDB - Where to start?
2002-11-26 7:53 James Sampson
@ 2002-12-01 13:18 ` Daniel Jacobowitz
2002-12-01 22:16 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2002-12-01 13:18 UTC (permalink / raw)
To: James Sampson; +Cc: Andrew Cagney, GDB Archive
On Tue, Nov 26, 2002 at 04:53:15PM +0100, James Sampson wrote:
> >> 1. Why is xstormy16 the best place to start?.
> >
> >Being fairly new, and for a relatively straightforward architecture, it
> >doesn't come with much baggage. It's roughly 1000 lines long, while the
> >MIPS is a wopping 6000 lines!
>
> Ok! - I had the impression it had more than 200Kb of source code. Is it
> because a lot of the code is similar from target to target, and doesn't need
> much change? (I assume you mean a 1000 lines of code which has to be more or
> less produced)
>
>
> >> 2. Since I can't use GCC to make target specific code for a C55x I must use
> >> CCS (Code Composer Studio) from TI. What could a "got-ya" be?.
> >
> >There is a good chance that after you've kind of got the target `mostly'
> >working, you will spend time debugging problems in the symtab code.
> >This is because, when it comes to debug info, no two compilers are
> >alike. Consequently, is a very good chance that GDB won't properly
> >handle the debug info being output by this compiler.
> >
> >Anyway, a first step is to find out what the debug info is and if GDB
> >has any support for it at all .... One way is to compile a simple
> >program using `-g -S' and then look at the assembler that is created.
> >If it contains ``.stabn'' lines its stabs, if it contains ``.debug_...''
> >symbols it's dwarf2 (or dwarf1?). Beyond that, you may want to post the
> >contents here.
>
> In CCS you have the option to use COFF or DWARF. I was planning on using COFF,
> because I have noticed some C54x COFF file thingies in the BFD, which could be
> usable :-D. Do you know if they are?.
If those are the two switches that's pretty bizarre. COFF is a file
format, DWARF a debug info format. You probably want DWARF (DWARF-2)
which implies ELF format files.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Porting GDB - Where to start?
2002-12-01 13:18 ` Daniel Jacobowitz
@ 2002-12-01 22:16 ` Eli Zaretskii
2002-12-02 6:28 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2002-12-01 22:16 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: James Sampson, Andrew Cagney, GDB Archive
On Sun, 1 Dec 2002, Daniel Jacobowitz wrote:
> > In CCS you have the option to use COFF or DWARF. I was planning on using COFF,
> > because I have noticed some C54x COFF file thingies in the BFD, which could be
> > usable :-D. Do you know if they are?.
>
> If those are the two switches that's pretty bizarre. COFF is a file
> format, DWARF a debug info format.
Not 100% accurate, AFAIK: there's also COFF debug info format.
> You probably want DWARF (DWARF-2) which implies ELF format files.
DWARF-2 is also supported with COFF binary format. DJGPP uses that
combination.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Porting GDB - Where to start?
2002-12-01 22:16 ` Eli Zaretskii
@ 2002-12-02 6:28 ` Daniel Jacobowitz
2002-12-02 11:14 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2002-12-02 6:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: James Sampson, Andrew Cagney, GDB Archive
On Mon, Dec 02, 2002 at 08:16:17AM +0200, Eli Zaretskii wrote:
>
> On Sun, 1 Dec 2002, Daniel Jacobowitz wrote:
>
> > > In CCS you have the option to use COFF or DWARF. I was planning on using COFF,
> > > because I have noticed some C54x COFF file thingies in the BFD, which could be
> > > usable :-D. Do you know if they are?.
> >
> > If those are the two switches that's pretty bizarre. COFF is a file
> > format, DWARF a debug info format.
>
> Not 100% accurate, AFAIK: there's also COFF debug info format.
>
> > You probably want DWARF (DWARF-2) which implies ELF format files.
>
> DWARF-2 is also supported with COFF binary format. DJGPP uses that
> combination.
Really? How does that work? I recall a number of blatant ELFisms in
dwarf2, both specification and implementation. I suppose that if COFF
has arbitrary named sections, it could work - but I thought only ECOFF
did that.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Porting GDB - Where to start?
2002-12-02 6:28 ` Daniel Jacobowitz
@ 2002-12-02 11:14 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2002-12-02 11:14 UTC (permalink / raw)
To: drow; +Cc: i_am_triumph, ac131313, gdb
> Date: Mon, 2 Dec 2002 09:29:03 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
> >
> > DWARF-2 is also supported with COFF binary format. DJGPP uses that
> > combination.
>
> Really? How does that work?
Quite frankly, I have no idea; I just know it does. You could
probably find the details in the GCC sources, though.
> I suppose that if COFF has arbitrary named sections, it could work -
> but I thought only ECOFF did that.
FWIW, the DJGPP linker script has this snippet:
/* DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
^ permalink raw reply [flat|nested] 11+ messages in thread
* Porting GDB - Where to start?
@ 2002-11-25 1:56 James Sampson
2002-11-25 6:29 ` Daniel Jacobowitz
0 siblings, 1 reply; 11+ messages in thread
From: James Sampson @ 2002-11-25 1:56 UTC (permalink / raw)
To: GDB Archive
Hello
In my GDB journey, I have now found out, that I need to port the GDB to C55x
target. A recipe on how to do this, exists only in very light form. The best
thing is to edit another port, and since I don't know which port to choose, I
ask that exact question here.
Which port would be best to start from, when I'm porting to a C55x target
which produces COFF files?.
Best Regards
James Sampson
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Porting GDB - Where to start?
2002-11-25 1:56 James Sampson
@ 2002-11-25 6:29 ` Daniel Jacobowitz
2002-11-25 10:22 ` Andrew Cagney
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2002-11-25 6:29 UTC (permalink / raw)
To: James Sampson; +Cc: GDB Archive
On Mon, Nov 25, 2002 at 10:56:22AM +0100, James Sampson wrote:
> Hello
>
> In my GDB journey, I have now found out, that I need to port the GDB to C55x
> target. A recipe on how to do this, exists only in very light form. The best
> thing is to edit another port, and since I don't know which port to choose, I
> ask that exact question here.
>
> Which port would be best to start from, when I'm porting to a C55x target
> which produces COFF files?.
It's an ELF port, but xstormy16 is still probably your best bet.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Porting GDB - Where to start?
2002-11-25 6:29 ` Daniel Jacobowitz
@ 2002-11-25 10:22 ` Andrew Cagney
0 siblings, 0 replies; 11+ messages in thread
From: Andrew Cagney @ 2002-11-25 10:22 UTC (permalink / raw)
To: Daniel Jacobowitz, James Sampson; +Cc: GDB Archive
> On Mon, Nov 25, 2002 at 10:56:22AM +0100, James Sampson wrote:
>
>> Hello
>>
>> In my GDB journey, I have now found out, that I need to port the GDB to C55x
>> target. A recipe on how to do this, exists only in very light form. The best
>> thing is to edit another port, and since I don't know which port to choose, I
>> ask that exact question here.
>>
>> Which port would be best to start from, when I'm porting to a C55x target
>> which produces COFF files?.
>
>
> It's an ELF port, but xstormy16 is still probably your best bet.
Yes.
(GDB ports are object file netural. Handling elf, xcoff, coff, ... is a
bfd problem and as long as BFD can handle it, so can GDB. The only
potential got-ya is the debug info, use GCC and you should be safe there.)
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2002-12-04 6:48 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-26 0:15 Porting GDB - Where to start? James Sampson
2002-11-26 7:01 ` Andrew Cagney
2002-12-03 22:48 ` Jim Blandy
-- strict thread matches above, loose matches on Subject: below --
2002-11-26 7:53 James Sampson
2002-12-01 13:18 ` Daniel Jacobowitz
2002-12-01 22:16 ` Eli Zaretskii
2002-12-02 6:28 ` Daniel Jacobowitz
2002-12-02 11:14 ` Eli Zaretskii
2002-11-25 1:56 James Sampson
2002-11-25 6:29 ` Daniel Jacobowitz
2002-11-25 10:22 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox