This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/6] gdbserver: Delimit debugging output for readability
- From: Pedro Alves <palves at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 16 Jan 2014 18:54:13 +0000
- Subject: Re: [PATCH 4/6] gdbserver: Delimit debugging output for readability
- 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>
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.
--
Pedro Alves