Package: gdb Version: 7.0.1-2+b1 Severity: normal Tags: patch
* Preface gdb/mi is a line based machine oriented text interface to gdb. Used primarily by programs wishing to use gdb as a backend for a debugger GUI or an IDE. Notable example is the Qt Creator. Frontend may specify a preference for asynchronous execution by setting target-async on, before either running the executable or attaching to the target. Now I can say that it's broken, but finding out that gdb is the culprit, whether it was fixed already in newer versions and when exactly took me all day. Squeeze is frozen, so I was determined to find a solution, believing it will be applied. * The problem exists in gdb versions up to 7.1 or more precisely: commit ed72348da877003a79bfa638c04afed888ce045e Author: Vladimir Prus <vladi...@codesourcery.com> Date: Sat Nov 28 17:00:53 2009 +0000 * target.c (target_terminal_inferior): Use target_can_async_p, not target_is_async_p. which fixes it. http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/target.c.diff?r1=1.233&r2=1.234&cvsroot=src * What happens if mentioned patch is not applied? Asynchronous commands are not invoked if the target is running. It's especially important in the case of interrupting the execution of the target using "-exec-interrupt", which should always work. But it's not in gdb 7.0.1. * How I can see it myself? Almost real-world example: $ qemu -hda /path/to/linux-0.2.img -s # [1] # wait at least until kernel is loaded $ gdb # we'll mimic some Qt Creator actions here # normally we would provide target image, # but it's not important to show the problem set target-async on target remote :1234 # vm is interrupted now, try writing something in its win -exec-continue # vm is running now, your input shows -exec-interrupt # nothing happens, writing in vm still works, but it # SHOULD NOT // apply patch to fix it You can even recompile qemu with uncommented DEBUG_GDB define in gdbstub.c to see that appropriate packet is not sent with -exec-interrupt. [1] http://wiki.qemu.org/download/linux-0.2.img.bz2 -- System Information: Debian Release: 6.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages gdb depends on: ii gdbserver 7.0.1-2+b1 The GNU Debugger (remote server) ii libc6 2.11.2-7 Embedded GNU C Library: Shared lib ii libexpat1 2.0.1-7 XML parsing C library - runtime li ii libncurses5 5.7+20100313-5 shared libraries for terminal hand ii libpython2.6 2.6.6-8+b1 Shared Python runtime library (ver ii libreadline6 6.1-3 GNU readline and history libraries ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime gdb recommends no packages. Versions of packages gdb suggests: pn gdb-doc <none> (no description available) -- debconf-show failed -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org