{"action":"created","issue":{"url":"https://api.github.com/repos/openresty/nginx-gdb-utils/issues/5","labels_url":"https://api.github.com/repos/openresty/nginx-gdb-utils/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/openresty/nginx-gdb-utils/issues/5/comments","events_url":"https://api.github.com/repos/openresty/nginx-gdb-utils/issues/5/events","html_url":"https://github.com/openresty/nginx-gdb-utils/pull/5","id":104287355,"number":5,"title":"feature: lval support GCudata and lgcpath support udata","user":{"login":"doujiang24","id":570391,"avatar_url":"https://avatars.githubusercontent.com/u/570391?v=3","gravatar_id":"","url":"https://api.github.com/users/doujiang24","html_url":"https://github.com/doujiang24","followers_url":"https://api.github.com/users/doujiang24/followers","following_url":"https://api.github.com/users/doujiang24/following{/other_user}","gists_url":"https://api.github.com/users/doujiang24/gists{/gist_id}","starred_url":"https://api.github.com/users/doujiang24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doujiang24/subscriptions","organizations_url":"https://api.github.com/users/doujiang24/orgs","repos_url":"https://api.github.com/users/doujiang24/repos","events_url":"https://api.github.com/users/doujiang24/events{/privacy}","received_events_url":"https://api.github.com/users/doujiang24/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-01T15:05:18Z","updated_at":"2015-09-02T03:30:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openresty/nginx-gdb-utils/pulls/5","html_url":"https://github.com/openresty/nginx-gdb-utils/pull/5","diff_url":"https://github.com/openresty/nginx-gdb-utils/pull/5.diff","patch_url":"https://github.com/openresty/nginx-gdb-utils/pull/5.patch"},"body":"We can find out large user-data object by lgcpath\r\nand we can dump the user-data by `lval (GCudata*)address_from_lgcpath` \r\n\r\n```\r\n(gdb) lgcpath 10 udata\r\npath 000:[registry] ->Tab[\"_LOADED\"] ->Tab[\"coroutine\"] ->Tab[\"wrap\"] ->lfunc(=coroutine.wrap:19) ->upval[0] ->Tab[\"io\"] ->Tab[\"stdin\"] -> user-data sz:40 (GCobj*)0x40d3a0d0 ->END\r\npath 001:[registry] ->Tab[\"_LOADED\"] ->Tab[\"coroutine\"] ->Tab[\"wrap\"] ->lfunc(=coroutine.wrap:19) ->upval[0] ->Tab[\"io\"] ->Tab[\"stdout\"] -> user-data sz:40 (GCobj*)0x40d3a120 ->END\r\npath 002:[registry] ->Tab[\"_LOADED\"] ->Tab[\"coroutine\"] ->Tab[\"wrap\"] ->lfunc(=coroutine.wrap:19) ->upval[0] ->Tab[\"io\"] ->Tab[\"stderr\"] -> user-data sz:40 (GCobj*)0x40d3a170 ->END\r\npath 003:[registry] ->Tab[\"_LOADED\"] ->Tab[\"coroutine\"] ->Tab[\"wrap\"] ->lfunc(=coroutine.wrap:19) ->upval[0] ->Tab[\"math\"] ->Tab[\"randomseed\"] ->cfunc ->upval[0] -> user-data sz:64 (GCobj*)0x40d3ada0 ->END\r\npath 004:[registry] ->Tab[\"_LOADED\"] ->Tab[\"cjson\"] ->Tab[\"encode_invalid_numbers\"] ->cfunc ->upval[0] -> user-data sz:1376 (GCobj*)0x40d4c258 ->END\r\npath 005:[registry] ->Tab[\"_LOADED\"] ->Tab[\"ffi\"] ->Tab[\"C\"] -> user-data sz:40 (GCobj*)0x40d4fa40 ->END\r\npath 006:[registry] ->Tab[\"LOADLIB: /usr/local/openresty/lualib/cjson.so\"] -> user-data sz:32 (GCobj*)0x40d4bf38 ->END\r\npath 007:[registry] ->Tab[tv=0x40d44120] ->Tab[\"10.1.81.97:6380\"] -> user-data sz:17695 (GCobj*)0x4182f760 ->END\r\npath 008:[registry] ->Tab[tv=0x40d44198] ->Tab[523] ->thr(ptr:0x40ac1c58) ->stack[16] ->Tab[\"sock\"] ->Tab[1] -> user-data sz:440 (GCobj*)0x41828978 ->END\r\npath 009:[registry] ->Tab[tv=0x40d44198] ->Tab[526] ->thr(ptr:0x416f7da0) ->stack[16] ->Tab[\"sock\"] ->Tab[1] -> user-data sz:440 (GCobj*)0x416de458 ->END\r\npath 010:[registry] ->Tab[tv=0x40d44198] ->Tab[555] ->thr(ptr:0x40143690) ->stack[16] ->Tab[\"sock\"] ->Tab[1] -> user-data sz:440 (GCobj*)0x40143f50 ->END\r\npath 011:[registry] ->Tab[tv=0x40d44198] ->Tab[602] ->thr(ptr:0x40856570) ->stack[16] ->Tab[\"sock\"] ->Tab[1] -> user-data sz:440 (GCobj*)0x420049f8 ->END\r\npath 012:[registry] ->Tab[tv=0x40d44198] ->Tab[604] ->thr(ptr:0x40bd0768) ->stack[16] ->Tab[\"sock\"] ->Tab[1] -> user-data sz:440 (GCobj*)0x419b55b8 ->END\r\npath 013:[registry] ->Tab[tv=0x40d44198] ->Tab[608] ->thr(ptr:0x40bdf6d0) ->stack[16] ->Tab[\"sock\"] ->Tab[1] -> user-data sz:440 (GCobj*)0x4068aa48 ->END\r\npath 014:[registry] ->Tab[tv=0x40d44198] ->Tab[609] ->thr(ptr:0x41707070) ->stack[16] ->Tab[\"sock\"] ->Tab[1] -> user-data sz:440 (GCobj*)0x40441b18 ->END\r\n... more paths ...\r\n(gdb) lval (GCudata*)0x40d3a0d0\r\n                udata type: io file\r\n                      payload len: 16\r\n                      payload ptr: 0x40d3a0e8\r\n(gdb) lval (GCudata*)0x40d3ada0\r\n                udata type: userdata\r\n                      payload len: 40\r\n                      payload ptr: 0x40d3adb8\r\n                      payload header: \"........................................\"\r\n```"},"comment":{"url":"https://api.github.com/repos/openresty/nginx-gdb-utils/issues/comments/136926694","html_url":"https://github.com/openresty/nginx-gdb-utils/pull/5#issuecomment-136926694","issue_url":"https://api.github.com/repos/openresty/nginx-gdb-utils/issues/5","id":136926694,"user":{"login":"doujiang24","id":570391,"avatar_url":"https://avatars.githubusercontent.com/u/570391?v=3","gravatar_id":"","url":"https://api.github.com/users/doujiang24","html_url":"https://github.com/doujiang24","followers_url":"https://api.github.com/users/doujiang24/followers","following_url":"https://api.github.com/users/doujiang24/following{/other_user}","gists_url":"https://api.github.com/users/doujiang24/gists{/gist_id}","starred_url":"https://api.github.com/users/doujiang24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doujiang24/subscriptions","organizations_url":"https://api.github.com/users/doujiang24/orgs","repos_url":"https://api.github.com/users/doujiang24/repos","events_url":"https://api.github.com/users/doujiang24/events{/privacy}","received_events_url":"https://api.github.com/users/doujiang24/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T03:30:48Z","updated_at":"2015-09-02T03:30:48Z","body":"@agentzh It will throw an error in python3 (python3.4)\r\n```\r\nTypeError: 'gdb.Value' object cannot be interpreted as an integer\r\n```\r\nAnd I just commit a patch to fix it, it works fine in python3 now.\r\n\r\nThanks for your reminder :)"}}