On 16.03.2020 14:25, Tom Tromey wrote: >>>>>> "Kamil" == Kamil Rytarowski writes: > > Kamil> The type field is always 32bit. The value field reflects the size of > Kamil> the register/pointer. > > Kamil> gdb/ChangeLog: > > Kamil> * auxv.c (default_auxv_parse): Add new variable sizeof_auxv_type > Kamil> and use it in extract_unsigned_integer(). > > Kamil> +#ifdef __NetBSD__ > Kamil> + const int sizeof_auxv_type = sizeof(int32_t); > Kamil> +#else > Kamil> + const int sizeof_auxv_type = sizeof_auxv_field; > Kamil> +#endif > > IIUC, sizeof_auxv_type describes a property of the target. That means > this approach is incorrect, because it will only work for native > debugging, and will do the wrong thing in other cases. > > If default_auxv_parse is incorrect for NetBSD, another way is to > override it in the appropriate gdbarch. See target_auxv_parse. OpenBSD > appears to do this, see obsd_auxv_parse. > > Tom > Done. Please see "[PATCH v2] Add support for "info auxv" on NetBSD".