[Bug gdb/25663] dwarf2_name caching bug

tromey at sourceware dot org sourceware-bugzilla@sourceware.org
Thu Mar 12 20:50:51 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=25663

--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Victor Collod from comment #4)
> > I'm not completely sure it's a win to do this.
> 
> What do you mean?

In that comment I meant that we might save more memory
with the current approach.  But I no longer think that's true.

> My concern is that calling the function two times with the same parameters
> can return different results.

Yeah, I see what you mean.
That does seem bad.

The current approach turns out to be relied on :-(
See anonymous_struct_prefix.  Making a change to the order causes
gdb.cp/anon-struct.exp to fail.

But maybe we can separate the caching from the return value,
so that the call is idempotent.

This code is very messy.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list