diff options
author | hunt <hunt> | 2005-07-01 19:05:46 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-07-01 19:05:46 +0000 |
commit | 5c826f9de142a9d4558e0b3aefab9c90d70c8c54 (patch) | |
tree | 0c74c4aa71cf3d437604baf86efaaa2207d51785 /runtime/runtime.h | |
parent | eb703a46c2c7118700a54f632d8eb3ae03c61681 (diff) | |
download | systemtap-steved-5c826f9de142a9d4558e0b3aefab9c90d70c8c54.tar.gz systemtap-steved-5c826f9de142a9d4558e0b3aefab9c90d70c8c54.tar.xz systemtap-steved-5c826f9de142a9d4558e0b3aefab9c90d70c8c54.zip |
2005-07-01 Martin Hunt <hunt@redhat.com>
* alloc.c (_stp_alloc): Call _stp_error().
(_stp_valloc): Ditto.
* io.c (_stp_warn): New function.
(_stp_exit): New function.
(_stp_error): New function.
(_stp_dbug): New function.
* runtime.h (dbug): Call _stp_dbug() if DEBUG is defined.
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r-- | runtime/runtime.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index 1a70da3f..1be35b77 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -1,3 +1,12 @@ +/* main header file + * Copyright (C) 2005 Red Hat Inc. + * + * This file is part of systemtap, and is free software. You can + * redistribute it and/or modify it under the terms of the GNU General + * Public License (GPL); either version 2, or (at your option) any + * later version. + */ + #ifndef _RUNTIME_H_ #define _RUNTIME_H_ /** @file runtime.h @@ -20,7 +29,16 @@ #include <asm/uaccess.h> #include <linux/kallsyms.h> +#ifdef DEBUG +/** Prints debug line. + * This function prints a debug message immediately to stpd. + * If the last character is not a newline, then one is added. + * @param args A variable number of args in a format like printf. + */ +#define dbug(args...) _stp_dbug(__FUNCTION__, __LINE__, args) +#else #define dbug(args...) ; +#endif /* DEBUG */ /* atomic globals */ static atomic_t _stp_transport_failures = ATOMIC_INIT (0); |