]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-6.8-bz436037-reg-no-longer-active.patch
- obsolete file
[packages/gdb.git] / gdb-6.8-bz436037-reg-no-longer-active.patch
CommitLineData
3a58abaf
AM
1diff -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;
6 int value_reg;
7
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);
11
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. */
19+ if (!frame)
20+ frame = get_current_frame ();
21+ /* Probably never happens. */
22 if (!frame)
23 error (_("Value being assigned to is no longer active."));
24
This page took 0.025543 seconds and 4 git commands to generate.