コード例 #1
0
ファイル: cfi.py プロジェクト: getsentry/sentry
    def _frame_from_cache(self, entry):
        debug_id, offset, trust = entry[:3]
        module = self.modules.get_object(debug_id)

        # The debug_id can be None or refer to a missing module. If the module
        # was missing, the stored offset was absolute as well. Otherwise, we
        # have no choice but to assume an absolute address. In practice, the
        # latter hopefully never happens.
        addr = module.addr + parse_addr(offset) if module else parse_addr(offset)

        return module, {
            'instruction_addr': '0x%x' % addr,
            'package': module.code_file if module else None,
            'trust': trust,
        }
コード例 #2
0
    def _frame_from_cache(self, entry):
        debug_id, offset, trust = entry[:3]
        module = self.modules.get_object(debug_id)

        # The debug_id can be None or refer to a missing module. If the module
        # was missing, the stored offset was absolute as well. Otherwise, we
        # have no choice but to assume an absolute address. In practice, the
        # latter hopefully never happens.
        addr = module.addr + parse_addr(offset) if module else parse_addr(
            offset)

        return module, {
            'instruction_addr': '0x%x' % addr,
            'package': module.code_file if module else None,
            'trust': trust,
        }