SHA256
1
0
forked from pool/gdb
OBS User unknown 2007-03-06 08:04:12 +00:00 committed by Git OBS Bridge
parent 9b57370743
commit d2485e7a0e
6 changed files with 108 additions and 343 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 5 22:06:00 CET 2007 - schwab@suse.de
- Remove obsolete patch.
- Fix show endian.
-------------------------------------------------------------------
Thu Jan 11 18:29:13 CET 2007 - schwab@suse.de

View File

@ -21,7 +21,7 @@ Group: Development/Tools/Debuggers
Autoreqprov: on
PreReq: %{install_info_prereq}
Version: 6.6
Release: 8
Release: 13
Summary: The GNU Debugger
Source: gdb-%{version}.tar.bz2
Patch1: gdb-misc.patch
@ -36,9 +36,9 @@ Patch10: readline-callback.diff
Patch11: loader_break.diff
Patch12: ppc-long-double.diff
Patch13: lr-frame-offset.diff
Patch14: ppc64-fdesc.diff
Patch15: solib-extract-address.diff
Patch16: pc-regnum.diff
Patch17: show-endian.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -81,9 +81,9 @@ cd gdb
cd ..
%patch12
%patch13 -p1
%patch14
%patch15
%patch16
%patch17 -p1
%build
CFLAGS="$RPM_OPT_FLAGS" \
@ -96,7 +96,7 @@ CFLAGS="$RPM_OPT_FLAGS" \
%endif
--with-separate-debug-dir=%{_prefix}/lib/debug \
--enable-64-bit-bfd --disable-werror \
--enable-tui %{_target_cpu}-suse-linux
--host=%{_target_cpu}-suse-linux
make %{?jobs:-j%jobs}
make info
make -k check || :
@ -138,7 +138,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/gdbserver.1.gz
%endif
%changelog -n gdb
%changelog
* Mon Mar 05 2007 - schwab@suse.de
- Remove obsolete patch.
- Fix show endian.
* Thu Jan 11 2007 - schwab@suse.de
- Fix unchecked use of PC_REGNUM.
* Wed Dec 20 2006 - schwab@suse.de

View File

@ -1,11 +1,11 @@
--- gdb/minsyms.c
+++ gdb/minsyms.c
@@ -490,6 +490,8 @@
don't fill the bfd_section member, so don't
throw away symbols on those platforms. */
&& SYMBOL_BFD_SECTION (&msymbol[hi]) != NULL
@@ -486,6 +486,8 @@
/* If SECTION was specified, skip any symbol from
wrong section. */
if (section
+ /* Don't ignore symbols for solib trampolines. */
+ && MSYMBOL_TYPE (&msymbol[hi]) != mst_solib_trampoline
&& (!matching_bfd_sections
(SYMBOL_BFD_SECTION (&msymbol[hi]), section)))
{
/* Some types of debug info, such as COFF,
don't fill the bfd_section member, so don't
throw away symbols on those platforms. */

View File

@ -1,16 +0,0 @@
--- gdb/ppc-linux-tdep.c
+++ gdb/ppc-linux-tdep.c
@@ -757,7 +757,12 @@
/* Check if ADDR points to a function descriptor. */
if (s && strcmp (s->the_bfd_section->name, ".opd") == 0)
- return get_target_memory_unsigned (targ, addr, 8);
+ {
+ gdb_byte buf[8];
+
+ if (target_read_memory (addr, buf, 8) == 0)
+ return extract_unsigned_integer (buf, 8);
+ }
return addr;
}

20
show-endian.diff Normal file
View File

