Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle > 2GB binary size #62

Open
roytam1 opened this issue Jul 17, 2020 · 5 comments
Open

handle > 2GB binary size #62

roytam1 opened this issue Jul 17, 2020 · 5 comments

Comments

@roytam1
Copy link

roytam1 commented Jul 17, 2020

I tried to split debug symbols from xul.dll which is compiled with gcc 8.1, and xul.dll file size is 2,882,488,917 bytes and cv2pdb returns "Can't get size". I think it may be cause by fstat can't handle this big size.

@rainers
Copy link
Owner

rainers commented Jul 18, 2020

Indeed, _fstat64 could be used instead, but I suspect that won't be the only place where assumptions will break. PR welcome ;-)

@roytam1
Copy link
Author

roytam1 commented Jul 20, 2020

but I suspect that won't be the only place where assumptions will break

yeah, MSVC's read() (i.e. _read()) can't handle 64bit counts.

@Feodor2
Copy link

Feodor2 commented Aug 25, 2020

Hi, i want to use cv2pdb for the same purpose too, malloc fails too. So i thing why it is to load the whole file, Setfilepointer handles >2gb good, then it will read\write the file by parts, not sure about mspdb stuff though, seems its undocumented i failed find any good info.

@rainers
Copy link
Owner

rainers commented Aug 25, 2020

The best information available I know of is in these files: https://github.com/microsoft/microsoft-pdb/tree/master/include (these were not available at the time this program was written). LLVM also has tools to generate CodeView debug info.

If your file is below 4 GB, it might be easiest to fix cv2pdb using a 64-bit build and trying to be stricter about using unsigned/signed sizes.
As you suggest it might be better to handle sections separately, though, to deal with even larger files (each section will have to be below 4 GB).

@roytam1
Copy link
Author

roytam1 commented Mar 22, 2021

... and semi-OT: there is a patch for gcc/binutils to generate pdb directly:
https://gcc.gnu.org/pipermail/gcc-patches/2021-March/567030.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants