From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23996 invoked by alias); 5 Jan 2012 14:56:29 -0000 Received: (qmail 23986 invoked by uid 22791); 5 Jan 2012 14:56:28 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Jan 2012 14:56:15 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Riojm-0000tI-IM from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Thu, 05 Jan 2012 06:56:14 -0800 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 5 Jan 2012 06:56:14 -0800 Received: from [0.0.0.0] ([172.16.63.104]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 5 Jan 2012 06:56:14 -0800 Message-ID: <4F05B9FE.1000500@mentor.com> Date: Thu, 05 Jan 2012 14:56:00 -0000 From: Luis Machado Reply-To: luis_gustavo@mentor.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [RFC stub-side break conditions 0/5] General info Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-01/txt/msg00184.txt.bz2 Hi, This patch series adds support and required machinery to enable breakpoint condition evaluation on the stub's side instead of solely in the host's side. When the evaluation is done on the stub's side, we eliminate all the useless stub -> GDB trap notifications that happen when the condition is false, potentially improving the speed of debugging on slower connections. Condition evaluation is achieved through the use of the agent expression machinery that is already in place for GDBServer. We extend the z0/z1 packets to carry additional data. In this case it carries the bytecode expression that should be used for evaluation. Each z0/z1 packet will carry all the conditions for all the locations at an specific address. If we can't convert an expression into a valid agent expression (due to complex types of host-specific data), then we fallback to evaluating the condition on GDB's side. A new switch was added to make it possible to choose between gdb/stub evaluation modes: set/show breakpoint condition-evaluation. It defaults to "auto". "auto" means "gdb" whenever the stub can't handle breakpoint condition evaluation or when the expression can't be evaluated by the agent expression machinery. "auto" means "stub" when the remote stub supports evaluating conditions and if the expressions generate valid agent expression bytecodes. The patch is divided in 5 parts: Part 1: Documentation bits Part 2: Protocol and feature changes Part 3: GDB-specific changes Part 4: GDBServer tracepoint/agent expression common code cleanup Part 5: GDBServer breakpoint condition evaluation enablement Luis lgustavo@codesourcery.com