Re: [PATCH 08/13] simple changes in gdb.base

Tom Tromey
2013-10-17T19:58:54Z

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> On 08/23/2013 09:36 PM, Tom Tromey wrote:
>> +
>> +foreach file $all_files {
>> + if {[is_remote host]} {
>> + set this_name $file
>> + } else {
>> + set this_name [standard_output_file $file]
>> + }
>> +
>> + lappend filenames [set ${file} $this_name]

Pedro> Took me a second to realize/notice it's this loop that
Pedro> creates the intarr1.bin etc. variables used in:

>> +make_dump_file "dump val [set intarr1.bin] intarray"

Pedro> etc. How about adding a comment here, or above the loop?

Done.

>> # clean up files
>>
>> -remote_exec build "rm -f intarr1.bin intarr1b.bin intarr1.ihex
>> intarr1.srec intarr1.tekhex intarr2.bin intarr2b.bin intarr2.ihex
>> intarr2.srec intarr2.tekhex intstr1.bin intstr1b.bin intstr1.ihex
>> intstr1.srec intstr1.tekhex intstr2.bin intstr2b.bin intstr2.ihex
>> intstr2.srec intstr2.tekhex intarr3.srec"
>> +remote_exec build "rm -f $filenames"

Pedro> s/build/host ?

Yeah, I think so. I had left it as it was before, but I do think it's
wrong. I fixed it here.

>>
>> -set solib_binfile_target [gdb_download ${solib_binfile}]
>> +if {[is_remote target]} {
>> + set solib_binfile_target [gdb_download ${solib_binfile}]
>> +} else {
>> + set solib_binfile_target $solib_binfile
>> +}
>>

Pedro> Sounds like this should be using gdb_load_shlibs.

gdb_load_shlibs sets solib-search-path and I think this particular test
is also testing for the case where it is set improperly. So, I think
switching to gdb_load_shlibs would need even more work.

Tom