From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20444 invoked by alias); 4 Feb 2008 19:39:59 -0000 Received: (qmail 20435 invoked by uid 22791); 4 Feb 2008 19:39:58 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO qnxmail.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Feb 2008 19:39:42 +0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.42.96.5]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id OAA19874 for ; Mon, 4 Feb 2008 14:26:03 -0500 Received: from [10.42.100.129] (dhcp-100-129 [10.42.100.129]) by smtp.ott.qnx.com (8.8.8/8.6.12) with ESMTP id OAA11659 for ; Mon, 4 Feb 2008 14:39:39 -0500 Message-ID: <47A769FB.5060807@qnx.com> Date: Mon, 04 Feb 2008 19:39:00 -0000 From: Aleksandar Ristovski User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [patch] mingw to handle abs. path to core Content-Type: multipart/mixed; boundary="------------050702010908070704080609" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00079.txt.bz2 This is a multi-part message in MIME format. --------------050702010908070704080609 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 367 Hello, When built for mingw target, gdb will misinterpret full path to core file. The fix is very simple (patch attached). --- Aleksandar Ristovski QNX Software Systems ChangeLog: 2008-02-04 Aleksandar Ristovski * corelow.c (core_open): Use IS_ABSOLUTE_PATH. (filenames.h): New include. * Makefile.in (corelow.o): Added dependency. --------------050702010908070704080609 Content-Type: text/plain; name="mingwfullpathcore.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mingwfullpathcore.diff" Content-length: 1509 Index: gdb/corelow.c =================================================================== RCS file: /cvs/src/src/gdb/corelow.c,v retrieving revision 1.72 diff -u -p -r1.72 corelow.c --- gdb/corelow.c 16 Jan 2008 01:17:24 -0000 1.72 +++ gdb/corelow.c 4 Feb 2008 19:35:37 -0000 @@ -44,6 +44,7 @@ #include "gdb_assert.h" #include "exceptions.h" #include "solib.h" +#include "filenames.h" #ifndef O_LARGEFILE @@ -271,7 +272,7 @@ core_open (char *filename, int from_tty) } filename = tilde_expand (filename); - if (filename[0] != '/') + if (!IS_ABSOLUTE_PATH(filename)) { temp = concat (current_directory, "/", filename, (char *)NULL); xfree (filename); Index: gdb/Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.978 diff -u -p -r1.978 Makefile.in --- gdb/Makefile.in 30 Jan 2008 07:17:31 -0000 1.978 +++ gdb/Makefile.in 4 Feb 2008 19:35:40 -0000 @@ -1995,7 +1995,7 @@ corelow.o: corelow.c $(defs_h) $(arch_ut $(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \ $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \ $(exec_h) $(readline_h) $(gdb_assert_h) \ - $(exceptions_h) $(solib_h) + $(exceptions_h) $(solib_h) $(filenames_h) core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \ $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(gregset_h) cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \ --------------050702010908070704080609--