From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18481 invoked by alias); 28 May 2009 08:21:10 -0000 Received: (qmail 18473 invoked by uid 22791); 28 May 2009 08:21:09 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout4.012.net.il (HELO mtaout3.012.net.il) (84.95.2.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 May 2009 08:21:04 +0000 Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KKC00H00HUXEI00@i_mtaout3.012.net.il> for gdb-patches@sourceware.org; Thu, 28 May 2009 11:21:00 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.115.215]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KKC00FX3HUZDTM0@i_mtaout3.012.net.il>; Thu, 28 May 2009 11:21:00 +0300 (IDT) Date: Thu, 28 May 2009 08:21:00 -0000 From: Eli Zaretskii Subject: Re: [RFA] Fix troubles with watchpoints in DJGPP In-reply-to: <001b01c9df0d$32609890$9721c9b0$@u-strasbg.fr> To: Pierre Muller Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <834ov5sknk.fsf@gnu.org> References: <001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr> <83ab4ys5zy.fsf@gnu.org> <001b01c9df0d$32609890$9721c9b0$@u-strasbg.fr> X-IsSubscribed: yes 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/msg00601.txt.bz2 > 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 = > New value = (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 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: > > > (bad file descriptor errors when trying to restart > > > a ./gdb executable at level 2, meaning inside another gdb > > > itself being debugged by gdb). Can you show an example of these ``bad file descriptor errors''? I don't think I ever saw them. Thanks. > > > 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 :( 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?