binutils-gdb/gdb/cli
Lancelot SIX 573269a87c gdb: make thread_info::m_thread_fsm a std::unique_ptr
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
2022-02-07 06:12:06 -05:00
..
cli-cmds.c gdb: add the 'set/show suppress-cli-notifications' command 2022-02-07 08:26:56 +01:00
cli-cmds.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-decode.c gdb/cli: convert cli_suppress_notification from int to bool 2022-02-07 08:26:55 +01:00
cli-decode.h gdb/cli: convert cli_suppress_notification from int to bool 2022-02-07 08:26:55 +01:00
cli-dump.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-interp.c gdb: make thread_info::m_thread_fsm a std::unique_ptr 2022-02-07 06:12:06 -05:00
cli-interp.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-logging.c Use filtered output in ordinary commands 2022-01-05 11:36:33 -07:00
cli-option.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-option.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-script.c Simplify execute_control_commands_to_string 2022-01-05 10:19:45 -07:00
cli-script.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-setshow.c gdb: add string_file::release method 2022-01-26 10:01:40 -05:00
cli-setshow.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-style.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-style.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-utils.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cli-utils.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00