texane/stlink — pull request #132 by prattmic (2013-03-06 18:01:36+00:00)
Title: Add gdb-server persistence

As noted in issue #131, st-util exits upon disconnect from GDB. This is expected behavior, but it is nice to have the option to keep st-util up. Commit 1c2828c attempted to add support for this, but failed, as the listening socket has already been closed where the commit tries to jump back to.

This pull request adds working support for persistence, either enabled with the option '-m', or by connecting to the server with 'target extended-remote'. In extended-remote mode, 'run' can be used to reset and continue the target. Unfortunately, 'start' is broken, as, for some reason, it tries to access memory before sending the reset packet.

This closes issue #131.