mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
Don't call SBDebugger::SetInternalVariable in the sigwinch_handler, since that takes locks and potentially does allocations.
Just call SBDebugger::SetTerminalWidth on the driver's SBDebugger, which does the same job, but no locks. Also add the value checking to SetTerminalWidth you get with SetInternalVariable(..., "term-width", ...). rdar://problem/11310563 llvm-svn: 155665
This commit is contained in:
@@ -2523,10 +2523,7 @@ DebuggerInstanceSettings::ValidTermWidthValue (const char *value, Error err)
|
||||
|
||||
if (end && end[0] == '\0')
|
||||
{
|
||||
if (width >= 10 && width <= 1024)
|
||||
valid = true;
|
||||
else
|
||||
err.SetErrorString ("invalid term-width value; value must be between 10 and 1024");
|
||||
return ValidTermWidthValue (width, err);
|
||||
}
|
||||
else
|
||||
err.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string", value);
|
||||
@@ -2535,6 +2532,17 @@ DebuggerInstanceSettings::ValidTermWidthValue (const char *value, Error err)
|
||||
return valid;
|
||||
}
|
||||
|
||||
bool
|
||||
DebuggerInstanceSettings::ValidTermWidthValue (uint32_t value, Error err)
|
||||
{
|
||||
if (value >= 10 && value <= 1024)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
err.SetErrorString ("invalid term-width value; value must be between 10 and 1024");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DebuggerInstanceSettings::UpdateInstanceSettingsVariable (const ConstString &var_name,
|
||||
|
||||
Reference in New Issue
Block a user