From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, Phil Muldoon <pmuldoon@redhat.com>
Subject: [patch] compile: gdb_stdout -> gdb_stdlog [compile: Add one debug message]
Date: Sat, 16 May 2015 13:09:00 -0000 [thread overview]
Message-ID: <20150516130938.GA16744@host1.jankratochvil.net> (raw)
In-Reply-To: <20150516121946.GA22586@host1.jankratochvil.net>
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
On Sat, 16 May 2015 14:19:46 +0200, Jan Kratochvil wrote:
> 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.
OK for check-in?
Jan
[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 6327 bytes --]
gdb/ChangeLog
2015-05-16 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.
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index 15efeff..455114c 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -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;
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index 3273e47..31f4bde 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -132,7 +132,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),
@@ -155,7 +155,7 @@ setup_sections (bfd *abfd, asection *sect, void *data_voidp)
data->last_prot);
munmap_list_add (data->munmap_list_headp, addr, data->last_size);
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),
@@ -728,7 +728,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;
@@ -773,7 +773,7 @@ compile_object_load (const char *object_file, const char *source_file,
gdb_assert (regs_addr != 0);
munmap_list_add (&munmap_list_head, regs_addr, TYPE_LENGTH (regs_type));
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)),
@@ -799,7 +799,7 @@ compile_object_load (const char *object_file, const char *source_file,
munmap_list_add (&munmap_list_head, out_value_addr,
TYPE_LENGTH (out_value_type));
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)),
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index fbecf8c..499c530 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -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);
next prev parent reply other threads:[~2015-05-16 13:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 20:16 [PATCH v5 0/7] compile: compile print (&unmap) Jan Kratochvil
2015-05-13 20:16 ` [PATCH v5 2/7] Code cleanup: Make parts of print_command_1 public Jan Kratochvil
2015-05-16 12:27 ` [commit] " Jan Kratochvil
2015-05-13 20:16 ` [PATCH v5 1/7] compile: Add one debug message Jan Kratochvil
2015-05-15 16:49 ` Pedro Alves
2015-05-16 12:19 ` [commit] " Jan Kratochvil
2015-05-16 13:09 ` Jan Kratochvil [this message]
2015-05-19 11:47 ` [patch] compile: gdb_stdout -> gdb_stdlog [compile: Add one debug message] Pedro Alves
2015-05-19 12:28 ` [commit] " Jan Kratochvil
2015-05-13 20:16 ` [PATCH v5 4/7] compile: Use -Wall, not -w Jan Kratochvil
2015-05-15 16:49 ` Pedro Alves
2015-05-16 12:43 ` [commit] " Jan Kratochvil
2015-05-13 20:16 ` [PATCH v5 3/7] compile: Distribute scope, add scope_data Jan Kratochvil
2015-05-15 16:49 ` Pedro Alves
2015-05-16 12:39 ` [commit] " Jan Kratochvil
2015-05-13 20:17 ` [PATCH v5 5/7] Code cleanup: compile: func_addr -> func_sym Jan Kratochvil
2015-05-15 16:51 ` Pedro Alves
2015-05-16 12:45 ` [commit] " Jan Kratochvil
2015-05-13 20:17 ` [PATCH v5 6/7] compile: New 'compile print' Jan Kratochvil
2015-05-15 17:04 ` Pedro Alves
2015-05-16 12:58 ` [commit] " Jan Kratochvil
2015-05-16 13:39 ` [commit#2] " Jan Kratochvil
2015-05-16 14:25 ` [commit] " Patrick Palka
2015-05-16 14:39 ` [obv] " Jan Kratochvil
2015-05-13 20:17 ` [PATCH v5 7/7] RFC only: compile: Use also inferior munmap Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150516130938.GA16744@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=pmuldoon@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox