[lldb-dev] [Bug 40199] New: `file not found` when target.expr-prefix file `#include`'s another file

via lldb-dev lldb-dev at lists.llvm.org
Tue Jan 1 21:20:14 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40199

            Bug ID: 40199
           Summary: `file not found` when target.expr-prefix file
                    `#include`'s another file
           Product: lldb
           Version: unspecified
          Hardware: All
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: thelastmammoth at gmail.com
                CC: llvm-bugs at lists.llvm.org

~/.lldbinit:
```
settings set target.expr-prefix /tmp/lldb_prefix.h
```

/tmp/lldb_prefix.h:
```
#include "/tmp2/compiler_nim.c" // works
#include <limits.h> // error: 'limits.h' file not found
#include "compiler_nim.c" // ditto
```


```
(lldb) p printf("")
error: 'limits.h' file not found
```

* How do I specify an `-I` include path for `target.expr-prefix` `expr` or `p`
commands?
I looked at the sources for that error and found
$git_clone_D/llvm/tools/llvm-rc/ResourceFileWriter.cpp ; it showed:
`FindInEnvPath("INCLUDE", File, Params.NoInclude))`
however setting `export INCLUDE="/tmp2"` before calling lldb didn't work

I also tried 
`settings set target.source-map . /tmp2`, didn't work

I also tried: `target.input-path`, didn't work


* for standard library headers (eg `#include <limits.h>`), how can I avoid
`file not found`  without specifying explicitly search path (which can be
tricky to find, local disk search reveal lots of options and I just want the
"standard" as used by clang etc to be used)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190102/f8a61530/attachment.html>


More information about the lldb-dev mailing list