From: Simon Marchi <simon.marchi@polymtl.ca>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/python: allow Value.format_string to return styled output
Date: Tue, 25 Jan 2022 07:56:52 -0500 [thread overview]
Message-ID: <be797da5-f5ad-2cea-c01b-0767cbe6ae1a@polymtl.ca> (raw)
In-Reply-To: <20220125105005.333575-1-aburgess@redhat.com>
LGTM, just two small comments:
> @@ -725,6 +728,7 @@ valpy_format_string (PyObject *self, PyObject *args, PyObject *kw)
> return NULL;
> if (!copy_py_bool_obj (&opts.static_field_print, static_members_obj))
> return NULL;
> + bool styling_p = (styling_obj != nullptr) && PyObject_IsTrue (styling_obj);
Can styling_obj actually be nullptr?
> @@ -1023,9 +1030,16 @@ with_test_prefix "format_string" {
> # Perform C Tests.
> if { [build_inferior "${binfile}" "c"] == 0 } {
> with_test_prefix "lang_c" {
> - set current_lang "c"
> - prepare_gdb "${binfile}"
> - test_all_common
> + save_vars { env(TERM) } {
> + # We run all of these tests in an environment where styling
> + # could work, but we only expect the final call to
> + # test_styling to actuall produce any styled output.
actuall -> actually
Simon
next prev parent reply other threads:[~2022-01-25 12:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 10:50 Andrew Burgess
2022-01-25 12:56 ` Simon Marchi [this message]
2022-01-25 16:07 ` Andrew Burgess
2022-01-25 16:27 ` Simon Marchi
2022-01-25 17:27 ` Andrew Burgess
2022-02-07 10:05 ` Andrew Burgess
2022-02-07 13:25 ` Eli Zaretskii
2022-02-07 17:03 ` Andrew Burgess
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=be797da5-f5ad-2cea-c01b-0767cbe6ae1a@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).