public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Darrington <john@darrington.wattle.id.au>
To: gdb-patches@sourceware.org
Cc: John Darrington <john@darrington.wattle.id.au>
Subject: [PATCH 3/4] GDB: Add support for 24 bit addresses
Date: Wed, 29 Aug 2018 14:18:00 -0000	[thread overview]
Message-ID: <20180829141845.26378-4-john@darrington.wattle.id.au> (raw)
In-Reply-To: <20180829141845.26378-1-john@darrington.wattle.id.au>

* gdb/dwarf2-frame.c (encoding_for_size): Deal with case 3.
                (read_encoded_value): Deal with case DW_EH_PE_udata3
---
 gdb/dwarf2-frame.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index f7dc820f4d..b329e34997 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -1527,12 +1527,14 @@ encoding_for_size (unsigned int size)
     {
     case 2:
       return DW_EH_PE_udata2;
+    case 3:
+      return DW_EH_PE_udata3;
     case 4:
       return DW_EH_PE_udata4;
     case 8:
       return DW_EH_PE_udata8;
     default:
-      internal_error (__FILE__, __LINE__, _("Unsupported address size"));
+      internal_error (__FILE__, __LINE__, _("Unsupported address size %d"), size);
     }
 }
 
@@ -1605,6 +1607,9 @@ read_encoded_value (struct comp_unit *unit, gdb_byte encoding,
     case DW_EH_PE_udata2:
       *bytes_read_ptr += 2;
       return (base + bfd_get_16 (unit->abfd, (bfd_byte *) buf));
+    case DW_EH_PE_udata3:
+      *bytes_read_ptr += 3;
+      return (base + bfd_get_24 (unit->abfd, (bfd_byte *) buf));
     case DW_EH_PE_udata4:
       *bytes_read_ptr += 4;
       return (base + bfd_get_32 (unit->abfd, (bfd_byte *) buf));
-- 
2.11.0

  parent reply	other threads:[~2018-08-29 14:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 14:18 S12Z [new patchset] John Darrington
2018-08-29 14:18 ` [PATCH 1/4] gdb: Add builtin types for 24 bit integers John Darrington
2018-09-07 22:04   ` Tom Tromey
2018-09-08  4:27     ` John Darrington
2018-09-08  5:56       ` Tom Tromey
2018-08-29 14:18 ` John Darrington [this message]
2018-09-07 22:04   ` [PATCH 3/4] GDB: Add support for 24 bit addresses Tom Tromey
2018-08-29 14:19 ` [PATCH 4/4] GDB: New target s12z John Darrington
2018-09-07 22:03   ` Tom Tromey
2018-09-08  4:46     ` John Darrington
2018-09-08 13:16       ` Tom Tromey
2018-09-08 13:21         ` John Darrington
2018-08-29 14:19 ` [PATCH 2/4] Add a dwarf unit type to represent 24 bit values John Darrington
2018-09-07 21:50   ` Tom Tromey
2018-09-26 17:42     ` John Darrington
2018-09-27  2:53       ` Simon Marchi
2018-09-27  5:49         ` John Darrington
2018-09-27 17:53           ` Simon Marchi
2018-09-28 16:03             ` John Darrington
2018-09-07 22:46 ` S12Z [new patchset] Simon Marchi
2018-09-08  4:18   ` John Darrington
2018-09-08  6:30     ` John Darrington
2018-09-08 21:37       ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180829141845.26378-4-john@darrington.wattle.id.au \
    --to=john@darrington.wattle.id.au \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).