A Friday 28 March 2008 14:47:54, Maciej W. Rozycki wrote: > On Fri, 21 Mar 2008, Pedro Alves wrote: > > This is what I checked in after another round of testing > > on x86_64-unknown-linux-gnu. > > Hmm, I have narrowed it down to be the reason of breakage when the > current head of the tree is built for the mipsisa32-sde-elf target. The > symptom is when you run GBD interactively (no arguments) and enter any > line for processing (a lone new-line character is enough), then the > program crashes with SIGSEGV (an infinite recursion, it would seem). Yes, it's infinite recursion. Thanks for spotting that, and sorry for giving you trouble. The problem comes from the way we cope to the fact that target_can_async_p is called in several places before the runnable target is pushed on the stack. This particular case was happening in execute_command. Currently, if no target is yet pushed, we default to look for the default run target, and check if that can async. On a cross-configured gdb, without a native debugger, there's no default run target, so find_default_run_target calls error. As if this wasn't a problematic enough, throw_exception ends up calling target_can_async_p, which leads to infinite recursion. I know that Vladimir has a two patches that remove these two problematic target_can_async_p calls (one that removes the command_list_handler_continuation, the other that removes the target_can_async_p call from throw_exception), but that still leaves a lot of call in infcmd.c, that I'm not sure we'll be able to remove. The attached fixes the problem for me. We're not really interested in calling error in this case. -- Pedro Alves