This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][NativePDB] Fix image lookup by address
ClosedPublic

Authored by zequanwu on Nov 12 2021, 5:39 PM.

Details

Summary

image lookup -a doesn't work because the compilands list is always empty.
Create CU at given index if doesn't exit.

Diff Detail

Event Timeline

zequanwu requested review of this revision.Nov 12 2021, 5:39 PM
zequanwu created this revision.
Herald added a project: Restricted Project. · View Herald Transcript
labath added inline comments.Nov 14 2021, 11:10 PM
lldb/test/Shell/SymbolFile/NativePDB/lookup-by-address.cpp
9

These fancy shell operations don't usually work on windows (which is pretty unfortunate, given this is a windows format).

Since the test executable will literally contain just the main function, maybe we could just pass a /base:BASE argument to the linker, and rely on the fact that the linker will place the function at BASE+0x1000 ?

zequanwu updated this revision to Diff 387348.Nov 15 2021, 11:55 AM
zequanwu marked an inline comment as done.

Use /base:0x400000 in test case.

labath accepted this revision.Nov 15 2021, 12:02 PM
labath added inline comments.
lldb/test/Shell/SymbolFile/NativePDB/lookup-by-address.cpp
13
This revision is now accepted and ready to land.Nov 15 2021, 12:02 PM
zequanwu marked an inline comment as done.Nov 15 2021, 12:30 PM
This revision was automatically updated to reflect the committed changes.