rpms/gdb/devel gdb-6.3-augmS-20060303.patch, NONE, 1.1 gdb-6.3-cfaval-20060303.patch, NONE, 1.1 gdb-6.3-prelink-core-20060223.patch, 1.1, 1.2 gdb.spec, 1.174, 1.175

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Mar 3 19:10:50 UTC 2006


Author: aoliva

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

Modified Files:
	gdb-6.3-prelink-core-20060223.patch gdb.spec 
Added Files:
	gdb-6.3-augmS-20060303.patch gdb-6.3-cfaval-20060303.patch 
Log Message:
* Fri Mar  3 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.111
- Add support for "S" augmentation for signal stack frames.
- Add support for CFA value expressions and encodings.
- Various improvements to the prelink test.


gdb-6.3-augmS-20060303.patch:
 dwarf2-frame.c                       |   34 +++++
 dwarf2-frame.h                       |    8 +
 testsuite/gdb.dwarf2/signal-augm.S   |  207 +++++++++++++++++++++++++++++++++++
 testsuite/gdb.dwarf2/signal-augm.c   |  198 +++++++++++++++++++++++++++++++++
 testsuite/gdb.dwarf2/signal-augm.exp |   77 +++++++++++++
 5 files changed, 521 insertions(+), 3 deletions(-)

--- NEW FILE gdb-6.3-augmS-20060303.patch ---
for gdb/ChangeLog
2006-03-03  Alexandre Oliva  <aoliva at redhat.com>

	* dwarf2-frame.c (struct dwarf2_cie): Add signal_frame field.
	(dwarf2_frame_sniffer): Use it.
	(decode_frame_entry_1): Set it according to augmentation "S".

2004-11-07  Daniel Jacobowitz  <dan at debian.org>

	* dwarf2-frame.c (struct dwarf2_frame_ops): Add signal_frame_p.
	(dwarf2_frame_set_signal_frame_p, dwarf2_frame_signal_frame_p)
	(dwarf2_signal_frame_unwind): New.
	(dwarf2_frame_sniffer): Use dwarf2_frame_signal_frame_p.
	* dwarf2-frame.h (dwarf2_frame_set_signal_frame_p): New prototype.

for gdb/testsuite/ChangeLog
2006-03-03  Alexandre Oliva  <aoliva at redhat.com>

	* gdb.dwarf2/signal-augm.exp: New test.
	* gdb.dwarf2/signal-augm.c, gdb.dwarf2/signal-augm.S: Its sources.

Index: gdb-6.3/gdb/dwarf2-frame.c
===================================================================
--- gdb-6.3.orig/gdb/dwarf2-frame.c	2006-02-14 17:21:07.000000000 -0200
+++ gdb-6.3/gdb/dwarf2-frame.c	2006-03-03 13:48:20.000000000 -0300
@@ -69,6 +69,9 @@ struct dwarf2_cie
   /* True if a 'z' augmentation existed.  */
   unsigned char saw_z_augmentation;
 
+  /* True if an 'S' augmentation existed.  */
+  unsigned char signal_frame;
+
   struct dwarf2_cie *next;
 };
 
@@ -849,10 +852,20 @@ dwarf2_frame_sniffer (struct frame_info 
      function.  frame_pc_unwind(), for a no-return next function, can
      end up returning something past the end of this function's body.  */
   CORE_ADDR block_addr = frame_unwind_address_in_block (next_frame);
-  if (dwarf2_frame_find_fde (&block_addr))
-    return &dwarf2_frame_unwind;
+  struct dwarf2_fde *fde = dwarf2_frame_find_fde (&block_addr);
+  if (!fde)
+    return NULL;
 
-  return NULL;
+  /* On some targets, signal trampolines may have unwind information.
+     We need to recognize them so that we set the frame type
+     correctly.  */
+
+  if (fde->cie->signal_frame
+      || dwarf2_frame_signal_frame_p (get_frame_arch (next_frame),
+				      next_frame))
+    return &dwarf2_signal_frame_unwind;
+
+  return &dwarf2_frame_unwind;
 }
 
 
