Fix C++ build for Cygwin

gdb/ChangeLog:

2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>

	* windows-nat.c (handle_output_debug_string): Return type of
	gdb_signal_from_host() is gdb_signal, not an int.
	(windows_get_exec_module_filename): Add pointer casts for C++.

gdb/gdbserver/ChangeLog:

2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>

	* win32-low.c (win32_create_inferior): Add pointer casts for C++.
This commit is contained in:
Jon Turney 2016-06-02 13:34:10 +00:00
parent b1058ce988
commit 0ae534d2cf
4 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
* windows-nat.c (handle_output_debug_string): Return type of
gdb_signal_from_host() is gdb_signal, not an int.
(windows_get_exec_module_filename): Add pointer casts for C++.
2016-06-02 Tom Tromey <tom@tromey.com> 2016-06-02 Tom Tromey <tom@tromey.com>
PR python/18984: PR python/18984:

View file

@ -1,3 +1,7 @@
2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
* win32-low.c (win32_create_inferior): Add pointer casts for C++.
2016-05-17 Yao Qi <yao.qi@linaro.org> 2016-05-17 Yao Qi <yao.qi@linaro.org>
* linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps

View file

@ -642,8 +642,8 @@ win32_create_inferior (char *program, char **program_args)
if (path_ptr) if (path_ptr)
{ {
int size = cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, path_ptr, NULL, 0); int size = cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, path_ptr, NULL, 0);
orig_path = alloca (strlen (path_ptr) + 1); orig_path = (char *) alloca (strlen (path_ptr) + 1);
new_path = alloca (size); new_path = (char *) alloca (size);
strcpy (orig_path, path_ptr); strcpy (orig_path, path_ptr);
cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, path_ptr, new_path, size); cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, path_ptr, new_path, size);
setenv ("PATH", new_path, 1); setenv ("PATH", new_path, 1);

View file

@ -864,7 +864,7 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
to treat this like a real signal. */ to treat this like a real signal. */
char *p; char *p;
int sig = strtol (s + sizeof (_CYGWIN_SIGNAL_STRING) - 1, &p, 0); int sig = strtol (s + sizeof (_CYGWIN_SIGNAL_STRING) - 1, &p, 0);
int gotasig = gdb_signal_from_host (sig); gdb_signal gotasig = gdb_signal_from_host (sig);
ourstatus->value.sig = gotasig; ourstatus->value.sig = gotasig;
if (gotasig) if (gotasig)
@ -1894,7 +1894,7 @@ windows_get_exec_module_filename (char *exe_name_ret, size_t exe_name_max_len)
/* Cygwin prefers that the path be in /x/y/z format, so extract /* Cygwin prefers that the path be in /x/y/z format, so extract
the filename into a temporary buffer first, and then convert it the filename into a temporary buffer first, and then convert it
to POSIX format into the destination buffer. */ to POSIX format into the destination buffer. */
cygwin_buf_t *pathbuf = alloca (exe_name_max_len * sizeof (cygwin_buf_t)); cygwin_buf_t *pathbuf = (cygwin_buf_t *) alloca (exe_name_max_len * sizeof (cygwin_buf_t));
len = GetModuleFileNameEx (current_process_handle, len = GetModuleFileNameEx (current_process_handle,
dh_buf, pathbuf, exe_name_max_len); dh_buf, pathbuf, exe_name_max_len);