This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/3] Add debug_printf and timestamps to gdbserver


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]