* [rfa/doc] Do not use formal parameters named "current_gdbarch" in the docs
@ 2009-06-04 12:39 Ulrich Weigand
2009-06-04 14:49 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Weigand @ 2009-06-04 12:39 UTC (permalink / raw)
To: gdb-patches
Hello,
gdbint.texinfo contains a number of cases where the struct gdbarch *
formal parameter of a gdbarch callback function is shown with the name
"current_gdbarch". This is somewhat confusing, as the sources never
do that (and for good reason, because it would shadow the current_gdbarch
global variable).
In addition, this causes some false positives when grepping the sources
for current_gdbarch instances that are to be eliminated.
The following patch renames those formal paramters to "gdbarch", as
is common usage in GDB source code.
OK to apply?
Bye,
Ulrich
ChangeLog:
* gdbint.texinfo: Rename formal parameters to gdbarch function
protoypes from "current_gdbarch" to "gdbarch".
Index: gdb-head/gdb/doc/gdbint.texinfo
===================================================================
--- gdb-head.orig/gdb/doc/gdbint.texinfo
+++ gdb-head/gdb/doc/gdbint.texinfo
@@ -3313,7 +3313,7 @@ relationship between pointers and addres
definitions, appropriate for architectures on which all pointers are
simple unsigned byte addresses.
-@deftypefun CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *@var{current_gdbarch}, struct type *@var{type}, char *@var{buf})
+@deftypefun CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *@var{gdbarch}, struct type *@var{type}, char *@var{buf})
Assume that @var{buf} holds a pointer of type @var{type}, in the
appropriate format for the current architecture. Return the byte
address the pointer refers to.
@@ -3322,7 +3322,7 @@ This function may safely assume that @va
C@t{++} reference type.
@end deftypefun
-@deftypefun void gdbarch_address_to_pointer (struct gdbarch *@var{current_gdbarch}, struct type *@var{type}, char *@var{buf}, CORE_ADDR @var{addr})
+@deftypefun void gdbarch_address_to_pointer (struct gdbarch *@var{gdbarch}, struct type *@var{type}, char *@var{buf}, CORE_ADDR @var{addr})
Store in @var{buf} a pointer of type @var{type} representing the address
@var{addr}, in the appropriate format for the current architecture.
@@ -3346,18 +3346,18 @@ following macros should be defined in or
types within @value{GDBN} as well as provide the added information to
a @value{GDBN} user when printing type expressions.
-@deftypefun int gdbarch_address_class_type_flags (struct gdbarch *@var{current_gdbarch}, int @var{byte_size}, int @var{dwarf2_addr_class})
+@deftypefun int gdbarch_address_class_type_flags (struct gdbarch *@var{gdbarch}, int @var{byte_size}, int @var{dwarf2_addr_class})
Returns the type flags needed to construct a pointer type whose size
is @var{byte_size} and whose address class is @var{dwarf2_addr_class}.
This function is normally called from within a symbol reader. See
@file{dwarf2read.c}.
@end deftypefun
-@deftypefun {char *} gdbarch_address_class_type_flags_to_name (struct gdbarch *@var{current_gdbarch}, int @var{type_flags})
+@deftypefun {char *} gdbarch_address_class_type_flags_to_name (struct gdbarch *@var{gdbarch}, int @var{type_flags})
Given the type flags representing an address class qualifier, return
its name.
@end deftypefun
-@deftypefun int gdbarch_address_class_name_to_type_flags (struct gdbarch *@var{current_gdbarch}, int @var{name}, int *@var{type_flags_ptr})
+@deftypefun int gdbarch_address_class_name_to_type_flags (struct gdbarch *@var{gdbarch}, int @var{name}, int *@var{type_flags_ptr})
Given an address qualifier name, set the @code{int} referenced by @var{type_flags_ptr} to the type flags
for that address class qualifier.
@end deftypefun
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [rfa/doc] Do not use formal parameters named "current_gdbarch" in the docs
2009-06-04 12:39 [rfa/doc] Do not use formal parameters named "current_gdbarch" in the docs Ulrich Weigand
@ 2009-06-04 14:49 ` Eli Zaretskii
2009-06-04 15:19 ` Ulrich Weigand
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2009-06-04 14:49 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: gdb-patches
> Date: Thu, 4 Jun 2009 14:38:33 +0200 (CEST)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
>
> OK to apply?
>
> Bye,
> Ulrich
>
>
> ChangeLog:
>
> * gdbint.texinfo: Rename formal parameters to gdbarch function
> protoypes from "current_gdbarch" to "gdbarch".
Yes, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa/doc] Do not use formal parameters named "current_gdbarch" in the docs
2009-06-04 14:49 ` Eli Zaretskii
@ 2009-06-04 15:19 ` Ulrich Weigand
0 siblings, 0 replies; 3+ messages in thread
From: Ulrich Weigand @ 2009-06-04 15:19 UTC (permalink / raw)
To: eliz; +Cc: gdb-patches
Eli Zaretskii wrote:
> > Date: Thu, 4 Jun 2009 14:38:33 +0200 (CEST)
> > From: "Ulrich Weigand" <uweigand@de.ibm.com>
> >
> > OK to apply?
> >
> > Bye,
> > Ulrich
> >
> >
> > ChangeLog:
> >
> > * gdbint.texinfo: Rename formal parameters to gdbarch function
> > protoypes from "current_gdbarch" to "gdbarch".
>
> Yes, thanks.
Committed, thanks!
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-04 15:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-04 12:39 [rfa/doc] Do not use formal parameters named "current_gdbarch" in the docs Ulrich Weigand
2009-06-04 14:49 ` Eli Zaretskii
2009-06-04 15:19 ` Ulrich Weigand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox