RemedyBG»Forums
34 posts / 1 project
Remedy doesn't correctly un-pointer the type of structs declared within functions

Reproduction:

  1. Declare a struct type within functions
  2. Declare a variable of that type
  3. Make a pointer to that variable
  4. Use RemedyBG to view the value of the pointed-by struct

Screenshot:

image.png

Simon Anciaux
1260 posts
Remedy doesn't correctly un-pointer the type of structs declared within functions

It working for me in RemedyBG 0.3.7.1, using MSVC 2019 and compiling with cl main.cpp -Zi.

What version of RemedyBG do you use ? Which compiler and build flags ?

265 posts / 1 project
None
Remedy doesn't correctly un-pointer the type of structs declared within functions

FWIW, works fine with clang-cl 10, 11, 12, and 14 as well.

34 posts / 1 project
Remedy doesn't correctly un-pointer the type of structs declared within functions

I was using Remedy 0.3.7.0. I checked with remedy 0.3.7.1 (latest), and the bug persists. The compilation command I was using is

clang main.c -g

The bug persists if I compile with MSVC:

cl main.c /Z7
Simon Anciaux
1260 posts
Remedy doesn't correctly un-pointer the type of structs declared within functions
Edited by Simon Anciaux on

With MSVC you need Zi, I believe Z7 is not supported by RemedyBG.

For clang you need -gcodeview to generate MSVC style debug information.

clang main.cpp -g -gcodeview

EDIT: It doesn't work with clang when using C instead of CPP.

265 posts / 1 project
None
Remedy doesn't correctly un-pointer the type of structs declared within functions
Replying to bumbread (#26584)

Seems like Clang's PDB gen is bugged in this case (missing forward reference used by main::POG*). Visual Studio / WinDBG also cannot dereference pp. Visual Studio is actually worse in that it cannot even show p properly for some reason. The bug can persist if the PDB was first generated with clang and not deleted before running cl.

Running cl /Z7 main.c works fine (after first deleting the PDB that Clang gen'd).