Re: [PATCH 05/20] Remove some uses of DW_STRING_IS_CANONICAL

Tom Tromey
2020-03-31T00:01:29Z

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

Simon> Would you be able to improve the documentation to say what is
Simon> a "canonical string"?

Yeah, I di dthis.

Simon> If this is a DWARF concept and described
Simon> in the DWARF spec, you could just refer to the relevant section
Simon> of the standard too.

Just FYI, it isn't; it is a gdb concept.

Simon> Is this method only relevant if the attribute is of a string
Simon> form? If so, the method name should perhaps still have "string"
Simon> in its name, like "is_canonical_string" or "canonical_string_p".

Done.

Simon> I presume it doesn't make sense to call this method when the
Simon> attribute has a non-string form, so should there be a gdb_assert
Simon> that checks that the attribute has a string form?

I had to move this to the next patch, since form_is_string doesn't exist
yet.

Tom