• sgjesse@chromium.org's avatar
    Implemented missing pieces of the debugger for ARM. · 34d6ff76
    sgjesse@chromium.org authored
    The main piece of this change was to add support for break on return for ARM. On ARM the normal js function return consist of the following code sequence.
    
      mov sp, fp
      ldmia sp!, {fp, lr}
      add sp, sp, #4
      bx lr
    
    to a call to the debug break return entry code using the following code sequence
    
      mov lr, pc
      ldr pc, [pc, #-4]
      <debug break return entry code entry point address>
      bktp 0
    
    The values of Assembler::kPatchReturnSequenceLength and Assembler::kPatchReturnSequenceLength are somewhat misleading, but they fit the current use in the debugger. Also Assembler::kPatchReturnSequenceLength is used in the IC code as well (for something which is not related to return sequences at all). I will change that in a separate changelist.
    
    For the debugger to work also added recording of the return sequence in the relocation info and handling of source position recording when a function ends with a return statement.
    
    Used the constant kInstrSize instead of sizeof(Instr).
    
    Passes all debugger tests on both simulator and hardware (only release mode tested on hardware).
    Review URL: http://codereview.chromium.org/199075
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    34d6ff76
assembler-arm-inl.h 7.22 KB