This is a similar patch to https://reviews.llvm.org/D87172. Greg said we should also do it for functions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | ||
---|---|---|
2267–2270 | This is a bit more expensive than comparing against the m_first_code_address like we do in D87172. We could just modify the "if" statement on line 2256: if (lowest_func_addr >= m_first_code_address && lowest_func_addr != LLDB_INVALID_ADDRESS && lowest_func_addr <= highest_func_addr) { |
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | ||
---|---|---|
2267–2270 | yeah, I was not expecting to matter that much since it's only 2 function calls? |
Rewrote the test in lit.
I had to do it in an non standard way. It seems that lldb will exit with an error code if you do -b -o of a command that doesn't "work", (e.g.: image lookup finds nothing). Since lit runs this with set -o pipefail it will fail the FileCheck as well. To get around that I did echo ``, a bit lame but works.
echo `` is funny and creative, but I doubt it will work on windows. :) The way that other tests deal with that is they put the commands to run into a file, and then run
%lldb -o 'settings set interpreter.stop-command-source-on-error false' -s commands
For the command file, we have several options on how to create it:
- a separate Input/... file
- create it in the test with a sequence of echo commands
- use the llvm split-file utility to create it automatically from a single file
lldb/test/Shell/SymbolFile/DWARF/function-entries-invalid-addresses.yaml | ||
---|---|---|
6–13 | Now that the command interpreter doesn't stop when it encounters errors, you can merge these two checks into one. You can check for the commands in order to "divide" the output: # CHECK-LABEL: image lookup -F main # CHECK: 1 match found # CHECK-LABEL: image lookup -F foo # CHECK-NOT: 1 match found (CHECK-LABEL behaves like a regular CHECK, only it also gives a hint to FileCheck that the checks are independent -- so it will e.g. still try to match the second one if the first one fails). |
When I landed this I got test errors on the windows machine (the same tests pass on the other machine). I tried to repro this on 2 different machines I was able to get access but to no avail.
These are the failing tests: http://lab.llvm.org:8011/#/builders/83/builds/644 but when I ran lldb-test on the find-basic-function the output was what I would expect so not really sure how I can figure this out. Any ideas?
You can ask the bot owner (@stella.stamenova) if you have problems reproducing/understanding the failure.
clang-format not found in user's PATH; not linting file.