- Archer update to the snapshot: 935f217d3367a642374bc56c6b146d376fc3edab
- Archer backport: 281278326412f9d6a3fabb8adc1d419fd7ddc7d7 - Fix [expr] crash reading invalid DWARF C++ symbol "" (BZ 490319).
This commit is contained in:
parent
5b5fe7db1b
commit
42988d9875
@ -1,69 +0,0 @@
|
||||
From aafe933b497eee8cfab736a10bae1a90d4bceb18 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Tromey <tromey@redhat.com>
|
||||
Date: Thu, 12 Mar 2009 13:06:15 -0600
|
||||
Subject: [PATCH] Remove duplicate target-wide-charset parameter
|
||||
|
||||
2009-03-11 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* python/lib/gdb/libstdcxx/v6/printers.py (WideEncoding): Remove.
|
||||
(target_wide_charset): Likewise.
|
||||
(StdStringPrinter.to_string): Change encoding lookup.
|
||||
(build_libstdcxx_dictionary): Update.
|
||||
---
|
||||
gdb/python/lib/gdb/libstdcxx/v6/printers.py | 26 ++++----------------------
|
||||
1 files changed, 4 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/gdb/python/lib/gdb/libstdcxx/v6/printers.py b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
|
||||
index c0dc987..2572731 100644
|
||||
--- a/gdb/python/lib/gdb/libstdcxx/v6/printers.py
|
||||
+++ b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
|
||||
@@ -436,22 +436,6 @@ class StdDequeIteratorPrinter:
|
||||
def to_string(self):
|
||||
return self.val['_M_cur'].dereference()
|
||||
|
||||
-class WideEncoding (gdb.Parameter):
|
||||
- """The target wide character set is the encoding used for wchar_t."""
|
||||
-
|
||||
- set_doc = "Set the target wide character set."
|
||||
- show_doc = "Show the target wide character set."
|
||||
-
|
||||
- # FIXME: needs a complete method -- but does Parameter support it?
|
||||
- def __init__ (self):
|
||||
- super (WideEncoding, self).__init__ ("target-wide-charset",
|
||||
- gdb.COMMAND_SUPPORT,
|
||||
- gdb.PARAM_STRING)
|
||||
- # I think this is ok for most glibc locales.
|
||||
- self.value = 'UTF-32'
|
||||
-
|
||||
-target_wide_charset = WideEncoding()
|
||||
-
|
||||
class StdStringPrinter:
|
||||
"Print a std::basic_string of some kind"
|
||||
|
||||
@@ -462,10 +446,8 @@ class StdStringPrinter:
|
||||
def to_string(self):
|
||||
# Look up the target encoding as late as possible.
|
||||
encoding = self.encoding
|
||||
- if encoding is None:
|
||||
- encoding = gdb.parameter('target-charset')
|
||||
- elif isinstance(encoding, WideEncoding):
|
||||
- encoding = encoding.value
|
||||
+ if encoding[0] is '@':
|
||||
+ encoding = gdb.parameter(encoding[1:])
|
||||
return self.val['_M_dataplus']['_M_p'].string(encoding)
|
||||
|
||||
def display_hint (self):
|
||||
@@ -599,8 +581,8 @@ def build_libstdcxx_dictionary ():
|
||||
# libstdc++ objects requiring pretty-printing.
|
||||
# In order from:
|
||||
# http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01847.html
|
||||
- pretty_printers_dict[re.compile('^std::basic_string<char,.*>$')] = lambda val: StdStringPrinter(None, val)
|
||||
- pretty_printers_dict[re.compile('^std::basic_string<wchar_t,.*>$')] = lambda val: StdStringPrinter(target_wide_charset, val)
|
||||
+ pretty_printers_dict[re.compile('^std::basic_string<char,.*>$')] = lambda val: StdStringPrinter('@target-charset', val)
|
||||
+ pretty_printers_dict[re.compile('^std::basic_string<wchar_t,.*>$')] = lambda val: StdStringPrinter('@target-wide-charset', val)
|
||||
pretty_printers_dict[re.compile('^std::basic_string<char16_t,.*>$')] = lambda val: StdStringPrinter('UTF-16', val)
|
||||
pretty_printers_dict[re.compile('^std::basic_string<char32_t,.*>$')] = lambda val: StdStringPrinter('UTF-32', val)
|
||||
pretty_printers_dict[re.compile('^std::bitset<.*>$')] = StdBitsetPrinter
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
http://sourceware.org/gdb/wiki/ArcherBranchManagement
|
||||
|
||||
GIT snapshot:
|
||||
commit a99e30d08ade4a2df0f943b036cd653bcd12b04d
|
||||
commit 935f217d3367a642374bc56c6b146d376fc3edab
|
||||
|
||||
branch `archer' - the merge of branches:
|
||||
archer-jankratochvil-merge-expr
|
||||
@ -10784,7 +10784,7 @@ index 76577f1..bf46761 100644
|
||||
|
||||
#endif /* dwarf2loc.h */
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 55868da..de93d08 100644
|
||||
index 55868da..a82286f 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -1,8 +1,7 @@
|
||||
@ -11929,7 +11929,7 @@ index 55868da..de93d08 100644
|
||||
+ child_die = die->child;
|
||||
+ die_children = 0;
|
||||
+ while (child_die && child_die->tag)
|
||||
{
|
||||
+ {
|
||||
+ process_die (child_die, cu);
|
||||
+ child_die = sibling_die (child_die);
|
||||
+ die_children++;
|
||||
@ -11937,7 +11937,7 @@ index 55868da..de93d08 100644
|
||||
+
|
||||
+ attr = dwarf2_attr (die, DW_AT_abstract_origin, cu);
|
||||
+ if (attr)
|
||||
+ {
|
||||
{
|
||||
+ /* For the list of CHILD_DIEs. */
|
||||
+ unsigned *offsets;
|
||||
+ unsigned *offsets_end, *offsetp;
|
||||
@ -12977,7 +12977,7 @@ index 55868da..de93d08 100644
|
||||
+dwarf2_canonicalize_name (char *name, struct dwarf2_cu *cu,
|
||||
+ struct obstack *obstack)
|
||||
+{
|
||||
+ if (cu->language == language_cplus)
|
||||
+ if (name && cu->language == language_cplus)
|
||||
+ {
|
||||
+ char *canon_name = cp_canonicalize_string (name);
|
||||
+
|
||||
@ -20918,10 +20918,10 @@ index 0000000..fe7c072
|
||||
+register_libstdcxx_printers (gdb.current_objfile ())
|
||||
diff --git a/gdb/python/lib/gdb/libstdcxx/v6/printers.py b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
|
||||
new file mode 100644
|
||||
index 0000000..c0dc987
|
||||
index 0000000..2572731
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
|
||||
@@ -0,0 +1,647 @@
|
||||
@@ -0,0 +1,629 @@
|
||||
+# Pretty-printers for libstc++.
|
||||
+
|
||||
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
|
||||
@ -21360,22 +21360,6 @@ index 0000000..c0dc987
|
||||
+ def to_string(self):
|
||||
+ return self.val['_M_cur'].dereference()
|
||||
+
|
||||
+class WideEncoding (gdb.Parameter):
|
||||
+ """The target wide character set is the encoding used for wchar_t."""
|
||||
+
|
||||
+ set_doc = "Set the target wide character set."
|
||||
+ show_doc = "Show the target wide character set."
|
||||
+
|
||||
+ # FIXME: needs a complete method -- but does Parameter support it?
|
||||
+ def __init__ (self):
|
||||
+ super (WideEncoding, self).__init__ ("target-wide-charset",
|
||||
+ gdb.COMMAND_SUPPORT,
|
||||
+ gdb.PARAM_STRING)
|
||||
+ # I think this is ok for most glibc locales.
|
||||
+ self.value = 'UTF-32'
|
||||
+
|
||||
+target_wide_charset = WideEncoding()
|
||||
+
|
||||
+class StdStringPrinter:
|
||||
+ "Print a std::basic_string of some kind"
|
||||
+
|
||||
@ -21386,10 +21370,8 @@ index 0000000..c0dc987
|
||||
+ def to_string(self):
|
||||
+ # Look up the target encoding as late as possible.
|
||||
+ encoding = self.encoding
|
||||
+ if encoding is None:
|
||||
+ encoding = gdb.parameter('target-charset')
|
||||
+ elif isinstance(encoding, WideEncoding):
|
||||
+ encoding = encoding.value
|
||||
+ if encoding[0] is '@':
|
||||
+ encoding = gdb.parameter(encoding[1:])
|
||||
+ return self.val['_M_dataplus']['_M_p'].string(encoding)
|
||||
+
|
||||
+ def display_hint (self):
|
||||
@ -21523,8 +21505,8 @@ index 0000000..c0dc987
|
||||
+ # libstdc++ objects requiring pretty-printing.
|
||||
+ # In order from:
|
||||
+ # http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01847.html
|
||||
+ pretty_printers_dict[re.compile('^std::basic_string<char,.*>$')] = lambda val: StdStringPrinter(None, val)
|
||||
+ pretty_printers_dict[re.compile('^std::basic_string<wchar_t,.*>$')] = lambda val: StdStringPrinter(target_wide_charset, val)
|
||||
+ pretty_printers_dict[re.compile('^std::basic_string<char,.*>$')] = lambda val: StdStringPrinter('@target-charset', val)
|
||||
+ pretty_printers_dict[re.compile('^std::basic_string<wchar_t,.*>$')] = lambda val: StdStringPrinter('@target-wide-charset', val)
|
||||
+ pretty_printers_dict[re.compile('^std::basic_string<char16_t,.*>$')] = lambda val: StdStringPrinter('UTF-16', val)
|
||||
+ pretty_printers_dict[re.compile('^std::basic_string<char32_t,.*>$')] = lambda val: StdStringPrinter('UTF-32', val)
|
||||
+ pretty_printers_dict[re.compile('^std::bitset<.*>$')] = StdBitsetPrinter
|
||||
@ -34860,6 +34842,53 @@ index 0000000..1c6e84a
|
||||
+gdb_test "step" \
|
||||
+ "func.* \\(.*\\) at .*" \
|
||||
+ "step"
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.S b/gdb/testsuite/gdb.dwarf2/dw2-strp.S
|
||||
index a1602a5..293cc1b 100644
|
||||
--- a/gdb/testsuite/gdb.dwarf2/dw2-strp.S
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.S
|
||||
@@ -28,7 +28,8 @@
|
||||
/* CU die */
|
||||
.uleb128 1 /* Abbrev: DW_TAG_compile_unit */
|
||||
.4byte .Lproducer /* DW_AT_producer */
|
||||
- .byte 1 /* DW_AT_language (C) */
|
||||
+ /* Use C++ to exploit a bug in parsing DW_AT_name "". */
|
||||
+ .byte 4 /* DW_AT_language (C++) - */
|
||||
|
||||
.Larray_type:
|
||||
.uleb128 2 /* Abbrev: DW_TAG_array_type */
|
||||
@@ -60,6 +61,10 @@
|
||||
.Lconst_type:
|
||||
.uleb128 6 /* Abbrev: DW_TAG_const_type */
|
||||
.4byte .Larray_type-.Lcu1_begin/* DW_AT_type */
|
||||
+
|
||||
+ .uleb128 7 /* Abbrev: DW_TAG_variable (name "") */
|
||||
+ .4byte .Lemptyname /* DW_AT_name */
|
||||
+
|
||||
.byte 0 /* End of children of CU */
|
||||
.Lcu1_end:
|
||||
|
||||
@@ -126,6 +131,15 @@
|
||||
.uleb128 0x13 /* DW_FORM_ref4 */
|
||||
.byte 0x0 /* Terminator */
|
||||
.byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 7 /* Abbrev code */
|
||||
+ .uleb128 0x34 /* DW_TAG_variable */
|
||||
+ .byte 0x0 /* DW_children_no */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0xe /* DW_FORM_strp */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
.byte 0x0 /* Terminator */
|
||||
|
||||
/* String table */
|
||||
@@ -140,3 +154,5 @@
|
||||
.string "a_string"
|
||||
.Lvarcontents:
|
||||
.string "hello world!\n"
|
||||
+.Lemptyname:
|
||||
+ .string ""
|
||||
diff --git a/gdb/testsuite/gdb.fortran/common-block.exp b/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
new file mode 100644
|
||||
index 0000000..888f6c3
|
||||
|
9
gdb.spec
9
gdb.spec
@ -13,7 +13,7 @@ Version: 6.8.50.20090302
|
||||
|
||||
# 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: 9%{?_with_upstream:.upstream}%{?dist}
|
||||
Release: 10%{?_with_upstream:.upstream}%{?dist}
|
||||
|
||||
License: GPLv3+
|
||||
Group: Development/Debuggers
|
||||
@ -370,7 +370,6 @@ Patch348: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
|
||||
# The merged branch `archer' of: http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
Patch349: gdb-archer.patch
|
||||
Patch354: gdb-archer-backport.patch
|
||||
|
||||
# Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187).
|
||||
# - Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE.
|
||||
@ -462,7 +461,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
|
||||
###patch232 -p1
|
||||
%patch349 -p1
|
||||
%patch354 -p1
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
@ -853,6 +851,11 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Mar 15 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-10
|
||||
- Archer update to the snapshot: 935f217d3367a642374bc56c6b146d376fc3edab
|
||||
- Archer backport: 281278326412f9d6a3fabb8adc1d419fd7ddc7d7
|
||||
- Fix [expr] crash reading invalid DWARF C++ symbol "" (BZ 490319).
|
||||
|
||||
* Thu Mar 12 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-9
|
||||
- Archer backport: aafe933b497eee8cfab736a10bae1a90d4bceb18
|
||||
- [python] Remove duplicate target-wide-charset parameter
|
||||
|
Loading…
Reference in New Issue
Block a user