没有合适的资源?快使用搜索试试~ 我知道了~
首页debugging_android.pdf trace32
debugging_android.pdf trace32

debugging_android.pdf trace32 debugging_android.pdf trace32 debugging_android.pdf trace32
资源详情
资源评论
资源推荐

1 / 10
From the Debug Research Labs: Debugging Android
Hagen Patzke, Software Design Embedded Debugging, Lauterbach GmbH
Synopsis
Android comes with good support for developing and debugging: High-level (Java
TM
) application debugging
is well covered by debug support in the Dalvik interpreter. Debugging “native” parts of the platform, like
system services written in C/C++ that run in their own process, can be done with relative ease with an
included GNU Debug Server. And if you want to port to a new platform, you can use mature hardware-
assisted debug tools for the initial debugging of low-level drivers and the kernel itself. So all is perfect - end
of article. Really?
Welcome to the other side, if you are a system developer who needs to track a bug that spans several of
these worlds. Or if you need to find a bug that does not show itself as soon as debug assistance is enabled.
Or perhaps you work with a production-stage or secure platform where no software-assisted debugging is
allowed. Here, things can become really difficult.
This article gives a short introduction to embedded debugging in general, covering the different abstraction
levels involved, and some special aspects of Android debugging.
The Platform
Android probably is such a success because it is a complete top-to-bottom integrated platform. Everything is
well specified to build a working, useful device. Furthermore, when Google
TM
made it available as "open
source", both an emulator and a real device, ARM
TM
implementation was provided that actually prove its
function in the real world.
At Android’s heart is a specially adapted Linux 2.6 kernel. This is what makes it tick and among lots of other
functions, it provides multi-threading for services and for virtual machine processes.
Native code and virtual machine programs together form the Android “system”.
Android Debug Inventory
Application developers are pretty well catered for: a very good
SDK is available and an active community provides support. With a
free Eclipse plug-in you can not only develop your Java
TM
/Dalvik
application, but by using an extended version of the Java Wired
Debug Protocol (JWDP) via the Android Debug Bridge (ADB), with
aid from the Dalvik Virtual Machine (VM) and a debug daemon on
the device, you can also quite efficiently debug it.
The same is true if you write “native code”, e.g. to do application
code heavy-lifting in a service process. You can use a GNU Debug
Server to attach to your process and debug it.
Stop-Mode Debugging: The platform with all
operating system and application processes
is suspended in “debug mode”; all state is
frozen for inspection by the debugger. This
usually requires external debug hardware,
very often connected using a JTAG test
access port.
Run-Mode Debugging
: The platform
executes the operating system and all tasks
that are currently not debugged. This mode
usually requires either changes to the
operating system, or at least a helper
application (a so-called “debug server”)
executed on the platform. Android has
several debug helpers: e.g. the Android
Debug Bridge Daemon (adbd) for managing
connections to the host, built-in Dalvik VM
debug support, and a GNU Debug Server
(gdbserver) for native processes.


















安全验证
文档复制为VIP权益,开通VIP直接复制

评论2