- Fix more the variable-length-arrays support (BZ 468266, feature BZ

377541).
- Integrate the `bt full' protection (for BZ 466901) into the VLA patch.
This commit is contained in:
Jan Kratochvil 2008-11-09 14:39:26 +00:00
parent 3883e15b9c
commit 917bed595e
4 changed files with 650 additions and 191 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
--- /dev/null 2008-11-06 15:02:28.406299691 +0100
+++ gdb-6.8/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2008-11-06 23:11:02.000000000 +0100
@@ -0,0 +1,102 @@
+# Copyright 2006 Free Software Foundation, Inc.
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by

View File

@ -1,93 +0,0 @@
# Never terminate `bt full' on a problem of variable resolving (BZ 466901).
--- ./gdb/f-valprint.c 2008-11-06 22:05:16.000000000 +0100
+++ ./gdb/f-valprint.c 2008-11-06 22:09:10.000000000 +0100
@@ -611,8 +611,7 @@ info_common_command (char *comname, int
while (entry != NULL)
{
printf_filtered ("%s = ", DEPRECATED_SYMBOL_NAME (entry->symbol));
- print_variable_value (entry->symbol, fi, gdb_stdout);
- printf_filtered ("\n");
+ print_variable_value_nl (entry->symbol, fi, gdb_stdout);
entry = entry->next;
}
}
--- ./gdb/printcmd.c 2008-11-06 22:05:16.000000000 +0100
+++ ./gdb/printcmd.c 2008-11-06 22:06:55.000000000 +0100
@@ -42,6 +42,7 @@
#include "block.h"
#include "disasm.h"
#include "dfp.h"
+#include "exceptions.h"
#ifdef TUI
#include "tui/tui.h" /* For tui_active et.al. */
@@ -1721,15 +1722,26 @@ disable_display_command (char *args, int
/* Print the value in stack frame FRAME of a variable specified by a
- struct symbol. */
+ struct symbol. Printed value gets terminated by a newline. */
void
-print_variable_value (struct symbol *var, struct frame_info *frame,
- struct ui_file *stream)
+print_variable_value_nl (struct symbol *var, struct frame_info *frame,
+ struct ui_file *stream)
{
- struct value *val = read_var_value (var, frame);
+ struct value *val = NULL; /* A false GCC warning. */
+ struct gdb_exception e;
- value_print (val, stream, 0, Val_pretty_default);
+ TRY_CATCH (e, RETURN_MASK_ERROR)
+ {
+ val = read_var_value (var, frame);
+ }
+ if (e.reason < 0)
+ exception_print (stream, e);
+ else
+ {
+ value_print (val, stream, 0, Val_pretty_default);
+ fprintf_filtered (stream, "\n");
+ }
}
static void
--- ./gdb/stack.c 2008-11-06 22:05:16.000000000 +0100
+++ ./gdb/stack.c 2008-11-06 22:08:45.000000000 +0100
@@ -1412,8 +1412,7 @@ print_block_frame_locals (struct block *
fputs_filtered ("\t", stream);
fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
fputs_filtered (" = ", stream);
- print_variable_value (sym, frame, stream);
- fprintf_filtered (stream, "\n");
+ print_variable_value_nl (sym, frame, stream);
break;
default:
@@ -1633,8 +1632,7 @@ print_frame_arg_vars (struct frame_info
sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
b, VAR_DOMAIN, NULL, NULL);
- print_variable_value (sym2, frame, stream);
- fprintf_filtered (stream, "\n");
+ print_variable_value_nl (sym2, frame, stream);
break;
default:
--- ./gdb/value.h 2008-11-06 22:05:16.000000000 +0100
+++ ./gdb/value.h 2008-11-06 22:08:07.000000000 +0100
@@ -526,9 +526,9 @@ extern int common_val_print (struct valu
extern int val_print_string (CORE_ADDR addr, int len, int width,
struct ui_file *stream);
-extern void print_variable_value (struct symbol *var,
- struct frame_info *frame,
- struct ui_file *stream);
+extern void print_variable_value_nl (struct symbol *var,
+ struct frame_info *frame,
+ struct ui_file *stream);
extern int check_field (struct value *, const char *);

View File

@ -13,7 +13,7 @@ Version: 6.8
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 28%{?_with_upstream:.upstream}%{?dist}
Release: 29%{?_with_upstream:.upstream}%{?dist}
License: GPLv3+
Group: Development/Debuggers
@ -422,9 +422,6 @@ Patch342: gdb-6.8-ia64-breakpoint-restoration.patch
# Test the watchpoints conditionals works.
Patch343: gdb-6.8-watchpoint-conditionals-test.patch
# Never terminate `bt full' on a problem of variable resolving (for BZ 466901).
Patch347: gdb-6.8-bz466901-backtrace-never-aborts.patch
# Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
Patch348: gdb-6.8-bz466901-backtrace-full-prelinked.patch
@ -631,7 +628,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch338 -p1
%patch342 -p1
%patch343 -p1
%patch347 -p1
%patch348 -p1
%patch124 -p1
@ -896,6 +892,10 @@ fi
%endif
%changelog
* Sun Nov 9 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-29
- Fix more the variable-length-arrays support (BZ 468266, feature BZ 377541).
- Integrate the `bt full' protection (for BZ 466901) into the VLA patch.
* Thu Nov 6 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-28
- Fix the "never terminate `bt full'" patch false GCC warning / build error.