This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




On 11/29/2018 11:18 AM, Tom Tromey wrote:
">" == Wei-min Pan <weimin.pan@oracle.com> writes:
Problem is copy_type will assert on to-be-copied type which does not
have an
associated objfile. It doesn't matter if the type is entirely arch-owned.
I didn't follow this thread in too much detail, but FWIW I believe the
rule is that an objfile-owned type can refer to a gdbarch-owned type --
but not vice versa.

Following that it seems to me that there should not be a need to call
copy_type on a gdbarch-owned type.  So maybe that can be avoided,
instead of removing the assert?

Tom

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]