(addr, data)
write(addr, data)

    Writes data into the memory of the process being debugged.

    Arguments:
        addr(int): Address to write
        data(str,bytes,bytearray): Data to write
write(addr, data)
write ( addr data )
def write(addr, data):
    """write(addr, data)

    Writes data into the memory of the process being debugged.

    Arguments:
        addr(int): Address to write
        data(str,bytes,bytearray): Data to write
    """
    if isinstance(data, str):
        data = bytes(data, 'utf8')

    # Throws an exception if can't access memory
    gdb.selected_inferior().write_memory(addr, data)
def write ( addr , data ) : if isinstance ( data , str ) : data = bytes ( data , 'utf8' ) # Throws an exception if can't access memory gdb . selected_inferior ( ) . write_memory ( addr , data )