From: Tom Tromey Date: Fri, 13 Mar 2020 23:39:52 +0000 (-0600) Subject: Introduce pascal_value_print_inner X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0941be613054fe525891a2898e7d938b8e8ceed;p=binutils-gdb.git Introduce pascal_value_print_inner This introduces pascal_value_print_inner. gdb/ChangeLog 2020-03-13 Tom Tromey * p-valprint.c (pascal_value_print_inner): New function. * p-lang.h (pascal_value_print_inner): Declare. * p-lang.c (pascal_language_defn): Use pascal_value_print_inner. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f4720f5fa59..cd39b22eecc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-03-13 Tom Tromey + + * p-valprint.c (pascal_value_print_inner): New function. + * p-lang.h (pascal_value_print_inner): Declare. + * p-lang.c (pascal_language_defn): Use pascal_value_print_inner. + 2020-03-13 Tom Tromey * m2-valprint.c (m2_value_print_inner): New function. diff --git a/gdb/p-lang.c b/gdb/p-lang.c index bf74b800fb2..87ddf341802 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -448,7 +448,7 @@ extern const struct language_defn pascal_language_defn = pascal_print_type, /* Print a type using appropriate syntax */ pascal_print_typedef, /* Print a typedef using appropriate syntax */ pascal_val_print, /* Print a value using appropriate syntax */ - nullptr, /* la_value_print_inner */ + pascal_value_print_inner, /* la_value_print_inner */ pascal_value_print, /* Print a top-level value */ default_read_var_value, /* la_read_var_value */ NULL, /* Language specific skip_trampoline */ diff --git a/gdb/p-lang.h b/gdb/p-lang.h index 960d129c114..ae0b2aaede0 100644 --- a/gdb/p-lang.h +++ b/gdb/p-lang.h @@ -42,6 +42,11 @@ extern void pascal_val_print (struct type *, int, struct value *, const struct value_print_options *); +/* Implement la_value_print_inner for Pascal. */ + +extern void pascal_value_print_inner (struct value *, struct ui_file *, int, + const struct value_print_options *); + extern void pascal_value_print (struct value *, struct ui_file *, const struct value_print_options *); diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 68e8c6e11e7..1361fbe298a 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -425,6 +425,19 @@ pascal_val_print (struct type *type, TYPE_CODE (type)); } } + +/* See p-lang.h. */ + +void +pascal_value_print_inner (struct value *val, struct ui_file *stream, + int recurse, + const struct value_print_options *options) + +{ + pascal_val_print (value_type (val), value_embedded_offset (val), + value_address (val), stream, recurse, val, options); +} + void pascal_value_print (struct value *val, struct ui_file *stream,