public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/30913] New: The "flash-erase" command is too easy to use accidentally
@ 2023-09-28 20:22 bugzilla.sourceware.simon at arlott dot org
  2024-05-29 15:57 ` [Bug cli/30913] " arthur.huillet+sourcewarebz at free dot fr
  2024-06-13 16:34 ` tromey at sourceware dot org
  0 siblings, 2 replies; 3+ messages in thread
From: bugzilla.sourceware.simon at arlott dot org @ 2023-09-28 20:22 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30913

            Bug ID: 30913
           Summary: The "flash-erase" command is too easy to use
                    accidentally
           Product: gdb
           Version: 13.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: bugzilla.sourceware.simon at arlott dot org
  Target Milestone: ---

The "flash-erase" command responds to abbreviations like "fla" and "flash".
It's too easy to accidentally erase all flash on the remote target.

The suggested fix from luispm on IRC is to make this an "erase" subcommand of a
"flash" command. That does however cause problems when trying to use the new
command on old versions of gdb because it'll erase all the flash.

That would allow "flash read" and "flash write" avoiding the need to hunt
around for flash access commands.

$ arm-none-eabi-gdb 
GNU gdb (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 13.2.90.20230627-git
(gdb) help fl
Ambiguous command "fl": flash-erase, flushregs.
(gdb) help fla
Erase all flash memory regions.
(gdb) help flash
Erase all flash memory regions.
(gdb) flash
Erasing flash memory region at address 0x00000000, size = 0x40000              
                                                                          
Erasing flash memory region at address 0x0fe00000, size = 0x800                 
Erasing flash memory region at address 0x0fe10000, size = 0x2800
(gdb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug cli/30913] The "flash-erase" command is too easy to use accidentally
  2023-09-28 20:22 [Bug cli/30913] New: The "flash-erase" command is too easy to use accidentally bugzilla.sourceware.simon at arlott dot org
@ 2024-05-29 15:57 ` arthur.huillet+sourcewarebz at free dot fr
  2024-06-13 16:34 ` tromey at sourceware dot org
  1 sibling, 0 replies; 3+ messages in thread
From: arthur.huillet+sourcewarebz at free dot fr @ 2024-05-29 15:57 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30913

Arthur Huillet <arthur.huillet+sourcewarebz at free dot fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arthur.huillet+sourcewarebz
                   |                            |@free.fr

--- Comment #1 from Arthur Huillet <arthur.huillet+sourcewarebz at free dot fr> ---
I wanted to note that I just bricked a device that way, attempting to dump its
flash.
I was expecting "flash" to give me a list of subcommands, not immediately and
without confirmation to erase the flash.

> show confirm
Whether to confirm potentially dangerous operations is on.

Yet no confirmation was asked before erasing my flash. This seems like one of
the most "potentially dangerous" operations, worth a confirmation request...

arm-none-eabi-gdb
GNU gdb (GDB) 14.2

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug cli/30913] The "flash-erase" command is too easy to use accidentally
  2023-09-28 20:22 [Bug cli/30913] New: The "flash-erase" command is too easy to use accidentally bugzilla.sourceware.simon at arlott dot org
  2024-05-29 15:57 ` [Bug cli/30913] " arthur.huillet+sourcewarebz at free dot fr
@ 2024-06-13 16:34 ` tromey at sourceware dot org
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2024-06-13 16:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30913

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |tromey at sourceware dot org
   Last reconfirmed|                            |2024-06-13

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
This does seem bad.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-13 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-28 20:22 [Bug cli/30913] New: The "flash-erase" command is too easy to use accidentally bugzilla.sourceware.simon at arlott dot org
2024-05-29 15:57 ` [Bug cli/30913] " arthur.huillet+sourcewarebz at free dot fr
2024-06-13 16:34 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).