-
Notifications
You must be signed in to change notification settings - Fork 56
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
Stack dump failure with some clang-compiled 32-bit binaries #29
Comments
I'll look into this. For my reference, which version of LLVM/Clang are you using? If you want symbols, you should try passing I think that the fact that SDL is required to repro this is not coincidence. Prbably LLVM/Clang linker is having troubles in merging the DWARF debugging info from SDL static libraries.
So my initial reading is that the LLVM/Clang is producing invalid DWARF. But the symbols are still there in CODEVIEW format. And GDB might be ignoring all DWARF, but DrminGW assumes DWARF is ok, so it never looks at CODEVIEW symbols. |
I did use clang 3.9 rc3 downloaded from llvm.org if I remember correctly. I do remember reproducing the issue with 3.8 as well, however. |
The problem here is that you used This is because DrMingw/MgwHelp are not currently capable of unwinding the stack unless there is PDB information, or frame pointer is used. Furthermore by conicidence Use DWARF debug info to unwind the stack (like gdb does) would be nice, and is mentioned on https://github.com/jrfonseca/drmingw/blob/master/TODO.md but there's no ETA. The only thing I could do is make the code a bit more forgiving towards |
You are correct, I completely forgot about However, despite Also, I tried using pdb file generation with |
I agree that for the ExcHndl case, requiring We could indeed either dump a few bytes or do some sort of small analysis like http://www.hexblog.com/?p=104 . The big difficulty is to detect when StackWalk fails due to lack of frame pointer, or merely because it reached the bottom of the stack. If it gets too complicated, it might be better to spend that time in implement stack unwind via |
It might be my own ignorance but are not CallStackWalk is an interesting idea, and I feel that it might work rather reliably. I am not fully positive but perhaps generating the call stack could be done according to user preference? Or this method could be used in parallel with the general stack reconstruction. |
My understanding is that Also, it seems nowadays |
Hmmm, it looks like you are right regarding gcc at least. Similarly to gcc LLVM does not change the optimisation given that a As for stripping I think that's what most people do due to size, so I would expect symbol names to be simply missing in general case, which makes I spent a few minutes writing IDA's algo in C++, and it seems to produce relatively decent addresses for me. If you find time to integrate it into Dr. Mingw I will appreciate it.
|
Hello,
I ran into an issue when debugging clang created binaries. Under certain conditions I get empty stack, even though gdb does manage to produce something:
Dr. Mingw report
gdb output
Regards,
Vit
The text was updated successfully, but these errors were encountered: