syscalls: Remove lookup_symbol syscall again.

This partially reverts b959d46dbd.
This commit is contained in:
Michael Lotz 2015-04-11 11:13:33 +02:00
parent bd5dea318a
commit 459e651fd5
3 changed files with 0 additions and 47 deletions

View File

@ -54,11 +54,6 @@ status_t _user_read_kernel_image_symbols(image_id id, elf_sym* symbolTable,
int32* _symbolCount, char* stringTable, size_t* _stringTableSize,
addr_t* _imageDelta);
status_t _user_lookup_symbol(addr_t address, addr_t* baseAddress,
char* symbolNameBuffer, size_t symbolNameBufferSize,
char* imageNameBuffer, size_t imageNameBufferSize,
bool* exactMatch);
#ifdef __cplusplus
}
#endif

View File

@ -494,10 +494,6 @@ extern status_t _kern_system_profiler_recorded(
extern ssize_t _kern_get_stack_trace(size_t addressCount,
addr_t* adresses);
extern status_t _kern_lookup_symbol(addr_t address, addr_t* baseAddress,
char* symbolNameBuffer, size_t symbolNameBufferSize,
char* imageNameBuffer, size_t imageNameBufferSize,
bool* exactMatch);
/* atomic_* ops (needed for CPUs that don't support them directly) */
#ifdef ATOMIC_FUNCS_ARE_SYSCALLS

View File

@ -2686,41 +2686,3 @@ _user_read_kernel_image_symbols(image_id id, elf_sym* symbolTable,
return B_OK;
}
status_t
_user_lookup_symbol(addr_t address, addr_t* userBaseAddress,
char* userSymbolNameBuffer, size_t symbolNameBufferSize,
char* userImageNameBuffer, size_t imageNameBufferSize, bool* userExactMatch)
{
MutexLocker locker(&sImageMutex);
addr_t baseAddress;
const char *symbolName;
const char *imageName;
bool exactMatch;
status_t status;
if (IS_KERNEL_ADDRESS(address)) {
status = elf_debug_lookup_symbol_address(address, &baseAddress,
&symbolName, &imageName, &exactMatch);
} else {
status = elf_debug_lookup_user_symbol_address(
thread_get_current_thread()->team, address, &baseAddress,
&symbolName, &imageName, &exactMatch);
}
if (status != B_OK)
return status;
if (user_memcpy(userBaseAddress, &baseAddress, sizeof(addr_t)) != B_OK
|| user_memcpy(userExactMatch, &exactMatch, sizeof(bool)) != B_OK
|| user_strlcpy(userSymbolNameBuffer, symbolName, symbolNameBufferSize)
< 0
|| user_strlcpy(userImageNameBuffer, imageName, imageNameBufferSize)
< 0) {
return B_BAD_ADDRESS;
}
return B_OK;
}