From: Doug Evans <dje@google.com>
To: Pedro Alves <palves@redhat.com>
Cc: Keith Seitz <keiths@redhat.com>,
Joel Brobecker <brobecker@adacore.com>,
psmith@gnu.org, gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [patch] Improve symbol lookup performance noted in PR 15519
Date: Thu, 06 Jun 2013 19:03:00 -0000 [thread overview]
Message-ID: <CADPb22SDUhHBWe+c8Bzj1nj4+WLgSD+B6RHYRBqrMqQuMTsy6w@mail.gmail.com> (raw)
In-Reply-To: <51B06201.7010507@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]
On Thu, Jun 6, 2013 at 3:18 AM, Pedro Alves <palves@redhat.com> wrote:
>> # Check inheritance of typedefs.
>> -foreach klass {"A" "D" "E" "F"} {
>> +foreach klass {"A" "D" "E" "F" "A2" "D2"} {
>> gdb_test "ptype ${klass}::value_type" "type = int"
>> gdb_test "whatis ${klass}::value_type" "type = int"
>> gdb_test "p (${klass}::value_type) 0" " = 0"
>> @@ -57,6 +58,13 @@ if ![runto 'marker1'] then {
>> continue
>> }
>>
>> +# Check inheritance of typedefs again, but this time with an active block.
>> +foreach klass {"A" "D" "A2" "D2"} {
>> + gdb_test "ptype ${klass}::value_type" "type = int"
>> + gdb_test "whatis ${klass}::value_type" "type = int"
>> + gdb_test "p (${klass}::value_type) 0" " = 0"
>> +}
>> +
>
> Looks like this will create duplicate messages in gdb.sum.
> Could you use with_test_prefix to make them unique please?
Fixed.
>> # Print class types and values.
>> Index: testsuite/gdb.cp/derivation2.cc
>> ===================================================================
>> RCS file: testsuite/gdb.cp/derivation2.cc
>> diff -N testsuite/gdb.cp/derivation2.cc
>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>> +++ testsuite/gdb.cp/derivation2.cc 5 Jun 2013 22:21:18 -0000
>> @@ -0,0 +1,49 @@
> ...
>> + You should have received a copy of the GNU General Public License
>> + along with this program. If not, see <http://www.gnu.org/licenses/>.
>> + */
>
> (this placement for */ looks a little odd.)
Cut-n-paste from derivation.cc.
bash$ grep "^ *[*]/$" testsuite/*/*.* | wc
277 482 7364
I'm not going to worry about it.
[-- Attachment #2: gdb-130606-derivation-test-names-1.patch.txt --]
[-- Type: text/plain, Size: 2059 bytes --]
2013-06-06 Doug Evans <dje@google.com>
* gdb.cp/derivation.exp: Make tests have unique names.
Index: gdb.cp/derivation.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/derivation.exp,v
retrieving revision 1.25
diff -u -p -r1.25 derivation.exp
--- gdb.cp/derivation.exp 5 Jun 2013 22:28:51 -0000 1.25
+++ gdb.cp/derivation.exp 6 Jun 2013 18:59:35 -0000
@@ -40,15 +40,17 @@ if {[prepare_for_testing $testfile.exp $
}
# Check inheritance of typedefs.
-foreach klass {"A" "D" "E" "F" "A2" "D2"} {
- gdb_test "ptype ${klass}::value_type" "type = int"
- gdb_test "whatis ${klass}::value_type" "type = int"
- gdb_test "p (${klass}::value_type) 0" " = 0"
-}
-foreach klass {"Z" "ZZ"} {
- gdb_test "ptype ${klass}::value_type" "type = float"
- gdb_test "whatis ${klass}::value_type" "type = float"
- gdb_test "p (${klass}::value_type) 0" " = 0"
+with_test_prefix "before run" {
+ foreach klass {"A" "D" "E" "F" "A2" "D2"} {
+ gdb_test "ptype ${klass}::value_type" "type = int"
+ gdb_test "whatis ${klass}::value_type" "type = int"
+ gdb_test "p (${klass}::value_type) 0" " = 0"
+ }
+ foreach klass {"Z" "ZZ"} {
+ gdb_test "ptype ${klass}::value_type" "type = float"
+ gdb_test "whatis ${klass}::value_type" "type = float"
+ gdb_test "p (${klass}::value_type) 0" " = 0"
+ }
}
# Set it up at a breakpoint so we can play with the variable values.
@@ -59,10 +61,12 @@ if ![runto 'marker1'] then {
}
# Check inheritance of typedefs again, but this time with an active block.
-foreach klass {"A" "D" "A2" "D2"} {
- gdb_test "ptype ${klass}::value_type" "type = int"
- gdb_test "whatis ${klass}::value_type" "type = int"
- gdb_test "p (${klass}::value_type) 0" " = 0"
+with_test_prefix "at marker1" {
+ foreach klass {"A" "D" "A2" "D2"} {
+ gdb_test "ptype ${klass}::value_type" "type = int"
+ gdb_test "whatis ${klass}::value_type" "type = int"
+ gdb_test "p (${klass}::value_type) 0" " = 0"
+ }
}
gdb_test "up" ".*main.*" "up from marker1"
next prev parent reply other threads:[~2013-06-06 19:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 23:27 Doug Evans
2013-05-31 3:42 ` Joel Brobecker
2013-05-31 9:40 ` Pedro Alves
2013-05-31 22:33 ` Doug Evans
2013-06-03 6:01 ` Joel Brobecker
2013-06-03 17:27 ` Pedro Alves
2013-06-05 22:31 ` Doug Evans
2013-06-06 10:18 ` Pedro Alves
2013-06-06 19:03 ` Doug Evans [this message]
2013-06-07 14:50 ` Fix formating in copyright headers. (was: Re: [patch] Improve symbol lookup performance noted in PR 15519) Pedro Alves
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=CADPb22SDUhHBWe+c8Bzj1nj4+WLgSD+B6RHYRBqrMqQuMTsy6w@mail.gmail.com \
--to=dje@google.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
--cc=palves@redhat.com \
--cc=psmith@gnu.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