This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Patches for Borland TDS debugging info [This time with the files]
- To: binutils at sourceware dot cygnus dot com
- Subject: Re: Patches for Borland TDS debugging info [This time with the files]
- From: Troy Rollo <troy at rollo dot com>
- Date: Sat, 17 Feb 2001 10:42:03 +1100
At 15:25 22/08/00 -0700, Nick Clifton wrote:
>: recognising Borland TDS debugging information. I'll be sticking the
>: copyright assignment and employer disclaimer for RMS in the mail
>: tomorrow
>
>Great - please let us know when these have been processed so that we
>can go ahead with integrating this patch into the sources.
This was processed a little while ago, so my changes as they stand now are
attached.
>: 1. I have added a new data element to the BFD structure -
>: "opened_for_symbols". TDS is a debugging only format which can
>: either be in the executable, or in a separate file. It should *only*
>: be recognised when a file is being opened to be read for debugging
>: symbols. A reader is expected to set this element to "true"
>: immediately after opening the file and before attempting to get BFD
>: to recognise the type of file.
>
>So where (in your patch) is this ever set to true ?
This is set by GDB - it is the caller's responsibility to set this when it
is needed.
>: 3. I have made no attempt to make TDS work in a heterogeneous remote
>: debugging environment.
>
>This might actually be the biggest problem, since everything else in the
>BFD has been designed to work in heterogenous environments. I would
>strongly urge you to consider abandoning the ALIGNED1 macro and
>instead using external and internal versions of the structures in the
>same way that the ELF headers do.
As I indicated at the time, I didn't want to write this manually, as I felt
it would be more productive to write a program to generate such code. This
is what I did, and the new files listed includes "tds.ds", which is the
input file, and "tds.c" and "tds.h" which are the output files, which
contain the generated C data structures and generated C routines to convert
between internal and external representations.
I have not attached the generator code, as I'm not sure how to proceed. It
is likely to be generally useful for auto-generating code to deal with
platform-independent reading and writing of data structures, so it could be
considered a new project, or could be considered a part of BFD. It's around
2500 LOC in 4 source files. The Usage message is as follows:
Usage:\n\n"
" %s [options] input-file\n\n"
"Options:\n\n"
" --help Print this help text.\n"
" --define=NAME[=VALUE] Define preprocessor value.\n"
" --undef=NAME Undefine initial definition of
NAME.\n"
" --cpp-arg=VALUE Pass the argument to the C
preprocessor.\n"
" --preprocessor=VALUE Set the preprocessor to use.\n"
" --portable-code Produce code that will work on a
different CPU.\n\n",
>Oh - one other thing - please could you also add to your patch an
>update of binutils/NEWS saying that support for the TDS files has been
>added.
I don't have binutils checked out, since I'm working on GDB. I'm somewhat
reluctant to check out binutils since running configure currently takes an
hour or so as it is, so the less I have to have checked out the better.
bfd-diffs
bfd-newfiles.tar.gz
______________________________________________________________________________
troy@rollo.com Troy Rollo, Sydney, Australia
Fight spam in Australia - Join CAUBE.AU - http://www.caube.org.au/