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
a060bd51
Commit
a060bd51
authored
Dec 23, 2015
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3057 from yuuu/add_next_command
mrdb: Added 'next' command.
parents
7e4a7abf
887a56ba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c
mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c
+8
-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 @
a060bd51
...
...
@@ -52,3 +52,11 @@ 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
;
mrdb
->
dbg
->
prvci
=
mrb
->
c
->
ci
;
return
DBGST_CONTINUE
;
}
mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
View file @
a060bd51
...
...
@@ -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
},
/* n[ext] */
{
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,18 @@ 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
->
prvci
=
NULL
;
dbg
->
method_bpno
=
0
;
dbg
->
bm
=
BRK_NEXT
;
break
;
case
DBG_RUN
:
bpno
=
check_method_breakpoint
(
mrb
,
irep
,
pc
,
regs
);
if
(
bpno
>
0
)
{
...
...
mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h
View file @
a060bd51
...
...
@@ -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