@@ -1296,6 +1309,10 @@ decode_frame_entry_1 (struct comp_unit *
          depends on the target address size.  */
       cie->encoding = DW_EH_PE_absptr;
 
+      /* We'll determine the final value later, but we need to
+	 initialize it conservatively.  */
+      cie->signal_frame = 0;
+
       /* Check version number.  */
       cie_version = read_1_byte (unit->abfd, buf);
       if (cie_version != 1 && cie_version != 3)
@@ -1373,6 +1390,17 @@ decode_frame_entry_1 (struct comp_unit *
 	      augmentation++;
 	    }
 
+	  /* "S" indicates a signal frame, such that the return
+	     address must not be decremented to locate the call frame
+	     info for the previous frame; it might even be the first
+	     instruction of a function, so decrementing it would take
+	     us to a different function.  */
+	  else if (*augmentation == 'S')
+	    {
+	      cie->signal_frame = 1;
+	      augmentation++;
+	    }
+
 	  /* Otherwise we have an unknown augmentation.
 	     Bail out unless we saw a 'z' prefix.  */
 	  else
Index: gdb-6.3/gdb/testsuite/gdb.dwarf2/signal-augm.S
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.3/gdb/testsuite/gdb.dwarf2/signal-augm.S	2006-03-03 13:31:10.000000000 -0300
@@ -0,0 +1,207 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2006  Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+   Written by Jakub Jelinek, as testcase for GCC PR 26208.  */
+
+	.globl fn3
+	.type	fn3, @function
+#ifdef __powerpc64__
+	.section ".opd","aw"
+	.align	3
+fn3:
+	.quad   .L.fn3,.TOC. at tocbase,0
+	.text
+.L.fn3:
+#else
+	.text
+	.p2align 4,,15
+fn3:
+#endif
+	.cfi_startproc
+#if defined __x86_64__
+	movl	$10, %eax
+	movl	$11, %ecx
+1:	pushq	%rax
+	.cfi_adjust_cfa_offset 8
+	pushq	%rcx
+	.cfi_adjust_cfa_offset 8
+	popq	%rax
+	.cfi_adjust_cfa_offset -8
+	popq	%rcx
+	.cfi_adjust_cfa_offset -8
+	pushq	%rax
+	.cfi_adjust_cfa_offset 8
+	pushq	%rcx
+	.cfi_adjust_cfa_offset 8
+	popq	%rax
+	.cfi_adjust_cfa_offset -8
+	popq	%rcx
+	.cfi_adjust_cfa_offset -8
+	pushq	%rax
+	.cfi_adjust_cfa_offset 8
+	pushq	%rcx
+	.cfi_adjust_cfa_offset 8
+	popq	%rax
+	.cfi_adjust_cfa_offset -8
+	popq	%rcx
+	.cfi_adjust_cfa_offset -8
+	pushq	%rax
+	.cfi_adjust_cfa_offset 8
+	pushq	%rcx
+	.cfi_adjust_cfa_offset 8
+	popq	%rax
+	.cfi_adjust_cfa_offset -8
+	popq	%rcx
+	.cfi_adjust_cfa_offset -8
+	jmp	1b
+#elif defined __i386__
+	movl	$10, %eax
+	movl	$11, %ecx
+1:	pushl	%eax
+	.cfi_adjust_cfa_offset 4
+	pushl	%ecx
+	.cfi_adjust_cfa_offset 4
+	popl	%eax
+	.cfi_adjust_cfa_offset -4
+	popl	%ecx
+	.cfi_adjust_cfa_offset -4
+	pushl	%eax
+	.cfi_adjust_cfa_offset 4
+	pushl	%ecx
+	.cfi_adjust_cfa_offset 4
+	popl	%eax
+	.cfi_adjust_cfa_offset -4
+	popl	%ecx
+	.cfi_adjust_cfa_offset -4
+	pushl	%eax
+	.cfi_adjust_cfa_offset 4
+	pushl	%ecx
+	.cfi_adjust_cfa_offset 4
+	popl	%eax
+	.cfi_adjust_cfa_offset -4
+	popl	%ecx
+	.cfi_adjust_cfa_offset -4
+	pushl	%eax
+	.cfi_adjust_cfa_offset 4
+	pushl	%ecx
+	.cfi_adjust_cfa_offset 4
+	popl	%eax
+	.cfi_adjust_cfa_offset -4
+	popl	%ecx
+	.cfi_adjust_cfa_offset -4
+	jmp	1b
+#elif defined __powerpc64__
+	mflr	0
+	mr	9,1
+	std	0,16(1)
+	.cfi_offset lr, 8
+	bl	1f
+1:	stdu	1,-64(1)
+	.cfi_adjust_cfa_offset 64
+	stdu	9,-64(1)
+	.cfi_adjust_cfa_offset 64
+	addi	1,1,64
+	.cfi_adjust_cfa_offset -64
+	addi	1,1,64
+	.cfi_adjust_cfa_offset -64
+	stdu	1,-64(1)
+	.cfi_adjust_cfa_offset 64
+	stdu	9,-64(1)
+	.cfi_adjust_cfa_offset 64
+	addi	1,1,64
+	.cfi_adjust_cfa_offset -64
+	addi	1,1,64
+	.cfi_adjust_cfa_offset -64
+	b	1b
+#elif defined __powerpc__
+	mflr	0
+	mr	9,1
+	stwu	1,-16(1)
+	.cfi_adjust_cfa_offset 16
+	stw	0,20(1)
+	.cfi_offset lr, 4
+	bl	1f
+1:	stwu	9,-64(1)
+	.cfi_adjust_cfa_offset 64
+	stwu	9,-64(1)
+	.cfi_adjust_cfa_offset 64
+	addi	1,1,64
+	.cfi_adjust_cfa_offset -64
+	addi	1,1,64
+	.cfi_adjust_cfa_offset -64
+	stwu	9,-64(1)
+	.cfi_adjust_cfa_offset 64
+	stwu	9,-64(1)
+	.cfi_adjust_cfa_offset 64
+	addi	1,1,64
+	.cfi_adjust_cfa_offset -64
+	addi	1,1,64
+	.cfi_adjust_cfa_offset -64
+	b	1b
+#elif defined __s390x__
+	stmg	%r14,%r15,112(%r15)
+	.cfi_offset %r14, -48
+	.cfi_offset %r15, -40
+	lghi	%r14,6
+1:	aghi	%r15,-160
+	.cfi_adjust_cfa_offset	160
+	aghi	%r15,-160
+	.cfi_adjust_cfa_offset	160
+	aghi	%r15,160
+	.cfi_adjust_cfa_offset	-160
+	aghi	%r15,160
+	.cfi_adjust_cfa_offset	-160
+	aghi	%r15,-160
+	.cfi_adjust_cfa_offset	160
+	aghi	%r15,-160
+	.cfi_adjust_cfa_offset	160
+	aghi	%r15,160
+	.cfi_adjust_cfa_offset	-160
+	aghi	%r15,160
+	.cfi_adjust_cfa_offset	-160
+	j	1b
+#elif defined __s390__
+	stm	%r14,%r15,56(%r15)
+	.cfi_offset %r14, -40
+	.cfi_offset %r15, -36
+	lgi	%r14,6
+1:	ahi	%r15,-96
+	.cfi_adjust_cfa_offset	96
+	ahi	%r15,-96
+	.cfi_adjust_cfa_offset	96
+	ahi	%r15,96
+	.cfi_adjust_cfa_offset	-96
+	ahi	%r15,96
+	.cfi_adjust_cfa_offset	-96
+	ahi	%r15,-96
+	.cfi_adjust_cfa_offset	96
+	ahi	%r15,-96
+	.cfi_adjust_cfa_offset	96
+	ahi	%r15,96
+	.cfi_adjust_cfa_offset	-96
+	ahi	%r15,96
+	.cfi_adjust_cfa_offset	-96
+	j	1b
+#endif
+	.cfi_endproc
+#ifdef __powerpc64__
+	.size	fn3, . - .L.fn3
+#else
+	.size	fn3, .-fn3
+#endif
+	.section	.note.GNU-stack,"", at progbits
Index: gdb-6.3/gdb/testsuite/gdb.dwarf2/signal-augm.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.3/gdb/testsuite/gdb.dwarf2/signal-augm.c	2006-03-03 13:31:10.000000000 -0300
@@ -0,0 +1,198 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2006  Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+   Written by Jakub Jelinek, as testcase for GCC PR 26208.  GDB does
+   not need all of it, since all we do is to try to recognize signal
+   stack frames.  If the compiler does not support the S augmentation
+   used to denote stack frames, and GDB does not otherwise recognize
+   stack frames, the test fails.  */
+
+#include <unwind.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <string.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/syscall.h>
+
+static _Unwind_Reason_Code
+force_unwind_stop (int version, _Unwind_Action actions,
+                   _Unwind_Exception_Class exc_class,
+                   struct _Unwind_Exception *exc_obj,
+                   struct _Unwind_Context *context,
+                   void *stop_parameter)
+{
+  if (actions & _UA_END_OF_STACK)
+    abort ();
+  return _URC_NO_REASON;
+}
+
+static void
+force_unwind ()
+{
+  struct _Unwind_Exception *exc = malloc (sizeof (*exc));
+  memset (&exc->exception_class, 0, sizeof (exc->exception_class));
+  exc->exception_cleanup = 0;
+
+#ifndef __USING_SJLJ_EXCEPTIONS__
+  _Unwind_ForcedUnwind (exc, force_unwind_stop, 0);
+#else
+  _Unwind_SjLj_ForcedUnwind (exc, force_unwind_stop, 0);
+#endif
+
+  abort ();
+}
+
+int count;
+
+static void
+counter (void *p __attribute__((unused)))
+{
+  ++count;
+}
+
+static void
+handler (void *p __attribute__((unused)))
+{
+  if (count != 2)
+    abort ();
+  _exit (0);
+}
+
+static int __attribute__((noinline))
+fn5 (void)
+{
+  char dummy __attribute__((cleanup (counter)));
+  force_unwind ();
+  return 0;
+}
+
+static void
+fn4 (int sig, siginfo_t *info, void *ctx)
+{
+  char dummy __attribute__((cleanup (counter)));
+  fn5 ();
+}
+
+extern void fn3 (long a, long b, long c, long d, long e, long f, long g);
+
+static int __attribute__((noinline))
+fn2 (void)
+{
+  fn3 (1, 2, 3, 4, 5, 6, 7);
+  return 0;
+}
+
+static int __attribute__((noinline))
+fn1 (void)
+{
+#if defined __i386__ && defined SIGACTION_DIRECT_SYSCALL
+  struct i386_kernel_sigaction
+    {
+      void (*k_sa_handler) (int, siginfo_t *, void *);
+      unsigned long k_sa_flags;
+      void (*sa_restorer) (void);
+      unsigned long long k_sa_mask;
+    } s;
+  extern void __cleanup12_rt_sigreturn (void);
+  s.k_sa_handler = fn4;
+  s.k_sa_mask = 0;
+  s.k_sa_flags = 0x4000000 | SA_RESETHAND | SA_SIGINFO;
+  s.sa_restorer = __cleanup12_rt_sigreturn;
+  asm volatile (".subsection 1; nop; __cleanup12_rt_sigreturn:"
+		"movl %0, %%eax; int $0x80; .previous"
+		: : "i" (__NR_rt_sigreturn));
+  syscall (SYS_rt_sigaction, SIGUSR1, &s, NULL, 8);
+#else
+  struct sigaction s;
+  sigemptyset (&s.sa_mask);
+  s.sa_sigaction = fn4;
+  s.sa_flags = SA_RESETHAND | SA_SIGINFO;
+  sigaction (SIGUSR1, &s, NULL);
+#endif
+  fn2 ();
+  return 0;
+}
+
+static void *
+tf (void *arg)
+{
+  char dummy __attribute__((cleanup (handler)));
+  (void) arg;
+  fn1 ();
+  return 0;
+}
+
+void
+do_test (void)
+{
+  pthread_t th;
+  struct timespec ts;
+  if (pthread_create (&th, 0, tf, 0))
+    {
+      fputs ("pthread_create failed\n", stderr);
+      _exit (1);
+    }
+  ts.tv_sec = 1;
+  ts.tv_nsec = 0;
+  nanosleep (&ts, NULL);
+  if (pthread_kill (th, SIGUSR1))
+    {
+      fputs ("pthread_kill failed\n", stderr);
+      _exit (1);
+    }
+  ts.tv_sec = 3;
+  ts.tv_nsec = 0;
+  nanosleep (&ts, NULL);
+  _exit (1);
+}
+
+int
+main (int argc, char **argv)
+{
+  int i, failures = 0, status;
+  if (argc == 2 && strcmp (argv[1], "-d") == 0)
+    do_test ();
+  else
+    for (i = 0; i < 50; i++)
+      {
+	pid_t pid = fork ();
+	if (pid < 0)
+	  {
+	    perror ("fork");
+	    failures++;
+	  }
+	else if (pid == 0)
+	  do_test ();
+	else if (waitpid (pid, &status, 0) < 0)
+	  {
+	    perror ("waitpid");
+	    failures++;
+	  }
+	else if (! WIFEXITED (status) || WEXITSTATUS (status))
+	  {
+	    fprintf (stderr, "Failure in round %d\n", i);
+	    failures++;
+	  }
+      }
+  if (failures)
+    abort ();
+  return 0;
+}
Index: gdb-6.3/gdb/testsuite/gdb.dwarf2/signal-augm.exp
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.3/gdb/testsuite/gdb.dwarf2/signal-augm.exp	2006-03-03 13:31:10.000000000 -0300
@@ -0,0 +1,77 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb at prep.ai.mit.edu
+
+# This file was written by Alexandre Oliva <aoliva at redhat.com>
+
+if $tracelevel then {
+	strace $tracelevel
+	}
+
+set prms_id 0
+set bug_id 0
+
+# signal-augm.S needs hand-coded assembly
+if {![istarget i*86-*-linux*]
+    && ![istarget x86_64-*-linux*]
+    && ![istarget powerpc*-*-linux*]
+    && ![istarget s390*-*-linux*]} {
+    return -1;
+}
+
+if [get_compiler_info "ignored"] {
+    return -1
+}
+
+if {$gcc_compiled == 0} {
+    return -1
+}
+
+set testfile "signal-augm"
+
+set srcbasename ${srcdir}/${subdir}/${testfile}
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcbasename}.c ${srcbasename}.S" "${binfile}" executable [list debug "additional_flags=-pthread -fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2"]] != ""} {
+    return -1;
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if [target_info exists gdb_stub] {
+    gdb_step_for_stub;
+}
+
+gdb_test "break fn5" "Breakpoint.*at.*" "breakpoint fn5"
+
+set test "stop at fn5"
+gdb_test_multiple "run -d" "$test" {
+    -re "received signal" {
+	send_gdb "continue\n"
+    }
+    -re "Breakpoint 1" {
+	pass "$test"
+    }
+}
+
+gdb_test "backtrace" ".*\#0 .* fn5 .*\#1 .* fn4 .*\#2 .*signal handler.*\#3 .* fn3 .*\#4 .* fn2 .*\#5 .* fn1 .*\#6 .* tf.*" "$test"
+
+return 0
+
Index: gdb-6.3/gdb/dwarf2-frame.h
===================================================================
--- gdb-6.3.orig/gdb/dwarf2-frame.h	2006-02-14 17:21:06.000000000 -0200
+++ gdb-6.3/gdb/dwarf2-frame.h	2006-03-03 13:45:42.000000000 -0300
@@ -84,6 +84,14 @@ extern void dwarf2_frame_set_init_reg (s
 				       void (*init_reg) (struct gdbarch *, int,
 					     struct dwarf2_frame_state_reg *));
 
+/* Set the architecture-specific signal trampoline recognition
+   function for GDBARCH to SIGNAL_FRAME_P.  */
+
+extern void
+  dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
+				   int (*signal_frame_p) (struct gdbarch *,
+							  struct frame_info *));
+
 /* Return the frame unwind methods for the function that contains PC,
    or NULL if it can't be handled by DWARF CFI frame unwinder.  */
 

gdb-6.3-cfaval-20060303.patch:
 gdb/dwarf2-frame.c                        |   88 ++++++++++
 gdb/dwarf2-frame.h                        |    4 
 gdb/testsuite/gdb.dwarf2/cfa-val-expr-1.c |  261 ++++++++++++++++++++++++++++++
 gdb/testsuite/gdb.dwarf2/cfa-val-expr-2.c |  226 +++++++++++++++++++++++++
 gdb/testsuite/gdb.dwarf2/cfa-val-expr.exp |   87 ++++++++++
 gdb/valarith.c                            |    9 -
 include/elf/dwarf2.h                      |   68 +++++++
 7 files changed, 738 insertions(+), 5 deletions(-)

--- NEW FILE gdb-6.3-cfaval-20060303.patch ---
for include/elf/ChangeLog
2006-03-02  Ben Elliston  <bje at au.ibm.com>

	Import from the GCC tree:
	2006-03-01  Jakub Jelinek  <jakub at redhat.com>

	* dwarf2.h (DW_TAG_condition, DW_TAG_shared_type): New constants
	from DWARF 3.
	(DW_AT_description, DW_AT_binary_scale, DW_AT_decimal_scale,
	DW_AT_small, DW_AT_decimal_sign, DW_AT_digit_count,
	DW_AT_picture_string, DW_AT_mutable, DW_AT_threads_scaled,
	DW_AT_explicit, DW_AT_object_pointer, DW_AT_endianity,
	DW_AT_elemental, DW_AT_pure, DW_AT_recursive): New.
	(DW_OP_form_tls_address, DW_OP_call_frame_cfa, DW_OP_bit_piece): New.
	(DW_ATE_packed_decimal, DW_ATE_numeric_string, DW_ATE_edited,
	DW_ATE_signed_fixed, DW_ATE_unsigned_fixed): New.
	(DW_DS_unsigned, DW_DS_leading_overpunch, DW_DS_trailing_overpunch,
	DW_DS_leading_separate, DW_DS_trailing_separate): New.
	(DW_END_default, DW_END_big, DW_END_little): New.
	(DW_END_lo_user, DW_END_hi_user): Define.
	(DW_LNE_lo_user, DW_LNE_hi_user): Define.
	(DW_CFA_val_offset, DW_CFA_val_offset_sf, DW_CFA_val_expression): New.
	(DW_LANG_PLI, DW_LANG_ObjC, DW_LANG_ObjC_plus_plus, DW_LANG_UPC,
	DW_LANG_D): New.

2005-07-18  Ben Elliston  <bje at au.ibm.com>

	* dwarf2.h (enum dwarf_type): Add DW_ATE_decimal_float (now in
	DWARF 3).

for gdb/ChangeLog
2006-03-03  Alexandre Oliva  <aoliva at redhat.com>

	* dwarf2-frame.h (enum dwarf2_frame_reg_rule): Add
	DWARF2_FRAME_REG_SAVED_VAL_OFFSET and
	DWARF2_FRAME_REG_SAVED_VAL_EXP.
	* dwarf2-frame.c (execute_cfa_program): Handle val_offset,
	val_offset_sf and val_expression.
	(dwarf2_frame_prev_register): Handle the new reg rules.

2005-08-11  Andreas Schwab  <schwab at suse.de>

	PR exp/1978
	* valarith.c (value_binop): Fix result type for the shift
	operators.

for gdb/testsuite/ChangeLog
2006-03-03  Alexandre Oliva  <aoliva at redhat.com>

	* gdb.dwarf2/cfa-val-expr.exp: New test.
	* gdb.dwarf2/cfa-val-expr-1.c, gdb.dwarf2/cfa-val-expr-2.c:
	Its sources.

Index: gdb-6.3/gdb/dwarf2-frame.c
===================================================================
--- gdb-6.3.orig/gdb/dwarf2-frame.c	2006-03-03 13:51:53.000000000 -0300
+++ gdb-6.3/gdb/dwarf2-frame.c	2006-03-03 14:28:03.000000000 -0300
@@ -435,6 +435,34 @@ bad CFI data; mismatched DW_CFA_restore_
 	      fs->regs.reg[reg].loc.offset = offset;
 	      break;
 
+	    case DW_CFA_val_offset:
+	      insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+	      dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+	      insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+	      offset = utmp * fs->data_align;
+	      fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_VAL_OFFSET;
+	      fs->regs.reg[reg].loc.offset = offset;
+	      break;
+
+	    case DW_CFA_val_offset_sf:
+	      insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+	      dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+	      insn_ptr = read_sleb128 (insn_ptr, insn_end, &offset);
+	      offset *= fs->data_align;
+	      fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_VAL_OFFSET;
+	      fs->regs.reg[reg].loc.offset = offset;
+	      break;
+
+	    case DW_CFA_val_expression:
+	      insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+	      dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+	      insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+	      fs->regs.reg[reg].loc.exp = insn_ptr;
+	      fs->regs.reg[reg].exp_len = utmp;
+	      fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_VAL_EXP;
+	      insn_ptr += utmp;
+	      break;
+
 	    case DW_CFA_def_cfa_sf:
 	      insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_reg);
 	      insn_ptr = read_sleb128 (insn_ptr, insn_end, &offset);
@@ -474,6 +502,10 @@ struct dwarf2_frame_ops
 {
   /* Pre-initialize the register state REG for register REGNUM.  */
   void (*init_reg) (struct gdbarch *, int, struct dwarf2_frame_state_reg *);
+
+  /* Check whether the frame preceding NEXT_FRAME will be a signal
+     trampoline.  */
+  int (*signal_frame_p) (struct gdbarch *, struct frame_info *);
 };
 
 /* Default architecture-specific register state initialization
@@ -550,6 +582,33 @@ dwarf2_frame_init_reg (struct gdbarch *g
 
   ops->init_reg (gdbarch, regnum, reg);
 }
+
+/* Set the architecture-specific signal trampoline recognition
+   function for GDBARCH to SIGNAL_FRAME_P.  */
+
+void
+dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
+				 int (*signal_frame_p) (struct gdbarch *,
+							struct frame_info *))
+{
+  struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+
+  ops->signal_frame_p = signal_frame_p;
+}
+
+/* Query the architecture-specific signal frame recognizer for
+   NEXT_FRAME.  */
+
+static int
+dwarf2_frame_signal_frame_p (struct gdbarch *gdbarch,
+			     struct frame_info *next_frame)
+{
+  struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
+
+  if (ops->signal_frame_p == NULL)
+    return 0;
+  return ops->signal_frame_p (gdbarch, next_frame);
+}
 
 
 struct dwarf2_frame_cache
