This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] delete mi_error_last_message
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 01 Jun 2004 09:15:49 -0400
- Subject: [commit] delete mi_error_last_message
Only one caller so I've inlined a greatly simplified version of the code.
committed,
Andrew
2004-06-01 Andrew Cagney <cagney@gnu.org>
* mi/mi-cmds.h (mi_error_last_message): Delete declaration.
* mi/mi-interp.c (mi_cmd_interpreter_exec): Call
error_last_message instead of mi_error_last_message.
* mi/mi-main.c (mi_error_last_message): Delete function.
Index: mi/mi-cmds.h
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmds.h,v
retrieving revision 1.12
diff -p -u -r1.12 mi-cmds.h
--- mi/mi-cmds.h 24 Jan 2004 04:21:43 -0000 1.12
+++ mi/mi-cmds.h 1 Jun 2004 13:02:41 -0000
@@ -146,7 +146,6 @@ extern int mi_debug_p;
extern struct ui_file *raw_stdout;
extern char *mi_error_message;
-extern void mi_error_last_message (void);
extern void mi_execute_command (char *cmd, int from_tty);
#endif
Index: mi/mi-interp.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-interp.c,v
retrieving revision 1.8
diff -p -u -r1.8 mi-interp.c
--- mi/mi-interp.c 21 Apr 2004 23:52:21 -0000 1.8
+++ mi/mi-interp.c 1 Jun 2004 13:02:42 -0000
@@ -246,7 +246,7 @@ mi_cmd_interpreter_exec (char *command,
sync_execution = 1;
if (interp_exec (interp_to_use, argv[i]) < 0)
{
- mi_error_last_message ();
+ mi_error_message = error_last_message ();
result = MI_CMD_ERROR;
break;
}
Index: mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.60
diff -p -u -r1.60 mi-main.c
--- mi/mi-main.c 1 Jun 2004 12:55:33 -0000 1.60
+++ mi/mi-main.c 1 Jun 2004 13:02:42 -0000
@@ -99,16 +99,6 @@ static void mi_exec_async_cli_cmd_contin
static int register_changed_p (int regnum);
static int get_register (int regnum, int format);
-/* A helper function which will set mi_error_message to
- error_last_message. */
-void
-mi_error_last_message (void)
-{
- char *s = error_last_message ();
- xasprintf (&mi_error_message, "%s", s);
- xfree (s);
-}
-
/* Command implementations. FIXME: Is this libgdb? No. This is the MI
layer that calls libgdb. Any operation used in the below should be
formalized. */