[v5,1/7] compile: Add one debug message
Commit Message
Hi,
trivial, there is an inter-patch dependency.
Jan
2015-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
* compile/compile-object-load.c (compile_object_load): Add
COMPILE_DEBUG message.
---
gdb/compile/compile-object-load.c | 6 ++++++
1 file changed, 6 insertions(+)
Comments
On 05/13/2015 09:16 PM, Jan Kratochvil wrote:
> diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
> index fe23448..745d787 100644
> --- a/gdb/compile/compile-object-load.c
> +++ b/gdb/compile/compile-object-load.c
> @@ -580,6 +580,12 @@ compile_object_load (const char *object_file, const char *source_file)
> TYPE_LENGTH (regs_type),
> GDB_MMAP_PROT_READ);
> gdb_assert (regs_addr != 0);
> + if (compile_debug)
> + fprintf_unfiltered (gdb_stdout,
> + "allocated %s bytes at %s for registers\n",
> + paddress (target_gdbarch (),
> + TYPE_LENGTH (regs_type)),
> + paddress (target_gdbarch (), regs_addr));
> store_regs (regs_type, regs_addr);
> }
>
Please send debug output to gdb_stdlog. OK with that change.
Thanks,
Pedro Alves
On Fri, 15 May 2015 18:49:15 +0200, Pedro Alves wrote:
> On 05/13/2015 09:16 PM, Jan Kratochvil wrote:
>
> > diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
> > index fe23448..745d787 100644
> > --- a/gdb/compile/compile-object-load.c
> > +++ b/gdb/compile/compile-object-load.c
> > @@ -580,6 +580,12 @@ compile_object_load (const char *object_file, const char *source_file)
> > TYPE_LENGTH (regs_type),
> > GDB_MMAP_PROT_READ);
> > gdb_assert (regs_addr != 0);
> > + if (compile_debug)
> > + fprintf_unfiltered (gdb_stdout,
> > + "allocated %s bytes at %s for registers\n",
> > + paddress (target_gdbarch (),
> > + TYPE_LENGTH (regs_type)),
> > + paddress (target_gdbarch (), regs_addr));
> > store_regs (regs_type, regs_addr);
> > }
> >
>
> Please send debug output to gdb_stdlog. OK with that change.
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.
Checked in:
b6de3f9642c58439c31690255c3a4326728da88d
Jan
@@ -580,6 +580,12 @@ compile_object_load (const char *object_file, const char *source_file)
TYPE_LENGTH (regs_type),
GDB_MMAP_PROT_READ);
gdb_assert (regs_addr != 0);
+ if (compile_debug)
+ fprintf_unfiltered (gdb_stdout,
+ "allocated %s bytes at %s for registers\n",
+ paddress (target_gdbarch (),
+ TYPE_LENGTH (regs_type)),
+ paddress (target_gdbarch (), regs_addr));
store_regs (regs_type, regs_addr);
}