where: |
|
&a[0] | Specifies the start address of the memory address range. |
&a[10] | Specifies the end address of the memory address range. |
“el”, 'l' | Specifies the pattern. |
•Using the start address
find &str[0], +11, "hihi"
&str[0] Specifies the starting address.
+11 | Specifies the length of the memory address range, starting from |
| &str[0]. |
"hihi" | Specifies the pattern (expr1). |
•Using
(gdb) find /1 &int8_search_buf[0], +sizeof(int8_search_buf), 'a', 'a', 'a'
where: |
|
/1 | Specifies the find command to display only |
| one matching pattern. |
&int8_search_buf[0] | Specifies the starting address. |
+sizeof(int8_search_buf) | Specifies the ending address. |
'a', 'a', 'a' | Specifies the pattern (expr1, expr2, |
| expr3). |
•Using
(gdb) find /b &int8_search_buf[0], &int8_search_buf[0]+sizeof(int8_search_buf), 0x61, 0x61, 0x61, 0x61
where: |
|
/b | Specifies that the size of the pattern is 8 bits. |
&int8_search_buf[0] | Specifies the starting address. |
&int8_search_buf[0] | Specifies the ending address. |
+sizeof(int8_search_buf) |
|
0x61, 0x61, 0x61, 0x61 | Specifies the pattern (expr1, expr2, expr3, |
| exp4). |
14.14 Command to Search for a Pattern in the Memory Address Space 199