From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16517 invoked by alias); 23 Apr 2003 18:48:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16497 invoked from network); 23 Apr 2003 18:48:20 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 23 Apr 2003 18:48:20 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3p2/8.9.3) with ESMTP id OAA15034 for ; Wed, 23 Apr 2003 14:46:49 -0400 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id OAA06555 for ; Wed, 23 Apr 2003 14:48:20 -0400 Message-ID: <0b2c01c309c8$ebafebf0$0202040a@catdog> From: "Kris Warkentin" To: Subject: [patch] i386-nto (QNX Neutrino) support Date: Wed, 23 Apr 2003 19:42:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0B29_01C309A7.649216F0" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2003-04/txt/msg00441.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-length: 938 In the interest of expediency, I removed the non-i386 things from debug.h which I believe eliminates the portability issues. These can be re-examined later when I'm doing the mips/powerpc ports. Most of this stuff has been gone over by Mark Kettenis fairly extensively (I ran indent again Mark) and I hope that the debug.h issue was the last of them. I've attached a diff of the config files as well as all the individual files. I also included a tarball that can be extracted in the gdb directory. Thanks Kris ChangeLog * configure.tgt: Add i386nto target * i386-nto-tdep.c: New file. i386 specific support for QNX Neutrino. * nto-tdep.c: New file. Neutrino target support routines. * nto-tdep.h: New file. Neutrino target header. * config/tm-qnxnto.h: New file. * config/i386/i386nto.mt: New file. * config/i386/tm-i386nto.h: New file. * nto-share/debug.h: New file. Neutrino procfs interface. ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/octet-stream; name="config.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="config.diff" Content-length: 460 Index: configure.tgt=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/configure.tgt,v=0A= retrieving revision 1.102=0A= diff -r1.102 configure.tgt=0A= 92a93=0A= > i[3456]86-*-nto*) gdb_target=3Di386nto;;=0A= 282a285=0A= > *-*-nto*) gdb_osabi=3DGDB_OSABI_QNXNTO ;;=0A= ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/x-compressed; name="nto.tgz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="nto.tgz" Content-length: 13120 H4sIADXfpj4AA+w8a3PbtrL9av0KTDq3sVM7keRHfKKkHUWWHN3KkirJTXKT DIciIYk1RfIQpB/nNP/97i4AEiQlO+09be+HaMayuAAW+8JidwHJOzw9OQiS 8CBxefTU+ebPeNUb9frz4+Nv6vXm8+bzI/x/dNRswH98NZv1RvOb+vOT48Yx vJqH0P/o8OT4G1b/U6gpvVKR2DFj31zxGzu+4sG2fuurZRymkeVb7l9B1l/1 evaEeUUTYAcEYSLijrfwHLZIAyfxwsD2veSOLcKY/Tx8x4Y8TWIvCJ/Waoyx Thjdxd5ylbBmvX7IejHnbBouEpApZ70wDVwbUeyzfuDoEQGMn6cJd9n8jlBm A6Z3IuFrwQaJKzvPVp5gC8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tby/+d42ECfpfw4GE0gfdAaRNwkG80jlkd5ghe0AlqgPdw0Yil7gih8 UJLxFQJKvLG+OWFpnk9ERQ3/saCSZ7ab05K06f1B9cJQfLWJM+MmmnEyCxpF Q6NoaBQNC4qG4Wt1CYCraXADXQfCeCP7mN3ta+3BFYkiKTdZXLEAmMLXISrU K+eCcF305eDkbHj6euCfnXv7O4vBr069g0NduKdKx2QRfx4iJpaSFe5UqWy+ kQ0gYSh9b7cqgsrvuG2AUY9F99L3NEhaZPv+5OzN4Mp721qI2u5Xhe5Uhu5W hu5Vhu5Xhh5Uhh5Whh5Vhj5e1k2aUGcDyvWftgTu7bZxriqfkX781ncj99zI vVLkvhu5X4o8cCMPSpGHbuRhKfLIjTwqRT52Ix+XIr90I78sRu5vO5H047cC ZIQzDf5hsBFq/4et/Ja6FmQzzv/cOh7Y/9Ev3v/tH2zv7xzu7WD/d7B91Oz/ PsfzL7X9e+LB7gyT6tDg6sFPebMFRfTL07PBldxgJKq/hC9I1O84EJ4mH+iN RWj9v4jSCc3CFc5pFIeJ57yK9IbIzaRFExF1fY3NoybHyT9pPn7ux53/7pj/ mXU8MP93d3Z3y/Lf0V4z/z/LU77/pXTk6zVCWSOUNULZXyWU0XJ3Shy3KJS5 gd4Oi0gX0ehnyEgxLtUF4rXSTIuTi9bWvldnvKyXVRNZi3SYVdowzuC7OEy/ BCBj1YHtVhnARcLM5rnQ3H/W5rl5mqd5mqd5mqd5mqd5mudv9vwXsfXevwCg AAA= ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/octet-stream; name="i386-nto-tdep.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="i386-nto-tdep.c" Content-length: 10784 /* i386-nto-tdep.c - i386 specific functionality for QNX Neutrino.=0A= =0A= Copyright 2003 Free Software Foundation, Inc.=0A= =0A= Contributed by QNX Software Systems Ltd.=0A= =0A= This file is part of GDB.=0A= =0A= This program is free software; you can redistribute it and/or modify=0A= it under the terms of the GNU General Public License as published by=0A= the Free Software Foundation; either version 2 of the License, or=0A= (at your option) any later version.=0A= =0A= This program is distributed in the hope that it will be useful,=0A= but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= GNU General Public License for more details.=0A= =0A= You should have received a copy of the GNU General Public License=0A= along with this program; if not, write to the Free Software=0A= Foundation, Inc., 59 Temple Place - Suite 330,=0A= Boston, MA 02111-1307, USA. */=0A= =0A= #include "gdb_string.h"=0A= #include "gdb_assert.h"=0A= #include "defs.h"=0A= #include "frame.h"=0A= #include "target.h"=0A= #include "regcache.h"=0A= #include "solib-svr4.h"=0A= #include "i386-tdep.h"=0A= #include "nto-tdep.h"=0A= #include "osabi.h"=0A= #include "nto-share/debug.h"=0A= #include "i387-tdep.h"=0A= =0A= #ifndef X86_CPU_FXSR=0A= #define X86_CPU_FXSR (1L << 12)=0A= #endif=0A= =0A= enum QNX_REGS=0A= {=0A= QNX_REGS_GP =3D 0,=0A= QNX_REGS_FP =3D 1,=0A= QNX_REGS_END =3D 2=0A= };=0A= =0A= /* Why 13? Look in our debug.h header at the x86_cpu_registers structure= =0A= and you'll see an 'exx' junk register that is just filler. Don't ask=0A= me, ask the kernel guys. */=0A= #define NUM_GPREGS 13=0A= =0A= /* Map a GDB register number to an offset in the reg structure. */=0A= static int regmap[] =3D {=0A= (7 * 4), /* %eax */=0A= (6 * 4), /* %ecx */=0A= (5 * 4), /* %edx */=0A= (4 * 4), /* %ebx */=0A= (11 * 4), /* %esp */=0A= (2 * 4), /* %epb */=0A= (1 * 4), /* %esi */=0A= (0 * 4), /* %edi */=0A= (8 * 4), /* %eip */=0A= (10 * 4), /* %eflags */=0A= (9 * 4), /* %cs */=0A= (12 * 4), /* %ss */=0A= (-1 * 4) /* filler */=0A= };=0A= =0A= /* Perform mapping of gdb registers onto Neutrino registers.=0A= Actually works in reverse too which is why we make sure to=0A= return -1 if we're out of range. */=0A= int=0A= gdb_to_os (int regno)=0A= {=0A= return (regno >=3D 0 && regno < NUM_GPREGS) ? regmap[regno] >> 2 : -1;=0A= }=0A= =0A= void=0A= nto_supply_gregset (char *gpregs)=0A= {=0A= unsigned regno;=0A= =0A= for (regno =3D 0; regno < NUM_GPREGS - 1; regno++)=0A= {=0A= supply_register (regno, gpregs + regmap[regno]);=0A= }=0A= }=0A= =0A= int=0A= nto_get_regset_id (int regno)=0A= {=0A= if (regno =3D=3D -1)=0A= return QNX_REGS_END;=0A= else if (regno < FP0_REGNUM)=0A= return QNX_REGS_GP;=0A= else if (regno < FPC_REGNUM)=0A= return QNX_REGS_FP;=0A= =0A= return -1; /* Error. */=0A= }=0A= =0A= void=0A= nto_cpu_supply_regset (int endian, int regset, void *data)=0A= {=0A= endian =3D endian; /* For i386, we don't care about endian. */=0A= =0A= switch (regset)=0A= {=0A= case QNX_REGS_GP: /* QNX has different ordering of GP regs than GDB. = */=0A= nto_supply_gregset (data);=0A= break;=0A= case QNX_REGS_FP:=0A= nto_supply_fpregset (data);=0A= break;=0A= }=0A= }=0A= =0A= unsigned=0A= nto_get_regset_area (unsigned regset, char *subcmd)=0A= {=0A= unsigned length =3D 0;=0A= switch (regset)=0A= {=0A= case QNX_REGS_GP:=0A= *subcmd =3D NTO_REG_GENERAL;=0A= length =3D NUM_GPREGS * sizeof (unsigned);=0A= break;=0A= case QNX_REGS_FP:=0A= *subcmd =3D NTO_REG_FLOAT;=0A= /* FIXME: Should we calculate based on fxsave/fsave? */=0A= length =3D 512;=0A= break;=0A= default:=0A= length =3D 0;=0A= }=0A= return length;=0A= }=0A= =0A= unsigned=0A= nto_cpu_register_area (unsigned first_regno, unsigned last_regno,=0A= unsigned char *subcmd, unsigned *off, unsigned *len)=0A= {=0A= int regno =3D -1;=0A= =0A= if (first_regno < FP0_REGNUM)=0A= {=0A= if (last_regno >=3D FP0_REGNUM)=0A= last_regno =3D FP0_REGNUM - 1;=0A= *subcmd =3D NTO_REG_GENERAL;=0A= regno =3D gdb_to_os (first_regno);=0A= *off =3D regno * sizeof (unsigned);=0A= if (regno =3D=3D -1)=0A= *len =3D 0;=0A= else=0A= *len =3D (last_regno - first_regno + 1) * sizeof (unsigned);=0A= }=0A= else if (first_regno =3D=3D FP_REGNUM)=0A= {=0A= /* Frame Pointer Psuedo-register. */=0A= *off =3D SP_REGNUM * sizeof (unsigned);=0A= *len =3D sizeof (unsigned);=0A= return FP_REGNUM;=0A= }=0A= else if (first_regno >=3D FP0_REGNUM && first_regno < FPC_REGNUM)=0A= {=0A= unsigned off_adjust, regsize;=0A= =0A= if (nto_cpuinfo_valid && nto_cpuinfo_flags | X86_CPU_FXSR)=0A= {=0A= off_adjust =3D 32;=0A= regsize =3D 16;=0A= }=0A= else=0A= {=0A= off_adjust =3D 28;=0A= regsize =3D 10;=0A= }=0A= =0A= if (last_regno >=3D FPC_REGNUM)=0A= last_regno =3D FPC_REGNUM - 1;=0A= *subcmd =3D NTO_REG_FLOAT;=0A= *off =3D (first_regno - FP0_REGNUM) * regsize + off_adjust;=0A= *len =3D (last_regno - first_regno + 1) * 10;=0A= /* Why 10? GDB only stores 10 bytes per FP register so if we're=0A= sending a register back to the target, we only want pdebug to writ= e=0A= 10 bytes so as not to clobber the reserved 6 bytes in the fxsave= =0A= structure. The astute reader will note that this will fail if we= =0A= try to send a range of fpregs rather than 1 at a time but, as far= =0A= as I know, there is no way to send more than one fpreg at a time= =0A= anyway. If this turns out to be wrong, we may need to put more co= de=0A= in pdebug to deal with this - perhaps by masking off part of the= =0A= register when it writes it in. Put assertion to this effect so=0A= that we'll catch it here rather than get mysterious failures. */= =0A= gdb_assert (last_regno =3D=3D first_regno);=0A= }=0A= else=0A= {=0A= *len =3D 0;=0A= return last_regno;=0A= }=0A= return last_regno;=0A= }=0A= =0A= int=0A= nto_cpu_register_store (int endian, unsigned first_regno,=0A= unsigned last_regno, void *data)=0A= {=0A= /* Mostly (always?) you're only storing one at a time. */=0A= if (first_regno =3D=3D last_regno)=0A= {=0A= regcache_collect (first_regno, data);=0A= return 1;=0A= }=0A= /* Floating point is the same for gdb and target. */=0A= if (first_regno >=3D FP0_REGNUM)=0A= {=0A= for (; first_regno <=3D last_regno; first_regno++)=0A= {=0A= regcache_collect (first_regno, data);=0A= (char *) data +=3D REGISTER_RAW_SIZE (first_regno);=0A= }=0A= return 1;=0A= }=0A= /* GP registers are mapped differently for NTO than GDB. */=0A= for (; first_regno <=3D last_regno; first_regno++)=0A= {=0A= int regnum =3D gdb_to_os (first_regno);=0A= if (regnum =3D=3D -1)=0A= continue;=0A= regcache_collect (first_regno,=0A= (char *) data + sizeof (unsigned) * regnum);=0A= }=0A= return 1;=0A= }=0A= =0A= void=0A= nto_supply_fpregset (char *fpregs)=0A= {=0A= if (nto_cpuinfo_valid && nto_cpuinfo_flags | X86_CPU_FXSR)=0A= i387_supply_fxsave (fpregs);=0A= else=0A= i387_supply_fsave (fpregs);=0A= }=0A= =0A= /* Fetch (and possibly build) an appropriate link_map_offsets=0A= structure for native x86 targets using the struct offsets=0A= defined in link.h (but without actual reference to that file).=0A= =0A= This makes it possible to access x86 shared libraries from a GDB=0A= that was not built on an x86 host (for cross debugging). */=0A= static struct link_map_offsets *=0A= i386_nto_svr4_fetch_link_map_offsets (void)=0A= {=0A= static struct link_map_offsets lmo;=0A= static struct link_map_offsets *lmp =3D NULL;=0A= =0A= if (lmp =3D=3D NULL)=0A= {=0A= lmp =3D &lmo;=0A= =0A= lmo.r_debug_size =3D 8; /* The actual size is 20 bytes, but=0A= only 8 bytes are used. */=0A= lmo.r_map_offset =3D 4;=0A= lmo.r_map_size =3D 4;=0A= =0A= lmo.link_map_size =3D 20; /* The actual size is 552 bytes, but=0A= only 20 bytes are used. */=0A= lmo.l_addr_offset =3D 0;=0A= lmo.l_addr_size =3D 4;=0A= =0A= lmo.l_name_offset =3D 4;=0A= lmo.l_name_size =3D 4;=0A= =0A= lmo.l_next_offset =3D 12;=0A= lmo.l_next_size =3D 4;=0A= =0A= lmo.l_prev_offset =3D 16;=0A= lmo.l_prev_size =3D 4;=0A= }=0A= =0A= return lmp;=0A= }=0A= =0A= struct link_map_offsets *=0A= nto_fetch_link_map_offsets (void)=0A= {=0A= return i386_nto_svr4_fetch_link_map_offsets ();=0A= }=0A= =0A= static int=0A= i386_nto_pc_in_sigtramp (CORE_ADDR pc, char *name)=0A= {=0A= return name && strcmp ("__signalstub", name) =3D=3D 0;=0A= }=0A= =0A= #define SIGCONTEXT_OFFSET 136=0A= static CORE_ADDR=0A= i386_nto_sigcontext_addr (struct frame_info *frame)=0A= {=0A= if (get_next_frame (frame))=0A= return get_frame_base (get_next_frame (frame)) + SIGCONTEXT_OFFSET;=0A= =0A= return read_register (SP_REGNUM) + SIGCONTEXT_OFFSET;=0A= }=0A= =0A= static void=0A= i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)=0A= {=0A= struct gdbarch_tdep *tdep =3D gdbarch_tdep (gdbarch);=0A= =0A= /* NTO uses ELF. */=0A= i386_elf_init_abi (info, gdbarch);=0A= =0A= /* Neutrino rewinds to look more normal. */=0A= set_gdbarch_decr_pc_after_break (gdbarch, 0);=0A= =0A= /* NTO has shared libraries. */=0A= set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);=0A= set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);= =0A= =0A= set_gdbarch_pc_in_sigtramp (gdbarch, i386_nto_pc_in_sigtramp);=0A= tdep->sigcontext_addr =3D i386_nto_sigcontext_addr;=0A= tdep->sc_pc_offset =3D 56;=0A= tdep->sc_sp_offset =3D 68;=0A= =0A= /* Setjmp()'s return PC saved in EDX (5). */=0A= tdep->jb_pc_offset =3D 20; /* 5x32 bit ints in. */=0A= =0A= set_solib_svr4_fetch_link_map_offsets (gdbarch,=0A= i386_nto_svr4_fetch_link_map_offsets);=0A= =0A= /* Our loader handles solib relocations slightly differently than svr4. = */=0A= TARGET_SO_RELOCATE_SECTION_ADDRESSES =3D nto_relocate_section_addresses;= =0A= =0A= /* Supply a nice function to find our solibs. */=0A= TARGET_SO_FIND_AND_OPEN_SOLIB =3D nto_find_and_open_solib;=0A= }=0A= =0A= void=0A= _initialize_i386nto_tdep (void)=0A= {=0A= gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_QNXNTO,=0A= i386nto_init_abi);=0A= }=0A= ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/octet-stream; name="nto-tdep.h" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="nto-tdep.h" Content-length: 3708 /* nto-tdep.h - QNX Neutrino target header.=0A= =0A= Copyright 2003 Free Software Foundation, Inc.=0A= =0A= Contributed by QNX Software Systems Ltd.=0A= =0A= This file is part of GDB.=0A= =0A= This program is free software; you can redistribute it and/or modify=0A= it under the terms of the GNU General Public License as published by=0A= the Free Software Foundation; either version 2 of the License, or=0A= (at your option) any later version.=0A= =0A= This program is distributed in the hope that it will be useful,=0A= but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= GNU General Public License for more details.=0A= =0A= You should have received a copy of the GNU General Public License=0A= along with this program; if not, write to the Free Software=0A= Foundation, Inc., 59 Temple Place - Suite 330,=0A= Boston, MA 02111-1307, USA. */=0A= =0A= #ifndef _NTO_TDEP_H=0A= #define _NTO_TDEP_H=0A= =0A= #include "defs.h"=0A= #include "nto-share/debug.h"=0A= #include "solist.h"=0A= =0A= /* Generic functions in nto-tdep.c. */=0A= =0A= extern void nto_init_solib_absolute_prefix PARAMS ((void));=0A= =0A= char **nto_parse_redirection=0A= PARAMS ((char *start_argv[], char **in, char **out, char **err));=0A= =0A= int proc_iterate_over_mappings PARAMS ((int (*func) (int, CORE_ADDR)));=0A= =0A= void nto_source_extra_gdbinit PARAMS ((char *));=0A= =0A= void nto_relocate_section_addresses=0A= PARAMS ((struct so_list *, struct section_table *));=0A= =0A= int nto_map_arch_to_cputype PARAMS ((const char *));=0A= =0A= int nto_find_and_open_solib PARAMS ((char *, unsigned, char **));=0A= =0A= /* Functions exported from all Neutrino targets (-nto-tdep.c). */= =0A= =0A= /* Given a register, return an id that represents the Neutrino=0A= regset it came from. If reg =3D=3D -1 update all regsets. */=0A= int nto_get_regset_id PARAMS ((int regno));=0A= =0A= /* Tell gdb about registers stored in data, based on regset. */=0A= void nto_cpu_supply_regset PARAMS ((int endian, int regset, void *data));= =0A= =0A= /* Get regset characteristics. Returns the length of the regset,=0A= or 0 if regset is unknown. */=0A= unsigned nto_get_regset_area PARAMS ((unsigned regset, char *subcmd));=0A= =0A= /* Given the first and last register number, figure out the size/len=0A= of the Neutrino register save area to ask for/tell about. Also set=0A= the register set that's being dealt with in *subcmd. Watch out for=0A= the range crossing a register set boundry. */=0A= unsigned nto_cpu_register_area=0A= PARAMS ((unsigned first_regno, unsigned last_regno, unsigned char *subcmd,= =0A= unsigned *off, unsigned *len));=0A= =0A= /* Build the Neutrino register set info into the 'data' buffer. */=0A= int nto_cpu_register_store=0A= PARAMS ((int endian, unsigned first_regno, unsigned last_regno, void *data)= );=0A= =0A= void nto_supply_gregset PARAMS ((char *regs));=0A= =0A= void nto_supply_fpregset PARAMS ((char *regs));=0A= =0A= /* Gives the fetch_link_map_offsets function exposure outside of=0A= solib-svr4.c so that we can override relocate_section_addresses(). */= =0A= struct link_map_offsets *nto_fetch_link_map_offsets PARAMS ((void));=0A= =0A= /* Globals. */=0A= =0A= /* For 'maintenance debug nto-debug' command. */=0A= extern int nto_internal_debugging;=0A= =0A= /* The CPUINFO flags from the remote. Currently used by=0A= i386 for fxsave but future proofing other hosts. */=0A= extern unsigned nto_cpuinfo_flags;=0A= =0A= /* True if successfully retrieved cpuinfo from remote. */=0A= extern int nto_cpuinfo_valid;=0A= =0A= #endif=0A= ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/octet-stream; name="nto-tdep.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="nto-tdep.c" Content-length: 10897 /* nto-tdep.c - general QNX Neutrino target functionality.=0A= =0A= Copyright 2003 Free Software Foundation, Inc.=0A= =0A= Contributed by QNX Software Systems Ltd.=0A= =0A= This file is part of GDB.=0A= =0A= This program is free software; you can redistribute it and/or modify=0A= it under the terms of the GNU General Public License as published by=0A= the Free Software Foundation; either version 2 of the License, or=0A= (at your option) any later version.=0A= =0A= This program is distributed in the hope that it will be useful,=0A= but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= GNU General Public License for more details.=0A= =0A= You should have received a copy of the GNU General Public License=0A= along with this program; if not, write to the Free Software=0A= Foundation, Inc., 59 Temple Place - Suite 330,=0A= Boston, MA 02111-1307, USA. */=0A= =0A= #include =0A= #include "gdb_string.h"=0A= #include "nto-tdep.h"=0A= #include "top.h"=0A= #include "cli/cli-decode.h"=0A= #include "cli/cli-cmds.h"=0A= #include "inferior.h"=0A= #include "gdbarch.h"=0A= #include "bfd.h"=0A= #include "elf-bfd.h"=0A= #include "solib-svr4.h"=0A= #include "gdbcore.h"=0A= =0A= #ifdef __CYGWIN__=0A= #include =0A= #endif=0A= =0A= #ifdef __CYGWIN__=0A= static char default_nto_target[] =3D "C:\\QNXsdk\\target\\qnx6";=0A= #elif defined(__sun__) || defined(linux)=0A= static char default_nto_target[] =3D "/opt/QNXsdk/target/qnx6";=0A= #else=0A= static char default_nto_target[] =3D "";=0A= #endif=0A= =0A= /* Maintenance debugging flag. */=0A= int nto_internal_debugging;=0A= =0A= /* Filled in cpu info structure and flag to indicate its validity.=20=0A= This is initialized in procfs_attach or nto_start_remote depending on=0A= our host/target. It would only be invalid if we were talking to an=0A= older pdebug which didn't support the cpuinfo message. */=0A= unsigned nto_cpuinfo_flags;=0A= int nto_cpuinfo_valid;=0A= =0A= static char *=0A= nto_target (void)=0A= {=0A= char *p =3D getenv ("QNX_TARGET");=0A= =0A= #ifdef __CYGWIN__=0A= static char buf[PATH_MAX];=0A= if (p)=0A= cygwin_conv_to_posix_path (p, buf);=0A= else=0A= cygwin_conv_to_posix_path (default_nto_target, buf);=0A= return buf;=0A= #else=0A= return p ? p : default_nto_target;=0A= #endif=0A= }=0A= =0A= /* Take a string such as i386, rs6000, etc. and map it onto CPUTYPE_X86,=0A= CPUTYPE_PPC, etc. as defined in nto-share/dsmsgs.h. */=0A= int=0A= nto_map_arch_to_cputype (const char *arch)=0A= {=0A= if (!strcmp (arch, "i386") || !strcmp (arch, "x86"))=0A= return CPUTYPE_X86;=0A= if (!strcmp (arch, "rs6000") || !strcmp (arch, "ppc"))=0A= return CPUTYPE_PPC;=0A= if (!strcmp (arch, "mips"))=0A= return CPUTYPE_MIPS;=0A= if (!strcmp (arch, "arm"))=0A= return CPUTYPE_ARM;=0A= if (!strcmp (arch, "sh"))=0A= return CPUTYPE_SH;=0A= return CPUTYPE_UNKNOWN;=0A= }=0A= =0A= int=0A= nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathnam= e)=0A= {=0A= char *buf, arch_path[PATH_MAX], *nto_root, *endian;=0A= const char *arch;=0A= char *path_fmt =3D "%s/lib:%s/usr/lib:%s/usr/photon/lib\=0A= :%s/usr/photon/dll:%s/lib/dll";=0A= =0A= nto_root =3D nto_target ();=0A= if (strcmp (TARGET_ARCHITECTURE->arch_name, "i386") =3D=3D 0)=0A= {=0A= arch =3D "x86";=0A= endian =3D "";=0A= }=0A= else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") =3D=3D 0)=0A= {=0A= arch =3D "ppc";=0A= endian =3D "be";=0A= }=0A= else=0A= {=0A= arch =3D TARGET_ARCHITECTURE->arch_name;=0A= endian =3D TARGET_BYTE_ORDER =3D=3D BFD_ENDIAN_BIG ? "be" : "le";=0A= }=0A= =0A= sprintf (arch_path, "%s/%s%s", nto_root, arch, endian);=0A= =0A= buf =3D alloca (strlen (path_fmt) + strlen (arch_path) * 5 + 1);=0A= sprintf (buf, path_fmt, arch_path, arch_path, arch_path, arch_path,=0A= arch_path);=0A= =0A= return openp (buf, 1, solib, o_flags, 0, temp_pathname);=0A= }=0A= =0A= void=0A= nto_init_solib_absolute_prefix (void)=0A= {=0A= char buf[PATH_MAX * 2], arch_path[PATH_MAX];=0A= char *nto_root, *endian;=0A= const char *arch;=0A= =0A= nto_root =3D nto_target ();=0A= if (strcmp (TARGET_ARCHITECTURE->arch_name, "i386") =3D=3D 0)=0A= {=0A= arch =3D "x86";=0A= endian =3D "";=0A= }=0A= else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") =3D=3D 0)=0A= {=0A= arch =3D "ppc";=0A= endian =3D "be";=0A= }=0A= else=0A= {=0A= arch =3D TARGET_ARCHITECTURE->arch_name;=0A= endian =3D TARGET_BYTE_ORDER =3D=3D BFD_ENDIAN_BIG ? "be" : "le";=0A= }=0A= =0A= sprintf (arch_path, "%s/%s%s", nto_root, arch, endian);=0A= =0A= sprintf (buf, "set solib-absolute-prefix %s", arch_path);=0A= execute_command (buf, 0);=0A= }=0A= =0A= char **=0A= nto_parse_redirection (char *pargv[], char **pin, char **pout, char **perr)= =0A= {=0A= char **argv;=0A= char *in, *out, *err, *p;=0A= int argc, i, n;=0A= =0A= for (n =3D 0; pargv[n]; n++);=0A= if (n =3D=3D 0)=0A= return NULL;=0A= in =3D "";=0A= out =3D "";=0A= err =3D "";=0A= =0A= argv =3D xcalloc (n + 1, sizeof argv[0]);=0A= argc =3D n;=0A= for (i =3D 0, n =3D 0; n < argc; n++)=0A= {=0A= p =3D pargv[n];=0A= if (*p =3D=3D '>')=0A= {=0A= p++;=0A= if (*p)=0A= out =3D p;=0A= else=0A= out =3D pargv[++n];=0A= }=0A= else if (*p =3D=3D '<')=0A= {=0A= p++;=0A= if (*p)=0A= in =3D p;=0A= else=0A= in =3D pargv[++n];=0A= }=0A= else if (*p++ =3D=3D '2' && *p++ =3D=3D '>')=0A= {=0A= if (*p =3D=3D '&' && *(p + 1) =3D=3D '1')=0A= err =3D out;=0A= else if (*p)=0A= err =3D p;=0A= else=0A= err =3D pargv[++n];=0A= }=0A= else=0A= argv[i++] =3D pargv[n];=0A= }=0A= *pin =3D in;=0A= *pout =3D out;=0A= *perr =3D err;=0A= return argv;=0A= }=0A= =0A= void=0A= nto_source_extra_gdbinit (char *file)=0A= {=0A= char *homedir, *homeinit;=0A= struct stat statbuf;=0A= =0A= homedir =3D getenv ("HOME");=0A= =0A= if (homedir && !inhibit_gdbinit)=0A= {=0A= homeinit =3D (char *) alloca (strlen (homedir) + strlen (file) + 10);= =0A= sprintf (homeinit, "%s/%s", homedir, file);=0A= if (stat (homeinit, &statbuf) =3D=3D 0)=0A= catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL);=0A= }=0A= }=0A= =0A= /* The struct lm_info, LM_ADDR, and nto_truncate_ptr are copied from=0A= solib-svr4.c to support nto_relocate_section_addresses=0A= which is different from the svr4 version. */=0A= =0A= struct lm_info=0A= {=0A= /* Pointer to copy of link map from inferior. The type is char *=0A= rather than void *, so that we may use byte offsets to find the=0A= various fields without the need for a cast. */=0A= char *lm;=0A= };=0A= =0A= static CORE_ADDR=0A= LM_ADDR (struct so_list *so)=0A= {=0A= struct link_map_offsets *lmo =3D nto_fetch_link_map_offsets ();=0A= =0A= return (CORE_ADDR) extract_signed_integer (so->lm_info->lm +=0A= lmo->l_addr_offset,=0A= lmo->l_addr_size);=0A= }=0A= =0A= static CORE_ADDR=0A= nto_truncate_ptr (CORE_ADDR addr)=0A= {=0A= if (TARGET_PTR_BIT =3D=3D sizeof (CORE_ADDR) * 8)=0A= /* We don't need to truncate anything, and the bit twiddling below=0A= will fail due to overflow problems. */=0A= return addr;=0A= else=0A= return addr & (((CORE_ADDR) 1 << TARGET_PTR_BIT) - 1);=0A= }=0A= =0A= Elf_Internal_Phdr *=0A= find_load_phdr (bfd *abfd)=0A= {=0A= Elf_Internal_Phdr *phdr;=0A= unsigned int i;=0A= =0A= if (!elf_tdata (abfd))=0A= return NULL;=0A= =0A= phdr =3D elf_tdata (abfd)->phdr;=0A= for (i =3D 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++)=0A= {=0A= if (phdr->p_type =3D=3D PT_LOAD && (phdr->p_flags & PF_X))=0A= return phdr;=0A= }=0A= return NULL;=0A= }=0A= =0A= void=0A= nto_relocate_section_addresses (struct so_list *so, struct section_table *s= ec)=0A= {=0A= /* Neutrino treats the l_addr base address field in link.h as different t= han=0A= the base address in the System V ABI and so the offset needs to be=0A= calculated and applied to relocations. */=0A= Elf_Internal_Phdr *phdr =3D find_load_phdr (sec->bfd);=0A= unsigned vaddr =3D phdr ? phdr->p_vaddr : 0;=0A= =0A= sec->addr =3D nto_truncate_ptr (sec->addr + LM_ADDR (so) - vaddr);=0A= sec->endaddr =3D nto_truncate_ptr (sec->endaddr + LM_ADDR (so) - vaddr);= =0A= }=0A= =0A= static void=0A= fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,=0A= int which, CORE_ADDR reg_addr)=0A= {=0A= nto_gregset_t gregset;=0A= nto_fpregset_t fpregset;=0A= =0A= nto_init_solib_absolute_prefix ();=0A= =0A= if (which =3D=3D 0)=0A= {=0A= memcpy ((char *) &gregset, core_reg_sect,=0A= min (core_reg_size, sizeof (gregset)));=0A= nto_supply_gregset ((char *) &gregset);=0A= }=0A= else if (which =3D=3D 2)=0A= {=0A= memcpy ((char *) &fpregset, core_reg_sect,=0A= min (core_reg_size, sizeof (fpregset)));=0A= nto_supply_fpregset ((char *) &fpregset);=0A= }=0A= }=0A= =0A= /* Register that we are able to handle ELF file formats using standard=0A= procfs "regset" structures. */=0A= =0A= static struct core_fns regset_core_fns =3D {=0A= bfd_target_elf_flavour, /* core_flavour */=0A= default_check_format, /* check_format */=0A= default_core_sniffer, /* core_sniffer */=0A= fetch_core_registers, /* core_read_registers */=0A= NULL /* next */=0A= };=0A= =0A= void=0A= _initialize_nto_tdep ()=0A= {=0A= add_show_from_set (add_set_cmd ("nto-debug", class_maintenance, var_zinte= ger, (char *) &nto_internal_debugging, "Set QNX NTO internal debugging.\n\= =0A= When non-zero, nto specific debug info is\n\=0A= displayed. Different information is displayed\n\=0A= for different positive values.", &setdebuglist),=0A= &showdebuglist);=0A= =0A= /* We use SIG45 for pulses, or something, so nostop, noprint=0A= and pass them. */=0A= signal_stop_update (target_signal_from_name ("SIG45"), 0);=0A= signal_print_update (target_signal_from_name ("SIG45"), 0);=0A= signal_pass_update (target_signal_from_name ("SIG45"), 1);=0A= =0A= /* By default we don't want to stop on these two, but we do want to pass.= */=0A= #if defined(SIGSELECT)=0A= signal_stop_update (SIGSELECT, 0);=0A= signal_print_update (SIGSELECT, 0);=0A= signal_pass_update (SIGSELECT, 1);=0A= #endif=0A= =0A= #if defined(SIGPHOTON)=0A= signal_stop_update (SIGPHOTON, 0);=0A= signal_print_update (SIGPHOTON, 0);=0A= signal_pass_update (SIGPHOTON, 1);=0A= #endif=0A= =0A= /* Register core file support. */=0A= add_core_fns (®set_core_fns);=0A= }=0A= ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/octet-stream; name="debug.h" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="debug.h" Content-length: 8734 /* QNX Neutrino debug interface.=0A= =0A= Copyright 2003 Free Software Foundation, Inc.=0A= =0A= Contributed by QNX Software Systems Ltd.=0A= =0A= This file is part of GDB.=0A= =0A= This program is free software; you can redistribute it and/or modify=0A= it under the terms of the GNU General Public License as published by=0A= the Free Software Foundation; either version 2 of the License, or=0A= (at your option) any later version.=0A= =0A= This program is distributed in the hope that it will be useful,=0A= but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= GNU General Public License for more details.=0A= =0A= You should have received a copy of the GNU General Public License=0A= along with this program; if not, write to the Free Software=0A= Foundation, Inc., 59 Temple Place - Suite 330,=0A= Boston, MA 02111-1307, USA. */=0A= =0A= #ifndef _DEBUG_H=0A= #define _DEBUG_H=0A= =0A= /* __DEBUG_H_INCLUDED is Neutrino's native debug.h header. We don't want= =0A= these duplicate definitions if we're compiling natively and have already= =0A= included it. */=0A= #ifndef __DEBUG_H_INCLUDED=0A= #define __DEBUG_H_INCLUDED=0A= =0A= #define QNX_NOTE_NAME "QNX"=0A= =0A= typedef char qnx_reg64[8];=0A= =0A= enum Elf_nto_note_types=0A= {=0A= QNT_NULL =3D 0,=0A= QNT_DEBUG_FULLPATH,=0A= QNT_DEBUG_RELOC,=0A= QNT_STACK,=0A= QNT_GENERATOR,=0A= QNT_DEFAULT_LIB,=0A= QNT_CORE_SYSINFO,=0A= QNT_CORE_INFO,=0A= QNT_CORE_STATUS,=0A= QNT_CORE_GREG,=0A= QNT_CORE_FPREG,=0A= QNT_NUM=0A= };=0A= =0A= typedef struct=0A= {=0A= long bits[2];=0A= } nto_sigset_t;=0A= =0A= union nto_sigval=0A= {=0A= int sival_int;=0A= void *sival_ptr;=0A= };=0A= =0A= typedef struct nto_siginfo=0A= {=0A= int si_signo;=0A= int si_code;=0A= void (*si_handler) ();=0A= union=0A= {=0A= int _pad[6];=0A= struct=0A= {=0A= pid_t _pid;=0A= union=0A= {=0A= struct=0A= {=0A= union nto_sigval _value;=0A= uid_t _uid;=0A= } _kill;=0A= struct=0A= {=0A= int _status;=0A= clock_t _utime;=0A= clock_t _stime;=0A= } _chld;=0A= } _pdata;=0A= } _proc;=0A= struct=0A= {=0A= int _fltno;=0A= void *_addr;=0A= void *_fltip;=0A= } _fault;=0A= } _data;=0A= } nto_siginfo_t;=0A= =0A= typedef struct x86_cpu_registers=0A= {=0A= #ifdef __SEGMENTS__=0A= unsigned gs, fs;=0A= unsigned es, ds;=0A= #endif=0A= unsigned edi, esi, ebp, exx, ebx, edx, ecx, eax;=0A= unsigned eip, cs, efl;=0A= unsigned esp, ss;=0A= } X86_CPU_REGISTERS;=0A= =0A= typedef struct fsave_area=0A= {=0A= unsigned fpu_control_word;=0A= unsigned fpu_status_word;=0A= unsigned fpu_tag_word;=0A= unsigned fpu_ip;=0A= unsigned fpu_cs;=0A= unsigned fpu_op;=0A= unsigned fpu_ds;=0A= unsigned char st_regs[80]; /* Each register is 10 bytes. */=0A= } X86_FSAVE_REGISTERS;=0A= =0A= typedef struct fxsave_area=0A= {=0A= unsigned short fpu_control_word;=0A= unsigned short fpu_status_word;=0A= unsigned short fpu_tag_word;=0A= unsigned short fpu_operand;=0A= unsigned fpu_ip;=0A= unsigned fpu_cs;=0A= unsigned fpu_op;=0A= unsigned fpu_ds;=0A= unsigned mxcsr;=0A= unsigned reserved;=0A= unsigned char st_regs[128];=0A= unsigned char xmm_regs[128];=0A= unsigned char reserved2[224];=0A= } X86_FXSAVE_REGISTERS;=0A= =0A= typedef union x86_fpu_registers=0A= {=0A= X86_FSAVE_REGISTERS fsave_area;=0A= X86_FXSAVE_REGISTERS fxsave_area;=0A= unsigned char data[512]; /* Needs to be this big for the emulator. */=0A= } X86_FPU_REGISTERS;=0A= =0A= #ifdef __QNX__=0A= __BEGIN_DECLS=0A= #include <_pack64.h>=0A= #endif=0A= #define _DEBUG_FLAG_STOPPED 0x00000001 /* Thread is not running. */=0A= #define DEBUG_FLAG_ISTOP 0x00000002 /* Stopped at point of interest. */= =0A= #define _DEBUG_FLAG_IPINVAL 0x00000010 /* IP is not valid. */=0A= #define _DEBUG_FLAG_ISSYS 0x00000020 /* System process. */=0A= #define _DEBUG_FLAG_SSTEP 0x00000040 /* Stopped because of single step. = */=0A= #define _DEBUG_FLAG_CURTID 0x00000080 /* Thread is current thread. */=0A= #define DEBUG_FLAG_TRACE_EXEC 0x00000100 /* Stopped because of breakpoint.= */=0A= #define _DEBUG_FLAG_TRACE_RD 0x00000200 /* Stopped because of read access.= */=0A= #define _DEBUG_FLAG_TRACE_WR 0x00000400 /* Stopped because of write access= . */=0A= #define _DEBUG_FLAG_TRACE_MODIFY 0x00000800 /* Stopped because of modified = memory. */=0A= #define _DEBUG_FLAG_RLC 0x00010000 /* Run-on-Last-Close flag is set. */= =0A= #define _DEBUG_FLAG_KLC 0x00020000 /* Kill-on-Last-Close flag is set. *= /=0A= #define _DEBUG_FLAG_FORK 0x00040000 /* Child inherits flags (Stop on fork= /spawn). */=0A= #define _DEBUG_FLAG_MASK 0x000f0000 /* Flags that can be changed. */=0A= enum=0A= {=0A= _DEBUG_WHY_REQUESTED,=0A= _DEBUG_WHY_SIGNALLED,=0A= _DEBUG_WHY_FAULTED,=0A= _DEBUG_WHY_JOBCONTROL,=0A= _DEBUG_WHY_TERMINATED,=0A= _DEBUG_WHY_CHILD,=0A= _DEBUG_WHY_EXEC=0A= };=0A= =0A= #define _DEBUG_RUN_CLRSIG 0x00000001 /* Clear pending signal */=0A= #define _DEBUG_RUN_CLRFLT 0x00000002 /* Clear pending fault */=0A= #define DEBUG_RUN_TRACE 0x00000004 /* Trace mask flags interesting signal= s */=0A= #define DEBUG_RUN_HOLD 0x00000008 /* Hold mask flags interesting signals= */=0A= #define DEBUG_RUN_FAULT 0x00000010 /* Fault mask flags interesting faults= */=0A= #define _DEBUG_RUN_VADDR 0x00000020 /* Change ip before running */=0A= #define _DEBUG_RUN_STEP 0x00000040 /* Single step only one thread */=0A= #define _DEBUG_RUN_STEP_ALL 0x00000080 /* Single step one thread, other t= hreads run */=0A= #define _DEBUG_RUN_CURTID 0x00000100 /* Change current thread (target thr= ead) */=0A= #define DEBUG_RUN_ARM 0x00000200 /* Deliver event at point of interest *= /=0A= =0A= typedef struct _debug_process_info=0A= {=0A= pid_t pid;=0A= pid_t parent;=0A= unsigned flags;=0A= unsigned umask;=0A= pid_t child;=0A= pid_t sibling;=0A= pid_t pgrp;=0A= pid_t sid;=0A= int base_address;=0A= int initial_stack;=0A= uid_t uid;=0A= gid_t gid;=0A= uid_t euid;=0A= gid_t egid;=0A= uid_t suid;=0A= gid_t sgid;=0A= nto_sigset_t sig_ignore;=0A= nto_sigset_t sig_queue;=0A= nto_sigset_t sig_pending;=0A= unsigned num_chancons;=0A= unsigned num_fdcons;=0A= unsigned num_threads;=0A= unsigned num_timers;=0A= qnx_reg64 reserved[20];=0A= } nto_procfs_info;=0A= =0A= typedef struct _debug_thread_info=0A= {=0A= pid_t pid;=0A= unsigned tid;=0A= unsigned flags;=0A= unsigned short why;=0A= unsigned short what;=0A= int ip;=0A= int sp;=0A= int stkbase;=0A= int tls;=0A= unsigned stksize;=0A= unsigned tid_flags;=0A= unsigned char priority;=0A= unsigned char real_priority;=0A= unsigned char policy;=0A= unsigned char state;=0A= short syscall;=0A= unsigned short last_cpu;=0A= unsigned timeout;=0A= int last_chid;=0A= nto_sigset_t sig_blocked;=0A= nto_sigset_t sig_pending;=0A= nto_siginfo_t info;=0A= unsigned reserved1;=0A= union=0A= {=0A= struct=0A= {=0A= unsigned tid;=0A= } join;=0A= struct=0A= {=0A= int id;=0A= int sync;=0A= } sync;=0A= struct=0A= {=0A= unsigned nid;=0A= pid_t pid;=0A= int coid;=0A= int chid;=0A= int scoid;=0A= } connect;=0A= struct=0A= {=0A= int chid;=0A= } channel;=0A= struct=0A= {=0A= pid_t pid;=0A= int vaddr;=0A= unsigned flags;=0A= } waitpage;=0A= struct=0A= {=0A= unsigned size;=0A= } stack;=0A= qnx_reg64 filler[4];=0A= } blocked;=0A= qnx_reg64 reserved2[8];=0A= } nto_procfs_status;=0A= =0A= typedef union _debug_gregs=0A= {=0A= X86_CPU_REGISTERS x86;=0A= qnx_reg64 padding[1024];=0A= } nto_gregset_t;=0A= =0A= typedef union _debug_fpregs=0A= {=0A= X86_FPU_REGISTERS x86;=0A= qnx_reg64 padding[1024];=0A= } nto_fpregset_t;=0A= =0A= typedef union _debug_altregs=0A= {=0A= qnx_reg64 padding[1024];=0A= } debug_altreg_t;=0A= =0A= /* Keep this consistant with neutrino syspage.h. */=0A= enum=0A= {=0A= CPUTYPE_X86,=0A= CPUTYPE_PPC,=0A= CPUTYPE_MIPS,=0A= CPUTYPE_SPARE,=0A= CPUTYPE_ARM,=0A= CPUTYPE_SH,=0A= CPUTYPE_UNKNOWN=0A= };=0A= =0A= enum=0A= {=0A= OSTYPE_QNX4,=0A= OSTYPE_NTO=0A= };=0A= =0A= #ifdef __QNX__=0A= #include <_packpop.h>=0A= =0A= __END_DECLS=0A= #endif=0A= #endif /* __DEBUG_H_INCLUDED */=0A= /* These correspond to the DSMSG_* versions in dsmsgs.h. */=0A= enum=0A= {=0A= NTO_REG_GENERAL,=0A= NTO_REG_FLOAT,=0A= NTO_REG_SYSTEM,=0A= NTO_REG_ALT=0A= };=0A= =0A= #endif /* _DEBUG_H */=0A= ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/octet-stream; name="tm-qnxnto.h" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tm-qnxnto.h" Content-length: 2059 /* Target machine sub-description for QNX Neutrino version 6.=0A= This is included by other tm-*.h files to specify nto specific=0A= stuff.=20=0A= =0A= Copyright 2003 Free Software Foundation, Inc.=0A= =0A= This code was donated by QNX Software Systems Ltd.=0A= =0A= This file is part of GDB.=0A= =0A= This program is free software; you can redistribute it and/or modify=0A= it under the terms of the GNU General Public License as published by=0A= the Free Software Foundation; either version 2 of the License, or=0A= (at your option) any later version.=0A= =0A= This program is distributed in the hope that it will be useful,=0A= but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= GNU General Public License for more details.=0A= =0A= You should have received a copy of the GNU General Public License=0A= along with this program; if not, write to the Free Software=0A= Foundation, Inc., 59 Temple Place - Suite 330,=0A= Boston, MA 02111-1307, USA. */=0A= =0A= #ifndef _TM_QNXNTO_H=0A= #define _TM_QNXNTO_H=0A= =0A= #include "tm-sysv4.h"=0A= =0A= /* Setup the valid realtime signal range. */=0A= #define REALTIME_LO 41=0A= #define REALTIME_HI 56=0A= =0A= /* Set up the undefined useable signals. */=0A= #define RAW_SIGNAL_LO 32=0A= #define RAW_SIGNAL_HI (REALTIME_LO - 1)=0A= =0A= #define TARGET_SIGNAL_RAW_VALUES \=0A= TARGET_SIGNAL_RAW0, \=0A= TARGET_SIGNAL_RAW1, \=0A= TARGET_SIGNAL_RAW2, \=0A= TARGET_SIGNAL_RAW3, \=0A= TARGET_SIGNAL_RAW4, \=0A= TARGET_SIGNAL_RAW5, \=0A= TARGET_SIGNAL_RAW6, \=0A= TARGET_SIGNAL_RAW7, \=0A= TARGET_SIGNAL_RAW8=0A= =0A= #define TARGET_SIGNAL_RAW_TABLE \=0A= {"SIGNAL32", "Signal 32"}, \=0A= {"SIGNAL33", "Signal 33"}, \=0A= {"SIGNAL34", "Signal 34"}, \=0A= {"SIGNAL35", "Signal 35"}, \=0A= {"SIGNAL36", "Signal 36"}, \=0A= {"SIGNAL37", "Signal 37"}, \=0A= {"SIGNAL38", "Signal 38"}, \=0A= {"SIGNAL39", "Signal 39"}, \=0A= {"SIGNAL40", "Signal 40"}=0A= =0A= #endif /* _TM_QNXNTO_H */=0A= ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/octet-stream; name="tm-i386nto.h" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tm-i386nto.h" Content-length: 1242 /* QNX Neutrino target header.=0A= =20=0A= Copyright 2003 Free Software Foundation, Inc.=0A= =0A= This code was donated by QNX Software Systems Ltd.=0A= =0A= This file is part of GDB.=0A= =0A= This program is free software; you can redistribute it and/or modify=0A= it under the terms of the GNU General Public License as published by=0A= the Free Software Foundation; either version 2 of the License, or=0A= (at your option) any later version.=0A= =0A= This program is distributed in the hope that it will be useful,=0A= but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= GNU General Public License for more details.=0A= =0A= You should have received a copy of the GNU General Public License=0A= along with this program; if not, write to the Free Software=0A= Foundation, Inc., 59 Temple Place - Suite 330,=0A= Boston, MA 02111-1307, USA. */=0A= =0A= #ifndef TM_I386NTO_H=0A= #define TM_I386NTO_H 1=0A= =0A= /* Pick up most of what we need from the generic i386 target include file. = */=0A= #include "i386/tm-i386.h"=0A= #include "tm-qnxnto.h"=0A= =0A= #include "solib.h"=0A= =0A= #endif /* TM_I386NTO_H */=0A= ------=_NextPart_000_0B29_01C309A7.649216F0 Content-Type: application/octet-stream; name="i386nto.mt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="i386nto.mt" Content-length: 185 # Target: Intel 386 running qnx6.=0A= TDEPFILES=3D i386-tdep.o i387-tdep.o corelow.o solib.o solib-svr4.o \=0A= i386-nto-tdep.o nto-tdep.o remote-nto.o=0A= TM_FILE=3D tm-i386nto.h=0A= ------=_NextPart_000_0B29_01C309A7.649216F0--