• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mkottman/lua-gdb-helper: This is a collection of several GDB macros that simplif ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mkottman/lua-gdb-helper

开源软件地址(OpenSource Url):

https://github.com/mkottman/lua-gdb-helper

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

Lua GDB Helpers

This is a collection of several GDB macros that simplify debugging of C modules for Lua. Lua has to be compiled with debugging symbols, or the appropriate "dbg" package (i.e. liblua5.1-0-dbg in Debian/Ubuntu) needs to be installed.

Installation & Running

Copy the luagdb.txt file somewhere - installation complete.

To include the macros into your GDB session, run the following command:

source <path to luagdb.txt>

It is advisable to include the line into your ~/.gdbinit file (see the GDB documentation), so you do not have to type the command everytime you start GDB.

Reference

  • luastack [L] - lists the values on the current Lua C stack. By default, uses the current variable L as the lua_State pointer, however, an alternate lua_State can be provided as the first argument if needed.

  • luaprint < value > [verbose] - Pretty-prints a TValue passed as argument. Expects a pointer to a TValue. When verbose is 1, expands tables, metatables and userdata environments.

  • luaprinttable < table > - Pretty-prints a Lua Table. Expects a pointer to Table.

  • luavalue < index > [L] - Provides a pointer to a TValue from a stack index. By default, uses the current variable L as a lua_State pointer, but can be specified as the second argument. The return value is passed in variable $obj.

However, note that "pretty-printing" is not as pretty as it could be. First, the hash part is displayed, then the array part. Entries in hash part are separated by newlines, the ones in array part are displayed side-by-side.

License

Copyright (c) 2010 Michal Kottman, MIT License




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
cloudwu/luacc: LUACC allows you write C code in lua发布时间:2022-08-16
下一篇:
q66/cffi-lua: A portable C FFI for Lua 5.1+发布时间:2022-08-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap