ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

gdb-76-linux-low-threaddb.patch (986B)


      1 this patch fixes compilation of gdbserver on systems that don't have
      2 thread_db.h. in that case we fall back to gdb's own copy 
      3 "gdb_thread_db.h", so the typedef of the td_thrhandle_t member is 
      4 available, which is accessed in other parts of the code without
      5 checking whether thread_db.h is available.
      6 this is by far the cleaner solution, removing the accesses to the
      7 th member in other parts of the source would either litter it with
      8 ifdefs or cripple the functionality.
      9 
     10 --- gdb-7.6.2.org/gdb/gdbserver/linux-low.h
     11 +++ gdb-7.6.2/gdb/gdbserver/linux-low.h
     12 @@ -18,6 +18,8 @@
     13  
     14  #ifdef HAVE_THREAD_DB_H
     15  #include <thread_db.h>
     16 +#else
     17 +#include "gdb_thread_db.h"
     18  #endif
     19  #include <signal.h>
     20  
     21 @@ -270,11 +272,9 @@
     22    int need_step_over;
     23  
     24    int thread_known;
     25 -#ifdef HAVE_THREAD_DB_H
     26    /* The thread handle, used for e.g. TLS access.  Only valid if
     27       THREAD_KNOWN is set.  */
     28    td_thrhandle_t th;
     29 -#endif
     30  
     31    /* Arch-specific additions.  */
     32    struct arch_lwp_info *arch_private;