summaryrefslogtreecommitdiff
path: root/Kernel/Panic.cpp
blob: 192b37ddf8192dc757aec34c6f6ce986ca84ff8b (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/CPU.h>
#include <Kernel/KSyms.h>
#include <Kernel/Panic.h>

namespace Kernel {

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

}