From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19534 invoked by alias); 11 Jan 2010 15:22:07 -0000 Received: (qmail 19515 invoked by uid 22791); 11 Jan 2010 15:22:06 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jan 2010 15:22:02 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0BFLEMH015966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 11 Jan 2010 10:21:14 -0500 Received: from [10.16.60.54] (atropine.boston.devel.redhat.com [10.16.60.54]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0BFLCfx022709; Mon, 11 Jan 2010 10:21:13 -0500 Subject: Re: Debugging X with GDB From: Adam Jackson To: Jonathan Morton Cc: Daniel Jacobowitz , dclark , xorg-devel@lists.x.org, Bernie Innocenti , rms@gnu.org, gdb@sourceware.org In-Reply-To: <1263219976.15247.81.camel@localhost.localdomain> References: <1263170536.29695.86.camel@giskard> <20100111140155.GD428@caradoc.them.org> <1263219976.15247.81.camel@localhost.localdomain> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-lBKaXzI+h3aF0MfDWf3f" Date: Mon, 11 Jan 2010 15:22:00 -0000 Message-Id: <1263223272.7251.32506.camel@atropine.boston.devel.redhat.com> Mime-Version: 1.0 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00112.txt.bz2 --=-lBKaXzI+h3aF0MfDWf3f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-length: 1098 On Mon, 2010-01-11 at 16:26 +0200, Jonathan Morton wrote: > On Mon, 2010-01-11 at 09:01 -0500, Daniel Jacobowitz wrote: > > On Sun, Jan 10, 2010 at 07:42:16PM -0500, Bernie Innocenti wrote: > > > I think X might change TTY state and piss gdb off > >=20 > > I'd imagine this is it, but it's impossible to tell without debugging > > the TTY state. > >=20 > > When you hit ^C, that doesn't necessarily cause anything to happen. > > The TTY subsystem sees ^C, and may or may not generate a SIGINT to the > > foreground process group depending on the tty settings; try checking > > using stty -F, for instance. Then the foreground process group is X, > > not GDB; if the SIGINT is blocked or ignored, it won't be delivered, > > so GDB can't intercept it at delivery. > >=20 > > Using ^C is not always reliable. >=20 > A good trick might be to run X+gdb via SSH or a serial console. This is > then immune to VT switching semantics. This is the normal way people gdb X, yes. If you tried to attach gdb to the X server that's hosting the xterm that's running the gdb, you'd deadlock. - ajax --=-lBKaXzI+h3aF0MfDWf3f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-length: 198 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAktLQecACgkQW4otUKDs0NM1IwCcDfHEGUdAUR+lZ4qKnEgoRt2/ KoAAmgLmV/3jbMFDQcF3HRZ2DwJ8eTFg =xnqC -----END PGP SIGNATURE----- --=-lBKaXzI+h3aF0MfDWf3f--