From: Tom Tromey <tromey@redhat.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [patch] Add solib_address and decode_line Python functionality
Date: Thu, 29 Jul 2010 20:39:00 -0000 [thread overview]
Message-ID: <m3fwz2ja5v.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4C5015E2.4000205@redhat.com> (Phil Muldoon's message of "Wed, 28 Jul 2010 12:34:58 +0100")
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> +static PyObject *
Phil> +gdbpy_solib_name (PyObject *self, PyObject *args)
Phil> +{
Phil> + unsigned long long pc;
I don't think it is ok to use 'long long'.
Maybe you can use `unsigned PY_LONG_LONG', but see the Python API
manual; it seems that is not always available. If it is not available
then I think this function could probably revert to 'unsigned long' and
the 'k' format.
Phil> + TRY_CATCH (except, RETURN_MASK_ALL)
Phil> + {
Phil> + if (arg)
Phil> + {
Phil> + char *copy;
Phil> +
Phil> + arg = strdup (arg);
Needs xstrdup and a cleanup.
I think we may want this function to also return the unparsed part of
the argument string. For example we could return a tuple whose first
element is a string and whose second element is the return value as in
this patch.
Tom
next prev parent reply other threads:[~2010-07-29 20:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-19 15:43 Phil Muldoon
2010-07-27 16:26 ` Joel Brobecker
2010-07-28 11:35 ` Phil Muldoon
2010-07-28 17:39 ` Joel Brobecker
2010-07-28 17:48 ` Eli Zaretskii
2010-07-29 20:39 ` Tom Tromey [this message]
2010-08-06 13:55 ` Phil Muldoon
2010-08-06 15:36 ` Eli Zaretskii
2010-08-06 22:39 ` Tom Tromey
2010-08-10 11:17 ` Phil Muldoon
2010-08-10 17:07 ` Eli Zaretskii
2010-08-10 18:24 ` Tom Tromey
2010-08-11 13:16 ` Phil Muldoon
2010-08-13 14:07 ` Ken Werner
2010-08-13 14:14 ` Phil Muldoon
2010-08-13 15:48 ` Tom Tromey
2010-08-13 16:22 ` Ken Werner
2010-08-18 23:55 ` Pedro Alves
2010-08-19 16:32 ` Tom Tromey
2010-08-19 17:04 ` Pedro Alves
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=m3fwz2ja5v.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).