Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches@sourceware.org, Tom Tromey <tromey@redhat.com>,
	       Eli Zaretskii <eliz@gnu.org>,
	Phil Muldoon <pmuldoon@redhat.com>,
	       ratmice@gmail.com, Doug Evans <dje@google.com>
Subject: [patch KFAIL] Re: FAILing new testcase for -fdebug-types-section (PR symtab/14148)
Date: Wed, 23 May 2012 21:38:00 -0000	[thread overview]
Message-ID: <20120523213812.GA26412@host2.jankratochvil.net> (raw)
In-Reply-To: <20120505071306.GA9206@host2.jankratochvil.net>

On Sat, 05 May 2012 09:13:06 +0200, Jan Kratochvil wrote:
> On Sat, 05 May 2012 09:10:44 +0200, Siva Chandra wrote:
> > If you feel there
> > is no urgency in eliminating the failure you are seeing, I will dig a
> > little more into this and start a discussion in a few days.
> 
> A patch should go in only if it is understood why.

I have filed:
	-fdebug-types-section regresses ststic scope of types
	http://sourceware.org/bugzilla/show_bug.cgi?id=14148

As I do not intend to fix it proposing KFAIL below.  The fix needs to start
tracking types signatures during psymtab building to look up the type name
during psymtab-scanning DW_TAG_variable.


Thanks,
Jan


2012-05-23  Siva Chandra Reddy  <sivachandra@gmail.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	Setup KFAIL symtab/14148.
	* py-symbol.c (static_func): New static function.
	(main): New variable result1, call static_func.
	* py-symtab.exp (Test static_func in static symbols): New test.
	(Test simple_struct in static symbols): KFAIL it with .debug_types.

diff --git a/gdb/testsuite/gdb.python/py-symbol.c b/gdb/testsuite/gdb.python/py-symbol.c
index 8c6cdb1..92eb7cd 100644
--- a/gdb/testsuite/gdb.python/py-symbol.c
+++ b/gdb/testsuite/gdb.python/py-symbol.c
@@ -49,18 +49,25 @@ struct simple_struct
   int a;
 };
 
+static int
+static_func (int a, int b)
+{
+  return a + b;
+}
+
 int main (int argc, char *argv[])
 {
 #ifdef __cplusplus
   SimpleClass sclass;
 #endif
   int a = 0;
-  int result;
+  int result, result1;
   struct simple_struct ss = { 10 };
   enum tag {one, two, three};
   enum tag t = one;
 
   result = func (42);
+  result1 = static_func (5, 10);
 
 #ifdef __cplusplus
   sclass.seti (42);
diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
index 6eec611..689b42a 100644
--- a/gdb/testsuite/gdb.python/py-symtab.exp
+++ b/gdb/testsuite/gdb.python/py-symtab.exp
@@ -71,6 +71,17 @@ gdb_test "python print \"func\" in global_symbols" "True" "Test func in global s
 gdb_test "python print \"main\" in global_symbols" "True" "Test main in global symbols"
 gdb_test "python print \"int\" in static_symbols" "True" "Test int in static symbols"
 gdb_test "python print \"char\" in static_symbols" "True" "Test char in static symbols"
+gdb_test "python print \"static_func\" in static_symbols" "True" "Test static_func in static symbols"
+
+set readelf_program [transform readelf]
+set command "exec $readelf_program -WS $binfile"
+verbose -log "command is $command"
+set result [catch $command output]
+verbose -log "result is $result"
+verbose -log "output is $output"
+if {$result == 0 && [regexp { \.debug_types } $output]} {
+    setup_kfail symtab/14148 "*-*-*"
+}
 gdb_test "python print \"simple_struct\" in static_symbols" "True" "Test simple_struct in static symbols"
 
 # Test is_valid when the objfile is unloaded.  This must be the last


  reply	other threads:[~2012-05-23 21:38 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17  8:39 [RFC - Python scripting] New methods Symtab.global_block and Symtab.static_block (docs included) Siva Chandra
2012-04-17 13:00 ` Phil Muldoon
2012-04-17 17:34   ` Siva Chandra
2012-04-17 17:44     ` Tom Tromey
2012-04-17 17:41   ` Tom Tromey
2012-04-17 17:05 ` Eli Zaretskii
     [not found]   ` <CAGyQ6gxxEeYeCKw_iHXh74Gg223GHxMoW=gvt9kU+ax396kKBQ@mail.gmail.com>
2012-04-18  9:15     ` Siva Chandra
2012-04-18 20:45       ` Phil Muldoon
2012-04-18 20:48         ` Tom Tromey
2012-04-19 17:33           ` Siva Chandra
2012-04-19 19:18             ` Doug Evans
2012-04-20  6:48               ` Siva Chandra
2012-04-20 12:12                 ` Matt Rice
2012-04-20 14:16                   ` Doug Evans
2012-04-20 15:21                   ` Matt Rice
2012-04-20 19:12                   ` Tom Tromey
2012-04-20 19:53                     ` Doug Evans
2012-04-20 19:57                       ` Siva Chandra
2012-04-23 13:21                         ` Tom Tromey
2012-04-23 13:35                           ` Phil Muldoon
2012-04-23 14:11                             ` Eli Zaretskii
2012-04-23 14:45                               ` Phil Muldoon
2012-04-23 16:00                                 ` Eli Zaretskii
2012-04-24 11:15                                   ` Siva Chandra
2012-04-24 17:40                                     ` Eli Zaretskii
2012-04-25  7:11                                   ` Tom Tromey
2012-04-25  8:19                                     ` Siva Chandra
2012-04-26 12:35                                     ` Siva Chandra
2012-04-26 15:21                                       ` Doug Evans
2012-05-02 17:41                                         ` Siva Chandra
2012-05-02 18:15                                           ` Doug Evans
2012-05-03  7:13                                             ` Siva Chandra
2012-05-04 18:05                                               ` FAILing new testcase for -fdebug-types-section [Re: [RFC - Python scripting] New methods Symtab.global_block and Symtab.static_block (docs included)] Jan Kratochvil
2012-05-05  7:01                                                 ` Siva Chandra
2012-05-05  7:05                                                   ` Jan Kratochvil
2012-05-05  7:11                                                     ` Siva Chandra
2012-05-05  7:13                                                       ` Jan Kratochvil
2012-05-23 21:38                                                         ` Jan Kratochvil [this message]
2012-04-18 20:48       ` [RFC - Python scripting] New methods Symtab.global_block and Symtab.static_block (docs included) Tom Tromey
2012-04-20  8:13       ` Eli Zaretskii
2012-04-17 17:37 ` Tom Tromey
2012-04-18 18:41   ` Tom Tromey
2012-04-18 19:53     ` Siva Chandra
2012-04-18 20:49       ` Tom Tromey

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=20120523213812.GA26412@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=ratmice@gmail.com \
    --cc=sivachandra@google.com \
    --cc=tromey@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