Fix PR threads/19422 - show which thread caused stop
[deliverable/binutils-gdb.git] / gdb / probe.c
index 836622081bf7172349b5e9721f5a565619b6c464..374e7a77eb693c21227569cfca29577446f85692 100644 (file)
@@ -1,6 +1,6 @@
 /* Generic static probe support for GDB.
 
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -59,7 +59,8 @@ parse_probes (const struct event_location *location,
   result.sals = NULL;
   result.nelts = 0;
 
-  arg_start = get_linespec_location (location);
+  gdb_assert (event_location_type (location) == PROBE_LOCATION);
+  arg_start = get_probe_location (location);
 
   cs = arg_start;
   probe_ops = probe_linespec_to_ops (&cs);
@@ -145,9 +146,8 @@ parse_probes (const struct event_location *location,
              continue;
 
            ++result.nelts;
-           result.sals = xrealloc (result.sals,
-                                   result.nelts
-                                   * sizeof (struct symtab_and_line));
+           result.sals = XRESIZEVEC (struct symtab_and_line, result.sals,
+                                     result.nelts);
            sal = &result.sals[result.nelts - 1];
 
            init_sal (sal);
@@ -178,7 +178,7 @@ parse_probes (const struct event_location *location,
       make_cleanup (xfree, canon);
       canonical->special_display = 1;
       canonical->pre_expanded = 1;
-      canonical->location = new_linespec_location (&canon);
+      canonical->location = new_probe_location (canon);
     }
 
   do_cleanups (cleanup);
This page took 0.025726 seconds and 4 git commands to generate.