This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH, v3] Add command to erase all flash memory regions
On 01/19/2017 09:28 AM, Pedro Alves wrote:
2017-01-17 Mike Wrighton <email@example.com>
Luis Machado <firstname.lastname@example.org>
* NEWS (New commands): Mention flash-erase.
(New MI commands): Mention target-flash-erase.
* mi/mi-cmds.c (mi_cmd_target_flash_erase): Added target-flash-erase MI
* mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
* mi/mi-main.c (mi_cmd_target_flash_erase): New function.
* target.c (flash_erase_command): New function.
(initialize_targets): Add new flash-erase command.
* target.h (flash_erase_command): New declaration.
+ current_uiout->message (", size = ");
+ current_uiout->field_fmt ("size", "0x%s", phex (m->hi - m->lo, 0));
phex always prints 64-bit hex numbers with leading "00000000". So
I think that instead of:
you're getting something like:
You can avoid that by using phex_nz instead. Or better, use
hex_string, and remove the "0x" from the string, since hex_string
already handles that.
That looks better.
OK with that change.
Addressed the above and pushed to master as