From: Daniel Jacobowitz <drow@false.org>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Fix python indented multi-line commands
Date: Wed, 13 Aug 2008 12:41:00 -0000 [thread overview]
Message-ID: <20080813124117.GB20573@caradoc.them.org> (raw)
In-Reply-To: <g7tvk3$lck$1@ger.gmane.org>
On Wed, Aug 13, 2008 at 03:40:03AM -0300, Thiago Jung Bauermann wrote:
> Hi,
>
> Today, if you try to use indentation in Python code within GDB you will
> get this error:
>
> (gdb) python
> >def foo ():
> > print 'hooray'
> >end
> File "<string>", line 2
> print 'hooray'
> ^
> IndentationError: expected an indented block
>
> The patch below, extracted from the python branch, fixes the problem.
> It changes GDB to not trim whitespace from the beginning of the line
> when storing multi-line commands internally. Tested with no regressions
> on x86_64-linux. Ok?
>
> :ADDPATCH cli:
:REVIEWMAIL:
This is OK. Could you add a second test for this bit?
> @@ -1386,7 +1404,7 @@ document_command (char *comname, int fro
> error (_("Command \"%s\" is built-in."), comname);
>
> sprintf (tmpbuf, "Type documentation for \"%s\".", comname);
> - doclines = read_command_lines (tmpbuf, from_tty);
> + doclines = read_command_lines (tmpbuf, from_tty, 0);
>
> if (c->doc)
> xfree (c->doc);
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-08-13 12:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 6:41 Thiago Jung Bauermann
2008-08-13 12:41 ` Daniel Jacobowitz [this message]
2008-08-13 18:22 ` Eli Zaretskii
2008-08-14 3:57 ` Thiago Jung Bauermann
2008-08-14 19:21 ` Eli Zaretskii
2008-08-14 19:42 ` Thiago Jung Bauermann
2008-08-15 4:13 ` Daniel Jacobowitz
2008-08-16 20:40 ` Thiago Jung Bauermann
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=20080813124117.GB20573@caradoc.them.org \
--to=drow@false.org \
--cc=bauerman@br.ibm.com \
--cc=gdb-patches@sources.redhat.com \
/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