From: Daniel Jacobowitz <drow@false.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sources.redhat.com
Subject: Re: PATCH: tests for MI commands
Date: Sun, 31 Jul 2005 22:11:00 -0000 [thread overview]
Message-ID: <20050731221113.GC30901@nevyn.them.org> (raw)
In-Reply-To: <17128.14238.713213.954375@farnswood.snap.net.nz>
Again, sorry for not getting back to you on Thursday.
On Thu, Jul 28, 2005 at 01:40:46PM +1200, Nick Roberts wrote:
> I never intended to leave things broken. You have asked me to fix the
> failures, and I will, but I'm not sure if that means submit further patches to
> the mailing list or commit appropriate fixes. Based on Mark Kettenis' e-mail,
Submit patches, please.
> I attach a simple fix for mi-var-child.exp. Does it work in your case? I
> 2005-07-28 Nick Roberts <nickrob@snap.net.nz>
>
> * gdb.mi/mi-var-child.exp: Allow struct_declarations.character to be
> uninitialized.
First of all, it won't work. You added:
value=\"0 '\\\\\\\\$decimal'\"
which still has 0 in it :-)
Second, I get a value of 0 here, but the test still fails.
func_ptr_struct and func_ptr_ptr aren't initialized either. Chasing
uninitialized members is going to leave the tests script a bit of a
mess.
Initializing the whole structure proved to be a bit of a pain - these
tests are ridiculously tricky to edit. But here it is. Tested on
i686-pc-linux-gnu and committed. I hope this will be more useful if we
add any additional value-related tests.
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-07-31 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.mi/mi-var-child.c (do_children_tests): Initialize
struct_declarations.
* gdb.mi/mi-var-child.exp: Step over the initialization of
struct_declarations.
Index: gdb.mi/mi-var-child.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.c,v
retrieving revision 1.1
diff -u -p -r1.1 mi-var-child.c
--- gdb.mi/mi-var-child.c 31 Jul 2005 21:24:25 -0000 1.1
+++ gdb.mi/mi-var-child.c 31 Jul 2005 22:04:14 -0000
@@ -208,6 +208,7 @@ do_children_tests (void)
int bar;
struct _struct_decl struct_declarations;
+ memset (&struct_declarations, 0, sizeof (struct_declarations));
weird = &struct_declarations;
struct_declarations.integer = 123;
Index: gdb.mi/mi-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.exp,v
retrieving revision 1.19
diff -u -p -r1.19 mi-var-child.exp
--- gdb.mi/mi-var-child.exp 31 Jul 2005 21:24:25 -0000 1.19
+++ gdb.mi/mi-var-child.exp 31 Jul 2005 22:04:14 -0000
@@ -47,6 +47,10 @@ mi_runto do_children_tests
# #
##### #####
+# Step past the initialization of struct_declarations.
+set line_weird [gdb_get_line_number "weird = &struct_declarations;"]
+mi_execute_to "exec-next" "end-stepping-range" do_children_tests {} ".*${srcfile}" \
+ [expr $line_weird] {} "step \$line_weird"
# Test: c_variable-4.2
# Desc: create variable "struct_declarations"
next prev parent reply other threads:[~2005-07-31 22:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-20 4:51 Nick Roberts
2005-07-24 21:19 ` Daniel Jacobowitz
2005-07-26 23:31 ` Nick Roberts
2005-07-27 0:27 ` Daniel Jacobowitz
2005-07-27 3:04 ` Nick Roberts
2005-07-27 3:55 ` Daniel Jacobowitz
2005-07-27 11:46 ` Nick Roberts
2005-07-27 12:50 ` Bob Rossi
2005-07-27 20:52 ` Nick Roberts
2005-07-27 21:49 ` Daniel Jacobowitz
2005-07-27 22:09 ` Nick Roberts
2005-07-27 21:03 ` Mark Kettenis
2005-07-27 22:23 ` Nick Roberts
2005-07-28 0:08 ` Paul Gilliam
2005-07-28 0:18 ` Stan Shebs
2005-07-28 0:21 ` Daniel Jacobowitz
2005-07-28 1:39 ` Nick Roberts
2005-07-31 22:11 ` Daniel Jacobowitz [this message]
2005-07-31 23:32 ` Nick Roberts
2005-08-01 1:55 ` Daniel Jacobowitz
2005-07-27 21:25 ` Mark Kettenis
2005-07-29 7:32 ` Nick Roberts
2005-07-31 21:25 ` Daniel Jacobowitz
2005-07-31 23:32 ` Nick Roberts
2005-08-01 1:57 ` Daniel Jacobowitz
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=20050731221113.GC30901@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=mark.kettenis@xs4all.nl \
--cc=nickrob@snap.net.nz \
/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