From: vprus Date: Fri, 1 Feb 2008 06:47:18 +0000 (+0000) Subject: Properly rethrow exception. This fixes errors X-Git-Tag: EOL_registry_mounts~760 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=436b1c80156f393ebcea512f06266a19dff21a39;p=pf3gnuchains%2Fpf3gnuchains4x.git Properly rethrow exception. This fixes errors about non-existent functions for -break-insert. * breakpoint.c (break_command_really): Use throw_exception for rethrowing. If rethrowing, don't print the exception. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4cfe1fbf5c..7ddc112caf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2008-02-01 Vladimir Prus + + Properly rethrow exception. This fixes errors + about non-existent functions for -break-insert. + * breakpoint.c (break_command_really): Use throw_exception + for rethrowing. If rethrowing, don't print the exception. + 2008-01-31 Thiago Jung Bauermann * NEWS: Mention Decimal Floating Point support. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0bed4efa02..f69002c99b 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5330,13 +5330,13 @@ break_command_really (char *arg, char *cond_string, int thread, { case NOT_FOUND_ERROR: - exception_print (gdb_stderr, e); - /* If pending breakpoint support is turned off, throw error. */ if (pending_break_support == AUTO_BOOLEAN_FALSE) - deprecated_throw_reason (RETURN_ERROR); + throw_exception (e); + + exception_print (gdb_stderr, e); /* If pending breakpoint support is auto query and the user selects no, then simply return the error code. */ diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e39f566659..99a21e3edb 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-02-01 Vladimir Prus + + * gdb.mi/mi-break.exp (test_error): New. + Call it. + 2008-01-31 Luis Machado * gdb.arch/ppc64-atomic-inst.c: New testcase source file. diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp index af438b9c5d..6933a34203 100644 --- a/gdb/testsuite/gdb.mi/mi-break.exp +++ b/gdb/testsuite/gdb.mi/mi-break.exp @@ -175,10 +175,20 @@ proc test_ignore_count {} { } } +proc test_error {} { + global mi_gdb_prompt + + mi_gdb_test "-break-insert function_that_does_not_exist" \ + ".*\\^error,msg=\"Function \\\\\"function_that_does_not_exist\\\\\" not defined.\"" \ + "breakpoint at nonexistent function" +} + test_tbreak_creation_and_listing test_rbreak_creation_and_listing test_ignore_count +test_error + mi_gdb_exit return 0