From: Pedro Alves <palves@redhat.com>
To: Doug Evans <dje@google.com>
Cc: Yao Qi <yao@codesourcery.com>,
eliz@gnu.org, gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/3, doc RFA] gdbserver debug_printf+timestamps: main patch
Date: Mon, 20 Jan 2014 16:14:00 -0000 [thread overview]
Message-ID: <52DD4B50.8060002@redhat.com> (raw)
In-Reply-To: <21209.45676.594470.76921@ruffy.mtv.corp.google.com>
On 01/17/2014 10:45 PM, Doug Evans wrote:
> Pedro Alves writes:
> > On 01/16/2014 11:37 PM, Doug Evans wrote:
> > > +++ b/gdb/gdbserver/debug.c
> > > @@ -0,0 +1,86 @@
> > > +/* General utility routines for the remote server for GDB.
> >
> > These ...
> >
> > > +++ b/gdb/gdbserver/debug.h
> > > @@ -0,0 +1,48 @@
> > > +/* General utility routines for the remote server for GDB.
> >
> > ... need updating.
> >
> > > +#endif /* UTILS_H */
> >
> > This too -- DEBUG_H.
> >
> > > +debug_printf (const char *msg, ...)
> > > +{
> > > + va_list args;
> > > +#ifdef HAVE_GETTIMEOFDAY
> > > + static int new_line = 1;
> > > +
> >
> > Note this isn't thread safe either. Maybe add a comment
> > in case we ever try to make timespamping work in the IPA?
> >
> > > + options = delim_string_to_char_ptr_vec (arg + sizeof ("--debug=") - 1, ',');
> > > +
> > > + for (ix = 0; VEC_iterate (char_ptr, options, ix, option); ++ix)
> > > + {
> >
> > I don't see much point in this extra copying over plain old strtok
> > (already used in the --disable-packet= code), but OK...
> >
> > > else if (strcmp (*next_arg, "--debug") == 0)
> > > - debug_threads = 1;
> > > + parse_debug_options (*next_arg);
> > > + else if (strncmp (*next_arg, "--debug=", sizeof ("--debug=") - 1) == 0)
> > > + {
> > > + if (parse_debug_options (*next_arg) != 0)
> > > + exit (1);
> > > + }
> >
> > This should be hooked in "monitor set debug ..." as well.
> >
> > Otherwise looks good to me.
>
> I changed --debug= to --debug-format=, and added monitor commands.
Thanks. I have no further comments.
--
Pedro Alves
next prev parent reply other threads:[~2014-01-20 16:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 21:47 [PATCH 4/6] gdbserver: Delimit debugging output for readability Doug Evans
2013-12-18 11:17 ` Pedro Alves
2014-01-15 0:47 ` Doug Evans
2014-01-16 17:22 ` Pedro Alves
2014-01-16 18:43 ` Doug Evans
2014-01-16 18:54 ` Pedro Alves
2014-01-16 23:28 ` [PATCH 0/3] Add debug_printf and timestamps to gdbserver Doug Evans
2014-01-16 23:31 ` [PATCH 1/3] gdbserver debug_printf+timestamps: FUNCTION_NAME Doug Evans
2014-01-17 12:46 ` Pedro Alves
2014-01-16 23:33 ` [PATCH 2/3] gdbserver debug_printf+timestamps: delim_string_to_char_ptr_vec_append Doug Evans
2014-01-16 23:37 ` [PATCH 3/3, doc RFA] gdbserver debug_printf+timestamps: main patch Doug Evans
2014-01-17 2:58 ` Doug Evans
2014-01-17 7:04 ` Eli Zaretskii
2014-01-17 12:46 ` Pedro Alves
2014-01-17 22:45 ` Doug Evans
2014-01-18 8:25 ` Eli Zaretskii
2014-01-20 16:14 ` Pedro Alves [this message]
2014-01-22 23:06 ` Doug Evans
2014-01-16 18:39 ` [PATCH 4/6] gdbserver: Delimit debugging output for readability Yao Qi
2014-01-16 19:01 ` Doug Evans
2014-01-17 2:32 ` Joel Brobecker
2014-01-17 2:40 ` Joel Brobecker
2014-01-17 12:46 ` Pedro Alves
2014-01-17 12:59 ` Yao Qi
2014-01-20 5:42 ` Tom Tromey
2014-01-20 19:51 ` Doug Evans
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=52DD4B50.8060002@redhat.com \
--to=palves@redhat.com \
--cc=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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