Update find command help and search memory docs
This patch updates the `find` command help and docs description to show how to search for not null terminated strings when current language's strings includes it. gdb/ChangeLog: PR gdb/21945 * findcmd.c (_initialize_mem_search): Update find command help text. gdb/doc/ChangeLog: PR gdb/21945 * gdb.texinfo (Search Memory): Update description and example about how to search a string without NULL terminator.
This commit is contained in:
parent
e8e7d10c39
commit
ee9a09e959
4 changed files with 22 additions and 2 deletions
|
@ -293,7 +293,9 @@ and if not specified the size is taken from the type of the expression\n\
|
|||
in the current language.\n\
|
||||
Note that this means for example that in the case of C-like languages\n\
|
||||
a search for an untyped 0x42 will search for \"(int) 0x42\"\n\
|
||||
which is typically four bytes.\n\
|
||||
which is typically four bytes, and a search for a string \"hello\" will\n\
|
||||
include the trailing '\\0'. The null terminator can be removed from\n\
|
||||
searching by using casts, e.g.: {char[5]}\"hello\".\n\
|
||||
\n\
|
||||
The address of the last match is stored as the value of \"$_\".\n\
|
||||
Convenience variable \"$numfound\" is set to the number of matches."),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue