This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: cleanup some tests
- From: Daniel Jacobowitz <drow at false dot org>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 3 Jul 2006 11:48:59 -0400
- Subject: Re: cleanup some tests
- References: <4489DEA1.2000608@codesourcery.com>
On Fri, Jun 09, 2006 at 09:48:33PM +0100, Nathan Sidwell wrote:
> This patch cleans up a number of spurious test failures I encountered
>
> When using a remote stub to talk to a board, I found it necessary to run to
> main, in order to syncronize the debugger correctly.
This change is wrong. After the patch:
gdb_test "break main" ".*Breakpoint.* at .*" "set breakpoint at main"
gdb_run_cmd
# initial sal should be first statement in main
gdb_test "list" \
"v0 = 0;" \
"list before run"
You're no longer testing list-before-run. Probably the trouble comes
from the fact that gdb_load starts the program running on remote
targets. I bet that what you want is to replace the gdb_load with
gdb_file_cmd, and then do a gdb_load before the runto_main.
Secondly, gdb_run_cmd starts the program running. If you want to issue
another command, you've got to wait for it to stop first. Which boils
down to runto_main, already used just below.
> The remote.exp changes are obvious, when one looks at gdb's source.
No it's not :-) I bet you made this patch against the csl branch. I
hacked download_write_size on that branch; Vlad's been looking at this
a little closer. 512 is right for mainline.
Oh, did you mean the rest of the changes to that file? You changed
MIN_REMOTE_PACKET_SIZE to 20 in revision 1.177, so the remote.exp
change (without the download-write-size adjustment) is OK for mainline.
> The huge.exp test creates a large executable, and the initial attempt was too
> big for the target board. The patch simply iterates the compilation until one
> succeeds.
Clever. This one is OK.
> Finally, the m68k assembler doesn't use # for comments, so the mac-fileno.S
> failed there. mac-fileno.S already uses /*..*/ comments in places, this patch
> just makes it use it everywhere.
Good idea. This one is OK too.
You didn't mention the dbx.exp change. dbx.exp passes for me using
gdbserver, so I don't know why it was needed; could you explain?
You didn't mention ending-run.exp either; it looks plausible to me.
Want to post and commit the approved bits, and then we can look at the
rest?
--
Daniel Jacobowitz
CodeSourcery