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

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 ?

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

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

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.


Edited by Simon Anciaux on

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


Replying to bumbread (#26584)