This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa:doco] mention gdbarch_obstack_zalloc in per-module data
- From: "Eli Zaretskii" <eliz at elta dot co dot il>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 16 Feb 2004 11:29:15 +0200
- Subject: Re: [rfa:doco] mention gdbarch_obstack_zalloc in per-module data
- References: <402FC215.3020906@gnu.org>
- Reply-to: Eli Zaretskii <eliz at elta dot co dot il>
> Date: Sun, 15 Feb 2004 14:01:41 -0500
> From: Andrew Cagney <cagney@gnu.org>
>
> Per my e-mail to markk, this updates the doco to reflect current reality.
>
> ok?
Yes, but...
> +Any memory required by the @var{init} function should be allocated using
> +@var{gdbarch_obstack_zalloc}.
`gdbarch_obstack_zalloc' is not a parameter, but a true literal
symbol, so it should be in @code, not in @var.
> @deftypefun void set_gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *handle, void *@var{pointer})
`handle' should be in @var here, I think.
> +Set the uninitialized (NULL) data-pointer corresponding to @var{handle}
> +to the non-NULL @var{pointer} value.
Both `NULL's should be in @code.
Also, is it guaranteed that uninitialized pointers have a NULL value?
In general, that's not true, but perhaps in the context of gdbarch it
is, I just don't know.
Thanks.