Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
debug.h
Go to the documentation of this file.
1 /*
2 ** mruby/debug.h - mruby debug info
3 **
4 ** See Copyright Notice in mruby.h
5 */
6 
7 #ifndef MRUBY_DEBUG_H
8 #define MRUBY_DEBUG_H
9 
10 #if defined(__cplusplus)
11 extern "C" {
12 #endif
13 
14 typedef enum mrb_debug_line_type {
18 
19 typedef struct mrb_irep_debug_info_line {
20  uint32_t start_pos;
21  uint16_t line;
23 
24 typedef struct mrb_irep_debug_info_file {
25  uint32_t start_pos;
26  const char *filename;
28  uint32_t line_entry_count;
30  union {
31  void *line_ptr;
33  uint16_t *line_ary;
34  };
36 
37 typedef struct mrb_irep_debug_info {
38  uint32_t pc_count;
39  uint16_t flen;
42 
43 /*
44  * get line from irep's debug info and program counter
45  * @return returns NULL if not found
46  */
47 const char *mrb_debug_get_filename(mrb_irep *irep, uint32_t pc);
48 
49 /*
50  * get line from irep's debug info and program counter
51  * @return returns -1 if not found
52  */
53 int32_t mrb_debug_get_line(mrb_irep *irep, uint32_t pc);
54 
56  mrb_state *mrb, mrb_irep *irep,
57  uint32_t start_pos, uint32_t end_pos);
60 
61 #if defined(__cplusplus)
62 } /* extern "C" { */
63 #endif
64 
65 #endif /* MRUBY_DEBUG_H */