Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Abhijit Halder <abhijit.k.halder@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][TEST-CASE][DOC] Implementation of pipe to pass GDB's command output to a shell command.
Date: Mon, 05 Sep 2011 15:57:00 -0000	[thread overview]
Message-ID: <CAOhZP9w47EuB3r_F5QSsG6M61bJUw09CHyTpeYivirgBwT++6g@mail.gmail.com> (raw)
In-Reply-To: <CAOhZP9xuSeSLsqMP1ZwCp+VMGNL7msLH4DELdQTz-7a0Y13V4w@mail.gmail.com>

On Mon, Sep 5, 2011 at 5:23 PM, Abhijit Halder
<abhijit.k.halder@gmail.com> wrote:
> On Sun, Sep 4, 2011 at 8:35 PM, Abhijit Halder
> <abhijit.k.halder@gmail.com> wrote:
>> On Sun, Sep 4, 2011 at 8:22 PM, Jan Kratochvil
>> <jan.kratochvil@redhat.com> wrote:
>>> On Sat, 03 Sep 2011 11:21:19 +0200, Abhijit Halder wrote:
>>>> >> +    regsub -all {\$[0-9]+} $fdata {} pattern
>>>> >> +    if ![string match $pattern " = 120 'x'\n"] then {
>>>> >
>>>> > Instead of regsub + string match just:
>>>> >    if ![string match "* = 120 'x'\n" $fdata] then {
>>>> >
>>>> The intention was to eliminate only numeric patterns here.
>>>> Instead if I used "if ![string match "* = 120 'x'\n" $fdata] then {"
>>>> following pattern will also match:
>>>> $junk = 120 'x'
>>>> that I did not want.
>>>
>>> It is currently a common practice to match this kind of pattern just from
>>> ` = ' upwards such as:
>>> gdb_test "p callme ()" " = 42"
>>> etc. everywhere in the testsuite.
>>>
>>> But if you want to match the initial $number part such as in
>>> gdb_test "print test1.test" "\\$\[0-9\]* = true" "simple object, const bool"
>>> then it is more simple by:
>>>    if ![regexp {^\$[0-9]+ = 120 'x'\n$} $fdata] then {
>>>
>> Got it. Correcting the same in the next patch.
>>>
>>> Thanks,
>>> Jan
>>>
>>
>
>
>
>
> *********************************************************************************
> Following invalid c-statements are getting parsed successfully:
> 1. int(*)
> 2. int*(*)
> 3. int(*)()()
> 4. int*(*)()()
> 5. int(*)()()()
> 6. int*(*)()()()
> 7. int*(*)()[]()
> ....etc.
>
> Following valid c-statement failed to be parsed:
> 1. int(**)()
>
> Probably a few more may appear.........
> I am putting all this as the test-cases.
>
> Thanks,
> Abhijit Halder
>
>
> 2. int*(**)()
> 3.
>

Sorry for using this thread to post this. Anyway the above statements
were not correct. The c-statement told as "invalid" are actually
valid. In gdb some of then are just not being displayed properly. Once
again sorry for this confusion.


Regards,
Abhijit Halder


      reply	other threads:[~2011-09-05 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 15:09 Abhijit Halder
2011-09-02 21:04 ` Jan Kratochvil
2011-09-03  9:32   ` Abhijit Halder
2011-09-04 15:05     ` Jan Kratochvil
2011-09-04 17:05       ` Abhijit Halder
2011-09-05 11:56         ` Abhijit Halder
2011-09-05 15:57           ` Abhijit Halder [this message]

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=CAOhZP9w47EuB3r_F5QSsG6M61bJUw09CHyTpeYivirgBwT++6g@mail.gmail.com \
    --to=abhijit.k.halder@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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