2005-01-13 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Fri, 14 Jan 2005 02:33:24 +0000 (02:33 +0000)
committerAndrew Cagney <cagney@redhat.com>
Fri, 14 Jan 2005 02:33:24 +0000 (02:33 +0000)
* exceptions.h (struct exception): Make message const.
* mi/mi-main.c (mi_execute_command): Pass result.message directly
to fputstr_unfiltered.

gdb/ChangeLog
gdb/exceptions.h
gdb/mi/mi-main.c

index 6e637b8b81b4775cb60821ed50ffc89aea713d68..7b1eb13c97fb74d30c936f86801eb7abd7ada030 100644 (file)
@@ -1,5 +1,9 @@
 2005-01-13  Andrew Cagney  <cagney@gnu.org>
 
+       * exceptions.h (struct exception): Make message const.
+       * mi/mi-main.c (mi_execute_command): Pass result.message directly
+       to fputstr_unfiltered.
+
        * defs.h (error_last_message, error_init): Delete declaration.
        * utils.c (fatal, vfatal): Call throw_vfatal.
        (error, verror): Call throw_verror;
index d6c4ffcebcfb2c65e15f9cdedfd4f48017874973..e062b1860db877df0c0f2710d45193c1bf308ffd 100644 (file)
@@ -59,7 +59,7 @@ struct exception
 {
   enum return_reason reason;
   enum errors error;
-  char *message;
+  const char *message;
 };
 
 /* A pre-defined non-exception.  */
index 9d7a06c9563d4e069a49419348b3e950d231307a..7df1569e14e26124828d9ba67c8e3b6c654053e9 100644 (file)
@@ -1166,13 +1166,11 @@ mi_execute_command (char *cmd, int from_tty)
        }
       if (result.reason < 0)
        {
-         char *msg = result.message;
-         struct cleanup *cleanup = make_cleanup (xfree, msg);
          /* The command execution failed and error() was called
             somewhere */
          fputs_unfiltered (command->token, raw_stdout);
          fputs_unfiltered ("^error,msg=\"", raw_stdout);
-         fputstr_unfiltered (msg, '"', raw_stdout);
+         fputstr_unfiltered (result.message, '"', raw_stdout);
          fputs_unfiltered ("\"\n", raw_stdout);
        }
       mi_parse_free (command);
This page took 0.030977 seconds and 4 git commands to generate.