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

Question regarding FieldAttributes::is_intro_virtual #113

Open
ergrelet opened this issue Mar 16, 2022 · 2 comments · May be fixed by #135
Open

Question regarding FieldAttributes::is_intro_virtual #113

ergrelet opened this issue Mar 16, 2022 · 2 comments · May be fixed by #135

Comments

@ergrelet
Copy link

ergrelet commented Mar 16, 2022

Hi,

I'm currently trying to write some code based on the pdb2hpp example.
I'm having trouble detecting/reconstructing pure virtual methods correctly. It seems it's not possible to check for the pureintro (0x06) property only, like it's possible with the purevirt property (0x01):
https://github.com/willglynn/pdb/blob/7c35c3c82fe42a0aa505c0715d57f68ee93196fb/src/tpi/data.rs#L627

What's the reason behind this merge (between property 0x04 and 0x06)? Am I missing something?

@TrinityDevelopers
Copy link

This appears to be because CV_MTintro and CV_MTpureintro can both refer to an intro virtual function. In my opinion the problem appears to be that the is_pure_virtual function doesn't check both CV_MTpurevirt and CV_MTpureintro properties since they both can refer to a pure virtual function.

@ergrelet
Copy link
Author

ergrelet commented Jul 3, 2022

Oh okay, interesting ... Well, I'm not sure what the intent of the API is, I was hoping @jan-auer could clarify.
is_static, is_virtual and is_pure_virtual suggest that the intent is to let the user access the attributes separately, without abstracting/merging them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants