Commits

Yit Phang Khoo committed 7b3711d

Update refactor-relocate-path based on review: check also that files are not directories; and resolve a minor conflict with gdb-relative-data-directory

Comments (0)

Files changed (2)

gdb-relative-data-directory

 # HG changeset patch
-# Parent b4d42e6817229aca496bb98b8f980a3e794eaf3c
+# Parent f491aae11e27ebe14c2412b050f1936dd1479764
 Try to initialize data-directory by first searching for "data-directory" in the same directory as the gdb binary.
 
 diff --git a/gdb/ChangeLog b/gdb/ChangeLog
 --- a/gdb/ChangeLog
 +++ b/gdb/ChangeLog
 @@ -1,3 +1,12 @@
-+2012-09-19  Khoo Yit Phang  <khooyp@cs.umd.edu>
++2012-09-21  Khoo Yit Phang  <khooyp@cs.umd.edu>
 +
 +	Try to initialize data-directory by first searching for
 +	"data-directory" in the same directory as the gdb binary.
 +	(captured_main): Call relocate_gdb_data_directory to initialize
 +	gdb_datadir.
 +
- 2012-09-19  Khoo Yit Phang  <khooyp@cs.umd.edu>
+ 2012-09-21  Khoo Yit Phang  <khooyp@cs.umd.edu>
  
  	Refactor relocate_path to also check if the relocated
 diff --git a/gdb/main.c b/gdb/main.c

refactor-relocate-path

 # HG changeset patch
-# Parent a257ab60dbcd721f75bc2639d1e034af51213549
+# Parent 6ade92f3bbcf600416c594b4aa4941768fb2c4d2
 Refactor relocate_path to also check if the relocated file/directory exists.
 
 diff --git a/gdb/ChangeLog b/gdb/ChangeLog
 --- a/gdb/ChangeLog
 +++ b/gdb/ChangeLog
 @@ -1,3 +1,14 @@
-+2012-09-19  Khoo Yit Phang  <khooyp@cs.umd.edu>
++2012-09-21  Khoo Yit Phang  <khooyp@cs.umd.edu>
 +
 +	Refactor relocate_path to also check if the relocated
 +	file/directory exists.
 +	(get_init_files): Remove the file check that is subsumed by
 +	relocate_path.
 +
- 2012-09-19  Thomas Schwinge  <thomas@codesourcery.com>
+ 2012-09-21  Tom Tromey  <tromey@redhat.com>
  
- 	* sh-tdep.c (sh_register_convert_to_virtual)
+ 	* c-typeprint.c (c_type_print_base) <TYPE_CODE_STRUCT,
 diff --git a/gdb/main.c b/gdb/main.c
 --- a/gdb/main.c
 +++ b/gdb/main.c
 +	{
 +	  struct stat s;
 +
-+	  if (stat (path, &s) != 0 || (isdir && !S_ISDIR (s.st_mode)))
++	  if (stat (path, &s) != 0 || (isdir != !!S_ISDIR (s.st_mode)))
 +	    {
 +	      xfree (path);
 +	      path = NULL;