don't call target_close in pop_target

Pedro Alves pedro@codesourcery.com
Tue Nov 4 19:06:00 GMT 2008


Anyone knows why pop_target calls target_close itself ?

... since unpush_target will do it too anyway.

Looking through the history, pop_target has been doing this as
far back as I can see, but so has unpush_target.

I can't find any reason or place where calling target_close twice does any
good.  Due to this fact, target_close implementations have to make sure the
target isn't closed already, which isn't that nice.

No regressions on x86-pc-linux-gnu against a native gdbserver.

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pop_target_close_twice.diff
Type: text/x-diff
Size: 2264 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20081104/e54d05ad/attachment.bin>


More information about the Gdb-patches mailing list