From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114462 invoked by alias); 9 Mar 2015 18:12:08 -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 114441 invoked by uid 89); 9 Mar 2015 18:12:07 -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,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailuogwhop.emc.com Received: from mailuogwhop.emc.com (HELO mailuogwhop.emc.com) (168.159.213.141) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 09 Mar 2015 18:12:05 +0000 Received: from maildlpprd02.lss.emc.com (maildlpprd02.lss.emc.com [10.253.24.34]) by mailuogwprd03.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id t29IC1fZ003039 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 9 Mar 2015 14:12:02 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd03.lss.emc.com t29IC1fZ003039 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd03.lss.emc.com t29IC1fZ003039 Received: from mailapphubprd51.lss.emc.com (mailapphub.lss.emc.com [10.106.83.170]) by maildlpprd02.lss.emc.com (RSA Interceptor) for ; Mon, 9 Mar 2015 14:10:42 -0400 Received: from usendtaylorx2l.lss.emc.com (usendtaylorx2l.lss.emc.com [10.243.10.188]) by mailapphubprd51.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id t29IBhG4016884 for ; Mon, 9 Mar 2015 14:11:44 -0400 From: David Taylor To: gdb@sourceware.org Subject: user functions and tracepoint actions Date: Mon, 09 Mar 2015 18:12:00 -0000 Message-ID: <24883.1425924691@usendtaylorx2l.lss.emc.com> X-RSA-Classifications: DLM_1, public X-Sentrion-Hostname: mailuogwprd03.lss.emc.com X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00010.txt.bz2 User functions and tracepoint actions do not 'play well together'. Suppose you want to write something like: define user_func trace some_function actions collect some_variable collect something_else end end This will not work as the 'define' command does not recognize that the 'actions' command is terminated with an 'end'. When the first 'end' is seen, it terminates the 'define' command. Aside: part of my motivation for the above is an attempt to 'automate' at least part of the testing of our GDB stub. Currently, big sigh, it is 100% manual. It is difficult to download programs, ruling out (for now) the standard GDB testsuite. But, there is an operating system on the machine with a GDB stub that supports a bunch of standard GDB remote protocol stuff including tracepoints and some vendor specific extensions. I actually want to define an entire trace experiment and execute it in the user function. What I'm having to resort to is to put the trace and actions commands as top level commands in a separate file and then have the user function source it and then run the experiment. Ugly.