+2013-06-29 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * ia64-linux-tdep.c: Include <ctype.h>.
+ (ia64_linux_stap_is_single_operand): New function.
+ (ia64_linux_init_abi): Initialize SystemTap related attributes.
+
2013-06-28 Tom Tromey <tromey@redhat.com>
* Makefile.in (version.c): Use version.in, not
#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
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)
{
/* 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. */