- 28 7月, 2015 1 次提交
-
-
由 Jan Kiszka 提交于
gdb expects that the thread ID for c and g-class operations is set to the CPU we provide when reporting VM stop conditions. If the stub is still tuned to a different CPU, the wrong information is delivered to the gdb frontend. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 09 7月, 2015 3 次提交
-
-
由 Peter Crosthwaite 提交于
Use the cpu_set_pc() helper which will take care of CPUClass retrieval for us. Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Peter Crosthwaite 提交于
All callsites to this function navigate the cpu->env_ptr only for the function to take the env ptr back to the original cpu ptr. Change the function to just pass in the CPU pointer instead. Removes a core code usage of ENV_GET_CPU() (in gdbstub.c). Cc: Riku Voipio <riku.voipio@iki.fi> Reviewed-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Peter Crosthwaite 提交于
All of the core-code usages of this API have the cpu pointer handy so pass it in. There are only 3 architecture specific usages (2 of which are commented out) which can just use ENV_GET_CPU() locally to get the cpu pointer. The reduces core code usage of the CPU env, which brings us closer to common-obj'ing these core files. Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Acked-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 19 6月, 2015 1 次提交
-
-
由 Leon Alrae 提交于
Remove semihosting_enabled and semihosting_target and replace them with SemihostingConfig structure containing equivalent fields. The structure is defined in vl.c where it is actually set. Also introduce separate header file include/exec/semihost.h allowing to access semihosting config related stuff from target specific semihosting code. Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1434643256-16858-2-git-send-email-leon.alrae@imgtec.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 28 5月, 2015 4 次提交
-
-
由 Fabien Chouteau 提交于
The requirements described in this patch are implemented by "Add GDB qAttached support". This reverts commit 00e94dbc. Signed-off-by: NFabien Chouteau <chouteau@adacore.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Jan Kiszka 提交于
With this patch QEMU handles qAttached request from gdb. When QEMU replies 1, GDB sends a "detach" command at the end of a debugging session otherwise GDB sends "kill". The default value for qAttached is 1 on system emulation and 0 on user emulation. Based on original version by Fabien Chouteau. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Jan Kiszka 提交于
This helper supports parsing of query packets with optional extensions. The separator can be specified so that we can use it already for both qqemu.sstep[=] and qSupported[:feature]. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Jan Kiszka 提交于
qOffsets has no additional optional parameters. So match the complete string to avoid stumbling over possible future commands with identical prefix. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 10 3月, 2015 1 次提交
-
-
由 Paolo Bonzini 提交于
Coverity reports that s->chr is checked after put_packet dereferences it. Move the check earlier, consistent with the code used for user-mode emulation. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 11 12月, 2014 1 次提交
-
-
由 Liviu Ionescu 提交于
The usual semihosting behaviour is to process the system calls locally and return; unfortuantelly the initial implementation dinamically changed the target to GDB during debug sessions, which, for the usual arm-none-eabi-gdb, is not implemented. The result was that during debug sessions the semihosting calls were discarded. This patch adds a configuration variable and an option to set it on the command line: -semihosting-config [enable=on|off,]target=native|gdb|auto This option enables semihosting and defines where the semihosting calls will be addressed, to QEMU ('native') or to GDB ('gdb'). The default is auto, which means 'gdb' during debug sessions and 'native' otherwise. Signed-off-by: NLiviu Ionescu <ilg@livius.net> Message-id: 1416341957-9796-1-git-send-email-ilg@livius.net [PMM: moved declaration and definition of semihosting_target to gdbstub.h and gdbstub.c to fix build failure on linux-user] Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 11 11月, 2014 1 次提交
-
-
由 Martin Simmons 提交于
While using qemu with gdb "target remote" to debug an application that uses fork and exec, the qemu process receives SIGSTOP every time the forked process terminates (sending SIGCHLD). This is caused by a missing call to gdb_signal_to_target in gdbstub.c, which is fixed by this patch: Signed-off-by: NMartin Simmons <martin@lispworks.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 06 10月, 2014 1 次提交
-
-
由 Peter Maydell 提交于
GDB assumes that watchpoint set via the gdbstub remote protocol will behave in the same way as hardware watchpoints for the target. In particular, whether the CPU stops with the PC before or after the insn which triggers the watchpoint is target dependent. Allow guest CPU code to specify which behaviour to use. This fixes a bug where with guest CPUs which stop before the accessing insn GDB would manually step forward over what it thought was the insn and end up one insn further forward than it should be. We set this flag for the CPU architectures which set gdbarch_have_nonsteppable_watchpoint in gdb 7.7: ARM, CRIS, LM32, MIPS and Xtensa. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by: NMax Filippov <jcmvbkbc@gmail.com> Tested-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by: Michael Walle <michael@walle.cc> (for lm32) Message-id: 1410545057-14014-1-git-send-email-peter.maydell@linaro.org
-
- 11 9月, 2014 1 次提交
-
-
由 Pavel Dovgalyuk 提交于
This patch initializes monitor for gdbstub with the qemu_chr_alloc function instead of just allocating the memory. Initialization function call is required, because it also creates chr_write_lock mutex, which is used when writing to this character device. Signed-off-by: NPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Cc: qemu-stable@nongnu.org Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 14 3月, 2014 4 次提交
-
-
由 Andreas Färber 提交于
Use CPUState. Allows to clean up CPUArchState in gdbstub. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Use CPUState. This lets us drop a few local env usages. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 04 11月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
After reporting the GUEST_PANICKED monitor event, QEMU stops the VM. The reason for this is that events are edge-triggered, and can be lost if management dies at the wrong time. Stopping a panicked VM lets management know of a panic even if it has crashed; management can learn about the panic when it restarts and queries running QEMU processes. The downside is of course that the VM will be paused while management is not running, but that is acceptable if it only happens with explicit "-device pvpanic". Upon learning of a panic, management (if configured to do so) can pick a variety of behaviors: leave the VM paused, reset it, destroy it. In addition to all of these behaviors, it is possible to dump the VM core from the host. However, right now, the panicked state is irreversible, and can only be exited by resetting the machine. This means that any policy decision is entirely in the hands of the host. In particular there is no way to use the "reboot on panic" option together with pvpanic. This patch makes the panicked state reversible (and removes various workarounds that were there because of the state being irreversible). With this change, management has a wider set of possible policies: it can just log the crash and leave policy to the guest, it can leave the VM paused. In particular, the "log the crash and continue" is implemented simply by sending a "cont" as soon as management learns about the panic. Management could also implement the "irreversible paused state" itself. And again, all such actions can be coupled with dumping the VM core. Unfortunately we cannot change the behavior of 1.6.0. Thus, even if it uses "-device pvpanic", management should check for "cont" failures. If "cont" fails, management can then log that the VM remained paused and urge the administrator to update QEMU. Reviewed-by: NLaszlo Ersek <lersek@redhat.com> Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 03 10月, 2013 1 次提交
-
-
由 Sebastian Ottlik 提交于
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: NSebastian Ottlik <ottlik@fzi.de> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NStefan Weil <sw@weilnetz.de>
-
- 03 9月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand macros. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 17 8月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Commit a0e372f0 reorganized the register counting for GDB. While it seems correct not to let the total number of registers skyrocket in an SMP scenario through a static variable, the distinction between total register count and 'g' packet register count (last_reg vs. num_g_regs) got lost among the way. Fix this by introducing CPUState::gdb_num_g_regs and using that in gdb_handle_packet(). Reported-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: qemu-stable@nongnu.org (stable-1.6) Tested-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Tested-by: NMax Filippov <jcmvbkbc@gmail.com> Tested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 27 7月, 2013 18 次提交
-
-
由 Andreas Färber 提交于
Replace the GDB_CORE_XML define in gdbstub.c with a CPUClass field. Use first_cpu for qSupported and qXfer:features:read: for now. Add a stub for xml_builtin. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Completes migration of target-specific code to new target-*/gdbstub.c. Acked-by: Michael Walle <michael@walle.cc> (for lm32) Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa) Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
This avoids polluting the global namespace with a non-prefixed macro and makes it obvious in the call sites that we return. Semi-automatic conversion using, e.g., sed -i 's/GET_REGL(/return gdb_get_regl(mem_buf, /g' target-*/gdbstub.c followed by manual tweaking for sparc's GET_REGA() and Coding Style. Acked-by: Michael Walle <michael@walle.cc> (for lm32) Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa) Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Acked-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Acked-by: NMichael Walle <michael@walle.cc> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Reviewed-by: NJia Liu <proljc@gmail.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
CPUState::gdb_num_regs replaces num_g_regs. CPUClass::gdb_num_core_regs replaces NUM_CORE_REGS. Allows building gdb_register_coprocessor() for xtensa, too. As a side effect this should fix coprocessor register numbering for SMP. Acked-by: Michael Walle <michael@walle.cc> (for lm32) Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa) Signed-off-by: NAndreas Färber <afaerber@suse.de>
-