mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
HV: assert: use signed int for __LINE__
GCC preprocessor expands __LINE__ to signed decimal integers. Keep the prototype of __assert aligned with this. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -228,13 +228,13 @@ static void show_host_call_trace(uint64_t rsp, uint64_t rbp, uint16_t pcpu_id)
|
||||
printf("\r\n");
|
||||
}
|
||||
|
||||
void __assert(uint32_t line, const char *file, const char *txt)
|
||||
void __assert(int32_t line, const char *file, const char *txt)
|
||||
{
|
||||
uint16_t pcpu_id = get_cpu_id();
|
||||
uint64_t rsp = cpu_rsp_get();
|
||||
uint64_t rbp = cpu_rbp_get();
|
||||
|
||||
printf("Assertion failed in file %s,line %u : %s",
|
||||
printf("Assertion failed in file %s,line %d : %s",
|
||||
file, line, txt);
|
||||
show_host_call_trace(rsp, rbp, pcpu_id);
|
||||
dump_guest_context(pcpu_id);
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#define ASSERT_H
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void __assert(uint32_t line, const char *file, const char *txt);
|
||||
void __assert(int32_t line, const char *file, const char *txt);
|
||||
|
||||
#define ASSERT(x, ...) \
|
||||
if (!(x)) {\
|
||||
|
Reference in New Issue
Block a user