/* Support for printing Ada values for GDB, the GNU debugger.
- Copyright (C) 1986-2014 Free Software Foundation, Inc.
+ Copyright (C) 1986-2015 Free Software Foundation, Inc.
This file is part of GDB.
#include "ada-lang.h"
#include "c-lang.h"
#include "infcall.h"
-#include "exceptions.h"
#include "objfiles.h"
static int print_field_values (struct type *, const gdb_byte *,
if (ada_is_tagged_type (value_type (deref_val), 1))
deref_val = ada_tag_value_at_base_address (deref_val);
+ /* Make sure that the object does not have an unreasonable size
+ before trying to print it. This can happen for instance with
+ references to dynamic objects whose contents is uninitialized
+ (Eg: an array whose bounds are not set yet). */
+ ada_ensure_varsize_limit (value_type (deref_val));
+
val_print (value_type (deref_val),
value_contents_for_printing (deref_val),
value_embedded_offset (deref_val),
const struct value *val,
const struct value_print_options *options)
{
- volatile struct gdb_exception except;
/* XXX: this catches QUIT/ctrl-c as well. Isn't that busted? */
- TRY_CATCH (except, RETURN_MASK_ALL)
+ TRY
{
ada_val_print_1 (type, valaddr, embedded_offset, address,
stream, recurse, val, options,
current_language);
}
+ CATCH (except, RETURN_MASK_ALL)
+ {
+ }
+ END_CATCH
}
void