diff options
| author | Kamil Rytarowski <n54@gmx.com> | 2017-03-29 19:52:24 +0000 |
|---|---|---|
| committer | Kamil Rytarowski <n54@gmx.com> | 2017-03-29 19:52:24 +0000 |
| commit | 6420a2f9c6cc9f4ec1faed261c14407fe617fe3d (patch) | |
| tree | ff5623570f313570935699ae09aa48218d1ca694 /lldb/source | |
| parent | cdcdc978794406b8959e05011034c8d452393792 (diff) | |
| download | bcm5719-llvm-6420a2f9c6cc9f4ec1faed261c14407fe617fe3d.tar.gz bcm5719-llvm-6420a2f9c6cc9f4ec1faed261c14407fe617fe3d.zip | |
Add NetBSD path for Debugging Information in Separate Files
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>
Reviewers: jingham, emaste, kettenis, labath, joerg
Reviewed By: labath
Subscribers: aprantl, #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D31461
llvm-svn: 299023
Diffstat (limited to 'lldb/source')
| -rw-r--r-- | lldb/source/Host/common/Symbols.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Host/common/Symbols.cpp b/lldb/source/Host/common/Symbols.cpp index c45ca11b309..9e0a3b5bf4d 100644 --- a/lldb/source/Host/common/Symbols.cpp +++ b/lldb/source/Host/common/Symbols.cpp @@ -212,8 +212,13 @@ FileSpec Symbols::LocateExecutableSymbolFile(const ModuleSpec &module_spec) { debug_file_search_paths.AppendIfUnique(FileSpec(".", true)); #ifndef LLVM_ON_WIN32 +#if defined(__NetBSD__) + // Add /usr/libdata/debug directory. + debug_file_search_paths.AppendIfUnique(FileSpec("/usr/libdata/debug", true)); +#else // Add /usr/lib/debug directory. debug_file_search_paths.AppendIfUnique(FileSpec("/usr/lib/debug", true)); +#endif #endif // LLVM_ON_WIN32 std::string uuid_str; |

