History

Enable logging from exec for specific components. Remove trailing newlines from all existing logging calls.

arr committed 9 years ago

Commit dd0789c1 parent 3098fb816 files · +185 −112Browse files

Showing the changes to src/vm/string.cpp (1 of 16 files). Show all

Unified · Split

src/vm/string.cpp+3−3
@@ -222,7 +222,7 @@ vm_string_t::vm_string_t(std::size_t encoded_str_len, const uint8_t *encoded_str · 221 unmodified lines
222 }222 }
223 223
224 if (debug::is_component_tracing_enabled<debug::component_trace_t::memory>())224 if (debug::is_component_tracing_enabled<debug::component_trace_t::memory>())
225 debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "init: vm string: %d %d >>%s<<\n", _length, (_length_max * _character_size), dest);225 debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "init: vm string: %d %d >>%s<<", _length, (_length_max * _character_size), dest);
226}226}
227 227
228vm_string_t::vm_string_t(const vm_string_t &s1, const vm_string_t &s2)228vm_string_t::vm_string_t(const vm_string_t &s1, const vm_string_t &s2)
@@ -282,7 +282,7 @@ vm_string_t::vm_string_t(const vm_string_t &other, word_t begin_index, word_t en · 53 unmodified lines
282 282
283 // Copy over string content starting at the correct index (char vs. rune_t)283 // Copy over string content starting at the correct index (char vs. rune_t)
284 std::memcpy(dest, (src + (begin_index * _character_size)), length_in_bytes);284 std::memcpy(dest, (src + (begin_index * _character_size)), length_in_bytes);
285 debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "copy: vm string: %#" PRIxPTR " %d %d %#" PRIxPTR "\n", &other, begin_index, end_index, this);285 debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "copy: vm string: %#" PRIxPTR " %d %d %#" PRIxPTR, &other, begin_index, end_index, this);
286}286}
287 287
288vm_string_t::~vm_string_t()288vm_string_t::~vm_string_t()
@@ -301,7 +301,7 @@ vm_string_t::~vm_string_t() · 12 unmodified lines
301 free_memory(_encoded_str);301 free_memory(_encoded_str);
302 }302 }
303 303
304 debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "destroy: vm string\n");304 debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "destroy: vm string");
305 305
306 debug::assign_debug_pointer(&_mem.alloc);306 debug::assign_debug_pointer(&_mem.alloc);
307 debug::assign_debug_pointer(&_encoded_str);307 debug::assign_debug_pointer(&_encoded_str);