This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/5] Revert default system root back to ""
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Pedro Alves <palves at redhat dot com>, Sandra Loosemore <sandra at codesourcery dot com>, Paul_Koning at Dell dot com, Jan Kratochvil <jan dot kratochvil at redhat dot com>, Joel Brobecker <brobecker at adacore dot com>
- Date: Tue, 28 Jul 2015 16:36:08 +0100
- Subject: [PATCH 1/5] Revert default system root back to ""
- Authentication-results: sourceware.org; auth=none
- References: <1438097772-31480-1-git-send-email-gbenson at redhat dot com>
This commit reverts the default system root from "target:" to "".
gdb/ChangeLog:
* main.c (captured_main): Revert default sysroot back to "".
* NEWS: Remove comment about default sysroot being "target:".
---
gdb/ChangeLog | 5 +++++
gdb/NEWS | 3 +--
gdb/main.c | 7 ++-----
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/gdb/NEWS b/gdb/NEWS
index 7ce9758..7ecdf93 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -39,8 +39,7 @@
* Directory names supplied to the "set sysroot" commands may be
prefixed with "target:" to tell GDB to access shared libraries from
the target system, be it local or remote. This replaces the prefix
- "remote:". The default sysroot has been changed from "" to
- "target:". "remote:" is automatically converted to "target:" for
+ "remote:", which is automatically converted to "target:" for
backward compatibility.
* The system root specified by "set sysroot" will be prepended to the
diff --git a/gdb/main.c b/gdb/main.c
index aecd60a..2d642f9 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -545,11 +545,8 @@ captured_main (void *data)
gdb_sysroot = relocate_gdb_directory (TARGET_SYSTEM_ROOT,
TARGET_SYSTEM_ROOT_RELOCATABLE);
- if (gdb_sysroot == NULL || *gdb_sysroot == '\0')
- {
- xfree (gdb_sysroot);
- gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX);
- }
+ if (gdb_sysroot == NULL)
+ gdb_sysroot = xstrdup ("");
debug_file_directory = relocate_gdb_directory (DEBUGDIR,
DEBUGDIR_RELOCATABLE);
--
1.7.1