From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14405 invoked by alias); 20 Sep 2015 16:53:15 -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 14390 invoked by uid 89); 20 Sep 2015 16:53:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailsec105.isp.belgacom.be Received: from mailsec105.isp.belgacom.be (HELO mailsec105.isp.belgacom.be) (195.238.20.101) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 20 Sep 2015 16:53:12 +0000 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=NilKRk42NXlFjl3P0sfZ2CTnYQQvYWzdtlZoLv5KozM= c=1 sm=2 a=FHDCl3PWGSdGqpJVVSkA:9 a=QEXdDO2ut3YA:10 a=v7kOJvIWsVYbOIqX:21 a=ckwMwpmyMhivErai:21 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2D7LgB/4/5V/+aLhm1dgySOb7U8glYCgR09EAEBAQEBAQGBCkEBAQODXgEBBCMzIxAIAw4KAgImAgI5HgYKiDsBtW2TWwEBAQEGAiAZgQmFUYR9hQ0HgmmBQwEElWSNB5saOCuCERyBVjyDBYJEhFcBAQE Received: from 230.139-134-109.adsl-dyn.isp.belgacom.be (HELO soleil) ([109.134.139.230]) by relay.skynet.be with ESMTP/TLS/AES128-SHA; 20 Sep 2015 18:53:09 +0200 Message-ID: <1442768026.6486.21.camel@skynet.be> Subject: Re: [RFC] reviving 'catch syscall' for gdbserver From: Philippe Waroquiers To: Josh Stone Cc: gdb-patches@sourceware.org, sergiodj@redhat.com, palves@redhat.com Date: Sun, 20 Sep 2015 16:53:00 -0000 In-Reply-To: <55FCAF79.7060504@redhat.com> References: <55F3838A.4010005@redhat.com> <1442354461.21802.45.camel@skynet.be> <55FCAF79.7060504@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00492.txt.bz2 On Fri, 2015-09-18 at 17:42 -0700, Josh Stone wrote: > On 09/15/2015 03:01 PM, Philippe Waroquiers wrote: > > On Fri, 2015-09-11 at 18:44 -0700, Josh Stone wrote: > What about relying on the current target, and use Hg switching? Or is > it more common for new commands to have an explicit pid? It doesn't > look like many q packets have a pid, even though many have an action > specific to one target. Yes, that will work, and is effectively used for many operations/packets. Note that as far as I can see, gdb + gdbserver + multiple arch inferiors + breakpoints seems somewhat broken. E.g. I tried 7.10 gdb+gdbserver --multi, with 2 inferiors of different archs : x86 (badseg) and amd64 (trivialleak). The way breakpoints are handled seems buggy to me. E.g. at some point, I had: (gdb) info break Num Type Disp Enb Address What 2 breakpoint keep y 0x080484f9 in main at badseg.c:13 inf 2 3 breakpoint keep y 0x000000000040053a in main at trivialleak.c:11 inf 1 (breakpoints set using *0x....) So, a breakpoint for 'inf 2' and a breakpoint for 'inf 1'. Then when doing run, gdb reported: Warning: Cannot insert breakpoint 2. Cannot access memory at address 0x80484f9 So, GDB (wronly IMO) tried to insert a breakpoint aimed at the x86 inferior in the amd64 inferior. Same problem when running the x86 target: it could not insert the amd64 breakpoint. What is even more strange is that after that, the info breakpoints gives: (gdb) info break Num Type Disp Enb Address What 2 breakpoint keep y 0x080484f9 in main at badseg.c:13 inf 2 3 breakpoint keep y 0x000000000040053a inf 2 So, the breakpoint 3 'was lost' for inferior 1, and was 'transferred' to inferior 2. I also searched for the regexp 'inf [0-9]' in the doc, and could not find anything. The description for 'What' in the manual of 'info breakpoints' does only describe file/line number. So, this 'inf x' in info breakpoint seems not documented. More generally, I could not find a description of the behaviour of breakpoints with multiple inferiors and/or multiple archs inferior. The doc only says: "Many commands will work the same with multiple programs as with a single program ..." No more details found. Philippe