This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[COMMIT] Introduce gdb_byte
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: gdb-patches at sources dot redhat dot com
- Cc: eliz at gnu dot org, cagney at gnu dot org
- Date: Sun, 8 May 2005 16:58:09 +0200 (CEST)
- Subject: [COMMIT] Introduce gdb_byte
OK, folks. To prevent any further delay I've committed the attached.
Tweaked the comments a bit to make the comment for CORE_ADDR/bfd_vma
apply to gdb_byte/bfd_byte too.
In the long run, we might want to replace CORE_ADD/LONGES/ULONGES with
some gdb_-prefixed names too.
Andrew, feel welcome to commit the next bit of GCC 4 -Werror support
patches using gdb_byte whenever you feel like it.
I'll get started on converting the stuff that I maintain to use the
new convention.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* defs.h (gdb_byte): New typedef. Tweak comments.
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.183
diff -u -p -r1.183 defs.h
--- defs.h 14 Apr 2005 18:40:25 -0000 1.183
+++ defs.h 8 May 2005 14:52:54 -0000
@@ -1,7 +1,7 @@
/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
/* Basic, host-specific, and target-specific definitions for GDB.
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GDB.
@@ -63,15 +63,16 @@
#include "libiberty.h"
-/* For BFD64 and bfd_vma. */
+/* Rather than duplicate all the logic in BFD for figuring out what
+ types to use (which can be pretty complicated), symply define them
+ in terms of the corresponding type from BFD. */
+
#include "bfd.h"
-/* An address in the program being debugged. Host byte order. Rather
- than duplicate all the logic in BFD which figures out what type
- this is (long, long long, etc.) and whether it needs to be 64
- bits (the host/target interactions are subtle), we just use
- bfd_vma. */
+/* A byte from the program being debugged. */
+typedef bfd_byte gdb_byte;
+/* An address in the program being debugged. Host byte order. */
typedef bfd_vma CORE_ADDR;
/* This is to make sure that LONGEST is at least as big as CORE_ADDR. */