rainers / cv2pdb

converter of DMD CodeView/DWARF debug information to PDB files
Artistic License 2.0
472 stars 109 forks source link

assert(id.tag == idspec.tag); #4

Closed pmalhaire closed 9 years ago

pmalhaire commented 9 years ago

hello, I am using this nice program to debug mingw program and depending on commits of my project I got the error assert(id.tag == idspec.tag);

cv2pdb.exe!_NMSG_WRITE(int rterrnum) Ligne 226 C cv2pdb.exe!abort() Ligne 62 C cv2pdb.exe!_wassert(const wchar_t * expr, const wchar_t * filename, unsigned int lineno) Ligne 156 C cv2pdb.exe!CV2PDB::createTypes() Ligne 695 C++ cv2pdb.exe!CV2PDB::createDWARFModules() Ligne 880 C++ cv2pdb.exe!wmain(int argc, wchar_t * * argv) Ligne 183 C++

raised or not

when it's raised my program crashes at startup says : exception at 0x00401010 in fcfspdb.exe : 0xC0000005 : access violated when writing at adress 0x00401010.

fcfspdb.exe!pre_c_init() Ligne 127 C++ [External code] fcfspdb.exe!__tmainCRTStartup() Ligne 263 C++ [External code]

what does this assert stand for I am new to this kind of debugging and any help is appreciated,

I am using i686-w64-mingw under cygwin64 on windows 7

regards, Pierre

pmalhaire commented 9 years ago

note : I found a workarround specifing alternatively -g3 or -g as gcc option but it slows the debug a lot (for -g3) and alternatively creates the same problem sometime -g works sometimes it's -g3

rainers commented 9 years ago

It seems there is some inconistency about the DW_AT_specification record in the DWARF info. Could you provide an example executable that triggers the assert?

pmalhaire commented 9 years ago

I am tring to reduce the use case

sgrignard commented 9 years ago

Hello. I have the same problem with my executables, here is an example from the Qt library which triggers the assert. I'm also compiling using mingw 4.9.1 on windows 7. Please tell me if you need other informations or files.

Regards,

Sébastien.

rainers commented 9 years ago

I've checked the example and it suggested that the assert is invalid. That example didn't pass without it, though, because it also used a special encoding for "wchar_t" that was not supported so far. I've pushed both changes to master, please try these.

sgrignard commented 9 years ago

OK, the generation of the PDB is now fine for me.

Thank you.

pmalhaire commented 9 years ago

It was the same issue in my side issue solved thx @sgrignard & @rainers