public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-sergiodj-stap: Use only breakpoint_ops; accept `-probe' arg.
@ 2012-01-26 21:35 sergiodj
  0 siblings, 0 replies; only message in thread
From: sergiodj @ 2012-01-26 21:35 UTC (permalink / raw)
  To: archer-commits

The branch, archer-sergiodj-stap has been updated
       via  a60b0d7f85420376b1f0f3b1106821a1c7ead201 (commit)
      from  8cfb9152ad5ffa41686efe5cdf7b02c9f2581162 (commit)

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

- Log -----------------------------------------------------------------
commit a60b0d7f85420376b1f0f3b1106821a1c7ead201
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Thu Jan 26 19:34:50 2012 -0200

    Use only breakpoint_ops; accept `-probe' arg.

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

Summary of changes:
 gdb/linespec.c   |    4 ----
 gdb/stap-probe.c |   17 +++++++++++++----
 2 files changed, 13 insertions(+), 8 deletions(-)

First 500 lines of diff:
diff --git a/gdb/linespec.c b/gdb/linespec.c
index c94083b..4ff3ed5 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -820,7 +820,6 @@ keep_name_info (char *p, int on_boundary)
    PC returned is 0.
    FILE:FUNCTION -- likewise, but prefer functions in that file.
    *EXPR -- line in which address EXPR appears.
-   -p [OBJFILE:][PROVIDER:]NAME -- a systemtap static probe
 
    This may all be followed by an "if EXPR", which we ignore.
 
@@ -891,9 +890,6 @@ decode_line_internal (struct linespec_state *self, char **argptr)
       return decode_indirect (self, argptr);
     }
 
-  if (strncmp (*argptr, "-p", 2) == 0 && isspace ((*argptr)[2]))
-    return parse_stap_probe (argptr, self->canonical);
-
   is_quoted = (strchr (get_gdb_completer_quote_characters (),
 		       **argptr) != NULL);
 
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index bf68133..eb03d97 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1390,13 +1390,22 @@ parse_stap_probe (char **argptr, struct linespec_result *canonical)
   result.nelts = 0;
 
   arg_start = *argptr;
-  /* The caller ensured that this starts with '-p'.  */
-  gdb_assert (arg_start && strncmp (arg_start, "-p", 2) == 0);
-  arg_end = arg_start + 2;
+  /* The caller ensured that this starts with `-p' or `-probe'.  */
+  gdb_assert (arg_start
+	      && ((strncmp (arg_start, "-p", 2) == 0
+		   && isspace (arg_start[2]))
+		  || (strncmp (arg_start, "-probe", 6) == 0
+		      && isspace (arg_start[6]))));
+
+  if (strncmp (arg_start, "-probe", 6) == 0)
+    arg_end = arg_start + 6;
+  else
+    arg_end = arg_start + 2;
   arg_end = skip_spaces (arg_end);
 
   if (!*arg_end)
-    error (_("argument to `-p' missing"));
+    error (_("argument to `%s' missing"),
+	   strncmp (arg_start, "-probe", 6) == 0 ? "-probe" : "-p");
 
   arg = arg_end;
   arg_end = skip_to_space (arg_end);


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


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

only message in thread, other threads:[~2012-01-26 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-26 21:35 [SCM] archer-sergiodj-stap: Use only breakpoint_ops; accept `-probe' arg 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).