From: Nick Bull <nicholaspbull@gmail.com>
To: gdb@sourceware.org
Subject: Spotting inferior function calls from Python
Date: Fri, 05 Apr 2013 11:49:00 -0000 [thread overview]
Message-ID: <CABbKtXsjFYs6ywFgGcw6SzmiWuM1CgK8=mh8Q5eaR_sUXczfUw@mail.gmail.com> (raw)
Hi,
I would like my Python code to be notified when gdb causes a function to be
run on the inferior outside of the normal program flow. For example, this
could be used to warn the user that any side-effects might change future
program execution.
I can't simply hook the 'call' command because there are many other
commands which could in principle invoke inferior functions, and too many
false positives would be inconvenient.
It looks as though all such function calls happen via
call_function_by_hand. So the simplest approach would be for me to create a
new observer type which is notified in call_function_by_hand, and a
corresponding Python event type. Does that sound sensible?
And is such a patch likely to be accepted for inclusion, assuming all
formatting and copyright assignment requirements are met?
Thanks
Nick Bull
next reply other threads:[~2013-04-05 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 11:49 Nick Bull [this message]
2013-04-09 16:19 ` Doug Evans
2013-04-12 10:39 ` Phil Muldoon
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='CABbKtXsjFYs6ywFgGcw6SzmiWuM1CgK8=mh8Q5eaR_sUXczfUw@mail.gmail.com' \
--to=nicholaspbull@gmail.com \
--cc=gdb@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