From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15160 invoked by alias); 9 Mar 2010 08:40:55 -0000 Received: (qmail 14997 invoked by uid 22791); 9 Mar 2010 08:40:37 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Mar 2010 08:40:28 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id o298duNK098941 ; Tue, 9 Mar 2010 09:39:56 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o298duif085811 ; Tue, 9 Mar 2010 09:39:56 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o298dtCk026392 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Tue, 9 Mar 2010 09:39:55 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Joel Brobecker'" Cc: References: <001801cabee0$31499ca0$93dcd5e0$@muller@ics-cnrs.unistra.fr> <20100308185450.GK3081@adacore.com> <001201cabf17$43e1b960$cba52c20$@muller@ics-cnrs.unistra.fr> <20100309051651.GM3081@adacore.com> In-Reply-To: <20100309051651.GM3081@adacore.com> Subject: RE: [PATCH] avoid GDB crash on inspection of pascal arrays Date: Tue, 09 Mar 2010 08:40:00 -0000 Message-ID: <000001cabf64$1d025f50$57071df0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 X-SW-Source: 2010-03/txt/msg00351.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Joel Brobecker > Envoy=E9=A0: Tuesday, March 09, 2010 6:17 AM > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [PATCH] avoid GDB crash on inspection of pascal arrays >=20 > > Formatting with the tab/spaces conversion is still a nightmare > > for me... >=20 > (you could get me started on a rambling about the rid^H^H^Huse of > tabs instead of spaces in our source code - I just can't get over > these tabs) >=20 > > I really don't know vi enough to reformat correctly an almost 100 > > lines long block... Is there a neat way to do this just with vi > > or do I need something more powerful? >=20 > I think that the canonical tool for formatting is emacs. Each time > I mentioned the idea of getting rid of tabs, some said that the > formatting rules need to match what emacs does. For a GNU project, > it's probably fair. >=20 > Unfortunately, I don't remember emacs anymore. There has to be an > equivalent way in vim (auto-formatting with a single command), but > I don't know, so here is how I do it with vim: >=20 > 1. Get rid of all tabs first, they get in the way of selecting > the columns I want to delete or add: > :set expandtab > select all the lines I want to reformat (shift-v) > while the selection is still active, enter > :'<,'>retab! > (the '<,'> should appear automatically after you pressed :) > 2. Delete the columns you want to delete: > select the rectangle you want to delete (ctrl-v) > while the selection is active, press d > 3. Re-introduce the tabs: > :set noexpandtab > re-select all the lines to be tabified (shift-v) > while the selection is active, enter: > :'<,'>retab! This is quite tricky and I will need time to learn this ... Thanks for sharing this! > Attached is a couple of patches: > p-valprint-reformat.diff: The reformat itself; > p-valprint-reformat-w: The same diff, but with -w, to show that there > were no other real change except the removal > of the curly braces. > Can you test p-valprint-reformat.diff and then commit if it's OK? Checked and committed http://sourceware.org/ml/gdb-cvs/2010-03/msg00079.html Thanks Joel, Pierre