EpicGamesExt/raddebugger

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

Closed this issue · 6 comments

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;
}

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

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 *"

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?

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

@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)

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