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]

[obv] mi/: Code cleanup


Hi,

checked in.  No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu.

Those `static' stbs were unusual there but (a) they already do not make sense
there, (b) the state was the same during initial history-less import,
(c) the code of functions is protected against exceptions.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2011-08/msg00128.html

--- src/gdb/ChangeLog	2011/08/28 20:39:28	1.13288
+++ src/gdb/ChangeLog	2011/08/28 20:43:42	1.13289
@@ -1,5 +1,16 @@
 2011-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
+	Code cleanup.
+	* mi/mi-cmd-stack.c (list_args_or_locals): Remove stb initialization
+	and the static keyword.
+	* mi/mi-cmd-target.c (mi_cmd_target_file_get, mi_cmd_target_file_put):
+	Make prefix an array.
+	* mi/mi-cmd-target.c (mi_cmd_target_file_delete): Likewise.
+	* mi/mi-main.c (get_register): Remove stb initialization and the static
+	keyword.
+
+2011-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
 	Code cleanup - make mi_opt const.
 	* mi/mi-cmd-break.c (mi_cmd_break_insert, mi_cmd_break_watch): Make
 	opts const.
--- src/gdb/mi/mi-cmd-stack.c	2011/08/04 19:10:14	1.56
+++ src/gdb/mi/mi-cmd-stack.c	2011/08/28 20:43:43	1.57
@@ -247,7 +247,7 @@
   struct symbol *sym;
   struct dict_iterator iter;
   struct cleanup *cleanup_list;
-  static struct ui_stream *stb = NULL;
+  struct ui_stream *stb;
   struct type *type;
   char *name_of_result;
   struct ui_out *uiout = current_uiout;
--- src/gdb/mi/mi-cmd-target.c	2011/08/28 20:39:29	1.9
+++ src/gdb/mi/mi-cmd-target.c	2011/08/28 20:43:43	1.10
@@ -33,7 +33,7 @@
   {
     { 0, 0, 0 }
   };
-  static const char *prefix = "-target-file-get";
+  static const char prefix[] = "-target-file-get";
 
   if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
       || optind != argc - 2)
@@ -57,7 +57,7 @@
   {
     { 0, 0, 0 }
   };
-  static const char *prefix = "-target-file-put";
+  static const char prefix[] = "-target-file-put";
 
   if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
       || optind != argc - 2)
@@ -81,7 +81,7 @@
   {
     { 0, 0, 0 }
   };
-  static const char *prefix = "-target-file-delete";
+  static const char prefix[] = "-target-file-delete";
 
   if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
       || optind != argc - 1)
--- src/gdb/mi/mi-main.c	2011/08/28 20:39:29	1.204
+++ src/gdb/mi/mi-main.c	2011/08/28 20:43:43	1.205
@@ -1119,7 +1119,7 @@
   struct ui_out *uiout = current_uiout;
   CORE_ADDR addr;
   enum lval_type lval;
-  static struct ui_stream *stb = NULL;
+  struct ui_stream *stb;
   struct value *val;
 
   stb = ui_out_stream_new (uiout);


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