From: Kamil Rytarowski <n54@gmx.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Add support for "info auxv" on NetBSD
Date: Fri, 20 Mar 2020 18:27:38 +0100 [thread overview]
Message-ID: <5554bfd0-3d1f-6aac-93e5-b6067942485a@gmx.com> (raw)
In-Reply-To: <871rpnm3pn.fsf@tromey.com>
[-- Attachment #1.1: Type: text/plain, Size: 1785 bytes --]
On 20.03.2020 16:43, Tom Tromey wrote:
>>>>>> "Kamil" == Kamil Rytarowski <n54@gmx.com> writes:
>
> Kamil> Register nbsd_auxv_parse() that overloads the default (Linux-style)
> Kamil> AUXV parsing. On NetBSD the type parameter is defined as int32_t
> Kamil> for all architectures.
>
> Thanks for the patch.
>
> Kamil> +
> Kamil> +static int
> Kamil> +nbsd_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr,
> Kamil> + gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
>
> In gdb a new function should always have an intro comment. This one
> could just explain which gdbarch callback it implements.
>
Done.
> Kamil> +{
> Kamil> + struct type *int_type = builtin_type (gdbarch)->builtin_int;
>
> Presumably you want builtin_in32 here? builtin_int is
> architecture-dependent. Or you could just hard-code the size, with a
> suitable comment.
>
int is de facto alias for int32 on NetBSD.
It cannot be shorter (there are assumptions that it is at least 32-bit)
and a lot of things will break for making it longer. So it will likely
stay that way forever.
I prefer to keep it as 'int' to match the preexisting OpenBSD code.
> Kamil> +
> Kamil> +void
> Kamil> +nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
>
> The intro comment here should probably say "See nbsd-tdep.h."...
>
Done.
> Kamil> +++ b/gdb/nbsd-tdep.h
> Kamil> @@ -25,4 +25,6 @@ struct link_map_offsets *nbsd_lp64_solib_svr4_fetch_link_map_offsets (void);
>
> Kamil> int nbsd_pc_in_sigtramp (CORE_ADDR, const char *);
>
> Kamil> +void nbsd_init_abi (struct gdbarch_info, struct gdbarch *);
>
> ... and then there should be a descriptive comment above this line.
>
Done.
> thanks,
> Tom
>
Please see v3.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-03-20 17:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-14 18:22 [PATCH] Correct decoding AUXV " Kamil Rytarowski
2020-03-16 13:25 ` Tom Tromey
2020-03-16 18:17 ` Kamil Rytarowski
2020-03-16 18:17 ` [PATCH v2] Add support for "info auxv" " Kamil Rytarowski
2020-03-19 13:11 ` Kamil Rytarowski
2020-03-20 15:43 ` Tom Tromey
2020-03-20 17:27 ` Kamil Rytarowski [this message]
2020-03-20 17:27 ` [PATCH v3] " Kamil Rytarowski
2020-03-26 23:26 ` Kamil Rytarowski
2020-03-27 16:31 ` John Baldwin
2020-03-27 17:04 ` Kamil Rytarowski
2020-03-27 19:22 ` John Baldwin
2020-03-29 20:35 ` Kamil Rytarowski
2020-03-29 22:10 ` Simon Marchi
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=5554bfd0-3d1f-6aac-93e5-b6067942485a@gmx.com \
--to=n54@gmx.com \
--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