# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. import os import sys import time import optparse from winappdbg import CrashContainer, CrashDictionary from crash_logger import CrashLogger try: import cerealizer cerealizer.freeze_configuration() except ImportError: pass def parse_cmdline(argv): 'Parse the command line options.' if len(argv) == 1: argv = argv + ['--help'] usage = ( "\n %prog <configuration file> [more configuration files...]\n" "\n" "Produces a full report of each crash found by crash_logger.py" ) parser = optparse.OptionParser(usage=usage) parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="produces a full report")
import re import os import sys import time import ntpath import traceback # Cygwin compatibility. try: WindowsError except NameError: from winappdbg.win32 import WindowsError try: import cerealizer cerealizer.freeze_configuration() except ImportError: pass # XXX TODO # Use the "signal" module to avoid having to deal with unexpected # KeyboardInterrupt exceptions everywhere. Ideally there should be a way to # implement some form of "critical sections" (I'm using the term loosely here, # meaning "sections that can't be interrupted by the user"), something like # this: a global flag to enable and disable raising KeyboardInterrupt, and a # couple functions to set it. The function that enables back KeyboardInterrupt # should check for a queued interruption request. Some experimenting is needed # to see how well this would behave on a Windows environment. #==============================================================================
def initializeSerialization(): registerClasses() c.freeze_configuration()