Example #1
0
void ScopeDesc::decode_body() {
  if (decode_offset() == DebugInformationRecorder::serialized_null) {
    // This is a sentinel record, which is only relevant to
    // approximate queries.  Decode a reasonable frame.
    _sender_decode_offset = DebugInformationRecorder::serialized_null;
    _method = _code->method();
    _bci = InvocationEntryBci;
    _locals_decode_offset = DebugInformationRecorder::serialized_null;
    _expressions_decode_offset = DebugInformationRecorder::serialized_null;
    _monitors_decode_offset = DebugInformationRecorder::serialized_null;
  } else {
    // decode header
    DebugInfoReadStream* stream  = stream_at(decode_offset());

    _sender_decode_offset = stream->read_int();
    _method = stream->read_method();
    _bci    = stream->read_bci();

    // decode offsets for body and sender
    _locals_decode_offset      = stream->read_int();
    _expressions_decode_offset = stream->read_int();
    _monitors_decode_offset    = stream->read_int();
  }
}
Example #2
0
static struct offset_info *decode_buffer(unsigned char *buf, int bufsize)
{
	int i = 0;
	static struct offset_info decode_cache[BUFSIZE];

	memset(decode_cache, 0, sizeof(struct offset_info) * bufsize);

	for (i = 0; i < bufsize; i++) {
		decode_offset(buf, bufsize, decode_cache, i);
	}

	for (i = 0; i < bufsize; i++) {
		decode_cache[i].seq_len = compute_seq_len(buf, bufsize, decode_cache, i);
	}

	return decode_cache;
}