This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] GDB regression for starting on r/o filesystem


currently if you have readonly/broken/full /tmp GDB will fail to start:
	Cannot create temporary file in ./: Read-only file system
due to:
	#0  raise () from /lib64/
	#1  abort () from /lib64/
	#2  make_temp_file (suffix="") at ./make-temp-file.c:205
	#3  temp_file (obj=, flags=10, name=) at ./pex-common.c:109
	#4  pex_run_in_environment (obj=, flags=10, executable="iconv", argv=, env=, orig_outname=, errname=, err=) at ./pex-common.c:232
	#5  find_charset_names () at charset.c:803
	#6  _initialize_charset () at charset.c:915
	#7  initialize_all_files () at init.c:380
	#8  gdb_init (argv0="/root/gdb-clean") at top.c:1670
	#9  captured_main (data=) at ./main.c:657
	#10 catch_errors (func=<captured_main>, func_args=, errstring="", mask=6) at exceptions.c:518
	#11 gdb_main (args=) at ./main.c:945
	#12 main (argc=1, argv=) at gdb.c:34

Tom suggested PEX_USE_PIPES at
Use pipes for communication between processes, if possible.

I see ser-mingw.c is already using it:
  ps->pex = pex_init (PEX_USE_PIPES, "target remote pipe", NULL);

It should be safe across platforms:
  /* DJGPP does not support pipes.  */
  flags &= ~ PEX_USE_PIPES;

And it starts to start on readonly filesystem again.

No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.


2010-06-24  Jan Kratochvil  <>
	    Tom Tromey  <>

	Fix GDB startup on readonly filesystem.
	* charset.c (find_charset_names): Use PEX_USE_PIPES for pex_init.

--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -794,7 +794,7 @@ find_charset_names (void)
   set_in_environ (iconv_env, "LANGUAGE", "C");
   set_in_environ (iconv_env, "LC_ALL", "C");
-  child = pex_init (0, "iconv", NULL);
+  child = pex_init (PEX_USE_PIPES, "iconv", NULL);
   args[0] = "iconv";
   args[1] = "-l";

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]