@@ -797,6 +856,28 @@ dwarf2_frame_prev_register (struct frame
 	}
       break;
 
+    case DWARF2_FRAME_REG_SAVED_VAL_OFFSET:
+      *optimizedp = 0;
+      *lvalp = not_lval;
+      *addrp = 0;
+      *realnump = -1;
+      if (valuep)
+	store_unsigned_integer (valuep, register_size (gdbarch, regnum),
+				cache->cfa + cache->reg[regnum].loc.offset);
+      break;
+
+    case DWARF2_FRAME_REG_SAVED_VAL_EXP:
+      *optimizedp = 0;
+      *lvalp = not_lval;
+      *addrp = 0;
+      *realnump = -1;
+      if (valuep)
+	store_unsigned_integer (valuep, register_size (gdbarch, regnum),
+				execute_stack_op (cache->reg[regnum].loc.exp,
+						  cache->reg[regnum].exp_len,
+						  next_frame, cache->cfa));
+      break;
+
     case DWARF2_FRAME_REG_UNSPECIFIED:
       /* GCC, in its infinite wisdom decided to not provide unwind
 	 information for registers that are "same value".  Since
@@ -845,6 +926,13 @@ static const struct frame_unwind dwarf2_
   dwarf2_frame_prev_register
 };
 
+static const struct frame_unwind dwarf2_signal_frame_unwind =
+{
+  SIGTRAMP_FRAME,
+  dwarf2_frame_this_id,
+  dwarf2_frame_prev_register
+};
+
 const struct frame_unwind *
 dwarf2_frame_sniffer (struct frame_info *next_frame)
 {
Index: gdb-6.3/gdb/dwarf2-frame.h
===================================================================
--- gdb-6.3.orig/gdb/dwarf2-frame.h	2006-03-03 13:51:53.000000000 -0300
+++ gdb-6.3/gdb/dwarf2-frame.h	2006-03-03 13:51:55.000000000 -0300
@@ -55,6 +55,10 @@ enum dwarf2_frame_reg_rule
      register.  */
   DWARF2_FRAME_REG_INDIRECT,
 
+  /* These are defined in Dwarf3.  */
+  DWARF2_FRAME_REG_SAVED_VAL_OFFSET,
+  DWARF2_FRAME_REG_SAVED_VAL_EXP,
+
   /* These aren't defined by the DWARF2 CFI specification, but are
      used internally by GDB.  These should be superseeded by
      REG_INDIRECT.  */
