]> git.pld-linux.org Git - packages/gdb.git/blobdiff - gdb-vla-intel-stringbt-fix.patch
switch to python3
[packages/gdb.git] / gdb-vla-intel-stringbt-fix.patch
index f6197f25cc81f24715bbc9df5941c796274fc809..aedc7b12c8a28e2e7d3221f5187cae050fe569f0 100644 (file)
@@ -1,10 +1,11 @@
-http://sourceware.org/ml/gdb-patches/2014-08/msg00025.html
-Subject: [patch 1/2] Re: Crash regression(?) printing Fortran strings in bt  [Re: [V2 00/23] Fortran dynamic array support]
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Jan Kratochvil <jan.kratochvil@redhat.com>
+Date: Fri, 1 Aug 2014 23:02:17 +0200
+Subject: gdb-vla-intel-stringbt-fix.patch
 
+;;=push+jan
 
---FCuugMFkClbJLl1L
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: inline
+http://sourceware.org/ml/gdb-patches/2014-08/msg00025.html
 
 On Fri, 01 Aug 2014 09:20:19 +0200, Keven Boell wrote:
 > I just tried it on Fedora 20 i686.  Applied the patch, you mentioned, on top of
@@ -23,38 +24,37 @@ so that there is no longer needed the patch:
 The fix below has no regressions for me.  Unfortunately I do not see why you
 cannot reproduce it.
 
-
 Thanks,
 Jan
 
---FCuugMFkClbJLl1L
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: inline; filename="vlastringonly.patch"
-
-Index: gdb-7.9.50.20150520/gdb/gdbtypes.c
-===================================================================
---- gdb-7.9.50.20150520.orig/gdb/gdbtypes.c    2015-05-31 16:14:04.164533833 +0200
-+++ gdb-7.9.50.20150520/gdb/gdbtypes.c 2015-05-31 16:14:05.844545344 +0200
-@@ -1851,6 +1851,7 @@ is_dynamic_type_internal (struct type *t
-       }
+diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
+--- a/gdb/dwarf2loc.c
++++ b/gdb/dwarf2loc.c
+@@ -2154,6 +2154,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
+   ctx.per_cu = per_cu;
+   ctx.obj_address = 0;
  
-     case TYPE_CODE_ARRAY:
-+    case TYPE_CODE_STRING:
-       {
-       gdb_assert (TYPE_NFIELDS (type) == 1);
-@@ -2192,6 +2193,7 @@ resolve_dynamic_type_internal (struct ty
-         }
-       case TYPE_CODE_ARRAY:
-+      case TYPE_CODE_STRING:
-         resolved_type = resolve_dynamic_array (type, addr_stack);
-         break;
++frame_id old_frame_id (get_frame_id (deprecated_safe_get_selected_frame ()));
++class RestoreCall {
++private:
++  const std::function<void ()> func;
++public:
++  RestoreCall(std::function<void ()> func_):func(func_) {}
++  ~RestoreCall() { func(); }
++} restore_frame([=]() {
++  frame_info *old_frame (frame_find_by_id (old_frame_id));
++  if (old_frame != NULL)
++    select_frame (old_frame);
++});
++if (frame != NULL) select_frame (frame);
++
+   scoped_value_mark free_values;
  
-Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2015-05-31 16:14:05.844545344 +0200
+   ctx.gdbarch = get_objfile_arch (objfile);
+diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
+new file mode 100644
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
 @@ -0,0 +1,24 @@
 +! Copyright 2010 Free Software Foundation, Inc.
 +!
@@ -80,10 +80,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f9
 +  real :: dummy
 +  dummy = 1
 +end subroutine bar
-Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp      2015-05-31 16:14:05.845545351 +0200
+diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
+new file mode 100644
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
 @@ -0,0 +1,39 @@
 +# Copyright 2010 Free Software Foundation, Inc.
 +
@@ -124,10 +124,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
 +}
 +
 +gdb_test "bt" {foo \(string='hello'.*}
-Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90      2015-05-31 16:14:05.845545351 +0200
+diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
+new file mode 100644
+--- /dev/null
++++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
 @@ -0,0 +1,36 @@
 +! Copyright 2010 Free Software Foundation, Inc.
 +!
This page took 0.054477 seconds and 4 git commands to generate.