This is an archive of the discontinued LLVM Phabricator instance.

[Process/NetBSD] Copy changes from FreeBSDRemote and reformat
ClosedPublic

Authored by mgorny on Dec 18 2020, 7:11 AM.

Details

Summary

Copy changes, including:

  • NativeProcessNetBSD::GetLoadedModuleFileSpec() and NativeProcessNetBSD::GetFileLoadAddress() methods
  • split x86 register sets by CPU extensions
  • use offset/size-based register reading/writing

Diff Detail

Event Timeline

mgorny created this revision.Dec 18 2020, 7:11 AM
mgorny requested review of this revision.Dec 18 2020, 7:11 AM
labath accepted this revision.Dec 20 2020, 1:16 AM
labath added inline comments.
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
41

I don't know if this namespace snuck into the FreeBSD file, but generally, this is not the proper use of anonymous namespaces in llvm. See the coding standards for more details.

This revision is now accepted and ready to land.Dec 20 2020, 1:16 AM
mgorny added inline comments.Dec 20 2020, 3:47 AM
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
41

I guess I've copied it from Linux. Should I eliminate it entirely or move to lldb_private::process_netbsd?

labath added inline comments.Dec 21 2020, 11:42 AM
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
41

Remove it, and use "static" instead. Objects which are local to a file should be marked as such. Just, according to the coding standards, we should use "static" whereever possible. I've just done something like that in linux with 3f3ab03ab7b.

mgorny updated this revision to Diff 313201.Dec 21 2020, 2:24 PM
mgorny retitled this revision from [Process/NetBSD] Copy changes from FreeBSDRemote and reformat [WIP] to [Process/NetBSD] Copy changes from FreeBSDRemote and reformat.
mgorny edited the summary of this revision. (Show Details)

Fixed FPR writing bug, updated tests and removed anonymous namespace.

mgorny marked 2 inline comments as done.Dec 21 2020, 2:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 2 2021, 10:15 AM