mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
rename debug function name
This commit is contained in:
@@ -40,13 +40,13 @@ struct mrb_state;
|
||||
* get line from irep's debug info and program counter
|
||||
* @return returns NULL if not found
|
||||
*/
|
||||
char const* mrb_get_filename(struct mrb_irep* irep, uint32_t pc);
|
||||
char const* mrb_debug_get_filename(struct mrb_irep* irep, uint32_t pc);
|
||||
|
||||
/*
|
||||
* get line from irep's debug info and program counter
|
||||
* @return returns -1 if not found
|
||||
*/
|
||||
int32_t mrb_get_line(struct mrb_irep* irep, uint32_t pc);
|
||||
int32_t mrb_debug_get_line(struct mrb_irep* irep, uint32_t pc);
|
||||
|
||||
mrb_irep_debug_info_file* mrb_debug_info_append_file(
|
||||
struct mrb_state* mrb, struct mrb_irep* irep,
|
||||
|
||||
+2
-2
@@ -87,8 +87,8 @@ mrb_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func fun
|
||||
else {
|
||||
pc = (mrb_code*)mrb_voidp(mrb_obj_iv_get(mrb, exc, mrb_intern2(mrb, "lastpc", 6)));
|
||||
}
|
||||
filename = mrb_get_filename(irep, pc - irep->iseq - 1);
|
||||
line = mrb_get_line(irep, pc - irep->iseq - 1);
|
||||
filename = mrb_debug_get_filename(irep, pc - irep->iseq - 1);
|
||||
line = mrb_debug_get_line(irep, pc - irep->iseq - 1);
|
||||
}
|
||||
if (!verbose && line == -1) continue;
|
||||
if (ci->target_class == ci->proc->target_class)
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ select_line_type(uint32_t pc_count, uint16_t line_count)
|
||||
}
|
||||
|
||||
char const*
|
||||
mrb_get_filename(mrb_irep* irep, uint32_t pc)
|
||||
mrb_debug_get_filename(mrb_irep* irep, uint32_t pc)
|
||||
{
|
||||
mrb_irep_debug_info_file* f = NULL;
|
||||
if (irep) {
|
||||
@@ -53,7 +53,7 @@ mrb_get_filename(mrb_irep* irep, uint32_t pc)
|
||||
}
|
||||
|
||||
int32_t
|
||||
mrb_get_line(mrb_irep* irep, uint32_t const pc)
|
||||
mrb_debug_get_line(mrb_irep* irep, uint32_t const pc)
|
||||
{
|
||||
mrb_irep_debug_info_file* f = NULL;
|
||||
if (irep) {
|
||||
|
||||
+2
-2
@@ -199,8 +199,8 @@ exc_debug_info(mrb_state *mrb, struct RObject *exc)
|
||||
if (ci->proc && !MRB_PROC_CFUNC_P(ci->proc)) {
|
||||
mrb_irep *irep = ci->proc->body.irep;
|
||||
|
||||
int32_t const line = mrb_get_line(irep, pc - irep->iseq - 1);
|
||||
char const* file = mrb_get_filename(irep, pc - irep->iseq - 1);
|
||||
int32_t const line = mrb_debug_get_line(irep, pc - irep->iseq - 1);
|
||||
char const* file = mrb_debug_get_filename(irep, pc - irep->iseq - 1);
|
||||
if(line != -1 && file) {
|
||||
mrb_obj_iv_set(mrb, exc, mrb_intern2(mrb, "file", 4), mrb_str_new_cstr(mrb, file));
|
||||
mrb_obj_iv_set(mrb, exc, mrb_intern2(mrb, "line", 4), mrb_fixnum_value(line));
|
||||
|
||||
Reference in New Issue
Block a user