This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add a getter for the process' system architecture
ClosedPublic

Authored by JDevlieghere on Mar 10 2022, 11:00 PM.

Details

Summary

This patch adds a getter for the process' system architecture. I went with Process::GetSystemArchitecture to match Platform::GetSystemArchitecture.

Diff Detail

Event Timeline

JDevlieghere created this revision.Mar 10 2022, 11:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 11:00 PM
labath added inline comments.Mar 11 2022, 1:29 AM
lldb/source/Target/Process.cpp
2654 ↗(On Diff #414586)

This is only a good default for local process plugins. Since we have just one (windows) of those right now, it might be better to put it there.

  • Only return the host architecture in NativeProcessWindows
JDevlieghere marked an inline comment as done.Mar 11 2022, 9:09 AM
labath accepted this revision.Mar 11 2022, 10:43 AM
labath added inline comments.
lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.h
75 ↗(On Diff #414678)

This should go in ProcessWindows.h. NativeProcessWindows is the not-fully-functional lldb-server-based implementation. Also, drop the Process::

This revision is now accepted and ready to land.Mar 11 2022, 10:43 AM
tschuett added inline comments.
lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
236 ↗(On Diff #414678)

two spaces?

JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.
lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
236 ↗(On Diff #414678)

I think we have bigger problems than that. But clearly this file isn't getting build for me.

This revision was landed with ongoing or failed builds.Mar 11 2022, 10:58 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2022, 10:58 AM