mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
The implementation of trace dump has little to do with task scheduling, so we should move it to a separate module for cleaner code. This requires exposing some emulator-specific task info, as defined in host_task.h. BUG=chrome-os-partner:19235 TEST=Pass all tests BRANCH=None Change-Id: Iba9bc0794a4e1dd4ddb92b98345162b398fa6a8d Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/183238
27 lines
598 B
C
27 lines
598 B
C
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "common.h"
|
|
#include "panic.h"
|
|
#include "stack_trace.h"
|
|
#include "test_util.h"
|
|
#include "util.h"
|
|
|
|
void panic_assert_fail(const char *msg, const char *func, const char *fname,
|
|
int linenum)
|
|
{
|
|
fprintf(stderr, "ASSERTION FAIL: %s:%d:%s - %s\n",
|
|
fname, linenum, func, msg);
|
|
task_dump_trace();
|
|
|
|
puts("Fail!"); /* Inform test runner */
|
|
fflush(stdout);
|
|
|
|
exit(1);
|
|
}
|