MCPcopy Create free account
hub / github.com/ReadyTalk/avian / translateStackTrace

Function translateStackTrace

src/classpath-android.cpp:108–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106void JNICALL closeMemoryMappedFile(Thread*, GcMethod*, uintptr_t*);
107
108object translateStackTrace(Thread* t, object raw)
109{
110 PROTECT(t, raw);
111
112 object array = makeObjectArray(
113 t,
114 resolveClass(t, roots(t)->bootLoader(), "java/lang/StackTraceElement"),
115 objectArrayLength(t, raw));
116 PROTECT(t, array);
117
118 for (unsigned i = 0; i < objectArrayLength(t, array); ++i) {
119 GcStackTraceElement* e = makeStackTraceElement(
120 t, cast<GcTraceElement>(t, objectArrayBody(t, raw, i)));
121
122 setField(t, array, ArrayBody + (i * BytesPerWord), e);
123 }
124
125 return array;
126}
127
128class MyClasspath : public Classpath {
129 public:

Calls 5

rootsFunction · 0.85
makeStackTraceElementFunction · 0.85
setFieldFunction · 0.85
makeObjectArrayFunction · 0.70
resolveClassFunction · 0.70

Tested by

no test coverage detected