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: WAITING
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: 2022-02-27 23:49 UTC (History)
1 user (show)

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.
Comment 1 Tom Tromey 2022-02-27 23:49:10 UTC
> there is no code in the Makefile, configure, or any source file that defines this symbol.

I would expect it to be created by

AC_CHECK_HEADERS( [...] thread_db.h [...] )

in common.m4

If you run configure do you see this check happening?
I tend to suspect that, given the age, this bug is obsolete.