gdb: lseek

 
 lseek
 .....
 
 Synopsis:
           long lseek (int fd, long offset, int flag);
 
 Request:
      'Flseek,FD,OFFSET,FLAG'
 
      FLAG is one of:
 
      'SEEK_SET'
           The offset is set to OFFSET bytes.
 
      'SEEK_CUR'
           The offset is set to its current location plus OFFSET bytes.
 
      'SEEK_END'
           The offset is set to the size of the file plus OFFSET bytes.
 
 Return value:
      On success, the resulting unsigned offset in bytes from the
      beginning of the file is returned.  Otherwise, a value of -1 is
      returned.
 
 Errors:
 
      'EBADF'
           FD is not a valid open file descriptor.
 
      'ESPIPE'
           FD is associated with the GDB console.
 
      'EINVAL'
           FLAG is not a proper value.
 
      'EINTR'
           The call was interrupted by the user.