From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13779 invoked by alias); 18 Jan 2005 20:58:52 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13214 invoked from network); 18 Jan 2005 20:58:35 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 18 Jan 2005 20:58:35 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j0IKwUp5003456 for ; Tue, 18 Jan 2005 15:58:35 -0500 Received: from localhost.redhat.com (vpn50-9.rdu.redhat.com [172.16.50.9]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j0IKwUO04574; Tue, 18 Jan 2005 15:58:30 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 67D947D79; Tue, 18 Jan 2005 15:56:21 -0500 (EST) Message-ID: <41ED77F4.3080902@gnu.org> Date: Tue, 18 Jan 2005 20:58:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch/rfc] Deprecate throw_reason Content-Type: multipart/mixed; boundary="------------010002060500090005030300" X-SW-Source: 2005-01/txt/msg00199.txt.bz2 This is a multi-part message in MIME format. --------------010002060500090005030300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 135 Throw reason should be superseeded by: e = catch_exception (....); if .... throw_exception (e); I'll commit eventually. Andrew --------------010002060500090005030300 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 7750 2005-01-18 Andrew Cagney * exceptions.h (deprecated_throw_reason): Rename throw_reason. * exceptions.c (deprecated_throw_reason): Rename throw_reason. * utils.c (internal_verror, quit): Update. * remote-sds.c (interrupt_query): Update. * remote-mips.c (mips_error, mips_kill): Update. * remote-fileio.c (remote_fileio_ctrl_c_signal_handler): Update. * remote.c (interrupt_query): Update. * ocd.c (interrupt_query): Update. * nto-procfs.c (interrupt_query): Update. * monitor.c (monitor_interrupt_query): Update. * breakpoint.c (break_command_1): Update. Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.195 diff -p -u -r1.195 breakpoint.c --- breakpoint.c 18 Jan 2005 17:04:27 -0000 1.195 +++ breakpoint.c 18 Jan 2005 20:40:05 -0000 @@ -5144,7 +5144,7 @@ break_command_1 (char *arg, int flag, in error. */ if (pending_break_support == AUTO_BOOLEAN_FALSE) - throw_reason (RETURN_ERROR); + deprecated_throw_reason (RETURN_ERROR); /* If pending breakpoint support is auto query and the user selects no, then simply return the error code. */ Index: exceptions.c =================================================================== RCS file: /cvs/src/src/gdb/exceptions.c,v retrieving revision 1.15 diff -p -u -r1.15 exceptions.c --- exceptions.c 16 Jan 2005 21:20:05 -0000 1.15 +++ exceptions.c 18 Jan 2005 20:40:05 -0000 @@ -239,7 +239,7 @@ throw_exception (struct exception except static char *last_message; NORETURN void -throw_reason (enum return_reason reason) +deprecated_throw_reason (enum return_reason reason) { struct exception exception; memset (&exception, 0, sizeof exception); Index: exceptions.h =================================================================== RCS file: /cvs/src/src/gdb/exceptions.h,v retrieving revision 1.9 diff -p -u -r1.9 exceptions.h --- exceptions.h 14 Jan 2005 23:27:13 -0000 1.9 +++ exceptions.h 18 Jan 2005 20:40:05 -0000 @@ -85,13 +85,16 @@ extern void exception_fprintf (struct ui Wombat. */ extern NORETURN void throw_exception (struct exception exception) ATTR_NORETURN; -extern NORETURN void throw_reason (enum return_reason reason) ATTR_NORETURN; extern NORETURN void throw_verror (enum errors, const char *fmt, va_list ap) ATTR_NORETURN; extern NORETURN void throw_vfatal (const char *fmt, va_list ap) ATTR_NORETURN; extern NORETURN void throw_error (enum errors error, const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 2, 3); +/* Instead of deprecated_throw_reason, code should use catch_exception + and throw_exception. */ +extern NORETURN void deprecated_throw_reason (enum return_reason reason) ATTR_NORETURN; + /* Call FUNC(UIOUT, FUNC_ARGS) but wrapped within an exception handler. If an exception (enum return_reason) is thrown using throw_exception() than all cleanups installed since Index: monitor.c =================================================================== RCS file: /cvs/src/src/gdb/monitor.c,v retrieving revision 1.54 diff -p -u -r1.54 monitor.c --- monitor.c 15 Jan 2005 02:33:19 -0000 1.54 +++ monitor.c 18 Jan 2005 20:40:05 -0000 @@ -1030,7 +1030,7 @@ monitor_interrupt_query (void) Give up (and stop debugging it)? ")) { target_mourn_inferior (); - throw_reason (RETURN_QUIT); + deprecated_throw_reason (RETURN_QUIT); } target_terminal_inferior (); Index: nto-procfs.c =================================================================== RCS file: /cvs/src/src/gdb/nto-procfs.c,v retrieving revision 1.9 diff -p -u -r1.9 nto-procfs.c --- nto-procfs.c 15 Jan 2005 02:33:19 -0000 1.9 +++ nto-procfs.c 18 Jan 2005 20:40:05 -0000 @@ -592,7 +592,7 @@ interrupt_query (void) Give up (and stop debugging it)? ")) { target_mourn_inferior (); - throw_reason (RETURN_QUIT); + deprecated_throw_reason (RETURN_QUIT); } target_terminal_inferior (); Index: ocd.c =================================================================== RCS file: /cvs/src/src/gdb/ocd.c,v retrieving revision 1.34 diff -p -u -r1.34 ocd.c --- ocd.c 15 Jan 2005 02:33:19 -0000 1.34 +++ ocd.c 18 Jan 2005 20:40:05 -0000 @@ -397,7 +397,7 @@ interrupt_query (void) Give up (and stop debugging it)? ")) { target_mourn_inferior (); - throw_reason (RETURN_QUIT); + deprecated_throw_reason (RETURN_QUIT); } target_terminal_inferior (); Index: remote-fileio.c =================================================================== RCS file: /cvs/src/src/gdb/remote-fileio.c,v retrieving revision 1.9 diff -p -u -r1.9 remote-fileio.c --- remote-fileio.c 14 Jan 2005 23:27:14 -0000 1.9 +++ remote-fileio.c 18 Jan 2005 20:40:05 -0000 @@ -480,7 +480,7 @@ remote_fileio_ctrl_c_signal_handler (int remote_fileio_sig_set (SIG_IGN); remote_fio_ctrl_c_flag = 1; if (!remote_fio_no_longjmp) - throw_reason (RETURN_QUIT); + deprecated_throw_reason (RETURN_QUIT); remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler); } Index: remote-mips.c =================================================================== RCS file: /cvs/src/src/gdb/remote-mips.c,v retrieving revision 1.59 diff -p -u -r1.59 remote-mips.c --- remote-mips.c 15 Jan 2005 02:33:19 -0000 1.59 +++ remote-mips.c 18 Jan 2005 20:40:06 -0000 @@ -497,7 +497,7 @@ mips_error (char *string,...) printf_unfiltered ("Ending remote MIPS debugging.\n"); target_mourn_inferior (); - throw_reason (RETURN_ERROR); + deprecated_throw_reason (RETURN_ERROR); } /* putc_readable - print a character, displaying non-printable chars in @@ -2148,7 +2148,7 @@ Give up (and stop debugging it)? ")) printf_unfiltered ("Ending remote MIPS debugging.\n"); target_mourn_inferior (); - throw_reason (RETURN_QUIT); + deprecated_throw_reason (RETURN_QUIT); } target_terminal_inferior (); Index: remote-sds.c =================================================================== RCS file: /cvs/src/src/gdb/remote-sds.c,v retrieving revision 1.36 diff -p -u -r1.36 remote-sds.c --- remote-sds.c 15 Jan 2005 02:33:19 -0000 1.36 +++ remote-sds.c 18 Jan 2005 20:40:06 -0000 @@ -386,7 +386,7 @@ interrupt_query (void) Give up (and stop debugging it)? ")) { target_mourn_inferior (); - throw_reason (RETURN_QUIT); + deprecated_throw_reason (RETURN_QUIT); } target_terminal_inferior (); Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.162 diff -p -u -r1.162 remote.c --- remote.c 18 Jan 2005 16:15:39 -0000 1.162 +++ remote.c 18 Jan 2005 20:40:06 -0000 @@ -2730,7 +2730,7 @@ interrupt_query (void) Give up (and stop debugging it)? ")) { target_mourn_inferior (); - throw_reason (RETURN_QUIT); + deprecated_throw_reason (RETURN_QUIT); } target_terminal_inferior (); Index: utils.c =================================================================== RCS file: /cvs/src/src/gdb/utils.c,v retrieving revision 1.145 diff -p -u -r1.145 utils.c --- utils.c 14 Jan 2005 21:34:36 -0000 1.145 +++ utils.c 18 Jan 2005 20:40:07 -0000 @@ -779,7 +779,7 @@ NORETURN void internal_verror (const char *file, int line, const char *fmt, va_list ap) { internal_vproblem (&internal_error_problem, file, line, fmt, ap); - throw_reason (RETURN_ERROR); + deprecated_throw_reason (RETURN_ERROR); } NORETURN void @@ -920,7 +920,7 @@ quit (void) fprintf_unfiltered (gdb_stderr, "Quit (expect signal SIGINT when the program is resumed)\n"); #endif - throw_reason (RETURN_QUIT); + deprecated_throw_reason (RETURN_QUIT); } /* Control C comes here */ --------------010002060500090005030300--