rainers / cv2pdb

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

symbols with name length > 4096 bytes #12

Closed sgrignard closed 8 years ago

sgrignard commented 8 years ago

Hello. I'm using cv2pdb to generate pdb files for c++ programs compiled with gcc 4.9. When using boost libraries in my program I get symbols names which are so long that they exceed the 4096 bytes of the kMaxNameLen constant defined in symutil.h. Changing the constant to a bigger size (8192 for instance) allows cv2pdb to output the pdb file but I'm not sure of the consequences of such a modification. Is the 4096 bytes a limit of pdb files or can it be changed freely ?

l0calh05t commented 8 years ago

Visual Studio only supports 4096-byte symbol names: https://msdn.microsoft.com/en-us/library/074af4b6.aspx Seems this might cause issues.

sgrignard commented 8 years ago

Ok so the right approach would be to truncate those names, I will have a look at it.

rainers commented 8 years ago

In the D compiler, the symbol for CodeView debug information is limited to 0xffd8 characters, so it seems there is a larger headroom.

rainers commented 8 years ago

I guess this should be fixed by https://github.com/rainers/cv2pdb/pull/13. Please reopen if the issue persists and provide an example binary.