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] Fix remote.c incorrectly using pop_target (wrt btrace)


On 03/16/2013 03:54 AM, Jan Kratochvil wrote:
Since it is in remote_open_1, the remote target or exteneded-remote
>target is just pushed and top most, so pop_target should be fine
>here. It is not necessary to change it to remote_unpush_target.
OK; but one should remove pop_target later, there remain only few uses of it.
When its use is not incorrect it is at least fragile/dangerous.


Jan,
I can imagine that using pop_target is fragile in general, but is it fragile/dangerous to use pop_target in remote_open_1? IMO, pop_target naturally fits the needs there (push target on stack -> setting up -> pop target out of stack on error). pop_target is also used in tracepoint.c:tfile_open, which is similar to this case.


The rest of this patch looks right to me.

--
Yao (éå)


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