Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tcf-dev] Configuring Linux TCF agent to stop all threads of a process instead of current one

Hello,

I would like to configure the Linux TCF agent to stop all threads of a process when a breakpoint is hit (or when a suspend thread request is sent). This is pretty easy to do by simply updating the context_get_group() in context-linux.c to return ctx->mem instead of ctx for CONTEXT_GROUP_INTERCEPT group but I am wondering how to integrate this in Open Source TCF agent without breaking current behavior. I see several solutions to do this:

1 - Introduce a new build macro ENABLE_INTERCEPT_GROUP (e.g.) and make use of this macro in context-linux.c to configure behavior of context_get_group().
2 - Make use of context-mux.h to overload context_get_group() interface
3 - Make this dynamically configurable by the client using a dedicated RunControl interface

I suspect 3 would be pretty difficult to implement since it would potentially impact existing attachment (before the configuration is updated) and I am not sure how to handle this correctly. Solution 2 would be okay but I think this behavior is something that can be useful to others and using context-mux.h to do this is a little bit overkill (and make break usage of context-mux.h for its original purpose if we want to enable both features) I would vote to implement solution 1 but I wanted to get general agreement before I do this. I am also wondering if we should advertise this to the client but I am not sure this is really needed since the client should react to the events it receives.

Any feedback is welcome

Regards,
Didier

--
Didier Brachet, Principal Technologist, Wind River
direct (33) 297.427.286 fax (33) 297.424.550



Back to the top