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


Hi,

On 20.11.2012 03:18, Yao Qi wrote:
On 11/19/2012 10:49 PM, Mircea Gherzan wrote:
-static void
-catch_load_or_unload (char *arg, int from_tty, int is_load,
-              struct cmd_list_element *command)
+void
+add_solib_catchpoint (struct gdbarch *arch, char *arg, int is_load,
+                      int is_temp, int enabled)
  {
    struct solib_catchpoint *c;
-  struct gdbarch *gdbarch = get_current_arch ();

I don't understand why do we pass 'gdbarch' into this function, instead of getting it here. The caller of add_solib_catchpoint passes get_current_arch () to it. Anything wrong if we leave this part unchanged?

You are right, this part can be left untouched. Fixed in v4 and later of the patch.


[...]

diff --git a/gdb/mi/mi-cmd-catch.c b/gdb/mi/mi-cmd-catch.c
new file mode 100644
index 0000000..cbc8257
--- /dev/null
+++ b/gdb/mi/mi-cmd-catch.c
@@ -0,0 +1,96 @@
+/* MI Command Set - catch commands.

[...]


see<http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+
+#include "defs.h"

If we really have to include <stdio.h>, please include "defs.h" first. We have an 'include-defs.h-first' rule. See

The stdio #include was removed in v4/v5 of the patch.


Thanks,
Mircea


--


Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Peter Gleissner, 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]