Mixed mode exception handling (#4777)
authorZoltan Varga <vargaz@gmail.com>
Wed, 3 May 2017 04:45:59 +0000 (00:45 -0400)
committerGitHub <noreply@github.com>
Wed, 3 May 2017 04:45:59 +0000 (00:45 -0400)
commit5e7137b6fee0d51acc9569f9f85bacda52592db6
treec06ef5b0142b98148b96d863fe9ed1dda63fe2c7
parentb89cb75d02d3fa2e2ec33db07e8b9696fc29ba0e
Mixed mode exception handling (#4777)

* [mixed] Add beginnings of unwinding support for interp->jit transitions by pushing an LMF frame on the stack when exiting interpreted code.

* [runtime] Add a mono_debug_lookup_source_location_by_il () helper function to lookup a source location using an IL offset.

* [mixed] Add support for mixed mode managed stack walks.

* [interp] Generate line number info for interpreted code, using the same MonoDebugMethodJitInfo structure used by the JIT.

* [interp] Pass the clause index to the MINT_ENDFINALLY opcode. Not yet used.

* [interp] Create a MonoJitInfo structure for each interpreted method. Not yet used.

* [interp] Add a mono_interp_set_resume_state () function which can be used to set the frame/ip the interpreter will resume execution from when execution returns to it.

* [mixed] Add support for mixed mode exception handling by extending the normal JIT exception handling code in mini-exceptions.c to handle interpreted frames as well.

* [jit] Add an Unwinder type to reduce the amount of code duplication when unwinding though interpreter frames.

* [interp] Fix the !ENABLE_INTERPRETER build.

* [interp] Disable an assert which is hit even when running without --interpreter.

* Fix a comment.

* [interp] Fix an assertion. Fix/add comments.
16 files changed:
mono/metadata/debug-internals.h
mono/metadata/mono-debug.c
mono/metadata/object.c
mono/mini/exceptions-amd64.c
mono/mini/interp/interp-internals.h
mono/mini/interp/interp.c
mono/mini/interp/interp.h
mono/mini/interp/mintops.def
mono/mini/interp/transform.c
mono/mini/mini-amd64.h
mono/mini/mini-exceptions.c
mono/mini/mini-generic-sharing.c
mono/mini/mini-runtime.c
mono/mini/mini.h
mono/mini/mixed.cs
mono/utils/mono-stack-unwinding.h