On Sun, Feb 02, 2025 at 12:00:17PM +0100, Samuel Thibault wrote: > Zhaoming Luo, le dim. 02 févr. 2025 18:55:49 +0800, a ecrit: > > ``` > > Thread 2 hit Breakpoint 1, _hurd_select (nfds=7, pollfds=0x0, > > readfds=0x103cc20, writefds=0x103cc40, exceptfds=0x103cc60, > > timeout=0x103cba4, sigmask=0x0) at ./hurd/hurdselect.c:51 > > 51 ./hurd/hurdselect.c: No such file or directory. > > ``` > > > > I expected it will show me the source code of hurdselect.c. > > You need to download it with `apt source glibc` and cd into it, > otherwise gdb can't magically invent it :)
But I invoked the gdb using the following command in $(curl-src)/tests/: ``` ~/curl/tests$ ./runtests.pl 546 -g ``` I haven't found a greate way to run the command in glibc directory, as it seems `runtests.pl` found the curl binary using relative path :/. Are there some methods like adding a environment variable so gdb will search in the glibc source code. And I was quite surprised that gdb in different distributions can have different behavior :-). Best, Zhaoming