From: Siva Chandra <sivachandra@google.com>
To: Jan Kratochvil <jan.kratochvil@redhat.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: Re: FAILing new testcase for -fdebug-types-section [Re: [RFC - Python scripting] New methods Symtab.global_block and Symtab.static_block (docs included)]
Date: Sat, 05 May 2012 07:01:00 -0000 [thread overview]
Message-ID: <CAGyQ6gzfzQniMde9Vaof9h5Bw764k0NUzPo5yx+uw82wt0LZcA@mail.gmail.com> (raw)
In-Reply-To: <20120504180458.GA32257@host2.jankratochvil.net>
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
On Fri, May 4, 2012 at 11:34 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> Hi Siva,
>
> by using -fdebug-types-section one gets:
>
> runtest CC_FOR_TARGET="gcc -gdwarf-4 -fdebug-types-section -g0" CXX_FOR_TARGET="g++ -gdwarf-4 -fdebug-types-section -g0" gdb.python/py-symtab.exp
>
> python print "simple_struct" in static_symbols
> -True
> -(gdb) PASS: gdb.python/py-symtab.exp: Test simple_struct in static symbols
> +False
> +(gdb) FAIL: gdb.python/py-symtab.exp: Test simple_struct in static symbols
I think the attached patch should eliminate this failure. Can you
also test on your side to eliminate GCC version differences (I do not
think it matters, but I want to double check)? All that I did is to
remove 'simple_struct' and its test, and add a static function and a
test for it.
testsuite:
2012-05-05 Siva Chandra Reddy <sivachandra@gmail.com>
* py-symbol.c (simple_struct): Remove
(static_func): New static func
* py-symtab.exp: Remove test to test presence of 'simple_struct'
in STATIC_BLOCK, add test to test presence of 'static_func' in
STATIC_BLOCK.
Thanks,
Siva Chandra
[-- Attachment #2: test_fix_patch_v1.txt --]
[-- Type: text/plain, Size: 1794 bytes --]
Index: py-symbol.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-symbol.c,v
retrieving revision 1.6
diff -u -p -r1.6 py-symbol.c
--- py-symbol.c 3 May 2012 07:07:26 -0000 1.6
+++ py-symbol.c 5 May 2012 06:36:41 -0000
@@ -44,10 +44,11 @@ int func (int arg)
return arg; /* Block break here. */
}
-struct simple_struct
+static int
+static_func (int a, int b)
{
- int a;
-};
+ return a + b;
+}
int main (int argc, char *argv[])
{
@@ -55,12 +56,12 @@ int main (int argc, char *argv[])
SimpleClass sclass;
#endif
int a = 0;
- int result;
- struct simple_struct ss = { 10 };
+ int result, result1;
enum tag {one, two, three};
enum tag t = one;
result = func (42);
+ result1 = static_func (5, 10);
#ifdef __cplusplus
sclass.seti (42);
Index: py-symtab.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-symtab.exp,v
retrieving revision 1.9
diff -u -p -r1.9 py-symtab.exp
--- py-symtab.exp 3 May 2012 07:07:26 -0000 1.9
+++ py-symtab.exp 5 May 2012 06:36:41 -0000
@@ -71,7 +71,7 @@ gdb_test "python print \"func\" in globa
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 \"simple_struct\" in static_symbols" "True" "Test simple_struct in static symbols"
+gdb_test "python print \"static_func\" in static_symbols" "True" "Test static_func in static symbols"
# Test is_valid when the objfile is unloaded. This must be the last
# test as it unloads the object file in GDB.
next prev parent reply other threads:[~2012-05-05 7:01 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 [this message]
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 ` [patch KFAIL] Re: FAILing new testcase for -fdebug-types-section (PR symtab/14148) Jan Kratochvil
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=CAGyQ6gzfzQniMde9Vaof9h5Bw764k0NUzPo5yx+uw82wt0LZcA@mail.gmail.com \
--to=sivachandra@google.com \
--cc=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=pmuldoon@redhat.com \
--cc=ratmice@gmail.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