Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-8972] Expose the Host/Target current triple through the LLDB SB Python API #4358

Open
pvieito opened this issue Oct 11, 2018 · 5 comments

Comments

@pvieito
Copy link

pvieito commented Oct 11, 2018

Previous ID SR-8972
Radar rdar://problem/45217944
Original Reporter @pvieito
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels New Feature
Assignee None
Priority Medium

md5: 28fd0e1a01f0f253b5531c37120a311f

Issue Description:

Right now there is no way to get the current host triple or architecture from the SB Python API.

@AnnaZaks
Copy link
Mannequin

AnnaZaks mannequin commented Oct 12, 2018

@swift-ci create

@jasonmolenda
Copy link

Are you looking for the HOST triple? Or the target triple? e.g. lldb is running on a mac, debugging a process on a Linux system. I can see a usefulness to getting the triple for the Linux system. This would be similar to Target::GetArchitecture() and naturally live in SBTarget.

SBDebugger::{Get,Set}DefaultArchitecture exists but it's only useful in specialized circumstances.

@jasonmolenda
Copy link

Ah, I missed SBTarget::GetTriple() which will give you the target triple. I'd like to better understand the workflow that wants to know the host triple from lldb.

@pvieito
Copy link
Author

pvieito commented Oct 14, 2018

Hi! You can read a little bit of the underling motivations in the Swift Forums: https://forums.swift.org/t/jupyter-kernel-launch-the-debugger-with-the-current-triple-in-repl-mode/16795

The main problem is that currently there is no way to get the host and/or target current triple and architecture through the SB API. This would be useful for creating a REPL, for example.

@jasonmolenda
Copy link

Thanks for the link. You can get the current target triple if you have an SBTarget – SBTarget::GetTriple(). You're correct that lldb doesn't have any API to get the host triple right now.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants