rpms/gdb/devel gdb-6.3-ia64-vsyscall-20050330.patch, NONE, 1.1 gdb.spec, 1.138, 1.139

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Mar 30 23:40:53 UTC 2005


Update of /cvs/dist/rpms/gdb/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv4263

Modified Files:
	gdb.spec 
Added Files:
	gdb-6.3-ia64-vsyscall-20050330.patch 
Log Message:

* Wed Mar 30 2005 Jeff Johnston <jjohnstn at redhat.com>   6.3.0.0-1.9
- Bump up release number.

* Wed Mar 30 2005 Jeff Johnston <jjohnstn at redhat.com>   6.3.0.0-1.7
- Add proper vsyscall page support for ia64.




gdb-6.3-ia64-vsyscall-20050330.patch:
 bfd/elfcode.h   |    5 +++--
 gdb/ia64-tdep.c |   31 +++++++++++++++++++++++++------
 2 files changed, 28 insertions(+), 8 deletions(-)

--- NEW FILE gdb-6.3-ia64-vsyscall-20050330.patch ---
2005-03-30  Jeff Johnston  <jjohnstn at redhat.com>

	* gdb/ia64-tdep.c (ia64_find_unwind_table): Change code to
	allow for idiosyncrasies of ia64 vsyscall page.
	* bfd/elfcode.h: Ditto.

--- gdb-6.3/gdb/ia64-tdep.c.fix	2005-03-30 13:34:00.000000000 -0500
+++ gdb-6.3/gdb/ia64-tdep.c	2005-03-30 13:36:45.000000000 -0500
@@ -2449,16 +2449,35 @@ ia64_find_unwind_table (struct objfile *
 	}
     }
 
-  if (!p_text || !p_unwind
-      /* Verify that the segment that contains the IP also contains
-	 the static unwind table.  If not, we are dealing with
-	 runtime-generated code, for which we have no info here.  */
-      || (p_unwind->p_vaddr - p_text->p_vaddr) >= p_text->p_memsz)
+  if (!p_text || !p_unwind)
     return -UNW_ENOINFO;
 
+  /* Verify that the segment that contains the IP also contains
+     the static unwind table.  If not, we may be in the Linux kernel's
+     DSO gate page in which case the unwind table is another segment. 
+     Otherwise, we are dealing with runtime-generated code, for which we 
+     have no info here.  */
   segbase = p_text->p_vaddr + load_base;
 
-  dip->start_ip = segbase;
+  if ((p_unwind->p_vaddr - p_text->p_vaddr) >= p_text->p_memsz)
+    {
+      int ok = 0;
+      for (i = 0; i < ehdr->e_phnum; ++i)
+        {
+          if (phdr[i].p_type == PT_LOAD
+	      && (p_unwind->p_vaddr - phdr[i].p_vaddr) < phdr[i].p_memsz)
+	    {
+              ok = 1;
+	      /* Get the segbase from the section containing the
+		 libunwind table.  */
+	      segbase = phdr[i].p_vaddr + load_base;
+	    }
+	}
+      if (!ok)
+        return -UNW_ENOINFO;
+    }
+
+  dip->start_ip = p_text->p_vaddr + load_base;
   dip->end_ip = dip->start_ip + p_text->p_memsz;
   dip->gp = FIND_GLOBAL_POINTER (ip);
   dip->format = UNW_INFO_FORMAT_REMOTE_TABLE;
--- gdb-6.3/bfd/elfcode.h.fix	2005-03-30 13:34:53.000000000 -0500
+++ gdb-6.3/bfd/elfcode.h	2005-03-30 13:37:48.000000000 -0500
@@ -1,6 +1,6 @@
 /* ELF executable support for BFD.
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -1619,7 +1619,8 @@ NAME(_bfd_elf,bfd_from_remote_memory)
 	  if (segment_end > (bfd_vma) contents_size)
 	    contents_size = segment_end;
 
-	  if ((i_phdrs[i].p_offset & -i_phdrs[i].p_align) == 0)
+	  if ((i_phdrs[i].p_offset & -i_phdrs[i].p_align) == 0
+	      && loadbase == ehdr_vma)
 	    loadbase = ehdr_vma - (i_phdrs[i].p_vaddr & -i_phdrs[i].p_align);
 
 	  last_phdr = &i_phdrs[i];


Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- gdb.spec	25 Mar 2005 00:17:33 -0000	1.138
+++ gdb.spec	30 Mar 2005 23:40:51 -0000	1.139
@@ -11,7 +11,7 @@
 Version: 6.3.0.0
 
 # The release always contains a leading reserved number, start it at 0.
-Release: 1.6
+Release: 1.9
 
 License: GPL
 Group: Development/Debuggers
@@ -201,6 +201,9 @@
 # Fix printing of inherited members
 Patch148: gdb-6.3-inheritance-20050324.patch
 
+# Add vsyscall page support for ia64.
+Patch149: gdb-6.3-ia64-vsyscall-20050330.patch
+
 %ifarch ia64
 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu libunwind >= 0.96-3
 %else
@@ -282,6 +285,7 @@
 %patch146 -p1
 %patch147 -p1
 %patch148 -p1
+%patch149 -p1
 
 # Change the version that gets printed at GDB startup, so it is RedHat
 # specific.
@@ -450,7 +454,13 @@
 # don't include the files in include, they are part of binutils
 
 %changelog
-* Thu Mar 24 2005 Jeff Johnston <jjohnstn at redhat.com>	6.3.0.0-1.6
+* Wed Mar 30 2005 Jeff Johnston <jjohnstn at redhat.com>   6.3.0.0-1.9
+- Bump up release number.
+
+* Wed Mar 30 2005 Jeff Johnston <jjohnstn at redhat.com>	6.3.0.0-1.7
+- Add proper vsyscall page support for ia64.
+
+* Thu Mar 24 2005 Jeff Johnston <jjohnstn at redhat.com>   6.3.0.0-1.6
 - Bump up release number.
 
 * Thu Mar 24 2005 Jeff Johnston <jjohnstn at redhat.com>	6.3.0.0-1.4




More information about the fedora-cvs-commits mailing list