OLD | NEW |
1 /* Target-dependent code for NaCl. | 1 /* Target-dependent code for NaCl. |
2 | 2 |
3 Copyright (C) 2001, 2003-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2001, 2003-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 set_gdbarch_process_record (gdbarch, i386_process_record); | 62 set_gdbarch_process_record (gdbarch, i386_process_record); |
63 set_gdbarch_call_dummy_location(gdbarch, AT_ENTRY_POINT); | 63 set_gdbarch_call_dummy_location(gdbarch, AT_ENTRY_POINT); |
64 } | 64 } |
65 | 65 |
66 static void | 66 static void |
67 i386_nacl_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) | 67 i386_nacl_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) |
68 { | 68 { |
69 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | 69 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); |
70 linux_init_abi (info, gdbarch); | 70 linux_init_abi (info, gdbarch); |
71 i386_elf_init_abi (info, gdbarch); | 71 i386_elf_init_abi (info, gdbarch); |
| 72 i386_linux_init_gregset (tdep); |
72 tdep->tdesc = tdesc_i386_linux; | 73 tdep->tdesc = tdesc_i386_linux; |
73 set_solib_svr4_fetch_link_map_offsets (gdbarch, | 74 set_solib_svr4_fetch_link_map_offsets (gdbarch, |
74 svr4_ilp32_fetch_link_map_offsets); | 75 svr4_ilp32_fetch_link_map_offsets); |
75 nacl_init_abi (info, gdbarch); | 76 nacl_init_abi (info, gdbarch); |
76 } | 77 } |
77 | 78 |
78 static CORE_ADDR | 79 static CORE_ADDR |
79 amd64_nacl_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val) | 80 amd64_nacl_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val) |
80 { | 81 { |
81 return val & 0xffffffffUL; | 82 return val & 0xffffffffUL; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 return frame_id_build (fp, get_frame_pc (this_frame)); | 184 return frame_id_build (fp, get_frame_pc (this_frame)); |
184 } | 185 } |
185 | 186 |
186 static void | 187 static void |
187 amd64_nacl_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) | 188 amd64_nacl_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) |
188 { | 189 { |
189 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | 190 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); |
190 | 191 |
191 linux_init_abi (info, gdbarch); | 192 linux_init_abi (info, gdbarch); |
192 amd64_init_abi (info, gdbarch); | 193 amd64_init_abi (info, gdbarch); |
| 194 amd64_linux_init_gregset (tdep); |
193 tdep->tdesc = tdesc_amd64_linux; | 195 tdep->tdesc = tdesc_amd64_linux; |
194 set_solib_svr4_fetch_link_map_offsets (gdbarch, | 196 set_solib_svr4_fetch_link_map_offsets (gdbarch, |
195 amd64_nacl_fetch_link_map_offsets); | 197 amd64_nacl_fetch_link_map_offsets); |
196 nacl_init_abi (info, gdbarch); | 198 nacl_init_abi (info, gdbarch); |
197 | 199 |
198 /* NaCl data model. | 200 /* NaCl data model. |
199 | 201 |
200 WARNING! This might confuse a lot of code, as it uses | 202 WARNING! This might confuse a lot of code, as it uses |
201 if (set_gdbarch_ptr_bit (gdbarch) == <bits>) | 203 if (set_gdbarch_ptr_bit (gdbarch) == <bits>) |
202 to distinguish between i386 and x86_64 (lame!). Luckily, most of that | 204 to distinguish between i386 and x86_64 (lame!). Luckily, most of that |
(...skipping 29 matching lines...) Expand all Loading... |
232 { | 234 { |
233 gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour, | 235 gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour, |
234 nacl_osabi_sniffer); | 236 nacl_osabi_sniffer); |
235 | 237 |
236 gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, | 238 gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, |
237 GDB_OSABI_NACL, amd64_nacl_init_abi); | 239 GDB_OSABI_NACL, amd64_nacl_init_abi); |
238 | 240 |
239 gdbarch_register_osabi (bfd_arch_i386, 0, | 241 gdbarch_register_osabi (bfd_arch_i386, 0, |
240 GDB_OSABI_NACL, i386_nacl_init_abi); | 242 GDB_OSABI_NACL, i386_nacl_init_abi); |
241 } | 243 } |
OLD | NEW |