[LLVMdev] Files to lib/System/Win32

Jeff Cohen jeffc at jolt-lang.org
Tue Sep 14 20:16:47 PDT 2004


Here are some more... and that takes care of the easy ones.

Path I'll wait on until you finish updating it.

Signals is a problem...  It appears to be doing two tasks.  First, it
prints a stack trace when something like a seg fault occurs.  Second, it
makes sure a set of files and directories are deleted on an abnormal
exit.

The first is no problem.  It won't even be necessary to fork off a
separate program, so long as Microsoft-format symbol tables are present
(and if there aren't... well... you'll just get a bunch of hexadecimal
addresses). 

The other is a problem.  It is not possible to delete open files on
Windows, and the odds are these files will be open because... well...
things crashed before there was a chance to clean things up.

Even for the files which aren't open and so can be deleted, you wouldn't
necessarily want to delete them at this point.  After this handler
executes, a dialog box pops up asking if you want to start the debugger.
It might be a good idea to keep these files around as the program
technically is still executing while it's being debugged.

There is a Windows-centric solution to this:  open the files with the
delete-on-close flag.  The implicit closing of all open files at process
termination--normal or abnormal, or even post debugging--will trigger
the deletion.  How to take advantage of this is unfortunately far from
obvious.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Memory.cpp
Type: application/octet-stream
Size: 1991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040914/17ca4bf5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Process.cpp
Type: application/octet-stream
Size: 1467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040914/17ca4bf5/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Program.cpp
Type: application/octet-stream
Size: 4663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040914/17ca4bf5/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SysConfig.cpp
Type: application/octet-stream
Size: 1083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040914/17ca4bf5/attachment-0003.obj>


More information about the llvm-dev mailing list