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
Packaging location of GDB script files #179
Comments
When I contributed the pretty-printers to Corrade and Magnum, I didn't know there was a "standard" location for them. I need to make a PR to update the Corrade printers (turns out something in |
Oh wow, RPM packages included directly in the distro! 🤩 Putting them into @williamjcm I think this change would fix the String SSO printing (similar as #165 for MSVC natvis). If you confirm it works, I'll commit that together with changing the install path, the remaining containers aren't as critical as this fix I think. Having an enum for that value isn't needed in my opinion, the ABI for the string classes is unlikely to change anymore as there are no more unused bits in their representation. diff --git a/src/debuggers/gdb/printers.py b/src/debuggers/gdb/printers.py
index 69e9a275a..b66f5e013 100644
--- a/src/debuggers/gdb/printers.py
+++ b/src/debuggers/gdb/printers.py
@@ -386,7 +386,8 @@ class CorradeString(CorradeStringTypePrinter):
"""Prints a Containers::String"""
def to_string(self):
- if bool(self.val['_small']['size'] & 0x80) is True:
+ # 0x40 is Implementation::SmallStringBit
+ if bool(self.val['_small']['size'] & 0x40) is True:
return self.val['_small']['data'].string(length=int(self.val['_small']['size'] & ~0xc0))
return self.val['_large']['data'].string(length=int(self.val['_large']['size']))
|
Yes, it does. |
@williamjcm I made some changes to the directory layout to keep the usage consistent between the installed and in-source case, could you verify it still works as expected and the docs are reasonable? It's 8d14558 in the Thanks again! |
So, in that commit, things get installed in
Using the Python module from anywhere else than the standard location (such as a submodule) would still require adding the right folder to On another note, I noticed this from the OP's quote:
I checked on my machine, and did find a few Python scripts for libstdc++, GLib, GStreamer, and a few other libs, which pretty much did the same things as the |
Argh, I messed up the I also have a few libs in the |
The path is now correct indeed. |
Thanks, pushing 4922edf to |
I got the comments from a reviewer [1], which I filed a ticket to make corrade package into Fedora.
corrade/src/debuggers/CMakeLists.txt
Lines 27 to 43 in f21fc1d
I have little knowledge about GDB script files. The reviewer suggested putting the pretty printers related files of corrade for gdb into
/usr/share/gdb/python/corrade
, which the files go into/usr/share/corrade/debuggers/gdb
currently. I quoted the reviewer's comment below:[1] https://bugzilla.redhat.com/show_bug.cgi?id=2226670#c3
The text was updated successfully, but these errors were encountered: