rpms/gdb/F-9 gdb-6.8-sparc-fix.patch,NONE,1.1 gdb.spec,1.282,1.283
Tom Callaway (spot)
fedora-extras-commits at redhat.com
Thu May 15 21:16:49 UTC 2008
- Previous message (by thread): rpms/perl-IPC-ShareLite/devel .cvsignore, 1.3, 1.4 perl-IPC-ShareLite.spec, 1.17, 1.18 sources, 1.3, 1.4 IPC-ShareLite-0.09-64bit.patch, 1.1, NONE IPC-ShareLite-0.09-string.patch, 1.1, NONE
- Next message (by thread): rpms/gdb/devel gdb-6.8-sparc-fix.patch, NONE, 1.1 gdb.spec, 1.286, 1.287
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: spot
Update of /cvs/pkgs/rpms/gdb/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31490/F-9
Modified Files:
gdb.spec
Added Files:
gdb-6.8-sparc-fix.patch
Log Message:
fix gdb for sparcv9 and sparc64
gdb-6.8-sparc-fix.patch:
--- NEW FILE gdb-6.8-sparc-fix.patch ---
diff -up gdb-6.8/gdb/sparc64-linux-tdep.c.sparc gdb-6.8/gdb/sparc64-linux-tdep.c
--- gdb-6.8/gdb/sparc64-linux-tdep.c.sparc 2008-01-01 16:53:13.000000000 -0600
+++ gdb-6.8/gdb/sparc64-linux-tdep.c 2008-05-15 14:08:57.000000000 -0500
@@ -174,6 +174,30 @@ sparc64_linux_collect_core_fpregset (con
sparc64_collect_fpregset (regcache, regnum, fpregs);
}
+/* Set the program counter for process PTID to PC. */
+
+static void
+sparc64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
+ ULONGEST state;
+
+ regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
+ regcache_cooked_write_unsigned (regcache, tdep->npc_regnum, pc + 4);
+
+ /* Clear the "in syscall" bit to prevent the kernel from
+ messing with the PCs we just installed, if we happen to be
+ within an interrupted system call that the kernel wants to
+ restart.
+
+ Note that after we return from the dummy call, the TSTATE et al.
+ registers will be automatically restored, and the kernel
+ continues to restart the system call at this point. */
+ regcache_cooked_read_unsigned (regcache, SPARC64_STATE_REGNUM, &state);
+ state &= ~((ULONGEST)0x20);
+ regcache_cooked_write_unsigned (regcache, SPARC64_STATE_REGNUM, state);
+}
+
static void
@@ -211,6 +235,8 @@ sparc64_linux_init_abi (struct gdbarch_i
/* Make sure we can single-step over signal return system calls. */
tdep->step_trap = sparc64_linux_step_trap;
+
+ set_gdbarch_write_pc (gdbarch, sparc64_linux_write_pc);
}
diff -up gdb-6.8/gdb/sparc-linux-tdep.c.sparc gdb-6.8/gdb/sparc-linux-tdep.c
--- gdb-6.8/gdb/sparc-linux-tdep.c.sparc 2008-01-01 16:53:13.000000000 -0600
+++ gdb-6.8/gdb/sparc-linux-tdep.c 2008-05-15 14:08:12.000000000 -0500
@@ -211,6 +211,30 @@ sparc32_linux_collect_core_fpregset (con
sparc32_collect_fpregset (regcache, regnum, fpregs);
}
+/* Set the program counter for process PTID to PC. */
+
+static void
+sparc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
+ ULONGEST psr;
+
+ regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
+ regcache_cooked_write_unsigned (regcache, tdep->npc_regnum, pc + 4);
+
+ /* Clear the "in syscall" bit to prevent the kernel from
+ messing with the PCs we just installed, if we happen to be
+ within an interrupted system call that the kernel wants to
+ restart.
+
+ Note that after we return from the dummy call, the PSR et al.
+ registers will be automatically restored, and the kernel
+ continues to restart the system call at this point. */
+ regcache_cooked_read_unsigned (regcache, SPARC32_PSR_REGNUM, &psr);
+ psr &= ~0x000004000;
+ regcache_cooked_write_unsigned (regcache, SPARC32_PSR_REGNUM, psr);
+}
+
static void
@@ -238,10 +262,6 @@ sparc32_linux_init_abi (struct gdbarch_i
prologue analysis. */
tdep->plt_entry_size = 12;
- /* GNU/Linux doesn't support the 128-bit `long double' from the psABI. */
- set_gdbarch_long_double_bit (gdbarch, 64);
- set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
-
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
svr4_fetch_objfile_link_map);
@@ -251,6 +271,8 @@ sparc32_linux_init_abi (struct gdbarch_i
/* Hook in the DWARF CFI frame unwinder. */
frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+
+ set_gdbarch_write_pc (gdbarch, sparc_linux_write_pc);
}
/* Provide a prototype to silence -Wmissing-prototypes. */
Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-9/gdb.spec,v
retrieving revision 1.282
retrieving revision 1.283
diff -u -r1.282 -r1.283
--- gdb.spec 3 May 2008 21:43:52 -0000 1.282
+++ gdb.spec 15 May 2008 21:16:06 -0000 1.283
@@ -13,9 +13,9 @@
# 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: 5%{?_with_upstream:.upstream}%{?dist}
+Release: 6%{?_with_upstream:.upstream}%{?dist}
-License: GPL
+License: GPLv3+
Group: Development/Debuggers
Source: ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@@ -349,6 +349,9 @@
# Test various forms of threads tracking across exec() (BZ 442765).
Patch315: gdb-6.8-bz442765-threaded-exec-test.patch
+# Enable program counter for processing PTID to PC (sparc/sparc64)
+Patch316: gdb-6.8-sparc-fix.patch
+
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
BuildRequires: flex bison sharutils expat-devel
Requires: readline
@@ -365,11 +368,11 @@
# Copied from gcc-4.1.2-32
%ifarch %{ix86} x86_64 ia64 ppc alpha
BuildRequires: gcc-gnat
-%ifarch %{multilib_64_archs} sparc ppc
+%ifarch %{multilib_64_archs} ppc
BuildRequires: %{_exec_prefix}/lib64/libgnat-4.3.so %{_exec_prefix}/lib/libgnat-4.3.so
%endif
%endif
-%ifarch %{multilib_64_archs} sparc ppc
+%ifarch %{multilib_64_archs} sparc sparcv9 ppc
BuildRequires: /lib/libc.so.6 %{_exec_prefix}/lib/libc.so /lib64/libc.so.6 %{_exec_prefix}/lib64/libc.so
BuildRequires: /lib/libgcc_s.so.1 /lib64/libgcc_s.so.1
BuildRequires: %{_exec_prefix}/lib/libstdc++.so.6 %{_exec_prefix}/lib64/libstdc++.so.6
@@ -383,8 +386,11 @@
BuildRequires: libunwind-devel >= 0.99-0.1.frysk20070405cvs
Requires: libunwind >= 0.99-0.1.frysk20070405cvs
%else
+# Prelink is broken on sparcv9/sparc64
+%ifnarch sparcv9 sparc64
BuildRequires: prelink
%endif
+%endif
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
@@ -521,6 +527,7 @@
%patch311 -p1
%patch314 -p1
%patch315 -p1
+%patch316 -p1
%patch124 -p1
find -name "*.orig" | xargs rm -f
@@ -571,7 +578,7 @@
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--enable-gdb-build-warnings=,-Wno-unused \
-%ifnarch %{ix86} alpha ia64 ppc s390 s390x x86_64 ppc64
+%ifnarch %{ix86} alpha ia64 ppc s390 s390x x86_64 ppc64 sparcv9 sparc64
--disable-werror \
%else
%if 0%{?_with_upstream:1}
@@ -593,7 +600,11 @@
%if 0%{?_with_debug:1}
--enable-static --disable-shared --enable-debug \
%endif
+%ifarch sparcv9
+ sparc-%{_vendor}-%{_target_os}%{?_gnu}
+%else
%{_target_platform}
+%endif
make %{?_smp_mflags}
make %{?_smp_mflags} info
@@ -759,11 +770,17 @@
# don't include the files in include, they are part of binutils
+%ifnarch sparcv9 sparc64
%files gdbserver
%{_bindir}/gdbserver
%{_mandir}/*/gdbserver.1*
+%endif
%changelog
+* Thu May 15 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 6.8-6
+- patch from DaveM for sparc/sparc64
+- touch up spec to enable sparcv9/sparc64
+
* Sun Apr 27 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8-5
- Remove the kernel VDSO workaround (`no loadable ...') (kernel BZ 312011).
- Previous message (by thread): rpms/perl-IPC-ShareLite/devel .cvsignore, 1.3, 1.4 perl-IPC-ShareLite.spec, 1.17, 1.18 sources, 1.3, 1.4 IPC-ShareLite-0.09-64bit.patch, 1.1, NONE IPC-ShareLite-0.09-string.patch, 1.1, NONE
- Next message (by thread): rpms/gdb/devel gdb-6.8-sparc-fix.patch, NONE, 1.1 gdb.spec, 1.286, 1.287
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list