Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [python][patch] Add GDB Parameters functionality
Date: Wed, 28 Apr 2010 17:15:00 -0000	[thread overview]
Message-ID: <83fx2fxzut.fsf@gnu.org> (raw)
In-Reply-To: <4BD7FD3E.5000802@redhat.com>

> Date: Wed, 28 Apr 2010 10:17:50 +0100
> From: Phil Muldoon <pmuldoon@redhat.com>
> CC: gdb-patches@sourceware.org
> 
> In the case of PARAM_STRING (which directly maps to the GDB enum
> var_type {var_string} (found in command.h)), the string is parsed one
> character at a time. If the character being currently processed equals
> a '\', parse_escape (utils.c) is called with the pointer to the string
> that points to this character as an argument.  The parse_escape
> function seems to be called during most output emitted by GDB.  In
> parse escape, the character after the '\' is fetched, and that
> character runs through an a switch.
> 
> If the case is a literal octal, the next two characters are fetched
> and converted to the character the octal escape sequence
> represents. (i.e. in our example \107 will be translated to 'G')
> 
> If the character is an a,b,f,n,r,t, or v then that character is
> returned as '\a', or '\b', or '\f' and so on.  This means that in the
> string 'Good\tDay', \t will be processed and returned as it is. So C
> escape characters are acknowledged and returned intact.

Thank you for your effort.  In that case, I suggest the following
text:

 @item PARAM_STRING
 The value is a string.  When the user modifies the string, any escape
 sequences, such as @samp{\t}, @samp{\f}, and octal escapes, are
 translated into corresponding characters and encoded into the current
 host charset.

(Is it true that GDB encodes into host charset?  If not, please modify
as appropriate.)


  reply	other threads:[~2010-04-28 17:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 13:19 Phil Muldoon
2010-04-26 17:56 ` Eli Zaretskii
2010-04-27 12:26   ` Phil Muldoon
2010-04-27 17:45     ` Eli Zaretskii
2010-04-27 19:25       ` Phil Muldoon
2010-04-27 19:36         ` Eli Zaretskii
2010-04-27 20:05           ` Phil Muldoon
2010-04-28  2:59             ` Eli Zaretskii
2010-04-28  6:28               ` Phil Muldoon
2010-04-28  9:18                 ` Phil Muldoon
2010-04-28 17:15                   ` Eli Zaretskii [this message]
2010-04-28 20:31                     ` Phil Muldoon
2010-04-29  3:06                       ` Eli Zaretskii
2010-04-29 16:13                         ` Phil Muldoon
2010-04-26 21:45 ` Tom Tromey
2010-04-26 21:52   ` Phil Muldoon
2010-04-27  3:09     ` 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=83fx2fxzut.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@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