Index: gdb-6.3/gdb/testsuite/gdb.dwarf2/cfa-val-expr-1.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.3/gdb/testsuite/gdb.dwarf2/cfa-val-expr-1.c	2006-03-03 13:51:55.000000000 -0300
@@ -0,0 +1,261 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2006  Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+   Written by Jakub Jelinek, as testcase for Dwarf3 value expression
+   support in GCC unwinders.  GDB does not need all of it, since all
+   we do is to try to get correct backtraces.  No compiler or binutils
+   support is required.  */
+
+/* Test complex CFA value expressions.  */
+
+#include <unwind.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+
+static _Unwind_Reason_Code
+force_unwind_stop (int version, _Unwind_Action actions,
+		   _Unwind_Exception_Class exc_class,
+		   struct _Unwind_Exception *exc_obj,
+		   struct _Unwind_Context *context,
+		   void *stop_parameter)
+{
+  if (actions & _UA_END_OF_STACK)
+    abort ();
+  return _URC_NO_REASON;
+}
+
+static void
+force_unwind ()
+{
+  struct _Unwind_Exception *exc = malloc (sizeof (*exc));
+  memset (&exc->exception_class, 0, sizeof (exc->exception_class));
+  exc->exception_cleanup = 0;
+
+  _Unwind_ForcedUnwind (exc, force_unwind_stop, 0);
+  abort ();
+}
+
+int count;
+
+static void
+counter (void *p __attribute__((unused)))
+{
+  ++count;
+}
+
+static void
+handler (void *p __attribute__((unused)))
+{
+  if (count != 2)
+    abort ();
+  _exit (0);
+}
+
+static int __attribute__((noinline))
+fn5 (void)
+{
+  char dummy __attribute__((cleanup (counter)));
+  force_unwind ();
+  return 0;
+}
+
+void
+bar (void)
+{
+  char dummy __attribute__((cleanup (counter)));
+  fn5 ();
+}
+
+void __attribute__((noinline))
+foo (int x)
+{
+  char buf[256];
+#ifdef __i386__
+  __asm (
+	"testl	%0, %0\n\t"
+	"jnz	1f\n\t"
+	".subsection 1\n\t"
+	".type	_L_mutex_lock_%=, @function\n"
+"_L_mutex_lock_%=:\n"
+"1:\t"	"leal	%1, %%ecx\n"
+"2:\t"	"call	bar\n"
+"3:\t"	"jmp	18f\n"
+"4:\t"	".size _L_mutex_lock_%=, .-_L_mutex_lock_%=\n\t"
+	".previous\n\t"
+	".section	.eh_frame,\"a\", at progbits\n"
+"5:\t"	".long	7f-6f	# Length of Common Information Entry\n"
+"6:\t"	".long	0x0	# CIE Identifier Tag\n\t"
+	".byte	0x1	# CIE Version\n\t"
+	".ascii \"zR\\0\"	# CIE Augmentation\n\t"
+	".uleb128 0x1	# CIE Code Alignment Factor\n\t"
+	".sleb128 -4	# CIE Data Alignment Factor\n\t"
+	".byte	0x8	# CIE RA Column\n\t"
+	".uleb128 0x1	# Augmentation size\n\t"
+	".byte	0x1b	# FDE Encoding (pcrel sdata4)\n\t"
+	".byte	0xc	# DW_CFA_def_cfa\n\t"
+	".uleb128 0x4\n\t"
+	".uleb128 0x0\n\t"
+	".align 4\n"
+"7:\t"	".long	17f-8f	# FDE Length\n"
+"8:\t"	".long	8b-5b	# FDE CIE offset\n\t"
+	".long	1b-.	# FDE initial location\n\t"
+	".long	4b-1b	# FDE address range\n\t"
+	".uleb128 0x0	# Augmentation size\n\t"
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x8\n\t"
+	".uleb128 10f-9f\n"
+"9:\t"	".byte	0x78	# DW_OP_breg8\n\t"
+	".sleb128 3b-1b\n"
+"10:\t"	".byte	0x40 + (2b-1b) # DW_CFA_advance_loc\n\t"
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x8\n\t"
+	".uleb128 12f-11f\n"
+"11:\t"	".byte	0x78	# DW_OP_breg8\n\t"
+	".sleb128 3b-2b\n"
+"12:\t"	".byte	0x40 + (3b-2b-1) # DW_CFA_advance_loc\n\t"
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x8\n\t"
+	".uleb128 16f-13f\n"
+"13:\t"	".byte	0x78	# DW_OP_breg8\n\t"
+	".sleb128 15f-14f\n\t"
+	".byte	0x0d	# DW_OP_const4s\n"
+"14:\t"	".4byte	3b-.\n\t"
+	".byte	0x1c	# DW_OP_minus\n\t"
+	".byte	0x0d	# DW_OP_const4s\n"
+"15:\t"	".4byte	18f-.\n\t"
+	".byte	0x22	# DW_OP_plus\n"
+"16:\t"	".align 4\n"
+"17:\t"	".previous\n"
+"18:"
+	: : "r" (x), "m" (x), "r" (buf)
+	: "memory", "eax", "edx", "ecx");
+#elif defined __x86_64__
+  __asm (
+	"testl	%0, %0\n\t"
+	"jnz	1f\n\t"
+	".subsection 1\n\t"
+	".type	_L_mutex_lock_%=, @function\n"
+"_L_mutex_lock_%=:\n"
+"1:\t"	"leaq	%1, %%rdi\n"
+"2:\t"	"subq	$128, %%rsp\n"
+"3:\t"	"call	bar\n"
+"4:\t"	"addq	$128, %%rsp\n"
+"5:\t"	"jmp	24f\n"
+"6:\t"	".size _L_mutex_lock_%=, .-_L_mutex_lock_%=\n\t"
+	".previous\n\t"
+	".section	.eh_frame,\"a\", at progbits\n"
+"7:\t"	".long	9f-8f	# Length of Common Information Entry\n"
+"8:\t"	".long	0x0	# CIE Identifier Tag\n\t"
+	".byte	0x1	# CIE Version\n\t"
+	".ascii \"zR\\0\"	# CIE Augmentation\n\t"
+	".uleb128 0x1	# CIE Code Alignment Factor\n\t"
+	".sleb128 -8	# CIE Data Alignment Factor\n\t"
+	".byte	0x10	# CIE RA Column\n\t"
+	".uleb128 0x1	# Augmentation size\n\t"
+	".byte	0x1b	# FDE Encoding (pcrel sdata4)\n\t"
+	".byte	0x12	# DW_CFA_def_cfa_sf\n\t"
+	".uleb128 0x7\n\t"
+	".sleb128 16\n\t"
+	".align 8\n"
+"9:\t"	".long	23f-10f	# FDE Length\n"
+"10:\t"	".long	10b-7b	# FDE CIE offset\n\t"
+	".long	1b-.	# FDE initial location\n\t"
+	".long	6b-1b	# FDE address range\n\t"
+	".uleb128 0x0	# Augmentation size\n\t"
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x10\n\t"
+	".uleb128 12f-11f\n"
+"11:\t"	".byte	0x80	# DW_OP_breg16\n\t"
+	".sleb128 4b-1b\n"
+"12:\t"	".byte	0x40 + (2b-1b) # DW_CFA_advance_loc\n\t"
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x10\n\t"
+	".uleb128 14f-13f\n"
+"13:\t"	".byte	0x80	# DW_OP_breg16\n\t"
+	".sleb128 4b-2b\n"
+"14:\t"	".byte	0x40 + (3b-2b) # DW_CFA_advance_loc\n\t"
+	".byte	0x0e	# DW_CFA_def_cfa_offset\n\t"
+	".uleb128 0\n\t"
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x10\n\t"
+	".uleb128 16f-15f\n"
+"15:\t"	".byte	0x80	# DW_OP_breg16\n\t"
+	".sleb128 4b-3b\n"
+"16:\t"	".byte	0x40 + (4b-3b-1) # DW_CFA_advance_loc\n\t"
+	".byte	0x0e	# DW_CFA_def_cfa_offset\n\t"
+	".uleb128 128\n\t"
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x10\n\t"
+	".uleb128 20f-17f\n"
+"17:\t"	".byte	0x80	# DW_OP_breg16\n\t"
+	".sleb128 19f-18f\n\t"
+	".byte	0x0d	# DW_OP_const4s\n"
+"18:\t"	".4byte	4b-.\n\t"
+	".byte	0x1c	# DW_OP_minus\n\t"
+	".byte	0x0d	# DW_OP_const4s\n"
+"19:\t"	".4byte	24f-.\n\t"
+	".byte	0x22	# DW_OP_plus\n"
+"20:\t"	".byte	0x40 + (5b-4b+1) # DW_CFA_advance_loc\n\t"
+	".byte	0x13	# DW_CFA_def_cfa_offset_sf\n\t"
+	".sleb128 16\n\t"
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x10\n\t"
+	".uleb128 22f-21f\n"
+"21:\t"	".byte	0x80	# DW_OP_breg16\n\t"
+	".sleb128 4b-5b\n"
+"22:\t"	".align 8\n"
+"23:\t"	".previous\n"
+"24:"
+	: : "r" (x), "m" (x), "r" (buf)
+	: "memory", "rax", "rdx", "rcx", "rsi", "rdi",
+	  "r8", "r9", "r10", "r11");
+#else
+# error Unsupported test architecture
+#endif
+}
+
+static int __attribute__((noinline))
+fn2 (void)
+{
+  foo (3);
+  return 0;
+}
+
+static int __attribute__((noinline))
+fn1 (void)
+{
+  fn2 ();
+  return 0;
+}
+
+static void *
+fn0 (void)
+{
+  char dummy __attribute__((cleanup (handler)));
+  fn1 ();
+  return 0;
+}
+
+int
+main (void)
+{
+  fn0 ();
+  return 0;
+}
Index: gdb-6.3/gdb/testsuite/gdb.dwarf2/cfa-val-expr-2.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.3/gdb/testsuite/gdb.dwarf2/cfa-val-expr-2.c	2006-03-03 13:51:55.000000000 -0300
@@ -0,0 +1,226 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2006  Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+   Written by Jakub Jelinek, as testcase for Dwarf3 value expression
+   support in GCC unwinders.  GDB does not need all of it, since all
+   we do is to try to get correct backtraces.  No compiler or binutils
+   support is required.  */
+
+/* Test complex CFA value expressions.  */
+
+#include <unwind.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+
+static _Unwind_Reason_Code
+force_unwind_stop (int version, _Unwind_Action actions,
+		   _Unwind_Exception_Class exc_class,
+		   struct _Unwind_Exception *exc_obj,
+		   struct _Unwind_Context *context,
+		   void *stop_parameter)
+{
+  if (actions & _UA_END_OF_STACK)
+    abort ();
+  return _URC_NO_REASON;
+}
+
+static void
+force_unwind ()
+{
+  struct _Unwind_Exception *exc = malloc (sizeof (*exc));
+  memset (&exc->exception_class, 0, sizeof (exc->exception_class));
+  exc->exception_cleanup = 0;
+
+  _Unwind_ForcedUnwind (exc, force_unwind_stop, 0);
+  abort ();
+}
+
+int count;
+
+static void
+counter (void *p __attribute__((unused)))
+{
+  ++count;
+}
+
+static void
+handler (void *p __attribute__((unused)))
+{
+  if (count != 2)
+    abort ();
+  _exit (0);
+}
+
+static int __attribute__((noinline))
+fn5 (void)
+{
+  char dummy __attribute__((cleanup (counter)));
+  force_unwind ();
+  return 0;
+}
+
+void
+bar (void)
+{
+  char dummy __attribute__((cleanup (counter)));
+  fn5 ();
+}
+
+void __attribute__((noinline))
+foo (int x)
+{
+  char buf[256];
+#ifdef __x86_64__
+  __asm (
+	"testl	%0, %0\n\t"
+	"jnz	1f\n\t"
+	".subsection 1\n\t"
+	".type	_L_mutex_lock_%=, @function\n"
+"_L_mutex_lock_%=:\n"
+"1:\t"	"leaq	%1, %%rdi\n"
+"2:\t"	"subq	$128, %%rsp\n"
+"3:\t"	"call	bar\n"
+"4:\t"	"addq	$128, %%rsp\n"
+"5:\t"	"jmp	21f\n"
+"6:\t"	".size _L_mutex_lock_%=, .-_L_mutex_lock_%=\n\t"
+	".previous\n\t"
+	".section	.eh_frame,\"a\", at progbits\n"
+"7:\t"	".long	9f-8f	# Length of Common Information Entry\n"
+"8:\t"	".long	0x0	# CIE Identifier Tag\n\t"
+	".byte	0x1	# CIE Version\n\t"
+	".ascii \"zR\\0\"	# CIE Augmentation\n\t"
+	".uleb128 0x1	# CIE Code Alignment Factor\n\t"
+	".sleb128 -8	# CIE Data Alignment Factor\n\t"
+	".byte	0x10	# CIE RA Column\n\t"
+	".uleb128 0x1	# Augmentation size\n\t"
+	".byte	0x1b	# FDE Encoding (pcrel sdata4)\n\t"
+	".byte	0xc	# DW_CFA_def_cfa\n\t"
+	".uleb128 0x7\n\t"
+	".uleb128 0x0\n\t"
+	".align 8\n"
+"9:\t"	".long	20f-10f	# FDE Length\n"
+"10:\t"	".long	10b-7b	# FDE CIE offset\n\t"
+	".long	1b-.	# FDE initial location\n\t"
+	".long	6b-1b	# FDE address range\n\t"
+	".uleb128 0x0	# Augmentation size\n\t"
+	/* This CFA expression computes the address right
+	   past the jnz instruction above, from %rip somewhere
+	   within the _L_mutex_lock_%= subsection.  */
+	".byte	0x16	# DW_CFA_val_expression\n\t"
+	".uleb128 0x10\n\t"
+	".uleb128 19f-11f\n"
+"11:\t"	".byte	0x80	# DW_OP_breg16\n\t"
+	".sleb128 0\n"
+"12:\t"	".byte	0x12	# DW_OP_dup\n\t"
+	".byte	0x94	# DW_OP_deref_size\n\t"
+	".byte	1\n\t"
+	".byte	0x12	# DW_OP_dup\n\t"
+	".byte	0x08	# DW_OP_const1u\n\t"
+	".byte	0x48\n\t"
+	".byte	0x2e	# DW_OP_ne\n\t"
+	".byte	0x28	# DW_OP_bra\n\t"
+	".2byte	16f-13f\n"
+"13:\t"	".byte	0x13	# DW_OP_drop\n\t"
+	".byte	0x23	# DW_OP_plus_uconst\n\t"
+	".uleb128 1\n\t"
+	".byte	0x12	# DW_OP_dup\n\t"
+	".byte	0x94	# DW_OP_deref_size\n\t"
+	".byte	1\n\t"
+	".byte	0x08	# DW_OP_const1u\n\t"
+	".byte	0x81\n\t"
+	".byte	0x2e	# DW_OP_ne\n\t"
+	".byte	0x28	# DW_OP_bra\n\t"
+	".2byte	15f-14f\n"
+"14:\t"	".byte	0x23	# DW_OP_plus_uconst\n\t"
+	".uleb128 3b-2b-1\n\t"
+	".byte	0x2f	# DW_OP_skip\n\t"
+	".2byte	12b-15f\n"
+"15:\t"	".byte	0x23	# DW_OP_plus_uconst\n\t"
+	".uleb128 2b-1b-1\n\t"
+	".byte	0x2f	# DW_OP_skip\n\t"
+	".2byte	12b-16f\n"
+"16:\t"	".byte	0x08	# DW_OP_const1u\n\t"
+	".byte	0xe8\n\t"
+	".byte	0x2e	# DW_OP_ne\n\t"
+	".byte	0x28	# DW_OP_bra\n\t"
+	".2byte	18f-17f\n"
+"17:\t"	".byte	0x23	# DW_OP_plus_uconst\n\t"
+	".uleb128 4b-3b\n\t"
+	".byte	0x2f	# DW_OP_skip\n\t"
+	".2byte	12b-18f\n"
+"18:\t"	".byte	0x23	# DW_OP_plus_uconst\n\t"
+	".uleb128 1\n\t"
+	".byte	0x12	# DW_OP_dup\n\t"
+	".byte	0x94	# DW_OP_deref_size\n\t"
+	".byte	4\n\t"
+	".byte	0x08	# DW_OP_const1u\n\t"
+	".byte	72 - (6b-5b) * 8 # (6b-5b) == 5 ? 32 : 56\n\t"
+	".byte	0x24	# DW_OP_shl\n\t"
+	".byte	0x08	# DW_OP_const1u\n\t"
+	".byte	72 - (6b-5b) * 8 # (6b-5b) == 5 ? 32 : 56\n\t"
+	".byte	0x26	# DW_OP_shra\n\t"
+	".byte	0x22	# DW_OP_plus\n\t"
+	".byte	0x23	# DW_OP_plus_uconst\n\t"
+	".uleb128 6b-5b-1\n"
+"19:\t"	".byte	0x40 + (3b-1b) # DW_CFA_advance_loc\n\t"
+	".byte	0xe	# DW_CFA_def_cfa_offset\n\t"
+	".uleb128 128\n\t"
+	".byte	0x40 + (5b-3b) # DW_CFA_advance_loc\n\t"
+	".byte	0xe	# DW_CFA_def_cfa_offset\n\t"
+	".uleb128 0\n\t"
+	".align 8\n"
+"20:\t"	".previous\n"
+"21:"
+	: : "r" (x), "m" (x), "r" (buf)
+	: "memory", "rax", "rdx", "rcx", "rsi", "rdi",
+	  "r8", "r9", "r10", "r11");
+#else
+# error Unsupported test architecture
+#endif
+}
+
+static int __attribute__((noinline))
+fn2 (void)
+{
+  foo (3);
+  return 0;
+}
+
+static int __attribute__((noinline))
+fn1 (void)
+{
+  fn2 ();
+  return 0;
+}
+
+static void *
+fn0 (void)
+{
+  char dummy __attribute__((cleanup (handler)));
+  fn1 ();
+  return 0;
+}
+
+int
+main (void)
+{
+  fn0 ();
+  return 0;
+}
Index: gdb-6.3/gdb/testsuite/gdb.dwarf2/cfa-val-expr.exp
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.3/gdb/testsuite/gdb.dwarf2/cfa-val-expr.exp	2006-03-03 13:51:55.000000000 -0300
@@ -0,0 +1,87 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb at prep.ai.mit.edu
+
+# This file was written by Alexandre Oliva <aoliva at redhat.com>
+
+if $tracelevel then {
+	strace $tracelevel
+	}
+
+set prms_id 0
+set bug_id 0
+
+# signal-augm.S needs hand-coded assembly
+if {![istarget i*86-*-linux*]
+    && ![istarget x86_64-*-linux*]} {
+    return -1;
+}
+
+if [get_compiler_info "ignored"] {
+    return -1
+}
+
+if {$gcc_compiled == 0} {
+    return -1
+}
+
+set tnum 1
+set testfile "cfa-val-expr-$tnum"
+
+set srcfile ${srcdir}/${subdir}/${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcfile}" "${binfile}" executable [list debug "additional_flags=-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2"]] != ""} {
+    return -1;
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if [target_info exists gdb_stub] {
+    gdb_step_for_stub;
+}
+
+gdb_test "break fn5" "Breakpoint.*at.*" "breakpoint fn5 ($tnum)"
+gdb_test "run" ".*Breakpoint 1.*" "stopped at fn5 ($tnum)"
+gdb_test "backtrace" ".*\#0 .* fn5 .*\#1 .* bar .*\#2 .* _L_mutex.* .*\#3 .* foo .*\#4 .* fn2 .*\#5 .* fn1 .*\#6 .* main.*" "backtrace ($tnum)"
+
+set tnum 2
+set testfile "cfa-val-expr-$tnum"
+
+set srcfile ${srcdir}/${subdir}/${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcfile}" "${binfile}" executable [list debug "additional_flags=-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2"]] != ""} {
+    return -1;
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if [target_info exists gdb_stub] {
+    gdb_step_for_stub;
+}
+
+gdb_test "break fn5" "Breakpoint.*at.*" "breakpoint fn5 ($tnum)"
+gdb_test "run" ".*Breakpoint 1.*" "stopped at fn5 ($tnum)"
+gdb_test "backtrace" ".*\#0 .* fn5 .*\#1 .* bar .*\#2 .* _L_mutex.* .*\#3 .* foo .*\#4 .* fn2 .*\#5 .* fn1 .*\#6 .* main.*" "backtrace ($tnum)"
+
+return 0
Index: gdb-6.3/include/elf/dwarf2.h
===================================================================
--- gdb-6.3.orig/include/elf/dwarf2.h	2006-03-03 13:55:48.000000000 -0300
+++ gdb-6.3/include/elf/dwarf2.h	2006-03-03 14:27:03.000000000 -0300
@@ -1,7 +1,7 @@
-/* Declarations and definitions of codes relating to the DWARF2 symbolic
-   debugging information format.
+/* Declarations and definitions of codes relating to the DWARF2 and
+   DWARF3 symbolic debugging information formats.
    Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
-   2003 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
    Written by Gary Funck (gary at intrepid.com) The Ada Joint Program
    Office (AJPO), Florida State University and Silicon Graphics Inc.
@@ -187,6 +187,8 @@ enum dwarf_tag
     DW_TAG_unspecified_type = 0x3b,
     DW_TAG_partial_unit = 0x3c,
     DW_TAG_imported_unit = 0x3d,
+    DW_TAG_condition = 0x3f,
+    DW_TAG_shared_type = 0x40,
     /* SGI/MIPS Extensions.  */
     DW_TAG_MIPS_loop = 0x4081,
     /* HP extensions.  See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz .  */
@@ -317,6 +319,21 @@ enum dwarf_attribute
     DW_AT_call_column   = 0x57,
     DW_AT_call_file     = 0x58,
     DW_AT_call_line     = 0x59,
+    DW_AT_description   = 0x5a,
+    DW_AT_binary_scale  = 0x5b,
+    DW_AT_decimal_scale = 0x5c,
+    DW_AT_small         = 0x5d,
+    DW_AT_decimal_sign  = 0x5e,
+    DW_AT_digit_count   = 0x5f,
+    DW_AT_picture_string = 0x60,
+    DW_AT_mutable       = 0x61,
+    DW_AT_threads_scaled = 0x62,
+    DW_AT_explicit      = 0x63,
+    DW_AT_object_pointer = 0x64,
+    DW_AT_endianity     = 0x65,
+    DW_AT_elemental     = 0x66,
+    DW_AT_pure          = 0x67,
+    DW_AT_recursive     = 0x68,
     /* SGI/MIPS extensions.  */
     DW_AT_MIPS_fde = 0x2001,
     DW_AT_MIPS_loop_begin = 0x2002,
@@ -518,6 +535,9 @@ enum dwarf_location_atom
     DW_OP_call2 = 0x98,
     DW_OP_call4 = 0x99,
     DW_OP_call_ref = 0x9a,
