• Home
  • Raw
  • Download

Lines Matching refs:option

209 bool Config::ParseValue(const std::string& option, const std::string& value, size_t min_value,  in ParseValue()  argument
218 error_log("%s: bad value for option '%s': %s", getprogname(), option.c_str(), strerror(errno)); in ParseValue()
222 error_log("%s: bad value for option '%s'", getprogname(), option.c_str()); in ParseValue()
227 option.c_str(), end); in ParseValue()
232 option.c_str(), long_value); in ParseValue()
238 option.c_str(), min_value, long_value); in ParseValue()
243 option.c_str(), max_value, long_value); in ParseValue()
250 bool Config::ParseValue(const std::string& option, const std::string& value, size_t default_value, in ParseValue() argument
256 return ParseValue(option, value, min_value, max_value, new_value); in ParseValue()
259 bool Config::SetGuard(const std::string& option, const std::string& value) { in SetGuard() argument
267 if (!ParseValue(option, value, 1, MAX_GUARD_BYTES, &rear_guard_bytes_)) { in SetGuard()
277 bool Config::SetFrontGuard(const std::string& option, const std::string& value) { in SetFrontGuard() argument
278 if (!ParseValue(option, value, DEFAULT_GUARD_BYTES, 1, MAX_GUARD_BYTES, &front_guard_bytes_)) { in SetFrontGuard()
287 bool Config::SetRearGuard(const std::string& option, const std::string& value) { in SetRearGuard() argument
288 return ParseValue(option, value, DEFAULT_GUARD_BYTES, 1, MAX_GUARD_BYTES, &rear_guard_bytes_); in SetRearGuard()
291 bool Config::SetFill(const std::string& option, const std::string& value) { in SetFill() argument
299 if (!ParseValue(option, value, 1, SIZE_MAX, &fill_on_alloc_bytes_)) { in SetFill()
306 bool Config::SetFillOnAlloc(const std::string& option, const std::string& value) { in SetFillOnAlloc() argument
307 return ParseValue(option, value, SIZE_MAX, 1, SIZE_MAX, &fill_on_alloc_bytes_); in SetFillOnAlloc()
310 bool Config::SetFillOnFree(const std::string& option, const std::string& value) { in SetFillOnFree() argument
311 return ParseValue(option, value, SIZE_MAX, 1, SIZE_MAX, &fill_on_free_bytes_); in SetFillOnFree()
314 bool Config::SetBacktrace(const std::string& option, const std::string& value) { in SetBacktrace() argument
316 return ParseValue(option, value, DEFAULT_BACKTRACE_FRAMES, 1, MAX_BACKTRACE_FRAMES, in SetBacktrace()
320 bool Config::SetBacktraceEnableOnSignal(const std::string& option, const std::string& value) { in SetBacktraceEnableOnSignal() argument
322 return ParseValue(option, value, DEFAULT_BACKTRACE_FRAMES, 1, MAX_BACKTRACE_FRAMES, in SetBacktraceEnableOnSignal()
326 bool Config::SetBacktraceDumpOnExit(const std::string& option, const std::string& value) { in SetBacktraceDumpOnExit() argument
327 if (Config::VerifyValueEmpty(option, value)) { in SetBacktraceDumpOnExit()
343 bool Config::SetBacktraceSize(const std::string& option, const std::string& value) { in SetBacktraceSize() argument
344 if (!ParseValue(option, value, 1, SIZE_MAX, &backtrace_min_size_bytes_)) { in SetBacktraceSize()
352 bool Config::SetBacktraceMinSize(const std::string& option, const std::string& value) { in SetBacktraceMinSize() argument
353 return ParseValue(option, value, 1, SIZE_MAX, &backtrace_min_size_bytes_); in SetBacktraceMinSize()
356 bool Config::SetBacktraceMaxSize(const std::string& option, const std::string& value) { in SetBacktraceMaxSize() argument
357 return ParseValue(option, value, 1, SIZE_MAX, &backtrace_max_size_bytes_); in SetBacktraceMaxSize()
360 bool Config::SetExpandAlloc(const std::string& option, const std::string& value) { in SetExpandAlloc() argument
361 return ParseValue(option, value, DEFAULT_EXPAND_BYTES, 1, MAX_EXPAND_BYTES, &expand_alloc_bytes_); in SetExpandAlloc()
364 bool Config::SetFreeTrack(const std::string& option, const std::string& value) { in SetFreeTrack() argument
373 return ParseValue(option, value, DEFAULT_FREE_TRACK_ALLOCATIONS, 1, MAX_FREE_TRACK_ALLOCATIONS, in SetFreeTrack()
377 bool Config::SetFreeTrackBacktraceNumFrames(const std::string& option, const std::string& value) { in SetFreeTrackBacktraceNumFrames() argument
378 return ParseValue(option, value, DEFAULT_BACKTRACE_FRAMES, 0, MAX_BACKTRACE_FRAMES, in SetFreeTrackBacktraceNumFrames()
382 bool Config::SetRecordAllocs(const std::string& option, const std::string& value) { in SetRecordAllocs() argument
386 return ParseValue(option, value, DEFAULT_RECORD_ALLOCS, 1, MAX_RECORD_ALLOCS, in SetRecordAllocs()
400 bool Config::VerifyValueEmpty(const std::string& option, const std::string& value) { in VerifyValueEmpty() argument
404 option.c_str()); in VerifyValueEmpty()
415 bool Config::GetOption(const char** options_str, std::string* option, std::string* value) { in GetOption() argument
428 *option = std::string(start, cur - start); in GetOption()
471 std::string option; in Init() local
474 while (GetOption(&options_str, &option, &value)) { in Init()
475 auto entry = kOptions.find(option); in Init()
477 error_log("%s: unknown option %s", getprogname(), option.c_str()); in Init()
484 if (process_func != nullptr && !(this->*process_func)(option, value)) { in Init()
488 options_ |= info->option; in Init()