Re: C++ parser for diagnostics



Thanks very much for that response.

I was thinking of this code beyond just exception handling, but the minidump
stuff sounds neat so we'll look into that too.

I guess the _penter logic can't determine the file/line/funcname of the
function being entered? I'll check it out though.

I was more thinking of a source level preprocessor to addresss this
requirement.

Thanks for the ideas though,
Dave


"Jochen Kalmbach [MVP]" <nospam-Jochen.Kalmbach@xxxxxxxxx> wrote in message
news:%23EEGvhCQFHA.1392@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Dave!
>
> > All I want to do is to insert a line before every C++ statement in my
> > application, so that the line is executed before the statement. The line
> > would be a diagnostic call which would put a line out to a file
containing
> > the current line number etc being executed. This would give me a crude
map
> > of what code was run, and help when I get a crash to know what was the
last
> > line run before the crash.
>
> Why do you want to make such "slow" implementation just for the case
> your application crashes?
> Why not just create a minidump-file in your own
> Unhandled-Exception-Filter? And then you see at least the callstack and,
> depending on the settings, even more infos. To make it "handy" you can
> use the "symstore" program and "symsrv" to store/retrive the exe/pdb
files.
> This is the recommended way.
>
> But if you want to trak it by your won, you can use the /Gh compiler
> switch. This allows at least the tracking if function-enter/exit (via
> _penter / _pleave)
>
> See: /Gh (Enable _penter Hook Function) (Visual C++ Concepts)
> http://msdn.microsoft.com/library/en-us/vccore/html/_core_.2f.gh.asp
>
> This is the only supported "build-in" feature of VC.
>
> All other apps (like Purify) are using "native" (or own-build)
> instrumentation of the EXE/DLLs.
>
> --
> Greetings
> Jochen
>
> My blog about Win32 and .NET
> http://blog.kalmbachnet.de/


.



Relevant Pages

  • Re: Propose for Several Dump types
    ... >> us it without knowing anything else. ... >> receive it in email whenever a crash occured. ... I still think ascii format dump can not replace the minidump. ... | UNIX since Zilog Zeus 3.20 ...
    (freebsd-arch)
  • Re: memorydump in vista
    ... Agreed, In case of a crash, that is from an unhandled exception handler, however, I was talking about simply calling Dbghelp.dll API's from a running process. ... analysis of a "JITted code" minidump can be a daunting task, ... I haven't tested it by myself, but it surely isn't that simple to evaluate managed crash dumps. ... at the CLR level and therefore you need the SOS extentions if you need to analyse "managed threads" and other CLR related datastructures. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C++ parser for diagnostics
    ... > I was thinking of this code beyond just exception handling, ... The DMS Software Reengineering Toolkit could do this pretty easily. ... there's a whitepaper on that page that discusses breifly how DMS works, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Hey Mr. Vidoca!!!
    ... With the minidump we can usually pinpoint the ... cause of the crash. ... break and if there is a fix, or possible fix available, and would point you ... Microsoft Video Driver OCA Triage ...
    (microsoft.public.windowsxp.games)
  • Re: newbee: trouble w/ try{} catch{}
    ... so I have a crash that happens randomly and I have asked the people ... > to send me their logs when they crash, I have narrowed it down to one ... What you should do is to let you process crash and collect minidump (make ... sure you generate PDB files during build). ...
    (microsoft.public.vc.language)