This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [unittests] Add tests for NetBSD register offsets/sizes
ClosedPublic

Authored by mgorny on Dec 15 2020, 7:16 AM.

Diff Detail

Event Timeline

mgorny requested review of this revision.Dec 15 2020, 7:16 AM
mgorny created this revision.
krytarowski accepted this revision.Dec 15 2020, 9:57 AM
This revision is now accepted and ready to land.Dec 15 2020, 9:57 AM
labath added inline comments.Dec 17 2020, 12:10 AM
lldb/unittests/Process/Utility/CMakeLists.txt
4–5

What's reason for having these as separate files (vs. the all-in-one freebsd approach)?

lldb/unittests/Process/Utility/RegisterContextNetBSDTest_i386.cpp
9

I guess we could now (that we have other, unconditionally compiled files), upgrade this to if(CMAKE_SYSTEM_NAME == NetBSD)

mgorny added inline comments.Dec 17 2020, 12:29 AM
lldb/unittests/Process/Utility/CMakeLists.txt
4–5

struct reg collision. NetBSD doesn't have unique names like FreeBSD does.

labath accepted this revision.Dec 17 2020, 2:04 AM
labath added inline comments.
lldb/unittests/Process/Utility/CMakeLists.txt
4–5

I see. Somewhat unfortunate, but such is life... I'd consider splitting the FreeBSD version too, for consistency, but I don't feel very strongly about that..

mgorny updated this revision to Diff 312418.Dec 17 2020, 2:30 AM

Made sources conditional to platform via CMake. If this is good, I'll update FreeBSD afterwards.

mgorny marked 3 inline comments as done.Dec 17 2020, 2:30 AM
labath accepted this revision.Dec 17 2020, 4:38 AM

Looks good.

Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2020, 4:56 AM