Jim Meyering wrote: > Volker, you can diagnose this by stepping through ls.c's print_dir > function, doing "print *next" for each entry.
see attached. > One of those three will be the entry for d/s (others are usually > "." and "..") and we care about the direct.d_type member. Strangely, I got one for ".", "..", and one "" (d_name = '\0'). > You can see that 10 corresponds to DT_LNK: > > (gdb) p (int)DT_LNK > $5 = 10 I got the same: (gdb) print (int)DT_LNK $7 = 10 > Since the code appears to work as intended with DT_DIR, perhaps > your system (or file system) lacks DT_LNK support? How can I check? Thank you and have a nice day, Berny
cu-8.3-ls-gdb.log
Description: cu-8.3-ls-gdb.log