This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Doc: make python function/method descriptions look as in Python
> From: <Paul_Koning@Dell.com>
> CC: <gdb-patches@sourceware.org>
> Date: Tue, 6 Sep 2011 14:39:36 -0500
>
> Thanks!
>
> I spotted one problem. Changing the description of gdb.prompt_hook from a defop to a defun made the xref{prompt_hook} not work. Either that or it was broken already. I made it xref{gdb.prompt_hook} but that produces an error when I click on that cross-reference. What's the texinfo magic to define what xref points to?
That magic is @anchor, but you broke it because you changed the name of
the anchor, which you shouldn't:
> -@defop Operation {@value{GDBN}} prompt_hook current_prompt
> -@anchor{prompt_hook}
> +@defun gdb.prompt_hook (current_prompt)
> +@anchor{gdb.prompt_hook}
You shouldn't change the @anchor line at all, because its label has
nothing to do with the method name. It's just a label, is not visible
to the reader, and it _must_ match the label inside @xref. You cannot
change one without changing the other to match.