From 39053f2aadca35cad2917c6460afa1dce6fb426b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 23 Mar 2013 10:48:23 +0000 Subject: Fix relocation of directories in the MinGW build. windows-nat.c (windows_get_absolute_argv0): New function. windows-nat.h: Add its prototype. main.c (get_init_files): Use filename_ncmp instead of strncmp. Use IS_DIR_SEPARATOR instead of looking for a character inside SLASH_STRING. Include filenames.h. (captured_main) [__MINGW32__]: Make argv[0] absolute, so that relocate_gdb_directory works when passed gdb_program_name. Include windows-nat.h. --- gdb/windows-nat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/windows-nat.h') diff --git a/gdb/windows-nat.h b/gdb/windows-nat.h index 55624eed081..0691e9ec896 100644 --- a/gdb/windows-nat.h +++ b/gdb/windows-nat.h @@ -28,5 +28,9 @@ typedef int (segment_register_p_ftype) (int regnum); whether a given register is a segment register or not. */ extern void windows_set_segment_register_p (segment_register_p_ftype *fun); +/* Return argv[0] in absolute form, if possible, or ARGV0 if not. The + return value is in malloc'ed storage. */ +extern char *windows_get_absolute_argv0 (const char *argv0); + #endif -- cgit v1.2.1