From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: S/390: don't try to read zero bytes
Date: Thu, 20 Dec 2001 00:56:00 -0000 [thread overview]
Message-ID: <20011220085726.B6FA35E9D8@zwingli.cygnus.com> (raw)
2001-12-20 Jim Blandy <jimb@redhat.com>
* s390-tdep.c (s390_readinstruction): Don't call
info->read_memory_func to read zero bytes. Some targets'
xfer_memory functions can't cope with that.
Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.33
diff -c -r2.33 s390-tdep.c
*** gdb/s390-tdep.c 2001/12/20 03:25:51 2.33
--- gdb/s390-tdep.c 2001/12/20 07:41:37
***************
*** 132,139 ****
if ((*info->read_memory_func) (at, &instr[0], 2, info))
return -1;
instrlen = s390_instrlen[instr[0] >> 6];
! if ((*info->read_memory_func) (at + 2, &instr[2], instrlen - 2, info))
! return -1;
return instrlen;
}
--- 132,142 ----
if ((*info->read_memory_func) (at, &instr[0], 2, info))
return -1;
instrlen = s390_instrlen[instr[0] >> 6];
! if (instrlen > 2)
! {
! if ((*info->read_memory_func) (at + 2, &instr[2], instrlen - 2, info))
! return -1;
! }
return instrlen;
}
next reply other threads:[~2001-12-20 8:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-20 0:56 Jim Blandy [this message]
2001-12-20 3:10 ` Andrew Cagney
2001-12-20 12:53 ` Jim Blandy
2001-12-20 12:57 ` Jim Blandy
2001-12-23 1:44 ` Andrew Cagney
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=20011220085726.B6FA35E9D8@zwingli.cygnus.com \
--to=jimb@zwingli.cygnus.com \
--cc=gdb-patches@sources.redhat.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