This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] Copy file to host if it is remote
- From: "Agovic, Sanimir" <sanimir dot agovic at intel dot com>
- To: 'Yao Qi' <yao at codesourcery dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 22 Jul 2013 09:05:26 +0000
- Subject: RE: [PATCH] Copy file to host if it is remote
- References: <1374451994-5545-1-git-send-email-yao at codesourcery dot com>
Hello Yao,
> When I fix another issue, I find some MI test fails are caused by using
> build file directories on host, like these,
> --- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
> +++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
> @@ -558,7 +558,14 @@ mi_gdb_test "-var-update selected_a" \
>
> "\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",type_changed=\"true\"
> ,new_type=\"int\",new_num_children=\"0\",has_more=\"0\"\}\\\]" \
> "update selected_a in do_special_tests"
>
> -mi_gdb_test "-file-exec-and-symbols ${binfile}" "\\^done" \
> +if [is_remote host] {
> + set filename ${testfile}
> + remote_download host ${binfile} ${filename}
> +} else {
> + set filename ${binfile}
> +}
> +
> +mi_gdb_test "-file-exec-and-symbols ${filename}" "\\^done" \
> "floating varobj invalidation"
>
> mi_delete_varobj selected_a "delete selected_a"
>
mi_gdb_load should already trigger the download of binfile to the host,
re-downloading may break the tests on hosts like Windows as GDB still has
the file opened (locked) and therefore remote_download will fail.
You may instead expose the host version of binfile to the test, somehow =D.
-Sanimir
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052