diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2019-02-22 23:25:02 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-02-23 00:27:59 +0100 |
commit | 353d3d77f4fdd1582e3b60824deebca27c7b2790 (patch) | |
tree | f5d5aa0bd3da34c5266fdc4e9b4a67573903eca5 /trace2.h | |
parent | trace2: create new combined trace facility (diff) | |
download | git-353d3d77f4fdd1582e3b60824deebca27c7b2790.tar.xz git-353d3d77f4fdd1582e3b60824deebca27c7b2790.zip |
trace2: collect Windows-specific process information
Add platform-specific interface to log information about the current
process.
On Windows, this interface is used to indicate whether the git process
is running under a debugger and list names of the process ancestors.
Information for other platforms is left for a future effort.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace2.h')
-rw-r--r-- | trace2.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -368,4 +368,18 @@ void trace2_printf(const char *fmt, ...); /* clang-format on */ #endif +/* + * Optional platform-specific code to dump information about the + * current and any parent process(es). This is intended to allow + * post-processors to know who spawned this git instance and anything + * else the platform may be able to tell us about the current process. + */ +#if defined(GIT_WINDOWS_NATIVE) +void trace2_collect_process_info(void); +#else +#define trace2_collect_process_info() \ + do { \ + } while (0) +#endif + #endif /* TRACE2_H */ |