[1/5] Revert default system root back to ""

Message ID 1438097772-31480-2-git-send-email-gbenson@redhat.com
State New, archived
Headers

Commit Message

Gary Benson July 28, 2015, 3:36 p.m. UTC
  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(-)
  

Comments

Eli Zaretskii July 28, 2015, 3:57 p.m. UTC | #1
> From: Gary Benson <gbenson@redhat.com>
> Cc: Pedro Alves <palves@redhat.com>,        Sandra Loosemore <sandra@codesourcery.com>, Paul_Koning@Dell.com,        Jan Kratochvil <jan.kratochvil@redhat.com>,        Joel Brobecker <brobecker@adacore.com>
> Date: Tue, 28 Jul 2015 16:36:08 +0100
> 
> 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:".

OK for NEWS.
  

Patch

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);