vek
July 29th, 2006, 10:41 PM
Hello there. I'm still getting into linux dev here, got a few apps working cleanly now, but I have a few loose ends to tie up. Perhaps some seasoned coders can help me here.
How do y'all debug your release applications? For example, those that are in the public, and crashing. Is there some standard way?
In the current windows environment, I have the app save a minidump out to file, and keep the program database (pdb file) for that particular release, and the source code. Then if it crashes, I get ahold of the minidump, double click it, and through automagic, goes directly to the line number/source code where it crashed. It even has the complete stack, with function names and everything. Its multi-thread safe, even.
Is there a clean way to reproduce this same behavior in a linux environment? Once my programs start to get more complex, I'm going to need to be able to accept some sort of crash dump (cores perhaps) and quickly get to the stack / file source, without having to go through some crazy procedure of looking up source offsets in map files, etc... and it needs to be from release-compiled binaries that themselves have no debugging information embedded. I'm sure there's a way to do this... windows can... but how? Ideally it'd be just as clean - open the core file up in some sort of IDE, and have it show the stack / go directly to the C++ source where the error occured.
It doesnt matter if I have to use a special library to do this, or code the program in a specific way - since I'm just starting out, I can establish those procedures right now, to save myself time and effort later. So long as it doesnt take me ages, later on, to get to 'where it crashed'.
So... anyone got suggestions / help?
How do y'all debug your release applications? For example, those that are in the public, and crashing. Is there some standard way?
In the current windows environment, I have the app save a minidump out to file, and keep the program database (pdb file) for that particular release, and the source code. Then if it crashes, I get ahold of the minidump, double click it, and through automagic, goes directly to the line number/source code where it crashed. It even has the complete stack, with function names and everything. Its multi-thread safe, even.
Is there a clean way to reproduce this same behavior in a linux environment? Once my programs start to get more complex, I'm going to need to be able to accept some sort of crash dump (cores perhaps) and quickly get to the stack / file source, without having to go through some crazy procedure of looking up source offsets in map files, etc... and it needs to be from release-compiled binaries that themselves have no debugging information embedded. I'm sure there's a way to do this... windows can... but how? Ideally it'd be just as clean - open the core file up in some sort of IDE, and have it show the stack / go directly to the C++ source where the error occured.
It doesnt matter if I have to use a special library to do this, or code the program in a specific way - since I'm just starting out, I can establish those procedures right now, to save myself time and effort later. So long as it doesnt take me ages, later on, to get to 'where it crashed'.
So... anyone got suggestions / help?