Daniel Jacobowitz wrote: > > This won't work if the C++ library is linked in, e.g. -static or a > bare metal toolchain; it won't be pending. Made test accept both and address. > >> +gdb_test "tbreak main" "Temporary breakpoint 3.*" \ >> + "Set temporary breakpoint at main" >> + >> +gdb_test "run" "Temporary breakpoint 3,.*" "Run to main" > > There's runto_main, use that instead; it handles remote targets and so > forth. Yeah, but it wouldn't work in my case as it deletes breakpoints automagically. I introduced new runto_main_new that accepts options like temporary-break and keep-breakpoints. > > If you'll try to update this, I can test it on arm-none-eabi or > another bare metal platform. Running it with > "RUNTESTFLAGS=--target_board unix/-static" should be enough to test > the problem. > Please do with the attached patch. Thanks, Aleksandar ChangeLog: * gdb.cp/exception.exp: Made test functional. * lib/gdb.exp (runto): New option: keep-breakpoints to make procedure more useful. If the option is not specified, it deletes breakpoints like before. Made matching regexp accept both temporary and regular breakpoint. (runto_main_new): New procedure, to avoid breakage of the existing stuff. This procedure works like runto_main, except it can take arguments: temporary-break and keep-breakpoints.