Commit bfaf9a43 authored by edgar_igl's avatar edgar_igl

Teach the CRIS disassembler to stay within the provided buffer.

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162
parent 5c751e99
......@@ -2625,12 +2625,10 @@ print_insn_cris_generic (bfd_vma memaddr,
If we can't get any data, or we do not get enough data, we print
the error message. */
for (nbytes = MAX_BYTES_PER_CRIS_INSN; nbytes > 0; nbytes -= 2)
status = (*info->read_memory_func) (memaddr, buffer, nbytes, info);
if (status == 0)
nbytes = info->buffer_length;
status = (*info->read_memory_func) (memaddr, buffer, nbytes, info);
/* If we did not get all we asked for, then clear the rest.
Hopefully this makes a reproducible result in case of errors. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment