From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46069 invoked by alias); 29 Nov 2016 15:47:45 -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 46055 invoked by uid 89); 29 Nov 2016 15:47:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=FORMAT, Hx-languages-length:1876, Tel, tel X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Nov 2016 15:47:42 +0000 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP; 29 Nov 2016 07:47:41 -0800 X-ExtLoop1: 1 Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga005.fm.intel.com with ESMTP; 29 Nov 2016 07:47:40 -0800 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX154.ger.corp.intel.com (163.33.192.96) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 29 Nov 2016 15:47:39 +0000 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.52]) by irsmsx112.ger.corp.intel.com ([169.254.1.113]) with mapi id 14.03.0248.002; Tue, 29 Nov 2016 15:47:39 +0000 From: "Metzger, Markus T" To: "Wiederhake, Tim" , "gdb-patches@sourceware.org" CC: "palves@redhat.com" Subject: RE: [PATCH v3 4/8] Add record_start function. Date: Tue, 29 Nov 2016 15:47:00 -0000 Message-ID: References: <1479743318-24523-1-git-send-email-tim.wiederhake@intel.com> <1479743318-24523-5-git-send-email-tim.wiederhake@intel.com> In-Reply-To: <1479743318-24523-5-git-send-email-tim.wiederhake@intel.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00954.txt.bz2 > -----Original Message----- > From: Wiederhake, Tim > Sent: Monday, November 21, 2016 4:49 PM > To: gdb-patches@sourceware.org > Cc: palves@redhat.com; Metzger, Markus T > Subject: [PATCH v3 4/8] Add record_start function. >=20 > 2016-11-21 Tim Wiederhake >=20 > gdb/ChangeLog >=20 > * record.h (record_start): New export. > * record.c (record_start): New function. > +void > +record_start (const char *method, const char *format, int from_tty) > +{ > + if (method =3D=3D NULL) > + { > + if (format =3D=3D NULL) > + return execute_command ("record", from_tty); > + } > + else if (strcmp (method, "full") =3D=3D 0) > + { > + if (format =3D=3D NULL) > + return execute_command ("record full", from_tty); > + } > + else if (strcmp (method, "btrace") =3D=3D 0) > + { > + if (format =3D=3D NULL) > + return execute_command ("record btrace", from_tty); > + if (strcmp (format, "bts") =3D=3D 0) > + return execute_command ("record btrace bts", from_tty); > + if (strcmp (format, "pt") =3D=3D 0) > + return execute_command ("record btrace pt", from_tty); > + } > + > + error (_("Invalid argument.")); Should we split this into "Invalid recording method" and "Invalid recording format"? =20 > +/* Internal function that starts recording with the given METHOD and FOR= MAT. > + NULL means default method or format. */ What does 'internal' mean in this context? > +extern void record_start (const char *method, const char *format, > + int from_tty); > + > #endif /* _RECORD_H_ */ > -- > 2.7.4 thanks, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928