diff options
author | Mike Pall <mike> | 2011-06-07 21:37:24 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-06-07 21:37:24 +0200 |
commit | 585cf05dbd54564d2d3387cef09b3ac2d5e52afd (patch) | |
tree | d455c80e6d916ae2673d8aaaee50f0ba77d0b92a /src/lj_trace.c | |
parent | b44ccd426339a9eb0da83633d4b71a23dac29762 (diff) | |
download | luajit-585cf05dbd54564d2d3387cef09b3ac2d5e52afd.tar.gz luajit-585cf05dbd54564d2d3387cef09b3ac2d5e52afd.tar.bz2 luajit-585cf05dbd54564d2d3387cef09b3ac2d5e52afd.zip |
Move debugging/introspection functionality to lj_debug.c.
Diffstat (limited to 'src/lj_trace.c')
-rw-r--r-- | src/lj_trace.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c index bef4558b..6b1dd2f6 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "lj_gc.h" | 13 | #include "lj_gc.h" |
14 | #include "lj_err.h" | 14 | #include "lj_err.h" |
15 | #include "lj_debug.h" | ||
15 | #include "lj_str.h" | 16 | #include "lj_str.h" |
16 | #include "lj_frame.h" | 17 | #include "lj_frame.h" |
17 | #include "lj_state.h" | 18 | #include "lj_state.h" |
@@ -103,10 +104,8 @@ static void perftools_addtrace(GCtrace *T) | |||
103 | name++; | 104 | name++; |
104 | else | 105 | else |
105 | name = "(string)"; | 106 | name = "(string)"; |
106 | if (startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc) | 107 | lua_assert(startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc); |
107 | lineno = proto_line(pt, proto_bcpos(pt, startpc)); | 108 | lineno = lj_debug_line(pt, proto_bcpos(pt, startpc)); |
108 | else | ||
109 | lineno = proto_line(pt, 0); /* Wrong, but better than nothing. */ | ||
110 | if (!fp) { | 109 | if (!fp) { |
111 | char fname[40]; | 110 | char fname[40]; |
112 | sprintf(fname, "/tmp/perf-%d.map", getpid()); | 111 | sprintf(fname, "/tmp/perf-%d.map", getpid()); |