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]

Re: Adding QNX core-file support to bfd


> Hi Kris,
>
> > The problem with this is that all of that code and the support functions
for
> > reading our registers, status, etc. is wrapped in #ifdef __QNXTARGET__
which
> > is defined at configure time.  I believe that this is the sort of
clutter
> > that you want to avoid but unfortunately, we rely on some of our
definitions
> > and structures to extract the corefile information.
>
> Using a target specific define does appear to be the way that all core
> file types are supported by the bfd library, so you are not doing
> anything unusual or unwarranted.  Since the header files that allow
> the core file to be decoded are only available on certain targets, it
> makes sense that the inclusion of that particular core file support be
> dependent upon the host/build environment, and this environment is
> determined at configure time.

Okay.  That's good to know.  What I can do to make it a little nicer is to
just put the bare minimum into elf.c and then split our other support
functions out into separate file that will only be compiled for our target.

Second question.  The header file that it requires (nto_debug.h) used to be
in the top level include directory but it seemed to me that any nto specific
includes should be in an 'nto-share' directory in the gdb heirarchy.
Unfortunately, binutils doesn't rely on gdb being present so I'm thinking
that it might need to be in the 'include' dir.  Is there some other way to
do this?  It doesn't look like the include dir is overly cluttered and I
might find some resistance since there aren't really any target specific
headers there.  Perhaps if I just take the definitions I need and put them
into the nto specific file I mentioned earlier?

Kris


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