This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] Change gdb_load_shlibs to gdb_load_shlib
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: <gdb-patches at sourceware dot org>, <palves at redhat dot com>, <antoine dot tremblay at ericsson dot com>
- Date: Thu, 14 Apr 2016 11:17:30 -0400
- Subject: Re: [PATCH 1/2] Change gdb_load_shlibs to gdb_load_shlib
- Authentication-results: sourceware.org; auth=none
- References: <1460502865-10999-1-git-send-email-simon dot marchi at ericsson dot com> <864mb4o7qq dot fsf at gmail dot com>
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?