Položka 3. Co jsem prozatím vyštrachal složitě a krkolomně přeložil:
Každý VM, který povoleným laděním začíná "JDWP" závit. The thread typically sits idle until DDMS or a debugger connects. Závit obvykle nečinně čeká, až DDMS nebo debugger připojí. The thread is only responsible for handling requests from the debugger; VM-initated communication, such as notifying the debugger when the VM has stopped at a breakpoint, are sent from the affected thread. Nit pouze za vyřizování žádostí z debuggeru, VM-initated komunikace, jako jsou oznámení, když debugger VM se zastavil na unese, jsou zasílány z postižené závitu.
When the VM is started from the Android app framework, debugging is enabled for all applications when the system property
ro.debuggable is set to 1 (use adb shell getprop ro.debuggable to check it). Pokud je VM spustit z Android App rámce, je povoleno ladění pro všechny aplikace, pokud systém vlastnost ro.debuggable je nastavena na 1 (použijte adb shell getprop ro.debuggable podívat se na to). If it's zero, debugging can be enabled via the application's manifest, which must include android:debuggable="true" in the <application> element. Pokud je to nula, může být povoleno ladění pomocí aplikace, seznamy, které musí obsahovat android:debuggable="true" v <application> prvku.
The VM recognizes the difference between a connection from DDMS and a connection from a debugger (either directly or in concert with DDMS). VM rozpozná rozdíl mezi připojení od DDMS a spojení z Debugger (buď přímo, nebo ve shodě s DDMS). A connection from DDMS alone doesn't result in a change in VM behavior, but when the VM sees debugger packets it allocates additional data structures and may switch to a different implementation of the interpreter. Spojení z DDMS sám nemá za následek změny v chování VM, ale když vidí, ladicí pakety VM alokuje další datové struktury, a může přejít do jiného plnění tlumočníka.
Because Dalvik maps bytecode into memory read-only, some common techniques are difficult to implement without allocating additional memory. Vzhledem k tomu, Dalvik mapy bytecode do paměti pouze pro čtení, některé běžné techniky jsou obtížně proveditelné bez přidělení další paměti. For example, suppose the debugger sets a breakpoint in a method. Předpokládejme například, že ladicí program nastaví breakpoint v metodě. The quick way to handle this is to insert a breakpoint instruction directly into the code. Rychlý způsob jak to udělat je vložit breakpoint instrukce přímo do kódu. When the instruction is reached, the breakpoint handler engages. Když je dosaženo instrukce, zarážka psovod se zabývá. Without this, it's necessary to perform an "is there a breakpoint here" scan. Bez toho, že je nutné provést "je tam zarážka tady" skenovat. Even with some optimizations, the debug-enabled interpreter is much slower than the regular interpreter (perhaps 5x). Dokonce s některými optimalizace, ladění s podporou tlumočníka je mnohem pomalejší než běžný tlumočníka (možná 5x).
Hmmmm, nevím, že to nikoho tady nezajímá, takové zajímavé ladící věcičky , hmmm, asi jsem tu jediný šťourač do androidu
