@@ -297,6 +297,13 @@ def load_raw_disassembly(self, start_ip):
297297 line_addr = start_ip + total_read
298298 (insn_tokens , length ) = arch_dis .get_instruction_text (data [total_read :], line_addr )
299299
300+ # terrible libshiboken workaround
301+ for tok in insn_tokens :
302+ if tok .type == InstructionTextTokenType .PossibleAddressToken and (tok .value & 0x80000000 ) and tok .size == 4 :
303+ #print('fixing %s' % ''.join(map(str,insn_tokens)))
304+ tok .size = 8
305+ tok .value &= 0x7FFFFFFFFFFFFFFF
306+
300307 if insn_tokens is None :
301308 insn_tokens = [InstructionTextToken (InstructionTextTokenType .TextToken , "??" )]
302309 length = arch_dis .instr_alignment
@@ -337,16 +344,6 @@ def load_raw_disassembly(self, start_ip):
337344
338345 total_read += length
339346
340- # terrible workaround for libshiboken conversion issue
341- for line in lines :
342- # line is LinearDisassemblyLine
343- last_tok = line .contents .tokens [- 1 ]
344- #if last_tok.type != InstructionTextTokenType.PossibleAddressToken: continue
345- #if last_tok.width != 18: continue # strlen("0xFFFFFFFFFFFFFFF0")
346- if last_tok .size != 8 : continue
347- #print('fixing: %s' % line)
348- last_tok .value &= 0x7FFFFFFFFFFFFFFF
349-
350347 self .binary_text .setLines (lines )
351348
352349 def show_raw_disassembly (self , raw ):
0 commit comments