aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2013-12-28 19:20:58 -0200
committerSergio Durigan Junior <sergiodj@redhat.com>2013-12-28 19:20:58 -0200
commit8d85bacb91f5e50baa8155598a9e5521db2fafd1 (patch)
tree6ce9b6cfb16ec1e95810cff6de610fff522fe4b6 /gdb
parent08248ca9fe11040e9a4126cefebc5023d1d67222 (diff)
downloadfsf-binutils-gdb-8d85bacb91f5e50baa8155598a9e5521db2fafd1.zip
fsf-binutils-gdb-8d85bacb91f5e50baa8155598a9e5521db2fafd1.tar.gz
fsf-binutils-gdb-8d85bacb91f5e50baa8155598a9e5521db2fafd1.tar.bz2
Extend handling of immediates on ARM's SystemTap SDT probe support
Continuing my series of fixes on the SystemTap SDT support for the ARM/AArch64 architectures, this patch now extends how ARM's SDT specific parser handles literal numbers (immediates). Currently, it only accepts "#" as the prefix. However, according to "info '(as) ARM-Chars'", expressions can also have "$" and nothing as a prefix. This patch extends the parser to accept those options. 2013-12-28 Sergio Durigan Junior <sergiodj@redhat.com> * arm-linux-tdep.c (arm_stap_is_single_operand): Accept "$" as a literal prefix. Also accept no prefix at all. (arm_stap_parse_special_token): Likewise. (arm_linux_init_abi): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/arm-linux-tdep.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c6f37e5..02db708 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2013-12-28 Sergio Durigan Junior <sergiodj@redhat.com>
+ * arm-linux-tdep.c (arm_stap_is_single_operand): Accept "$" as a
+ literal prefix. Also accept no prefix at all.
+ (arm_stap_parse_special_token): Likewise.
+ (arm_linux_init_abi): Likewise.
+
+2013-12-28 Sergio Durigan Junior <sergiodj@redhat.com>
+
PR tdep/15653
* NEWS: Mention SystemTap SDT probe support for AArch64 GNU/Linux.
* aarch64-linux-tdep.c: Include necessary headers for parsing of
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 0284f69..830b2eb 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -1116,7 +1116,7 @@ arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
static int
arm_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
- return (*s == '#' /* Literal number. */
+ return (*s == '#' || *s == '$' || isdigit (*s) /* Literal number. */
|| *s == '[' /* Register indirection or
displacement. */
|| isalpha (*s)); /* Register value. */
@@ -1183,8 +1183,8 @@ arm_stap_parse_special_token (struct gdbarch *gdbarch,
++tmp;
tmp = skip_spaces_const (tmp);
- if (*tmp++ != '#')
- return 0;
+ if (*tmp == '#' || *tmp == '$')
+ ++tmp;
if (*tmp == '-')
{
@@ -1235,7 +1235,7 @@ static void
arm_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- static const char *const stap_integer_prefixes[] = { "#", NULL };
+ static const char *const stap_integer_prefixes[] = { "#", "$", "", NULL };
static const char *const stap_register_prefixes[] = { "r", NULL };
static const char *const stap_register_indirection_prefixes[] = { "[",
NULL };