This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Plumb host architecture through platform selection
ClosedPublic

Authored by JDevlieghere on Mar 11 2022, 12:06 PM.

Details

Summary

Plumb the host architecture through platform selection in preparation for D121444.

Diff Detail

Event Timeline

JDevlieghere created this revision.Mar 11 2022, 12:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2022, 12:06 PM
Herald added a subscriber: emaste. · View Herald Transcript
JDevlieghere requested review of this revision.Mar 11 2022, 12:06 PM
JDevlieghere edited the summary of this revision. (Show Details)
labath accepted this revision.Mar 14 2022, 3:25 AM

I'm not sure what would be a good way to denote that the new argument represents the architecture of the host running the debugged process, and not the one running lldb. This isn't helped by the fact that some of the darwin platforms use GetSystemArchitecture in their implementations (which, afaict, does mean the lldb host architecture). Having at least a comment would be nice.

lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
134

I'm not sure the default argument value is that useful.

This revision is now accepted and ready to land.Mar 14 2022, 3:25 AM

I'm not sure what would be a good way to denote that the new argument represents the architecture of the host running the debugged process, and not the one running lldb. This isn't helped by the fact that some of the darwin platforms use GetSystemArchitecture in their implementations (which, afaict, does mean the lldb host architecture). Having at least a comment would be nice.

Maybe platform_host_architecture or platform_architecture?

I'm not sure what would be a good way to denote that the new argument represents the architecture of the host running the debugged process, and not the one running lldb. This isn't helped by the fact that some of the darwin platforms use GetSystemArchitecture in their implementations (which, afaict, does mean the lldb host architecture). Having at least a comment would be nice.

Maybe platform_host_architecture

Maybe. Maybe even process_host_architecture. But that's quite a mouthful.

or platform_architecture?

That still sounds confusing to me.

I'm not sure what would be a good way to denote that the new argument represents the architecture of the host running the debugged process, and not the one running lldb. This isn't helped by the fact that some of the darwin platforms use GetSystemArchitecture in their implementations (which, afaict, does mean the lldb host architecture). Having at least a comment would be nice.

Maybe platform_host_architecture

Maybe. Maybe even process_host_architecture. But that's quite a mouthful.

I prefer being verbose over ambiguous. Let's go with this.

or platform_architecture?

That still sounds confusing to me.

Agreed.

Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2022, 12:17 PM