Skip to content

PDB mode pretty instable #31

@s9w

Description

@s9w

The Clang mode wasn't viable to my usecases, so all of this only refers to the PDB mode.

I'm still having trouble getting it to work reliably. For example right now, this program leads to the usual "no structure found at the given position" dialog:

#include <string>
#include <vector>

struct str
{
   char a;
   int b;
   char c;
};

int main()
{
   str t{};
   return 0;
}

If I remove the vector include or change the struct layout, things work. For example if I change the struct to

struct str{
   int a;
}

it works. If I then change back to the original struct, I get this:

image

So he somehow reads back the old code. All of this is pretty unreliable and I can often get a code to work which did not prior and the other way round. In particular I found a rebuild fix the "wrong struct" errors.

So there are really two main problems:

  1. Displaying old layouts (fixable by rebuild)
  2. Things not working at all (Some fixable by rebuild, but some never)

I'm using VS2022, debug mode and have things compiled and cursor on the first line, just as instructed.

The overall pattern what works and what not isn't clear. The unfixable errors certainly happen more often in complex types from "real" projects. They might have things like members of library types, precompiled headers, functions, forced includes etc. Not sure if any of that makes things harder on the parsing side. Those complexities make it harder to isolate the problem unfortunately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions