From: Michael Snyder <msnyder@vmware.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Tom Tromey <tromey@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Vladimir Prus <vladimir@codesourcery.com>,
"dan@codesourcery.com" <dan@codesourcery.com>
Subject: Re: [RFA] add test for memattr, use get_number_or_range for memattr commands
Date: Tue, 22 Feb 2011 17:58:00 -0000 [thread overview]
Message-ID: <4D63F936.2000505@vmware.com> (raw)
In-Reply-To: <20110222082747.GQ2600@adacore.com>
Joel Brobecker wrote:
>> 2011-02-21 Michael Snyder <msnyder@vmware.com>
>>
>> * memattr.c (mem_enable_command): Use get_number_or_range.
>> (mem_disable_command): Ditto.
>> (mem_delete_command): Ditto.
>> (_initialize_mem): Tweak usage message to reflect multiple
>> arguments.
>>
>> 2011-02-21 Michael Snyder <msnyder@vmware.com>
>>
>> * gdb.base/memattr.exp: New test.
>> * gdb.base/memattr.c: Test load for memattr.exp.
>
> Overall, the patch looks OK to me.
>
>> +gdb_test_multiple "info address mem1" "get address of mem1" {
>> + -re "Symbol \"mem1\" is static storage at address ($hex).*$gdb_prompt $" {
>> + set mem1start $expect_out(1,string)
>> + }
>> +}
> [...]
>> +gdb_test_no_output "mem $mem1start $mem1end wo" "create mem region 1"
>
> I still think that, if the first quoted test does not pass, the second
> will cause the testcase to crash because mem1start is going to be
> undefined. This is what you're going to see when that happens:
>
> ERROR: tcl error sourcing /[...]/memattr.exp
> ERROR: can't read "mem1start": no such variable
> while executing
> "gdb_test_no_output "mem $mem1start $mem1end wo" "create mem region 1""
>
> But I'm OK with that, if that's OK with the others.
Hmmm, how about if I initialize mem1start etc. to -1?
Then the rest of the tests will fail but not crash.
Is that better?
next prev parent reply other threads:[~2011-02-22 17:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-20 1:44 Michael Snyder
2011-02-21 9:24 ` Joel Brobecker
2011-02-21 15:06 ` Tom Tromey
2011-02-21 19:55 ` Michael Snyder
2011-02-21 23:40 ` Michael Snyder
2011-02-22 8:51 ` Joel Brobecker
2011-02-22 17:58 ` Michael Snyder [this message]
2011-02-23 4:01 ` Joel Brobecker
2011-02-23 18:34 ` Michael Snyder
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=4D63F936.2000505@vmware.com \
--to=msnyder@vmware.com \
--cc=brobecker@adacore.com \
--cc=dan@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
--cc=vladimir@codesourcery.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