|
23 | 23 | #include "gdbsupport/gdb_optional.h"
|
24 | 24 | #include "cli/cli-cmds.h"
|
25 | 25 | #include "cli/cli-style.h"
|
| 26 | +#include "target.h" |
26 | 27 |
|
27 | 28 | /* Set/show debuginfod commands. */
|
28 | 29 | static cmd_list_element *set_debuginfod_prefix_list;
|
@@ -204,6 +205,13 @@ debuginfod_source_query (const unsigned char *build_id,
|
204 | 205 | user_data data ("source file", srcpath);
|
205 | 206 |
|
206 | 207 | debuginfod_set_user_data (c, &data);
|
| 208 | + gdb::optional<target_terminal::scoped_restore_terminal_state> term_state; |
| 209 | + if (target_supports_terminal_ours ()) |
| 210 | + { |
| 211 | + term_state.emplace (); |
| 212 | + target_terminal::ours (); |
| 213 | + } |
| 214 | + |
207 | 215 | scoped_fd fd (debuginfod_find_source (c,
|
208 | 216 | build_id,
|
209 | 217 | build_id_len,
|
@@ -242,6 +250,13 @@ debuginfod_debuginfo_query (const unsigned char *build_id,
|
242 | 250 | user_data data ("separate debug info for", filename);
|
243 | 251 |
|
244 | 252 | debuginfod_set_user_data (c, &data);
|
| 253 | + gdb::optional<target_terminal::scoped_restore_terminal_state> term_state; |
| 254 | + if (target_supports_terminal_ours ()) |
| 255 | + { |
| 256 | + term_state.emplace (); |
| 257 | + target_terminal::ours (); |
| 258 | + } |
| 259 | + |
245 | 260 | scoped_fd fd (debuginfod_find_debuginfo (c, build_id, build_id_len,
|
246 | 261 | &dname));
|
247 | 262 | debuginfod_set_user_data (c, nullptr);
|
|
0 commit comments