* Instead of faulting when trying to print an invalid string pointer,
print_demangled_call() will now use user_strlcpy() to copy the string first (if that fails, it will printf '???' to show this). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28386 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9cd2430ee0
commit
97ba3fb358
@ -218,8 +218,12 @@ print_demangled_call(const char* image, const char* symbol, addr_t args,
|
||||
break;
|
||||
}
|
||||
|
||||
if (type == B_STRING_TYPE)
|
||||
kprintf(" \"%s\"", (char*)value);
|
||||
if (type == B_STRING_TYPE) {
|
||||
if (user_strlcpy(buffer, (char*)value, sizeof(buffer)) < B_OK)
|
||||
kprintf(" '???'");
|
||||
else
|
||||
kprintf(" \"%s\"", buffer);
|
||||
}
|
||||
|
||||
if (addDebugVariables)
|
||||
set_debug_argument_variable(i, value);
|
||||
|
Loading…
Reference in New Issue
Block a user