MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / __init__

Method __init__

pydevd_attach_to_process/winappdbg/sql.py:625–702  ·  view source on GitHub ↗

@type crash: Crash @param crash: L{Crash} object to store into the database.

(self, crash)

Source from the content-addressed store, hash-verified

623 data = deferred(Column(LargeBinary, nullable=False))
624
625 def __init__(self, crash):
626 """
627 @type crash: Crash
628 @param crash: L{Crash} object to store into the database.
629 """
630
631 # Timestamp and signature.
632 self.timestamp = datetime.datetime.fromtimestamp(crash.timeStamp)
633 self.signature = pickle.dumps(crash.signature, protocol=0)
634
635 # Marshalled Crash object, minus the memory dump.
636 # This code is *not* thread safe!
637 memoryMap = crash.memoryMap
638 try:
639 crash.memoryMap = None
640 self.data = buffer(Marshaller.dumps(crash))
641 finally:
642 crash.memoryMap = memoryMap
643
644 # Exploitability test.
645 self.exploitability_rating, self.exploitability_rule, self.exploitability_desc = crash.isExploitable()
646
647 # Exploitability test as an integer result (for sorting).
648 self.exploitable = [
649 "Not an exception",
650 "Not exploitable",
651 "Not likely exploitable",
652 "Unknown",
653 "Probably exploitable",
654 "Exploitable",
655 ].index(self.exploitability_rating)
656
657 # Platform description.
658 self.os = crash.os
659 self.arch = crash.arch
660 self.bits = crash.bits
661
662 # Event description.
663 self.event = crash.eventName
664 self.pid = crash.pid
665 self.tid = crash.tid
666 self.pc = crash.pc
667 self.sp = crash.sp
668 self.fp = crash.fp
669 self.pc_label = crash.labelPC
670
671 # Exception description.
672 self.exception = crash.exceptionName
673 self.exception_text = crash.exceptionDescription
674 self.exception_address = crash.exceptionAddress
675 self.exception_label = crash.exceptionLabel
676 self.first_chance = crash.firstChance
677 self.fault_type = crash.faultType
678 self.fault_address = crash.faultAddress
679 self.fault_label = crash.faultLabel
680 self.fault_disasm = CrashDump.dump_code(crash.faultDisasm, crash.pc)
681 self.stack_trace = CrashDump.dump_stack_trace_with_labels(crash.stackTracePretty)
682

Callers

nothing calls this directly

Calls 6

dumpsMethod · 0.80
isExploitableMethod · 0.80
dump_codeMethod · 0.80
itemsMethod · 0.80
notesReportMethod · 0.80

Tested by

no test coverage detected