public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-sergiodj-stap: add two more tests
@ 2011-02-15 14:42 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2011-02-15 14:42 UTC (permalink / raw)
  To: archer-commits

The branch, archer-sergiodj-stap has been updated
       via  23228e3549b15e7484bd64040fbdd5a0389b75ae (commit)
       via  0c00e6a2bd87737ea1c6aece343f800d11a834a6 (commit)
      from  0b98e689cca2f305c85efc8ce93a369f4be9006c (commit)

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

- Log -----------------------------------------------------------------
commit 23228e3549b15e7484bd64040fbdd5a0389b75ae
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue Feb 15 07:16:53 2011 -0700

    add two more tests

commit 0c00e6a2bd87737ea1c6aece343f800d11a834a6
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue Feb 15 07:14:05 2011 -0700

    remove bias from sel argument

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

Summary of changes:
 gdb/stap-probe.c                      |   25 ++++++++++++-------------
 gdb/testsuite/gdb.base/stap-probe.exp |    6 ++++++
 2 files changed, 18 insertions(+), 13 deletions(-)

First 500 lines of diff:
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 138e888..3967f04 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -447,7 +447,7 @@ compute_probe_arg (struct gdbarch *arch, struct internalvar *ivar,
   const struct stap_probe *pc_probe;
   int n_probes;
 
-  /* Note that SEL is biased by 1; SEL==0 means "_probe_argc".  */
+  /* SEL==10 means "_probe_argc".  */
   gdb_assert (sel >= 0 && sel <= 10);
 
   pc_probe = find_probe_by_pc (pc, &objfile);
@@ -460,7 +460,6 @@ compute_probe_arg (struct gdbarch *arch, struct internalvar *ivar,
   if (sel == 0)
     return value_from_longest (builtin_type (arch)->builtin_int, n_probes);
 
-  --sel;
   gdb_assert (sel >= 0);
   if (sel >= n_probes)
     error (_("Invalid probe argument %d -- probe has %d arguments available"),
@@ -485,25 +484,25 @@ NAME matches the probe names.\n\
 OBJECT match the executable or shared library name."));
 
   create_internalvar_type_lazy ("_probe_argc", compute_probe_arg,
-				(void *) (uintptr_t) 0, NULL);
+				(void *) (uintptr_t) 10, NULL);
   create_internalvar_type_lazy ("_probe_arg0", compute_probe_arg,
-				(void *) (uintptr_t) 1, NULL);
+				(void *) (uintptr_t) 0, NULL);
   create_internalvar_type_lazy ("_probe_arg1", compute_probe_arg,
-				(void *) (uintptr_t) 2, NULL);
+				(void *) (uintptr_t) 1, NULL);
   create_internalvar_type_lazy ("_probe_arg2", compute_probe_arg,
-				(void *) (uintptr_t) 3, NULL);
+				(void *) (uintptr_t) 2, NULL);
   create_internalvar_type_lazy ("_probe_arg3", compute_probe_arg,
-				(void *) (uintptr_t) 4, NULL);
+				(void *) (uintptr_t) 3, NULL);
   create_internalvar_type_lazy ("_probe_arg4", compute_probe_arg,
-				(void *) (uintptr_t) 5, NULL);
+				(void *) (uintptr_t) 4, NULL);
   create_internalvar_type_lazy ("_probe_arg5", compute_probe_arg,
-				(void *) (uintptr_t) 6, NULL);
+				(void *) (uintptr_t) 5, NULL);
   create_internalvar_type_lazy ("_probe_arg6", compute_probe_arg,
-				(void *) (uintptr_t) 7, NULL);
+				(void *) (uintptr_t) 6, NULL);
   create_internalvar_type_lazy ("_probe_arg7", compute_probe_arg,
-				(void *) (uintptr_t) 8, NULL);
+				(void *) (uintptr_t) 7, NULL);
   create_internalvar_type_lazy ("_probe_arg8", compute_probe_arg,
-				(void *) (uintptr_t) 9, NULL);
+				(void *) (uintptr_t) 8, NULL);
   create_internalvar_type_lazy ("_probe_arg9", compute_probe_arg,
-				(void *) (uintptr_t) 10, NULL);
+				(void *) (uintptr_t) 9, NULL);
 }
diff --git a/gdb/testsuite/gdb.base/stap-probe.exp b/gdb/testsuite/gdb.base/stap-probe.exp
index 0b36320..84e8845 100644
--- a/gdb/testsuite/gdb.base/stap-probe.exp
+++ b/gdb/testsuite/gdb.base/stap-probe.exp
@@ -36,6 +36,9 @@ proc stap_test {{arg ""}} {
 	return -1
     }
 
+    gdb_test "print \$_probe_arc" "No SystemTap probe at PC $hex" \
+	"check argument not at probe point$addendum"
+
     gdb_test "info probes" \
 	"teste *user *$hex .*" \
 	"info probes$addendum"
@@ -49,6 +52,9 @@ proc stap_test {{arg ""}} {
     # Pending the implementation of this feature.
     # gdb_test "print \$_probe_argc" " = 1" "print \$_probe_argc$addendum"
     # gdb_test "print \$_probe_arg0 == x" " = 1" "check \$_probe_arg0$addendum"
+    # gdb_test "print \$_probe_arg1" \
+    # 	"Invalid probe argument 1 -- probe has 1 argument available" \
+    # 	"check \$_probe_arg1$addendum"
 
     return 0
 }


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


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

only message in thread, other threads:[~2011-02-15 14:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-15 14:42 [SCM] archer-sergiodj-stap: add two more tests tromey

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).