rpms/gdb/devel gdb-6.6-bfd-vdso8k.patch, NONE, 1.1 gdb-6.6-bz233852-attach-signalled.patch, 1.3, 1.4 gdb.spec, 1.245, 1.246
Jan Kratochvil (jkratoch)
fedora-extras-commits at redhat.com
Sun Sep 23 15:42:41 UTC 2007
Author: jkratoch
Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4867
Modified Files:
gdb-6.6-bz233852-attach-signalled.patch gdb.spec
Added Files:
gdb-6.6-bfd-vdso8k.patch
Log Message:
* Sun Sep 23 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-29
- Fixed the kernel VDSO loading (`warning: no loadable sections found in ...').
- Fix the testcase for pending signals (from BZ 233852).
gdb-6.6-bfd-vdso8k.patch:
--- NEW FILE gdb-6.6-bfd-vdso8k.patch ---
2007-09-23 Jan Kratochvil <jan.kratochvil at redhat.com>
* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New variables
X_SHDR_SHSTRTAB and I_SHDR_SHSTRTAB. Fixed the CONTENTS_SIZE trimming
check for its aligned size between the last segment and still before
the section header end. Added variables check to cover also the
section header string table.
--- ./bfd/elfcode.h 14 Aug 2007 08:04:47 -0000 1.86
+++ ./bfd/elfcode.h 23 Sep 2007 14:24:39 -0000
@@ -1628,6 +1628,8 @@ NAME(_bfd_elf,bfd_from_remote_memory)
Elf_Internal_Ehdr i_ehdr; /* Elf file header, internal form */
Elf_External_Phdr *x_phdrs;
Elf_Internal_Phdr *i_phdrs, *last_phdr;
+ Elf_External_Shdr *x_shdr_shstrtab;
+ Elf_Internal_Shdr *i_shdr_shstrtab;
bfd *nbfd;
struct bfd_in_memory *bim;
int contents_size;
@@ -1746,19 +1748,49 @@ NAME(_bfd_elf,bfd_from_remote_memory)
/* Trim the last segment so we don't bother with zeros in the last page
that are off the end of the file. However, if the extra bit in that
- page includes the section headers, keep them. */
- if ((bfd_vma) contents_size > last_phdr->p_offset + last_phdr->p_filesz
- && (bfd_vma) contents_size >= (i_ehdr.e_shoff
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
- {
- contents_size = last_phdr->p_offset + last_phdr->p_filesz;
- if ((bfd_vma) contents_size < (i_ehdr.e_shoff
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
- contents_size = i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize;
- }
- else
+ page includes the section headers os the section header string table,
+ keep them. */
+ if ((bfd_vma) contents_size > last_phdr->p_offset + last_phdr->p_filesz)
contents_size = last_phdr->p_offset + last_phdr->p_filesz;
+ if ((bfd_vma) contents_size < i_ehdr.e_shoff
+ + i_ehdr.e_shnum * i_ehdr.e_shentsize)
+ contents_size = i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize;
+
+ /* Section header string table is usually before the section headers
+ so this check is here has usually no effect. */
+ if (i_ehdr.e_shstrndx < i_ehdr.e_shnum)
+ {
+ x_shdr_shstrtab = bfd_malloc (sizeof *x_shdr_shstrtab
+ + sizeof *i_shdr_shstrtab);
+ if (x_shdr_shstrtab == NULL)
+ {
+ free (x_phdrs);
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+ err = target_read_memory (ehdr_vma + i_ehdr.e_shoff
+ + i_ehdr.e_shstrndx * sizeof *x_shdr_shstrtab,
+ (bfd_byte *) x_shdr_shstrtab,
+ sizeof *x_shdr_shstrtab);
+ if (err)
+ {
+ free (x_shdr_shstrtab);
+ free (x_phdrs);
+ bfd_set_error (bfd_error_system_call);
+ errno = err;
+ return NULL;
+ }
+ i_shdr_shstrtab = (Elf_Internal_Shdr *) &x_shdr_shstrtab[1];
+ elf_swap_shdr_in (templ, x_shdr_shstrtab, i_shdr_shstrtab);
+
+ if ((bfd_vma) contents_size < i_shdr_shstrtab->sh_offset
+ + i_shdr_shstrtab->sh_size)
+ contents_size = i_shdr_shstrtab->sh_offset + i_shdr_shstrtab->sh_size;
+
+ free (x_shdr_shstrtab);
+ }
+
/* Now we know the size of the whole image we want read in. */
contents = bfd_zmalloc (contents_size);
if (contents == NULL)
gdb-6.6-bz233852-attach-signalled.patch:
Index: gdb-6.6-bz233852-attach-signalled.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-bz233852-attach-signalled.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.6-bz233852-attach-signalled.patch 22 Sep 2007 15:56:10 -0000 1.3
+++ gdb-6.6-bz233852-attach-signalled.patch 23 Sep 2007 15:42:37 -0000 1.4
@@ -684,7 +684,7 @@
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/attach-stopped.exp 29 Jun 2007 22:06:06 -0000
-@@ -0,0 +1,213 @@
+@@ -0,0 +1,219 @@
+# Copyright 2005-2007
+
+# This program is free software; you can redistribute it and/or modify
@@ -792,10 +792,13 @@
+ # Avoid some race:
+ sleep 2
+
-+ set fileid [open /proc/${testpid}/status r];
-+ gets $fileid line1;
-+ gets $fileid line2;
-+ close $fileid;
++ if [catch {open /proc/${testpid}/status r} fileid] {
++ set line2 "NOTFOUND"
++ } else {
++ gets $fileid line1;
++ gets $fileid line2;
++ close $fileid;
++ }
+
+ set test "$threadtype: attach1, exit leaves process stopped"
+ if {[string match "*(stopped)*" $line2]} {
@@ -861,10 +864,13 @@
+
+ # At this point, the process should be sleeping
+
-+ set fileid2 [open /proc/${testpid}/status r];
-+ gets $fileid2 line1;
-+ gets $fileid2 line2;
-+ close $fileid2;
++ if [catch {open /proc/${testpid}/status r} fileid2] {
++ set line2 "NOTFOUND"
++ } else {
++ gets $fileid2 line1;
++ gets $fileid2 line2;
++ close $fileid2;
++ }
+
+ set test "$threadtype: attach2, exit leaves process sleeping"
+ if {[string match "*(sleeping)*" $line2]} {
Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -r1.245 -r1.246
--- gdb.spec 22 Sep 2007 15:56:10 -0000 1.245
+++ gdb.spec 23 Sep 2007 15:42:37 -0000 1.246
@@ -11,7 +11,7 @@
Version: 6.6
# The release always contains a leading reserved number, start it at 1.
-Release: 28%{?dist}
+Release: 29%{?dist}
License: GPL
Group: Development/Debuggers
@@ -374,6 +374,9 @@
Patch273: gdb-6.6-buildid-verify.patch
Patch274: gdb-6.6-buildid-locate.patch
+# Fixed the kernel VDSO loading (producing `no loadable sections found').
+Patch276: gdb-6.6-bfd-vdso8k.patch
+
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
BuildRequires: flex bison sharutils expat-devel
Requires: readline
@@ -529,6 +532,7 @@
%patch272 -p1
%patch273 -p1
%patch274 -p1
+%patch276 -p1
# Change the version that gets printed at GDB startup, so it is RedHat
# specific.
@@ -683,6 +687,10 @@
# don't include the files in include, they are part of binutils
%changelog
+* Sun Sep 23 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-29
+- Fixed the kernel VDSO loading (`warning: no loadable sections found in ...').
+- Fix the testcase for pending signals (from BZ 233852).
+
* Sat Sep 22 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-28
- Support also the `$allocate' and `$delete' ctor/dtor variants (BZ 301701).
- Fix the build compatibility with texinfo >= 4.10.
More information about the fedora-extras-commits
mailing list