[PATCH] [gdb/testsuite] Use -nostdlib in gdb.linespec/explicit.exp
Tom de Vries
tdevries@suse.de
Fri Dec 20 05:26:35 GMT 2024
On 12/19/24 19:02, Keith Seitz wrote:
> Hi,
>
> On 12/18/24 11:39 AM, Tom de Vries wrote:
>>
>> The test-case already contains a related workaround:
>> ...
>> # Get rid of symbols from shared libraries, otherwise
>> # "b -source thr<tab>" could find some system library's
>> # source.
>> gdb_test_no_output "nosharedlibrary"
>> ...
>> but that doesn't work in this case because the debug info is in the
>> executable
>> itself:
>
> Yeah, I don't think I considered this possibility back when I introduced
> this, so thank you for chasing this down.
>
It's a bit unusual, but I suppose I cannot object to more debug info ;)
>> Fix this by:
>> - using -nostdlib, ensuring only debug info from the three test-case
>> sources
>> is present in the executable, and
>> - adding a _start wrapping main.
>
> That seems a reasonable solution.
>
> Reviewed-By: Keith Seitz <keiths@redhat.com>
>
Thanks for the review, pushed.
Thanks,
- Tom
> Thank you!
> Keith
>
More information about the Gdb-patches
mailing list