Re: [PATCH 4/7] Insert breakpoint even when the raw breakpoint is found

Yao Qi
2016-04-12T09:04:05Z

Pedro Alves <palves@redhat.com> writes:

> Can we only increase the refcount if inserting succeeds? gdbserver can
> use gdb exceptions nowadays, and even though lots of current gdbserver
> code isn't exception safe, it'd be nice to start considering that.

One thing I can think of is to properly decrease refcount if exception
is thrown. Anything else? I don't think we need to worry about the
atomicity of increment and decrement of refcount, because I don't figure
out a case the refcount is updated together in mainline code and in
exception.

--
Yao (齐尧)