-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
lldbDataFormatters: fix type error in StringRef printer #82554
base: main
Are you sure you want to change the base?
Conversation
It appears we cannot use keyword arguments for GetPointeeData() and instead have to rely on positional arguments. ``` Traceback (most recent call last): File ".../llvm-project/llvm/utils/lldbDataFormatters.py", line 245, in StringRefSummaryProvider data = valobj.GetChildAtIndex(0).GetPointeeData(item_count=length) TypeError: GetPointeeData() got an unexpected keyword argument 'item_count' ```
The patch is clearly semantically equivalent to the existing code and correct. But @JDevlieghere why wouldn't the keyword argument work? |
This should work (and does work locally for me). The only explanation I can think of is that this is being called with (older) bindings that don't have the variable names, but it seems to have been like this forever. What version of LLDB and Python are you using? If you know where the Python bindings live, it would be great to look at the signature of the function. For me it looks like this:
|
I am using LLDB bundled with CLion, I will see if I can find the Python bindings. |
I see the following in I will file an issue with Jetbrains to see if they can adjust their bindings generation to emit named arguments. |
Reported to Jetbrains as https://youtrack.jetbrains.com/issue/CPP-37686 (@broadwaylamb not sure if you're the right person to investigate this?) |
Not quite, but I'm sure folks from the CLion team will do their best :) Thank you for creating the ticket btw. |
It sounds like this has been fixed in CLion 2024.1. I'm not sure if we should still merge this for older versions or just close it. |
It appears we cannot use keyword arguments for GetPointeeData() and instead have to rely on positional arguments.