2002-02-10 Daniel Jacobowitz <drow@mvista.com>
[deliverable/binutils-gdb.git] / gdb / rs6000-nat.c
index 12229cddc0e4047ab4c1fdd562084531f8004014..f79e991b1d9b79751cb40f0898096dc92a4dd967 100644 (file)
@@ -407,6 +407,9 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
     / sizeof (int);
 
   /* Allocate word transfer buffer. */
+  /* FIXME (alloca): This code, cloned from infptrace.c, is unsafe
+     because it uses alloca to allocate a buffer of arbitrary size.
+     For very large xfers, this could crash GDB's stack.  */
   int *buf = (int *) alloca (count * sizeof (int));
 
   int arch64 = ARCH64 ();
@@ -848,14 +851,12 @@ vmap_ldinfo (LdInfo *ldi)
      running a different copy of the same executable.  */
   if (symfile_objfile != NULL && !got_exec_file)
     {
-      warning_begin ();
-      fputs_unfiltered ("Symbol file ", gdb_stderr);
-      fputs_unfiltered (symfile_objfile->name, gdb_stderr);
-      fputs_unfiltered ("\nis not mapped; discarding it.\n\
+      warning ("Symbol file %s\nis not mapped; discarding it.\n\
 If in fact that file has symbols which the mapped files listed by\n\
 \"info files\" lack, you can load symbols with the \"symbol-file\" or\n\
 \"add-symbol-file\" commands (note that you must take care of relocating\n\
-symbols to the proper address).\n", gdb_stderr);
+symbols to the proper address).",
+              symfile_objfile->name);
       free_objfile (symfile_objfile);
       symfile_objfile = NULL;
     }
This page took 0.024397 seconds and 4 git commands to generate.