From 9b573707436d0111ea888e340ecfc6c4738c83c6cea7e15e124d2a1c593bff8c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 13 Jan 2007 11:49:02 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=3 --- gdb.changes | 5 +++++ gdb.spec | 8 ++++++-- pc-regnum.diff | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 pc-regnum.diff diff --git a/gdb.changes b/gdb.changes index e54a2a8..d2d916a 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 11 18:29:13 CET 2007 - schwab@suse.de + +- Fix unchecked use of PC_REGNUM. + ------------------------------------------------------------------- Wed Dec 20 12:37:40 CET 2006 - schwab@suse.de diff --git a/gdb.spec b/gdb.spec index b17feeb..3f1f1e0 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,7 +1,7 @@ # # spec file for package gdb (Version 6.6) # -# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -21,7 +21,7 @@ Group: Development/Tools/Debuggers Autoreqprov: on PreReq: %{install_info_prereq} Version: 6.6 -Release: 1 +Release: 8 Summary: The GNU Debugger Source: gdb-%{version}.tar.bz2 Patch1: gdb-misc.patch @@ -38,6 +38,7 @@ Patch12: ppc-long-double.diff Patch13: lr-frame-offset.diff Patch14: ppc64-fdesc.diff Patch15: solib-extract-address.diff +Patch16: pc-regnum.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -82,6 +83,7 @@ cd .. %patch13 -p1 %patch14 %patch15 +%patch16 %build CFLAGS="$RPM_OPT_FLAGS" \ @@ -137,6 +139,8 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -n gdb +* Thu Jan 11 2007 - schwab@suse.de +- Fix unchecked use of PC_REGNUM. * Wed Dec 20 2006 - schwab@suse.de - Update to gdb 6.6. * New targets diff --git a/pc-regnum.diff b/pc-regnum.diff new file mode 100644 index 0000000..7a841f4 --- /dev/null +++ b/pc-regnum.diff @@ -0,0 +1,16 @@ +--- gdb/frame.c 11 Jan 2007 17:40:17 +0100 1.218 ++++ gdb/frame.c 11 Jan 2007 17:43:00 +0100 +@@ -1223,8 +1223,11 @@ get_prev_frame_1 (struct frame_info *thi + happen when the prologue analyzer finds a stack adjustment, but + no PC save. This check does assume that the "PC register" is + roughly a traditional PC, even if the gdbarch_unwind_pc method +- frobs it. */ +- if (this_frame->level > 0 ++ frobs it. ++ ++ Skip this check when there is no "PC register". */ ++ if (PC_REGNUM >= 0 ++ && this_frame->level > 0 + && get_frame_type (this_frame) == NORMAL_FRAME + && get_frame_type (this_frame->next) == NORMAL_FRAME) + {