mirror of
https://github.com/apache/httpd.git
synced 2025-08-16 17:04:42 +00:00
* Create helper function isValidAddress to determine if an address is valid [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
21
.gdbinit
21
.gdbinit
@ -592,6 +592,27 @@ document dump_pool_and_children
|
||||
Dump the whole pool hierarchy starting from the given pool.
|
||||
end
|
||||
|
||||
python
|
||||
|
||||
class isValidAddress (gdb.Function):
|
||||
"""Determines if the argument is a valid address."""
|
||||
|
||||
def __init__(self):
|
||||
super(isValidAddress, self).__init__("isValidAddress")
|
||||
|
||||
def invoke(self, address):
|
||||
inf = gdb.inferiors()[0]
|
||||
result = 1
|
||||
try:
|
||||
inf.read_memory(address, 8)
|
||||
except:
|
||||
result = 0
|
||||
return result
|
||||
|
||||
isValidAddress()
|
||||
|
||||
end
|
||||
|
||||
# Set sane defaults for common signals:
|
||||
handle SIGPIPE noprint pass nostop
|
||||
handle SIGUSR1 print pass nostop
|
||||
|
Reference in New Issue
Block a user