rpms/gdb/F-13 gdb-unwind-debughook-safe-fail.patch, NONE, 1.1 gdb.spec, 1.434, 1.435

Jan Kratochvil jkratoch at fedoraproject.org
Tue Apr 27 20:02:55 UTC 2010


Author: jkratoch

Update of /cvs/pkgs/rpms/gdb/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv1561

Modified Files:
	gdb.spec 
Added Files:
	gdb-unwind-debughook-safe-fail.patch 
Log Message:
* Tue Apr 27 2010 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.1-17.fc13
- Fail gracefully if the _Unwind_DebugHook arg. is optimized out (Tom Tromey).


gdb-unwind-debughook-safe-fail.patch:
 infrun.c |   26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

--- NEW FILE gdb-unwind-debughook-safe-fail.patch ---
commit 802214c97d1661ad337aad0d011dded44f0b5ddd
Author: Tom Tromey <tromey at redhat.com>
Date:   Mon Apr 26 15:15:55 2010 -0600

    Fail gracefully if the _Unwind_DebugHook argument is optimized out

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 2eea550..9a5b534 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -4925,20 +4925,24 @@ insert_exception_resume_breakpoint (struct thread_info *tp,
 
       vsym = lookup_symbol (SYMBOL_LINKAGE_NAME (sym), b, VAR_DOMAIN, NULL);
       value = read_var_value (vsym, frame);
-      handler = value_as_address (value);
+      /* If the value was optimized out, revert to the old behavior.  */
+      if (! value_optimized_out (value))
+	{
+	  handler = value_as_address (value);
 
-      /* We're going to replace the current step-resume breakpoint
-	 with an exception-resume breakpoint.  */
-      delete_step_resume_breakpoint (tp);
+	  /* We're going to replace the current step-resume breakpoint
+	     with an exception-resume breakpoint.  */
+	  delete_step_resume_breakpoint (tp);
 
-      if (debug_infrun)
-	fprintf_unfiltered (gdb_stdlog,
-			    "infrun: exception resume at %lx\n",
-			    (unsigned long) handler);
+	  if (debug_infrun)
+	    fprintf_unfiltered (gdb_stdlog,
+				"infrun: exception resume at %lx\n",
+				(unsigned long) handler);
 
-      bp = set_momentary_breakpoint_at_pc (get_frame_arch (frame),
-					   handler, bp_exception_resume);
-      inferior_thread ()->step_resume_breakpoint = bp;
+	  bp = set_momentary_breakpoint_at_pc (get_frame_arch (frame),
+					       handler, bp_exception_resume);
+	  inferior_thread ()->step_resume_breakpoint = bp;
+	}
     }
 }
 


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/F-13/gdb.spec,v
retrieving revision 1.434
retrieving revision 1.435
diff -u -p -r1.434 -r1.435
--- gdb.spec	27 Apr 2010 11:41:27 -0000	1.434
+++ gdb.spec	27 Apr 2010 20:02:55 -0000	1.435
@@ -36,7 +36,7 @@ Version: 7.1
 
 # 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: 16%{?_with_upstream:.upstream}%{dist}
+Release: 17%{?_with_upstream:.upstream}%{dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
 Group: Development/Debuggers
@@ -465,6 +465,9 @@ Patch453: gdb-bz570635-prettyprint-doc2.
 # Fix crash when using GNU IFUNC call from breakpoint condition.
 Patch454: gdb-bz539590-gnu-ifunc-fix-cond.patch
 
+# Fail gracefully if the _Unwind_DebugHook arg. is optimized out (Tom Tromey).
+Patch456: gdb-unwind-debughook-safe-fail.patch
+
 BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
 Requires: readline%{?_isa}
 BuildRequires: readline-devel%{?_isa}
@@ -736,6 +739,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc
 %patch453 -p1
 %patch454 -p1
 %patch455 -p1
+%patch456 -p1
 
 %patch415 -p1
 %patch393 -p1
@@ -1068,6 +1072,9 @@ fi
 %endif
 
 %changelog
+* Tue Apr 27 2010 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.1-17.fc13
+- Fail gracefully if the _Unwind_DebugHook arg. is optimized out (Tom Tromey).
+
 * Tue Apr 27 2010 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.1-16.fc13
 - Temporarily workaround the crash of BZ 575292 as there was now BZ 585445.
 



More information about the scm-commits mailing list