public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-stap-on-linespec: sdt.h now supports 12 probe arguments
@ 2011-11-18 18:11 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2011-11-18 18:11 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-stap-on-linespec has been updated
       via  bbf5dc3e23fe19c5434a7a59dcc23b31515d2ea2 (commit)
      from  a1a0de162f645cdb1911816a0ccf78410bd21430 (commit)

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

- Log -----------------------------------------------------------------
commit bbf5dc3e23fe19c5434a7a59dcc23b31515d2ea2
Author: Tom Tromey <tromey@redhat.com>
Date:   Fri Nov 18 11:11:23 2011 -0700

    sdt.h now supports 12 probe arguments

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

Summary of changes:
 gdb/doc/gdb.texinfo |    6 +++---
 gdb/stap-probe.c    |   20 ++++++++++++--------
 2 files changed, 15 insertions(+), 11 deletions(-)

First 500 lines of diff:
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index cae19ec..53252f6 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4561,7 +4561,7 @@ A probe may specify up to ten arguments.  These are available at the
 point at which the probe is defined---that is, when the current PC is
 at the probe's location.  The arguments are available using the
 convenience variables (@pxref{Convenience Vars})
-@code{$_probe_arg0}@dots{}@code{$_probe_arg9}.  Each probe argument is
+@code{$_probe_arg0}@dots{}@code{$_probe_arg11}.  Each probe argument is
 an integer of the appropriate size; types are not preserved.  The
 convenience variable @code{$_probe_argc} holds the number of arguments
 at the current probe point.
@@ -8833,7 +8833,7 @@ The variable @code{$_exitcode} is automatically set to the exit code when
 the program being debugged terminates.
 
 @item $_probe_argc
-@itemx $_probe_arg0@dots{}$_probe_arg9
+@itemx $_probe_arg0@dots{}$_probe_arg11
 Arguments to a SystemTap static probe.  @xref{Static Probe Points}.
 
 @item $_sdata
@@ -10765,7 +10765,7 @@ which the tracepoint is located.
 @xref{Static Probe Points,,Static Probe Points}.
 
 @item $_probe_arg@var{N}
-Where @var{N} varies from 0 to 9.  Collects the @var{N}th argument
+Where @var{N} varies from 0 to 11.  Collects the @var{N}th argument
 from the @code{SystemTap} probe at which the tracepoint is located.
 @xref{Static Probe Points,,Static Probe Points}.
 
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 29e9507..21de4cd 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -51,7 +51,7 @@ struct stap_probe_arg
 /* The maximum number of arguments that a probe can have,
    as defined in <sys/sdt.h>.  */
 
-#define STAP_MAX_ARGS 10
+#define STAP_MAX_ARGS 12
 
 /* Structure that holds information about all arguments of a probe.  */
 
@@ -2004,8 +2004,8 @@ compute_probe_arg (struct gdbarch *arch, struct internalvar *ivar,
   const struct stap_probe *pc_probe;
   int n_probes;
 
-  /* SEL==10 means "_probe_argc".  */
-  gdb_assert (sel >= 0 && sel <= STAP_MAX_ARGS);
+  /* SEL==-1 means "_probe_argc".  */
+  gdb_assert (sel >= -1 && sel <= STAP_MAX_ARGS);
 
   pc_probe = find_probe_by_pc (pc, &objfile);
   if (pc_probe == NULL)
@@ -2014,7 +2014,7 @@ compute_probe_arg (struct gdbarch *arch, struct internalvar *ivar,
   n_probes
     = objfile->sf->sym_probe_fns->sym_get_probe_argument_count (objfile,
 								pc_probe);
-  if (sel == 10)
+  if (sel == -1)
     return value_from_longest (builtin_type (arch)->builtin_int, n_probes);
 
   if (sel >= n_probes)
@@ -2039,8 +2039,8 @@ compile_probe_arg (struct internalvar *ivar, struct agent_expr *expr,
   const struct stap_probe *pc_probe;
   int n_probes;
 
-  /* SEL==10 means "_probe_argc".  */
-  gdb_assert (sel >= 0 && sel <= 10);
+  /* SEL==-1 means "_probe_argc".  */
+  gdb_assert (sel >= -1 && sel <= STAP_MAX_ARGS);
 
   pc_probe = find_probe_by_pc (pc, &objfile);
   if (pc_probe == NULL)
@@ -2049,7 +2049,7 @@ compile_probe_arg (struct internalvar *ivar, struct agent_expr *expr,
   n_probes
     = objfile->sf->sym_probe_fns->sym_get_probe_argument_count (objfile,
 								pc_probe);
-  if (sel == 10)
+  if (sel == -1)
     {
       value->kind = axs_rvalue;
       value->type = builtin_type (expr->gdbarch)->builtin_int;
@@ -2089,7 +2089,7 @@ NAME matches the probe names.\n\
 OBJECT match the executable or shared library name."));
 
   create_internalvar_type_lazy ("_probe_argc", &probe_funcs,
-				(void *) (uintptr_t) 10);
+				(void *) (uintptr_t) -1);
   create_internalvar_type_lazy ("_probe_arg0", &probe_funcs,
 				(void *) (uintptr_t) 0);
   create_internalvar_type_lazy ("_probe_arg1", &probe_funcs,
@@ -2110,4 +2110,8 @@ OBJECT match the executable or shared library name."));
 				(void *) (uintptr_t) 8);
   create_internalvar_type_lazy ("_probe_arg9", &probe_funcs,
 				(void *) (uintptr_t) 9);
+  create_internalvar_type_lazy ("_probe_arg10", &probe_funcs,
+				(void *) (uintptr_t) 10);
+  create_internalvar_type_lazy ("_probe_arg11", &probe_funcs,
+				(void *) (uintptr_t) 11);
 }


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


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

only message in thread, other threads:[~2011-11-18 18:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-18 18:11 [SCM] archer-tromey-stap-on-linespec: sdt.h now supports 12 probe arguments 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).