[rfa] gdb_thread_db.h: #errror if no uintptr_t

Daniel Jacobowitz drow@mvista.com
Wed Feb 26 16:59:00 GMT 2003


On Wed, Feb 26, 2003 at 10:52:00AM -0600, Michael Elizabeth Chastain wrote:
> This patch updates gdb_thread_db.h to die with a more explicit error
> message if HAVE_UINTPTR_T is not defined.  'uintptr_t' is defined in
> glibc 2.1.3 and later.  It might be defined in glibc versions earlier
> than 2.1.3, too, but 2.1.3 is already three years old so I figure that
> is enough.
> 
> Instead of dying, gdb_thread_db.h could substitute some definition
> for uintptr_t.  I chose not to do this because if glibc is that old
> then I don't want to support it anyways.  But a case could be made
> for doing so.
> 
> Note that gdb_thread_db.h is used only on *-*-*linux* and s390-*-*.
> 
> Testing: again, I fiddled with my /usr/include/stdint.h to see both
> code paths.  I also had to disable thread_db.h because my system is
> new enough to actually use this file instead of the copy embedded
> in gdb_thread_db.h.
> 
> This will close PR build/660.
> 
> OK to commit?

> +#error Unable to find uintptr_t type in <stdint.h>.
> +#error Your libc or glibc is too old!
> +#error You must upgrade to glibc 2.1.3 or later.

How about just:
#error No uintptr_t available; your C library is too old.

[This file might be used in non-glibc systems at some point.]

OK with that change.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb-patches mailing list