• When debugging multi-threaded programs, QEMU's gdb stub would report the
    correct number of threads (the qfThreadInfo and qsThreadInfo packets).
    However, the stub was unable to actually switch between threads (the T
    packet), since it would report every thread except the first as being
    dead.  Furthermore, the stub relied upon cpu_index as a reliable means
    of assigning IDs to the threads.  This was a bad idea; if you have this
    sequence of events:
    
    initial thread created
    new thread #1
    new thread #2
    thread #1 exits
    new thread #3
    
    thread #3 will have the same cpu_index as thread #1, which would confuse
    GDB.  (This problem is partly due to the remote protocol not having a
    good way to send thread creation/destruction events.)
    
    We fix this by using the host thread ID for the identifier passed to GDB
    when debugging a multi-threaded userspace program.  The thread ID might
    wrap, but the same sort of problems with wrapping thread IDs would come
    up with debugging programs natively, so this doesn't represent a
    problem.
    
    Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
    Nathan Froyd authored
     
    Browse Code »













  • There are two different syscall names for the same goal.
    
    On systems with sizeof(long) == 64 it calls newfstatat.
    On systems with sizeof(long) == 32 it calls fstatat64.
    
    Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
    Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7050 c046a42c-6fe2-441c-8c8c-71466251a162
    aurel32 authored
     
    Browse Code »
  • The sys_inotify* calls are defined if the target supports them and the
    host supports the necessary syscalls.  But the syscalls are handled if
    the target supports them.  This situation leads to compilation failures
    when the host doesn't support the necessary syscalls, as the linker will
    complain about undefined functions.
    
    Fix this state of affairs by making the handling conditions the same as
    the call definition conditions.
    
    Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
    Acked-By: Riku Voipio <riku.voipio@iki.fi>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7038 c046a42c-6fe2-441c-8c8c-71466251a162
    aurel32 authored
     
    Browse Code »