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/ia64-linux-tdep.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 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/ia64-linux-nat.c ('k') | gdb/ia64-tdep.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/ia64-linux-tdep.c
diff --git a/gdb/ia64-linux-tdep.c b/gdb/ia64-linux-tdep.c
index 85ac486cd220f62e04e662f66d5bd524b7de65de..d1eb529cd4f239d4b2255889db9bb8356ce53850 100644
--- a/gdb/ia64-linux-tdep.c
+++ b/gdb/ia64-linux-tdep.c
@@ -1,7 +1,6 @@
/* Target-dependent code for the IA-64 for GDB, the GNU debugger.
- Copyright (C) 2000, 2004-2005, 2007-2012 Free Software Foundation,
- Inc.
+ Copyright (C) 2000-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -28,6 +27,8 @@
#include "symtab.h"
#include "linux-tdep.h"
+#include <ctype.h>
+
/* The sigtramp code is in a non-readable (executable-only) region
of memory called the ``gate page''. The addresses in question
were determined by examining the system headers. They are
@@ -55,7 +56,7 @@ ia64_linux_sigcontext_register_address (struct gdbarch *gdbarch,
CORE_ADDR sp, int regno)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- char buf[8];
+ gdb_byte buf[8];
CORE_ADDR sigcontext_addr = 0;
/* The address of the sigcontext area is found at offset 16 in the
@@ -119,6 +120,17 @@ ia64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
regcache_cooked_write_unsigned (regcache, IA64_GR10_REGNUM, 0);
}
+/* Implementation of `gdbarch_stap_is_single_operand', as defined in
+ gdbarch.h. */
+
+static int
+ia64_linux_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
+{
+ return ((isdigit (*s) && s[1] == '[' && s[2] == 'r') /* Displacement. */
+ || *s == 'r' /* Register value. */
+ || isdigit (*s)); /* Literal number. */
+}
+
static void
ia64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -143,6 +155,14 @@ ia64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
svr4_fetch_objfile_link_map);
+
+ /* SystemTap related. */
+ set_gdbarch_stap_register_prefix (gdbarch, "r");
+ set_gdbarch_stap_register_indirection_prefix (gdbarch, "[");
+ set_gdbarch_stap_register_indirection_suffix (gdbarch, "]");
+ set_gdbarch_stap_gdb_register_prefix (gdbarch, "r");
+ set_gdbarch_stap_is_single_operand (gdbarch,
+ ia64_linux_stap_is_single_operand);
}
/* Provide a prototype to silence -Wmissing-prototypes. */
« no previous file with comments | « gdb/ia64-linux-nat.c ('k') | gdb/ia64-tdep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698