Skip to content
Snippets Groups Projects
  1. Sep 04, 2023
  2. Aug 30, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 88333d13
      Igor Munkin authored
      * Fix maxslots when recording BC_TSETM.
      * Fix TDUP load forwarding after table rehash.
      * Fix binary number literal parsing.
      * Fix maxslots when recording BC_VARG, part 3.
      * test: fix flaky <unit-jit-parse.test.lua> again
      * Fix predict_next() in parser.
      * Revert to trivial pow() optimizations to prevent inaccuracies.
      * Fix pow() optimization inconsistencies.
      * Improve assertions.
      * Remove pow() splitting and cleanup backends.
      * test: introduce `samevalues()` TAP checker
      * MIPS: Add MIPS64 R6 port.
      * DynASM/MIPS: Fix shadowed variable.
      * MIPS64: Fix register allocation in assembly of HREF.
      * Prevent integer overflow while parsing long strings.
      * Fix LJ_MAX_JSLOTS assertion in rec_check_slots().
      * Fix debug.getinfo() argument check.
      * ARM: Fix GCC 7 -Wimplicit-fallthrough warnings.
      * DynASM: Fix warning.
      * Fix GCC 7 -Wimplicit-fallthrough warnings.
      * Cleanup math function compilation and fix inconsistencies.
      * FFI: Eliminate hardcoded string hashes.
      * Windows: Add UWP support, part 1.
      * build: fix non-Linux/macOS builds
      * PPC: Add soft-float support to JIT compiler backend.
      * PPC: Add soft-float support to interpreter.
      * MIPS64: Add soft-float support to JIT compiler backend.
      * MIPS: Fix handling of spare long-range jump slots.
      * test: introduce mcode generator for tests
      * MIPS: Use precise search for exit jump patching.
      * sysprof: improve parser's memory footprint
      * tools: add execution permission to sysprof parser
      * sysprof: remove `split by vmstate` option
      
      Part of #8825
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      88333d13
  3. Aug 18, 2023
    • Timur Safin's avatar
      Revert "debugger: prevent running from Tarantool REPL" · 3774e85d
      Timur Safin authored
      This reverts commit ace88542.
      
      That commit disabled repl in tarantool for debugger console session
      because debugger console wasn't compatible with Tarantool console,
      i.e. this code hang in terminal:
      
      ```lua
      tarantool> dbg = require 'luadebug'
      tarantool> dbg()
      ```
      
      With the previous patch in the patchset, full readline support and
      console compatibility was introduced. Thus, no need to disable repl.
      
      Part of #7738
      
      NO_TEST=internal
      NO_DOC=internal, revert unpublished
      NO_CHANGELOG=internal
      3774e85d
    • Timur Safin's avatar
      debugger: proper readline support · 92222451
      Timur Safin authored
      Implemented readline history and autocomplete by reusing
      readline facilities of Tarantool console. They used to be
      being hidden once Lua 'console' module is loaded. With c432e9e9
      (lua: don't use public module name as internal one), now they
      are available as 'console.lib'.
      
      Closes #7738
      
      NO_TEST=covered by refactored console_debugger_session_test.lua
      
      @TarantoolBot document
      Title: proper readline support in readline
      
      Similar to tarantool interactive console, tdbg now uses readline
      for its shell. It enables handier input editing, command history
      and so on.
      92222451
  4. Aug 16, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 8b7f05bf
      Igor Munkin authored
      * ci: support coveralls
      * cmake: add code coverage support
      * test: run flake8 static analysis via CMake
      * test: fix E741 errors by pycodestyle
      * test: fix E722 errors by pycodestyle
      * test: fix E711 errors by pycodestyle
      * test: fix E502 errors by pycodestyle
      * test: fix E501 errors by pycodestyle
      * test: fix E305 errors by pycodestyle
      * test: fix E303 errors by pycodestyle
      * test: fix E302 errors by pycodestyle
      * test: fix E301 errors by pycodestyle
      * test: fix E275 errors by pycodestyle
      * test: fix E251 errors by pycodestyle
      * test: fix E231 errors by pycodestyle
      * test: fix E203 errors by pycodestyle
      * test: fix E201 and E202 errors by pycodestyle
      * test: suppress E131 errors by pycodestyle
      * test: fix E128 errors by pycodestyle
      * test: fix E122 errors by pycodestyle
      * gdb: fix Python <assert> statement usage
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      NO_CHANGELOG=LuaJIT submodule bump
      8b7f05bf
  5. Aug 04, 2023
    • Gleb Kashkin's avatar
      metrics: bump to new version · a943c237
      Gleb Kashkin authored
      Bump the metrics submodule to 1.0.0-3-4865675c
      
      NO_DOC=metrics submodule bump
      NO_TEST=metrics submodule bump
      NO_CHANGELOG=metrics submodule bump
      a943c237
  6. Aug 02, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 75a4740f
      Igor Munkin authored
      * ci: introduce testing workflow with sanitizers
      * build: introduce LUAJIT_USE_ASAN option
      * test: introduce test:done TAP helper
      * memprof: remove invalid assertions
      * ci: clean up workflow for exotic builds
      
      Closes #5878
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      NO_CHANGELOG=LuaJIT submodule bump
      75a4740f
  7. Jul 20, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 0d1e0cb7
      Igor Munkin authored
      * FFI: Fix recording of union initialization.
      * Fix maxslots when recording BC_VARG, part 2.
      * Fix maxslots when recording BC_VARG.
      * Fix BC_UCLO insertion for returns.
      * ci: update job concurrency group definition
      
      Part of #8825
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      0d1e0cb7
  8. Jul 04, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 852664b4
      Igor Munkin authored
      * test: fix flaky <unit-jit-parse.test.lua>
      * Fix use-def analysis for vararg functions.
      * Fix use-def analysis for BC_VARG.
      * Fix TNEW load forwarding with instable types.
      * Fix memory probing allocator to check for valid end address, too.
      * Another fix for lua_yield() from C hook.
      * Fix lua_yield() from C hook.
      * Fix saved bytecode encapsulated in ELF objects.
      * x64: Fix 64 bit shift code generation.
      * Fix canonicalization of +-0.0 keys for IR_NEWREF.
      * test: add utility for parsing `jit.dump`
      * test: split utils.lua into several modules
      * test: rewrite lj-49-bad-lightuserdata test in C
      * test: rewrite misclib-sysprof-capi test in C
      * test: rewrite misclib-getmetrics-capi test in C
      * test: introduce utils.h helper for C tests
      * test: introduce module for C tests
      * test: fix setting of {DY}LD_LIBRARY_PATH variables
      * build: fix build with LUAJIT_USE_GDBJIT enabled
      
      Closes #8718
      Part of #7900
      Part of #8516
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      852664b4
  9. Jul 03, 2023
  10. Jun 28, 2023
    • Vladimir Davydov's avatar
      lua: add varbinary type · ba749e82
      Vladimir Davydov authored
      Implementation notes:
       - The varbinary type is implemented as VLS cdata so we can't use
         the existing luaL_pushcdata and luaL_checkcdatas helpers for
         pushing an object of this type to Lua stack. Instead, we copied
         the implementation from the Lua JIT internals.
       - We already have the code handling `MP_BIN` fields in all built-in
         serializers. We just need to patch it to convert the data to/from
         a varbinary object instead of a plain string.
       - We updated the tuple.tostring method to set the NOWRAP base64
         encoder flag when dumping binary blobs. The flag was apparently
         omitted by mistake because we mask all other new line characters
         while converting a tuple to a string.
       - The box/varbinary_type test was rewritten using the luatest
         framework with all the FFI code needed to insert binary data
         replaced with the new varbinary object.
       - We have to update quite a few SQL tests involving varbinary type
         because binary blobs are now returned as varbinary objects, not
         as plain strings, as they used to be.
      
      Closes #1629
      
      @TarantoolBot document
      Title: Document the varbinary type
      
      The new module `varbinary` was introduced. The module implements the
      following functions:
       - `varbinary.new` - constructs a varbinary object from a plain string
         or cdata pointer and size (to be used with the `buffer` module).
       - `varbinary.is` - returns true if the argument is a varbinary object.
      
      ```Lua
      local bin = varbinary.new('data')
      assert(varbinary.is(bin))
      assert(not varbinary.is('data'))
      ```
      
      Like a plain string, a varbinary object stores arbitrary data. Unlike
      a plain string, it's encoded as a binary blob by the built-in encoders
      that support the binary type (MsgPack, YAML). (Actually, encoding binary
      blobs with the proper type is the main goal of the new type.)
      
      ```
      tarantool> '\xFF\xFE'
      ---
      - "\xFF\xFE"
      ...
      
      tarantool> varbinary.new('\xFF\xFE')
      ---
      - !!binary //4=
      ...
      
      tarantool> msgpack.encode('\xFF\xFE')
      ---
      - "\xA2\xFF\xFE"
      ...
      
      tarantool> msgpack.encode(varbinary.new('\xFF\xFE'))
      ---
      - "\xC4\x02\xFF\xFE"
      ...
      ```
      
      Note, the JSON format doesn't support the binary type so a varbinary
      object is still encoded as a plain string:
      
      ```
      tarantool> json.encode('\xFF\xFE')
      ---
      - "\"\xFF\xFE\""
      ...
      
      tarantool> json.encode(varbinary.new('\xFF\xFE'))
      ---
      - "\"\xFF\xFE\""
      ...
      ```
      
      The built-in decoders now decode binary data fields (fields with the
      'binary' tag in YAML; the `MP_BIN` type in MsgPack) to a varbinary
      object by default:
      
      ```
      tarantool> varbinary.is(msgpack.decode('\xC4\x02\xFF\xFE'))
      ---
      - true
      ...
      
      tarantool> varbinary.is(yaml.decode('!!binary //4='))
      ---
      - true
      ...
      ```
      
      This also implies that the data stored in the database under the
      'varbinary' field type is now returned to Lua not as a plain string,
      but as a varbinary object. It's possible to revert to the old behavior
      by toggling the new compat option `binary_data_decoding` because this
      change may break backward compatibility:
      
      ```
      tarantool> compat.binary_data_decoding = 'old'
      ---
      ...
      
      tarantool> varbinary.is(msgpack.decode('\xC4\x02\xFF\xFE'))
      ---
      - false
      ...
      
      tarantool> varbinary.is(yaml.decode('!!binary //4='))
      ---
      - false
      ...
      ```
      
      Please create a documentation page for the new compat option:
      https://tarantool.io/compat/binary_data_decoding
      
      A varbinary object implements the following meta-methods:
      - `__len` - returns the length of the binary data, in bytes.
      - `__tostring` - returns the data in a plain string.
      - `__eq` - returns true if the varbinary object contains
        the same data as another varbinary object or a string.
      
      ```Lua
      local bin = varbinary.new('foo')
      assert(#bin == 3)
      assert(tostring(bin) == 'foo')
      assert(bin == 'foo')
      assert(bin ~= 'bar')
      assert(bin == varbinary.new('foo'))
      assert(bin ~= varbinary.new('bar'))
      ```
      
      There are no string manipulation methods, like `string.sub` or
      `string.match`. If you need to match a substring in a varbinary
      object, you have to convert it to a string first.
      
      For more details, see the [design document][1].
      
      [1]: https://www.notion.so/tarantool/varbinary-in-Lua-a0ce453dcf5a46e3bc421bf80d4cc276
      ba749e82
    • Vladimir Davydov's avatar
      yaml: use standard base64 encoder · 739be771
      Vladimir Davydov authored
      Let's drop yaml/b64 in favor of the base64 encoder used everywhere else
      in the Tarantool source code.
      
      yaml/b64 is also used by serialize_lua to print MP_BIN values. Let's
      print MP_BIN values as MP_STR there. This doesn't have any user-visible
      changes because since commit 890a821c ("yaml: don't encode
      unprintable strings as binary blobs") luaL_tofield never creates MP_BIN
      values. However, when we introduce the varbinary type to Lua, we will
      use the MP_BIN value type for it, and printing it in the Lua format as a
      string with unprintable characters escaped is going to be less confusing
      than encoding it in base64 without any tags or markers.
      
      While we're at it, let's use the luaL_field.sval.data in the encoders
      instead of extracting the string from the Lua stack again.
      
      Needed for #1629
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      739be771
    • Vladimir Davydov's avatar
      base64: add function to caclculate buffer size for decoding · ba322caf
      Vladimir Davydov authored
      There's base64_bufsize for calculating the buffer size needed for
      base64_encode but there's no such function for base64_decode - one's
      supposed to pass a buffer > 3/4 of the input size. This is confusing.
      Let's rename base64_bufsize to base64_encode_bufsize and introduce
      base64_decode_bufsize.
      
      While we're at it, move base64_encode_bufsize body from base64.h to
      base64.c because otherwise the linker fails if this function, which is
      currently declared as extern inline, is used in lyaml.cc.
      
      Needed for #1629
      
      NO_DOC=refactoring
      NO_CHANGELOG=refactoring
      ba322caf
  11. Jun 20, 2023
    • Vladimir Davydov's avatar
      yaml: don't encode unprintable strings as binary blobs · 890a821c
      Vladimir Davydov authored
      Historically, we encode strings that contain invalid or non-printable
      utf-8 sequences in YAML as binary base64 blobs. We do that because of
      limitations/bugs of the YAML encoder, which refuses to encode invalid
      utf-8 strings. To work around this issue, we introduced the helper
      utf8_check_printable, which is basically a copy of yaml_check_utf8,
      and treat strings for which it fails as binary data (MP_BIN).
      
      This commit updates the YAML submodule to the version where all known
      issues with encoding invalid/unprintable utf-8 strings are fixed and
      removes special treatment of such strings (drops utf8_check_printable).
      Now unprintable or invalid utf-8 sequences are emitted as code points,
      e.g. '\xFF' or '\uFFFF'. This change is a pre-requisite for introducing
      the new varbinary type to Lua. Without it plain strings would be
      implicitly converted to varbinary after decoding/encoding them in YAML,
      which would be confusing.
      
      Closes #8756
      
      NO_DOC=bug fix
      890a821c
  12. Jun 09, 2023
    • Nikolay Shirokovskiy's avatar
      box: introduce memtx_sort_threads config parameter · 4f617b70
      Nikolay Shirokovskiy authored
      Closes #3389
      Closes #7689
      Closes #4646
      
      @TarantoolBot document
      Title: new box.cfg parameter memtx_sort_threads
      
      The parameter sets the number of threads used to sort keys of secondary
      indexes on loading memtx database. The parameter cannot be changed
      dynamically (as it does not make sense).
      
      Maximum value is 256, minimum is 1. Default is to use all available cores.
      
      Usage example:
      ```
      box.cfg{memtx_sort_threads=4}
      ```
      4f617b70
    • Nikolay Shirokovskiy's avatar
      core: introduce sample sort algorithm · ec34bf7b
      Nikolay Shirokovskiy authored
      The algorithm runs sort in multiple threads and does not use OpenMP. It
      has better threads utilization right from the beginning but probably
      a worse constant than parallel qsort. See details in code comments.
      
      Besides sort is not performed in calling thread but instead in spawned
      worker threads. Calling thread yields waiting for worker threads to
      finish. Exception is small data size, in this case sorting is executed
      in calling thread saving time on spawning a thread. This should speed up
      test execution. This is existing behaviour of qsort_arg but data size
      threshold is reduced from 128000 to 1024.
      
      Part of #3389
      
      NO_CHANGELOG=internal
      NO_DOC=internal
      ec34bf7b
    • Gleb Kashkin's avatar
      compat: switch existing options to new for tnt-3.0 · ffa659e9
      Gleb Kashkin authored
      Due to the approaching tarantool 3.0 release, the following compat
      options' defaults were updated to new behavior:
      * yaml_pretty_multiline
      * sql_seq_scan_default
      * json_escape_forward_slash
      * fiber_channel_close_mode
      * fiber_slice_default
      * box_cfg_replication_sync_timeout
      
      Closes #8576
      
      NO_DOC=tarantool.io compat doc doesn't state current defaults
      ffa659e9
  13. Jun 02, 2023
    • Oleg Chaplashkin's avatar
      metrics: bump to new version · 2780e8e0
      Oleg Chaplashkin authored
      Bump the metrics submodule to 1.0.0-2-gea83227 version.
      
      NO_DOC=metrics submodule bump
      NO_TEST=metrics submodule bump
      NO_CHANGELOG=metrics submodule bump
      2780e8e0
  14. May 25, 2023
  15. May 24, 2023
    • Igor Munkin's avatar
      luajit: bump new version · cde911d0
      Igor Munkin authored
      * Fix IR_RENAME snapshot number. Follow-up fix for a32aeadc.
      * OSX: Disable unreliable assertion for external frame unwinding.
      * Disable unreliable assertion for external frame unwinding.
      * Handle on-trace OOM errors from helper functions.
      * LJ_GC64: Make ASMREF_L references 64 bit.
      * lldb: introduce luajit-lldb
      * x64/LJ_GC64: Fix emit_rma().
      * Limit path length passed to C library loader.
      
      Closes #7745
      Part of #4808
      Part of #8069
      Part of #8516
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      cde911d0
  16. Apr 10, 2023
    • Georgy Moiseev's avatar
      lua: bump checks module · a8bc6312
      Georgy Moiseev authored
      Rework "running tests with built-in package" assert since now checks is
      a callable table package with subpackages instead of a single function.
      
      NO_DOC=No tagged version since checks initial embedding
      NO_CHANGELOG=No tagged version since checks initial embedding
      a8bc6312
  17. Mar 24, 2023
    • Georgy Moiseev's avatar
      lua: embed metrics module · 82ebbb35
      Georgy Moiseev authored
      tarantool/metrics [1] is a lua module (distributed as a separate rock)
      for metrics aggregation and export. After this patch, it will be a part
      of the tarantool binary.
      
      1. https://github.com/tarantool/metrics
      
      Part of #7725
      
      @TarantoolBot document
      Title: embedded metrics
      
      Now tarantool has metrics module on its board. metrics is a lua module
      previously distributed as a separate rock which is widely used by
      tarantool applications. Metrics has its own documentation section:
      https://www.tarantool.io/en/doc/latest/book/monitoring/ , but it doesn't
      yet mention anything about the embedding.
      82ebbb35
  18. Mar 11, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 15e62a67
      Igor Munkin authored
      * ARM64: Avoid side-effects of constant rematerialization.
      * ARM64: Fix {AHUV}LOAD specialized to nil/false/true.
      * ARM64: Fix pcall() error case.
      * Fix math.min()/math.max() inconsistencies.
      * test: add test case for math.modf
      
      Closes #6163
      Part of #8069
      Follows up #7230
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      15e62a67
  19. Mar 03, 2023
    • Sergey Bronnikov's avatar
      build: bump zstd submodule · ecbbc925
      Sergey Bronnikov authored
      Updated third_party/zstd submodule from v1.5.2 to pre-1.5.5 version.
      The new version fixes a rare bug that was introduced in 1.5.0 [1].
      
      A v1.5.5 release version will be produced in March.
      
      1. https://github.com/facebook/zstd/pull/3517
      
      Fixes #8391
      
      NO_DOC=build
      NO_TEST=build
      ecbbc925
    • Igor Munkin's avatar
      luajit: bump new version · 61da8e87
      Igor Munkin authored
      * ci: add nojit flavor for exotic builds
      * test: fix lua-Harness JIT-related tests
      * test: adjust JIT-related tests in tarantool-tests
      * build: fix build with JIT disabled
      * Minor fixes.
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      NO_CHANGELOG=test
      61da8e87
  20. Mar 01, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 48f73867
      Igor Munkin authored
      * test: make skipcond helper more convenient
      * test: introduce test:skiprest TAP helper
      * test: introduce test:skipall TAP helper
      * test: stop using utils.selfrun in tests
      * ci: use LuaJIT-test target in testing workflows
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      NO_CHANGELOG=test
      48f73867
  21. Feb 27, 2023
    • Boris Stepanenko's avatar
      third_party: update nghttp2 from 1.48.0 to 1.52.0 · a6fae421
      Boris Stepanenko authored
      Updating libcurl from 7.84.0 to 7.87.0 in commit 09f4eca1
      ("third_party: update libcurl from 7.84.0 to 7.87.0")
      made it impossible to built tarantool with bundled curl with nghttp2,
      because nghttp2 was not updated to fit libcurl 7.87.0, this led to
      missing function
      nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation
      during linking step.
      
      https://github.com/nghttp2/nghttp2/releases/tag/v1.52.0
      
      Closes #8268
      
      NO_DOC=there is no known behavior changes, consider the change as not
             visible for a user
      NO_TEST=can only reproduce in specific environment
      NO_CHANGELOG=see NO_DOC
      a6fae421
  22. Feb 20, 2023
    • Timur Safin's avatar
      debugger: use option -d for debugger activation · a984fc0d
      Timur Safin authored
      Added `-d` option for activation of debugger shell:
      - it calls debugger shell in `luadebug.lua` instead of
        a standard interactive shell from `console.lua`;
      - that option complements original way for starting a
        debugging shell via `require 'luadebug'()`, but is a
        little bit easier.
      
      NB! At the moment when we enter debugging mode instead of
      a standard Tarantool console, we change banner to:
      ```
      Tarantool debugger 2.11.0-entrypoint-852-g9e6ed28ae
      type 'help' for interactive help
      ```
      
      Part of #7456
      
      @TarantoolBot document
      Title: Command-line option `-d` for console debugger.
      
      Please see third_party/lua/README-luadebug.md for a full description
      of different ways to activate debugging shell.
      a984fc0d
    • Igor Munkin's avatar
      luajit: bump new version · 5c8dd500
      Igor Munkin authored
      * ci: add LUAJIT_ENABLE_CHECKHOOK for exotic matrix
      * ci: add ARM64 architecture to exotic testing
      * ci: update action/checkout to v3
      * Fix os.date() for wider libc strftime() compatibility.
      * x86/x64: Fix loop realignment.
      * ci: introduce workflow for exotic builds
      * sysprof: fix interval parsing in dual-number mode
      * test: add test for `string.format('%c', 0)`
      * ci: drop obsolete arguments for LuaJIT integration
      
      Part of #8069
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      5c8dd500
    • Timur Safin's avatar
      debugger: match paths suffixes in breakpoints · 8a2ba411
      Timur Safin authored
      We used to "normalize" breakpoint filename paths
      down to their basic name, which worked fine for
      unique file names, but is getting annoying when
      you need to debug a code in one of many `init.lua`
      modules, i.e.
      
          break init.lua:5
      
      Will stop at _every_ `init.lua` file we will run
      at the debugging session.
      
      So we add machinery for partial paths lookup, to
      make possible to set breakpoints using (unique-enough)
      path suffixes, e.g. if we have multiple `init.lua` in
      the application, i.e.
          ./init.lua
          ./A/init.lua
          ./B/init.lua
      
      Then we could use syntax:
      
          break A/init.lua:5
      
      To activate debugger breakpoint only in the particular
      module, and not trigger it elsewhere.
      
      Current suffix trees limitations and peculiarities
      --------------------------------------------------
      
      Please keep in mind that suffix-tree algorithm, used for
      partial paths lookup, uses `$ref` and `$f` node names
      for their own purposes. That means that it would not handle
      well breakpoints with paths containing `$f` and `$ref`.
      That's not a big problem given that majority of filesystems
      we are running on do not usually allow `$` as part of
      file name.
      
      Also, due to suffix tree lookup behavior, if we would
      activate multiple breakpoints:
          break init.lua:10
          break A/init.lua:10
      
      Then _least specific_ `init.lua:10` breakpoint will trigger.
      From users' prospective it makes no much difference, as we
      need to stop in debugger shell in this line, but this is
      the way how suffix tree is working.
      
      Dot files treatment
      -------------------
      
      There is a special mechanism for `.` and `..` treatment
      if they are at the header of a path provided. I.e.
      
          break ./main.lua:10
          break ../a/b/c/least.lua:15
      
      For these cases `.` and `..` will be converted to the
      full path to the given file location.
      
      NO_TEST=hard to implement tests. Postponed till step.5
      
      @TarantoolBot document
      Title: Breakpoints in console debugger for Lua
      
      Match partial path patterns in breakpoints
      ==========================================
      
      Please see `third_party/lua/README-luadebug.md` for
      a fuller description of partial path syntax one could use
      in a breakpoints definition.
      8a2ba411
    • Timur Safin's avatar
      debugger: match paths suffixes in breakpoints · c5c2b6aa
      Timur Safin authored
      We used to "normalize" breakpoint filename paths
      down to their basic name, which worked fine for
      unique file names, but is getting annoying when
      you need to debug a code in one of many `init.lua`
      modules, i.e.
      
          break init.lua:5
      
      Will stop at _every_ `init.lua` file we will run
      at the debugging session.
      
      So we add machinery for partial paths lookup, to
      make possible to set breakpoints using (unique-enough)
      path suffixes, e.g. if we have multiple `init.lua` in
      the application, i.e.
          ./init.lua
          ./A/init.lua
          ./B/init.lua
      
      Then we could use syntax:
      
          break A/init.lua:5
      
      To activate debugger breakpoint only in the particular
      module, and not trigger it elsewhere.
      
      NB! If we will activate multiple breakpoints:
          break init.lua:10
          break A/init.lua:10
      
      Then _least specific_ `init.lua:10` breakpoint will trigger.
      From users' prospective it makes no much difference, as we
      need to stop in debugger shell in this line, but this is
      the way how suffix tree is working.
      
      NO_TEST=hard to implement tests. Postponed till step.5
      
      @TarantoolBot document
      Title: Breakpoints in console debugger for Lua
      
      Match partial path patterns in breakpoints
      ==========================================
      
      Please see `third_party/lua/README-luadebug.md` for
      a fuller description of partial path syntax one could use
      in a breakpoints definition.
      c5c2b6aa
    • Timur Safin's avatar
      debugger: changelog and readme updated · cc1163a9
      Timur Safin authored
      * Added breakpoints support in debugger;
      
      NO_TEST=documentation added
      
      @TarantoolBot document
      Title: Breakpoints in console debugger for Lua
      
      Breakpoints support
      ===================
      
      Please see `third_party/lua/README-luadebug.md` for
      a description of breakpoints support introduced to the
      builtin console debugger in `luadebug.lua`.
      cc1163a9
    • Timur Safin's avatar
      debugger: refactor auto listing · e3c73d5b
      Timur Safin authored
      Commonize mechanism activated by `dbg.cfg.auto_where` and an
      automatic code listing we show for breakpoint context.
      
      Make sure we do not show redundant listing, i.e. after
      commands `where #`, or `up`, or `down` we do not output
      automatic listing, as there was already shown some different
      context.
      
      NO_DOC=see later
      NO_CHANGELOG=internal
      NO_TEST=internal
      e3c73d5b
    • Timur Safin's avatar
      debugger: better help message · f5366146
      Timur Safin authored
      Make message, which is shown for a `help` command,
      to be more readable.
      
      NO_DOC=see later commit
      NO_CHANGELOG=internal
      NO_TEST=internal
      f5366146
    • Timur Safin's avatar
      debugger: introduce dbg_write_error, dbg_write_warn · ae3653a7
      Timur Safin authored
      Introduced `dbg_write_error` to centralize the way
      how errors reported in debugger shell.
      
      Similarly `dbg_write_warn` is used for reporting of
      highlighted non-fatal warnings.
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      ae3653a7
    • Timur Safin's avatar
      debugger: uncolor variables · 466edbbf
      Timur Safin authored
      We may use "caret" or "arrow" symbols either in
      colored or uncolored contexts. To reduce further
      confusion we get rid of colored prefixes.
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      NO_TEST=internal
      466edbbf
    • Timur Safin's avatar
      debugger: trim generated size of debug.info · 91900411
      Timur Safin authored
      In many cases we do not need to use all "Snl"
      parameters in `debug.getinfo()`: so try to trim wherever
      possible "n", which is calculating `name` and `namewhat`,
      and "S" which is generating `source`, `short_src` and others.
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      NO_TEST=internal
      91900411
    • Timur Safin's avatar
      debugger: better annotated listing · 49f419ce
      Timur Safin authored
      Visualize properly locations with breakpoints
      saved there. In addition to current line visualization
      (using green '=>') we annotate corresponding line with
      red "●".
      
      NO_TEST=see the later commit
      NO_DOC=internals
      NO_CHANGELOG=internals
      49f419ce
    • Timur Safin's avatar
      debugger: handle breakpoints · 80460557
      Timur Safin authored
      Introduced few new commands to handle breakpoints:
      - `b file:NNN` to set new breakpoint;
      - `bd file:NNN` to remove breakpoint;
      - 'bl` to list all active breakpoints.
      
      There is partial breakpoint notation supported when
      for `b :N` or `b +N` breakpoint will be set to the
      asked line in the _currently_ debugged file.
      
      Changed `c` (continue) to stop on breakpoints, if there any active
      one asssigned by user. Otherwise it still run in full speed, without
      any hook check.
      
      NO_DOC=see the later commit
      NO_CHANGELOG=see the later commit
      80460557
Loading