public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-sergiodj-stap: (Possible) fix to axs_value bug.
@ 2011-03-21 19:04 sergiodj
0 siblings, 0 replies; only message in thread
From: sergiodj @ 2011-03-21 19:04 UTC (permalink / raw)
To: archer-commits
The branch, archer-sergiodj-stap has been updated
via d660f8b316061925e18c0939413a6f08aba7dbde (commit)
from c93e1e84002a44d86ef34f587dffad42d9a6d291 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit d660f8b316061925e18c0939413a6f08aba7dbde
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date: Mon Mar 21 16:03:34 2011 -0300
(Possible) fix to axs_value bug.
-----------------------------------------------------------------------
Summary of changes:
gdb/stap-probe.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 1 deletions(-)
First 500 lines of diff:
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 422572b..6387086 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -100,7 +100,7 @@ struct stap_evaluation_info
struct agent_expr *aexpr;
/* The value we are modifying (for agent expression). */
- struct axs_value *value;
+ struct axs_value *avalue;
};
/* This dummy variable is used when parsing a probe's argument fails.
@@ -649,6 +649,9 @@ stap_get_opcode (char **s, enum exp_opcode *op)
return ret;
}
+/* Given the operator OPCODE, this function generates agent bytecode
+ for it. */
+
static void
stap_opcode_to_ax (struct stap_evaluation_info *eval_info,
enum exp_opcode opcode)
@@ -1329,6 +1332,7 @@ stap_evaluate_probe_argument_1 (struct objfile *objfile,
/* We are not compiling to an agent expression. */
eval_info.compiling_p = 0;
eval_info.aexpr = NULL;
+ eval_info.avalue = NULL;
res = stap_evaluate_probe_argument_2 (&eval_info,
/*lhs=*/NULL, /*prec=*/0);
@@ -1375,6 +1379,7 @@ stap_compile_to_ax_1 (struct objfile *objfile,
int n)
{
struct stap_evaluation_info eval_info;
+ struct gdbarch *gdbarch = expr->gdbarch;
char *s = (char *) probe->parsed_args->arg[n].arg_str;
/* Filling necessary information for evaluation function. */
@@ -1386,6 +1391,42 @@ stap_compile_to_ax_1 (struct objfile *objfile,
/* We are compiling to an agent expression. */
eval_info.compiling_p = 1;
eval_info.aexpr = expr;
+ eval_info.avalue = value;
+
+ /* We can always use this kind. */
+ value->kind = axs_rvalue;
+
+ /* Figuring out the correct type for this axs_value. */
+ switch (eval_info.bitness)
+ {
+ case STAP_ARG_BITNESS_UNDEFINED:
+ if (gdbarch_addr_bit (gdbarch) == 32)
+ value->type = builtin_type (gdbarch)->builtin_uint32;
+ else
+ value->type = builtin_type (gdbarch)->builtin_uint64;
+ break;
+
+ case STAP_ARG_BITNESS_32BIT_SIGNED:
+ value->type = builtin_type (gdbarch)->builtin_int32;
+ break;
+
+ case STAP_ARG_BITNESS_32BIT_UNSIGNED:
+ value->type = builtin_type (gdbarch)->builtin_uint32;
+ break;
+
+ case STAP_ARG_BITNESS_64BIT_SIGNED:
+ value->type = builtin_type (gdbarch)->builtin_int64;
+ break;
+
+ case STAP_ARG_BITNESS_64BIT_UNSIGNED:
+ value->type = builtin_type (gdbarch)->builtin_uint64;
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__,
+ _("Undefined bitness for probe."));
+ break;
+ }
stap_evaluate_probe_argument_2 (&eval_info,
/*lhs=*/NULL, /*prec=*/0);
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-21 19:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-21 19:04 [SCM] archer-sergiodj-stap: (Possible) fix to axs_value bug 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).