summaryrefslogtreecommitdiff
path: root/Kernel/Panic.cpp
blob: d1cb615973c8b8161c15d5eee058997adfda29a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <AK/Format.h>
#include <Kernel/Arch/x86/Processor.h>
#include <Kernel/KSyms.h>
#include <Kernel/Panic.h>

namespace Kernel {

void __panic(const char* file, unsigned int line, const char* function)
{
    critical_dmesgln("at {}:{} in {}", file, line, function);
    dump_backtrace();
    Processor::halt();
}

}