Skip to content

Running Python scripts inside LLDB on Ubuntu 20.04 is broken #4770

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

Open
adam-fowler opened this issue May 29, 2022 · 3 comments
Open

Running Python scripts inside LLDB on Ubuntu 20.04 is broken #4770

adam-fowler opened this issue May 29, 2022 · 3 comments

Comments

@adam-fowler
Copy link

adam-fowler commented May 29, 2022

When I try to run a simple python script in LLDB it fails in both Swift 5.6.1 and the latest nightly

Steps

  1. Open terminal and enter lldb
  2. Enter script print(lldb.SBHostOS.GetLLDBPath(lldb.ePathTypeLLDBShlibDir).fullpath)

Using Swift 5.5 I get the library path for lldb
Using Swift 5.6 I get the following output

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
error: python failed attempting to evaluate 'print(lldb.SBHostOS.GetLLDBPath(lldb.ePathTypeLLDBShlibDir).fullpath)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'lldb' is not defined

Using the latest nightly
After step 1 I get this output

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb'

And after step 2 I get pretty much the same output as Swift 5.6

Swift 5.6 and later also fail on even simpler scripts like script print("hi").

Environment

OS: 20.04.4 LTS (Focal Fossa)
Swift version: 5.6.1 and 2022-05-27-a nightly
Python version: 3.8.10

@JDevlieghere
Copy link

JDevlieghere commented Jun 15, 2022

What's the output of lldb -P?

@adam-fowler
Copy link
Author

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb'
/home/adamfowler/.swiftbox/toolchain/swift-2022-05-27-a/usr/lib/python3/dist-packages

@adam-fowler
Copy link
Author

Is there any update on this? It appears this is still not resolved in the latest nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants