This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Fix PDB/pointers.test for 32bit Arm/Windows
ClosedPublic

Authored by omjavaid on Jun 27 2022, 10:16 AM.

Details

Summary

PDB/pointers.test was orignally written for 32bit x86 keeping in mind
cdecl and stdcall calling conventions which does name mangling for
example like adding "_" underscore before function name.
This is only x86 specific but purpose of pointers.test is NOT to test
calling convention.
I am have made a few minor changes to this test which will make it pass
when run on Windows/Arm platform.
Ref

Diff Detail

Event Timeline

omjavaid created this revision.Jun 27 2022, 10:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 10:16 AM
omjavaid requested review of this revision.Jun 27 2022, 10:16 AM
omjavaid edited the summary of this revision. (Show Details)
omjavaid edited the summary of this revision. (Show Details)Jun 27 2022, 10:18 AM
omjavaid added inline comments.Jun 27 2022, 10:25 AM
lldb/test/Shell/SymbolFile/PDB/pointers.test
36

Explaining this change a dwarf location expression tag is added for variables deriving their address location from stack.

I presume this is ok - if the main intent of this test is to test handling of pointers and the size thereof in PDBs.

lldb/test/Shell/SymbolFile/PDB/pointers.test
2

I wonder if it'd be better to hardcode this to build for i386 (assuming the %build script allows that?) to keep it testing what it was originally made to test?

omjavaid added inline comments.Jun 27 2022, 12:45 PM
lldb/test/Shell/SymbolFile/PDB/pointers.test
2

Given we expect this to pass for Windows/Arm it will reduce coverage if made to run only for x86.

mstorsjo accepted this revision.Jun 27 2022, 1:20 PM
mstorsjo added inline comments.
lldb/test/Shell/SymbolFile/PDB/pointers.test
2

Right, as we probably need to link, that would require more of the host environment than we normally require (for other tests where we don't link things, we can compile things for x86 even if we're running on arm, as long as the x86 support is available in the compiler).

Given the structure of the lldb tests I guess this is more in line with how things normally are done here, so I guess this is fine.

This revision is now accepted and ready to land.Jun 27 2022, 1:20 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2022, 1:49 AM