summaryrefslogtreecommitdiff
path: root/packages/gdb/6.8a/130-reg-no-longer-active.patch
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-07-13 07:38:03 (GMT)
committerGitHub <noreply@github.com>2017-07-13 07:38:03 (GMT)
commit45c5bb0f484cba724be2c6105801dcce9a1a82d9 (patch)
tree8fd1c8eaa2ef203009d72b6ca6348611dcc5ee1c /packages/gdb/6.8a/130-reg-no-longer-active.patch
parent8f8e131d566af1f577d8fb6e62e6f121b7955472 (diff)
parentb32fcf7c1eea890a2bd3f88487f818ba241aabb1 (diff)
Merge pull request #767 from stilor/packages
Packages
Diffstat (limited to 'packages/gdb/6.8a/130-reg-no-longer-active.patch')
-rw-r--r--packages/gdb/6.8a/130-reg-no-longer-active.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/gdb/6.8a/130-reg-no-longer-active.patch b/packages/gdb/6.8a/130-reg-no-longer-active.patch
new file mode 100644
index 0000000..1c7e7e0
--- /dev/null
+++ b/packages/gdb/6.8a/130-reg-no-longer-active.patch
@@ -0,0 +1,30 @@
+Fix bug reported by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
+See: http://sourceware.org/ml/crossgcc/2009-05/msg00055.html
+ https://bugzilla.redhat.com/show_bug.cgi?id=436037
+
+Fix from: http://cvs.fedoraproject.org/viewvc/devel/gdb/gdb-6.8-bz436037-reg-no-longer-active.patch?revision=1.1
+
+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.1/gdb/valops.c 2008-07-31 15:17:42.000000000 +0200
+@@ -813,10 +813,18 @@ value_assign (struct value *toval, struc
+ struct frame_info *frame;
+ int value_reg;
+
+- /* Figure out which frame this is in currently. */
+- frame = frame_find_by_id (VALUE_FRAME_ID (toval));
+ value_reg = VALUE_REGNUM (toval);
+
++ /* Figure out which frame this is in currently. */
++ frame = frame_find_by_id (VALUE_FRAME_ID (toval));
++ /* "set $reg+=1" should work on programs with no debug info,
++ but frame_find_by_id returns NULL here (RH bug 436037).
++ Use current frame, it represents CPU state in this case.
++ If frame_find_by_id is changed to do it internally
++ (it is contemplated there), remove this. */
++ if (!frame)
++ frame = get_current_frame ();
++ /* Probably never happens. */
+ if (!frame)
+ error (_("Value being assigned to is no longer active."));
+