From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4118 invoked by alias); 23 Jun 2014 13:45:05 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 4102 invoked by uid 89); 23 Jun 2014 13:45:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mexforward.lss.emc.com Received: from mailuogwhop.emc.com (HELO mexforward.lss.emc.com) (168.159.213.141) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 23 Jun 2014 13:45:02 +0000 Received: from hop04-l1d11-si03.isus.emc.com (hop04-l1d11-si03.isus.emc.com [10.254.111.23]) by mexforward.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id s5NDivcJ024975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Jun 2014 09:44:57 -0400 Received: from mailhub.lss.emc.com (mailhubhoprd02.lss.emc.com [10.254.221.253]) by hop04-l1d11-si03.isus.emc.com (RSA Interceptor); Mon, 23 Jun 2014 09:44:46 -0400 Received: from usendtaylorx2l.lss.emc.com (usendtaylorx2l.lss.emc.com [10.243.10.188]) by mailhub.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id s5NDikUS021633; Mon, 23 Jun 2014 09:44:46 -0400 Received: by usendtaylorx2l.lss.emc.com (Postfix, from userid 26043) id 844E55CCA4F; Mon, 23 Jun 2014 09:44:44 -0400 (EDT) Received: from usendtaylorx2l (localhost [127.0.0.1]) by usendtaylorx2l.lss.emc.com (Postfix) with ESMTP id E8BB25CC9BC; Mon, 23 Jun 2014 09:44:44 -0400 (EDT) To: Yao Qi cc: "gdb@sourceware.org" Subject: Re: gdb remote protocol breakpoints (Z0 command) In-reply-to: <53A3C91D.7010304@codesourcery.com> References: <20417.1403189074@usendtaylorx2l> <53A3C91D.7010304@codesourcery.com> Comments: In-reply-to Yao Qi message dated "Fri, 20 Jun 2014 01:39:41 -0400." Date: Mon, 23 Jun 2014 13:45:00 -0000 Message-ID: <2184.1403531084@usendtaylorx2l> From: David Taylor X-EMM-MHVC: 1 X-RSA-Classifications: public X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00067.txt.bz2 Yao Qi wrote: > If you don't require much interactive operations, tracepoint is a better > choice, IMO. Actually, we use tracepoints quite extensively. Both our old and our new stubs support tracepoints; our use of tracepoints preceeds GDB support for tracepoints. My first use of function calling at a breapoint goes back more than a decade. I've used it for things like setting a breakpoint on a troublesome functions and then creating a command list like -- print that the function was called and its arguments; for structures, possibly print key elements of the structure print interesting global variables print a backtrace disable the current breakpoint set $retval = () print return value re-enable breakpoint return $retval continue So, we end up with the function arguments, the return value, and selected other interesting information each time the function is called.