added pf_method_get_ip_source_line() and defined CompiledMethod::ipSourceLine
This commit is contained in:
@ -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
|
||||
{
|
||||
|
@ -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.
|
||||
|
||||
}.
|
||||
|
Reference in New Issue
Block a user