+    DW_OP_form_tls_address = 0x9b,
+    DW_OP_call_frame_cfa = 0x9c,
+    DW_OP_bit_piece = 0x9d,
     /* GNU extensions.  */
     DW_OP_GNU_push_tls_address = 0xe0,
     /* HP extensions.  */
@@ -547,6 +567,12 @@ enum dwarf_type
     DW_ATE_unsigned_char = 0x8,
     /* DWARF 3.  */
     DW_ATE_imaginary_float = 0x9,
+    DW_ATE_packed_decimal = 0xa,
+    DW_ATE_numeric_string = 0xb,
+    DW_ATE_edited = 0xc,
+    DW_ATE_signed_fixed = 0xd,
+    DW_ATE_unsigned_fixed = 0xe,
+    DW_ATE_decimal_float = 0xf,
     /* HP extensions.  */
     DW_ATE_HP_float80            = 0x80, /* Floating-point (80 bit).  */
     DW_ATE_HP_complex_float80    = 0x81, /* Complex floating-point (80 bit).  */
@@ -560,6 +586,29 @@ enum dwarf_type
 #define	DW_ATE_lo_user 0x80
 #define	DW_ATE_hi_user 0xff
 
+/* Decimal sign encodings.  */
+enum dwarf_decimal_sign_encoding
+  {
+    /* DWARF 3.  */
+    DW_DS_unsigned = 0x01,
+    DW_DS_leading_overpunch = 0x02,
+    DW_DS_trailing_overpunch = 0x03,
+    DW_DS_leading_separate = 0x04,
+    DW_DS_trailing_separate = 0x05
+  };
+
+/* Endianity encodings.  */
+enum dwarf_endianity_encoding
+  {
+    /* DWARF 3.  */
+    DW_END_default = 0x00,
+    DW_END_big = 0x01,
+    DW_END_little = 0x02
+  };
+
+#define DW_END_lo_user 0x40
+#define DW_END_hi_user 0xff
+
 /* Array ordering names and codes.  */
 enum dwarf_array_dim_ordering
   {
@@ -666,6 +715,9 @@ enum dwarf_line_number_x_ops
     DW_LNE_HP_define_proc              = 0x20
   };
 
+#define DW_LNE_lo_user 0x80
+#define DW_LNE_hi_user 0xff
+
 /* Call frame information.  */
 enum dwarf_call_frame_info
   {
@@ -693,6 +745,9 @@ enum dwarf_call_frame_info
     DW_CFA_offset_extended_sf = 0x11,
     DW_CFA_def_cfa_sf = 0x12,
     DW_CFA_def_cfa_offset_sf = 0x13,
+    DW_CFA_val_offset = 0x14,
+    DW_CFA_val_offset_sf = 0x15,
+    DW_CFA_val_expression = 0x16,
     /* SGI/MIPS specific.  */
     DW_CFA_MIPS_advance_loc8 = 0x1d,
     /* GNU extensions.  */
@@ -726,11 +781,16 @@ enum dwarf_source_language
     DW_LANG_Fortran90 = 0x0008,
     DW_LANG_Pascal83 = 0x0009,
     DW_LANG_Modula2 = 0x000a,
-    DW_LANG_Java = 0x000b,
     /* DWARF 3.  */
+    DW_LANG_Java = 0x000b,
     DW_LANG_C99 = 0x000c,
     DW_LANG_Ada95 = 0x000d,
     DW_LANG_Fortran95 = 0x000e,
+    DW_LANG_PLI = 0x000f,
+    DW_LANG_ObjC = 0x0010,
+    DW_LANG_ObjC_plus_plus = 0x0011,
+    DW_LANG_UPC = 0x0012,
+    DW_LANG_D = 0x0013,
     /* MIPS.  */
     DW_LANG_Mips_Assembler = 0x8001,
     /* UPC.  */
Index: gdb-6.3/gdb/valarith.c
===================================================================
--- gdb-6.3.orig/gdb/valarith.c	2004-09-20 17:18:39.000000000 -0300
+++ gdb-6.3/gdb/valarith.c	2006-03-03 15:45:05.000000000 -0300
@@ -881,7 +881,14 @@ value_binop (struct value *arg1, struct 
          Use the signedness of the operand with the greater length.
          If both operands are of equal length, use unsigned operation
          if one of the operands is unsigned.  */
-      if (promoted_len1 > promoted_len2)
+      if (op == BINOP_RSH || op == BINOP_LSH)
+	{
+	  /* In case of the shift operators the type of the result only
+	     depends on the type of the left operand.  */
+	  unsigned_operation = is_unsigned1;
+	  result_len = promoted_len1;
+	}
+      else if (promoted_len1 > promoted_len2)
 	{
 	  unsigned_operation = is_unsigned1;
 	  result_len = promoted_len1;

gdb-6.3-prelink-core-20060223.patch:
 Makefile.in                      |    2 
 mipsnbsd-tdep.c                  |    6 +
 solib-legacy.c                   |   11 +++
 solib-svr4.c                     |  124 +++++++++++++++++++++++++++++++++++----
 solib-svr4.h                     |    6 +
 testsuite/gdb.base/prelink-lib.c |   15 ++++
 testsuite/gdb.base/prelink.c     |   11 +++
 testsuite/gdb.base/prelink.exp   |  115 ++++++++++++++++++++++++++++++++++++
 8 files changed, 279 insertions(+), 11 deletions(-)

Index: gdb-6.3-prelink-core-20060223.patch
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb-6.3-prelink-core-20060223.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.3-prelink-core-20060223.patch	23 Feb 2006 20:47:29 -0000	1.1
+++ gdb-6.3-prelink-core-20060223.patch	3 Mar 2006 19:10:47 -0000	1.2
@@ -1,5 +1,5 @@
 for gdb/ChangeLog
-from  Alexandre Oliva  <aoliva at redhat.com>
+2006-02-28  Alexandre Oliva  <aoliva at redhat.com>
 
 	* solib-svr4.h (struct link_map_offsets): Add l_ld_offset and
 	l_ld_size fields.
@@ -18,15 +18,22 @@
 	* Makefile.in (solib-svr4.o): Depend on $(elf_bfd_h).
 
 for gdb/testsuite/ChangeLog
-from  Alexandre Oliva  <aoliva at redhat.com>
+2006-03-03  Alexandre Oliva  <aoliva at redhat.com>
+
+	* gdb.base/prelink.exp: Add -q to prelink runs.  Rename
+	executable to prelinkt.  Don't re-prelink if we didn't get a
+	core file.  Test prelink -u exit status to tell whether
+	prelinking failed.  Use gdb_test_multiple.
+
+2006-02-28  Alexandre Oliva  <aoliva at redhat.com>
 
 	* gdb.base/prelink.exp: New test.
 	* gdb.base/prelink.c, gdb.base/prelink-lib.c: New sources.
 
 Index: gdb-6.3/gdb/mipsnbsd-tdep.c
 ===================================================================
---- gdb-6.3.orig/gdb/mipsnbsd-tdep.c	2004-07-23 22:00:19.000000000 -0300
-+++ gdb-6.3/gdb/mipsnbsd-tdep.c	2006-02-23 17:28:05.000000000 -0300
+--- gdb-6.3.orig/gdb/mipsnbsd-tdep.c	2006-02-23 17:39:41.000000000 -0300
++++ gdb-6.3/gdb/mipsnbsd-tdep.c	2006-02-23 17:39:57.000000000 -0300
 @@ -295,6 +295,9 @@ mipsnbsd_ilp32_solib_svr4_fetch_link_map
        lmo.l_name_offset = 8;
        lmo.l_name_size   = 4;
@@ -49,8 +56,8 @@
  
 Index: gdb-6.3/gdb/solib-legacy.c
 ===================================================================
---- gdb-6.3.orig/gdb/solib-legacy.c	2003-06-11 10:16:29.000000000 -0300
-+++ gdb-6.3/gdb/solib-legacy.c	2006-02-23 17:28:05.000000000 -0300
+--- gdb-6.3.orig/gdb/solib-legacy.c	2006-02-23 17:39:41.000000000 -0300
++++ gdb-6.3/gdb/solib-legacy.c	2006-02-23 17:39:57.000000000 -0300
 @@ -68,6 +68,9 @@ legacy_svr4_fetch_link_map_offsets (void
        lmo.l_next_offset = offsetof (struct link_map, l_next);
        lmo.l_next_size = fieldsize (struct link_map, l_next);
@@ -85,8 +92,8 @@
  #endif /* HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS */
 Index: gdb-6.3/gdb/solib-svr4.c
 ===================================================================
---- gdb-6.3.orig/gdb/solib-svr4.c	2006-02-14 17:21:06.000000000 -0200
-+++ gdb-6.3/gdb/solib-svr4.c	2006-02-23 17:28:05.000000000 -0300
+--- gdb-6.3.orig/gdb/solib-svr4.c	2006-02-23 17:39:41.000000000 -0300
++++ gdb-6.3/gdb/solib-svr4.c	2006-02-23 17:39:57.000000000 -0300
 @@ -36,10 +36,13 @@
  #include "inferior.h"
  #include "command.h"
@@ -293,8 +300,8 @@
  			  SO_NAME_MAX_PATH_SIZE - 1, &errcode);
 Index: gdb-6.3/gdb/solib-svr4.h
 ===================================================================
---- gdb-6.3.orig/gdb/solib-svr4.h	2004-03-12 19:01:39.000000000 -0300
-+++ gdb-6.3/gdb/solib-svr4.h	2006-02-23 17:28:05.000000000 -0300
+--- gdb-6.3.orig/gdb/solib-svr4.h	2006-02-23 17:39:41.000000000 -0300
++++ gdb-6.3/gdb/solib-svr4.h	2006-02-23 17:39:57.000000000 -0300
 @@ -51,6 +51,12 @@ struct link_map_offsets
      /* Size of l_addr field in struct link_map.  */
      int l_addr_size;
@@ -310,8 +317,8 @@
  
 Index: gdb-6.3/gdb/Makefile.in
 ===================================================================
---- gdb-6.3.orig/gdb/Makefile.in	2006-02-14 17:21:08.000000000 -0200
-+++ gdb-6.3/gdb/Makefile.in	2006-02-23 17:28:05.000000000 -0300
+--- gdb-6.3.orig/gdb/Makefile.in	2006-02-23 17:39:41.000000000 -0300
++++ gdb-6.3/gdb/Makefile.in	2006-02-23 17:39:57.000000000 -0300
 @@ -2535,7 +2535,7 @@ solib-sunos.o: solib-sunos.c $(defs_h) $
  solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
  	$(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
@@ -324,7 +331,7 @@
 Index: gdb-6.3/gdb/testsuite/gdb.base/prelink-lib.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.3/gdb/testsuite/gdb.base/prelink-lib.c	2006-02-23 17:28:05.000000000 -0300
++++ gdb-6.3/gdb/testsuite/gdb.base/prelink-lib.c	2006-02-23 17:39:57.000000000 -0300
 @@ -0,0 +1,15 @@
 +int
 +g (void (*p)(void))
@@ -344,7 +351,7 @@
 Index: gdb-6.3/gdb/testsuite/gdb.base/prelink.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.3/gdb/testsuite/gdb.base/prelink.c	2006-02-23 17:28:05.000000000 -0300
++++ gdb-6.3/gdb/testsuite/gdb.base/prelink.c	2006-02-23 17:39:57.000000000 -0300
 @@ -0,0 +1,11 @@
 +#include <stdio.h>
 +
@@ -360,8 +367,8 @@
 Index: gdb-6.3/gdb/testsuite/gdb.base/prelink.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-6.3/gdb/testsuite/gdb.base/prelink.exp	2006-02-23 17:28:05.000000000 -0300
-@@ -0,0 +1,128 @@
++++ gdb-6.3/gdb/testsuite/gdb.base/prelink.exp	2006-03-03 14:35:19.000000000 -0300
+@@ -0,0 +1,115 @@
 +# Copyright 2006 Free Software Foundation, Inc.
 +
 +# This program is free software; you can redistribute it and/or modify
@@ -395,9 +402,15 @@
 +    return
 +}
 +
++if [get_compiler_info "ignored"] {
++    return -1
++}
++
++if {$gcc_compiled == 0} {
++    return -1
++}
++
 +set testfile "prelink"
-+set srcfile ${testfile}.c
-+set binfile ${objdir}/${subdir}/${testfile}
 +
 +set libsrcfile ${testfile}-lib.c
 +set libfile ${objdir}/${subdir}/${testfile}.so
@@ -406,25 +419,17 @@
 +    return -1
 +}
 +
-+if {[catch "system \"prelink -NR ${libfile}\""] != 0} {
++if {[catch "system \"prelink -qNR ${libfile}\""] != 0} {
 +    # Maybe we don't have prelink.
 +    return -1
 +}
 +
 +set srcfile ${testfile}.c
-+set binfile ${objdir}/${subdir}/${testfile}
++set binfile ${objdir}/${subdir}/${testfile}t
 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile}" "${binfile}" executable [list debug "additional_flags=-Wl,-rpath,${objdir}/${subdir}"]] != ""} {
 +    return -1;
 +}
 +
-+if [get_compiler_info ${binfile}] {
-+    return -1
-+}
-+
-+if {$gcc_compiled == 0} {
-+    return -1
-+}
-+
 +set found 0
 +set coredir "${objdir}/${subdir}/coredir.[getpid]"
 +file mkdir $coredir
@@ -446,9 +451,6 @@
 +    }
 +}
 +
