I am doing some bare metal ARM Cortex-M3 development with qemu-system-arm and when I run qemu (withOUT gdb) against my axf(elf) file, everything works fine. I get my ""bkpt #0xAB" semi-hosting "SYS_WRITE0" strings printed to stdout as you would expect.
I can use gdb and debug the same axf file using qemu with the "-S -s" options, set breakpoints, next, cont, nexti, etc.. no problems there. But, when using gdb I do not get any semi-hosting output at all. Neither in the qemu terminal (or when monitor is set to stdio), nor do I get the messages in gdb as I would expect to. I do not see signaling being done to gdb when "set debug remote 1" is active at the time a Thumb bkpt service call is executed. Is semi-hosting and gdb usage within QEMU mutually exclusive by design? a know/unknown bug? my configuration? Thanks in advance for any help on this... -R qemu-system-arm --version QEMU emulator version 1.7.50, Copyright (c) 2003-2008 Fabrice Bellard qemu-system-arm -cpu cortex-m3 -nographic -semihosting -kernel bin/rtos_motor_controller.axf -s -S arm-none-eabi-gdb --version GNU gdb (GDB) 7.7.50.20140228-cvs (gdb)next Sending packet: $Z0,4c,2#ab...Ack Packet received: OK Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 0b0200000400000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000000000000b00f02000f0100008800000073030000 Sending packet: $m88,4#3d...Ack Packet received: 01900091 Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 0b0200000400000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000000000000b00f02000f0100008a00000073030000 Sending packet: $m8a,4#66...Ack Packet received: 0091ddf8 Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 0b0200000400000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000000000000b00f02000f0100008c00000073030000 Sending packet: $m8c,4#68...Ack Packet received: ddf800c0 Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 0b0200000400000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000004000000b00f02000f0100009000000073030000 Sending packet: $m90,4#36...Ack Packet received: ddf804e0 Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 0b0200000400000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000004000000b00f02000b0200009400000073030000 Sending packet: $m94,4#3a...Ack Packet received: 60467146 Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 040000000400000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000004000000b00f02000b0200009600000073030000 Sending packet: $m96,4#3c...Ack Packet received: 7146abbe Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 040000000b02000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000004000000b00f02000b0200009800000073030000 Sending packet: $m98,4#3e...Ack Packet received: abbe0998 Sending packet: $vCont;s:1;c#c1...Ack Packet received: Fwrite,2,0000020b,00000018\n Sending packet: $F-1,5#05...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 010000000b02000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000004000000b00f02000b0200009c00000073030000 Sending packet: $m9c,4#69...Ack Packet received: 0cb0bde8 Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 010000000b02000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000004000000e00f02000b0200009e00000073030000 Sending packet: $m9e,4#6b...Ack Packet received: bde80088 Sending packet: $vCont;s:1;c#c1...Ack Packet received: T05thread:01; Sending packet: $g#67...Ack Packet received: 010000000b02000004000000f2010000000000000000000000000000f80f02000000000000000000000000000000000004000000e80f02000b0200000e01000073030000 Sending packet: $m10e,4#93...Ack Packet received: 019004b0 Sending packet: $m20ffc,4#5e...Ack Packet received: 00000000 Sending packet: $m20ffc,4#5e...Ack Packet received: 00000000 Sending packet: $m0,4#fd...Ack Packet received: 00100200 Sending packet: $m20ffc,4#5e...Ack Packet received: 00000000 Sending packet: $m0,4#fd...Ack Packet received: 00100200 Sending packet: $z0,4c,2#cb...Ack Packet received: OK (gdb)
