Peter, Can you confirm that adding a new transition definition is ok for the context I'm using it?
I had no problems so far, just wanted to be sure. Thank you, Liviu > On 27 Jul 2016, at 22:40, Liviu Ionescu <i...@livius.net> wrote: > > Hi, > > I just upgraded GNU ARM Eclipse QEMU to 2.6.0 and ran into a problem. > > The console reads: > > ``` > GNU ARM Eclipse 64-bits QEMU v2.6.0 (qemu-system-gnuarmeclipse). > Board: 'STM32F4-Discovery' (ST Discovery kit for STM32F407/417 lines). > Device: 'STM32F407VG' (Cortex-M4 r0p0, MPU), Flash: 1024 kB, RAM: 128 kB. > Command line: 'test' (4 bytes). > Cortex-M4 r0p0 core initialised. > GDB Server listening on: 'tcp::1234'... > Cortex-M4 r0p0 core reset. > ... connection accepted from 127.0.0.1. > > Execute 'mon system_reset'. > > Cortex-M4 r0p0 core reset. > qemu-system-gnuarmeclipse: invalid runstate transition: 'prelaunch' -> > 'prelaunch' > ``` > > QEMU is started as a GDB server, and when the GDB client connects (from an > Eclipse session), it issues a 'system_reset' command. > > The problem occurs in: > > ``` > void runstate_set(RunState new_state) > { > assert(new_state < RUN_STATE__MAX); > > if (!runstate_valid_transitions[current_run_state][new_state]) { > error_report("invalid runstate transition: '%s' -> '%s'", > RunState_lookup[current_run_state], > RunState_lookup[new_state]); > abort(); > } > trace_runstate_set(new_state); > current_run_state = new_state; > } > ``` > > when called from `main_loop_should_exit(void)`: > > ``` > if (qemu_reset_requested()) { > pause_all_vcpus(); > qemu_system_reset(VMRESET_REPORT); > resume_all_vcpus(); > if (!runstate_check(RUN_STATE_RUNNING) && > !runstate_check(RUN_STATE_INMIGRATE)) { > runstate_set(RUN_STATE_PRELAUNCH); > } > } > ``` > > I fixed the problem by adding a new transition in the > `runstate_transitions_def[]` array: > > ``` > #if defined(CONFIG_GNU_ARM_ECLIPSE) > { RUN_STATE_PRELAUNCH, RUN_STATE_PRELAUNCH }, > #endif /* defined(CONFIG_GNU_ARM_ECLIPSE) */ > ``` > > I don't know what these transition states are, but the above missing line > might affect other users too. > > > For completeness, I'm referring to the source files tagged with v2.6.0. > > > Regards, > > Liviu > > > >