On Wed, 2025-01-08 at 18:05 +0000, Alex Bennée wrote: > This started as a clean-up to properly pass a Error handler to the > gdbserver_start so we could do the right thing for command line and > HMP invocations. To that end everything that used > foreach_device_config() and failed was also an immediate exit case so > I mechanically tweaked all the helper functions and simplified some. > > Currently an RFC, I suspect we want to rename the foreach function to > something more pithy like foreach_device_config_or_exit().
I agree with such a rename, adding comments like /* failure will exit via error_fatal */ everywhere is not optimal. > Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > Cc: Ilya Leoshkevich <i...@linux.ibm.com> > --- > include/exec/gdbstub.h | 8 +++- > gdbstub/system.c | 22 +++++----- > gdbstub/user.c | 20 +++++---- > linux-user/main.c | 6 +-- > monitor/hmp-cmds.c | 2 +- > system/vl.c | 98 ++++++++++++++++------------------------ > -- > 6 files changed, 70 insertions(+), 86 deletions(-) Acked-by: Ilya Leoshkevich <i...@linux.ibm.com>