This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [Patch] Microblaze: Port of Linux gdbserver
- From: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- To: Michael Eager <eager at eagercon dot com>, Pedro Alves <palves at redhat dot com>, Joel Brobecker <brobecker at adacore dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Vinod Kathail <vinodk at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, "Nagaraju Mekala" <nmekala at xilinx dot com>
- Date: Tue, 14 Oct 2014 03:03:19 +0000
- Subject: RE: [Patch] Microblaze: Port of Linux gdbserver
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp dot mailfrom=ajit dot kumar dot agarwal at xilinx dot com;
- References: <25de23b98e054fd291ea232d10f2800c at BN1BFFO11FD018 dot protection dot gbl> <5436B7D0 dot 9060004 at eagercon dot com> <d0a23ff7601a4dbcab91d5b680bc2e13 at BY2FFO11FD017 dot protection dot gbl> <54371D57 dot 2030605 at eagerm dot com> <34ec0544f8114711a7ac5f9bccbfba99 at BY2FFO11FD025 dot protection dot gbl> <543C10AF dot 4000500 at eagercon dot com>
-----Original Message-----
From: Michael Eager [mailto:eager@eagercon.com]
Sent: Monday, October 13, 2014 11:20 PM
To: Ajit Kumar Agarwal; Michael Eager; Pedro Alves; Joel Brobecker
Cc: gdb-patches@sourceware.org; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch] Microblaze: Port of Linux gdbserver
On 10/13/14 09:00, Ajit Kumar Agarwal wrote:
>
>> +#define microblaze_breakpoint_len 4
>>
>>>> Use CAPS for macros.
>>
>> The MIPS and the ARM gdbserver code does not use the CAPS for the above macro defined.
>
>> Let's follow the GNU coding standard, even if some other targets haven't.
>
> https://gcc.gnu.org/ml/gcc-patches/2000-09/msg00901.html
> https://gcc.gnu.org/ml/gcc-patches/2000-09/msg00912.html
>To quote your first reference:
>"I actually think it's a mistake to spell function-like macros in ALL_CAPS, precisely because that makes changing back-and-forth unduly disruptive."
>To quote the second reference:
>"ALL_CAPS in cases when it's important to be aware that it's a macro, but when we make "wrappers" for efficiency purposes where we basically want to >pretend it's a function,".
>This is not a function-like macro. In this case, it is important to be aware that this is a macro, not a variable.
The macro microblaze_breakpoint_len is initialized in the struct linux_target_ops the_low_target. This makes it as a wrapper and the above quote is valid.
Still the CAPS is required for the above macro?
AGAIN, please follow the GNU Coding Standard.
Thanks & Regards
Ajit
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077