public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [COMMITTED PATCH] gdb: LoongArch: Implement the push_dummy_call gdbarch method
Date: Sat, 16 Jul 2022 19:58:17 +0800	[thread overview]
Message-ID: <1b481f74-7fbc-2239-b418-08187e24d92d@loongson.cn> (raw)
In-Reply-To: <875yjyp9pp.fsf@tromey.com>



On 07/16/2022 01:27 AM, Tom Tromey wrote:
>>>>>> Tiezhu Yang <yangtiezhu@loongson.cn> writes:
>
>> +static void
>> +pass_in_gar (struct regcache *regcache, unsigned int gar, const gdb_byte *val)
>
> In gdb, functions generally should have an introductory comment
> explaining their purpose.
>
>> +static __attribute__((aligned(16))) gdb_byte buf[1024] = { 0 };
>> +static gdb_byte *addr = buf;
>
> I don't understand why a global is needed here, or why the attribute is
> needed.  But anyway, the attribute isn't really portable, and since this
> is tdep code (not specific to some host where you could maybe get away
> with assuming the compiler), it can't be used.
>
>> +static unsigned int fixed_point_members = 0;
>> +static unsigned int floating_point_members = 0;
>> +static bool first_member_is_fixed_point = false;
>
> Please don't use globals for this kind of thing.
> You can make a new object or you can pass pointers to locals.
>
>> +	    /* integer or pointer type is passed in GAR.
>> +	     * If no GAR is available, it€s passed on the stack.
>> +	     * When passed in registers or on the stack,
>> +	     * the unsigned integer scalars are zero-extended to GRLEN bits,
>> +	     * and the signed integer scalars are sign-extended.  */
>
> In the gdb style, subsequent comment lines don't have the "*".
>
> thanks,
> Tom
>

Hi Tom,

Thank you very much.

I modify the related code as you suggested, please review the patch.

https://sourceware.org/pipermail/gdb-patches/2022-July/190814.html

Thanks,
Tiezhu


      reply	other threads:[~2022-07-16 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07  9:15 Tiezhu Yang
2022-07-15 17:27 ` Tom Tromey
2022-07-16 11:58   ` Tiezhu Yang [this message]

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=1b481f74-7fbc-2239-b418-08187e24d92d@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).