[PATCH 1/2 v2] Add unit test to aarch64 prologue analyzer

Pedro Alves palves@redhat.com
Thu Dec 1 18:05:00 GMT 2016


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



More information about the Gdb-patches mailing list