On Feb 12, 4:20 pm, Bob Kerns <r...@acm.org> wrote:
> However, your test case isn't one that I would expect to reproduce.
> Instead of "throw new ArithmeticException()", which isn't really any
> different from cases I know to work, try the OP's case:
>
>         int b = 0;
>         int a = 1/b; //ArithmeticException

Tried it; no change.

The code path in the VM is essentially the same.  Either the "throw"
instruction or the "divide integer" instruction is going to post an
exception, and the common code in the interpreter's exception handling
is what posts the exception to the debugger.

The VM does filter the exception against the rules the debugger has
provided (e.g. "class is an instance of RuntimeException", "caught or
uncaught exceptions"), but that bit is pretty straightforward.


> BTW, a documentation suggestion: Most of the stuff in the Dalvik
> Debugger Support document you pointed me at is only going to be of
> interest to geeks like me, but some of it is helpful for anyone trying
> to debug --
[...]
> I think a brief article with the highlights -- including points like
> the debug protocol being debugger-agnostic -- would be a good addition
> to the developer documentation. Perhaps extend the "Debugging Tasks"
> article a bit.

We actually had to dial register optimization down substantially to
make debugging reasonable.  Values would appear and disappear in ways
that drove people nuts.  "dx" will generate more efficient code in
some circumstances if you disable the debug info.

The fancy documentation was written (or at least edited) by tech
writers.  The stuff in dalvik/docs was written by engineers (e.g.
debugger.html is mine).  This is probably noticeable in both content
and presentation. :-)  I can forward your suggestion.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to