Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Spotting inferior function calls from Python
@ 2013-04-05 11:49 Nick Bull
  2013-04-09 16:19 ` Doug Evans
  2013-04-12 10:39 ` Phil Muldoon
  0 siblings, 2 replies; 3+ messages in thread
From: Nick Bull @ 2013-04-05 11:49 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-12 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-05 11:49 Spotting inferior function calls from Python Nick Bull
2013-04-09 16:19 ` Doug Evans
2013-04-12 10:39 ` Phil Muldoon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox