-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xtrace] Convert All Source Files To CPP
* Changed all sources files from `c` to `cpp`. * Updated header files to include `extern "C"`. * Added a few more C-styled casts. * Fail build if hook struct is not implemented for arch. * Misc formatting.
- Loading branch information
1 parent
a12ec5d
commit 38f24ca
Showing
16 changed files
with
116 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
#ifndef XTRACE_BSD_TRACE | ||
#define XTRACE_BSD_TRACE | ||
|
||
#include "base.h" | ||
|
||
XTRACE_DECLARATIONS_C_BEGIN | ||
|
||
extern void xtrace_print_string_literal(const char* str); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
XTRACE_DECLARATIONS_C_END | ||
|
||
#endif // XTRACE_BSD_TRACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
#ifndef XTRACE_MACH_TRACE | ||
#define XTRACE_MACH_TRACE | ||
|
||
#include "base.h" | ||
|
||
XTRACE_DECLARATIONS_C_BEGIN | ||
|
||
const char* xtrace_msg_type_to_str(mach_msg_type_name_t type_name, int full); | ||
void xtrace_print_kern_return(kern_return_t kr); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
XTRACE_DECLARATIONS_C_END | ||
|
||
#endif // XTRACE_MACH_TRACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#ifndef XTRACE_MIG_TRACE | ||
#define XTRACE_MIG_TRACE | ||
|
||
#include <mach/message.h> | ||
#include "base.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
XTRACE_DECLARATIONS_C_BEGIN | ||
|
||
void xtrace_setup_mig_tracing(void); | ||
void xtrace_print_mig_message(const mach_msg_header_t* message, mach_port_name_t request_port); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
XTRACE_DECLARATIONS_C_END | ||
|
||
#endif // XTRACE_MIG_TRACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.