From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4761 invoked by alias); 30 Jul 2012 17:29:38 -0000 Received: (qmail 4750 invoked by uid 22791); 30 Jul 2012 17:29:36 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-ob0-f201.google.com (HELO mail-ob0-f201.google.com) (209.85.214.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Jul 2012 17:29:17 +0000 Received: by obbun3 with SMTP id un3so3662721obb.0 for ; Mon, 30 Jul 2012 10:29:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:content-type:content-transfer-encoding:message-id:date :to:cc:subject:in-reply-to:references:x-mailer:from :x-gm-message-state; bh=Z9iAGoJ1xQDQIxs7yk1TjSnV2VT4Wyd5z8wCfug5fu4=; b=JhNSKBWPGIAZ6lgqj/8YHkGyE4qpWFqDrsBvL761UVmQnjX6VgsNZnpqC91ksW4/cB qMbvbEh82DdIPgWj5YMZHhX1/A8luX6v7IrMNS498qfR691u/VfUsW1kN/3oV+GcDEnu QBePkvOT4qjzSW7Qwe9+AWi1HZeBqGqlU/APmNXSZYwWg1cS2TEn8usBunmtCHdpmGwX rL/T1VOJqlKlmznnUaKVZx1i0qHib2eD8QnCCyR2Mr7JKiiTewPBMxnibR9V5kAejip0 dN4IA6A7MhQayXzvW8lXwWYb+zzWae2oQGJP8zUXglbN7VOyRoqLdSdFwkVeRvxlbN5b 9rMA== Received: by 10.43.54.203 with SMTP id vv11mr4947773icb.11.1343669356601; Mon, 30 Jul 2012 10:29:16 -0700 (PDT) Received: by 10.43.54.203 with SMTP id vv11mr4947765icb.11.1343669356550; Mon, 30 Jul 2012 10:29:16 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id po8si2430904igc.1.2012.07.30.10.29.16 (version=TLSv1/SSLv3 cipher=AES128-SHA); Mon, 30 Jul 2012 10:29:16 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com (ruffy2.mtv.corp.google.com [172.18.110.129]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 63D7710004D; Mon, 30 Jul 2012 10:29:15 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20502.50281.392575.922986@ruffy2.mtv.corp.google.com> Date: Mon, 30 Jul 2012 17:29:00 -0000 To: Andreas Schwab Cc: Pedro Alves , gdb-patches@sourceware.org, ratmice@gmail.com Subject: Re: [RFA] massively speed up "info var foo" on large programs In-Reply-To: References: <20120524175852.D38381E139C@ruffy2.mtv.corp.google.com> <4FBF47DD.4030100@redhat.com> <4FC91A33.5040900@redhat.com> <4FCCCE27.2060804@redhat.com> From: dje@google.com X-Gm-Message-State: ALoCoQn9Jj4qeoySkPuOrbNrJU75G0W+DbbGPFFP1O7/Qbgsv1cQ/VCgUpo29qErc8kPslo1UuqTM2utYFOb85+/Zq9sIzAXU7UCvBg2FN11bz5A2FEVe0ocoCYuCBJqnKiX1/0o5Ts5BT6Z6azX7fSBiI+VfZVUO8yIIARf1pqPqHXTikDcnai0P25GMxq081wsVr3NZAl4 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00769.txt.bz2 Andreas Schwab writes: > Doug Evans writes: > > > + set match_str {All functions matching regular expression "foo":[\r\n]*} > > + if { "$libsepdebug" != "NO" } { > > + append match_str {File .*/info-fun-solib[.]c:[\r\n]*} > > + append match_str {int foo\(void\);[\r\n]*} > > + } > > + append match_str {Non-debugging symbols:[\r\n]*} > > + append match_str "$hex *foo(@plt)?\[\r\n\]*" > > + if { "$libsepdebug" == "NO" } { > > + append match_str "$hex *foo\[\r\n\]*" > > + } > > + > > + gdb_test "info fun foo" "$match_str" > > +}} > > (gdb) info fun foo > All functions matching regular expression "foo": > > Non-debugging symbols: > 0x0000000010000578 00000011.plt_call.foo+0 > 0x00000000100008e8 foo@plt > 0x00000fffb7fae73c .foo > (gdb) FAIL: gdb.base/info-fun.exp: NO: info fun foo > > (gdb) info fun foo > All functions matching regular expression "foo": > > File ./gdb.base/info-fun-solib.c: > int foo(void); > > Non-debugging symbols: > 0x0000000010000578 00000011.plt_call.foo+0 > 0x00000000100008e8 foo@plt > (gdb) FAIL: gdb.base/info-fun.exp: IN: info fun foo > > (gdb) info fun foo > All functions matching regular expression "foo": > > File ./gdb.base/info-fun-solib.c: > int foo(void); > > Non-debugging symbols: > 0x0000000010000578 00000011.plt_call.foo+0 > 0x00000000100008e8 foo@plt > (gdb) FAIL: gdb.base/info-fun.exp: SEP: info fun foo > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different." Hi. I'm not sure how much effort to put into handling all the variations here. I'm happy with this, but I'm also happy with anything that fixes your regression. This is regression tested on amd64-linux. Can you try this on m68k-linux? Thanks. 2012-07-30 Doug Evans * gdb.base/info-fun.exp: Fix failures on m68k-linux. Index: info-fun.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/info-fun.exp,v retrieving revision 1.2 diff -u -p -r1.2 info-fun.exp --- info-fun.exp 21 Jun 2012 20:46:22 -0000 1.2 +++ info-fun.exp 30 Jul 2012 17:23:47 -0000 @@ -67,9 +67,16 @@ foreach libsepdebug {NO IN SEP} { with_t append match_str {int foo\(void\);[\r\n]*} } append match_str {Non-debugging symbols:[\r\n]*} + # Note: Targets like m68k-linux also have, e.g., 00000011.plt_call.foo+0. + set plt_foo_match "($hex \[^\r\n\]*plt\[^\r\n\]*foo\[^\r\n\]*\[\r\n\]*)?" + append match_str $plt_foo_match + # This text we want to match more precisely. append match_str "$hex *foo(@plt)?\[\r\n\]*" + # Watch for again to not have to worry about the order of appearance. + append match_str $plt_foo_match if { "$libsepdebug" == "NO" } { - append match_str "$hex *foo\[\r\n\]*" + # Note: The ".?" is for targets like m68k-linux that have ".foo" here. + append match_str "$hex *.?foo\[\r\n\]*" } gdb_test "info fun foo" "$match_str"