File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 14
14
- [ Inspecting Clang ASTs] ( #inspecting-clang-asts )
15
15
- [ Automated test case reduction] ( #automated-test-case-reduction )
16
16
- [ Debugging preprocessor issues] ( #debugging-preprocessor-issues )
17
+ - [ Debugging using a local Clang checkout] ( #debugging-using-a-local-clang-checkout )
17
18
- [ Profiling] ( #profiling )
18
19
- [ Stack sampling] ( #stack-sampling )
19
20
- [ Tracing using Perfetto] ( #tracing-using-perfetto )
@@ -229,6 +230,23 @@ bazel build //tools:analyze_pp_trace
229
230
./bazel-bin/tools/analyze_pp_trace --yaml-path pp-trace.yaml
230
231
```
231
232
233
+ ### Debugging using a local Clang checkout
234
+
235
+ Sometimes, the best way to debug something is to be able to put print statements
236
+ inside Clang itself. For that, you can stub out the usage of ` llvm-raw ` in ` fetch_deps.bzl `
237
+
238
+ ``` starlark
239
+ # Comment out the corresponding http_archive call
240
+ native.new_local_repository(
241
+ name = " llvm-raw" ,
242
+ path = " /home/me/code/llvm-project" ,
243
+ build_file_content = " # empty" ,
244
+ )
245
+ ```
246
+
247
+ After that, add print debugging statements inside Clang (e.g. using ` llvm::errs() << ` ),
248
+ and rebuild ` scip-clang ` like usual.
249
+
232
250
## Profiling
233
251
234
252
### Stack sampling
You can’t perform that action at this time.
0 commit comments