Skip to content

Conversation

@GitSparTV
Copy link

Dumping all my work for this script. Some stuff was changed due to formatter.
Let me know what do you want me to finish to merge this.

Tested only on vscode lldb (lldb version 20.1.4-codelldb)

  • Fixed bug with unknown coro variable
  • Added support for dynamically linked luajit's
  • Dump more info about frames: frame type, frame index and traceback-like function names
  • Dump local names if possible in lj-stack
  • Add limit to frames generator in case of stack corruption.
  • Add lj-gcobj function and decompose TValue dumpers from GCobj types
  • Fix __str__ for Ptr. if self.value.value is NoneType, Python will error because you must return a string from this function
  • Minor refactoring here and there)
  • thread dump will now show if it's cur_L, mainthread and also its status
  • proto dump will now show chunkname and line info
  • Function dump will now show numparams, vararg flag for Lua functions
  • Function dump will now show symbol name for C functions and fast functions.
  • Fix bug when gcval was implemented as gcref

@GitSparTV GitSparTV force-pushed the spar/luajit_lldb_enhancements branch from 269e307 to de7fe09 Compare November 11, 2025 19:41
…o for lj-stack.

Add traceback and local names info. Add lj-gcobj and more
@GitSparTV GitSparTV force-pushed the spar/luajit_lldb_enhancements branch from de7fe09 to 6167e29 Compare November 11, 2025 19:43
@Buristan
Copy link
Collaborator

Hi, @GitSparTV!
Thanks for the patch!

This repo is "show case": you should open issues in tarantool/tarantool repo, and patches are reviewed in our mailing list (you can find LuaJIT-related by searching PATCH luajit). So, I suggest to close this PR and proceed in our ML.

Our team has a bunch of features to proceed first, which are blockers for your changes:

Since your patch depends on our changes, it is necessary to wait until the aforementioned patch-sets are merged in the master branch. I'll ping you here again after that.

If you won't be able to return to your patchset to rebase it on the merged ones, inform me so I can proceed with your changes by myself.

…parameters instead of `local` in `debug_localname`. Add guards for invalid and uninitialized stack. Dump raw stack if base pointer is not initialized or `--raw` parameter is passed to `lj-stack`.

Fix first frame. Deduce `base` pointer from registers. Print more names for locals using `pc_hint`.
Add `lj-bc` command to print instruction from the pointer.
Add guard when script is imported before running the target.
Fix `vmstate` for non-tarantool LuaJIT.
Refactor `cast` function to support `void*`, more simplified, more functional.
Fix `lj_debug_funcname` not working properly after target restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants