2012-05-07 Sergio Durigan Junior <sergiodj@redhat.com>
authorSergio Durigan Junior <sergiodj@redhat.com>
Tue, 8 May 2012 01:35:35 +0000 (01:35 +0000)
committerSergio Durigan Junior <sergiodj@redhat.com>
Tue, 8 May 2012 01:35:35 +0000 (01:35 +0000)
* probe.c (parse_probes): Move conditional to check for
debuginfo files from here...
* stap-probe.c (stap_get_probes): ... to here.

gdb/ChangeLog
gdb/probe.c
gdb/stap-probe.c

index 979909a..51918a5 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       * probe.c (parse_probes): Move conditional to check for
+       debuginfo files from here...
+       * stap-probe.c (stap_get_probes): ... to here.
+
 2012-05-07  Mark Kettenis  <kettenis@gnu.org>
            H.J. Lu  <hongjiu.lu@intel.com>
 
index ee94f9c..77f3b13 100644 (file)
@@ -120,9 +120,6 @@ parse_probes (char **argptr, struct linespec_result *canonical)
            && FILENAME_CMP (lbasename (objfile->name), objfile_name) != 0)
          continue;
 
-       if (objfile->separate_debug_objfile_backlink != NULL)
-         continue;
-
        probes = objfile->sf->sym_probe_fns->sym_get_probes (objfile);
 
        for (ix = 0; VEC_iterate (probe_p, probes, ix, probe); ix++)
index 273ae07..506e6c3 100644 (file)
@@ -1411,6 +1411,12 @@ stap_get_probes (VEC (probe_p) **probesp, struct objfile *objfile)
   struct sdt_note *iter;
   unsigned save_probesp_len = VEC_length (probe_p, *probesp);
 
+  if (objfile->separate_debug_objfile_backlink != NULL)
+    {
+      /* This is a .debug file, not the objfile itself.  */
+      return;
+    }
+
   if (!elf_tdata (obfd)->sdt_note_head)
     {
       /* There isn't any probe here.  */