compile: gdb_stdout -> gdb_stdlog
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 19 May 2015 12:27:06 +0000 (14:27 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 19 May 2015 12:27:06 +0000 (14:27 +0200)
Please send debug output to gdb_stdlog.

OK but gdb/compile/ is using now only gdb_stdout; the error above is due to
a copy-paste.  So I will send a follow-up patch to change all the other
gdb/compile/ gdb_stdout strings to gdb_stdlog.

gdb/ChangeLog
2015-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>

* compile/compile-c-symbols.c (convert_symbol_sym, gcc_convert_symbol)
(gcc_symbol_address): Change gdb_stdout to gdb_stdlog.
* compile/compile-object-load.c (setup_sections, compile_object_load):
Likewise.
* compile/compile.c (compile_to_object): Likewise.

gdb/ChangeLog
gdb/compile/compile-c-symbols.c
gdb/compile/compile-object-load.c
gdb/compile/compile.c

index 73a423d2132ecf695cee90930830a2dd650671be..8fbc023cb0bbf93353efda7cc61a1715a034ab12 100644 (file)
@@ -1,3 +1,11 @@
+2015-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * compile/compile-c-symbols.c (convert_symbol_sym, gcc_convert_symbol)
+       (gcc_symbol_address): Change gdb_stdout to gdb_stdlog.
+       * compile/compile-object-load.c (setup_sections, compile_object_load):
+       Likewise.
+       * compile/compile.c (compile_to_object): Likewise.
+
 2015-05-16  Doug Evans  <xdje42@gmail.com>
 
        * NEWS: Mention support for unbuffered Guile memory ports.
index 15efeff760952cabb26d0824926742ef17489ab6..455114c4c17991115a530285bbe56d9e0dfece63 100644 (file)
@@ -338,7 +338,7 @@ convert_symbol_sym (struct compile_c_instance *context, const char *identifier,
          && block_found != block_static_block (block_found))
        {
          if (compile_debug)
-           fprintf_unfiltered (gdb_stdout,
+           fprintf_unfiltered (gdb_stdlog,
                                "gcc_convert_symbol \"%s\": global symbol\n",
                                identifier);
          convert_one_symbol (context, global_sym, 1, 0);
@@ -346,7 +346,7 @@ convert_symbol_sym (struct compile_c_instance *context, const char *identifier,
     }
 
   if (compile_debug)
-    fprintf_unfiltered (gdb_stdout,
+    fprintf_unfiltered (gdb_stdlog,
                        "gcc_convert_symbol \"%s\": local symbol\n",
                        identifier);
   convert_one_symbol (context, sym, 0, is_local_symbol);
@@ -473,7 +473,7 @@ gcc_convert_symbol (void *datum,
   END_CATCH
 
   if (compile_debug && !found)
-    fprintf_unfiltered (gdb_stdout,
+    fprintf_unfiltered (gdb_stdlog,
                        "gcc_convert_symbol \"%s\": lookup_symbol failed\n",
                        identifier);
   return;
@@ -500,7 +500,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
       if (sym != NULL && SYMBOL_CLASS (sym) == LOC_BLOCK)
        {
          if (compile_debug)
-           fprintf_unfiltered (gdb_stdout,
+           fprintf_unfiltered (gdb_stdlog,
                                "gcc_symbol_address \"%s\": full symbol\n",
                                identifier);
          result = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
@@ -516,7 +516,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
          if (msym.minsym != NULL)
            {
              if (compile_debug)
-               fprintf_unfiltered (gdb_stdout,
+               fprintf_unfiltered (gdb_stdlog,
                                    "gcc_symbol_address \"%s\": minimal "
                                    "symbol\n",
                                    identifier);
@@ -535,7 +535,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
   END_CATCH
 
   if (compile_debug && !found)
-    fprintf_unfiltered (gdb_stdout,
+    fprintf_unfiltered (gdb_stdlog,
                        "gcc_symbol_address \"%s\": failed\n",
                        identifier);
   return result;
index 67bc69af7b733fe2b9d13ead2619b0c1ab99bf09..15deaaf454c7cdc68e26f610f74ab1a8c3f8347d 100644 (file)
@@ -76,7 +76,7 @@ setup_sections (bfd *abfd, asection *sect, void *data_voidp)
        prot |= GDB_MMAP_PROT_EXEC;
 
       if (compile_debug)
-       fprintf_unfiltered (gdb_stdout,
+       fprintf_unfiltered (gdb_stdlog,
                            "module \"%s\" section \"%s\" size %s prot %u\n",
                            bfd_get_filename (abfd),
                            bfd_get_section_name (abfd, sect),
@@ -98,7 +98,7 @@ setup_sections (bfd *abfd, asection *sect, void *data_voidp)
          addr = gdbarch_infcall_mmap (target_gdbarch (), data->last_size,
                                       data->last_prot);
          if (compile_debug)
-           fprintf_unfiltered (gdb_stdout,
+           fprintf_unfiltered (gdb_stdlog,
                                "allocated %s bytes at %s prot %u\n",
                                paddress (target_gdbarch (), data->last_size),
                                paddress (target_gdbarch (), addr),
@@ -672,7 +672,7 @@ compile_object_load (const char *object_file, const char *source_file,
       if (sym->flags != 0)
        continue;
       if (compile_debug)
-       fprintf_unfiltered (gdb_stdout,
+       fprintf_unfiltered (gdb_stdlog,
                            "lookup undefined ELF symbol \"%s\"\n",
                            sym->name);
       sym->flags = BSF_GLOBAL;
@@ -716,7 +716,7 @@ compile_object_load (const char *object_file, const char *source_file,
                                        GDB_MMAP_PROT_READ);
       gdb_assert (regs_addr != 0);
       if (compile_debug)
-       fprintf_unfiltered (gdb_stdout,
+       fprintf_unfiltered (gdb_stdlog,
                            "allocated %s bytes at %s for registers\n",
                            paddress (target_gdbarch (),
                                      TYPE_LENGTH (regs_type)),
@@ -740,7 +740,7 @@ compile_object_load (const char *object_file, const char *source_file,
                                              | GDB_MMAP_PROT_WRITE));
       gdb_assert (out_value_addr != 0);
       if (compile_debug)
-       fprintf_unfiltered (gdb_stdout,
+       fprintf_unfiltered (gdb_stdlog,
                            "allocated %s bytes at %s for printed value\n",
                            paddress (target_gdbarch (),
                                      TYPE_LENGTH (out_value_type)),
index fbecf8c78ee1f24abe2d98ae404d19122ae887e0..499c53052f0e9fd9948315d3d05dbfd6fc16358d 100644 (file)
@@ -528,7 +528,7 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
                                               expr_block, expr_pc);
   make_cleanup (xfree, code);
   if (compile_debug)
-    fprintf_unfiltered (gdb_stdout, "debug output:\n\n%s", code);
+    fprintf_unfiltered (gdb_stdlog, "debug output:\n\n%s", code);
 
   os_rx = osabi_triplet_regexp (gdbarch_osabi (gdbarch));
   arch_rx = gdbarch_gnu_triplet_regexp (gdbarch);
@@ -553,9 +553,9 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
     {
       int argi;
 
-      fprintf_unfiltered (gdb_stdout, "Passing %d compiler options:\n", argc);
+      fprintf_unfiltered (gdb_stdlog, "Passing %d compiler options:\n", argc);
       for (argi = 0; argi < argc; argi++)
-       fprintf_unfiltered (gdb_stdout, "Compiler option %d: <%s>\n",
+       fprintf_unfiltered (gdb_stdlog, "Compiler option %d: <%s>\n",
                            argi, argv[argi]);
     }
 
@@ -572,7 +572,7 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
   fclose (src);
 
   if (compile_debug)
-    fprintf_unfiltered (gdb_stdout, "source file produced: %s\n\n",
+    fprintf_unfiltered (gdb_stdlog, "source file produced: %s\n\n",
                        source_file);
 
   /* Call the compiler and start the compilation process.  */
@@ -583,7 +583,7 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
     error (_("Compilation failed."));
 
   if (compile_debug)
-    fprintf_unfiltered (gdb_stdout, "object file produced: %s\n\n",
+    fprintf_unfiltered (gdb_stdlog, "object file produced: %s\n\n",
                        object_file);
 
   discard_cleanups (inner_cleanup);