mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
Refactor code to check for terminal sharing
This refactors the code to check for terminal sharing. is_gdb_terminal is exported, and sharing_input_terminal_1 is renamed, slightly refactored, and moved to posix-hdep.c. A new Windows-specific implementation of this function is added to mingw-hdep.c. MSDN has a warning about GetConsoleProcessList This API is not recommended and does not have a virtual terminal equivalent. [...] Applications remoting via cross-platform utilities and transports like SSH may not work as expected if using this API. However, we believe this isn't likely to be an issue for gdb.
This commit is contained in:
@ -167,6 +167,17 @@ extern void default_print_float_info (struct gdbarch *gdbarch,
|
||||
frame_info_ptr frame,
|
||||
const char *args);
|
||||
|
||||
/* Try to determine whether TTY is GDB's input terminal. Returns
|
||||
TRIBOOL_UNKNOWN if we can't tell. */
|
||||
|
||||
extern tribool is_gdb_terminal (const char *tty);
|
||||
|
||||
/* Helper for sharing_input_terminal. Try to determine whether pid
|
||||
PID is using the same TTY for input as GDB is. Returns
|
||||
TRIBOOL_UNKNOWN if we can't tell. */
|
||||
|
||||
extern tribool sharing_input_terminal (int pid);
|
||||
|
||||
extern void child_terminal_info (struct target_ops *self, const char *, int);
|
||||
|
||||
extern void child_terminal_ours (struct target_ops *self);
|
||||
|
Reference in New Issue
Block a user