This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/3] Add debug_printf and timestamps to gdbserver
- From: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>, Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 16 Jan 2014 15:28:08 -0800
- Subject: [PATCH 0/3] Add debug_printf and timestamps to gdbserver
- Authentication-results: sourceware.org; auth=none
- References: <yjt2zjnztait dot fsf at ruffy dot mtv dot corp dot google dot com> <52B1842F dot 5020401 at redhat dot com> <21205 dot 55987 dot 69477 dot 892571 at ruffy dot mtv dot corp dot google dot com> <52D81569 dot 3080006 at redhat dot com> <CADPb22SK=YQeOcOdNPXERxXKOT2E64k=pHhw0GBiLj4LQhL-Ag at mail dot gmail dot com> <52D82AD5 dot 7000306 at redhat dot com>
Pedro Alves writes:
> On 01/16/2014 06:43 PM, Doug Evans wrote:
> > On Thu, Jan 16, 2014 at 9:22 AM, Pedro Alves <palves@redhat.com> wrote:
>
> > A counter-proposal is that no information is lost given that if PROG
> > isn't present you know it's gdbserver, and it makes the debugging
> > output consistent with the rest of gdbserver.
> > Otherwise "Consistency Is Good" is going to make me want to prepend
> > PROG to all gdbserver output, which I don't have a problem with, but
> > thought I'd double check.
>
> OK, I'll concede. Let's try going without.
>
> >>> diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
> >>> index eff4499..1ce5512 100644
> >>> --- a/gdb/gdbserver/utils.c
> >>> +++ b/gdb/gdbserver/utils.c
> >>
> >> Could this new debug support code be put in a new file
> >> instead? E.g., gdbserver/debug.c ?
> >
> > It's a pretty-small file, and utils.c is kind of our collective
> > kitchen sink for such things.
>
> Well, I/we've been trying to stop kitchen sinks. It makes
> turning things into libraries much easier. See the "common"
> project wiki page, for example. Things grow into kitchen sinks
> little by little. Before you know it, the beast is huge.
>
> > I have no preference, just double checking that that's what you want.
>
> It is.
>
> >> It'd be nice if this and gdb_assert.h's version of the same were
> >> shared. That is, e.g., put this in common/common-utils.h instead,
> >> and make gdb_assert.h define ASSERT_FUNCTION as FUNCTION_NAME
> >> (or eliminate ASSERT_FUNCTION entirely). Are you planning on
> >> doing it?
> >
> > Done in v2.
>
> Thanks.
v2 is now split into three parts:
1/3 - move ASSERT_FUNCTION to FUNCTION_NAME in common-utils.h
2/3 - create new function delim_string_to_char_ptr_vec_append in gdb_vecs.c
3/3 - the actual debug_printf patch
I went with --debug[=timestamp] as the option naming.