-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
debuginfo: Add GDB pretty printers for structs and enums. #16322
Conversation
Is the pretty printer file also something that we should be installing with rust itself? If so, where to? |
Yes that would be a good idea but we need to do a few things in order for GDB to actually use the pretty printers:
So, in order to make this usable, we need to make sure that the pretty printer Python modules is added to some location in the Rust installation then make sure to add these locations to GDB auto-loading safe path. I guess the best way to do this would be to provide a shell-script that starts GDB with the additional needed parameters (see the scripts the autotesting framework creates). You would then call GDB via We would also have to make sure that rustc either creates the auto-loading script or adds the |
Ok, sounds like we should try to tackle installation at a later date. |
Added installation issue #16365 |
Hm, it seems that the GDB version on the build infrastructure doesn't support the |
The problem with |
Well, it seems that in GDB 7.4 one can't access anonymous fields from Python yet, so that means we can't support tuples there. |
7f67dd4
to
2eabca9
Compare
OK, this works on the try branch now. I've added the possibility to require a minimum GDB version for debuginfo tests. If the GDB version used is too low, the test is ignored.
On the linux build bot it seems to be:
And locally on my machine it's:
This will definitely need some more work in the future. I'm not sure if this is ready to merge yet :/ |
then | ||
# Extract the version | ||
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1 \ | ||
| sed -e 's/.*\([0-9]\+\.[0-9]\+$\)/\1/' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is obviously still inadequate as it yields 2.04
for the version string on the build bots, which is probably something like GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
...
Here's what's on the main Linux slaves:
|
ec0c124
to
b526028
Compare
8f9dfb2
to
e72e4df
Compare
OK, I've updated this. It appears that |
Also extends the autotest framework to let a test case choose if pretty printing should be enabled.
Also extends the autotest framework to let a test case choose if pretty printing should be enabled.