cv2pdb icon indicating copy to clipboard operation
cv2pdb copied to clipboard

Lack of structures and classes forward declarations

Open ALEXYAL opened this issue 3 years ago • 1 comments

Lack of forward declarations in 2 cases:

1 ---------------
struct A {
  A* p; //self ptr
}; 
2 ---------------
struct {
} A; //alias typedef
struct B {
  A* p; //ptr to typedefed structure
}

In both cases DIA PDB engine cannot resolve "p" member and in debugger it is inaccessible (cvdump shows type NONE). DWRARF format has different structure and DIA PDB engine not so sophisticated to create maps and resolves symbols in second path.

So I've add synthetic forward declarations (and pointers) for all structures and problem completely gone. Not very nice solution, but it works. (see attached fix.zip file) fix.zip

ALEXYAL avatar Aug 30 '22 15:08 ALEXYAL

Thank you for contributing. It would be good if you could make a pull request with your changes so that it's easier to discuss them (e.g. removing the asserts is not so great), your authorship is kept in the commit log and the build checks are run before merging.

Can you also provide full examples demonstrating the issues?

rainers avatar Sep 02 '22 07:09 rainers