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
e1cc814e
Commit
e1cc814e
authored
Nov 22, 2015
by
Yuhei Okazaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add next command to mrdb.
parent
7e4a7abf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c
mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c
+7
-0
mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
+14
-1
mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h
mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h
+2
-0
No files found.
mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c
View file @
e1cc814e
...
...
@@ -52,3 +52,10 @@ dbgcmd_step(mrb_state *mrb, mrdb_state *mrdb)
mrdb
->
dbg
->
xm
=
DBG_STEP
;
return
DBGST_CONTINUE
;
}
dbgcmd_state
dbgcmd_next
(
mrb_state
*
mrb
,
mrdb_state
*
mrdb
)
{
mrdb
->
dbg
->
xm
=
DBG_NEXT
;
return
DBGST_CONTINUE
;
}
mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
View file @
e1cc814e
...
...
@@ -57,6 +57,7 @@ static const debug_command debug_command_list[] = {
{
"quit"
,
NULL
,
1
,
0
,
0
,
DBGCMD_QUIT
,
dbgcmd_quit
},
/* q[uit] */
{
"run"
,
NULL
,
1
,
0
,
0
,
DBGCMD_RUN
,
dbgcmd_run
},
/* r[un] */
{
"step"
,
NULL
,
1
,
0
,
1
,
DBGCMD_STEP
,
dbgcmd_step
},
/* s[tep] */
{
"next"
,
NULL
,
1
,
0
,
1
,
DBGCMD_NEXT
,
dbgcmd_next
},
/* s[tep] */
{
NULL
}
};
...
...
@@ -560,6 +561,7 @@ mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *reg
dbg
->
root_irep
=
irep
;
dbg
->
prvfile
=
NULL
;
dbg
->
prvline
=
0
;
dbg
->
prvci
=
NULL
;
dbg
->
xm
=
DBG_RUN
;
dbg
->
xphase
=
DBG_PHASE_RUNNING
;
}
...
...
@@ -569,7 +571,6 @@ mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *reg
switch
(
dbg
->
xm
)
{
case
DBG_STEP
:
case
DBG_NEXT
:
// temporary
if
(
!
file
||
(
dbg
->
prvfile
==
file
&&
dbg
->
prvline
==
line
))
{
return
;
}
...
...
@@ -577,6 +578,17 @@ mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *reg
dbg
->
bm
=
BRK_STEP
;
break
;
case
DBG_NEXT
:
if
(
!
file
||
(
dbg
->
prvfile
==
file
&&
dbg
->
prvline
==
line
))
{
return
;
}
if
((
uint32_t
)(
dbg
->
prvci
)
<
(
uint32_t
)(
mrb
->
c
->
ci
))
{
return
;
}
dbg
->
method_bpno
=
0
;
dbg
->
bm
=
BRK_NEXT
;
break
;
case
DBG_RUN
:
bpno
=
check_method_breakpoint
(
mrb
,
irep
,
pc
,
regs
);
if
(
bpno
>
0
)
{
...
...
@@ -594,6 +606,7 @@ mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *reg
}
dbg
->
prvfile
=
file
;
dbg
->
prvline
=
line
;
dbg
->
prvci
=
mrb
->
c
->
ci
;
return
;
case
DBG_INIT
:
dbg
->
root_irep
=
irep
;
...
...
mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h
View file @
e1cc814e
...
...
@@ -109,6 +109,7 @@ typedef struct mrb_debug_context {
const
char
*
prvfile
;
int32_t
prvline
;
mrb_callinfo
*
prvci
;
mrdb_exemode
xm
;
mrdb_exephase
xphase
;
...
...
@@ -146,6 +147,7 @@ typedef dbgcmd_state (*debug_command_func)(mrb_state*, mrdb_state*);
dbgcmd_state
dbgcmd_run
(
mrb_state
*
,
mrdb_state
*
);
dbgcmd_state
dbgcmd_continue
(
mrb_state
*
,
mrdb_state
*
);
dbgcmd_state
dbgcmd_step
(
mrb_state
*
,
mrdb_state
*
);
dbgcmd_state
dbgcmd_next
(
mrb_state
*
,
mrdb_state
*
);
/* cmdbreak.c */
dbgcmd_state
dbgcmd_break
(
mrb_state
*
,
mrdb_state
*
);
dbgcmd_state
dbgcmd_info_break
(
mrb_state
*
,
mrdb_state
*
);
...
...
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