* [rfc] gdb_stdint.h.
@ 2006-05-05 17:27 Daniel Jacobowitz
2006-05-05 19:32 ` Jim Blandy
2006-05-15 17:16 ` Daniel Jacobowitz
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2006-05-05 17:27 UTC (permalink / raw)
To: gdb-patches
You want uintptr_t? I got your uintptr_t right here.
This patch creates a header in the build directory named gdb_stdint.h.
It defines all of the things which a stdint.h ought to define. It uses
the system's stdint.h if there is one, and provides anything missing,
up to and including the whole file.
There is, of course, a huge hairy chunk of m4 and portability knowledge
that you don't see in this patch. That's because it's already in
config/ and was written for GCC. I'm OK with that :-) It means it's
quite well tested at this point.
This would be enough to allow us to start using uint64_t, uintptr_t,
et cetera in the common code of GDB. Which, in my opinion, would be a
good idea. They're nice to have around.
Any comments?
--
Daniel Jacobowitz
CodeSourcery
2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
* configure.ac: Use GCC_HEADER_STDINT.
* acinclude.m4: Include stdint.m4.
* Makefile.in (gdb_stdint_h): Define.
(distclean): Remove gdb_stdint.h.
(Makefile, stamp-h): Update rules to generate only the correct
files.
(gdb_stdint.h, stamp-int): New rules.
* config.in, configure: Regenerated.
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.31
diff -u -p -r1.31 configure.ac
--- configure.ac 29 Mar 2006 22:58:54 -0000 1.31
+++ configure.ac 5 May 2006 17:23:04 -0000
@@ -422,6 +422,9 @@ AC_CHECK_HEADERS(term.h, [], [],
# unconditionally, so what's the point in checking these?
AC_CHECK_HEADERS(ctype.h time.h)
+# Create a header we can use portably to get the standard integer types.
+GCC_HEADER_STDINT(gdb_stdint.h)
+
# ------------------------- #
# Checks for declarations. #
# ------------------------- #
Index: acinclude.m4
===================================================================
RCS file: /cvs/src/src/gdb/acinclude.m4,v
retrieving revision 1.13
diff -u -p -r1.13 acinclude.m4
--- acinclude.m4 17 Dec 2005 22:33:59 -0000 1.13
+++ acinclude.m4 5 May 2006 17:23:05 -0000
@@ -7,6 +7,9 @@ sinclude(../bfd/bfd.m4)
dnl This gets the standard macros, like the TCL, TK, etc ones.
sinclude(../config/acinclude.m4)
+dnl This gets GCC_HEADER_STDINT.
+sinclude(../config/stdint.m4)
+
sinclude(../gettext.m4)
dnl The lines below arrange for aclocal not to bring gettext.m4's
dnl CY_GNU_GETTEXT into aclocal.m4.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.811
diff -u -p -r1.811 Makefile.in
--- Makefile.in 23 Apr 2006 14:15:01 -0000 1.811
+++ Makefile.in 5 May 2006 17:23:05 -0000
@@ -613,6 +613,7 @@ hashtab_h = $(INCLUDE_DIR)/hashtab.h
config_h = config.h
exc_request_U_h = exc_request_U.h
exc_request_S_h = exc_request_S.h
+gdb_stdint_h = gdb_stdint.h
msg_reply_S_h = msg_reply_S.h
msg_U_h = msg_U.h
notify_S_h = notify_S.h
@@ -1280,6 +1281,7 @@ distclean: clean
rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h
rm -f gdbserver/Makefile gdbserver/config.cache
rm -f nm.h tm.h xm.h config.status config.h stamp-h .gdbinit
+ rm -f gdb_stdint.h
rm -f y.output yacc.acts yacc.tmp y.tab.h
rm -f config.log config.cache
rm -f Makefile
@@ -1317,11 +1319,28 @@ subdir_do: force
done
Makefile: Makefile.in config.status @frags@
- $(SHELL) config.status
+ # Regenerate the Makefile and the tm.h / nm.h links.
+ CONFIG_FILES=Makefile \
+ CONFIG_COMMANDS= \
+ CONFIG_HEADERS= \
+ $(SHELL) config.status
config.h: stamp-h ; @true
stamp-h: config.in config.status
- CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
+ CONFIG_HEADERS=config.h:config.in \
+ CONFIG_COMMANDS=default \
+ CONFIG_FILES= \
+ CONFIG_LINKS= \
+ $(SHELL) config.status
+
+gdb_stdint.h: stamp-int ; @true
+stamp-int: config.status
+ CONFIG_COMMANDS=gdb_stdint.h \
+ CONFIG_FILES= \
+ CONFIG_HEADERS= \
+ CONFIG_LINKS= \
+ $(SHELL) config.status
+ echo stamp > stamp-int
config.status: configure configure.tgt configure.host
$(SHELL) config.status --recheck
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rfc] gdb_stdint.h.
2006-05-05 17:27 [rfc] gdb_stdint.h Daniel Jacobowitz
@ 2006-05-05 19:32 ` Jim Blandy
2006-05-05 21:50 ` Eli Zaretskii
2006-05-15 17:16 ` Daniel Jacobowitz
1 sibling, 1 reply; 5+ messages in thread
From: Jim Blandy @ 2006-05-05 19:32 UTC (permalink / raw)
To: gdb-patches
Daniel Jacobowitz <drow@false.org> writes:
> You want uintptr_t? I got your uintptr_t right here.
>
> This patch creates a header in the build directory named gdb_stdint.h.
> It defines all of the things which a stdint.h ought to define. It uses
> the system's stdint.h if there is one, and provides anything missing,
> up to and including the whole file.
>
> There is, of course, a huge hairy chunk of m4 and portability knowledge
> that you don't see in this patch. That's because it's already in
> config/ and was written for GCC. I'm OK with that :-) It means it's
> quite well tested at this point.
>
> This would be enough to allow us to start using uint64_t, uintptr_t,
> et cetera in the common code of GDB. Which, in my opinion, would be a
> good idea. They're nice to have around.
Oh, I double-plus-good-feeling <stdint.h>. Criminal not to have it in
the language from the beginning.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rfc] gdb_stdint.h.
2006-05-05 19:32 ` Jim Blandy
@ 2006-05-05 21:50 ` Eli Zaretskii
2006-05-05 21:57 ` Michael Snyder
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2006-05-05 21:50 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches
> From: Jim Blandy <jimb@codesourcery.com>
> Date: Fri, 05 May 2006 12:32:17 -0700
>
> Oh, I double-plus-good-feeling <stdint.h>. Criminal not to have it in
> the language from the beginning.
In the beginning, as you well know, there was only one int.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rfc] gdb_stdint.h.
2006-05-05 21:50 ` Eli Zaretskii
@ 2006-05-05 21:57 ` Michael Snyder
0 siblings, 0 replies; 5+ messages in thread
From: Michael Snyder @ 2006-05-05 21:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Jim Blandy, gdb-patches
Eli Zaretskii wrote:
>>From: Jim Blandy <jimb@codesourcery.com>
>>Date: Fri, 05 May 2006 12:32:17 -0700
>>
>>Oh, I double-plus-good-feeling <stdint.h>. Criminal not to have it in
>>the language from the beginning.
>
>
> In the beginning, as you well know, there was only one int.
>
And the int said, let there be *.
And there was *.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rfc] gdb_stdint.h.
2006-05-05 17:27 [rfc] gdb_stdint.h Daniel Jacobowitz
2006-05-05 19:32 ` Jim Blandy
@ 2006-05-15 17:16 ` Daniel Jacobowitz
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2006-05-15 17:16 UTC (permalink / raw)
To: gdb-patches
On Fri, May 05, 2006 at 01:27:13PM -0400, Daniel Jacobowitz wrote:
> You want uintptr_t? I got your uintptr_t right here.
>
> This patch creates a header in the build directory named gdb_stdint.h.
> It defines all of the things which a stdint.h ought to define. It uses
> the system's stdint.h if there is one, and provides anything missing,
> up to and including the whole file.
>
> There is, of course, a huge hairy chunk of m4 and portability knowledge
> that you don't see in this patch. That's because it's already in
> config/ and was written for GCC. I'm OK with that :-) It means it's
> quite well tested at this point.
>
> This would be enough to allow us to start using uint64_t, uintptr_t,
> et cetera in the common code of GDB. Which, in my opinion, would be a
> good idea. They're nice to have around.
>
> Any comments?
> 2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
>
> * configure.ac: Use GCC_HEADER_STDINT.
> * acinclude.m4: Include stdint.m4.
> * Makefile.in (gdb_stdint_h): Define.
> (distclean): Remove gdb_stdint.h.
> (Makefile, stamp-h): Update rules to generate only the correct
> files.
> (gdb_stdint.h, stamp-int): New rules.
> * config.in, configure: Regenerated.
Comments sounded supportive to me! I have committed it.
Debian unstable appears to have gone up to autoconf 2.59d, so configure
has changed a bit with this commit; I think there won't be any
problems that affect GDB, but please do let me know if I'm wrong.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-05-15 17:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-05 17:27 [rfc] gdb_stdint.h Daniel Jacobowitz
2006-05-05 19:32 ` Jim Blandy
2006-05-05 21:50 ` Eli Zaretskii
2006-05-05 21:57 ` Michael Snyder
2006-05-15 17:16 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox