andytill/erlyberly

Show record and record field names in function traces

Open

#56 建立於 2015年11月15日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Java (43 fork)batch import
enhancementerlanghelp wanted

倉庫指標

Star
 (686 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

At the moment erlyberly highlights record and record field names in process state and for certain function patterns used by OTP behaviours where it is likely that a record is used. It would be great to have highlighting for records anywhere they're used.

To do this in erlyberly we could do the following:

  • On a trace, decompile the module to AST.
  • Find dialyzer specs for functions which have records in the arguments or results and put them in an ets table to be checked when a trace comes in.
  • Compile record data in the module and put it into an ets table.
  • When a trace comes in, check if the function is in the ets containing record functions, pull the record info and convert the record so that it contains meta data like the process state does right now.

The record and function data needs to be deleted and rebuilt when the module is reloaded.

Only erlang is required for this change.

貢獻者指南