windows-nat: Trim a trailing '\n' from OutputDebugString before echoing it
For cosmetic purposes, trim a trailing '\n' from OutputDebugString before echoing it, as warning() will add a '\n', anyhow. gdb/ChangeLog: 2015-06-03 Jon Turney <jon.turney@dronecode.org.uk> * windows-nat.c (handle_output_debug_string): Trim trailing '\n' from OutputDebugString. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
7d73c23c4d
commit
040ea00bb0
|
@ -1,3 +1,8 @@
|
|||
2015-06-03 Jon Turney <jon.turney@dronecode.org.uk>
|
||||
|
||||
* windows-nat.c (handle_output_debug_string): Trim trailing '\n'
|
||||
from OutputDebugString.
|
||||
|
||||
2015-06-10 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
||||
Mircea Gherzan <mircea.gherzan@intel.com>
|
||||
|
||||
|
|
|
@ -818,8 +818,14 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
|
|||
#ifdef __CYGWIN__
|
||||
if (!startswith (s, "cYg"))
|
||||
#endif
|
||||
{
|
||||
char *p = strchr (s, '\0');
|
||||
|
||||
if (p > s && *--p == '\n')
|
||||
*p = '\0';
|
||||
warning (("%s"), s);
|
||||
}
|
||||
}
|
||||
#ifdef __COPY_CONTEXT_SIZE
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue