public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-sergiodj-stap-patch-split: Fix PPC bug; handle constant with const_prefix on evaluator
@ 2011-08-23 19:31 sergiodj
  0 siblings, 0 replies; only message in thread
From: sergiodj @ 2011-08-23 19:31 UTC (permalink / raw)
  To: archer-commits

The branch, archer-sergiodj-stap-patch-split has been updated
       via  52d70f2536170c6ec606f34eb6429acf20170025 (commit)
      from  9bb56d8572ce86406767a07ac26c11e5a1d3af00 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 52d70f2536170c6ec606f34eb6429acf20170025
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Tue Aug 23 16:26:05 2011 -0300

    Fix PPC bug; handle constant with const_prefix on evaluator

-----------------------------------------------------------------------

Summary of changes:
 gdb/ppc-linux-tdep.c |    3 ---
 gdb/stap-probe.c     |   27 +++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 3 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 71f724d..8677e42 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -1634,8 +1634,6 @@ ppc_stap_parse_special_token (struct gdbarch *gdbarch,
       while (isdigit (*s))
 	++s;
 
-      s = skip_spaces (s);
-
       /* We shall not see a parenthesis here, because that would mean
 	 a register displacement, which should have been handled already.  */
       if (*s == '(')
@@ -1665,7 +1663,6 @@ ppc_stap_evaluate_special_token (struct gdbarch *gdbarch,
 
       while (isdigit (*s))
 	++s;
-      s = skip_spaces (s);
 
       if (*s == '(')
 	/* It is a register displacement indeed.  Returning NULL means we are
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 028e99a..fb51781 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1547,6 +1547,33 @@ not_displacement:
 	error (_("Unknown numeric token on expression `%s'."),
 	       eval_info->saved_expr);
     }
+  else if (const_prefix
+	   && strncmp (eval_info->exp_buf, const_prefix,
+		       const_prefix_len) == 0)
+    {
+      /* We are dealing with a numeric constant.  */
+      int number;
+
+      eval_info->exp_buf += const_prefix_len;
+      number = strtol (eval_info->exp_buf, &eval_info->exp_buf, 0);
+
+      if (!STAP_COMPILING_AGENT_EXPR_P (eval_info))
+	res
+	  = value_from_longest (builtin_type (gdbarch)->builtin_int,
+				number);
+      else
+	ax_const_l (eval_info->aexpr, number);
+
+      if (const_sufix)
+	{
+	  if (strncmp (eval_info->exp_buf, const_sufix,
+		       const_sufix_len) == 0)
+	    eval_info->exp_buf += const_sufix_len;
+	  else
+	    error (_("Invalid constant sufix on expression `%s'."),
+		   eval_info->saved_expr);
+	}
+    }
   else if ((reg_prefix
 	    && strncmp (eval_info->exp_buf, reg_prefix, reg_prefix_len) == 0)
 	   || (reg_ind_prefix


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-23 19:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23 19:31 [SCM] archer-sergiodj-stap-patch-split: Fix PPC bug; handle constant with const_prefix on evaluator sergiodj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).