This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] comment looks wrong...
- From: Michael Snyder <msnyder at vmware dot com>
- To: Michael Snyder <msnyder at vmware dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sun, 01 Nov 2009 12:38:06 -0800
- Subject: Re: [RFA] comment looks wrong...
- References: <4AE89A1F.2080502@vmware.com> <20091028200435.GA13464@caradoc.them.org> <4AEDD14C.4080505@vmware.com> <20091101193312.GA31647@caradoc.them.org>
Daniel Jacobowitz wrote:
On Sun, Nov 01, 2009 at 10:19:56AM -0800, Michael Snyder wrote:
Does that mean you don't favor changing it?
Your new formulation uses the opposite meaning of extract to the one
presently there. If the old one was unclear, the new one is unclear
also...
Fair enough -- how's this?
2009-10-28 Michael Snyder <msnyder@vmware.com>
* findvar.c (top level): Fix and add comments.
Index: gdb/findvar.c
===================================================================
--- gdb.orig/findvar.c 2009-10-28 12:33:28.000000000 -0700
+++ gdb/findvar.c 2009-11-01 12:37:26.000000000 -0800
@@ -36,8 +36,9 @@
#include "block.h"
#include "objfiles.h"
-/* Basic byte-swapping routines. GDB has needed these for a long time...
- All extract a target-format integer at ADDR which is LEN bytes long. */
+/* Basic byte-swapping routines. GDB has needed these for a long
+ time... All 'extract' functions return a host-format integer
+ from a target-format integer ADDR which is LEN bytes long. */
#if TARGET_CHAR_BIT != 8 || HOST_CHAR_BIT != 8
/* 8 bit characters are a pretty safe assumption these days, so we
@@ -179,6 +180,8 @@
return gdbarch_pointer_to_address (get_type_arch (type), type, buf);
}
+/* All 'store' functions accept a host-format integer and store a
+ target-format integer at ADDR which is LEN bytes long. */
void
store_signed_integer (gdb_byte *addr, int len,