From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4470 invoked by alias); 21 Sep 2012 14:46:08 -0000 Received: (qmail 4453 invoked by uid 22791); 21 Sep 2012 14:46:05 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Fri, 21 Sep 2012 14:45:48 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8LEjmoJ017442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Sep 2012 10:45:48 -0400 Received: from host2.jankratochvil.net (ovpn-113-58.phx2.redhat.com [10.3.113.58]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8LEji88014302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 21 Sep 2012 10:45:47 -0400 Date: Fri, 21 Sep 2012 14:46:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: Re: [RFA 4/4 take 2] Improved linker-debugger interface Message-ID: <20120921144543.GA23658@host2.jankratochvil.net> References: <20120719110518.GE16185@redhat.com> <20120815172346.GA5696@host2.jankratochvil.net> <20120919094933.GA3023@redhat.com> <20120919111422.GA17988@host2.jankratochvil.net> <20120919150622.GA7647@redhat.com> <20120919151255.GA5436@host2.jankratochvil.net> <20120921123555.GA6449@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120921123555.GA6449@redhat.com> 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: 2012-09/txt/msg00434.txt.bz2 Hi Gary, On Fri, 21 Sep 2012 14:35:56 +0200, Gary Benson wrote: > I've also passed --with-expat to force the issue. I'm not seeing the > XML warning any more, but the tests are still using the probes code > and not the code from linux-low.c. The tests are using linux-low.c: ../gdb gdb.base/break-probes -ex 'target remote localhost:1234' -ex 'set stop-on-solib-events 1' -ex 'set debug remote 1' -ex c [...] Sending packet: $qXfer:libraries-svr4:read::0,fff#91...Packet received: l SVR4:PASS Sending packet: $z0,7ffff7ddf702,1#00...Packet received: OK [...] Sending packet: $z0,7ffff7df0285,1#d2...Packet received: OK Stopped due to shared library event (no libraries added or removed) (gdb) _ It has stopped on probe due to stop_on_solib_events == 1 but that is unrelated to how solib-svr4.c fetches the library list. I see the implementation for the linux-low.c side may not be so easy as I thought about before. GDB still needs to stop at the stap probes as it does but: * gdbserver needs to fetch probe arguments on its own. Therefore GDB client needs to compile the arguments into AX (agent-expression) and upload them to gdbserver. gdbserver then can do the incremental fetching of solist entries like solib-svr4.c with your patches does. * svr4_handle_solib_event should disable updating the local list of shared libraries as svr4_current_sos->svr4_current_sos_via_xfer_libraries will accomplish everything without needing svr4_handle_solib_event. * It could transfer only differences of although that is an add-on optional feature. The major reason for implementing was the high amount of pings over long latency links. The amound of transferred data over wire may not be such a concern. Although with your high-performance solib goals it may be also your goal. I had to clear it up for myself so I wrote it down, I hope I have it right. Thanks, Jan