Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
e0e5aebc
Commit
e0e5aebc
authored
Jan 23, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add callback invocation from OP_DEBUG
parent
92570a96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
include/mruby.h
include/mruby.h
+1
-0
src/vm.c
src/vm.c
+4
-0
No files found.
include/mruby.h
View file @
e0e5aebc
...
@@ -156,6 +156,7 @@ typedef struct mrb_state {
...
@@ -156,6 +156,7 @@ typedef struct mrb_state {
#ifdef ENABLE_DEBUG
#ifdef ENABLE_DEBUG
void
(
*
code_fetch_hook
)(
struct
mrb_state
*
mrb
,
struct
mrb_irep
*
irep
,
mrb_code
*
pc
,
mrb_value
*
regs
);
void
(
*
code_fetch_hook
)(
struct
mrb_state
*
mrb
,
struct
mrb_irep
*
irep
,
mrb_code
*
pc
,
mrb_value
*
regs
);
void
(
*
debug_op_hook
)(
struct
mrb_state
*
mrb
,
struct
mrb_irep
*
irep
,
mrb_code
*
pc
,
mrb_value
*
regs
);
#endif
#endif
struct
RClass
*
eException_class
;
struct
RClass
*
eException_class
;
...
...
src/vm.c
View file @
e0e5aebc
...
@@ -2113,10 +2113,14 @@ mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int
...
@@ -2113,10 +2113,14 @@ mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int
CASE
(
OP_DEBUG
)
{
CASE
(
OP_DEBUG
)
{
/* A debug print R(A),R(B),R(C) */
/* A debug print R(A),R(B),R(C) */
#ifdef ENABLE_DEBUG
mrb
->
debug_op_hook
(
mrb
,
irep
,
pc
,
regs
);
#else
#ifdef ENABLE_STDIO
#ifdef ENABLE_STDIO
printf
(
"OP_DEBUG %d %d %d
\n
"
,
GETARG_A
(
i
),
GETARG_B
(
i
),
GETARG_C
(
i
));
printf
(
"OP_DEBUG %d %d %d
\n
"
,
GETARG_A
(
i
),
GETARG_B
(
i
),
GETARG_C
(
i
));
#else
#else
abort
();
abort
();
#endif
#endif
#endif
NEXT
;
NEXT
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment