mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
* win32-nat.c (_initialize_check_for_gdb_ini): New function.
* config/i386/xm-cygwin.h: Remove obsolete handling of __CYGWIN32__. (GDBINIT_FILENAME): Remove.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "command.h"
|
||||
#include "completer.h"
|
||||
#include "regcache.h"
|
||||
#include "top.h"
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
@@ -1753,3 +1754,31 @@ _initialize_core_win32 (void)
|
||||
{
|
||||
add_core_fns (&win32_elf_core_fns);
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_check_for_gdb_ini (void)
|
||||
{
|
||||
char *homedir;
|
||||
if (inhibit_gdbinit)
|
||||
return;
|
||||
|
||||
homedir = getenv ("HOME");
|
||||
if (homedir)
|
||||
{
|
||||
char *p;
|
||||
char *oldini = (char *) alloca (strlen (homedir) +
|
||||
sizeof ("/gdb.ini"));
|
||||
strcpy (oldini, homedir);
|
||||
p = strchr (oldini, '\0');
|
||||
if (p > oldini && p[-1] != '/')
|
||||
*p++ = '/';
|
||||
strcpy (p, "gdb.ini");
|
||||
if (access (oldini, 0) == 0)
|
||||
{
|
||||
int len = strlen (oldini);
|
||||
char *newini = alloca (len + 1);
|
||||
sprintf (newini, "%.*s.gdbinit", len - (sizeof ("gdb.ini") - 1), oldini);
|
||||
warning ("obsolete '%s' found. Rename to '%s'.", oldini, newini);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user