-+catch "system \"prelink -u ${libfile}\""
-+catch "system \"prelink -NR ${libfile}\""
-+
 +# Try to clean up after ourselves.
 +remote_file build delete [file join $coredir coremmap.data]
 +remote_exec build "rmdir $coredir"
@@ -458,6 +460,12 @@
 +    return 0
 +}
 +
++if {[catch "system \"prelink -uN ${libfile}\""] != 0} {
++    warning "${libfile} was not prelinked, maybe system libraries are not prelinked?"
++    return 0
++}
++catch "system \"prelink -qNR ${libfile}\""
++
 +# Start with a fresh gdb
 +
 +gdb_exit
@@ -465,26 +473,12 @@
 +gdb_reinitialize_dir $srcdir/$subdir
 +gdb_load ${binfile}
 +
-+set oldtimeout $timeout
-+set timeout [expr "$timeout + 60"]
-+verbose "Timeout is now $timeout seconds" 2
-+send_gdb "core-file $objdir/$subdir/prelink.core\n"
-+gdb_expect {
-+    -re "warning: \.dynamic section.*not at the expected address" {
-+	pass "changed base address"
-+    }
-+    -re ".*$gdb_prompt $"	{ fail "changed base address" }
-+    timeout 		{ fail "(timeout) changed base address" }
-+}
-+gdb_expect {
-+    -re "warning: difference.*caused by prelink, adjusting" {
-+	pass "prelink adjustment"
++set test "prelink"
++gdb_test_multiple "core-file $objdir/$subdir/prelink.core" "$test" {
++    -re "warning: \.dynamic section.*not at the expected address.*warning: difference.*caused by prelink, adjusting expectations." {
++	pass "$test"
 +    }
-+    -re ".*$gdb_prompt $"	{ fail "prelink adjustment" }
-+    timeout 		{ fail "(timeout) prelink adjustment" }
 +}
-+set timeout $oldtimeout
-+verbose "Timeout is now $timeout seconds" 2
 +
 +gdb_exit
 +


Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -r1.174 -r1.175
--- gdb.spec	23 Feb 2006 20:48:51 -0000	1.174
+++ gdb.spec	3 Mar 2006 19:10:47 -0000	1.175
@@ -11,7 +11,7 @@
 Version: 6.3.0.0
 
 # The release always contains a leading reserved number, start it at 0.
-Release: 1.110
+Release: 1.114
 
 License: GPL
 Group: Development/Debuggers
@@ -269,6 +269,12 @@
 # prelink base addresses.
 Patch172: gdb-6.3-prelink-core-20060223.patch
 
+# Enable gdb to recognize stack frames annotated with the "S" augmentation.
+Patch173: gdb-6.3-augmS-20060303.patch
+
+# Enable gdb to recognize CFA value expressions introduced in Dwarf3.
+Patch174: gdb-6.3-cfaval-20060303.patch
+
 %ifarch ia64
 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu libunwind >= 0.96-3
 %else
@@ -373,6 +379,8 @@
 %patch170 -p1
 %patch171 -p1
 %patch172 -p1
+%patch173 -p1
+%patch174 -p1
 
 # Change the version that gets printed at GDB startup, so it is RedHat
 # specific.
@@ -541,6 +549,14 @@
 # don't include the files in include, they are part of binutils
 
 %changelog
+* Fri Mar  3 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.114
+- Bump up release number.
+
+* Fri Mar  3 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.111
+- Add support for "S" augmentation for signal stack frames.
+- Add support for CFA value expressions and encodings.
+- Various improvements to the prelink test.
+
 * Thu Feb 23 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.110
 - Bump up release number.
 




More information about the fedora-cvs-commits mailing list