From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb-patches@sourceware.org
Subject: [patch] mingw to handle abs. path to core
Date: Mon, 04 Feb 2008 19:39:00 -0000 [thread overview]
Message-ID: <47A769FB.5060807@qnx.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
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 <aristovski@qnx.com>
* corelow.c (core_open): Use IS_ABSOLUTE_PATH.
(filenames.h): New include.
* Makefile.in (corelow.o): Added dependency.
[-- Attachment #2: mingwfullpathcore.diff --]
[-- Type: text/plain, Size: 1509 bytes --]
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) \
next reply other threads:[~2008-02-04 19:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 19:39 Aleksandar Ristovski [this message]
2008-02-04 21:17 ` Eli Zaretskii
2008-02-05 16:58 ` Aleksandar Ristovski
2008-02-09 13:46 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47A769FB.5060807@qnx.com \
--to=aristovski@qnx.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox