This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 17/18] fix gdbarch buglet
- From: Ondrej Oprala <ooprala at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Mon, 21 Oct 2013 17:37:25 +0200
- Subject: [PATCH 17/18] fix gdbarch buglet
- Authentication-results: sourceware.org; auth=none
- References: <1382369846-5817-1-git-send-email-ooprala at redhat dot com>
From: Tom Tromey <tromey@redhat.com>
gdb/ChangeLog:
2013-10-09 Tom Tromey <tromey@redhat.com>
* gdbarch.c: Regenerate.
(byte_order_for_code): Likewise.
(gdbarch_byte_order): Change type of the return value.
(gdbarch_byte_order_for_code): Likewise.
* gdbarch.h: Regenerate.
* gdbarch.sh (byte_order): Change the return type.
(byte_order_for_code): Likewise.
---
gdb/gdbarch.c | 8 ++++----
gdb/gdbarch.h | 4 ++--
gdb/gdbarch.sh | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 396bb67..3b82605 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -99,8 +99,8 @@ struct gdbarch
/* basic architectural information. */
const struct bfd_arch_info * bfd_arch_info;
- int byte_order;
- int byte_order_for_code;
+ enum bfd_endian byte_order;
+ enum bfd_endian byte_order_for_code;
enum gdb_osabi osabi;
const struct target_desc * target_desc;
@@ -1444,7 +1444,7 @@ gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
return gdbarch->bfd_arch_info;
}
-int
+enum bfd_endian
gdbarch_byte_order (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -1453,7 +1453,7 @@ gdbarch_byte_order (struct gdbarch *gdbarch)
return gdbarch->byte_order;
}
-int
+enum bfd_endian
gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index b58efc8..92e3ddf 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -91,10 +91,10 @@ typedef int (iterate_over_objfiles_in_search_order_cb_ftype)
extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch);
/* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */
-extern int gdbarch_byte_order (struct gdbarch *gdbarch);
+extern enum bfd_endian gdbarch_byte_order (struct gdbarch *gdbarch);
/* set_gdbarch_byte_order() - not applicable - pre-initialized. */
-extern int gdbarch_byte_order_for_code (struct gdbarch *gdbarch);
+extern enum bfd_endian gdbarch_byte_order_for_code (struct gdbarch *gdbarch);
/* set_gdbarch_byte_order_for_code() - not applicable - pre-initialized. */
extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index fa9731d..2fe535e 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -340,8 +340,8 @@ function_list ()
cat <<EOF
i:const struct bfd_arch_info *:bfd_arch_info:::&bfd_default_arch_struct::::gdbarch_bfd_arch_info (gdbarch)->printable_name
#
-i:int:byte_order:::BFD_ENDIAN_BIG
-i:int:byte_order_for_code:::BFD_ENDIAN_BIG
+i:enum bfd_endian:byte_order:::BFD_ENDIAN_BIG
+i:enum bfd_endian:byte_order_for_code:::BFD_ENDIAN_BIG
#
i:enum gdb_osabi:osabi:::GDB_OSABI_UNKNOWN
#
--
1.8.3.1