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

Method __add_crash

pydevd_attach_to_process/winappdbg/sql.py:777–801  ·  view source on GitHub ↗
(self, crash)

Source from the content-addressed store, hash-verified

775
776 # Store the Crash object into the crashes table.
777 def __add_crash(self, crash):
778 session = self._session
779 r_crash = None
780 try:
781 # Fill out a new row for the crashes table.
782 r_crash = CrashDTO(crash)
783 session.add(r_crash)
784
785 # Flush and get the new row ID.
786 session.flush()
787 crash_id = r_crash.id
788
789 finally:
790 try:
791 # Make the ORM forget the CrashDTO object.
792 if r_crash is not None:
793 session.expire(r_crash)
794
795 finally:
796 # Delete the last reference to the CrashDTO
797 # object, so the Python garbage collector claims it.
798 del r_crash
799
800 # Return the row ID.
801 return crash_id
802
803 # Store the memory dump into the memory table.
804 def __add_memory(self, crash_id, memoryMap):

Callers 1

addMethod · 0.95

Calls 3

CrashDTOClass · 0.85
addMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected