This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Make collect_probes return an std::vector


On 2017-09-12 02:17, Sergio Durigan Junior wrote:
diff --git a/gdb/probe.h b/gdb/probe.h
index 61e3031..75e9a5c 100644
--- a/gdb/probe.h
+++ b/gdb/probe.h
@@ -214,15 +214,22 @@ struct probe
    their point of use.  */

 struct bound_probe
-  {
-    /* The probe.  */
+{
+  bound_probe ()
+  {}

-    struct probe *probe;
+  bound_probe (struct probe *probe_, struct objfile *objfile_)
+  : probe (probe_), objfile (objfile_)
+  {}

What do you think about putting simple comments on these constructors
summarizing what you explained in the commit message?

Ok, I'll do that before pushing.


-    /* The objfile in which the probe originated.  */
+  /* The probe.  */

-    struct objfile *objfile;
-  };
+  struct probe *probe = NULL;
+
+  /* The objfile in which the probe originated.  */
+
+  struct objfile *objfile = NULL;
+};

 /* A helper for linespec that decodes a probe specification.  It
    returns a std::vector<symtab_and_line> object and updates LOC or
--
2.7.4

Otherwise, LGTM.

Thanks,

Thanks,

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]