Ejemplo n.º 1
0
def convert_ios_symbolserver_match(instruction_addr, symbolserver_match):
    if not symbolserver_match:
        return []

    symbol = symbolserver_match['symbol']
    if symbol[:1] == '_':
        symbol = symbol[1:]

    # We still use this construct from symbolic for demangling (at least)
    line_info = LineInfo(
        sym_addr=parse_addr(symbolserver_match['addr']),
        instr_addr=parse_addr(instruction_addr),
        line=None,
        lang=None,
        symbol=symbol
    )

    function = line_info.function_name
    package = symbolserver_match['object_name']

    return [{
        'sym_addr': '0x%x' % (line_info.sym_addr,),
        'instruction_addr': '0x%x' % (line_info.instr_addr,),
        'function': function,
        'symbol': symbol if function != symbol else None,
        'filename': trim(line_info.rel_path, 256),
        'abs_path': trim(line_info.abs_path, 256),
        'package': package,
    }]
Ejemplo n.º 2
0
    def _convert_symbolserver_match(self, instruction_addr, symbolserver_match, obj):
        """Symbolizes a frame with system symbols only."""
        if symbolserver_match is None:
            return []

        symbol = symbolserver_match['symbol']
        if symbol[:1] == '_':
            symbol = symbol[1:]

        return [
            self._process_frame(LineInfo(
                sym_addr=parse_addr(symbolserver_match['addr']),
                instr_addr=parse_addr(instruction_addr),
                line=None,
                lang=None,
                symbol=symbol,
            ), obj, package=symbolserver_match['object_name'])
        ]