diff options
Diffstat (limited to 'share/gdb/python/gdb/function/strfns.py')
-rw-r--r-- | share/gdb/python/gdb/function/strfns.py | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/share/gdb/python/gdb/function/strfns.py b/share/gdb/python/gdb/function/strfns.py index 06a37ad..d29ff61 100644 --- a/share/gdb/python/gdb/function/strfns.py +++ b/share/gdb/python/gdb/function/strfns.py @@ -1,5 +1,5 @@ # Useful gdb string convenience functions. -# Copyright (C) 2012-2016 Free Software Foundation, Inc. +# Copyright (C) 2012-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 @@ -23,12 +23,10 @@ import re class _MemEq(gdb.Function): """$_memeq - compare bytes of memory -Usage: - $_memeq(a, b, len) +Usage: $_memeq (A, B, LEN) Returns: - True if len bytes at a and b compare equally. -""" + True if LEN bytes at A and B compare equally.""" def __init__(self): super(_MemEq, self).__init__("_memeq") @@ -48,12 +46,10 @@ Returns: class _StrLen(gdb.Function): """$_strlen - compute string length -Usage: - $_strlen(a) +Usage: $_strlen (A) Returns: - Length of string a, assumed to be a string in the current language. -""" + Length of string A, assumed to be a string in the current language.""" def __init__(self): super(_StrLen, self).__init__("_strlen") @@ -65,16 +61,14 @@ Returns: class _StrEq(gdb.Function): """$_streq - check string equality -Usage: - $_streq(a, b) +Usage: $_streq (A, B) Returns: - True if a and b are identical strings in the current language. + True if A and B are identical strings in the current language. Example (amd64-linux): catch syscall open - cond $bpnum $_streq((char*) $rdi, "foo") -""" + cond $bpnum $_streq((char*) $rdi, "foo")""" def __init__(self): super(_StrEq, self).__init__("_streq") @@ -85,13 +79,11 @@ Example (amd64-linux): class _RegEx(gdb.Function): """$_regex - check if a string matches a regular expression -Usage: - $_regex(string, regex) +Usage: $_regex (STRING, REGEX) Returns: - True if string str (in the current language) matches the - regular expression regex. -""" + True if string STRING (in the current language) matches the + regular expression REGEX.""" def __init__(self): super(_RegEx, self).__init__("_regex") |