Bug 20150 - [msp430-elf] Disassembly of interrupt vectors
Summary: [msp430-elf] Disassembly of interrupt vectors
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2016-05-26 18:34 UTC by Orlando Arias
Modified: 2016-05-27 12:55 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Orlando Arias 2016-05-26 18:34:08 UTC

As per mailing list discussion, opening a bug report for the issue presented in [1]. Applying the provided patch prevents reads from outside the vector, however the rendering of the objdump is still funny looking:

Disassembly of section __interrupt_vector_47:

0000ffdc <__interrupt_vector_47>:
    ffdc:       d8 49           Address 0x000000000000ffde is out of bounds.
Address 0x000000000000ffde is out of bounds.
mov.b                   ;<memory read failed>, <memory read failed>

Disassembly of section __interrupt_vector_54:

0000ffea <__interrupt_vector_54>:
    ffea:       6e 49           interrupt service routine at 0x496e

Disassembly of section .lowtext:

000044a8 <__crt0_start>:

It would be nice to have all vectors render like __interrupt_vector_54 in the above disassembly. As for the hardware rebooting, as pointed out, this may be a separate issue and I will investigate it further as time allows.

Thank you.


[1] https://sourceware.org/ml/binutils/2016-04/msg00285.html
Comment 1 cvs-commit@gcc.gnu.org 2016-05-27 12:51:29 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:


commit 77d66e7b303f6fa65dd2ca4abce6393d6ea70a8f
Author: Nick Clifton <nickc@redhat.com>
Date:   Fri May 27 13:49:58 2016 +0100

    Improve the MSP430 disassembler's handling of memory read errors.
    	PR target/20150
    	* msp430-dis.c (msp430dis_read_two_bytes): New function.
    	(msp430dis_opcode_unsigned): New function.
    	(msp430dis_opcode_signed): New function.
    	(msp430_singleoperand): Use the new opcode reading functions.
    	Only disassenmble bytes if they were successfully read.
    	(msp430_doubleoperand): Likewise.
    	(msp430_branchinstr): Likewise.
    	(msp430x_callx_instr): Likewise.
    	(print_insn_msp430): Check that it is safe to read bytes before
    	attempting disassembly.  Use the new opcode reading functions.
Comment 2 Nick Clifton 2016-05-27 12:55:39 UTC
Hi Orlando,

  I have checked in an extended version of my original patch.  With this applied the output now looks like this:

Disassembly of section __interrupt_vector_47:

0000ffdc <__interrupt_vector_47>:
    ffdc:	c4 45       	mov.b	r5		; Warning: disassembly unreliable - not enough bytes available

  So, there is still a warning message, but I think that it is more helpful.  Plus I have removed the "Addresss xxx out of bounds" message.