This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2 v2] Add unit test to aarch64 prologue analyzer
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 1 Dec 2016 18:05:30 +0000
- Subject: Re: [PATCH 1/2 v2] Add unit test to aarch64 prologue analyzer
- Authentication-results: sourceware.org; auth=none
- References: <1480428758-2481-1-git-send-email-yao.qi@linaro.org> <1480591000-19457-1-git-send-email-yao.qi@linaro.org> <c16d6a3a-4e11-d018-8f82-fdde33c34a44@redhat.com> <20161201152115.GB19289@E107787-LIN> <20161201160412.GC19289@E107787-LIN>
On 12/01/2016 04:04 PM, Yao Qi wrote:
> On Thu, Dec 01, 2016 at 03:21:15PM +0000, Yao Qi wrote:
>> On Thu, Dec 01, 2016 at 12:57:45PM +0000, Pedro Alves wrote:
>>> On 12/01/2016 11:16 AM, Yao Qi wrote:
>>>
>>>> +#if GDB_SELF_TEST
>>>> +
>>>> +namespace selftests
>>>> +{
>>>> +
>>>> + /* Instruction reader from manually cooked instruction sequences. */
>>>> +
>>>> + class instruction_reader_test : public abstract_instruction_reader
>>>> + {
>>>
>>> This whole class should be indented at column 0.
>>>
>>
>> Hi Pedro,
>> That is how emacs indents my code (at column 2). Even I start emacs
>> with -q, it still indents that way.
>>
>
> I managed to get emacs indent at column 0 with the following changes in
> gdb/.dir-locals.el.
That unfortunately somehow makes emacs indent members of classes
(even if not in a namespace) at column 0, like:
struct foo
{
int a;
};
Do you get that too?
BTW, the don't-indent-body-of-namespace guideline is here:
https://gcc.gnu.org/codingconventions.html#Namespace_Form
and it does look like GCC generally follows it.
(The '{'-on-same-line rule is there too.)
Thanks,
Pedro Alves