summaryrefslogtreecommitdiff
path: root/share/gdb/python/gdb/function/caller_is.py
diff options
context:
space:
mode:
Diffstat (limited to 'share/gdb/python/gdb/function/caller_is.py')
-rw-r--r--share/gdb/python/gdb/function/caller_is.py42
1 files changed, 17 insertions, 25 deletions
diff --git a/share/gdb/python/gdb/function/caller_is.py b/share/gdb/python/gdb/function/caller_is.py
index 5b89191..27f30dc 100644
--- a/share/gdb/python/gdb/function/caller_is.py
+++ b/share/gdb/python/gdb/function/caller_is.py
@@ -1,5 +1,5 @@
# Caller-is functions.
-# Copyright (C) 2008-2016 Free Software Foundation, Inc.
+# Copyright (C) 2008-2019 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,21 +20,19 @@ import re
class CallerIs(gdb.Function):
"""Check the calling function's name.
-Usage:
- $_caller_is(name [, number_of_frames])
+Usage: $_caller_is (NAME [, NUMBER-OF-FRAMES])
Arguments:
- name: The name of the function to search for.
+ NAME: The name of the function to search for.
- number_of_frames: How many stack frames to traverse back from the currently
+ NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently
selected frame to compare with. If the value is greater than the depth of
the stack from that point then the result is False.
The default is 1.
Returns:
- True if the function's name at the specified frame is equal to name.
-"""
+ True if the function's name at the specified frame is equal to NAME."""
def __init__(self):
super(CallerIs, self).__init__("_caller_is")
@@ -53,21 +51,19 @@ Returns:
class CallerMatches(gdb.Function):
"""Compare the calling function's name with a regexp.
-Usage:
- $_caller_matches(regex [, number_of_frames])
+Usage: $_caller_matches (REGEX [, NUMBER-OF-FRAMES])
Arguments:
- regex: The regular expression to compare the function's name with.
+ REGEX: The regular expression to compare the function's name with.
- number_of_frames: How many stack frames to traverse back from the currently
+ NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently
selected frame to compare with. If the value is greater than the depth of
the stack from that point then the result is False.
The default is 1.
Returns:
- True if the function's name at the specified frame matches regex.
-"""
+ True if the function's name at the specified frame matches REGEX."""
def __init__(self):
super(CallerMatches, self).__init__("_caller_matches")
@@ -86,21 +82,19 @@ Returns:
class AnyCallerIs(gdb.Function):
"""Check all calling function's names.
-Usage:
- $_any_caller_is(name [, number_of_frames])
+Usage: $_any_caller_is (NAME [, NUMBER-OF-FRAMES])
Arguments:
- name: The name of the function to search for.
+ NAME: The name of the function to search for.
- number_of_frames: How many stack frames to traverse back from the currently
+ NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently
selected frame to compare with. If the value is greater than the depth of
the stack from that point then the result is False.
The default is 1.
Returns:
- True if any function's name is equal to name.
-"""
+ True if any function's name is equal to NAME."""
def __init__(self):
super(AnyCallerIs, self).__init__("_any_caller_is")
@@ -121,21 +115,19 @@ Returns:
class AnyCallerMatches(gdb.Function):
"""Compare all calling function's names with a regexp.
-Usage:
- $_any_caller_matches(regex [, number_of_frames])
+Usage: $_any_caller_matches (REGEX [, NUMBER-OF-FRAMES])
Arguments:
- regex: The regular expression to compare the function's name with.
+ REGEX: The regular expression to compare the function's name with.
- number_of_frames: How many stack frames to traverse back from the currently
+ NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently
selected frame to compare with. If the value is greater than the depth of
the stack from that point then the result is False.
The default is 1.
Returns:
- True if any function's name matches regex.
-"""
+ True if any function's name matches REGEX."""
def __init__(self):
super(AnyCallerMatches, self).__init__("_any_caller_matches")