diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-13 20:03:18 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-18 15:48:03 -0400 |
commit | e0c34637019b0a070780b57b50d9026c0aca16f4 (patch) | |
tree | 79b70d9d878a118319bd58e11500ed3f08c344ba | |
parent | dc6c21dabfbd242616b9e6266b459eded2d0762b (diff) | |
download | gdb-e0c34637019b0a070780b57b50d9026c0aca16f4.zip gdb-e0c34637019b0a070780b57b50d9026c0aca16f4.tar.gz gdb-e0c34637019b0a070780b57b50d9026c0aca16f4.tar.bz2 |
gdb: call gdb_tilde_expand instead of gdb_tilde_expand_up in source_script_with_search
This removes a use of gdb_tilde_expand_up, which is removed later in
this series.
Change-Id: I5887d526cea987103e4ca24514a982b0a28e992a
-rw-r--r-- | gdb/cli/cli-cmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 424a874..2b4becc 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -749,13 +749,13 @@ source_script_with_search (const char *file, int from_tty, int search_path) this if we (may have) used search_path, as printing the full path in errors for the non-search case can be more noise than signal. */ const char *file_to_open; - gdb::unique_xmalloc_ptr<char> tilde_expanded_file; + std::string tilde_expanded_file; if (search_path) file_to_open = opened->full_path.get (); else { - tilde_expanded_file = gdb_tilde_expand_up (file); - file_to_open = tilde_expanded_file.get (); + tilde_expanded_file = gdb_tilde_expand (file); + file_to_open = tilde_expanded_file.c_str (); } source_script_from_stream (opened->stream.get (), file, file_to_open); } |