This is an archive of the discontinued LLVM Phabricator instance.

Add NetBSD path for Debugging Information in Separate Files
ClosedPublic

Authored by krytarowski on Mar 29 2017, 7:09 AM.

Details

Summary

NetBSD stores debug information files in the /usr/libdata/debug path.

This change fixes debugging distribution executables, e.g. look(1):

$ lldb /usr/bin/look                                                                                                                                
(lldb) target create "/usr/bin/look"
Current executable set to '/usr/bin/look' (x86_64).
(lldb) b main
Breakpoint 1: where = look`main + 22 at look.c:107, address = 0x0000000000000da6
(lldb) r
Process 23473 launched: '/usr/bin/look' (x86_64)
Process 23473 stopped
* thread #1, stop reason = breakpoint 1.1
    frame #0: 0x0000000186600da6 look`main(argc=1, argv=0x00007f7fffc7c488) at look.c:107
   104  
   105          string = NULL;
   106          file = _PATH_WORDS;
-> 107          termchar = '\0';
   108          while ((ch = getopt(argc, argv, "dft:")) != -1)
   109                  switch(ch) {
   110                  case 'd':
(lldb)

There is no /usr/lib/debug path on NeBSD, so remove it from search.

Sponsored by <The NetBSD Foundation>

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski created this revision.Mar 29 2017, 7:09 AM
labath accepted this revision.Mar 29 2017, 1:00 PM
This revision is now accepted and ready to land.Mar 29 2017, 1:00 PM
krytarowski closed this revision.Mar 29 2017, 1:04 PM