Closed diohabara closed 2 years ago
Hi, could you provide the Python version of your GDB? (You can pi sys.version
inside GDB)
And it is probably because f-strings is a Python 3.6+ syntax, and you are using maybe Python 3.5 or something.
@lebr0nli
You're right. Then version of Python(usr/bin/python
) was 3.5.2
.
Is it possible to use python3
rather than python
to avoid this error? This is because python
command is often for prebuilt one and what I install is python3
.
Is it possible to use
python3
rather thanpython
to avoid this error? This is becausepython
command is often for prebuilt one and what I install ispython3
.
@diohabara, I'm afraid we can't. The only solution is compiling the GDB manually with --with-python=/the/path/to/your/python3
IIRC.
But actually, we can fix this problem by using %-formatting for better compatibility for the lower version.
But yeah, Python 3.5 is really old, should we change the code just for that?
What's the advantage or disadvantage if we changed the code?
I didn't have this kind of experience, so feel free to share your ideas with me :)
@diohabara
Anyway, I use %-formatting eventually, so the issue should be fixed now.
Let me know if it doesn't work for you.
@diohabara
Anyway, I use %-formatting eventually, so the issue should be fixed now.
Let me know if it doesn't work for you.
Seems there are bugs introduced.
@qiuwei, I merged that PR now Thanks for pointing it out!
When I installed as instructed in README,
I've got this error when starting GDB.