public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Fix gdb-vla-intel-fortran-vla-strings.patch to no longer modify cached
Date: Sun, 28 Jun 2026 00:00:12 GMT [thread overview]
Message-ID: <178260481253.1.2642677793743759866.rpms-gdb-0ba7f47499a5@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 0ba7f47499a54e77ec4180361c171e269b596c0b
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date : 2021-03-04T20:45:01+01:00
Stats : +26/-13 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/0ba7f47499a54e77ec4180361c171e269b596c0b?branch=gdb-17.2-rebase-f44
Log:
Fix gdb-vla-intel-fortran-vla-strings.patch to no longer modify cached
inferior types.
---
diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch
index 208671a..2c925ec 100644
--- a/gdb-vla-intel-fortran-vla-strings.patch
+++ b/gdb-vla-intel-fortran-vla-strings.patch
@@ -45,7 +45,7 @@ diff --git a/gdb/NEWS b/gdb/NEWS
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
-@@ -572,6 +572,24 @@ c_value_print (struct value *val, struct ui_file *stream,
+@@ -572,6 +572,27 @@ c_value_print (struct value *val, struct ui_file *stream,
else
{
/* normal case */
@@ -58,9 +58,12 @@ diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
+ pointer is associated. */
+ if ((addr != 0)
+ && (0 == type_not_associated (type)))
++ {
++ type = copy_type (type);
+ TYPE_TARGET_TYPE (type) =
+ resolve_dynamic_type (TYPE_TARGET_TYPE (type),
+ {}, addr);
++ }
+ }
+ else
+ {
@@ -915,7 +918,7 @@ new file mode 100644
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
-@@ -565,6 +565,21 @@ whatis_exp (const char *exp, int show)
+@@ -565,6 +565,24 @@ whatis_exp (const char *exp, int show)
printf_filtered (" */\n");
}
@@ -930,8 +933,11 @@ diff --git a/gdb/typeprint.c b/gdb/typeprint.c
+
+ if (addr != 0
+ && type_not_associated (type) == 0)
-+ TYPE_TARGET_TYPE (type) = resolve_dynamic_type (TYPE_TARGET_TYPE (type),
-+ {}, addr);
++ {
++ type = copy_type (type);
++ TYPE_TARGET_TYPE (type) = resolve_dynamic_type (TYPE_TARGET_TYPE (type),
++ {}, addr);
++ }
+ }
+
LA_PRINT_TYPE (type, "", gdb_stdout, show, 0, &flags);
@@ -940,23 +946,26 @@ diff --git a/gdb/typeprint.c b/gdb/typeprint.c
diff --git a/gdb/valops.c b/gdb/valops.c
--- a/gdb/valops.c
+++ b/gdb/valops.c
-@@ -1553,6 +1553,15 @@ value_ind (struct value *arg1)
- if (base_type->code () == TYPE_CODE_PTR)
+@@ -1554,6 +1554,18 @@ value_ind (struct value *arg1)
{
struct type *enc_type;
-+
+
+ if (type_not_associated (base_type))
+ error (_("Attempt to take contents of a not associated pointer."));
+
+ CORE_ADDR addr = value_as_address (arg1);
+
-+ if (addr != 0)
-+ TYPE_TARGET_TYPE (base_type) =
-+ resolve_dynamic_type (TYPE_TARGET_TYPE (base_type), {}, addr);
-
++ if (addr != 0 && is_dynamic_type (base_type))
++ {
++ base_type = copy_type (base_type);
++ TYPE_TARGET_TYPE (base_type) =
++ resolve_dynamic_type (TYPE_TARGET_TYPE (base_type), {}, addr);
++ }
++
/* We may be pointing to something embedded in a larger object.
Get the real type of the enclosing object. */
-@@ -1570,8 +1583,7 @@ value_ind (struct value *arg1)
+ enc_type = check_typedef (value_enclosing_type (arg1));
+@@ -1570,8 +1582,7 @@ value_ind (struct value *arg1)
else
{
/* Retrieve the enclosing object pointed to. */
diff --git a/gdb.spec b/gdb.spec
index 95eeca6..dbde015 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -37,7 +37,7 @@ Version: 10.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.
-Release: 11%{?dist}
+Release: 12%{?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
# Do not provide URL for snapshots as the file lasts there only for 2 days.
@@ -1195,6 +1195,10 @@ fi
%endif
%changelog
+* Thu Mar 4 2021 Jan Kratochvil <jan.kratochvil@redhat.com> - 10.1-12
+- Fix gdb-vla-intel-fortran-vla-strings.patch to no longer modify cached
+ inferior types.
+
* Thu Mar 4 2021 Jan Kratochvil <jan.kratochvil@redhat.com> - 10.1-11
- Align gdb-vla-intel-fortran-vla-strings.patch more to upstream
fixing whitespaces in Fortran types printing.
reply other threads:[~2026-06-28 0:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178260481253.1.2642677793743759866.rpms-gdb-0ba7f47499a5@fedoraproject.org \
--to=jan.kratochvil@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox