Add line info support. (#2286)

Add line info data to byte, which allows getting a backtrace info directly
from the engine. Snapshots are not supported.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-04-19 02:12:54 +02:00
committed by yichoi
parent 095b730f9d
commit 5e097dc354
24 changed files with 773 additions and 52 deletions
+3
View File
@@ -86,6 +86,8 @@ def get_arguments():
help='build default jerry port implementation (%(choices)s; default: %(default)s)')
parser.add_argument('--js-parser', metavar='X', choices=['ON', 'OFF'], default='ON', type=str.upper,
help='enable js-parser (%(choices)s; default: %(default)s)')
parser.add_argument('--line-info', metavar='X', choices=['ON', 'OFF'], default='OFF', type=str.upper,
help='provide line info (%(choices)s; default: %(default)s)')
parser.add_argument('--link-lib', metavar='OPT', action='append', default=[],
help='add custom library to be linked')
parser.add_argument('--linker-flag', metavar='OPT', action='append', default=[],
@@ -152,6 +154,7 @@ def generate_build_options(arguments):
build_options.append('-DEXTERNAL_COMPILE_FLAGS=' + ' '.join(arguments.compile_flag))
build_options.append('-DFEATURE_CPOINTER_32_BIT=%s' % arguments.cpointer_32bit)
build_options.append('-DFEATURE_ERROR_MESSAGES=%s' % arguments.error_messages)
build_options.append('-DFEATURE_LINE_INFO=%s' % arguments.line_info)
build_options.append('-DJERRY_CMDLINE=%s' % arguments.jerry_cmdline)
build_options.append('-DJERRY_CMDLINE_TEST=%s' % arguments.jerry_cmdline_test)
build_options.append('-DJERRY_CMDLINE_SNAPSHOT=%s' % arguments.jerry_cmdline_snapshot)
+12 -8
View File
@@ -34,11 +34,13 @@ def get_binary_path(bin_dir_path):
# Test options for unittests
JERRY_UNITTESTS_OPTIONS = [
Options('unittests',
['--unittests', '--jerry-cmdline=off', '--error-messages=on', '--snapshot-save=on',
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset', '--mem-stats=on']),
['--unittests', '--profile=es2015-subset', '--jerry-cmdline=off', '--error-messages=on',
'--snapshot-save=on', '--snapshot-exec=on', '--line-info=on', '--vm-exec-stop=on',
'--mem-stats=on']),
Options('unittests-debug',
['--unittests', '--jerry-cmdline=off', '--debug', '--error-messages=on', '--snapshot-save=on',
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset', '--mem-stats=on']),
['--unittests', '--debug', '--profile=es2015-subset', '--jerry-cmdline=off',
'--error-messages=on', '--snapshot-save=on', '--snapshot-exec=on', '--line-info=on',
'--vm-exec-stop=on', '--mem-stats=on']),
Options('doctests',
['--doctests', '--jerry-cmdline=off', '--error-messages=on', '--snapshot-save=on',
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset']),
@@ -46,11 +48,13 @@ JERRY_UNITTESTS_OPTIONS = [
['--doctests', '--jerry-cmdline=off', '--debug', '--error-messages=on',
'--snapshot-save=on', '--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset']),
Options('unittests-es5.1',
['--unittests', '--jerry-cmdline=off', '--error-messages=on', '--snapshot-save=on',
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es5.1', '--mem-stats=on']),
['--unittests', '--profile=es5.1', '--jerry-cmdline=off', '--error-messages=on',
'--snapshot-save=on', '--snapshot-exec=on', '--line-info=on', '--vm-exec-stop=on',
'--mem-stats=on']),
Options('unittests-es5.1-debug',
['--unittests', '--jerry-cmdline=off', '--debug', '--error-messages=on', '--snapshot-save=on',
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es5.1', '--mem-stats=on']),
['--unittests', '--debug', '--profile=es5.1', '--jerry-cmdline=off',
'--error-messages=on', '--snapshot-save=on', '--snapshot-exec=on', '--line-info=on',
'--vm-exec-stop=on', '--mem-stats=on']),
Options('doctests-es5.1',
['--doctests', '--jerry-cmdline=off', '--error-messages=on', '--snapshot-save=on',
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es5.1']),