projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't let bin2hex call strlen
[deliverable/binutils-gdb.git]
/
gdb
/
exceptions.c
diff --git
a/gdb/exceptions.c
b/gdb/exceptions.c
index 6cae8910cbb40cbd4c3a5d4652cd9555b9197e0f..ca80893732127057c3144c5f14fe5b4fcabbc437 100644
(file)
--- a/
gdb/exceptions.c
+++ b/
gdb/exceptions.c
@@
-1,8
+1,6
@@
/* Exception (throw catch) mechanism, for GDB, the GNU debugger.
/* Exception (throw catch) mechanism, for GDB, the GNU debugger.
- Copyright (C) 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1986-2014 Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-27,7
+25,7
@@
#include "annotate.h"
#include "ui-out.h"
#include "gdb_assert.h"
#include "annotate.h"
#include "ui-out.h"
#include "gdb_assert.h"
-#include
"gdb_string.h"
+#include
<string.h>
#include "serial.h"
#include "gdbthread.h"
#include "serial.h"
#include "gdbthread.h"
@@
-88,7
+86,7
@@
EXCEPTIONS_SIGJMP_BUF *
exceptions_state_mc_init (volatile struct gdb_exception *exception,
return_mask mask)
{
exceptions_state_mc_init (volatile struct gdb_exception *exception,
return_mask mask)
{
- struct catcher *new_catcher = X
ZALLOC
(struct catcher);
+ struct catcher *new_catcher = X
CNEW
(struct catcher);
/* Start with no exception, save it's address. */
exception->reason = 0;
/* Start with no exception, save it's address. */
exception->reason = 0;
@@
-223,10
+221,10
@@
exceptions_state_mc_action_iter_1 (void)
void
throw_exception (struct gdb_exception exception)
{
void
throw_exception (struct gdb_exception exception)
{
-
quit_flag = 0
;
+
clear_quit_flag ()
;
immediate_quit = 0;
immediate_quit = 0;
- do_cleanups (
ALL_CLEANUPS
);
+ do_cleanups (
all_cleanups ()
);
/* Jump to the containing catch_errors() call, communicating REASON
to that call via setjmp's return value. Note that REASON can't
/* Jump to the containing catch_errors() call, communicating REASON
to that call via setjmp's return value. Note that REASON can't
@@
-236,28
+234,6
@@
throw_exception (struct gdb_exception exception)
EXCEPTIONS_SIGLONGJMP (current_catcher->buf, exception.reason);
}
EXCEPTIONS_SIGLONGJMP (current_catcher->buf, exception.reason);
}
-void
-deprecated_throw_reason (enum return_reason reason)
-{
- struct gdb_exception exception;
-
- memset (&exception, 0, sizeof exception);
-
- exception.reason = reason;
- switch (reason)
- {
- case RETURN_QUIT:
- break;
- case RETURN_ERROR:
- exception.error = GENERIC_ERROR;
- break;
- default:
- internal_error (__FILE__, __LINE__, _("bad switch"));
- }
-
- throw_exception (exception);
-}
-
static void
print_flush (void)
{
static void
print_flush (void)
{
@@
-565,7
+541,7
@@
catch_errors (catch_errors_ftype *func, void *func_args, char *errstring,
}
int
}
int
-catch_command_errors (catch_command_errors_ftype *
command,
+catch_command_errors (catch_command_errors_ftype *command,
char *arg, int from_tty, return_mask mask)
{
volatile struct gdb_exception e;
char *arg, int from_tty, return_mask mask)
{
volatile struct gdb_exception e;
@@
-579,3
+555,19
@@
catch_command_errors (catch_command_errors_ftype * command,
return 0;
return 1;
}
return 0;
return 1;
}
+
+int
+catch_command_errors_const (catch_command_errors_const_ftype *command,
+ const char *arg, int from_tty, return_mask mask)
+{
+ volatile struct gdb_exception e;
+
+ TRY_CATCH (e, mask)
+ {
+ command (arg, from_tty);
+ }
+ print_any_exception (gdb_stderr, NULL, e);
+ if (e.reason < 0)
+ return 0;
+ return 1;
+}
This page took
0.024533 seconds
and
4
git commands to generate.