]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - gdb/patches/gdb-6.8-bz436037-reg-no-longer-active.patch
Merge remote-tracking branch 'stevee/audit'
[people/ms/ipfire-3.x.git] / gdb / patches / gdb-6.8-bz436037-reg-no-longer-active.patch
1 Index: gdb-6.8.50.20090803/gdb/valops.c
2 ===================================================================
3 --- gdb-6.8.50.20090803.orig/gdb/valops.c 2009-08-04 06:30:45.000000000 +0200
4 +++ gdb-6.8.50.20090803/gdb/valops.c 2009-08-04 06:33:05.000000000 +0200
5 @@ -926,10 +926,18 @@ value_assign (struct value *toval, struc
6 struct gdbarch *gdbarch;
7 int value_reg;
8
9 - /* Figure out which frame this is in currently. */
10 - frame = frame_find_by_id (VALUE_FRAME_ID (toval));
11 value_reg = VALUE_REGNUM (toval);
12
13 + /* Figure out which frame this is in currently. */
14 + frame = frame_find_by_id (VALUE_FRAME_ID (toval));
15 + /* "set $reg+=1" should work on programs with no debug info,
16 + but frame_find_by_id returns NULL here (RH bug 436037).
17 + Use current frame, it represents CPU state in this case.
18 + If frame_find_by_id is changed to do it internally
19 + (it is contemplated there), remove this. */
20 + if (!frame)
21 + frame = get_current_frame ();
22 + /* Probably never happens. */
23 if (!frame)
24 error (_("Value being assigned to is no longer active."));
25