(self, block: BlockNode, insn: DisassemblerInsn, bs: BlockStart)
Add instruction to analysis results with associated labels and comments
Add instruction to analysis results with associated labels and comments
Add instruction to analysis results with associated labels and comments
def _add_instruction_to_results(self, block: BlockNode, insn: DisassemblerInsn, bs: BlockStart) -> None:
        """
        Add instruction to analysis results with associated labels and comments
        """
        if insn.address in self.kb.labels:
            label = Label(insn.address, self.kb.labels[insn.address])
            self.raw_result.append(label)
            self.raw_result_map['labels'][label.addr] = label
        if insn.address in self.kb.comments:
            comment = Comment(insn.address, self.kb.comments[insn.address])
            self.raw_result.append(comment)
            self.raw_result_map['comments'][comment.addr] = comment
        instruction = Instruction(insn, bs)
        self.raw_result.append(instruction)
        self.raw_result_map['instructions'][instruction.addr] = instruction
        self.block_to_insn_addrs[block.addr].append(insn.address)
def _add_instruction_to_results ( self , block : BlockNode , insn : DisassemblerInsn , bs : BlockStart ) -> None : if insn . address in self . kb . labels : label = Label ( insn . address , self . kb . labels [ insn . address ] ) self . raw_result . append ( label ) self . raw_result_map [ 'labels' ] [ label . addr ] = label if insn . address in self . kb . comments : comment = Comment ( insn . address , self . kb . comments [ insn . address ] ) self . raw_result . append ( comment ) self . raw_result_map [ 'comments' ] [ comment . addr ] = comment instruction = Instruction ( insn , bs ) self . raw_result . append ( instruction ) self . raw_result_map [ 'instructions' ] [ instruction . addr ] = instruction self . block_to_insn_addrs [ block . addr ] . append ( insn . address )