aboutsummaryrefslogtreecommitdiff
path: root/gdb/probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/probe.c')
-rw-r--r--gdb/probe.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gdb/probe.c b/gdb/probe.c
index dce2b25..8366220 100644
--- a/gdb/probe.c
+++ b/gdb/probe.c
@@ -33,6 +33,7 @@
#include "value.h"
#include "ax.h"
#include "ax-gdb.h"
+#include "location.h"
#include <ctype.h>
typedef struct bound_probe bound_probe_s;
@@ -43,23 +44,24 @@ DEF_VEC_O (bound_probe_s);
/* See definition in probe.h. */
struct symtabs_and_lines
-parse_probes (char **argptr, struct linespec_result *canonical)
+parse_probes (const struct event_location *location,
+ struct linespec_result *canonical)
{
- char *arg_start, *arg_end, *arg;
+ char *arg_end, *arg;
char *objfile_namestr = NULL, *provider = NULL, *name, *p;
struct cleanup *cleanup;
struct symtabs_and_lines result;
struct objfile *objfile;
struct program_space *pspace;
const struct probe_ops *probe_ops;
- const char *cs;
+ const char *arg_start, *cs;
result.sals = NULL;
result.nelts = 0;
- arg_start = *argptr;
+ arg_start = get_linespec_location (location);
- cs = *argptr;
+ cs = arg_start;
probe_ops = probe_linespec_to_ops (&cs);
if (probe_ops == NULL)
error (_("'%s' is not a probe linespec"), arg_start);
@@ -170,12 +172,15 @@ parse_probes (char **argptr, struct linespec_result *canonical)
if (canonical)
{
+ char *canon;
+
+ canon = savestring (arg_start, arg_end - arg_start);
+ make_cleanup (xfree, canon);
canonical->special_display = 1;
canonical->pre_expanded = 1;
- canonical->addr_string = savestring (*argptr, arg_end - *argptr);
+ canonical->location = new_linespec_location (&canon);
}
- *argptr = arg_end;
do_cleanups (cleanup);
return result;