mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-05 23:26:51 +08:00
ada_val_print_1: Add language parameter
This is to help calling val_print. We would like to be more systematic in calling val_print when printing, because it allows us to make sure we take advantage of the standard features such as pretty-printing which are handled by val_print. gdb/ChangeLog: * ada-valprint.c (ada_val_print_1): Add parameter "language". Update calls to self accordingly. Replace calls to c_val_print by calls to val_print.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2014-01-07 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* ada-valprint.c (ada_val_print_1): Add parameter "language".
|
||||||
|
Update calls to self accordingly. Replace calls to c_val_print
|
||||||
|
by calls to val_print.
|
||||||
|
|
||||||
2014-01-07 Joel Brobecker <brobecker@adacore.com>
|
2014-01-07 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* ada-valprint.c (print_record): Delete declaration.
|
* ada-valprint.c (print_record): Delete declaration.
|
||||||
|
@ -780,7 +780,8 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
|
|||||||
int offset, CORE_ADDR address,
|
int offset, CORE_ADDR address,
|
||||||
struct ui_file *stream, int recurse,
|
struct ui_file *stream, int recurse,
|
||||||
const struct value *original_value,
|
const struct value *original_value,
|
||||||
const struct value_print_options *options)
|
const struct value_print_options *options,
|
||||||
|
const struct language_defn *language)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct type *elttype;
|
struct type *elttype;
|
||||||
@ -814,7 +815,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
|
|||||||
value_contents_for_printing (val),
|
value_contents_for_printing (val),
|
||||||
value_embedded_offset (val),
|
value_embedded_offset (val),
|
||||||
value_address (val), stream, recurse,
|
value_address (val), stream, recurse,
|
||||||
val, options);
|
val, options, language);
|
||||||
value_free_to_mark (mark);
|
value_free_to_mark (mark);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -825,14 +826,14 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
|
|||||||
switch (TYPE_CODE (type))
|
switch (TYPE_CODE (type))
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
c_val_print (type, valaddr, offset, address, stream,
|
val_print (type, valaddr, offset, address, stream, recurse,
|
||||||
recurse, original_value, options);
|
original_value, options, language_def (language_c));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CODE_PTR:
|
case TYPE_CODE_PTR:
|
||||||
{
|
{
|
||||||
c_val_print (type, valaddr, offset, address,
|
val_print (type, valaddr, offset, address, stream, recurse,
|
||||||
stream, recurse, original_value, options);
|
original_value, options, language_def (language_c));
|
||||||
|
|
||||||
if (ada_is_tag_type (type))
|
if (ada_is_tag_type (type))
|
||||||
{
|
{
|
||||||
@ -875,13 +876,14 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
|
|||||||
ada_val_print_1 (target_type,
|
ada_val_print_1 (target_type,
|
||||||
value_contents_for_printing (v),
|
value_contents_for_printing (v),
|
||||||
value_embedded_offset (v), 0,
|
value_embedded_offset (v), 0,
|
||||||
stream, recurse + 1, v, options);
|
stream, recurse + 1, v, options,
|
||||||
|
language);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ada_val_print_1 (TYPE_TARGET_TYPE (type),
|
ada_val_print_1 (TYPE_TARGET_TYPE (type),
|
||||||
valaddr, offset,
|
valaddr, offset,
|
||||||
address, stream, recurse,
|
address, stream, recurse,
|
||||||
original_value, options);
|
original_value, options, language);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -970,8 +972,8 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
|
|||||||
case TYPE_CODE_FLT:
|
case TYPE_CODE_FLT:
|
||||||
if (options->format)
|
if (options->format)
|
||||||
{
|
{
|
||||||
c_val_print (type, valaddr, offset, address, stream,
|
val_print (type, valaddr, offset, address, stream, recurse,
|
||||||
recurse, original_value, options);
|
original_value, options, language_def (language_c));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1066,7 +1068,8 @@ ada_val_print (struct type *type, const gdb_byte *valaddr,
|
|||||||
TRY_CATCH (except, RETURN_MASK_ALL)
|
TRY_CATCH (except, RETURN_MASK_ALL)
|
||||||
{
|
{
|
||||||
ada_val_print_1 (type, valaddr, embedded_offset, address,
|
ada_val_print_1 (type, valaddr, embedded_offset, address,
|
||||||
stream, recurse, val, options);
|
stream, recurse, val, options,
|
||||||
|
current_language);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user