[PATCH PR gdb/20057] Internal error on trying to set {char[]}$pc="string"

Tom Tromey tom@tromey.com
Thu Nov 29 21:52:00 GMT 2018


>>>>> ">" == Wei-min Pan <weimin.pan@oracle.com> writes:

>> Looks like we have at least 2 options:

>> (1) Making sure the type is objfile-owned before calling copy_type in
>> resolve_dynamic_range and resolve_dynamic_array as you suggested, or

>> (2) Replacing the assert with an objfile-owned check in copy_type, similar
>> to what copy_type_recursive does.

Sorry, I still didn't read the whole thread... but I think what to do
depends on what is happening.

Most callers of copy_type are probably copying it to modify the copy.
If this is the case, then maybe just removing the assert is ok.
Or, maybe it makes sense to understand why the modified type isn't
objfile-allocated in the first place.

Could you recap?  What is calling copy_type here and where did the type
come from?

Tom



More information about the Gdb-patches mailing list