From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48336 invoked by alias); 18 Jan 2018 15:42:39 -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 48324 invoked by uid 89); 18 Jan 2018 15:42:39 -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,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=terminal, wish X-HELO: mail-lf0-f47.google.com Received: from mail-lf0-f47.google.com (HELO mail-lf0-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Jan 2018 15:42:37 +0000 Received: by mail-lf0-f47.google.com with SMTP id x196so7212553lfd.12 for ; Thu, 18 Jan 2018 07:42:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ccVeFO3ukFNAopVOumIz3qaqOfUa74AMM4P5jnfvgzk=; b=HvmZ2wL/xK0BzcpU9YoJPy38elIsxxCp2qgVJgTZHllNV6tbz+M5mAsYmpf9AyQdC+ H3Tp5y0TcMSLTSdZED6AoEGSpny/Mv42WuMFaCh3dlBYDONdCjTptr7/gj0Tm/dYbfHy Os7rUWDilaDrOlmoXJvuNrW1cT2eV7cnOnsFEWcHFg2iFUcubXRzwxKXaq7MxzL3mrst FKiqCV3tZMfKnq8lDW6yEXkEnoZaZvci4AaTu5PD5KHllXg6RVyvEvcMn1jRNksNkFSR Au5nw68ZS9X/53vKT4KpFA8lTc2SyL75mdZAxok/fSJ4gYV2V+K1Sdod7ySYIpxeE1/q YX6Q== X-Gm-Message-State: AKwxytegIy/A0qCFPLk7OPpvxXB75fzeE5ARC8877Tyw/IZIeCdK6mUT YtLsaLbLpNNd+t6FPxpoC0pSKdX/eiGLVs5Gc7k= X-Google-Smtp-Source: ACJfBoth90LT/1wjHzt0uHq7J7+90aGzq82htJzrun5vi95fkToBn9KM7X03TTWo/z8e8VacUPmskEOPVGw3lLvyOLE= X-Received: by 10.25.208.73 with SMTP id h70mr25021966lfg.95.1516290155553; Thu, 18 Jan 2018 07:42:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.152.72 with HTTP; Thu, 18 Jan 2018 07:42:35 -0800 (PST) In-Reply-To: <863733fb5p.fsf@gmail.com> References: <1515363510-18374-1-git-send-email-b7.10110111@gmail.com> <863733fb5p.fsf@gmail.com> From: Ruslan Kabatsayev Date: Thu, 18 Jan 2018 15:42:00 -0000 Message-ID: Subject: Re: [PATCH] Make tests expect [ \t]+ pattern instead of \t for "info reg" command To: Yao Qi Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00371.txt.bz2 On 18 January 2018 at 18:18, Yao Qi wrote: > Ruslan Kabatsayev writes: > >> This will allow to format output of "info reg" command as we wish, > > What output format do you wish? > >> without breaking the tests. In particular, it'll let us correctly align >> raw and natural values of the registers using spaces instead of current >> badly-working approach with tabs. > > Why alignment with tabs is "badly-working"? Do you have some other > patches to change the output of "info reg"? For your questions of "what format" and "why current is bad" please see my previously sent (but not applied) patch: https://sourceware.org/ml/gdb-patches/2017-07/msg00046.html (and its follow-up version 2: https://sourceware.org/ml/gdb-patches/2017-07/msg00406.html ). In short, "info reg" prints three columns, and the third one is aligned by a single tab. This works well only in two cases: all registers have short hex values (i.e. less than 8 chars wide), or all have long values. Then the tab shifts the third column of values to the same terminal character column. Initially (in the patch linked above) I wanted to preserve the tab and only pad it with subsequent spaces to a fixed column, thus avoiding breaking the tests, but after the discussion I understood that it's too hacky to be a solution, and it's better to fix the tests and then use space-only alignment, similarly to what is done with the second column. As for "some other patches", I don't have any particular change in mind currently. > > -- > Yao (=E9=BD=90=E5=B0=A7)