added pf_method_get_ip_source_line() and defined CompiledMethod::ipSourceLine

This commit is contained in:
hyunghwan.chung
2019-07-11 06:43:47 +00:00
parent 4afe4b459d
commit d5475d79b6
7 changed files with 47 additions and 40 deletions

View File

@ -322,9 +322,10 @@ class(#pointer) CompiledMethod(Object)
ntmprs,
nargs,
//code, <-- only if moo is built with MOO_USE_METHOD_TRAILER disable.
source,
source_file,
source_line.
source_text,
dbi_file_offset,
source_line,
dbi_method_offset.
method preamble
{
@ -348,6 +349,7 @@ class(#pointer) CompiledMethod(Object)
}
method(#primitive) sourceFile.
method(#primitive) ipSourceLine: ip.
method sourceLine
{

View File

@ -77,7 +77,7 @@ while (ctx notNil)
if (ctx class == MethodContext)
{
System logNl: (" " & ctx method owner name & ">>" & ctx method name &
" (" & ctx method sourceFile & " " & ctx method sourceLine asString & ")").
" (" & ctx method sourceFile & " " & (ctx method ipSourceLine: (ctx pc)) asString & ")").
// TODO: get location of the current pc and include it... (ctx method sourceLine: ctx pc) asString dump.
}.