Back to index

apport  2.4
Classes | Functions | Variables
parse_segv Namespace Reference

Classes

class  ParseSegv

Functions

def add_info

Variables

tuple segv
int rc = 0

Function Documentation

def parse_segv.add_info (   report)

Definition at line 336 of file parse_segv.py.

00336 
00337 def add_info(report):
00338     # Only interested in segmentation faults...
00339     if report.get('Signal', '0') != '11':
00340         return
00341 
00342     needed = ['Signal', 'Architecture', 'Disassembly', 'ProcMaps', 'Registers']
00343     for field in needed:
00344         if field not in report:
00345             report['SegvAnalysis'] = 'Skipped: missing required field "%s"' % (field)
00346             return
00347 
00348     # Only run on segv for x86 and x86_64...
00349     if not report['Architecture'] in ['i386', 'amd64']:
00350         return
00351 
00352     try:
00353         segv = ParseSegv(report['Registers'], report['Disassembly'], report['ProcMaps'])
00354         understood, reason, details = segv.report()
00355         if understood:
00356             report['SegvReason'] = reason
00357         report['SegvAnalysis'] = details
00358     except BaseException as e:
00359         report['SegvAnalysis'] = 'Failure: %s' % (str(e))
00360 


Variable Documentation

int parse_segv.rc = 0

Definition at line 373 of file parse_segv.py.

Initial value:
00001 ParseSegv(open(sys.argv[1]).read(),
00002                      open(sys.argv[2]).read(),
00003                      open(sys.argv[3]).read())

Definition at line 368 of file parse_segv.py.