mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
binfile: ignore vdso bytes if not on Linux
Of course, this all needs improvements to be realistically useful, but it allows us to get things at least opening. We can adjust how we store that data to make it available on other OS's later.
This commit is contained in:
@ -300,6 +300,7 @@ get_lines (const char *format,
|
||||
static const uint8_t *
|
||||
get_vdso_bytes (size_t *length)
|
||||
{
|
||||
#ifdef __linux__
|
||||
static const uint8_t *bytes = NULL;
|
||||
static size_t n_bytes = 0;
|
||||
static gboolean has_data;
|
||||
@ -343,6 +344,11 @@ get_vdso_bytes (size_t *length)
|
||||
*length = n_bytes;
|
||||
|
||||
return bytes;
|
||||
#else
|
||||
if (length)
|
||||
*length = 0;
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
bin_file_t *
|
||||
|
||||
Reference in New Issue
Block a user