Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* New object file parser?
@ 2002-07-12  9:02 Dan Towner
  2002-07-12  9:50 ` Jim Blandy
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Towner @ 2002-07-12  9:02 UTC (permalink / raw)
  To: gdb

Hi all,

I am porting gdb to a new processor architecture (embedded
multi-processor DSP). Currently, although we use gcc as our compiler, we
have a proprietary assembler and linker, which generate non-standard
object and executable files. Now, faced with the task of getting the
symbol table information from the object file through to gdb, is it
easier to:

 1) Write a new parser for BFD.

or

 2) Write a converter which generates a standard object file format from
our proprietary format.

Whichever route I take, which object file would be the easier to deal
with? From what I have seen, I think that a.out would be the best, but
is there anything simpler? 

Dan,

=============================================================================
Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
BA1 5BG
dant@picochip.com
07786 702589


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New object file parser?
  2002-07-12  9:02 New object file parser? Dan Towner
@ 2002-07-12  9:50 ` Jim Blandy
  2002-07-12  9:55   ` Dan Towner
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2002-07-12  9:50 UTC (permalink / raw)
  To: Dan Towner; +Cc: gdb


Dan Towner <dant@picochip.com> writes:
> I am porting gdb to a new processor architecture (embedded
> multi-processor DSP). Currently, although we use gcc as our compiler, we
> have a proprietary assembler and linker, which generate non-standard
> object and executable files. Now, faced with the task of getting the
> symbol table information from the object file through to gdb, is it
> easier to:
> 
>  1) Write a new parser for BFD.
> 
> or
> 
>  2) Write a converter which generates a standard object file format from
> our proprietary format.

Well, you've made your bed...   :)

> Whichever route I take, which object file would be the easier to deal
> with? From what I have seen, I think that a.out would be the best, but
> is there anything simpler? 

Well, there's S-records.  I don't know if they can carry symbol
information, though.  I think not.

If you need a symbol table, I'd say a.out is probably the simplest one
there is.  You can probably find documentation for a.out in the SunOS
4 man pages, or perhaps somewhere on the Web.

The next question is, what debugging format do you use?  Converting
debugging info from the proprietary format to STABS or Dwarf is going
to be the hard part, I'd bet.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New object file parser?
  2002-07-12  9:50 ` Jim Blandy
@ 2002-07-12  9:55   ` Dan Towner
  2002-07-12 10:11     ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Towner @ 2002-07-12  9:55 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb

Jim Blandy wrote:

> Well, there's S-records.  I don't know if they can carry symbol
> information, though.  I think not.
> 
> If you need a symbol table, I'd say a.out is probably the simplest one
> there is.  You can probably find documentation for a.out in the SunOS
> 4 man pages, or perhaps somewhere on the Web.
> 
> The next question is, what debugging format do you use?  Converting
> debugging info from the proprietary format to STABS or Dwarf is going
> to be the hard part, I'd bet.

It already uses STABS, it just stores it in a slightly odd way.

Dan.

=============================================================================
Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
BA1 5BG
dant@picochip.com
07786 702589


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New object file parser?
  2002-07-12  9:55   ` Dan Towner
@ 2002-07-12 10:11     ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-07-12 10:11 UTC (permalink / raw)
  To: Dan Towner; +Cc: Jim Blandy, gdb

On Fri, Jul 12, 2002 at 05:56:47PM +0100, Dan Towner wrote:
> Jim Blandy wrote:
> 
> > Well, there's S-records.  I don't know if they can carry symbol
> > information, though.  I think not.
> > 
> > If you need a symbol table, I'd say a.out is probably the simplest one
> > there is.  You can probably find documentation for a.out in the SunOS
> > 4 man pages, or perhaps somewhere on the Web.
> > 
> > The next question is, what debugging format do you use?  Converting
> > debugging info from the proprietary format to STABS or Dwarf is going
> > to be the hard part, I'd bet.
> 
> It already uses STABS, it just stores it in a slightly odd way.

In all honesty, although it is slightly more effort, I recommend using
ELF instead.  If you aren't trying to be terribly complicated with it,
then it's fairly straightforward; and UNLIKE a.out, it is very well
documented.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-07-12 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-12  9:02 New object file parser? Dan Towner
2002-07-12  9:50 ` Jim Blandy
2002-07-12  9:55   ` Dan Towner
2002-07-12 10:11     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox