public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/3]
@ 2018-08-25 11:25 John Darrington
  2018-08-25 11:25 ` [PATCH] gdb: Add builtin types for 24 bit integers John Darrington
  0 siblings, 1 reply; 2+ messages in thread
From: John Darrington @ 2018-08-25 11:25 UTC (permalink / raw)
  To: gdb-patches

Thanks.  In that case, I'm posting a new version of the patch here with
update commit message addressing Eli's concerns.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] gdb: Add builtin types for 24 bit integers.
  2018-08-25 11:25 [PATCH 1/3] John Darrington
@ 2018-08-25 11:25 ` John Darrington
  0 siblings, 0 replies; 2+ messages in thread
From: John Darrington @ 2018-08-25 11:25 UTC (permalink / raw)
  To: gdb-patches; +Cc: John Darrington

Add int24 and uint24.  These are used by the upcoming S12Z target, but will be
needed for any arch which features 24 bit registers.

* gdb/gdbtypes.h (struct builtin_type): New members builtin_int24
  and builtin_uint24;
* gdb/gdbtypes.c: Initialize them.
* gdb/doc/gdb.texinfo (Predefined Target Types): Mention types int24 and uint24.
---
 gdb/doc/gdb.texinfo | 2 ++
 gdb/gdbtypes.c      | 4 ++++
 gdb/gdbtypes.h      | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5068c0ac81..e4ecd57a9e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -42379,6 +42379,7 @@ Boolean type, occupying a single bit.
 
 @item int8
 @itemx int16
+@itemx int24
 @itemx int32
 @itemx int64
 @itemx int128
@@ -42386,6 +42387,7 @@ Signed integer types holding the specified number of bits.
 
 @item uint8
 @itemx uint16
+@itemx uint24
 @itemx uint32
 @itemx uint64
 @itemx uint128
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 65b1211ec4..05bf7b1134 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -5402,6 +5402,10 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
     = arch_integer_type (gdbarch, 16, 0, "int16_t");
   builtin_type->builtin_uint16
     = arch_integer_type (gdbarch, 16, 1, "uint16_t");
+  builtin_type->builtin_int24
+    = arch_integer_type (gdbarch, 24, 0, "int24_t");
+  builtin_type->builtin_uint24
+    = arch_integer_type (gdbarch, 24, 1, "uint24_t");
   builtin_type->builtin_int32
     = arch_integer_type (gdbarch, 32, 0, "int32_t");
   builtin_type->builtin_uint32
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 14059ab3dc..eb7c365b71 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1611,6 +1611,8 @@ struct builtin_type
   struct type *builtin_uint8;
   struct type *builtin_int16;
   struct type *builtin_uint16;
+  struct type *builtin_int24;
+  struct type *builtin_uint24;
   struct type *builtin_int32;
   struct type *builtin_uint32;
   struct type *builtin_int64;
-- 
2.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-25 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-25 11:25 [PATCH 1/3] John Darrington
2018-08-25 11:25 ` [PATCH] gdb: Add builtin types for 24 bit integers John Darrington

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).