[PATCH v2] Add support for "info auxv" on NetBSD
Tom Tromey
tom@tromey.com
Fri Mar 20 15:43:48 GMT 2020
>>>>> "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.
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.
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."...
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.
thanks,
Tom
More information about the Gdb-patches
mailing list