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

Fields members are not shown when inspecting a pointer to this user defined type. #114

Closed
mistymntncop opened this issue Jan 25, 2024 · 6 comments
Labels
Bug A report of unintended or broken behavior.

Comments

@mistymntncop
Copy link

Try this code. If you inspect the variable "foo" in the Watch View none of the field members are shown - you only see the pointer value. You can't expand the type. This is contrast with the result from RemedyBG which shows all the field members.

Untitlezzzd

#include <stdio.h>
#include <stdint.h>

typedef struct {
    uint32_t a;
    uint32_t b;
    uint32_t c;
    uint32_t d;
} Foo;

int main(void) {
    Foo foo_ = {1,2,3,4};
    Foo *foo = &foo_;
    
    return 0;
}
@ryanfleury
Copy link
Collaborator

Can you provide more information on how you are building this - what compiler, what version, with what flags, etc.? I am not seeing the same result on my end (x64 MSVC 19.23.28105.4), so this is probably a difference in how the compiler is generating the type reference for foo, and our converter is not resolving something correctly.

image

@ryanfleury ryanfleury added the Bug A report of unintended or broken behavior. label Jan 25, 2024
@mistymntncop
Copy link
Author

mistymntncop commented Jan 25, 2024

I am building using x64 MSVC compiler version "19.28.29337" and linker version "14.28.29337.0" (Visual Studio Community 2019 - Version 16.8.6).
Compiled with these flags: "cl -Zi -Od test.c"

edit: I noticed in my image the type is shown as "struct Foo *" whereas in your image it is "Foo *"

@ryanfleury
Copy link
Collaborator

Do you mind sending me the EXE/PDB? I can't seem to reproduce with a variety of compilers/versions. And once you've set those aside, can you see if you get different results after deleting the PDB & recompiling?

@mistymntncop
Copy link
Author

mistymntncop commented Jan 25, 2024

Sure thing, it's freshly built so there shouldn't be a problem with previous compilation results in the PDB. I got the same result after deleting the PDB and RADDBG.
test.zip

@ryanfleury
Copy link
Collaborator

ryanfleury commented Jan 25, 2024

@mistymntncop Looks like this was due to some new ways of encoding structs/classes in PDB, that we previously did not have paths for in the converter. As of 1319a23, this should be fixed. Mind pulling from dev, building, and giving it a try? (To ensure correct results you may have to either rebuild test.c or delete your existing .raddbg)

@mistymntncop
Copy link
Author

It is indeed working now :). Great :) !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A report of unintended or broken behavior.
Projects
None yet
Development

No branches or pull requests

2 participants