* exceptions.h (cygwin_exception::open_stackdumpfile): Move old function into

class.
(cygwin_exception::h): New member.
(cygwin_exception::cygwin_exception): Initialize h to NULL.
* exceptions.cc (cygwin_exception::open_stackdumpfile): Move into
cygwin_exception class.  Use 'h' class member.
(cygwin_exception::dumpstack): Close stack dump file handle if opened.
This commit is contained in:
Christopher Faylor
2014-01-08 16:51:20 +00:00
parent 847980a43b
commit 8aca67421d
3 changed files with 19 additions and 6 deletions

View File

@ -1,6 +1,6 @@
/* exception.h
Copyright 1996, 1997, 1998, 2000, 2001, 2005, 2010, 2011, 1012, 2013
Copyright 1996, 1997, 1998, 2000, 2001, 2005, 2010, 2011, 1012, 2013, 2014
Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
@ -147,10 +147,12 @@ class cygwin_exception
PUINT_PTR framep;
PCONTEXT ctx;
EXCEPTION_RECORD *e;
HANDLE h;
void dump_exception ();
void open_stackdumpfile ();
public:
cygwin_exception (PUINT_PTR in_framep, PCONTEXT in_ctx = NULL, EXCEPTION_RECORD *in_e = NULL):
framep (in_framep), ctx (in_ctx), e (in_e) {}
framep (in_framep), ctx (in_ctx), e (in_e), h (NULL) {}
void dumpstack ();
PCONTEXT context () const {return ctx;}
};