[ was: Re: [PATCH][gdb/symtab] Fix check-psymtab failure for inline function ] On 11-03-2020 01:08, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> When loading the executable in gdb, we create a partial symbol for foo, but > Tom> after expansion into a full symbol table no actual symbol is created, > Tom> resulting in a maint check-psymtab failure: > Tom> ... > Tom> (gdb) maint check-psymtab > Tom> Static symbol `foo' only found in inline.c psymtab > Tom> ... > > Tom> Fix this by preventing the creation of this type of partial symbol. > > With this patch, if there is a function which is only inlined (there is > no "out-line" copy), will "break function" still work? > > It seems to me that it wouldn't always, because there wouldn't be a > partial symbol to match. Maybe it might work accidentally if the inline > function appears in a CU that is already expanded, like main's. So the > test would have to be an always-inline function that isn't used in > main's CU. > I managed to construct a test-case like that, which: - passes with master, and - fails if I apply the "preventing the creation of this type of partial symbol" patch. Since it seems there's no other test-case in the testsuite testing this behaviour ... committed as obvious. Thanks, - Tom