This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 6/8] Types GC [the GC itself]
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 25 May 2009 23:56:02 +0300
- Subject: Re: [patch 6/8] Types GC [the GC itself]
- References: <20090525080323.GF13323@host0.dyn.jankratochvil.net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Mon, 25 May 2009 10:03:23 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> gdb/doc/
> 2009-05-25 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdbint.texinfo (Symbol Handling): New menu.
> (Partial Symbol Tables, Object File Formats, Debugging File Formats)
> (Adding a New Symbol Reader to GDB): New nodes from existing sections.
> (Types): New node from existing section. New anchor `Builtin Types'.
> (Memory Management for Symbol Files): New node from existing section.
> Move types to ...
> (Memory Management for Types): ... here, in a new node.
> * observer.texi (mark_used): New.
Thanks. I have a few comments about this part.
> +@code{TYPE_OBJFILE} macro indicates the current memory owner of the type.
"The @code{TYPE_OBJFILE} macro ..."
> +Non-@code{NULL} value indicates it is owned by an objfile (specifically by its
"A non-@code{NULL} value indicates ..."
> +User convenience variables, et cetera, have associated types. Normally these
Can you spell out what is behind the "et cetera" here? If the full
list is too long, naming just the most frequently used ones would be
good enough.
> +Types with null @code{TYPE_OBJFILE} can be either permanent types
> +(@pxref{Builtin Types}) or reclaimable types which will be deallocated at the
> +first idle @value{GDBN} moment if the last object referencing them is removed
.
I think "the first idle GDB moment after the last object ... is
removed" is more accurate. "After" instead of "if".
> +Permanent types are allocated by the function @code{alloc_type} (and its
> +derivations like @code{init_type}) specifying objfile as @code{NULL}. The
> +reclaimable types are created the same way but moreover they need to have
^^^^^^^^
I think "in addition" is better here.
> +register handler touching all the still used types by @code{type_mark_used}.
"to register a handler that will touch all the types still in use
with a call to @code{type_mark_used}."
OK with those changes.