rpms/gdb/FC-4 gdb-6.3-type-punning-20060214.patch, NONE, 1.1 gdb.spec, 1.166, 1.167 gdb-6.3-type-punning-20051219.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Feb 14 19:40:16 UTC 2006
Author: aoliva
Update of /cvs/dist/rpms/gdb/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv28733/FC-4
Modified Files:
gdb.spec
Added Files:
gdb-6.3-type-punning-20060214.patch
Removed Files:
gdb-6.3-type-punning-20051219.patch
Log Message:
* Tue Feb 14 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.99
- Use type-punning warning fixes as accepted upstream.
gdb-6.3-type-punning-20060214.patch:
c-exp.c | 19 ++-----------------
c-exp.y | 19 ++-----------------
doublest.h | 7 ++++++-
jv-exp.c | 19 ++-----------------
jv-exp.y | 19 ++-----------------
objc-exp.c | 19 ++-----------------
objc-exp.y | 19 ++-----------------
p-exp.c | 19 ++-----------------
p-exp.y | 19 ++-----------------
tui/tui-data.c | 6 +++---
tui/tui-data.h | 2 +-
tui/tui-stack.c | 4 ++--
tui/tui-win.c | 10 +++++-----
tui/tui-winsource.c | 4 ++--
varobj.c | 2 +-
15 files changed, 36 insertions(+), 151 deletions(-)
--- NEW FILE gdb-6.3-type-punning-20060214.patch ---
for gdb/ChangeLog
from Alexandre Oliva <aoliva at redhat.com>
* doublest.h (DOUBLEST): Use long double only if we can scan
it in. Undefine HAVE_LONG_DOUBLE otherwise.
(DOUBLEST_FORMAT): New.
* c-exp.y (parse_number): Use it.
* jv-exp.y (parse_number): Likewise.
* objc-exp.y (parse_number): Likewise.
* p-exp.y (parse_number): Likewise.
* c-exp.c, jv-exp.c, objc-exp.c, p-exp.c: Rebuilt.
* varobj.c (free_variable): Silence type-punning warnings.
* tui/tui-data.h (struct tui_list): Change type of list member.
* tui/tui-data.c: Remove no-longer-needed type casts.
(source_windows): Silence type-punning warnings.
* tui/tui-stack.c, tui/tui-win.c, tui/tui-winsource.c: Likewise.
Index: gdb-6.3/gdb/c-exp.y
===================================================================
--- gdb-6.3.orig/gdb/c-exp.y 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/c-exp.y 2006-02-14 17:21:34.000000000 -0200
@@ -1075,23 +1075,8 @@ parse_number (p, len, parsed_float, puti
char saved_char = p[len];
p[len] = 0; /* null-terminate the token */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
- else
- {
-#ifdef SCANF_HAS_LONG_DOUBLE
- num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval,&c);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- num = sscanf (p, "%lg%c", &temp,&c);
- putithere->typed_val_float.dval = temp;
-#endif
- }
+ num = sscanf (p, DOUBLEST_FORMAT "%c",
+ &putithere->typed_val_float.dval, &c);
p[len] = saved_char; /* restore the input stream */
if (num != 1) /* check scanf found ONLY a float ... */
return ERROR;
Index: gdb-6.3/gdb/jv-exp.y
===================================================================
--- gdb-6.3.orig/gdb/jv-exp.y 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/jv-exp.y 2006-02-14 17:21:34.000000000 -0200
@@ -712,23 +712,8 @@ parse_number (p, len, parsed_float, puti
char saved_char = p[len];
p[len] = 0; /* null-terminate the token */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval, &c);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval, &c);
- else
- {
-#ifdef SCANF_HAS_LONG_DOUBLE
- num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval, &c);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- num = sscanf (p, "%lg%c", &temp, &c);
- putithere->typed_val_float.dval = temp;
-#endif
- }
+ num = sscanf (p, DOUBLEST_FORMAT "%c",
+ &putithere->typed_val_float.dval, &c);
p[len] = saved_char; /* restore the input stream */
if (num != 1) /* check scanf found ONLY a float ... */
return ERROR;
Index: gdb-6.3/gdb/objc-exp.y
===================================================================
--- gdb-6.3.orig/gdb/objc-exp.y 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/objc-exp.y 2006-02-14 17:21:34.000000000 -0200
@@ -1025,23 +1025,8 @@ parse_number (p, len, parsed_float, puti
/* It's a float since it contains a point or an exponent. */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
- else
- {
-#ifdef PRINTF_HAS_LONG_DOUBLE
- sscanf (p, "%Lg", &putithere->typed_val_float.dval);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- sscanf (p, "%lg", &temp);
- putithere->typed_val_float.dval = temp;
-#endif
- }
+ sscanf (p, DOUBLEST_FORMAT "%c",
+ &putithere->typed_val_float.dval, &c);
/* See if it has `f' or `l' suffix (float or long double). */
Index: gdb-6.3/gdb/p-exp.y
===================================================================
--- gdb-6.3.orig/gdb/p-exp.y 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/p-exp.y 2006-02-14 17:21:34.000000000 -0200
@@ -798,23 +798,8 @@ parse_number (p, len, parsed_float, puti
char saved_char = p[len];
p[len] = 0; /* null-terminate the token */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
- else
- {
-#ifdef SCANF_HAS_LONG_DOUBLE
- num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval,&c);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- num = sscanf (p, "%lg%c", &temp,&c);
- putithere->typed_val_float.dval = temp;
-#endif
- }
+ num = sscanf (p, DOUBLEST_FORMAT "%c",
+ &putithere->typed_val_float.dval, &c);
p[len] = saved_char; /* restore the input stream */
if (num != 1) /* check scanf found ONLY a float ... */
return ERROR;
Index: gdb-6.3/gdb/varobj.c
===================================================================
--- gdb-6.3.orig/gdb/varobj.c 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/varobj.c 2006-02-14 17:21:34.000000000 -0200
@@ -1410,7 +1410,7 @@ free_variable (struct varobj *var)
/* Free the expression if this is a root variable. */
if (var->root->rootvar == var)
{
- free_current_contents ((char **) &var->root->exp);
+ free_current_contents (&var->root->exp);
xfree (var->root);
}
Index: gdb-6.3/gdb/doublest.h
===================================================================
--- gdb-6.3.orig/gdb/doublest.h 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/doublest.h 2006-02-14 17:21:34.000000000 -0200
@@ -48,10 +48,15 @@ struct floatformat;
host's `long double'. In general, we'll probably reduce the precision of
any such values and print a warning. */
-#ifdef HAVE_LONG_DOUBLE
+#if defined HAVE_LONG_DOUBLE && defined SCANF_HAS_LONG_DOUBLE
typedef long double DOUBLEST;
+# define DOUBLEST_FORMAT "%Lg"
#else
typedef double DOUBLEST;
+# define DOUBLEST_FORMAT "%g"
+/* If we can't scan or print long double, we don't want to use it
+ anywhere. */
+# undef HAVE_LONG_DOUBLE
#endif
extern void floatformat_to_doublest (const struct floatformat *,
Index: gdb-6.3/gdb/tui/tui-data.c
===================================================================
--- gdb-6.3.orig/gdb/tui/tui-data.c 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/tui/tui-data.c 2006-02-14 17:21:34.000000000 -0200
@@ -44,7 +44,7 @@ static int term_height, term_width;
static struct tui_gen_win_info _locator;
static struct tui_gen_win_info exec_info[2];
static struct tui_win_info * src_win_list[2];
-static struct tui_list source_windows = {(void **) src_win_list, 0};
+static struct tui_list source_windows = {src_win_list, 0};
static int default_tab_len = DEFAULT_TAB_LEN;
static struct tui_win_info * win_with_focus = (struct tui_win_info *) NULL;
static struct tui_layout_def layout_def =
@@ -182,7 +182,7 @@ tui_clear_source_windows_detail (void)
int i;
for (i = 0; i < (tui_source_windows ())->count; i++)
- tui_clear_win_detail ((struct tui_win_info *) (tui_source_windows ())->list[i]);
+ tui_clear_win_detail ((tui_source_windows ())->list[i]);
}
@@ -779,7 +779,7 @@ tui_free_all_source_wins_content (void)
for (i = 0; i < (tui_source_windows ())->count; i++)
{
- struct tui_win_info * win_info = (struct tui_win_info *) (tui_source_windows ())->list[i];
+ struct tui_win_info * win_info = (tui_source_windows ())->list[i];
if (win_info != NULL)
{
Index: gdb-6.3/gdb/tui/tui-data.h
===================================================================
--- gdb-6.3.orig/gdb/tui/tui-data.h 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/tui/tui-data.h 2006-02-14 17:21:34.000000000 -0200
@@ -110,7 +110,7 @@ enum tui_scroll_direction
/* General list struct. */
struct tui_list
{
- void **list;
+ struct tui_win_info **list;
int count;
};
Index: gdb-6.3/gdb/tui/tui-stack.c
===================================================================
--- gdb-6.3.orig/gdb/tui/tui-stack.c 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/tui/tui-stack.c 2006-02-14 17:21:34.000000000 -0200
@@ -343,7 +343,7 @@ tui_show_frame_info (struct frame_info *
for (i = 0; i < (tui_source_windows ())->count; i++)
{
union tui_which_element *item;
- win_info = (struct tui_win_info *) (tui_source_windows ())->list[i];
+ win_info = (tui_source_windows ())->list[i];
item = &((struct tui_win_element *) locator->content[0])->which_element;
if (win_info == TUI_SRC_WIN)
@@ -399,7 +399,7 @@ tui_show_frame_info (struct frame_info *
tui_show_locator_content ();
for (i = 0; i < (tui_source_windows ())->count; i++)
{
- win_info = (struct tui_win_info *) (tui_source_windows ())->list[i];
+ win_info = (tui_source_windows ())->list[i];
tui_clear_source_content (win_info, EMPTY_SOURCE_PROMPT);
tui_update_exec_info (win_info);
}
Index: gdb-6.3/gdb/tui/tui-win.c
===================================================================
--- gdb-6.3.orig/gdb/tui/tui-win.c 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/tui/tui-win.c 2006-02-14 17:21:34.000000000 -0200
@@ -1088,7 +1088,7 @@ tui_adjust_win_heights (struct tui_win_i
make_invisible_and_set_new_height (primary_win_info, new_height);
if (primary_win_info->generic.type == CMD_WIN)
{
- win_info = (struct tui_win_info *) (tui_source_windows ())->list[0];
+ win_info = (tui_source_windows ())->list[0];
src_win_info = win_info;
}
else
@@ -1117,7 +1117,7 @@ tui_adjust_win_heights (struct tui_win_i
else
{
first_win = TUI_DATA_WIN;
- second_win = (struct tui_win_info *) (tui_source_windows ())->list[0];
+ second_win = (tui_source_windows ())->list[0];
}
if (primary_win_info == TUI_CMD_WIN)
{ /*
@@ -1371,7 +1371,7 @@ new_height_ok (struct tui_win_info * pri
struct tui_win_info * win_info;
if (primary_win_info == TUI_CMD_WIN)
- win_info = (struct tui_win_info *) (tui_source_windows ())->list[0];
+ win_info = (tui_source_windows ())->list[0];
else
win_info = TUI_CMD_WIN;
ok = ((new_height +
@@ -1392,7 +1392,7 @@ new_height_ok (struct tui_win_info * pri
else
{
first_win = TUI_DATA_WIN;
- second_win = (struct tui_win_info *) (tui_source_windows ())->list[0];
+ second_win = (tui_source_windows ())->list[0];
}
/*
** We could simply add all the heights to obtain the same result
@@ -1521,7 +1521,7 @@ parse_scrolling_args (char *arg, struct
warning ("Invalid window specified. \n\
The window name specified must be valid and visible.\n");
else if (*win_to_scroll == TUI_CMD_WIN)
- *win_to_scroll = (struct tui_win_info *) (tui_source_windows ())->list[0];
+ *win_to_scroll = (tui_source_windows ())->list[0];
}
xfree (buf);
}
Index: gdb-6.3/gdb/tui/tui-winsource.c
===================================================================
--- gdb-6.3.orig/gdb/tui/tui-winsource.c 2006-02-14 17:21:32.000000000 -0200
+++ gdb-6.3/gdb/tui/tui-winsource.c 2006-02-14 17:21:34.000000000 -0200
@@ -158,7 +158,7 @@ tui_update_source_windows_with_addr (COR
for (i = 0; i < (tui_source_windows ())->count; i++)
{
- struct tui_win_info * win_info = (struct tui_win_info *) (tui_source_windows ())->list[i];
+ struct tui_win_info * win_info = (tui_source_windows ())->list[i];
tui_clear_source_content (win_info, EMPTY_SOURCE_PROMPT);
tui_clear_exec_info_content (win_info);
@@ -386,7 +386,7 @@ tui_update_all_breakpoint_info (void)
for (i = 0; i < list->count; i++)
{
- struct tui_win_info * win = (struct tui_win_info *) list->list[i];
+ struct tui_win_info * win = list->list[i];
if (tui_update_breakpoint_info (win, FALSE))
{
Index: gdb-6.3/gdb/c-exp.c
===================================================================
--- gdb-6.3.orig/gdb/c-exp.c 2004-11-08 14:25:35.000000000 -0200
+++ gdb-6.3/gdb/c-exp.c 2006-02-14 17:29:08.000000000 -0200
@@ -2727,23 +2727,8 @@ parse_number (p, len, parsed_float, puti
char saved_char = p[len];
p[len] = 0; /* null-terminate the token */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
- else
- {
-#ifdef SCANF_HAS_LONG_DOUBLE
- num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval,&c);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- num = sscanf (p, "%lg%c", &temp,&c);
- putithere->typed_val_float.dval = temp;
-#endif
- }
+ num = sscanf (p, DOUBLEST_FORMAT "%c",
+ &putithere->typed_val_float.dval, &c);
p[len] = saved_char; /* restore the input stream */
if (num != 1) /* check scanf found ONLY a float ... */
return ERROR;
Index: gdb-6.3/gdb/jv-exp.c
===================================================================
--- gdb-6.3.orig/gdb/jv-exp.c 2004-11-08 14:25:38.000000000 -0200
+++ gdb-6.3/gdb/jv-exp.c 2006-02-14 17:29:08.000000000 -0200
@@ -2099,23 +2099,8 @@ parse_number (p, len, parsed_float, puti
char saved_char = p[len];
p[len] = 0; /* null-terminate the token */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval, &c);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval, &c);
- else
- {
-#ifdef SCANF_HAS_LONG_DOUBLE
- num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval, &c);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- num = sscanf (p, "%lg%c", &temp, &c);
- putithere->typed_val_float.dval = temp;
-#endif
- }
+ num = sscanf (p, DOUBLEST_FORMAT "%c",
+ &putithere->typed_val_float.dval, &c);
p[len] = saved_char; /* restore the input stream */
if (num != 1) /* check scanf found ONLY a float ... */
return ERROR;
Index: gdb-6.3/gdb/objc-exp.c
===================================================================
--- gdb-6.3.orig/gdb/objc-exp.c 2004-11-08 14:25:36.000000000 -0200
+++ gdb-6.3/gdb/objc-exp.c 2006-02-14 17:29:08.000000000 -0200
@@ -2688,23 +2688,8 @@ parse_number (p, len, parsed_float, puti
/* It's a float since it contains a point or an exponent. */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
- else
- {
-#ifdef PRINTF_HAS_LONG_DOUBLE
- sscanf (p, "%Lg", &putithere->typed_val_float.dval);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- sscanf (p, "%lg", &temp);
- putithere->typed_val_float.dval = temp;
-#endif
- }
+ sscanf (p, DOUBLEST_FORMAT "%c",
+ &putithere->typed_val_float.dval, &c);
/* See if it has `f' or `l' suffix (float or long double). */
Index: gdb-6.3/gdb/p-exp.c
===================================================================
--- gdb-6.3.orig/gdb/p-exp.c 2004-11-08 14:25:41.000000000 -0200
+++ gdb-6.3/gdb/p-exp.c 2006-02-14 17:29:08.000000000 -0200
@@ -2141,23 +2141,8 @@ parse_number (p, len, parsed_float, puti
char saved_char = p[len];
p[len] = 0; /* null-terminate the token */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
- else
- {
-#ifdef SCANF_HAS_LONG_DOUBLE
- num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval,&c);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- num = sscanf (p, "%lg%c", &temp,&c);
- putithere->typed_val_float.dval = temp;
-#endif
- }
+ num = sscanf (p, DOUBLEST_FORMAT "%c",
+ &putithere->typed_val_float.dval, &c);
p[len] = saved_char; /* restore the input stream */
if (num != 1) /* check scanf found ONLY a float ... */
return ERROR;
Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/FC-4/gdb.spec,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- gdb.spec 16 Jan 2006 16:25:41 -0000 1.166
+++ gdb.spec 14 Feb 2006 19:40:13 -0000 1.167
@@ -11,7 +11,7 @@
Version: 6.3.0.0
# The release always contains a leading reserved number, start it at 0.
-Release: 1.97
+Release: 1.101
License: GPL
Group: Development/Debuggers
@@ -263,7 +263,7 @@
# Silence type-punning warnings that cause compilation errors because
# of -Werror.
-Patch171: gdb-6.3-type-punning-20051219.patch
+Patch171: gdb-6.3-type-punning-20060214.patch
%ifarch ia64
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu libunwind >= 0.96-3
@@ -536,7 +536,19 @@
# don't include the files in include, they are part of binutils
%changelog
-* Mon Jan 16 2006 Alexandre Oliva <aoliva at redhat.com> 6.3.0.0-1.97
+* Tue Feb 14 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.101
+- Bump up release number.
+
+* Tue Feb 14 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.99
+- Use type-punning warning fixes as accepted upstream.
+
+* Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> - 6.3.0.0-1.98.2
+- bump again for double-long bug on ppc(64)
+
+* Tue Feb 07 2006 Jesse Keating <jkeating at redhat.com> - 6.3.0.0-1.98.1
+- rebuilt for new gcc4.1 snapshot and glibc changes
+
+* Mon Jan 16 2006 Alexandre Oliva <aoliva at redhat.com> 6.3.0.0-1.98
- Bump up release number.
* Mon Dec 19 2005 Alexandre Oliva <aoliva at redhat.com> 6.3.0.0-1.94
--- gdb-6.3-type-punning-20051219.patch DELETED ---
More information about the fedora-cvs-commits
mailing list