This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Forbid run with a core file loaded


> (gdb) start
> Starting program: /bin/sleep 
> ^^^^^^^^^^^^^^^^ !!!
> [...]

Hah! I was convinced we would ask confirmation to the user in this case...
I agree we should.

> 2010-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	Forbid run with a core file loaded.
> 	* infcmd.c (run_command_1) <core_bfd>: New.

This looks fine to me (but let's wait for Mark to confirm that there
was a misunderstanding - I'll followup separately).

> gdb/testsuite/
> 2010-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	Forbid run with a core file loaded.
> 	* gdb.base/corefile.exp (load core again, start with core)
> 	(started with core): New tests.

> +set test "start with core"
> +gdb_test_multiple "start" $test {
> +    -re {Core file is already loaded.  Unload it[?] [(]y or n[)] } {
> +	pass $test
> +    }
> +}

We should not use the "start" command in testcases, as it does not
work with remote targets. I'm afraid we're going to have to rely on
the run command instead.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]