Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Doug Evans" <dje@google.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] new command to search memory
Date: Wed, 09 Apr 2008 21:06:00 -0000	[thread overview]
Message-ID: <e394668d0804091337r68a71824qdbf54237119fe5d0@mail.gmail.com> (raw)
In-Reply-To: <20080226022335.GB4456@caradoc.them.org>

On Mon, Feb 25, 2008 at 7:23 PM, Daniel Jacobowitz <drow@false.org> wrote:
>  And for the search string, I guess the main reason that you didn't
>  use the normal language parsers was to avoid the malloc call:
>
>
>  > +      /* If we see a string, parse it ourselves rather than the normal
>  > +      handling of downloading it to target memory.  */
>
>  Can we use the language parsers, for consistency with other GDB
>  commands, if we fix this?  Which I happen to have a patch for.  I'll
>  dust it off and post it.  Then, someday, we can get wchar_t strings
>  here for free (I hope).
>
>  After that, we can (and should IMO) document in the manual that all
>  of the arguments to find are source language expressions.

If I want to search for   'h', 'e', 'l', 'l', 'o'   I won't be able to
use "hello" because that will now include the trailing nul.  Often one
will want the trailing nul, but it does make searching for substrings
kinda hard.  [For completeness' sake, one could change the definition
of what "hello" means in this context, and if one wants the trailing
nul, one has to explicitly specify it, e.g. "hello\0".  It's
C-specific though, and the find command is presumably not supposed to
know the user is thinking in C - that's the whole point.  I don't have
an opinion either way.]

Any suggestions or preferences for whether and how to make searching
for substrings not excessively clumsy?


  parent reply	other threads:[~2008-04-09 20:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14  2:20 Doug Evans
2008-02-14 19:54 ` Eli Zaretskii
2008-02-14 22:52   ` Doug Evans
2008-02-15  8:28     ` Eli Zaretskii
2008-02-16  5:39       ` Doug Evans
2008-02-16 13:33         ` Eli Zaretskii
2008-02-26  2:31 ` Daniel Jacobowitz
2008-02-29  3:13   ` Doug Evans
2008-02-29  3:58     ` Daniel Jacobowitz
2008-04-17  2:59       ` Doug Evans
2008-04-28 18:37         ` Fwd: " Doug Evans
2008-04-29  0:40           ` Eli Zaretskii
2008-05-09  6:46             ` Doug Evans
2008-05-09 14:35               ` Eli Zaretskii
2008-05-02 15:19         ` Daniel Jacobowitz
2008-05-09  6:35           ` Doug Evans
2008-05-09  7:33             ` Daniel Jacobowitz
2008-05-09 20:16           ` Doug Evans
2008-05-09 20:18             ` Daniel Jacobowitz
2008-04-09 21:06   ` Doug Evans [this message]
2008-05-02 15:37     ` Daniel Jacobowitz

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=e394668d0804091337r68a71824qdbf54237119fe5d0@mail.gmail.com \
    --to=dje@google.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