Fix gdb-vla-intel-fortran-vla-strings.patch for compatiblity with GraalVM.
This commit is contained in:
parent
23564f9afb
commit
a1361a0b59
@ -45,18 +45,14 @@ diff --git a/gdb/NEWS b/gdb/NEWS
|
|||||||
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
|
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
|
||||||
--- a/gdb/c-valprint.c
|
--- a/gdb/c-valprint.c
|
||||||
+++ b/gdb/c-valprint.c
|
+++ b/gdb/c-valprint.c
|
||||||
@@ -572,6 +572,28 @@ c_value_print (struct value *val, struct ui_file *stream,
|
@@ -572,6 +572,24 @@ c_value_print (struct value *val, struct ui_file *stream,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* normal case */
|
/* normal case */
|
||||||
+ if (type->code () == TYPE_CODE_PTR
|
+ if (type->code () == TYPE_CODE_PTR
|
||||||
+ && 1 == is_dynamic_type (type))
|
+ && 1 == is_dynamic_type (type))
|
||||||
+ {
|
+ {
|
||||||
+ CORE_ADDR addr;
|
+ CORE_ADDR addr = value_as_address (val);
|
||||||
+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE (type)))
|
|
||||||
+ addr = value_address (val);
|
|
||||||
+ else
|
|
||||||
+ addr = value_as_address (val);
|
|
||||||
+
|
+
|
||||||
+ /* We resolve the target-type only when the
|
+ /* We resolve the target-type only when the
|
||||||
+ pointer is associated. */
|
+ pointer is associated. */
|
||||||
@ -1009,7 +1005,7 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran
|
|||||||
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
|
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
|
||||||
--- a/gdb/typeprint.c
|
--- a/gdb/typeprint.c
|
||||||
+++ b/gdb/typeprint.c
|
+++ b/gdb/typeprint.c
|
||||||
@@ -565,6 +565,25 @@ whatis_exp (const char *exp, int show)
|
@@ -565,6 +565,21 @@ whatis_exp (const char *exp, int show)
|
||||||
printf_filtered (" */\n");
|
printf_filtered (" */\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1020,11 +1016,7 @@ diff --git a/gdb/typeprint.c b/gdb/typeprint.c
|
|||||||
+ if (type->code () == TYPE_CODE_PTR
|
+ if (type->code () == TYPE_CODE_PTR
|
||||||
+ && is_dynamic_type (type) == 1)
|
+ && is_dynamic_type (type) == 1)
|
||||||
+ {
|
+ {
|
||||||
+ CORE_ADDR addr;
|
+ CORE_ADDR addr = value_as_address (val);
|
||||||
+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE(type)))
|
|
||||||
+ addr = value_address (val);
|
|
||||||
+ else
|
|
||||||
+ addr = value_as_address (val);
|
|
||||||
+
|
+
|
||||||
+ if (addr != 0
|
+ if (addr != 0
|
||||||
+ && type_not_associated (type) == 0)
|
+ && type_not_associated (type) == 0)
|
||||||
@ -1038,19 +1030,15 @@ diff --git a/gdb/typeprint.c b/gdb/typeprint.c
|
|||||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||||
--- a/gdb/valops.c
|
--- a/gdb/valops.c
|
||||||
+++ b/gdb/valops.c
|
+++ b/gdb/valops.c
|
||||||
@@ -1553,6 +1553,19 @@ value_ind (struct value *arg1)
|
@@ -1553,6 +1553,15 @@ value_ind (struct value *arg1)
|
||||||
if (base_type->code () == TYPE_CODE_PTR)
|
if (base_type->code () == TYPE_CODE_PTR)
|
||||||
{
|
{
|
||||||
struct type *enc_type;
|
struct type *enc_type;
|
||||||
+ CORE_ADDR addr;
|
|
||||||
+
|
+
|
||||||
+ if (type_not_associated (base_type))
|
+ if (type_not_associated (base_type))
|
||||||
+ error (_("Attempt to take contents of a not associated pointer."));
|
+ error (_("Attempt to take contents of a not associated pointer."));
|
||||||
+
|
+
|
||||||
+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE (base_type)))
|
+ CORE_ADDR addr = value_as_address (arg1);
|
||||||
+ addr = value_address (arg1);
|
|
||||||
+ else
|
|
||||||
+ addr = value_as_address (arg1);
|
|
||||||
+
|
+
|
||||||
+ if (addr != 0)
|
+ if (addr != 0)
|
||||||
+ TYPE_TARGET_TYPE (base_type) =
|
+ TYPE_TARGET_TYPE (base_type) =
|
||||||
|
5
gdb.spec
5
gdb.spec
@ -37,7 +37,7 @@ Version: 10.1
|
|||||||
|
|
||||||
# The release always contains a leading reserved number, start it at 1.
|
# The release always contains a leading reserved number, start it at 1.
|
||||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
|
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
|
||||||
# Do not provide URL for snapshots as the file lasts there only for 2 days.
|
# Do not provide URL for snapshots as the file lasts there only for 2 days.
|
||||||
@ -1195,6 +1195,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 19 2021 Jan Kratochvil <jan.kratochvil@redhat.com> - 10.1-8
|
||||||
|
- Fix gdb-vla-intel-fortran-vla-strings.patch for compatiblity with GraalVM.
|
||||||
|
|
||||||
* Thu Feb 18 2021 Kevin Buettner <kevinb@redhat.com> - 10.1-7
|
* Thu Feb 18 2021 Kevin Buettner <kevinb@redhat.com> - 10.1-7
|
||||||
- Fix gnulib related build problem (RHBZ 1930528, Kevin Buettner).
|
- Fix gnulib related build problem (RHBZ 1930528, Kevin Buettner).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user