Click here to Skip to main content
15,911,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to find reason why application crashes? Pin
Maxwell Chen10-May-06 19:03
Maxwell Chen10-May-06 19:03 
AnswerRe: how to find reason why application crashes? Pin
Stephen Hewitt10-May-06 19:05
Stephen Hewitt10-May-06 19:05 
GeneralRe: how to find reason why application crashes? Pin
voorugonda prashanth10-May-06 19:11
voorugonda prashanth10-May-06 19:11 
GeneralRe: how to find reason why application crashes? Pin
Stephen Hewitt10-May-06 19:12
Stephen Hewitt10-May-06 19:12 
AnswerRe: how to find reason why application crashes? Pin
kakan10-May-06 19:30
professionalkakan10-May-06 19:30 
GeneralRe: how to find reason why application crashes? Pin
Stephen Hewitt11-May-06 3:57
Stephen Hewitt11-May-06 3:57 
GeneralRe: how to find reason why application crashes? Pin
kakan11-May-06 20:27
professionalkakan11-May-06 20:27 
GeneralRe: how to find reason why application crashes? Pin
Stephen Hewitt11-May-06 20:38
Stephen Hewitt11-May-06 20:38 
kakan wrote:
inform me about the reported crash addr

 This technique is flakey. For example, if the crash is in a DLL the DLL may not be mapped to the same location on all machines as DLLs are rebased if need be. Even on two machines on which they would normally be mapped at the same address running an application that installs a global hook using the SetWindowsHookEx may be enough for it not to be if the DLL is loaded and the hook DLL happens to overlap the DLLs preferred load address. If the crash is in the EXE rebasing is not a problem as EXEs are always loaded at their preferred base address.

Even so, if you've only got a crash address, the following technique will get the symbol name from an address using WinDBG just like with the MAP file technique:
 1. Debug the .EXE using WinDBG.
 2. Break into the debugger.
 3. Enter the following command: "ln 0x01001000". Where the number is the crash address. He's the output from doing this in notepad:
0:000> ln 0x01001000
(01001000)   notepad!_imp__RegQueryValueExW   |  (01001004)   notepad!_imp__RegCloseKey
Exact matches:
    notepad!_imp__RegQueryValueExW = <no type information>


At a previous job I used to do a lot of postmortem debugging. I actually used to use the map file technique. I wrote an application that used to get a symbol name from a map file and an address and could even make a stack trace from a Dr.Waston log (not a dump) and a MAP file. That was before I discovered it was "the hard way".


Steve
GeneralRe: how to find reason why application crashes? Pin
kakan11-May-06 20:51
professionalkakan11-May-06 20:51 
QuestionHow to use Recordset open a stream object Pin
WillTian10-May-06 17:56
WillTian10-May-06 17:56 
AnswerRe: How to use Recordset open a stream object Pin
Stephen Hewitt10-May-06 18:29
Stephen Hewitt10-May-06 18:29 
AnswerRe: How to use Recordset open a stream object Pin
Stephen Hewitt10-May-06 18:59
Stephen Hewitt10-May-06 18:59 
GeneralRe: How to use Recordset open a stream object Pin
WillTian10-May-06 19:09
WillTian10-May-06 19:09 
QuestionHow to issue SQL command in MFC C++? Pin
Ting Li Che10-May-06 15:41
Ting Li Che10-May-06 15:41 
AnswerRe: How to issue SQL command in MFC C++? Pin
John M. Drescher10-May-06 17:59
John M. Drescher10-May-06 17:59 
AnswerRe: How to issue SQL command in MFC C++? Pin
David Crow11-May-06 2:43
David Crow11-May-06 2:43 
QuestionHow to program to set the mouse properties? Pin
flyingxu10-May-06 15:03
flyingxu10-May-06 15:03 
AnswerRe: How to program to set the mouse properties? Pin
Stephen Hewitt10-May-06 15:34
Stephen Hewitt10-May-06 15:34 
Questionhow to create a CBitmap object from a bitmap file? Pin
includeh1010-May-06 11:28
includeh1010-May-06 11:28 
AnswerRe: how to create a CBitmap object from a bitmap file? Pin
Michael Dunn10-May-06 14:07
sitebuilderMichael Dunn10-May-06 14:07 
AnswerRe: how to create a CBitmap object from a bitmap file? Pin
Hamid_RT10-May-06 18:32
Hamid_RT10-May-06 18:32 
GeneralRe: how to create a CBitmap object from a bitmap file? Pin
Andy Rama10-May-06 21:07
Andy Rama10-May-06 21:07 
GeneralRe: how to create a CBitmap object from a bitmap file? Pin
Hamid_RT10-May-06 21:55
Hamid_RT10-May-06 21:55 
GeneralRe: how to create a CBitmap object from a bitmap file? Pin
Andy Rama10-May-06 22:58
Andy Rama10-May-06 22:58 
GeneralRe: how to create a CBitmap object from a bitmap file? Pin
Hamid_RT11-May-06 0:19
Hamid_RT11-May-06 0:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.