Bug 13014 - member th is only added to struct lwp_info if HAVE_THREAD_DB_H defined, but code doesnt check
Summary: member th is only added to struct lwp_info if HAVE_THREAD_DB_H defined, but c...
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: 7.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 20:17 UTC by Josef Mutzenbacher
Modified: 2011-07-21 20:17 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Mutzenbacher 2011-07-21 20:17:49 UTC
thread-db.c: In function `find_one_thread':
thread-db.c:293: warning: long int format, thread_t arg (arg 3)
thread-db.c:316: error: structure has no member named `th'


line 316 (uncoditional access):
   lwp->th = th;

is defined earlier in the function as
  struct lwp_info *lwp;

definiton in 

./gdb/gdbserver/linux-low.h (line 245)

#ifdef HAVE_THREAD_DB_H
  /* The thread handle, used for e.g. TLS access.  Only valid if
     THREAD_KNOWN is set.  */
  td_thrhandle_t th;
#endif

there is no code in the Makefile, configure, or any source file that defines this symbol.

note, compilation was done on a system using musl libc.