Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Joern Rennecke <joern.rennecke@superh.com>
Cc: amylaar@fairadsl.co.uk, andrew.stubbs@superh.com,
	gdb-patches@sources.redhat.com,
	Elena Zannoni <ezannoni@redhat.com>
Subject: [OB] fix array size in sh-dis.c
Date: Tue, 13 Jan 2004 20:00:00 -0000	[thread overview]
Message-ID: <40044E37.8090007@redhat.com> (raw)
In-Reply-To: <200401091319.i09DJ7511867@linsvr1.uk.superh.com>

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]


This array needs to be four bytes, in case we have to
disassemble a four byte insn (eg. ppi).  Otherwise, it
clobbers one of the nearby local variables.


[-- Attachment #2: insn --]
[-- Type: text/plain, Size: 841 bytes --]

2004-01-13  Michael Snyder  <msnyder@redhat.com>

        * sh-dis.c (print_insn_sh): Allocate 4	bytes for insn.

Index: sh-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/sh-dis.c,v
retrieving revision 1.17
diff -p -r1.17 sh-dis.c
*** sh-dis.c	5 Dec 2003 02:02:32 -0000	1.17
--- sh-dis.c	13 Jan 2004 19:56:21 -0000
*************** print_insn_sh (memaddr, info)
*** 397,403 ****
  {
    fprintf_ftype fprintf_fn = info->fprintf_func;
    void *stream = info->stream;
!   unsigned char insn[2];
    unsigned char nibs[4];
    int status;
    bfd_vma relmask = ~(bfd_vma) 0;
--- 397,403 ----
  {
    fprintf_ftype fprintf_fn = info->fprintf_func;
    void *stream = info->stream;
!   unsigned char insn[4];
    unsigned char nibs[4];
    int status;
    bfd_vma relmask = ~(bfd_vma) 0;

  parent reply	other threads:[~2004-01-13 20:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-07 21:56 [RFA] Add sh4a to sh-sim (2nd iteration) Michael Snyder
2004-01-07 22:04 ` [RFA] Add sh4a tests to sim/testsuite/sim/sh Michael Snyder
2004-01-08 15:07   ` Joern Rennecke
2004-01-08 22:04     ` Michael Snyder
2004-01-09 13:19   ` Joern Rennecke
2004-01-09 19:47     ` Michael Snyder
2004-01-10  0:46     ` [PATCH] sim/sh whitespace cleanup Michael Snyder
2004-01-13 20:00     ` Michael Snyder [this message]
2004-01-13 23:23       ` [OB] fix array size in sh-dis.c Andrew Cagney
2004-01-14 17:14       ` Joern Rennecke
2004-01-08 16:15 ` [RFA] Add sh4a to sh-sim (2nd iteration) Joern Rennecke
2004-01-08 22:02   ` Michael Snyder
2004-01-09 12:37     ` Joern Rennecke
2004-01-09 19:45       ` Michael Snyder

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=40044E37.8090007@redhat.com \
    --to=msnyder@redhat.com \
    --cc=amylaar@fairadsl.co.uk \
    --cc=andrew.stubbs@superh.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=joern.rennecke@superh.com \
    /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