|
@@ -19,12 +19,12 @@
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
-ErrorOr<size_t> Process::procfs_get_thread_stack(ThreadID thread_id, KBufferBuilder& builder) const
|
|
|
+ErrorOr<void> Process::procfs_get_thread_stack(ThreadID thread_id, KBufferBuilder& builder) const
|
|
|
{
|
|
|
JsonArraySerializer array { builder };
|
|
|
auto thread = Thread::from_tid(thread_id);
|
|
|
if (!thread)
|
|
|
- return Error::from_errno(ESRCH);
|
|
|
+ return ESRCH;
|
|
|
bool show_kernel_addresses = Process::current().is_superuser();
|
|
|
bool kernel_address_added = false;
|
|
|
for (auto address : Processor::capture_stack_trace(*thread, 1024)) {
|
|
@@ -38,8 +38,7 @@ ErrorOr<size_t> Process::procfs_get_thread_stack(ThreadID thread_id, KBufferBuil
|
|
|
}
|
|
|
|
|
|
array.finish();
|
|
|
- // FIXME: This return value seems useless.
|
|
|
- return 0;
|
|
|
+ return {};
|
|
|
}
|
|
|
|
|
|
ErrorOr<void> Process::traverse_stacks_directory(FileSystemID fsid, Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)> callback) const
|