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
968f5d2a
Commit
968f5d2a
authored
Sep 03, 2013
by
take_cheeze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve checkings in debug.c
parent
3df86862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/debug.c
src/debug.c
+9
-9
No files found.
src/debug.c
View file @
968f5d2a
...
...
@@ -24,10 +24,10 @@ get_file(mrb_irep_debug_info* info, uint32_t const pc)
--
ret
;
mrb_assert
(
ret
<
(
info
->
files
+
info
->
flen
));
mrb_assert
(
ret
<
=
info
->
files
&&
ret
<
(
info
->
files
+
info
->
flen
));
mrb_assert
((
*
ret
)
->
start_pos
<=
pc
&&
pc
<
(((
ret
+
1
-
info
->
files
)
<
info
->
flen
)
?
(
*
(
ret
+
1
))
->
start_pos
:
info
->
pc_count
));
pc
<
(((
ret
+
1
-
info
->
files
)
<
info
->
flen
)
?
(
*
(
ret
+
1
))
->
start_pos
:
info
->
pc_count
));
return
*
ret
;
}
...
...
@@ -50,8 +50,8 @@ select_line_type(uint16_t const* lines, size_t lines_len)
char
const
*
mrb_debug_get_filename
(
mrb_irep
*
irep
,
uint32_t
pc
)
{
mrb_irep_debug_info_file
*
f
=
NULL
;
if
(
irep
)
{
if
(
irep
&&
pc
<
irep
->
ilen
)
{
mrb_irep_debug_info_file
*
f
=
NULL
;
if
(
!
irep
->
debug_info
)
{
return
irep
->
filename
;
}
else
if
((
f
=
get_file
(
irep
->
debug_info
,
pc
)))
{
return
f
->
filename
;
...
...
@@ -63,8 +63,8 @@ mrb_debug_get_filename(mrb_irep* irep, uint32_t pc)
int32_t
mrb_debug_get_line
(
mrb_irep
*
irep
,
uint32_t
const
pc
)
{
mrb_irep_debug_info_file
*
f
=
NULL
;
if
(
irep
)
{
if
(
irep
&&
pc
<
irep
->
ilen
)
{
mrb_irep_debug_info_file
*
f
=
NULL
;
if
(
!
irep
->
debug_info
)
{
return
irep
->
lines
?
irep
->
lines
[
pc
]
:
-
1
;
}
...
...
@@ -91,8 +91,8 @@ mrb_debug_get_line(mrb_irep* irep, uint32_t const pc)
mrb_assert
((
ret
-
f
->
line_flat_map
)
<
f
->
line_entry_count
);
mrb_assert
(
ret
->
start_pos
<=
pc
&&
pc
<
(((
ret
+
1
-
f
->
line_flat_map
)
<
f
->
line_entry_count
)
?
(
ret
+
1
)
->
start_pos
:
irep
->
debug_info
->
pc_count
));
pc
<
(((
ret
+
1
-
f
->
line_flat_map
)
<
f
->
line_entry_count
)
?
(
ret
+
1
)
->
start_pos
:
irep
->
debug_info
->
pc_count
));
return
ret
->
line
;
}
...
...
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