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 1/2] Change gdb_load_shlibs to gdb_load_shlib


On 04/14/2016 04:17 PM, Simon Marchi wrote:
> On 16-04-14 05:33 AM, Yao Qi wrote:
>> Simon Marchi <simon.marchi@ericsson.com> writes:
>>
>>> -proc gdb_load_shlibs { args } {
>>> -    foreach file $args {
>>> -	gdb_remote_download target [shlib_target_file $file]
>>> -    }
>>> +proc gdb_load_shlib { file } {
>>> +    set dest [gdb_remote_download target [shlib_target_file $file]]
>>
>> Why don't define a new proc gdb_load_shlib but leave gdb_load_shlibs
>> there?  gdb_load_shlibs can invoke gdb_load_shlib in a loop, and callers
>> of gdb_load_shlibs are not changed.
> 
> It would have been the lazy but clever way to do it, for sure.  I hadn't
> thought of that.
> 
> I am not sure I like it though, because it makes multiple procs that do kind
> of the same thing, but with subtle differences.  That's what causes confusion
> later.  It's the same feeling I had about gdb_download and gdb_remote_download...
> 
> Pedro (and others), what do you think?

I agree that that may end up causing confusion.

Thanks,
Pedro Alves


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