Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: dje@google.com
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Pedro Alves <palves@redhat.com>,
	   gdb-patches@sourceware.org,    ratmice@gmail.com
Subject: Re: [RFA] massively speed up "info var foo" on large programs
Date: Mon, 30 Jul 2012 17:29:00 -0000	[thread overview]
Message-ID: <20502.50281.392575.922986@ruffy2.mtv.corp.google.com> (raw)
In-Reply-To: <m2d33sjein.fsf@igel.home>

Andreas Schwab writes:
 > Doug Evans <dje@google.com> 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  <dje@google.com>

	* 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"


  reply	other threads:[~2012-07-30 17:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 17:59 Doug Evans
2012-05-24 21:28 ` Doug Evans
2012-05-25  4:29   ` Matt Rice
2012-05-25  8:21   ` Doug Evans
2012-05-25  8:51     ` Pedro Alves
2012-05-28  4:49       ` Doug Evans
2012-05-31 18:53         ` Doug Evans
2012-06-01 19:38         ` Pedro Alves
2012-06-04  4:06           ` Doug Evans
2012-06-04 15:03             ` Pedro Alves
2012-06-19  0:58               ` Doug Evans
2012-07-19  9:18                 ` Andreas Schwab
2012-07-30 17:29                   ` dje [this message]
2012-07-31  7:19                     ` Sergio Durigan Junior
2012-08-01  5:18                       ` Sergio Durigan Junior
2012-08-01 19:30                         ` dje
2012-05-25 10:04     ` Matt Rice

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=20502.50281.392575.922986@ruffy2.mtv.corp.google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=ratmice@gmail.com \
    --cc=schwab@linux-m68k.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