Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Issue 199075: Implemented missing pieces of the debugger for ARM (Closed)

Created:
11 years, 3 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Implemented missing pieces of the debugger for ARM. 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). Committed: http://code.google.com/p/v8/source/detail?r=2879

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 8

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -88 lines) Patch
M src/arm/assembler-arm.h View 1 2 3 6 chunks +20 lines, -4 lines 0 comments Download
M src/arm/assembler-arm.cc View 1 2 3 5 chunks +28 lines, -5 lines 0 comments Download
M src/arm/assembler-arm-inl.h View 1 2 3 1 chunk +17 lines, -12 lines 0 comments Download
M src/arm/codegen-arm.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/arm/codegen-arm.cc View 1 2 3 4 chunks +24 lines, -13 lines 0 comments Download
M src/arm/debug-arm.cc View 1 2 3 4 chunks +35 lines, -13 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 3 5 chunks +38 lines, -4 lines 0 comments Download
M src/arm/virtual-frame-arm.cc View 1 2 3 2 chunks +8 lines, -4 lines 0 comments Download
M test/cctest/cctest.status View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M test/cctest/test-debug.cc View 1 2 3 1 chunk +1 line, -6 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 1 chunk +0 lines, -25 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
11 years, 3 months ago (2009-09-10 12:10:22 UTC) #1
Erik Corry
STV! http://codereview.chromium.org/199075/diff/4006/4015 File src/arm/codegen-arm.cc (right): http://codereview.chromium.org/199075/diff/4006/4015#newcode329 Line 329: __ add(sp, sp, Operand((scope_->num_parameters() + 1) * ...
11 years, 3 months ago (2009-09-10 20:19:57 UTC) #2
Søren Thygesen Gjesse
11 years, 3 months ago (2009-09-14 08:59:18 UTC) #3
http://codereview.chromium.org/199075/diff/4006/4015
File src/arm/codegen-arm.cc (right):

http://codereview.chromium.org/199075/diff/4006/4015#newcode329
Line 329: __ add(sp, sp, Operand((scope_->num_parameters() + 1) *
kPointerSize));
On 2009/09/10 20:19:57, Erik Corry wrote:
> The generated code coverage test relies on you using masm_-> instead of __ in
> the places where you don't want the code instrumented because you are relying
on
> its size.  Probably the generated code coverage stuff doesn't work right now,
> but if it is to be made to work again then this is the sort of place where we
> will need to write masm_->

Done.

http://codereview.chromium.org/199075/diff/4006/4017
File src/arm/macro-assembler-arm.cc (right):

http://codereview.chromium.org/199075/diff/4006/4017#newcode1155
Line 1155: #ifdef ENABLE_DEBUGGER_SUPPORT
On 2009/09/10 20:19:57, Erik Corry wrote:
> I hope you checked that it still compiles with and without this.

I have now checked and it does.

http://codereview.chromium.org/199075/diff/4006/4011
File src/arm/macro-assembler-arm.h (right):

http://codereview.chromium.org/199075/diff/4006/4011#newcode345
Line 345: // the exact number of bytes specified must be emitted. Is not legal
to emit
On 2009/09/10 20:19:57, Erik Corry wrote:
> Is -> It is

Done.

http://codereview.chromium.org/199075/diff/4006/4011#newcode347
Line 347: // an assertion.
On 2009/09/10 20:19:57, Erik Corry wrote:
> assertion -> assertion to fail

Done.

Powered by Google App Engine
This is Rietveld 408576698