mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-09 00:45:29 +08:00
Handle member pointers directly in generic_value_print
TYPE_CODE_MEMBERPTR and TYPE_CODE_METHODPTR are only used for C++, so it seems to me that the generic value-printing code ought to handle these cases -- that way, printing these objects will work even when the current language is not C++. This patch implements this idea. gdb/ChangeLog 2020-09-15 Tom Tromey <tom@tromey.com> * rust-lang.c (rust_value_print_inner): Remove TYPE_CODE_MEMBERPTR and TYPE_CODE_METHODPTR cases. * c-valprint.c (c_value_print_memberptr): Move to valprint.c. (c_value_print_inner): Update. * valprint.c (generic_value_print_memberptr): New function, from c_value_print_memberptr. (generic_value_print): Use it. Call cplus_print_method_ptr.
This commit is contained in:
@ -535,11 +535,6 @@ rust_value_print_inner (struct value *val, struct ui_file *stream,
|
||||
}
|
||||
goto generic_print;
|
||||
|
||||
case TYPE_CODE_METHODPTR:
|
||||
case TYPE_CODE_MEMBERPTR:
|
||||
c_value_print_inner (val, stream, recurse, &opts);
|
||||
break;
|
||||
|
||||
case TYPE_CODE_INT:
|
||||
/* Recognize the unit type. */
|
||||
if (type->is_unsigned () && TYPE_LENGTH (type) == 0
|
||||
|
Reference in New Issue
Block a user