From: Simon Marchi <simon.marchi@polymtl.ca>
To: Michael Weghorn <m.weghorn@posteo.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH v5 2/2] gdb: do autoload before notifying Python side in new_objfile event
Date: Mon, 26 Apr 2021 16:44:34 -0400 [thread overview]
Message-ID: <cd9ef8fa-d4be-c34a-8ba2-c0d7680e563d@polymtl.ca> (raw)
In-Reply-To: <6142c4be-ae1d-2536-ebcc-3aad1650c193@posteo.de>
>> +# Make the -gdb.py script available to gdb, it is automatically loaded
> by
>> +# gdb if it is put in the same directory as the library.
>> +set remote_python_autoload_file \
>> + [gdb_remote_download host $python_autoload_file]
>> +
>> +gdb_test_no_output \
>> + "set auto-load safe-path ${remote_python_autoload_file}" \
>> + "set auto-load safe-path"
>> +
>> +# Load the Python file that defines a handler for the new_objfile event,
>> +# which will generate the output to check later
>> +# (prints information on available pretty-printers for objfile).
>
> In v5, the handler no longer generates output (for the good case), so maybe this comment should be changed to something like this:
>
> # Load the Python file that defines a handler for the new_objfile event,
> # which will set a global variable if the pretty-printer is available.
Shortened it to just:
# Load the Python file that defines a handler for the new_objfile event.
I think that's enough details.
>> +set remote_python_event_handler_file\
>> + [gdb_remote_download host $python_event_handler_file]
>> +gdb_test_no_output "source ${remote_python_event_handler_file}" "load python file"
>> +
>> +gdb_load ${binfile}
>> +
>> +gdb_test_no_output "set print pretty on"
>> +
>> +# Check that the handler prints output when test library is loaded
>> +# and that the pretty-printer from the auto-loaded Python file has been
>> +# registered.
>
> Same as for the comment above (no more output generated by the handler). I guess this comment can just be dropped, since there's a separate one for the check below now.
Indeed, did that.
Thanks,
Simon
next prev parent reply other threads:[~2021-04-26 20:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 14:53 [PATCH v5 0/2] Make sure autoload happens " Simon Marchi
2021-04-26 14:53 ` [PATCH v5 1/2] gdbsupport: allow to specify dependencies between observers Simon Marchi
2021-04-26 19:56 ` Michael Weghorn
2021-04-26 22:18 ` Simon Marchi
2021-04-27 8:30 ` Andrew Burgess
2021-04-27 13:34 ` Simon Marchi
2021-04-26 14:53 ` [PATCH v5 2/2] gdb: do autoload before notifying Python side in new_objfile event Simon Marchi
2021-04-26 19:56 ` Michael Weghorn
2021-04-26 20:44 ` Simon Marchi [this message]
2021-04-27 8:39 ` Andrew Burgess
2021-04-27 13:43 ` Simon Marchi
2021-04-27 13:53 ` Simon Marchi
2021-04-29 15:39 ` Vaseeharan Vinayagamoorthy
2021-04-29 19:41 ` Michael Weghorn
2021-04-29 19:47 ` Simon Marchi
2021-04-26 20:05 ` [PATCH v5 0/2] Make sure autoload happens " Michael Weghorn
2021-04-27 15:23 ` Simon Marchi
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=cd9ef8fa-d4be-c34a-8ba2-c0d7680e563d@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=m.weghorn@posteo.de \
/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).