This is the mail archive of the gdb-patches@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: patch to add QNX NTO i386 support


> >     * config/i386/nm-nto.h: New file
>
> The file nm-nto.h should not be needed.  Instead define it's only macro
>   local to remote-nto.c.  (Disclaimer, you're breaking new ground with
> this one.  Some existing targets  don't have xm-*.h files, but I think
> you're first with the no-*.h file).
>
> >     * config/i386/nto.mh: New file
>
> Yes, you need this, you've a native support.

When I got rid of nm-nto.h and took out 'NAT_FILE=nm-nto.h' from nto.mh, all
of a sudden I wasn't building a native compiler anymore.  Looks like
configure uses the presence of a native file to determine whether to build a
self hosted debugger or not.  If I just 'touch nm-nto.h' and reconfigure, I
build a native gdb.  Any suggestions?  I was thinking that I could perhaps
point to one of my other headers and then share some remote and native
definitions.

As long as I'm asking questions, below is what I've reduced our tm-i386nto.h
file to.  Is it absolutely verboten to have this file?  There are a few
handy definitions there like EXTRA_GDBINIT and so on that we like to define
per target.  Also, I couldn't see how to get rid of the solib stuff.  Is
there some place else I can put these definitions?

cheers,

Kris

#ifndef TM_I386QNX_H
#define TM_I386QNX_H 1

/* Pick up most of what we need from the generic i386 target include file.
*/

#include "i386/tm-i386.h"
#include "tm-qnxnto.h"

#define __QNXTARGET__
#define QNX_TARGET_CPUTYPE CPUTYPE_X86

/* After a watchpoint trap, the PC points to the instruction after
   the one that caused the trap.  Therefore we don't need to step over it.
   But we do need to reset the status register to avoid another trap.  */
#define HAVE_CONTINUABLE_WATCHPOINT

/* default processor for search path for libs */
#define SOLIB_PROCESSOR "x86"

/* Use .ntox86-gdbinit */
#define EXTRA_GDBINIT_FILENAME ".ntox86-gdbinit"

#define HANDLE_SVR4_EXEC_EMULATORS 1
#include "solib.h" /* shared lib support */

#endif /* ifndef TM_I386QNX_H */


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