From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24575 invoked by alias); 27 May 2009 07:49:04 -0000 Received: (qmail 24551 invoked by uid 22791); 27 May 2009 07:49:02 -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.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 May 2009 07:48:55 +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 n4R7mhel093595 ; Wed, 27 May 2009 09:48:43 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n4R7mhXl091483 ; Wed, 27 May 2009 09:48:43 +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 n4R7mhTs061368 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Wed, 27 May 2009 09:48:43 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller \(IMAP\)" To: , "'Eli Zaretskii'" Subject: [RFA] Fix troubles with watchpoints in DJGPP Date: Wed, 27 May 2009 07:49:00 -0000 Message-ID: <001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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/msg00582.txt.bz2 I finally managed to be able to compile current CVS with DJGPP v2.03. I also tried to use it but I have several problems, some are probably DJGPP specific (bad file descriptor errors when trying to restart a ./gdb executable at level 2, meaning inside another gdb itself being debugged by gdb). The reason of that email is the behavior for watchpoints: When I set a watchpoint before starting a program in cygwin, the type is first set to 'software watchpoint' and then modified to 'hardware_watchpoint' (if the watch memory size is compatible with debug register limitations for i386) during initialization. But this does not happen for DJGPP if I set a watchpoint before starting on a pointer, it never is changed to a hardware watchpoint. After some debugging, I realized that DJGPP only calls insert_breakpoints () that does call update_watchpoint with reparse set to one, after pushing go32 target, while with cygwin, the DLL loaded caused a reloading of all breakpoints and triggered a call to update_watchpoint with reparse = 1. This one line patch fixes the problem. Is this patch OK? Pierre Muller Pascal language support maintainer for GDB PS-1) Are there not other native targets, without dynamic libraries, that will suffer the same troubles? 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? ChangeLog entry: 2009-05-27 Pierre Muller * go32-nat.c (go32_create_inferior): Add call to breakpoint_re_set. Index: go32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/go32-nat.c,v retrieving revision 1.76 diff -u -p -r1.76 go32-nat.c --- go32-nat.c 21 May 2009 15:48:41 -0000 1.76 +++ go32-nat.c 27 May 2009 07:44:50 -0000 @@ -721,6 +721,7 @@ go32_create_inferior (struct target_ops add_thread_silent (inferior_ptid); clear_proceed_status (); + breakpoint_re_set (); insert_breakpoints (); prog_has_started = 1; } ~