This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc/rft] [3/3] Remove stabs target macros: SOFUN_ADDRESS_MAYBE_MISSING


> Date: Fri, 5 Oct 2007 20:06:20 +0200 (CEST)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
> 
> this removes the SOFUN_ADDRESS_MAYBE_MISSING target macro.  There are
> two main parts to this:
> 
> - struct minimal_symbol used to have the member "filename" present
>   only when SOFUN_ADDRESS_MAYBE_MISSING was true.  The patch changes
>   this to make the member always available.  Code used to initialize
>   and use those filenames is now also enabled unconditionally.  (This
>   should not actually change the behaviour of GDB on any target.)
> 
> - Instead of the SOFUN_ADDRESS_MAYBE_MISSING macro, a new gdbarch
>   variable gdbarch_sofun_address_maybe_missing is introduces.  All
>   places where GDB behaviour depended on SOFUN_ADDRESS_MAYBE_MISSING
>   now look at that gdbarch variable instead.

Thanks.

> doc/ChangeLog:
> 
> 	* gdbint.texinfo: Document gdbarch_sofun_address_maybe_missing
> 	instead of SOFUN_ADDRESS_MAYBE_MISSING.

This part is almost okay; I have a few minor comments:

 . The ChangeLog entry needs to state the name(s) of the node(s) where
   you make the changes (in parens, as if they were names of
   functions).

 . Please put the function prototypes where you describe them.  For
   example:

> -@item SOFUN_ADDRESS_MAYBE_MISSING
> -@findex SOFUN_ADDRESS_MAYBE_MISSING
> +@item int gdbarch_sofun_address_maybe_missing
> +@findex gdbarch_sofun_address_maybe_missing

The old SOFUN_ADDRESS_MAYBE_MISSING was a macro without arguments, but
the new gdbarch_sofun_address_maybe_missing is a function that accepts
arguments.  The @item line should show the full prototype of the
function, including the type(s) of its argument(s).

 . Some of the changes were too mechanical: replacing a macro with a
   function sometimes needs more elaborate changes in the text to
   avoid unclear or incorrect wording:

> -@code{SOFUN_ADDRESS_MAYBE_MISSING} indicates that a particular set of
> +@code{gdbarch_sofun_address_maybe_missing} indicates that a particular set of

A function cannot _indicate_ anything, it can return a value that
indicates something.  (The old text was correct because the macro was
used in an #ifdef at compile time.)

> -@code{SOFUN_ADDRESS_MAYBE_MISSING} means two things:
> +@code{gdbarch_sofun_address_maybe_missing} means two things:

Again, a function cannot _mean_ anything; please rephrase.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]