1.1 --- a/patches/gdb/6.8/130-reg-no-longer-active.patch Fri Sep 09 15:48:59 2011 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,30 +0,0 @@
1.4 -Fix bug reported by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
1.5 -See: http://sourceware.org/ml/crossgcc/2009-05/msg00055.html
1.6 - https://bugzilla.redhat.com/show_bug.cgi?id=436037
1.7 -
1.8 -Fix from: http://cvs.fedoraproject.org/viewvc/devel/gdb/gdb-6.8-bz436037-reg-no-longer-active.patch?revision=1.1
1.9 -
1.10 -diff -d -urpN src.0/gdb/valops.c src.1/gdb/valops.c
1.11 ---- src.0/gdb/valops.c 2008-07-27 04:00:03.000000000 +0200
1.12 -+++ src.1/gdb/valops.c 2008-07-31 15:17:42.000000000 +0200
1.13 -@@ -813,10 +813,18 @@ value_assign (struct value *toval, struc
1.14 - struct frame_info *frame;
1.15 - int value_reg;
1.16 -
1.17 -- /* Figure out which frame this is in currently. */
1.18 -- frame = frame_find_by_id (VALUE_FRAME_ID (toval));
1.19 - value_reg = VALUE_REGNUM (toval);
1.20 -
1.21 -+ /* Figure out which frame this is in currently. */
1.22 -+ frame = frame_find_by_id (VALUE_FRAME_ID (toval));
1.23 -+ /* "set $reg+=1" should work on programs with no debug info,
1.24 -+ but frame_find_by_id returns NULL here (RH bug 436037).
1.25 -+ Use current frame, it represents CPU state in this case.
1.26 -+ If frame_find_by_id is changed to do it internally
1.27 -+ (it is contemplated there), remove this. */
1.28 -+ if (!frame)
1.29 -+ frame = get_current_frame ();
1.30 -+ /* Probably never happens. */
1.31 - if (!frame)
1.32 - error (_("Value being assigned to is no longer active."));
1.33 -