debug.h (e1b4d8d0746069292d84708b0e11b17a7e1ef5e0) | debug.h (c905e45dc0e7ad2da0748371ba8921ca48134a01) |
---|---|
1/*- 2 * Copyright 1996-1998 John D. Polstra. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 36 unchanged lines hidden (view full) --- 45extern int debug; 46 47#ifdef DEBUG 48#define dbg(format, args...) debug_printf(format , ## args) 49#else 50#define dbg(format, args...) ((void) 0) 51#endif 52 | 1/*- 2 * Copyright 1996-1998 John D. Polstra. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 36 unchanged lines hidden (view full) --- 45extern int debug; 46 47#ifdef DEBUG 48#define dbg(format, args...) debug_printf(format , ## args) 49#else 50#define dbg(format, args...) ((void) 0) 51#endif 52 |
53#ifndef COMPAT_32BIT 54#define _MYNAME "ld-elf.so.1" 55#else 56#define _MYNAME "ld-elf32.so.1" 57#endif 58 |
|
53#define assert(cond) ((cond) ? (void) 0 : \ | 59#define assert(cond) ((cond) ? (void) 0 : \ |
54 (msg("ld-elf.so.1: assert failed: " __FILE__ ":" \ | 60 (msg(_MYNAME ": assert failed: " __FILE__ ":" \ |
55 __XSTRING(__LINE__) "\n"), abort())) 56#define msg(s) write(STDOUT_FILENO, s, strlen(s)) | 61 __XSTRING(__LINE__) "\n"), abort())) 62#define msg(s) write(STDOUT_FILENO, s, strlen(s)) |
57#define trace() msg("ld-elf.so.1: " __XSTRING(__LINE__) "\n") | 63#define trace() msg(_MYNAME ": " __XSTRING(__LINE__) "\n") |
58 | 64 |
65 |
|
59#endif /* DEBUG_H */ | 66#endif /* DEBUG_H */ |