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

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [tags/] [ADS_RELEASE_1_1_0/] [Software/] [adv_jtag_bridge/] [gdb-6.8-bz436037-reg-no-longer-active.patch] - Diff between revs 8 and 19

Only display areas with differences | Details | Blame | View Log

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

powered by: WebSVN 2.1.0

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