Fixed incorrect uses of user_{strl,mem}cpy() in the kernel debugger. This could
break stack traces. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33381 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
be51dd0f4c
commit
c51d6579e4
@ -239,7 +239,7 @@ print_demangled_call(const char* image, const char* symbol, addr_t args,
|
||||
if (type == B_STRING_TYPE) {
|
||||
if (value == 0)
|
||||
kprintf(" \33[31m\"<NULL>\"\33[0m");
|
||||
else if (user_strlcpy(buffer, (char*)value, kBufferSize) < B_OK)
|
||||
else if (debug_strlcpy(buffer, (char*)value, kBufferSize) < B_OK)
|
||||
kprintf(" \33[31m\"<???>\"\33[0m");
|
||||
else
|
||||
kprintf(" \33[36m\"%s\"\33[0m", buffer);
|
||||
|
@ -1465,6 +1465,8 @@ public:
|
||||
if (!IS_USER_ADDRESS(address))
|
||||
return false;
|
||||
|
||||
if (debug_debugger_running())
|
||||
return debug_strlcpy(buffer, address, bufferSize) >= 0;
|
||||
return user_strlcpy(buffer, address, bufferSize) >= 0;
|
||||
}
|
||||
|
||||
@ -1486,6 +1488,8 @@ UserSymbolLookup::_Read(const T* address, T& data)
|
||||
if (!IS_USER_ADDRESS(address))
|
||||
return false;
|
||||
|
||||
if (debug_debugger_running())
|
||||
return debug_memcpy(&data, address, sizeof(T)) == B_OK;
|
||||
return user_memcpy(&data, address, sizeof(T)) == B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user