OLD | NEW |
1 /* GNU/Linux/IA64 specific low level interface, for the remote server for GDB. | 1 /* GNU/Linux/IA64 specific low level interface, for the remote server for GDB. |
2 Copyright (C) 1995-1996, 1998-2002, 2007-2012 Free Software | 2 Copyright (C) 1995-1996, 1998-2002, 2007-2012 Free Software |
3 Foundation, Inc. | 3 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 -1, -1, -1, | 249 -1, -1, -1, |
250 PT_AR_UNAT, | 250 PT_AR_UNAT, |
251 -1, -1, -1, | 251 -1, -1, -1, |
252 PT_AR_FPSR, | 252 PT_AR_FPSR, |
253 -1, -1, -1, | 253 -1, -1, -1, |
254 -1, /* Not available: ITC */ | 254 -1, /* Not available: ITC */ |
255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | 255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
256 -1, -1, -1, -1, -1, -1, -1, -1, -1, | 256 -1, -1, -1, -1, -1, -1, -1, -1, -1, |
257 PT_AR_PFS, | 257 PT_AR_PFS, |
258 PT_AR_LC, | 258 PT_AR_LC, |
259 -1,»» /* Not available: EC, the Epilog Count register */ | 259 PT_AR_EC, |
260 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | 260 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | 261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
262 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | 262 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | 263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | 264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | 265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
266 -1, | 266 -1, |
267 }; | 267 }; |
268 | 268 |
269 static int | 269 static int |
270 ia64_cannot_store_register (int regno) | 270 ia64_cannot_store_register (int regno) |
271 { | 271 { |
272 return 0; | 272 return 0; |
273 } | 273 } |
274 | 274 |
275 static int | 275 static int |
276 ia64_cannot_fetch_register (int regno) | 276 ia64_cannot_fetch_register (int regno) |
277 { | 277 { |
278 return 0; | 278 return 0; |
279 } | 279 } |
280 | 280 |
| 281 /* GDB register numbers. */ |
| 282 #define IA64_GR0_REGNUM 0 |
| 283 #define IA64_FR0_REGNUM 128 |
| 284 #define IA64_FR1_REGNUM 129 |
| 285 |
| 286 static int |
| 287 ia64_fetch_register (struct regcache *regcache, int regnum) |
| 288 { |
| 289 /* r0 cannot be fetched but is always zero. */ |
| 290 if (regnum == IA64_GR0_REGNUM) |
| 291 { |
| 292 const gdb_byte zero[8] = { 0 }; |
| 293 |
| 294 gdb_assert (sizeof (zero) == register_size (regnum)); |
| 295 supply_register (regcache, regnum, zero); |
| 296 return 1; |
| 297 } |
| 298 |
| 299 /* fr0 cannot be fetched but is always zero. */ |
| 300 if (regnum == IA64_FR0_REGNUM) |
| 301 { |
| 302 const gdb_byte f_zero[16] = { 0 }; |
| 303 |
| 304 gdb_assert (sizeof (f_zero) == register_size (regnum)); |
| 305 supply_register (regcache, regnum, f_zero); |
| 306 return 1; |
| 307 } |
| 308 |
| 309 /* fr1 cannot be fetched but is always one (1.0). */ |
| 310 if (regnum == IA64_FR1_REGNUM) |
| 311 { |
| 312 const gdb_byte f_one[16] = |
| 313 { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0xff, 0, 0, 0, 0, 0, 0 }; |
| 314 |
| 315 gdb_assert (sizeof (f_one) == register_size (regnum)); |
| 316 supply_register (regcache, regnum, f_one); |
| 317 return 1; |
| 318 } |
| 319 |
| 320 return 0; |
| 321 } |
| 322 |
281 struct linux_target_ops the_low_target = { | 323 struct linux_target_ops the_low_target = { |
282 init_registers_ia64, | 324 init_registers_ia64, |
283 ia64_num_regs, | 325 ia64_num_regs, |
284 ia64_regmap, | 326 ia64_regmap, |
| 327 NULL, |
285 ia64_cannot_fetch_register, | 328 ia64_cannot_fetch_register, |
286 ia64_cannot_store_register, | 329 ia64_cannot_store_register, |
| 330 ia64_fetch_register, |
287 }; | 331 }; |
OLD | NEW |