On 5/18/21 1:12 PM, Marco Barisione wrote: > On 18 May 2021, at 10:59, Tom de Vries wrote: >> Hi, >> >> While trying to reproduce a failing test-case from the testsuite on the >> command line using a gdb command script, I ran into the problem that a command >> failed which stopped script execution. >> >> I could work around this by splitting the script at each error, but I realized >> it would be nice if I could tell gdb to ignore the error. >> >> Inspired by make, I chose the '-' prefix. > > As MI commands are prefixed by “-“, isn’t there a risk of confusion? > Ah, right, I tend to forget about MI, good point. > There’s also a “-” command (see tui/tui-win.c) which will stop working with > your patch. I see, that's: ... $ gdb -q -batch -ex "help -" Scroll window backward. Usage: - [N] [WIN] Scroll window WIN N lines backwards. Both WIN and N are optional, N defaults to 1, and WIN defaults to the currently focused window. ... FWIW, did not find any documentation for this command. Anyway, the '-' prefix seems a poor choice. I've updated the patch to implement the ignore-errors idiom natively (so it also works without python). Also, I've managed to fix the hang, by copying some code from execute_gdb_command. Thanks, - Tom