| OLD | NEW |
| 1 /* Darwin support for GDB, the GNU debugger. | 1 /* Darwin support for GDB, the GNU debugger. |
| 2 Copyright 1997-2002, 2005, 2008-2012 Free Software Foundation, Inc. | 2 Copyright 1997-2002, 2005, 2008-2012 Free Software Foundation, Inc. |
| 3 | 3 |
| 4 Contributed by Apple Computer, Inc. | 4 Contributed by Apple Computer, Inc. |
| 5 | 5 |
| 6 This file is part of GDB. | 6 This file is part of GDB. |
| 7 | 7 |
| 8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
| 9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
| 10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 2 * 4, /* ECX */ | 49 2 * 4, /* ECX */ |
| 50 3 * 4, /* EDX */ | 50 3 * 4, /* EDX */ |
| 51 1 * 4, /* EBX */ | 51 1 * 4, /* EBX */ |
| 52 7 * 4, /* ESP */ | 52 7 * 4, /* ESP */ |
| 53 6 * 4, /* EBP */ | 53 6 * 4, /* EBP */ |
| 54 5 * 4, /* ESI */ | 54 5 * 4, /* ESI */ |
| 55 4 * 4, /* EDI */ | 55 4 * 4, /* EDI */ |
| 56 10 * 4, /* EIP */ | 56 10 * 4, /* EIP */ |
| 57 9 * 4, /* EFLAGS */ | 57 9 * 4, /* EFLAGS */ |
| 58 11 * 4, /* CS */ | 58 11 * 4, /* CS */ |
| 59 8, /* SS */ | 59 8 * 4, /* SS */ |
| 60 12 * 4, /* DS */ | 60 12 * 4, /* DS */ |
| 61 13 * 4, /* ES */ | 61 13 * 4, /* ES */ |
| 62 14 * 4, /* FS */ | 62 14 * 4, /* FS */ |
| 63 15 * 4 /* GS */ | 63 15 * 4 /* GS */ |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 const int i386_darwin_thread_state_num_regs = | 66 const int i386_darwin_thread_state_num_regs = |
| 67 ARRAY_SIZE (i386_darwin_thread_state_reg_offset); | 67 ARRAY_SIZE (i386_darwin_thread_state_reg_offset); |
| 68 | 68 |
| 69 /* Assuming THIS_FRAME is a Darwin sigtramp routine, return the | 69 /* Assuming THIS_FRAME is a Darwin sigtramp routine, return the |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 { | 280 { |
| 281 if (!bfd_check_format (abfd, bfd_object)) | 281 if (!bfd_check_format (abfd, bfd_object)) |
| 282 return GDB_OSABI_UNKNOWN; | 282 return GDB_OSABI_UNKNOWN; |
| 283 | 283 |
| 284 if (bfd_get_arch (abfd) == bfd_arch_i386) | 284 if (bfd_get_arch (abfd) == bfd_arch_i386) |
| 285 return GDB_OSABI_DARWIN; | 285 return GDB_OSABI_DARWIN; |
| 286 | 286 |
| 287 return GDB_OSABI_UNKNOWN; | 287 return GDB_OSABI_UNKNOWN; |
| 288 } | 288 } |
| 289 | 289 |
| 290 /* -Wmissing-prototypes */ |
| 291 extern initialize_file_ftype _initialize_i386_darwin_tdep; |
| 292 |
| 290 void | 293 void |
| 291 _initialize_i386_darwin_tdep (void) | 294 _initialize_i386_darwin_tdep (void) |
| 292 { | 295 { |
| 293 gdbarch_register_osabi_sniffer (bfd_arch_unknown, bfd_target_mach_o_flavour, | 296 gdbarch_register_osabi_sniffer (bfd_arch_unknown, bfd_target_mach_o_flavour, |
| 294 i386_mach_o_osabi_sniffer); | 297 i386_mach_o_osabi_sniffer); |
| 295 | 298 |
| 296 gdbarch_register_osabi (bfd_arch_i386, bfd_mach_i386_i386, | 299 gdbarch_register_osabi (bfd_arch_i386, bfd_mach_i386_i386, |
| 297 GDB_OSABI_DARWIN, i386_darwin_init_abi); | 300 GDB_OSABI_DARWIN, i386_darwin_init_abi); |
| 298 } | 301 } |
| OLD | NEW |