Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

More Windows dev questions: Core dumps

5 views
Skip to first unread message

Dan Sugalski

unread,
Dec 31, 2003, 12:17:21 PM12/31/03
to perl6-i...@perl.org
Or something much like them.

On a Unix system, a core dump is a file with a raw (mostly) copy of a
process' current memory image that's written whenever a process does
something profoundly illegal, like accessing an inaccessible section
of memory with no trap handler that allows recovery or something of
the sort. They're handy, because it means you can go and debug a
process after the fact, and don't have to be there on the spot to
figure out what's going on. Really handy for things that die
overnight, or when you're not around, and you don't want the defunct
process hanging around until you can attach to it with a debugger.

Does Windows do this? (I know other OSes, like VMS, do *not* do it)
If so, how do I enable it? If not, I presume there's some reasonably
simple way to attach a debugger to a process that's died. (I hope)

No, I'm not getting turned into a windows programmer, but until I get
the Gameboy port of parrot going (or someone slides me an Alpha or
Itanium VMS box) it's the only non-Unix platform I've got handy to
work with.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Vladimir Lipsky

unread,
Dec 31, 2003, 3:51:16 PM12/31/03
to Dan Sugalski, perl6-internals
From: "Dan Sugalski" <d...@sidhe.org>

> On a Unix system, a core dump is a file with a raw (mostly) copy of a
> process' current memory image that's written whenever a process does
> something profoundly illegal, like accessing an inaccessible section
> of memory with no trap handler that allows recovery or something of
> the sort. They're handy, because it means you can go and debug a
> process after the fact, and don't have to be there on the spot to
> figure out what's going on. Really handy for things that die
> overnight, or when you're not around, and you don't want the defunct
> process hanging around until you can attach to it with a debugger.
>
> Does Windows do this? (I know other OSes, like VMS, do *not* do it)

No, Windows does not use core files. If you run your code outside of a
debugger and a problem occurs you will be given the option of either
debugging the code or killing the executing process.

> If so, how do I enable it? If not, I presume there's some reasonably
> simple way to attach a debugger to a process that's died. (I hope)

Yeah. That's it. A debugger. Do you have one? If no, try to pull WinDbg
about.

http://www.microsoft.com/whdc/ddk/debugging/default.mspx?gssnb=1

It's free for downloading. You will find some "HOW TO" there either.

> No, I'm not getting turned into a windows programmer, but until I get

It's a pity that you ain't =)

> Dan

0x4C56

Dan Sugalski

unread,
Dec 31, 2003, 2:49:36 PM12/31/03
to Vladimir Lipsky, perl6-internals
At 11:51 PM +0300 12/31/03, Vladimir Lipsky wrote:
>From: "Dan Sugalski" <d...@sidhe.org>
>
>> On a Unix system, a core dump is a file with a raw (mostly) copy of a
>> process' current memory image that's written whenever a process does
>> something profoundly illegal, like accessing an inaccessible section
>> of memory with no trap handler that allows recovery or something of
>> the sort. They're handy, because it means you can go and debug a
>> process after the fact, and don't have to be there on the spot to
>> figure out what's going on. Really handy for things that die
>> overnight, or when you're not around, and you don't want the defunct
>> process hanging around until you can attach to it with a debugger.
>>
>> Does Windows do this? (I know other OSes, like VMS, do *not* do it)
>
>No, Windows does not use core files. If you run your code outside of a
>debugger and a problem occurs you will be given the option of either
>debugging the code or killing the executing process.

Bummer. Ah, well, one of the few Unix development things that I really like.

> > If so, how do I enable it? If not, I presume there's some reasonably
>> simple way to attach a debugger to a process that's died. (I hope)
>
>Yeah. That's it. A debugger. Do you have one? If no, try to pull WinDbg
>about.
>
>http://www.microsoft.com/whdc/ddk/debugging/default.mspx?gssnb=1
>
>It's free for downloading. You will find some "HOW TO" there either.

I've probably got that installed already with the VS/.NET kit, but if
not I'll go get it. Thanks.

> > No, I'm not getting turned into a windows programmer, but until I get
>
>It's a pity that you ain't =)

I've too many systems stuck in my brain as it is--between VMS,
various Unices, OS X userland, RSTS/E, remnants of the much lamented
Amiga, and bits of the Gameboy Advance, there's not much space left.
It's a wonder I can find my car keys in the morning. :)

