forked from bminor/binutils-gdb
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add negative repeat count to 'x' command
This change adds support for specifying a negative repeat count to all the formats of the 'x' command to examine memory backward. A new testcase 'examine-backward' is added to cover this new feature. Here's the example output from the new feature: <format 'i'> (gdb) bt #0 Func1 (n=42, p=0x40432e "hogehoge") at main.cpp:5 #1 0x00000000004041fa in main (argc=1, argv=0x7fffffffdff8) at main.cpp:19 (gdb) x/-4i 0x4041fa 0x4041e5 <main(int, char**)+11>: mov %rsi,-0x10(%rbp) 0x4041e9 <main(int, char**)+15>: lea 0x13e(%rip),%rsi 0x4041f0 <main(int, char**)+22>: mov $0x2a,%edi 0x4041f5 <main(int, char**)+27>: callq 0x404147 <format 'x'> (gdb) x/-4xw 0x404200 0x4041f0 <main(int, char**)+22>: 0x00002abf 0xff4de800 0x76e8ffff 0xb8ffffff (gdb) x/-4 0x4041e0 <main(int, char**)+6>: 0x7d8910ec 0x758948fc 0x358d48f0 0x0000013e gdb/ChangeLog: * NEWS: Mention that GDB now supports a negative repeat count in the 'x' command. * printcmd.c (decode_format): Allow '-' in the parameter "string_ptr" to accept a negative repeat count. (find_instruction_backward): New function. (read_memory_backward): New function. (integer_is_zero): New function. (find_string_backward): New function. (do_examine): Use new functions to examine memory backward. (_initialize_printcmd): Mention that 'x' command supports a negative repeat count. gdb/doc/ChangeLog: * gdb.texinfo (Examining Memory): Document negative repeat count in the 'x' command. gdb/testsuite/ChangeLog: * gdb.base/examine-backward.c: New file. * gdb.base/examine-backward.exp: New file.
- Loading branch information
Showing
8 changed files
with
741 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
2016-06-09 Toshihito Kikuchi <[email protected]> | ||
|
||
* NEWS: Mention that GDB now supports a negative repeat count in | ||
the 'x' command. | ||
* printcmd.c (decode_format): Allow '-' in the parameter | ||
"string_ptr" to accept a negative repeat count. | ||
(find_instruction_backward): New function. | ||
(read_memory_backward): New function. | ||
(integer_is_zero): New function. | ||
(find_string_backward): New function. | ||
(do_examine): Use new functions to examine memory backward. | ||
(_initialize_printcmd): Mention that 'x' command supports a negative | ||
repeat count. | ||
|
||
2016-06-09 Toshihito Kikuchi <[email protected]> | ||
|
||
* MAINTAINERS (Write After Approval): Add Toshihito Kikuchi. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
2016-06-09 Toshihito Kikuchi <[email protected]> | ||
|
||
* gdb.texinfo (Examining Memory): Document negative repeat | ||
count in the 'x' command. | ||
|
||
2016-06-06 Simon Marchi <[email protected]> | ||
|
||
* gdb.texinfo (GDB/MI Async Records): Document method and | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
2016-06-09 Toshihito Kikuchi <[email protected]> | ||
|
||
* gdb.base/examine-backward.c: New file. | ||
* gdb.base/examine-backward.exp: New file. | ||
|
||
2016-06-06 Simon Marchi <[email protected]> | ||
|
||
* gdb.mi/mi-record-changed.exp: Adjust =record-started output | ||
|
Oops, something went wrong.