OLD | NEW |
1 /* Target-dependent code for QNX Neutrino x86. | 1 /* Target-dependent code for QNX Neutrino x86. |
2 | 2 |
3 Copyright (C) 2003-2004, 2007-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2003-2004, 2007-2012 Free Software Foundation, Inc. |
4 | 4 |
5 Contributed by QNX Software Systems Ltd. | 5 Contributed by QNX Software Systems Ltd. |
6 | 6 |
7 This file is part of GDB. | 7 This file is part of GDB. |
8 | 8 |
9 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
10 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 return NTO_REG_FLOAT; /* We store xmm registers in fxsave_area. */ | 127 return NTO_REG_FLOAT; /* We store xmm registers in fxsave_area. */ |
128 | 128 |
129 return -1; /* Error. */ | 129 return -1; /* Error. */ |
130 } | 130 } |
131 | 131 |
132 static int | 132 static int |
133 i386nto_register_area (struct gdbarch *gdbarch, | 133 i386nto_register_area (struct gdbarch *gdbarch, |
134 int regno, int regset, unsigned *off) | 134 int regno, int regset, unsigned *off) |
135 { | 135 { |
136 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | 136 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); |
137 int len; | |
138 | 137 |
139 *off = 0; | 138 *off = 0; |
140 if (regset == NTO_REG_GENERAL) | 139 if (regset == NTO_REG_GENERAL) |
141 { | 140 { |
142 if (regno == -1) | 141 if (regno == -1) |
143 return NUM_GPREGS * 4; | 142 return NUM_GPREGS * 4; |
144 | 143 |
145 *off = nto_reg_offset (regno); | 144 *off = nto_reg_offset (regno); |
146 if (*off == -1) | 145 if (*off == -1) |
147 return 0; | 146 return 0; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 return 0; | 273 return 0; |
275 } | 274 } |
276 | 275 |
277 /* Return whether THIS_FRAME corresponds to a QNX Neutrino sigtramp | 276 /* Return whether THIS_FRAME corresponds to a QNX Neutrino sigtramp |
278 routine. */ | 277 routine. */ |
279 | 278 |
280 static int | 279 static int |
281 i386nto_sigtramp_p (struct frame_info *this_frame) | 280 i386nto_sigtramp_p (struct frame_info *this_frame) |
282 { | 281 { |
283 CORE_ADDR pc = get_frame_pc (this_frame); | 282 CORE_ADDR pc = get_frame_pc (this_frame); |
284 char *name; | 283 const char *name; |
285 | 284 |
286 find_pc_partial_function (pc, &name, NULL, NULL); | 285 find_pc_partial_function (pc, &name, NULL, NULL); |
287 return name && strcmp ("__signalstub", name) == 0; | 286 return name && strcmp ("__signalstub", name) == 0; |
288 } | 287 } |
289 | 288 |
290 /* Assuming THIS_FRAME is a QNX Neutrino sigtramp routine, return the | 289 /* Assuming THIS_FRAME is a QNX Neutrino sigtramp routine, return the |
291 address of the associated sigcontext structure. */ | 290 address of the associated sigcontext structure. */ |
292 | 291 |
293 static CORE_ADDR | 292 static CORE_ADDR |
294 i386nto_sigcontext_addr (struct frame_info *this_frame) | 293 i386nto_sigcontext_addr (struct frame_info *this_frame) |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 376 |
378 void | 377 void |
379 _initialize_i386nto_tdep (void) | 378 _initialize_i386nto_tdep (void) |
380 { | 379 { |
381 init_i386nto_ops (); | 380 init_i386nto_ops (); |
382 gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_QNXNTO, | 381 gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_QNXNTO, |
383 i386nto_init_abi); | 382 i386nto_init_abi); |
384 gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour, | 383 gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour, |
385 nto_elf_osabi_sniffer); | 384 nto_elf_osabi_sniffer); |
386 } | 385 } |
OLD | NEW |