From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124606 invoked by alias); 25 Jan 2016 14:28:42 -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 124594 invoked by uid 89); 25 Jan 2016 14:28:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=XML, stuffing, invent, tfile X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Jan 2016 14:28:40 +0000 Received: from hogfather.0x04.net (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by xyzzy.0x04.net (Postfix) with ESMTPS id 8E6C63FE85; Mon, 25 Jan 2016 15:29:22 +0100 (CET) Received: from [192.168.1.62] (84-10-2-59.static.chello.pl [84.10.2.59]) by hogfather.0x04.net (Postfix) with ESMTPSA id 706B358008E; Mon, 25 Jan 2016 15:28:37 +0100 (CET) Subject: Re: [PATCH 0/8] gdb/s390: Add regular and fast tracepoint support. To: Pedro Alves , gdb-patches@sourceware.org References: <1453637529-26972-1-git-send-email-koriakin@0x04.net> <56A6299E.4060706@redhat.com> From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <56A63114.3040105@0x04.net> Date: Mon, 25 Jan 2016 14:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56A6299E.4060706@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00623.txt.bz2 On 25/01/16 14:56, Pedro Alves wrote: > On 01/24/2016 12:12 PM, Marcin Kościelnicki wrote: > >> 1. Target independent: tfile format doesn't contain target information >> (tdesc). While this affects all platforms with multiple tdescs >> (eg. x86_64 is unable to pull AVX registers from tfile for that >> reason), it horribly breaks 31-bit s390 with high GPRs - it has >> a completely different GPR layout from plain 31-bit s390, so the >> collected registers will be garbled. I suppose the proper fix to >> that would be to add tdesc information to tfile format. > > Yes, I think so too. > >> Unfortunately, I don't see a way to extend it in a backwards-compatible way. > > The trace file header is just a list of newline-terminated lines. > We're free to add more header lines - older gdb's just warn about > unknown lines. See tfile_interp_line. > > Thanks, > Pedro Alves > Very well. I was thinking of just stuffing the XML in the header. We can avoid embedded newlines through hex-encoding it (or just stripping them, shouldn't hurt XML...), and copy it straight from the target. That would fail for targets that don't get tdesc from XML, but I'm not sure we should worry about it. An alternative would be to invent some serialization format for tdesc in tfile, but why do that when we already have a perfectly good one... Should be quite simple, really. Does that sound OK? Marcin Kościelnicki