Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Jan Vrany <jan.vrany@labware.com>
Cc: gdb-patches@sourceware.org, tom@tromey.com, Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH v2] gdb/python: add property ranges to gdb.Block object
Date: Thu, 12 Mar 2026 09:15:25 -0600	[thread overview]
Message-ID: <87y0jxrsdu.fsf@tromey.com> (raw)
In-Reply-To: <20260312143344.4147036-3-jan.vrany@labware.com> (Jan Vrany's message of "Thu, 12 Mar 2026 14:33:46 +0000")

>>>>> "Jan" == Jan Vrany <jan.vrany@labware.com> writes:

Jan> +    return Py_BuildValue ("((KK))", block->start (), block->end ());

Jan> +	  gdbpy_ref<> range_obj (Py_BuildValue ("(KK)", ranges[i].start (),
Jan> +						ranges[i].end ()));

I'm sorry I didn't think of this in the last review, but when using
varargs it is up to the caller to ensure that the types are correct.

Also, we apparently still support versions of Python that don't
guarantee "long long" support.  There's some text in python-internal.h
about this, look for "HAVE_LONG_LONG".

So I think this code needs to use GDB_PY_LLU_ARG and have explicit casts
to gdb_py_ulongest.

Or maybe be written in some other way.

Tom

  reply	other threads:[~2026-03-12 15:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 20:18 [PATCH] " Jan Vrany
2026-03-12  6:52 ` Eli Zaretskii
2026-03-12 11:04   ` Jan Vraný
2026-03-12 11:35     ` Eli Zaretskii
2026-03-12 12:35 ` Tom Tromey
2026-03-12 14:33   ` [PATCH v2] " Jan Vrany
2026-03-12 15:15     ` Tom Tromey [this message]
2026-03-13 14:40       ` [PATCH v3] " Jan Vrany
2026-03-19 15:12         ` Tom Tromey

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=87y0jxrsdu.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.vrany@labware.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