2 * Copyright 2014 Xamarin Inc
5 #ifndef __MONO_SEQ_POINTS_H__
6 #define __MONO_SEQ_POINTS_H__
8 #define MONO_SEQ_POINT_FLAG_NONEMPTY_STACK 1
10 /* IL offsets used to mark the sequence points belonging to method entry/exit events */
11 #define METHOD_ENTRY_IL_OFFSET -1
12 #define METHOD_EXIT_IL_OFFSET -2
14 /* Native offset used to mark seq points in dead code */
15 #define SEQ_POINT_NATIVE_OFFSET_DEAD_CODE -1
18 int il_offset, native_offset, flags;
19 /* Offset of indexes of successor sequence points on the compressed buffer */
21 /* Number of entries in next */
25 typedef struct MonoSeqPointInfo{
27 GByteArray* next_array;
28 /* When has_debug_data is set to false only il and native deltas are saved */
29 gboolean has_debug_data;
30 /* true when the array data allocation/deallocation is managed by this structure
31 * when this is false the arrays are read only
33 gboolean alloc_arrays;
39 MonoSeqPointInfo* info;
43 seq_point_info_free (gpointer info);
46 mono_save_seq_point_info (MonoCompile *cfg);
49 get_seq_points (MonoDomain *domain, MonoMethod *method);
52 find_next_seq_point_for_native_offset (MonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point);
55 find_prev_seq_point_for_native_offset (MonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point);
58 find_seq_point (MonoDomain *domain, MonoMethod *method, gint32 il_offset, MonoSeqPointInfo **info, SeqPoint *seq_point);
61 seq_point_iterator_next (SeqPointIterator* it);
64 seq_point_iterator_init (SeqPointIterator* it, MonoSeqPointInfo* info);
67 seq_point_init_next (MonoSeqPointInfo* info, SeqPoint sp, SeqPoint* next);
70 seq_point_info_write (MonoSeqPointInfo* info, guint8* buffer);
73 seq_point_info_read (MonoSeqPointInfo** info, guint8* buffer, gboolean copy);
76 seq_point_info_write_size (MonoSeqPointInfo* info);
78 #endif /* __MONO_SEQ_POINTS_H__ */