From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31393 invoked by alias); 20 Jun 2007 18:32:20 -0000 Received: (qmail 31379 invoked by uid 22791); 20 Jun 2007 18:32:17 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 20 Jun 2007 18:32:13 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-242-188.inter.net.il [83.130.242.188]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id IDD54567 (AUTH halo1); Wed, 20 Jun 2007 21:32:06 +0300 (IDT) Date: Wed, 20 Jun 2007 18:32:00 -0000 Message-Id: From: Eli Zaretskii To: Markus Deuling CC: gdb-patches@sourceware.org, uweigand@de.ibm.com In-reply-to: <4678FEBE.7040209@de.ibm.com> (message from Markus Deuling on Wed, 20 Jun 2007 12:17:34 +0200) Subject: Re: [rfc] Replace macros by gdbarch functions in gdbint manual Reply-to: Eli Zaretskii References: <4678FEBE.7040209@de.ibm.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00399.txt.bz2 > Date: Wed, 20 Jun 2007 12:17:34 +0200 > From: Markus Deuling > CC: Ulrich Weigand > > this patch replaces the macros that have been replaced in gdbarch.sh in GDB's manuals. Thanks. > Is this ok to commit? Yes, after you take care of the following gotchas: > -@deftypefn {Target Macro} CORE_ADDR POINTER_TO_ADDRESS (struct type *@var{type}, char *@var{buf}) > +@deftypefn {Target Macro} CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *@var{current_gdbarch}, struct type *@var{type}, char *@var{buf}) You've replaced a macro with a function, so "Target Macro" is no longer appropriate. (There are many more instances like this one.) > -@anchor{BREAKPOINT_FROM_PC} Use the program counter to determine the > +@item gdbarch_breakpoint_from_pc (@var{current_gdbarch}, @var{pcptr}, @var{lenptr}) > +@findex gdbarch_breakpoint_from_pc > +@anchor{gdbarch_breakpoint_from_pc} Use the program counter to determine the Presumably, some @xref uses this @anchor, and that @xref will need to be changed as well, but I don't see any such changes in the patch. What am I missing? > -@item DECR_PC_AFTER_BREAK > -@findex DECR_PC_AFTER_BREAK > -Define this to be the amount by which to decrement the PC after the > +@item gdbarch_decr_pc_after_break (@var{current_gdbarch}) > +@findex gdbarch_decr_pc_after_break > +Set this to the amount by which to decrement the PC after the A macro can be defined to a constant value, but how can one ``set'' a function to do the same? (Again, there are several similar problems with ``setting'' a function. > --- src/gdb/doc/gdb.texinfo 2007-06-19 05:22:05.000000000 +0200 > +++ dev/gdb/doc/gdb.texinfo 2007-06-20 10:49:17.000000000 +0200 > @@ -22763,8 +22763,8 @@ > Each byte of register data is described by two hex digits. The bytes > with the register are transmitted in target byte order. The size of > each register and their position within the @samp{g} packet are > -determined by the @value{GDBN} internal macros > -@code{DEPRECATED_REGISTER_RAW_SIZE} and @code{REGISTER_NAME} macros. The > +determined by the @value{GDBN} internal gdbarch functions > +@code{DEPRECATED_REGISTER_RAW_SIZE} and @code{gdbarch_register_name}. The DEPRECATED_REGISTER_RAW_SIZE is not a function, is it? Thanks again for working on this.