From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13614 invoked by alias); 11 Jun 2013 13:56:35 -0000 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 Received: (qmail 13602 invoked by uid 89); 11 Jun 2013 13:56:34 -0000 X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 11 Jun 2013 13:56:33 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5BDuW5c015669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Jun 2013 09:56:32 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5BDuUlj027520; Tue, 11 Jun 2013 09:56:31 -0400 Message-ID: <51B72C8E.8060905@redhat.com> Date: Tue, 11 Jun 2013 13:57:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Jan Kratochvil CC: gdb-patches@sourceware.org Subject: Re: gdbserver regression [Re: [COMMIT PATCH][GDBserver] Multi-process + multi-arch] References: <20130530121335.15047.12654.stgit@brno.lan> <51B1BB04.9020304@redhat.com> <20130608015339.GA10329@host2.jankratochvil.net> In-Reply-To: <20130608015339.GA10329@host2.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00249.txt.bz2 On 06/08/2013 02:53 AM, Jan Kratochvil wrote: > On Fri, 07 Jun 2013 12:50:44 +0200, Pedro Alves wrote: >> I've now squashed everything into a single patch, and checked it in, >> as below. > > 412f6d9c3dd9bf3049d1b78aefdc7391f95b5484 is the first bad commit > commit 412f6d9c3dd9bf3049d1b78aefdc7391f95b5484 > Author: Pedro Alves > Date: Fri Jun 7 10:46:57 2013 +0000 > > [GDBserver] Multi-process + multi-arch > > cd gdb/testsuite/ > ../gdbserver/gdbserver :1234 ~/t/hello & > echo p=$! > ../gdb -nx ~/t/hello -ex 'set debug remote 1' -ex 'target remote localhost:1234' -ex c -ex 'set confirm no' -ex q 2>&1|tee log > kill -9 $p > grep 'Inferior .* exited normally' log > > > ~/t/hello is hello world: int main () { puts("hello"); } > > > [...] > Sending packet: $vCont?#49...Packet received: vCont;c;C;s;S;t;r > Packet vCont (verbose-resume) is supported > Sending packet: $vCont;c#a8...Packet received: T0506:0000000000000000;07:0000000000000000;10:0000000000000000;thread:p54b6.54b6;core:1; > Sending packet: $z0,39e6403f92,1#a2...Packet received: OK > Sending packet: $z0,39e6413355,1#6f...Packet received: OK > Sending packet: $z0,39e6414285,1#72...Packet received: OK > Sending packet: $m0,1#fa...Packet received: E01 > Sending packet: $m0,1#fa...Packet received: E01 > Sending packet: $m0,9#02...Packet received: E01 > > Program received signal SIGTRAP, Trace/breakpoint trap. > 0x0000000000000000 in ?? () Unfortunately I can't reproduce this. :-/ I've tried both 64-bit and and 32-bit. All I can think of I might have broken would be sending the wrong target description to GDB. Maybe I've messed that up (x86_linux_read_description, vs the previous -x86_linux_update_xmltarget)? Looking over the current code I notice x32/avx must be broken (http://sourceware.org/ml/gdb-patches/2013-06/msg00247.html) but given the above log shows breakpoints at 39e6403f92 (>32-bit) it doesn't look like that'd be the arch in question.. Maybe comparing before/after RSP logs shows some hint? Particularly the target.xml fetching bit: "Sending packet: $qXfer:features:read:target.xml:0,fff#7d...Packet received: l\n\n\n\n\n\n\n i386:x86-64\n GNU/Linux\n \n \n \n \n\n" m0 means reading memory from 0, which results from: > Sending packet: $vCont;c#a8...Packet received: T0506:0000000000000000;07:0000000000000000;10:0000000000000000;thread:p54b6.54b6;core:1; That's 0 for rbp,rsp,rip. That means prepare_resume_reply, is finding _a_ description that includes those 3 registers, which is correct. If there was no description, then there'd be no expedite registers in that reply to vCont. However, if the description is the wrong one, I guess GDBserver could be sending out the wrong registers to GDB (fetching them from the wrong offsets). -- Pedro Alves