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 v7 1/3] MI: add the -catch-load and -catch-unload commands


Hi,

Thanks for your review.

On 30.11.2012 13:56, Vladimir Prus wrote:
On 29.11.2012 03:05, Mircea Gherzan wrote:
They are equivalent to "catch load" and "catch unload" from CLI.
[...]
+void
+add_solib_catchpoint (char *arg, int is_load, int is_temp, int enabled)
  {
    struct solib_catchpoint *c;
-  struct gdbarch *gdbarch = get_current_arch ();
-  int tempflag;
+  struct gdbarch *arch = get_current_arch ();

Is gdbarch->arch rename an essential part of this patch?

No, not really. I took this out in v8 of the patch.


[...]

+
+  if (! mi_catchpoint_observers_installed)
+    {
+      observer_attach_breakpoint_created (catchpoint_notify);
+      mi_catchpoint_observers_installed = 1;
+    }
+
+  back_to = make_cleanup_restore_integer (&mi_can_catchpoint_notify);
+  mi_can_catchpoint_notify = 1;

To be honest, I am unsure that implicit copy-paste of this logic is a great idea, especially given that catchpoint_notify and breakpoint_notify are identical. Maybe, a more appropriate solution would be to add this functionality to mi-cmd-break.c, and extract the above snippet into a function called 'setup_new_breakpoint_reporting'?

Thanks for the suggestion. The v8 is refactored in this way.


Regards,
Mircea


--


Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


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