* debugger-agent.c: Add support for the caught/uncaught flags on exception
event requests. Bump protocol minor version.
svn path=/trunk/mono/; revision=152233
+2010-02-23 Zoltan Varga <vargaz@gmail.com>
+
+ * debugger-agent.c: Add support for the caught/uncaught flags on exception
+ event requests. Bump protocol minor version.
+
2010-02-22 Zoltan Varga <vargaz@gmail.com>
* decompose.c (mono_decompose_long_opts): Handle OP_LCONV_TO_OVF_I8 here too.
2010-02-22 Zoltan Varga <vargaz@gmail.com>
* decompose.c (mono_decompose_long_opts): Handle OP_LCONV_TO_OVF_I8 here too.
#define HEADER_LENGTH 11
#define MAJOR_VERSION 2
#define HEADER_LENGTH 11
#define MAJOR_VERSION 2
typedef enum {
CMD_SET_VM = 1,
typedef enum {
CMD_SET_VM = 1,
MonoClass *exc_class; /* For kind == MONO_KIND_EXCEPTION_ONLY */
MonoAssembly **assemblies; /* For kind == MONO_KIND_ASSEMBLY_ONLY */
} data;
MonoClass *exc_class; /* For kind == MONO_KIND_EXCEPTION_ONLY */
MonoAssembly **assemblies; /* For kind == MONO_KIND_ASSEMBLY_ONLY */
} data;
+ gboolean caught, uncaught; /* For kind == MOD_KIND_EXCEPTION_ONLY */
} Modifier;
typedef struct{
} Modifier;
typedef struct{
GSList *bps;
} SingleStepReq;
GSList *bps;
} SingleStepReq;
+/*
+ * Contains additional information for an event
+ */
+typedef struct {
+ /* For EVENT_KIND_EXCEPTION */
+ MonoObject *exc;
+ MonoContext catch_ctx;
+ gboolean caught;
+} EventInfo;
+
/* Dummy structure used for the profiler callbacks */
typedef struct {
void* dummy;
/* Dummy structure used for the profiler callbacks */
typedef struct {
void* dummy;
* LOCKING: Assumes the loader lock is held.
*/
static GSList*
* LOCKING: Assumes the loader lock is held.
*/
static GSList*
-create_event_list (EventKind event, GPtrArray *reqs, MonoJitInfo *ji, MonoException *exc, int *suspend_policy)
+create_event_list (EventKind event, GPtrArray *reqs, MonoJitInfo *ji, EventInfo *ei, int *suspend_policy)
{
int i, j;
GSList *events = NULL;
{
int i, j;
GSList *events = NULL;
} else if (mod->kind == MOD_KIND_THREAD_ONLY) {
if (mod->data.thread != mono_thread_internal_current ())
filtered = TRUE;
} else if (mod->kind == MOD_KIND_THREAD_ONLY) {
if (mod->data.thread != mono_thread_internal_current ())
filtered = TRUE;
- } else if (mod->kind == MOD_KIND_EXCEPTION_ONLY && exc) {
- if (mod->data.exc_class && !mono_class_is_assignable_from (mod->data.exc_class, exc->object.vtable->klass))
+ } else if (mod->kind == MOD_KIND_EXCEPTION_ONLY && ei) {
+ if (mod->data.exc_class && !mono_class_is_assignable_from (mod->data.exc_class, ei->exc->vtable->klass))
+ filtered = TRUE;
+ if (ei->caught && !mod->caught)
+ filtered = TRUE;
+ if (!ei->caught && !mod->uncaught)
filtered = TRUE;
} else if (mod->kind == MOD_KIND_ASSEMBLY_ONLY && ji) {
int k;
filtered = TRUE;
} else if (mod->kind == MOD_KIND_ASSEMBLY_ONLY && ji) {
int k;
-typedef struct {
- /* For EVENT_KIND_EXCEPTION */
- MonoObject *exc;
- MonoContext catch_ctx;
-} EventInfo;
-
ji = mini_jit_info_table_find (mono_domain_get (), MONO_CONTEXT_GET_IP (throw_ctx), NULL);
ji = mini_jit_info_table_find (mono_domain_get (), MONO_CONTEXT_GET_IP (throw_ctx), NULL);
+ ei.exc = (MonoObject*)exc;
+ ei.caught = catch_ctx != NULL;
+
- events = create_event_list (EVENT_KIND_EXCEPTION, NULL, ji, exc, &suspend_policy);
+ events = create_event_list (EVENT_KIND_EXCEPTION, NULL, ji, &ei, &suspend_policy);
- ei.exc = (MonoObject*)exc;
process_event (EVENT_KIND_EXCEPTION, &ei, 0, throw_ctx, events, suspend_policy);
}
process_event (EVENT_KIND_EXCEPTION, &ei, 0, throw_ctx, events, suspend_policy);
}
+ req->modifiers [i].caught = decode_byte (p, &p, end);
+ req->modifiers [i].uncaught = decode_byte (p, &p, end);
if (exc_class) {
req->modifiers [i].data.exc_class = exc_class;
if (exc_class) {
req->modifiers [i].data.exc_class = exc_class;