OpenCores
URL https://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [trunk/] [Patches/] [GDB6.8/] [gdb-6.8-bz436037-reg-no-longer-active.patch] - Blame information for rev 51

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 51 nyawn
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;
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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.