[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb
Subject:    API confusion re: watchpoints
From:       Christian Convey <christian.convey () gmail ! com>
Date:       2016-07-28 17:38:47
Message-ID: CAPfS4Zx+qEy07R7-tgtn+baEan6nQW4vuvJ2XMjk312imuZHRg () mail ! gmail ! com
[Download RAW message or body]

I'm new to gdb's Python API, and I was hoping someone could clarify
watchpoints for me...

Question 1:
I'm defining my own subclass of 'gdb.Breakpoint' (initialized to be a
watchpoint).  I'd like to perform some processing every time its
expression becomes invalid.  I.e., every time gdb would print the
message "Watchpoint n deleted because the program has left the block
in which its expression is valid."

Does the Python API give me a way to run code at those times?

Question 2:
The documentation for 'gdb.Breakpoint.delete()' warns that once that
method is called, it's not valid to call any other method on that
object.  My question is: will gdb ever call that method itself, or
will that method only get called if some user/script explicitly does
it explicitly?

My concern is that if gdb automatically deletes its internal version
of a watchpoint object when the watched expression becomes invalid, I
might find the corresponding gdb.Breakpoint object becoming unusable
without warning.

Thanks,
Christian

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic