mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
573269a87c
While working on function calls, I realized that the thread_fsm member of struct thread_info is a raw pointer to a resource it owns. This commit changes the type of the thread_fsm member to a std::unique_ptr in order to signify this ownership relationship and slightly ease resource management (no need to manually call delete). To ensure consistent use, the field is made a private member (m_thread_fsm). The setter method (set_thread_fsm) can then check that it is incorrect to associate a FSM to a thread_info object if another one is already in place. This is ensured by an assertion. The function run_inferior_call takes an argument as a pointer to a call_thread_fsm and installs it in it in a thread_info instance. Also change this function's signature to accept a unique_ptr in order to signify that the ownership of the call_thread_fsm is transferred during the call. No user visible change expected after this commit. Tested on x86_64-linux with no regression observed. Change-Id: Ia1224f72a4afa247801ce6650ce82f90224a9ae8 |
||
---|---|---|
.. | ||
cli-cmds.c | ||
cli-cmds.h | ||
cli-decode.c | ||
cli-decode.h | ||
cli-dump.c | ||
cli-interp.c | ||
cli-interp.h | ||
cli-logging.c | ||
cli-option.c | ||
cli-option.h | ||
cli-script.c | ||
cli-script.h | ||
cli-setshow.c | ||
cli-setshow.h | ||
cli-style.c | ||
cli-style.h | ||
cli-utils.c | ||
cli-utils.h |