Vladimir Lipsky

unread,
Dec 31, 2003, 4:10:18 PM12/31/03
to Dan Sugalski, perl6-internals

0x4C56


----- Original Message -----
From: "Dan Sugalski" <d...@sidhe.org>
To: "Vladimir Lipsky" <lip...@kaluga.ru>
Cc: "perl6-internals" <perl6-i...@perl.org>
Sent: Wednesday, December 31, 2003 10:49 PM
Subject: Re: More Windows dev questions: Core dumps


> At 11:51 PM +0300 12/31/03, Vladimir Lipsky wrote:
> >From: "Dan Sugalski" <d...@sidhe.org>
> >
> >> On a Unix system, a core dump is a file with a raw (mostly) copy of a
> >> process' current memory image that's written whenever a process does
> >> something profoundly illegal, like accessing an inaccessible section
> >> of memory with no trap handler that allows recovery or something of
> >> the sort. They're handy, because it means you can go and debug a
> >> process after the fact, and don't have to be there on the spot to
> >> figure out what's going on. Really handy for things that die
> >> overnight, or when you're not around, and you don't want the defunct
> >> process hanging around until you can attach to it with a debugger.
> >>
> >> Does Windows do this? (I know other OSes, like VMS, do *not* do it)
> >
> >No, Windows does not use core files. If you run your code outside of a
> >debugger and a problem occurs you will be given the option of either
> >debugging the code or killing the executing process.
>
> Bummer. Ah, well, one of the few Unix development things that I really
like.

Well, debug prompts not that bad. Still better than nothing.

> > > If so, how do I enable it? If not, I presume there's some reasonably
> >> simple way to attach a debugger to a process that's died. (I hope)
> >
> >Yeah. That's it. A debugger. Do you have one? If no, try to pull WinDbg
> >about.
> >
> >http://www.microsoft.com/whdc/ddk/debugging/default.mspx?gssnb=1
> >
> >It's free for downloading. You will find some "HOW TO" there either.
>
> I've probably got that installed already with the VS/.NET kit, but if

Oh! Then you might have got it. I read somewhere that one can do a crash
dump, an windows equivalent of unix core dumpes, with windbg. So if you
wish, you could look for how to create that thing in docs.

> Dan

0x4C56

Nigel Sandever

unread,
Jan 1, 2004, 2:08:47 PM1/1/04
to perl6-i...@perl.org
On Wed, 31 Dec 2003 12:17:21 -0500, d...@sidhe.org (Dan Sugalski) wrote:

> Does Windows do this? (I know other OSes, like VMS, do *not* do it)
> If so, how do I enable it? If not, I presume there's some reasonably
> simple way to attach a debugger to a process that's died. (I hope)

You can pursuade Dr.Watson (How I hate that cutesy name!) to produce a dump file (of sorts) when a trap occurs.

To configure this, type drwtsb32 at a command prompt and follow the prompts for the naming and locating of the dump file, what gets dumped etc.

See [http://windows.about.com/library/weekly/aa000903b.htm] here for a fairly breif but clear overview of the configuration options.

Personally, I haven't made much use of these as I didn't find them very useful, but then I didn't make much of a unix dump last (only) time I looked at one either.

For a free, powerful (though GUI) debugger that can be used to debug literally any win32 process (even without the presence of symbol files, though these are stringly
recommended), see [http://www.smidgeonsoft.prohosting.com/#PEBrowse ] . There are several other very useful tools and some good information from the home page at
[http://www.smidgeonsoft.com/].

Regards, Nigel Sandever.

Ps. Sorry if this ends up getting posted twice. I didn;t realise I had to do the confirmation step after subscribing.


Nigel Sandever

unread,
Jan 1, 2004, 1:48:37 PM1/1/04
to perl6-i...@perl.org
On Wed, 31 Dec 2003 12:17:21 -0500, d...@sidhe.org (Dan Sugalski) wrote:
> If so, how do I enable it?

It is possible to configure DrWatson (Stupid cutesy name) to create a dump file, though I haven't ever found it very useful.

>If not, I presume there's some reasonably

There are several very powerful and useful utilities available for free download at [http://www.smidgeonsoft.com/]

Particularly useful is [http://www.smidgeonsoft.prohosting.com/#PEBrowse ] Professional Interactive (Debugger).


0 new messages