<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - `file not found` when target.expr-prefix file `#include`'s another file"
   href="https://bugs.llvm.org/show_bug.cgi?id=40199">40199</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>`file not found` when target.expr-prefix file `#include`'s another file
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>thelastmammoth@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>~/.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)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>