MCPcopy Create free account
hub / github.com/apitrace/apitrace / writeStackFrame

Method writeStackFrame

lib/trace/trace_writer.cpp:157–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void Writer::writeStackFrame(const RawStackFrame *frame) {
158 _writeUInt(frame->id);
159 if (!lookup(frames, frame->id)) {
160 if (frame->module != NULL) {
161 _writeByte(trace::BACKTRACE_MODULE);
162 _writeString(frame->module);
163 }
164 if (frame->function != NULL) {
165 _writeByte(trace::BACKTRACE_FUNCTION);
166 _writeString(frame->function);
167 }
168 if (frame->filename != NULL) {
169 _writeByte(trace::BACKTRACE_FILENAME);
170 _writeString(frame->filename);
171 }
172 if (frame->linenumber >= 0) {
173 _writeByte(trace::BACKTRACE_LINENUMBER);
174 _writeUInt(frame->linenumber);
175 }
176 if (frame->offset >= 0) {
177 _writeByte(trace::BACKTRACE_OFFSET);
178 _writeUInt(frame->offset);
179 }
180 _writeByte(trace::BACKTRACE_END);
181 frames[frame->id] = true;
182 }
183}
184
185void
186Writer::writeFlags(unsigned flags) {

Callers 1

visitMethod · 0.80

Calls 1

lookupFunction · 0.70

Tested by

no test coverage detected