Re: C++ parser for diagnostics
- From: "Dave Williams" <dont@xxxxxxx>
- Date: Thu, 14 Apr 2005 09:07:53 +0100
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/
.
- Follow-Ups:
- Re: C++ parser for diagnostics
- From: Ira Baxter
- Re: C++ parser for diagnostics
- References:
- C++ parser for diagnostics
- From: Dave Williams
- Re: C++ parser for diagnostics
- From: Jochen Kalmbach [MVP]
- C++ parser for diagnostics
- Prev by Date: Re: Comparing text files
- Next by Date: Re: can't convert C# signature to MC++ Thanks!!!
- Previous by thread: Re: C++ parser for diagnostics
- Next by thread: Re: C++ parser for diagnostics
- Index(es):
Relevant Pages
|
|