This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove unused parameter in remote_check_symbols.
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 29 May 2013 11:09:37 -0600
- Subject: Re: [PATCH] Remove unused parameter in remote_check_symbols.
- References: <1369721603-5253-1-git-send-email-yao at codesourcery dot com> <87mwrfxhdx dot fsf at fleche dot redhat dot com> <51A5D2BA dot 9010400 at codesourcery dot com>
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Tom> I suppose this code could use the objfile argument if the call to
Tom> remote_check_symbols in remote_start_remote looped over all the
Tom> objfiles.
Yao> IIUC, there is only one objfile, symfile_objfile, when
Yao> remote_check_symbols is called in remote_start_remote. After that,
Yao> when a new objfile is loaded each time, remote_check_symbols is called
Yao> again.
It seems like there could be more -- either from separate debug files or
from add-symbol-file.
I don't think anything has to change here though.
Yao> When an objfile is destroyed (shared lib is unloaded, for example),
Yao> the address becomes unreachable to inferior. We don't have to worry
Yao> about it, right?
That doesn't seem necessarily true to me. Maybe the system doesn't have
an MMU. Or maybe the inferior maps new data to that address between the
call to dlclose and the moment at which gdbserver needs to use the
symbol's address. But realize that I'm largely speaking from ignorance,
as I don't actually know what gdbserver does with this information.
Tom