am 2f8ded4d: Merge "Delete dbt command for dalvik"
* commit '2f8ded4d1304830710c1d0d80ef532f4b5feb79e': Delete dbt command for dalvik
This commit is contained in:
@@ -1,54 +1,17 @@
|
|||||||
# dump dalvik backtrace
|
#
|
||||||
define dbt
|
# Copyright (C) 2014 The Android Open Source Project
|
||||||
if $argc == 1
|
#
|
||||||
set $FP = $arg0
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
else
|
# you may not use this file except in compliance with the License.
|
||||||
set $FP = $r5
|
# You may obtain a copy of the License at
|
||||||
end
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
set $frame = 0
|
#
|
||||||
set $savedPC = 0
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
while $FP
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
set $stackSave = $FP - sizeof(StackSaveArea)
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
set $savedPC = ((StackSaveArea *)$stackSave)->savedPc
|
# See the License for the specific language governing permissions and
|
||||||
set $method = ((StackSaveArea *)$stackSave)->method
|
# limitations under the License.
|
||||||
printf "#%d\n", $frame
|
|
||||||
printf " FP = %#x\n", $FP
|
|
||||||
printf " stack save = %#x\n", $stackSave
|
|
||||||
printf " Curr pc = %#x\n", ((StackSaveArea *) $stackSave)->xtra.currentPc
|
|
||||||
printf " FP prev = %#x\n", ((StackSaveArea *) $stackSave)->prevFrame
|
|
||||||
if $method != 0
|
|
||||||
printf " returnAddr: 0x%x\n", \
|
|
||||||
((StackSaveArea *)$stackSave)->returnAddr
|
|
||||||
printf " class = %s\n", ((Method *) $method)->clazz->descriptor
|
|
||||||
printf " method = %s (%#08x)\n", ((Method *) $method)->name, $method
|
|
||||||
printf " signature = %s\n", ((Method *) $method)->shorty
|
|
||||||
printf " bytecode offset = 0x%x\n", (short *) (((StackSaveArea *) $stackSave)->xtra.currentPc) - (short *) (((Method *) $method)->insns)
|
|
||||||
set $regSize = ((Method *) $method)->registersSize
|
|
||||||
set $insSize = ((Method *) $method)->insSize
|
|
||||||
set $index = 0
|
|
||||||
while $index < $regSize
|
|
||||||
printf " v%d = %d", $index, ((int *)$FP)[$index]
|
|
||||||
if $regSize - $index <= $insSize
|
|
||||||
printf " (in%d)\n", $insSize - $regSize + $index
|
|
||||||
else
|
|
||||||
printf " (local%d)\n", $index
|
|
||||||
end
|
|
||||||
set $index = $index + 1
|
|
||||||
end
|
|
||||||
else
|
|
||||||
printf " break frame\n"
|
|
||||||
end
|
|
||||||
set $FP = (int) ((StackSaveArea *)$stackSave)->prevFrame
|
|
||||||
set $frame = $frame + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
document dbt
|
|
||||||
Unwind Dalvik stack frames. Argument 0 is the frame address of the top
|
|
||||||
frame. If omitted r5 will be used as the default (as the case in the
|
|
||||||
interpreter and JIT'ed code).
|
|
||||||
end
|
|
||||||
|
|
||||||
# ART debugging. ART uses SIGSEGV signals for internal purposes. To allow
|
# ART debugging. ART uses SIGSEGV signals for internal purposes. To allow
|
||||||
# gdb to debug programs using ART we need to treat this signal specially. We
|
# gdb to debug programs using ART we need to treat this signal specially. We
|
||||||
|
|||||||
Reference in New Issue
Block a user