Adding QNX core-file support to bfd

Andrew Cagney ac131313@redhat.com
Mon Jan 27 17:19:00 GMT 2003


A technical objective of GDB is to selectively support multiple core 
file formats simultaneously.  I don't know that adding #ifdef's to BFD 
is in line with that objective.  I think the first thing to do is 
investigate what BFD changes are neededed to eliminate these #ifdef's.


> (Posted to both binutils and gdb since there is overlap on who supports core
> files)
> 
> Our core files require special support and I was hoping that someone might
> be able to tell me a better way to do it than we currently do.
> 
> Right now, we have a special elfcore_grok_qnx_note() function that is called
> in elf.c in much the same way as elfcore_grok_netbsd_note() is called (check
> the namedata for a string and call the function if it matches).

It looks like a dispatch table is needed so that both the QNX and can 
have their support conditionally linked in.

> 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.

What exactly is this support code?  Keep in mind that all of the support 
functions et.al. will need to be included in a GDB distribution.

Andrew




More information about the Binutils mailing list