From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Joel Brobecker'" <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [PATCH] avoid GDB crash on inspection of pascal arrays
Date: Tue, 09 Mar 2010 08:40:00 -0000 [thread overview]
Message-ID: <000001cabf64$1d025f50$57071df0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20100309051651.GM3081@adacore.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : Tuesday, March 09, 2010 6:17 AM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [PATCH] avoid GDB crash on inspection of pascal arrays
>
> > Formatting with the tab/spaces conversion is still a nightmare
> > for me...
>
> (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)
>
> > 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?
>
> 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.
>
> 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:
>
> 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
next prev parent reply other threads:[~2010-03-09 8:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 16:55 Pierre Muller
2010-03-08 18:43 ` Kevin Buettner
2010-03-08 19:18 ` Pierre Muller
2010-03-08 18:55 ` Joel Brobecker
2010-03-08 23:30 ` Pierre Muller
2010-03-09 5:17 ` Joel Brobecker
2010-03-09 5:17 ` Joel Brobecker
2010-03-09 8:40 ` Pierre Muller [this message]
2010-03-09 17:33 ` Eli Zaretskii
2010-03-09 17:56 ` Joel Brobecker
2010-03-09 18:33 ` Eli Zaretskii
2010-03-09 18:33 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001cabf64$1d025f50$57071df0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox