[PATCH 10/12] gdb: change linux gdbarch data from post to pre-init

Pedro Alves pedro@palves.net
Wed Nov 25 01:41:08 GMT 2020


On 11/10/20 9:46 PM, Simon Marchi via Gdb-patches wrote:
> The following patch will need to fill a field in linux_gdbarch_data
> while the gdbarch is being built.  linux_gdbarch_data is currently
> allocated as a post-init gdbarch data, meaning it's not possible to fill
> it before the gdbarch is completely initialized.  Change it to a
> pre-init gdbarch data to allow this.
> 
> The init_linux_gdbarch_data function doesn't use the created gdbarch,
> it only allocates the linux_gdbarch_data structure on the gdbarch's
> obstack, so the change is trivial.
> 
> gdb/ChangeLog:
> 
> 	* linux-tdep.c (init_linux_gdbarch_data): Change parameter to
> 	obkstack.

"obkstack" -> "obstack".

> 	(_initialize_linux_tdep): Register pre-init gdb data instead of
> 	post-init.

OK.


More information about the Gdb-patches mailing list