Re: [RFC PATCH 5/8] gdb/ctf: check return value of ctf_type_align

Simon Marchi
2026-02-12T18:38:26Z

On 2/12/26 12:49 PM, Tom Tromey wrote:
>>>>>> "Simon" == simon marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> With this patch, if I enable the complaints, I see a bunch of messages
> Simon> like this:
>
> Simon> During symbol reading: ctf_type_align read_structure_type failed - Type is not a complete type.
>
> I just wanted to rant a little about complaints. You can leave these in
> if you want, but IME complaints are useless. I don't think we've ever
> seen anyone fix a compiler bug on the basis of a complaint being issued.
> And, I also don't recall ever debugging some user problem by enabling
> complaints -- if a bug gets to that point, I'm invariably debugging the
> reader.
>
> That is, they're just noise.
>
> Now, it might still be good to have a checker for DWARF and presumably
> for CTF. But IMO that should be a separate tool. And for CTF it
> doesn't even seem hard to do, given that these errors are coming
> straight from it.
>
> thanks for listening,
> Tom

Thank you for you TED talk. I agree that I have never used complaints
myself. If I had infinite time, I would report bugs to compilers about
them, but I don't have that luxury.

I don't mind removing complaints, but I would still keep the messages as
logging statements (*_debug_printf), to at least be able to have a trace
of what GDB is doing.

Simon