[10/10] gdb: remote the get_remote_exec_file function
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
Commit Message
After the previous commit, the get_remote_exec_file function is only
used in one place, so inline it and delete get_remote_exec_file.
There should be no user visible changes after this commit.
---
gdb/remote.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
Comments
Hi Andrew,
On Wed, 2023-08-16 at 16:55 +0100, Andrew Burgess wrote:
> After the previous commit, the get_remote_exec_file function is only
> used in one place, so inline it and delete get_remote_exec_file.
>
> There should be no user visible changes after this commit.
This looks sane to me. Is the subject a clever joke or a typo?
It made me smile, but also I had to read it three times before I
understood what was really going on. Maybe s/remote the/remove the/ for
clarity?
Reviewed-by: Mark Wielaard <mark@klomp.org>
> ---
> gdb/remote.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/gdb/remote.c b/gdb/remote.c
> index e2d21c65b70..966bacd7fb5 100644
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -1864,16 +1864,6 @@ remote_target::get_remote_state ()
> return &m_remote_state;
> }
>
> -/* Fetch the remote exec-file from the current program space. */
> -
> -static const std::string &
> -get_remote_exec_file ()
> -{
> - const remote_exec_file_info &info
> - = get_remote_exec_file_info (current_program_space);
> - return info.first;
> -}
> -
> /* Set the remote exec file for PSPACE. */
>
> static void
> @@ -1900,7 +1890,9 @@ set_remote_exec_file_cb (const std::string &filename)
> static const std::string &
> get_remote_exec_file_cb ()
> {
> - return get_remote_exec_file ();
> + const remote_exec_file_info &info
> + = get_remote_exec_file_info (current_program_space);
> + return info.first;
> }
>
> /* Implement the "show remote exec-file" command. */
@@ -1864,16 +1864,6 @@ remote_target::get_remote_state ()
return &m_remote_state;
}
-/* Fetch the remote exec-file from the current program space. */
-
-static const std::string &
-get_remote_exec_file ()
-{
- const remote_exec_file_info &info
- = get_remote_exec_file_info (current_program_space);
- return info.first;
-}
-
/* Set the remote exec file for PSPACE. */
static void
@@ -1900,7 +1890,9 @@ set_remote_exec_file_cb (const std::string &filename)
static const std::string &
get_remote_exec_file_cb ()
{
- return get_remote_exec_file ();
+ const remote_exec_file_info &info
+ = get_remote_exec_file_info (current_program_space);
+ return info.first;
}
/* Implement the "show remote exec-file" command. */