1 diff -d -urpN src.0/gdb/valops.c src.1/gdb/valops.c
2 --- src.0/gdb/valops.c 2008-07-27 04:00:03.000000000 +0200
3 +++ src.1/gdb/valops.c 2008-07-31 15:17:42.000000000 +0200
4 @@ -813,10 +813,18 @@ value_assign (struct value *toval, struc
5 struct frame_info *frame;
8 - /* Figure out which frame this is in currently. */
9 - frame = frame_find_by_id (VALUE_FRAME_ID (toval));
10 value_reg = VALUE_REGNUM (toval);
12 + /* Figure out which frame this is in currently. */
13 + frame = frame_find_by_id (VALUE_FRAME_ID (toval));
14 + /* "set $reg+=1" should work on programs with no debug info,
15 + but frame_find_by_id returns NULL here (RH bug 436037).
16 + Use current frame, it represents CPU state in this case.
17 + If frame_find_by_id is changed to do it internally
18 + (it is contemplated there), remove this. */
20 + frame = get_current_frame ();
21 + /* Probably never happens. */
23 error (_("Value being assigned to is no longer active."));