This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Require x86 for various NativePDB, Breakpad and Minidump tests
ClosedPublic

Authored by DavidSpickett on Apr 9 2021, 6:39 AM.

Details

Summary

These tests fail if you build without the x86 llvm backend.
Either because they use an x86 triple or try to backtrace which
requires some x86 knowledge to see all frames.

Diff Detail

Event Timeline

DavidSpickett created this revision.Apr 9 2021, 6:39 AM
DavidSpickett requested review of this revision.Apr 9 2021, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2021, 6:39 AM

(not adding a reviewer for each file type since most are pretty straightforward I think)

DavidSpickett added inline comments.Apr 9 2021, 6:47 AM
lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test
45

Same thing happens here if you don't have x86 enabled, this last frame is missing.

lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
13

@labath In this case, without the x86 backend we do get the first 3 frames just not the kernel32.dll frame.

(lldb) target symbols add ../llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-raSearch.syms
symbol file '/home/david.spickett/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-raSearch.syms' has been added to '/home/david.spickett/build-llvm-aarch64/foo/foo.exe'
(lldb) thread backtrace
* thread #1
  * frame #0: 0x000b1092 foo.exe`many_pointer_args + 2
    frame #1: 0x000b1079 foo.exe`call_many + 105
    frame #2: 0x000b1085 foo.exe`main +

So my guess is that the last frame requires x86 specific knowledge to work out. If you think that's not the case or would prefer I investigate first I can remove it from this patch.

labath added inline comments.Apr 13 2021, 5:36 AM
lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
13

Nah, that's fine. I'm pretty sure that is what's happening, and overall, I would actually say lldb should flat out refuse to open binaries/core files/etc. for which it does not have an appropriate back end....

labath accepted this revision.Apr 13 2021, 5:36 AM
This revision is now accepted and ready to land.Apr 13 2021, 5:36 AM