Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: gdb/gdbserver/linux-ia64-low.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/gdbserver/linux-crisv32-low.c ('k') | gdb/gdbserver/linux-low.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/gdbserver/linux-ia64-low.c
diff --git a/gdb/gdbserver/linux-ia64-low.c b/gdb/gdbserver/linux-ia64-low.c
index 1b0ad81a6cf7f4e2760579b370e8b8a50d3ab900..c8fa603ec7d226a4efbd7cef4c80d284610759ab 100644
--- a/gdb/gdbserver/linux-ia64-low.c
+++ b/gdb/gdbserver/linux-ia64-low.c
@@ -256,7 +256,7 @@ static int ia64_regmap[] =
-1, -1, -1, -1, -1, -1, -1, -1, -1,
PT_AR_PFS,
PT_AR_LC,
- -1, /* Not available: EC, the Epilog Count register */
+ PT_AR_EC,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -278,10 +278,54 @@ ia64_cannot_fetch_register (int regno)
return 0;
}
+/* GDB register numbers. */
+#define IA64_GR0_REGNUM 0
+#define IA64_FR0_REGNUM 128
+#define IA64_FR1_REGNUM 129
+
+static int
+ia64_fetch_register (struct regcache *regcache, int regnum)
+{
+ /* r0 cannot be fetched but is always zero. */
+ if (regnum == IA64_GR0_REGNUM)
+ {
+ const gdb_byte zero[8] = { 0 };
+
+ gdb_assert (sizeof (zero) == register_size (regnum));
+ supply_register (regcache, regnum, zero);
+ return 1;
+ }
+
+ /* fr0 cannot be fetched but is always zero. */
+ if (regnum == IA64_FR0_REGNUM)
+ {
+ const gdb_byte f_zero[16] = { 0 };
+
+ gdb_assert (sizeof (f_zero) == register_size (regnum));
+ supply_register (regcache, regnum, f_zero);
+ return 1;
+ }
+
+ /* fr1 cannot be fetched but is always one (1.0). */
+ if (regnum == IA64_FR1_REGNUM)
+ {
+ const gdb_byte f_one[16] =
+ { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0xff, 0, 0, 0, 0, 0, 0 };
+
+ gdb_assert (sizeof (f_one) == register_size (regnum));
+ supply_register (regcache, regnum, f_one);
+ return 1;
+ }
+
+ return 0;
+}
+
struct linux_target_ops the_low_target = {
init_registers_ia64,
ia64_num_regs,
ia64_regmap,
+ NULL,
ia64_cannot_fetch_register,
ia64_cannot_store_register,
+ ia64_fetch_register,
};
« no previous file with comments | « gdb/gdbserver/linux-crisv32-low.c ('k') | gdb/gdbserver/linux-low.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698