From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29618 invoked by alias); 28 May 2009 09:31:32 -0000 Received: (qmail 29604 invoked by uid 22791); 28 May 2009 09:31:30 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 May 2009 09:31:24 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n4S9VHje033003 ; Thu, 28 May 2009 11:31:17 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n4S9VHGg067427 ; Thu, 28 May 2009 11:31:17 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (www-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n4S9VHLW084713 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 28 May 2009 11:31:17 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" Cc: References: <001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr> <83ab4ys5zy.fsf@gnu.org> <001b01c9df0d$32609890$9721c9b0$@u-strasbg.fr> <834ov5sknk.fsf@gnu.org> In-Reply-To: <834ov5sknk.fsf@gnu.org> Subject: RE: [RFA] Fix troubles with watchpoints in DJGPP Date: Thu, 28 May 2009 09:31:00 -0000 Message-ID: <000d01c9df77$107f4bd0$317de370$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00602.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Eli Zaretskii > Envoy=E9=A0: Thursday, May 28, 2009 10:21 AM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFA] Fix troubles with watchpoints in DJGPP >=20 > > From: "Pierre Muller" > > Cc: > > Date: Wed, 27 May 2009 22:53:31 +0200 > > > > (gdb) watch gdb_stderr > > Watchpoint 1: gdb_stderr > > (gdb) r > > Starting program: > e:/cygwin/usr/local/src/gdbcvs/djbuild/gdb/./gdb.exe > > Watchpoint 1: gdb_stderr > > > > Old value =3D > > New value =3D (struct ui_file *) 0x0 > > 0x00001a91 in start () > > (gdb) inf watch > > Num Type Disp Enb Address What > > 1 watchpoint keep y gdb_stderr > > breakpoint already hit 1 time > > (gdb) q >=20 > Thanks, but this example is for the second (and the main) problem you > mention in your original message, the one with watchpoints. You also > reported another problem: >=20 > > > > (bad file descriptor errors when trying to restart > > > > a ./gdb executable at level 2, meaning inside another gdb > > > > itself being debugged by gdb). >=20 > Can you show an example of these ``bad file descriptor errors''? I > don't think I ever saw them. This one is more tricky, I only saw it with 3 levels of gdb. And maybe watchpoints were needed too... I will try to find a reproducible way, but it might not be so easy. =20 > Thanks. >=20 > > > > PS-2) Eli, > > > > do you have anything that could help me debug the > > > > Bad file descriptor problems, like a library recording > > > > file opening/closing using the DJGPP file system extensions? > > > > > > No, but you can put a breakpoint on the respective library > functions, > > > couldn't you? > > > > I discovered that there is already something in > > dbgcom.c, but I wanted to have dup and dup2 calls > > be monitored also, as the problem seems related to > > handles of that type... But dup and dup2 > > never generate a call to the FSEXT function, > > which make it not useful for that :( >=20 > First, I meant to actually put a breakpoint on each of the functions > you are interested in; that doesn't need any FSEXT hooks. And second, > I don't understand the nature of your problems with FSEXT: dup and > dup2 do make a copy of the FSEXT hook of the original file descriptor, > so if the original descriptor was hooked by an FSEXT, the duplicated > descriptor will be hooked as well. What am I missing? What I am missing is a FSEXT hook call inside dup=20 so that I know that the return value of dup is used, instead with current gdbcom.c code, I will only get a=20 call to dbg_fsext when this handle is closed, but=20 at that point, I would have no idea where this handle is coming from! Pierre