@ -0,0 +1,20 @@
2007-01-20 Daniel Jacobowitz <dan@codesourcery.com>
* arch-utils.c (show_endian): Correct reversed condition.
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- src/gdb/arch-utils.c 2007/01/13 23:24:43 1.138
+++ src/gdb/arch-utils.c 2007/01/20 18:31:29 1.139
@@ -322,7 +322,7 @@
show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c,
const char *value)
{
- if (target_byte_order_user != BFD_ENDIAN_UNKNOWN)
+ if (target_byte_order_user == BFD_ENDIAN_UNKNOWN)
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
fprintf_unfiltered (file, _("The target endianness is set automatically "
"(currently big endian)\n"));

View File

@ -255,379 +255,131 @@
typedef struct _trace_option_descriptor {
--- sim/ppc/ppc-instructions
+++ sim/ppc/ppc-instructions
@@ -3958,7 +3958,7 @@
*603e:PPC_UNIT_FPU, PPC_UNIT_FPU, 2, 4, 0
*604: PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
FPSCR_BEGIN;
- double product; /*HACK! - incorrectly loosing precision ... */
+ union { double d; unsigned64 u; } product; /*HACK! - incorrectly loosing precision ... */
/* compute the multiply */
if (is_invalid_operation(processor, cia,
*frA, *frC,
@@ -3966,7 +3966,7 @@
@@ -3965,12 +3965,14 @@
fpscr_vxsnan | fpscr_vximz,
0, /*single?*/
0) /*negate?*/) {
+ union { double d; unsigned64 u; } tmp;
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &product.u, *frA, 0, *frC,
+ &tmp.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -3974,16 +3974,16 @@
0); /*single-precision*/
+ product = tmp.d;
}
else {
/*HACK!*/
- product = *(double*)frA * *(double*)frC;
+ product.d = *(double*)frA * *(double*)frC;
@@ -4010,12 +4012,14 @@
fpscr_vxsnan | fpscr_vximz,
1, /*single?*/
0) /*negate?*/) {
+ union { double d; unsigned64 u; } tmp;
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &tmp.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
0); /*single-precision*/
+ product = tmp.d;
}
/* compute the add */
if (is_invalid_operation(processor, cia,
- product, *frB,
+ product.d, *frB,
fpscr_vxsnan | fpscr_vxisi,
else {
/*HACK!*/
@@ -4055,12 +4059,14 @@
fpscr_vxsnan | fpscr_vximz,
0, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- frT, product, *frB, 0,
+ frT, product.d, *frB, 0,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -3991,7 +3991,7 @@
}
else {
/*HACK!*/
- double s = product + *(double*)frB;
+ double s = product.d + *(double*)frB;
*(double*)frT = s;
}
FPSCR_END(Rc);
@@ -4003,7 +4003,7 @@
*603e:PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
*604: PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
FPSCR_BEGIN;
- float product; /*HACK! - incorrectly loosing precision ... */
+ union { float f; unsigned64 u; } product; /*HACK! - incorrectly loosing precision ... */
/* compute the multiply */
if (is_invalid_operation(processor, cia,
*frA, *frC,
@@ -4011,7 +4011,7 @@
1, /*single?*/
0) /*negate?*/) {
+ union { double d; unsigned64 u; } tmp;
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &product.u, *frA, 0, *frC,
+ &tmp.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4019,16 +4019,16 @@
0); /*single-precision*/
+ product = tmp.d;
}
else {
/*HACK!*/
- product = *(double*)frA * *(double*)frC;
+ product.f = *(double*)frA * *(double*)frC;
}
/* compute the add */
if (is_invalid_operation(processor, cia,
- product, *frB,
+ product.f, *frB,
fpscr_vxsnan | fpscr_vxisi,
@@ -4100,12 +4106,14 @@
fpscr_vxsnan | fpscr_vximz,
1, /*single?*/
0) /*negate?*/) {
+ union { double d; unsigned64 u; } tmp;
invalid_arithemetic_operation(processor, cia,
- frT, product, *frB, 0,
+ frT, product.f, *frB, 0,
- (unsigned64*)&product, *frA, 0, *frC,
+ &tmp.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4036,7 +4036,7 @@
0); /*single-precision*/
+ product = tmp.d;
}
else {
/*HACK!*/
- float s = product + *(double*)frB;
+ float s = product.f + *(double*)frB;
*(double*)frT = (double)s;
}
FPSCR_END(Rc);
@@ -4048,7 +4048,7 @@
*603e:PPC_UNIT_FPU, PPC_UNIT_FPU, 2, 4, 0
*604: PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
FPSCR_BEGIN;
- double product; /*HACK! - incorrectly loosing precision ... */
+ union { double d; unsigned64 u; } product; /*HACK! - incorrectly loosing precision ... */
/* compute the multiply */
if (is_invalid_operation(processor, cia,
*frA, *frC,
@@ -4056,7 +4056,7 @@
@@ -4145,12 +4153,14 @@
fpscr_vxsnan | fpscr_vximz,
0, /*single?*/
0) /*negate?*/) {
+ union { double d; unsigned64 u; } tmp;
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &product.u, *frA, 0, *frC,
+ &tmp.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4064,16 +4064,16 @@
0); /*single-precision*/
+ product = tmp.d;
}
else {
/*HACK!*/
- product = *(double*)frA * *(double*)frC;
+ product.d = *(double*)frA * *(double*)frC;
@@ -4190,12 +4200,14 @@
fpscr_vxsnan | fpscr_vximz,
1, /*single?*/
0) /*negate?*/) {
+ union { double d; unsigned64 u; } tmp;
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &tmp.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
0); /*single-precision*/
+ product = tmp.d;
}
/* compute the subtract */
if (is_invalid_operation(processor, cia,
- product, *frB,
+ product.d, *frB,
fpscr_vxsnan | fpscr_vxisi,
else {
/*HACK!*/
@@ -4235,12 +4247,14 @@
fpscr_vxsnan | fpscr_vximz,
0, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- frT, product, *frB, 0,
+ frT, product.d, *frB, 0,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4081,7 +4081,7 @@
}
else {
/*HACK!*/
- double s = product - *(double*)frB;
+ double s = product.d - *(double*)frB;
*(double*)frT = s;
}
FPSCR_END(Rc);
@@ -4093,7 +4093,7 @@
*603e:PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
*604: PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
FPSCR_BEGIN;
- float product; /*HACK! - incorrectly loosing precision ... */
+ union { float f; unsigned64 u; } product; /*HACK! - incorrectly loosing precision ... */
/* compute the multiply */
if (is_invalid_operation(processor, cia,
*frA, *frC,
@@ -4101,7 +4101,7 @@
1, /*single?*/
0) /*negate?*/) {
+ union { double d; unsigned64 u; } tmp;
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &product.u, *frA, 0, *frC,
+ &tmp.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4109,16 +4109,16 @@
0); /*single-precision*/
+ product = tmp.d;
}
else {
/*HACK!*/
- product = *(double*)frA * *(double*)frC;
+ product.f = *(double*)frA * *(double*)frC;
}
/* compute the subtract */
if (is_invalid_operation(processor, cia,
- product, *frB,
+ product.f, *frB,
fpscr_vxsnan | fpscr_vxisi,
@@ -4280,12 +4294,14 @@
fpscr_vxsnan | fpscr_vximz,
1, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- frT, product, *frB, 0,
+ frT, product.f, *frB, 0,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4126,7 +4126,7 @@
}
else {
/*HACK!*/
- float s = product - *(double*)frB;
+ float s = product.f - *(double*)frB;
*(double*)frT = (double)s;
}
FPSCR_END(Rc);
@@ -4138,7 +4138,7 @@
*603e:PPC_UNIT_FPU, PPC_UNIT_FPU, 2, 4, 0
*604: PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
FPSCR_BEGIN;
- double product; /*HACK! - incorrectly loosing precision ... */
+ union { double d; unsigned64 u; } product; /*HACK! - incorrectly loosing precision ... */
/* compute the multiply */
if (is_invalid_operation(processor, cia,
*frA, *frC,
@@ -4146,7 +4146,7 @@
0, /*single?*/
0) /*negate?*/) {
+ union { double d; unsigned64 u; } tmp;
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &product.u, *frA, 0, *frC,
+ &tmp.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4154,16 +4154,16 @@
0); /*single-precision*/
+ product = tmp.d;
}
else {
/*HACK!*/
- product = *(double*)frA * *(double*)frC;
+ product.d = *(double*)frA * *(double*)frC;
}
/* compute the add */
if (is_invalid_operation(processor, cia,
- product, *frB,
+ product.d, *frB,
fpscr_vxsnan | fpscr_vxisi,
0, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- frT, product, *frB, 0,
+ frT, product.d, *frB, 0,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4171,7 +4171,7 @@
}
else {
/*HACK!*/
- double s = -(product + *(double*)frB);
+ double s = -(product.d + *(double*)frB);
*(double*)frT = s;
}
FPSCR_END(Rc);
@@ -4183,7 +4183,7 @@
*603e:PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
*604: PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
FPSCR_BEGIN;
- float product; /*HACK! - incorrectly loosing precision ... */
+ union { float f; unsigned64 u; } product; /*HACK! - incorrectly loosing precision ... */
/* compute the multiply */
if (is_invalid_operation(processor, cia,
*frA, *frC,
@@ -4191,7 +4191,7 @@
1, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &product.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4199,16 +4199,16 @@
}
else {
/*HACK!*/
- product = *(double*)frA * *(double*)frC;
+ product.f = *(double*)frA * *(double*)frC;
}
/* compute the add */
if (is_invalid_operation(processor, cia,
- product, *frB,
+ product.f, *frB,
fpscr_vxsnan | fpscr_vxisi,
1, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- frT, product, *frB, 0,
+ frT, product.f, *frB, 0,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4216,7 +4216,7 @@
}
else {
/*HACK!*/
- float s = -(product + *(double*)frB);
+ float s = -(product.f + *(double*)frB);
*(double*)frT = (double)s;
}
FPSCR_END(Rc);
@@ -4228,7 +4228,7 @@
*603e:PPC_UNIT_FPU, PPC_UNIT_FPU, 2, 4, 0
*604: PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
FPSCR_BEGIN;
- double product; /*HACK! - incorrectly loosing precision ... */
+ union { double d; unsigned64 u; } product; /*HACK! - incorrectly loosing precision ... */
/* compute the multiply */
if (is_invalid_operation(processor, cia,
*frA, *frC,
@@ -4236,7 +4236,7 @@
0, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &product.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4244,16 +4244,16 @@
}
else {
/*HACK!*/
- product = *(double*)frA * *(double*)frC;
+ product.d = *(double*)frA * *(double*)frC;
}
/* compute the subtract */
if (is_invalid_operation(processor, cia,
- product, *frB,
+ product.d, *frB,
fpscr_vxsnan | fpscr_vxisi,
0, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- frT, product, *frB, 0,
+ frT, product.d, *frB, 0,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4261,7 +4261,7 @@
}
else {
/*HACK!*/
- double s = -(product - *(double*)frB);
+ double s = -(product.d - *(double*)frB);
*(double*)frT = s;
}
FPSCR_END(Rc);
@@ -4273,7 +4273,7 @@
*603e:PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
*604: PPC_UNIT_FPU, PPC_UNIT_FPU, 1, 3, 0
FPSCR_BEGIN;
- float product; /*HACK! - incorrectly loosing precision ... */
+ union { float f; unsigned64 u; } product; /*HACK! - incorrectly loosing precision ... */
/* compute the multiply */
if (is_invalid_operation(processor, cia,
*frA, *frC,
@@ -4281,7 +4281,7 @@
1, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- (unsigned64*)&product, *frA, 0, *frC,
+ &product.u, *frA, 0, *frC,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4289,16 +4289,16 @@
}
else {
/*HACK!*/
- product = *(double*)frA * *(double*)frC;
+ product.f = *(double*)frA * *(double*)frC;
}
/* compute the subtract */
if (is_invalid_operation(processor, cia,
- product, *frB,
+ product.f, *frB,
fpscr_vxsnan | fpscr_vxisi,
1, /*single?*/
0) /*negate?*/) {
invalid_arithemetic_operation(processor, cia,
- frT, product, *frB, 0,
+ frT, product.f, *frB, 0,
0, /*instruction_is_frsp*/
0, /*instruction_is_convert_to_64bit*/
0, /*instruction_is_convert_to_32bit*/
@@ -4306,7 +4306,7 @@
}
else {
/*HACK!*/
- float s = -(product - *(double*)frB);
+ float s = -(product.f - *(double*)frB);
*(double*)frT = (double)s;
}
FPSCR_END(Rc);