parameters: (self, pc, flags)
return_statement: return (False,None)
docstring: Test if jump instruction is taken or not
              Returns:
                  True if jump is taken or False if not
docstring_summary: Test if jump instruction is taken or not
              Returns:
                  True if jump is taken or False if not
docstring_tokens: Test if jump instruction is taken or not Returns : True if jump is taken or False if not
function: def testjump(self, pc, flags):
              """
              Test if jump instruction is taken or not
              Returns:
                  True if jump is taken or False if not
              """
              inst=None
  
              if not flags:
                  return False, None
  
              if not inst:
                  success, inst = self.runCommands("x/1i $pc")
                  if not success:
                      return False, None
  
              opcode = inst.split('  ')[2]
  
              if opcode == "jmp":
                  return (True,inst.split('  ')[4])
              if opcode == "je" and flags["ZF"]:
                  return (True,inst.split('  ')[4])
              if opcode == "jne" and not flags["ZF"]:
                  return (True,inst.split('  ')[4])
              if opcode == "jg" and not flags["ZF"] and (flags["SF"] == flags["OF"]):
                  return (True,inst.split('  ')[4])
              if opcode == "jge" and (flags["SF"] == flags["OF"]):
                  return (True,inst.split('  ')[4])
              if opcode == "ja" and not flags["CF"] and not flags["ZF"]:
                  return (True,inst.split('  ')[4])
              if opcode == "jae" and not flags["CF"]:
                  return (True,inst.split('  ')[4])
              if opcode == "jl" and (flags["SF"] != flags["OF"]):
                  return (True,inst.split('  ')[4])
              if opcode == "jle" and (flags["ZF"] or (flags["SF"] != flags["OF"])):
                  return (True,inst.split('  ')[4])
              if opcode == "jb" and flags["CF"]:
                  return (True,inst.split('  ')[4])
              if opcode == "jbe" and (flags["CF"] or flags["ZF"]):
                  return (True,inst.split('  ')[4])
              if opcode == "jo" and flags["OF"]:
                  return (True,inst.split('  ')[4])
              if opcode == "jno" and not flags["OF"]:
                  return (True,inst.split('  ')[4])
              if opcode == "jz" and flags["ZF"]:
                  return (True,inst.split('  ')[4])
              if opcode == "jnz" and flags["OF"]:
                  return (True,inst.split('  ')[4])
  
              return (False,None)
function_tokens: def testjump ( self , pc , flags ) : inst = None if not flags : return False , None if not inst : success , inst = self . runCommands ( "x/1i $pc" ) if not success : return False , None opcode = inst . split ( '  ' ) [ 2 ] if opcode == "jmp" : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "je" and flags [ "ZF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jne" and not flags [ "ZF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jg" and not flags [ "ZF" ] and ( flags [ "SF" ] == flags [ "OF" ] ) : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jge" and ( flags [ "SF" ] == flags [ "OF" ] ) : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "ja" and not flags [ "CF" ] and not flags [ "ZF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jae" and not flags [ "CF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jl" and ( flags [ "SF" ] != flags [ "OF" ] ) : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jle" and ( flags [ "ZF" ] or ( flags [ "SF" ] != flags [ "OF" ] ) ) : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jb" and flags [ "CF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jbe" and ( flags [ "CF" ] or flags [ "ZF" ] ) : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jo" and flags [ "OF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jno" and not flags [ "OF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jz" and flags [ "ZF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) if opcode == "jnz" and flags [ "OF" ] : return ( True , inst . split ( '  ' ) [ 4 ] ) return ( False , None )