From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23203 invoked by alias); 17 Dec 2011 19:45:13 -0000 Received: (qmail 23180 invoked by uid 22791); 17 Dec 2011 19:45:12 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_JK,TW_LR,TW_RW,TW_WX,TW_XR 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; Sat, 17 Dec 2011 19:44:59 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBHJiwUk012439 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 17 Dec 2011 14:44:58 -0500 Received: from host2.jankratochvil.net (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBHJis9e025880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 17 Dec 2011 14:44:57 -0500 Date: Sat, 17 Dec 2011 19:56:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [patch] s390*: watchpoints regression [repost] Message-ID: <20111217194454.GA15156@host2.jankratochvil.net> References: <20111217094753.GA20113@host2.jankratochvil.net> <201112171229.27796.pedro@codesourcery.com> <20111217191543.GA5564@host2.jankratochvil.net> <201112171940.13962.alves.ped@gmail.com> <20111217194412.GA15107@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <20111217194412.GA15107@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-12/txt/msg00581.txt.bz2 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 857 On Sat, 17 Dec 2011 20:40:13 +0100, Pedro Alves wrote: > In the loop that runs through the shell, fork-child.c:startup_inferior, > nothing inserts breakpoints/watchpoints. So nothing ends up > setting lwp->arch_private->debug_registers_changed, and so we should > not be setting DR_CONTROL to 0 for the wrapper shell. Do you > actually see it happen? I see it happenning. [attached] ./gdb -nx ./gdb -ex 'watch gdb_stdin' -ex r Reading symbols from /home/jkratoch/redhat/gdb-clean/gdb/gdb...done. Hardware watchpoint 1: gdb_stdin Starting program: /home/jkratoch/redhat/gdb-clean/gdb/gdb DR_CONTROL set 0x0 lrwxrwxrwx 1 jkratoch jkratoch 0 Dec 17 19:41 /proc/12542/exe -> /bin/bash DR_CONTROL set 0x90101 lrwxrwxrwx 1 jkratoch jkratoch 0 Dec 17 19:41 /proc/12542/exe -> /home/jkratoch/redhat/gdb-clean/gdb/gdb DR_CONTROL set 0x90100 ... Thanks, Jan --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="wrapper-debug.patch" Content-length: 452 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -403,6 +403,11 @@ amd64_linux_prepare_to_resume (struct lwp_info *lwp) clear_status = 1; } +printf("DR_CONTROL set 0x%lx\n",(long)state->dr_control_mirror); +{char buf[100]; +sprintf(buf,"ls -l /proc/%d/exe", (int)lwp->ptid.pid); +system(buf); +} amd64_linux_dr_set (lwp->ptid, DR_CONTROL, state->dr_control_mirror); lwp->arch_private->debug_registers_changed = 0; --k+w/mQv8wyuph6w0--