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

Allow reading debug symbols from external files #11

Closed
renatosilva opened this issue Jun 2, 2015 · 9 comments
Closed

Allow reading debug symbols from external files #11

renatosilva opened this issue Jun 2, 2015 · 9 comments

Comments

@renatosilva
Copy link

Can you please allow for reading debug symbols from external files, like implemented in this old fork? Thanks in advance.

@jrfonseca
Copy link
Owner

I don't know if you noticed, but I recently added support for .gnu_debuglink -- https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html -- which is the standard way of doing this sort of thing with GDB/MinGW.

I'm afraid I'm not interesting in supporting a non-standard way.

@dismine
Copy link

dismine commented Jun 2, 2015

Do you know that feature no more works?

@jrfonseca
Copy link
Owner

Do you know that feature no more works?

@dismine , are you saying that .gnu_debuglink doesn't work anymore?

I wrote a unit test for it (test_mgwhelp_stripped) , and it is passing on multiple machines. So it works at least in some cases. If it doesn't work for you please file a bug report and provide more information.

@dismine
Copy link

dismine commented Jun 2, 2015

@dismine , are you saying that .gnu_debuglink doesn't work anymore?

Yes, i do. And wrote you a letter about it.

If it doesn't work for you please file a bug report and provide more information.

Ok, i will make a bug report.

@jrfonseca
Copy link
Owner

Yes, i do. And wrote you a letter about it.

OK. Indeed I got your email about the regression, and I got it starred for further action, but when I read it, I somehow mixed up with your other email thread about line number differences, and not the split debug symbols issue.

Thanks for the issue report though. It's easier for me to track these things in the issue tracker.

@renatosilva
Copy link
Author

@jrfonseca, GDB seems to organize the symbol files based on FHS structure, which is usually not applicable to Windows programs. They will unlikely support non-FHS models such as Program Files. So instead of spreading .debug files or subdirectories all over the place, your application is usually better organized if you keep them within a simple, separate subdirectory. The commit I mentioned allows for this with SetDebugInfoDir.

@jrfonseca
Copy link
Owner

Currently the debug files have to be in same dir as the executables.

If that's insufficient I'd rather add support for searching the MinGW debug files into _NT_SYMBOL_PATH

@renatosilva
Copy link
Author

Using the structure expected by GDB instead of implementing SetDebugInfoDir is convenient because it can find the symbols automatically, yes. But GDB will also search for the symbol files within a .debug folder alongside the executable, so could you implement this as well?

@jrfonseca
Copy link
Owner

But GDB will also search for the symbol files within a .debug folder alongside the executable, so could you implement this as well?

Yes, that seems a good idea. I'm not sure exactly when to do it -- I'm tired of ugly and buggy filepath manipulation code, and want to start using strsafe.h or std::string. But please file a bug and I'll eventually get around to do it.

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