From: Tom Tromey Date: Fri, 13 Mar 2020 23:39:52 +0000 (-0600) Subject: Introduce m2_value_print_inner X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62c4663d3c59b53e622b2f83eeae7c8d47c656dd;p=binutils-gdb.git Introduce m2_value_print_inner This introduces m2_value_print_inner. gdb/ChangeLog 2020-03-13 Tom Tromey * m2-valprint.c (m2_value_print_inner): New function. * m2-lang.h (m2_value_print_inner): Declare. * m2-lang.c (m2_language_defn): Use m2_value_print_inner. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index add19fe186f..f4720f5fa59 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-03-13 Tom Tromey + + * m2-valprint.c (m2_value_print_inner): New function. + * m2-lang.h (m2_value_print_inner): Declare. + * m2-lang.c (m2_language_defn): Use m2_value_print_inner. + 2020-03-13 Tom Tromey * opencl-lang.c (opencl_language_defn): Use c_value_print_inner. diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index 31c248d60e4..c500366d651 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -394,7 +394,7 @@ extern const struct language_defn m2_language_defn = m2_print_type, /* Print a type using appropriate syntax */ m2_print_typedef, /* Print a typedef using appropriate syntax */ m2_val_print, /* Print a value using appropriate syntax */ - nullptr, /* la_value_print_inner */ + m2_value_print_inner, /* la_value_print_inner */ c_value_print, /* Print a top-level value */ default_read_var_value, /* la_read_var_value */ NULL, /* Language specific skip_trampoline */ diff --git a/gdb/m2-lang.h b/gdb/m2-lang.h index 81c346086e8..636ba39841d 100644 --- a/gdb/m2-lang.h +++ b/gdb/m2-lang.h @@ -40,6 +40,11 @@ extern void m2_val_print (struct type *, int, CORE_ADDR, struct value *, const struct value_print_options *); +/* Implement la_value_print_inner for Modula-2. */ + +extern void m2_value_print_inner (struct value *, struct ui_file *, int, + const struct value_print_options *); + extern int get_long_set_bounds (struct type *type, LONGEST *low, LONGEST *high); diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c index fa767cdbcec..d63354e40eb 100644 --- a/gdb/m2-valprint.c +++ b/gdb/m2-valprint.c @@ -503,3 +503,13 @@ m2_val_print (struct type *type, int embedded_offset, break; } } + +/* See m2-lang.h. */ + +void +m2_value_print_inner (struct value *val, struct ui_file *stream, int recurse, + const struct value_print_options *options) +{ + m2_val_print (value_type (val), value_embedded_offset (val), + value_address (val), stream, recurse, val, options); +}