On Monday, August 04 2025, Vincent Lefevre wrote: > On 2025-08-04 13:41:13 -0400, Sergio Durigan Junior wrote: >> I can't reproduce this on GDB 16.3: > [...] > > This actually depends on how the program has been compiled. > I've attached: > * tst.c: source. > * tst-8: produced by "gcc-8 -Wall -g tst.c -o tst-8". > * tst-9: produced by "gcc-9 -Wall -g tst.c -o tst-9". > > With tst-8: > > (gdb) bt > #0 __pthread_kill_implementation (threadid=<optimized out>, > signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 > #1 0x00007ffff7e3a9ff in __pthread_kill_internal (threadid=<optimized out>, > signo=6) at ./nptl/pthread_kill.c:89 > #2 0x00007ffff7de5cc2 in __GI_raise (sig=sig@entry=6) > at ../sysdeps/posix/raise.c:26 > #3 0x00007ffff7dce4ac in __GI_abort () at ./stdlib/abort.c:73 > #4 0x0000555555555160 in fct (y=17, z=1) at tst.c:13 > #5 0x000055555555517e in main () at tst.c:21 > > With tst-9: > > (gdb) bt > #0 __pthread_kill_implementation (threadid=<optimized out>, > signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 > #1 0x00007ffff7e3a9ff in __pthread_kill_internal (threadid=<optimized out>, > signo=6) at ./nptl/pthread_kill.c:89 > #2 0x00007ffff7de5cc2 in __GI_raise (sig=sig@entry=6) > at ../sysdeps/posix/raise.c:26 > #3 0x00007ffff7dce4ac in __GI_abort () at ./stdlib/abort.c:73 > #4 0x0000555555555165 in fct (x=0x7fffffffd77c, y=17, z=1) at tst.c:13 > #5 0x0000555555555183 in main () at tst.c:21 > > "objdump -S" shows the correct prototype in both cases: > > int fct (int *x, int y, int z) > > Though GCC 8 is old, generated code like tst-8 might still occur > with other testcases or with future GCC versions.
Thanks for double-checking. Well, TBH this may very well be a problem with the DWARF generated by GCC 8 (which, as you said, is an old compiler). If this is really the case, then there's not much GDB can do. This doesn't seem to be a Debian-specific bug, so would you be willing to take it upstream and discuss with them? I believe they might be at least interested in understanding what's going on here. If I have the time during the coming weekend, I'll also take a look. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/
signature.asc
Description: PGP signature

