This commit is contained in:
parent
03615dd0aa
commit
09f14a3571
49
bnc329420.patch
Normal file
49
bnc329420.patch
Normal file
@ -0,0 +1,49 @@
|
||||
On Wed, 13 May 2009, Sami Wagiaalla wrote:
|
||||
|
||||
> This problem is due to the fact that in Archer we are using
|
||||
> dwarf2_full_name instead of dwarf2_linkage_name.
|
||||
>
|
||||
> I am trying your patch but it does not seem to have solved the problem
|
||||
> for me. Are you testing against the Archer fedora branch (
|
||||
> archer-jankratochvil-fedora-merge ) ?
|
||||
|
||||
Meh, wrong patch, sorry. I must have had traces of my other approach
|
||||
still in dwarf2read.c that this worked when I checked before sending. It
|
||||
actually fixes only the partial DIEs and I'm not even sure if that's
|
||||
necessary. It certainly does not fix the problem for reading full DIEs.
|
||||
As it's a rather generic tree reader (read_die_and_children_1 and friends)
|
||||
it seems a bit clumsy to special case bogus namespace dies there, which
|
||||
brings me back to my other option (that's the one I started and tested
|
||||
with), hacking determine_prefix, like below. That fixes the problem.
|
||||
Really :-)
|
||||
|
||||
|
||||
Ciao,
|
||||
Michael.
|
||||
Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c 2009-05-13 15:53:22.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/dwarf2read.c 2009-05-13 23:48:52.000000000 +0200
|
||||
@@ -8885,9 +8894,18 @@ determine_prefix (struct die_info *die,
|
||||
switch (parent->tag)
|
||||
{
|
||||
case DW_TAG_namespace:
|
||||
- parent_type = read_type_die (parent, cu);
|
||||
- /* We give a name to even anonymous namespaces. */
|
||||
- return TYPE_TAG_NAME (parent_type);
|
||||
+ {
|
||||
+ char *prefix;
|
||||
+ parent_type = read_type_die (parent, cu);
|
||||
+ /* We give a name to even anonymous namespaces. */
|
||||
+ prefix = TYPE_TAG_NAME (parent_type);
|
||||
+ /* Special hack for bogus global namespace that is emitted as an
|
||||
+ explicit namespace with the name '::' in g++ 4.1, for
|
||||
+ some decls. */
|
||||
+ if (prefix[0] == ':' && prefix[1] == ':' && prefix[2] == 0)
|
||||
+ return "";
|
||||
+ return prefix;
|
||||
+ }
|
||||
case DW_TAG_class_type:
|
||||
case DW_TAG_interface_type:
|
||||
case DW_TAG_structure_type:
|
||||
|
98
bnc492331.patch
Normal file
98
bnc492331.patch
Normal file
@ -0,0 +1,98 @@
|
||||
2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
|
||||
|
||||
gdb/
|
||||
* ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
|
||||
(PPC_FEATURE_HAS_DFP): New #define.
|
||||
(ppc_linux_read_description): Check for DFP feature instead of
|
||||
ISA 2.05 to decide on size of the FPSCR.
|
||||
|
||||
gdbserver/
|
||||
* linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
|
||||
(PPC_FEATURE_HAS_DFP): New #define.
|
||||
(ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
|
||||
size of the FPSCR.
|
||||
|
||||
Index: gdb-6.8.50.20090302/gdb/gdbserver/linux-ppc-low.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/gdbserver/linux-ppc-low.c 2009-01-03 06:57:57.000000000 +0100
|
||||
+++ gdb-6.8.50.20090302/gdb/gdbserver/linux-ppc-low.c 2009-05-14 16:01:25.000000000 +0200
|
||||
@@ -28,7 +28,7 @@
|
||||
#define PPC_FEATURE_HAS_VSX 0x00000080
|
||||
#define PPC_FEATURE_HAS_ALTIVEC 0x10000000
|
||||
#define PPC_FEATURE_HAS_SPE 0x00800000
|
||||
-#define PPC_FEATURE_ARCH_2_05 0x00001000
|
||||
+#define PPC_FEATURE_HAS_DFP 0x00000400
|
||||
|
||||
static unsigned long ppc_hwcap;
|
||||
|
||||
@@ -274,14 +274,21 @@ ppc_arch_setup (void)
|
||||
ppc_get_hwcap (&ppc_hwcap);
|
||||
if (ppc_hwcap & PPC_FEATURE_HAS_VSX)
|
||||
{
|
||||
- if (ppc_hwcap & PPC_FEATURE_ARCH_2_05)
|
||||
+ /* Power ISA 2.05 (implemented by Power 6 and newer processors)
|
||||
+ increases the FPSCR from 32 bits to 64 bits. Even though Power 7
|
||||
+ supports this ISA version, it doesn't have PPC_FEATURE_ARCH_2_05
|
||||
+ set, only PPC_FEATURE_ARCH_2_06. Since for now the only bits
|
||||
+ used in the higher half of the register are for Decimal Floating
|
||||
+ Point, we check if that feature is available to decide the size
|
||||
+ of the FPSCR. */
|
||||
+ if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
|
||||
init_registers_powerpc_isa205_vsx64l ();
|
||||
else
|
||||
init_registers_powerpc_vsx64l ();
|
||||
}
|
||||
else if (ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC)
|
||||
{
|
||||
- if (ppc_hwcap & PPC_FEATURE_ARCH_2_05)
|
||||
+ if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
|
||||
init_registers_powerpc_isa205_altivec64l ();
|
||||
else
|
||||
init_registers_powerpc_altivec64l ();
|
||||
@@ -297,14 +304,14 @@ ppc_arch_setup (void)
|
||||
ppc_get_hwcap (&ppc_hwcap);
|
||||
if (ppc_hwcap & PPC_FEATURE_HAS_VSX)
|
||||
{
|
||||
- if (ppc_hwcap & PPC_FEATURE_ARCH_2_05)
|
||||
+ if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
|
||||
init_registers_powerpc_isa205_vsx32l ();
|
||||
else
|
||||
init_registers_powerpc_vsx32l ();
|
||||
}
|
||||
else if (ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC)
|
||||
{
|
||||
- if (ppc_hwcap & PPC_FEATURE_ARCH_2_05)
|
||||
+ if (ppc_hwcap & PPC_FEATURE_HAS_DFP)
|
||||
init_registers_powerpc_isa205_altivec32l ();
|
||||
else
|
||||
init_registers_powerpc_altivec32l ();
|
||||
Index: gdb-6.8.50.20090302/gdb/ppc-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20090302.orig/gdb/ppc-linux-nat.c 2009-05-14 15:58:08.000000000 +0200
|
||||
+++ gdb-6.8.50.20090302/gdb/ppc-linux-nat.c 2009-05-14 15:58:09.000000000 +0200
|
||||
@@ -63,8 +63,8 @@
|
||||
#ifndef PPC_FEATURE_BOOKE
|
||||
#define PPC_FEATURE_BOOKE 0x00008000
|
||||
#endif
|
||||
-#ifndef PPC_FEATURE_ARCH_2_05
|
||||
-#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */
|
||||
+#ifndef PPC_FEATURE_HAS_DFP
|
||||
+#define PPC_FEATURE_HAS_DFP 0x00000400 /* Decimal Floating Point. */
|
||||
#endif
|
||||
|
||||
/* Glibc's headers don't define PTRACE_GETVRREGS so we cannot use a
|
||||
@@ -1310,7 +1310,13 @@ ppc_linux_read_description (struct targe
|
||||
perror_with_name (_("Unable to fetch AltiVec registers"));
|
||||
}
|
||||
|
||||
- if (ppc_linux_get_hwcap () & PPC_FEATURE_ARCH_2_05)
|
||||
+ /* Power ISA 2.05 (implemented by Power 6 and newer processors) increases
|
||||
+ the FPSCR from 32 bits to 64 bits. Even though Power 7 supports this
|
||||
+ ISA version, it doesn't have PPC_FEATURE_ARCH_2_05 set, only
|
||||
+ PPC_FEATURE_ARCH_2_06. Since for now the only bits used in the higher
|
||||
+ half of the register are for Decimal Floating Point, we check if that
|
||||
+ feature is available to decide the size of the FPSCR. */
|
||||
+ if (ppc_linux_get_hwcap () & PPC_FEATURE_HAS_DFP)
|
||||
isa205 = 1;
|
||||
|
||||
/* Check for 64-bit inferior process. This is the case when the host is
|
10
gdb.changes
10
gdb.changes
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 14 15:26:42 CEST 2009 - rguenther@suse.de
|
||||
|
||||
- Change reported version to mention SUSE instead of Fedora.
|
||||
- Fix handling of bogus global namespace DIEs from GCC 4.1. [bnc#329420]
|
||||
- Fix Power7 DFP detection. [bnc#492331]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 7 15:00:14 CEST 2009 - rguenther@suse.de
|
||||
|
||||
@ -18,7 +25,8 @@ Mon Apr 27 16:18:02 CEST 2009 - rguenther@suse.de
|
||||
Mon Apr 27 13:33:06 CEST 2009 - rguenther@suse.de
|
||||
|
||||
- Switch to Fedora 11 source RPM.
|
||||
* includes partially merge from Archer. [bnc#329420, bnc#497141]
|
||||
* includes partially merge from Archer. [bnc#329420, bnc#497141,
|
||||
bnc#492782]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 10 11:14:25 CET 2009 - rguenther@suse.de
|
||||
|
17
gdb.spec
17
gdb.spec
@ -23,7 +23,7 @@ Name: gdb
|
||||
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
|
||||
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
|
||||
Version: 6.8.50.20090302
|
||||
Release: 2
|
||||
Release: 3
|
||||
# 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.
|
||||
License: GNU Free Documentation License, Version 1.2 (GFDL 1.2); GPL v2 or later; GPL v3 or later
|
||||
@ -282,6 +282,8 @@ Patch359: gdb-charset-crash.patch
|
||||
Patch1000: readline-5.1-random.patch
|
||||
Patch1001: gdb-readline6.patch
|
||||
Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch
|
||||
Patch1004: bnc492331.patch
|
||||
Patch1005: bnc329420.patch
|
||||
BuildRequires: bison flex gettext glibc-devel ncurses-devel texinfo zlib-devel
|
||||
%if %{suse_version} < 1020
|
||||
BuildRequires: expat
|
||||
@ -504,13 +506,15 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch1001
|
||||
%endif
|
||||
%patch1002 -p1
|
||||
%patch1004 -p1
|
||||
%patch1005 -p1
|
||||
find -name "*.orig" | xargs rm -f
|
||||
! find -name "*.rej" # Should not happen.
|
||||
%endif # 0%{!?_with_upstream:1}
|
||||
# Change the version that gets printed at GDB startup, so it is Fedora
|
||||
# Change the version that gets printed at GDB startup, so it is SUSE
|
||||
# specific.
|
||||
cat > gdb/version.in << _FOO
|
||||
Fedora (%{version}-%{release})
|
||||
SUSE (%{version}-%{release})
|
||||
_FOO
|
||||
# Remove the info and other generated files added by the FSF release
|
||||
# process.
|
||||
@ -753,6 +757,10 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu May 14 2009 rguenther@suse.de
|
||||
- Change reported version to mention SUSE instead of Fedora.
|
||||
- Fix handling of bogus global namespace DIEs from GCC 4.1. [bnc#329420]
|
||||
- Fix Power7 DFP detection. [bnc#492331]
|
||||
* Thu May 07 2009 rguenther@suse.de
|
||||
- Fix build for SLE10. [fate#305977]
|
||||
- Adjust missing debug packages suggested install command.
|
||||
@ -762,7 +770,8 @@ fi
|
||||
- Disable rpm support for locating debug info packages.
|
||||
* Mon Apr 27 2009 rguenther@suse.de
|
||||
- Switch to Fedora 11 source RPM.
|
||||
* includes partially merge from Archer. [bnc#329420, bnc#497141]
|
||||
* includes partially merge from Archer. [bnc#329420, bnc#497141,
|
||||
bnc#492782]
|
||||
* Tue Mar 10 2009 rguenther@suse.de
|
||||
- Add VLA support patch from Fedora to fix possible
|
||||
dwarf_expr_frame_base NULL checking regression.
|
||||
|
Loading…
x
Reference in New Issue
Block a user