Skip to content
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

GDB Pretty Printing of Vector depends on deprecated member #12522

Closed
TLJB opened this issue Jun 29, 2021 · 3 comments
Closed

GDB Pretty Printing of Vector depends on deprecated member #12522

TLJB opened this issue Jun 29, 2021 · 3 comments

Comments

@TLJB
Copy link
Contributor

TLJB commented Jun 29, 2021

I have recently tried to use the pretty printer functions for gdb supplied in contrib/utilities/dotgdbinit.py to print the values
of a Vector object. This fails with the error message:

Python Exception <class 'gdb.error'> There is no member or method name data_end.:

This problem first ocured after upgrading from version 9.2 to #9.3.
Other pretty printer functions (for example for tensors and points) function as expected.
After some digging I've found that gdb tries to use the members data_end and data_begin of the AlignedVector class
to calculate the length of the vector and to iterate over the container.
Both members where present in deal 9.2 but seem to have been deprecated in version 9.3.

As such the pretty printer function no longer works.

In order to reproduce the problem install the pretty printer functions as described here.
Then debug the step-3 tutorial using gdb and try to print the system_rhs vector.

@bangerth bangerth added this to the Release 10.0 milestone Jul 2, 2021
@bangerth
Copy link
Member

bangerth commented Jul 2, 2021

True. The same is the case for the AlignedVector class. We ought to fix this.

@TLJB Is this something you'd like to try your hand on? I think this could make for a good patch!

@TLJB
Copy link
Contributor Author

TLJB commented Jul 5, 2021

I fixed the issue and made a pull request ( #12546 ).
This is my first time contributing so if anything is not up to code please let me know and I'll try to fix it.

@bangerth bangerth changed the title GDB Pretty Printing of Vector depents on deprecated member GDB Pretty Printing of Vector depends on deprecated member Jan 7, 2022
@bangerth
Copy link
Member

bangerth commented Jan 8, 2022

I double checked both the Vector pretty printer and all of the others, and they all currently work. So closing.

@bangerth bangerth closed this as completed Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants