Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Unified Diff: gdb/mingw-hdep.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/microblaze-tdep.c ('k') | gdb/minidebug.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/mingw-hdep.c
diff --git a/gdb/mingw-hdep.c b/gdb/mingw-hdep.c
index ed06c5661f55921648e45baacfe72321522b7b38..66ada41a09e52831a4c65143173ee61f18adae3b 100644
--- a/gdb/mingw-hdep.c
+++ b/gdb/mingw-hdep.c
@@ -1,6 +1,6 @@
/* Host support routines for MinGW, for GDB, the GNU debugger.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,12 +18,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "main.h"
#include "serial.h"
#include "event-loop.h"
#include "gdb_assert.h"
#include "gdb_select.h"
-#include "gdb_string.h"
+#include <string.h>
#include "readline/readline.h"
#include <windows.h>
@@ -80,6 +81,19 @@ safe_strerror (int errnum)
return buffer;
}
+/* Return an absolute file name of the running GDB, if possible, or
+ ARGV0 if not. The return value is in malloc'ed storage. */
+
+char *
+windows_get_absolute_argv0 (const char *argv0)
+{
+ char full_name[PATH_MAX];
+
+ if (GetModuleFileName (NULL, full_name, PATH_MAX))
+ return xstrdup (full_name);
+ return xstrdup (argv0);
+}
+
/* Wrapper for select. On Windows systems, where the select interface
only works for sockets, this uses the GDB serial abstraction to
handle sockets, consoles, pipes, and serial ports.
« no previous file with comments | « gdb/microblaze-tdep.c ('k') | gdb/minidebug.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698