From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] infcall: Add support for integer literals as reference function paramters
Date: Mon, 20 Oct 2025 12:00:10 -0700 [thread overview]
Message-ID: <e6c1edd9-e9c8-44e0-909e-a7f51b24f6a8@redhat.com> (raw)
In-Reply-To: <87zf9ppoq7.fsf@tromey.com>
Hi, Tom,
On 10/17/25 7:49 AM, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
>
> Keith> This patch attempts to mitigate the shortcomings of passing literals
> Keith> to inferior function calls requiring references. The specific use case here
> Keith> is std::map's operator[]:
>
> Keith> (gdb) print int_map[1]
> Keith> Attempt to take address of value not located in memory.
>
> I didn't see in the text or the patch what the method type really is.
I believe I have addressed this in upcoming v2.
> Keith> +#include <map>
> Keith> +#include <string>
>
> It's better for tests not to use libstdc++ stuff if possible, and to
> just write out a method with the problem signature in a locally-defined
> type.
Gotcha. I have removed all the offending libstdc++ classes and rewritten
using just basic function/method calls.
> Keith> -if {[build_executable $testfile.exp $testfile $srcfile {debug c++}] == -1} {
> Keith> +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
>
> This results in starting an extra gdb that is immediately exited.
Reverted.
Thank you for the review.
Keith
next prev parent reply other threads:[~2025-10-20 19:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 15:48 Keith Seitz
2025-10-17 14:49 ` Tom Tromey
2025-10-20 19:00 ` Keith Seitz [this message]
2025-10-20 19:36 ` [PATCH v2] " Keith Seitz
2025-10-21 20:19 ` Tom Tromey
2025-10-22 12:05 ` Andrew Burgess
2025-10-22 13:21 ` Tom Tromey
2026-01-22 19:05 ` Keith Seitz
2026-01-23 14:07 ` Aktemur, Tankut Baris
2026-01-27 18:43 ` Keith Seitz
2026-01-27 19:01 ` [PATCH v4] " Keith Seitz
2026-01-28 8:24 ` Aktemur, Tankut Baris
2026-01-28 13:54 ` Andrew Burgess
2026-02-02 17:05 ` Aktemur, Tankut Baris
2026-02-02 17:21 ` Keith Seitz
2026-01-30 20:59 ` Tom Tromey
2026-02-02 16:58 ` Keith Seitz
2026-02-02 17:22 ` Aktemur, Tankut Baris
2026-02-12 16:31 ` Tom Tromey
2026-03-12 14:14 ` [PATCH v5] infcall: Add support for integer literals as reference function parameters Keith Seitz
2026-03-12 16:23 ` Tom de Vries
2026-03-12 16:45 ` Keith Seitz
2026-03-12 17:12 ` [PATCH v6] " Keith Seitz
2026-03-17 14:10 ` Andrew Burgess
2026-03-17 18:11 ` Keith Seitz
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=e6c1edd9-e9c8-44e0-909e-a7f51b24f6a8@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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