tree: start on massive tree refactor

The big thing going on here is that we are going to split up the libraries
a bit better, and remove GObject from the capture library. The libsysprof
library will bring in the capture library statically, so we can export the
symbols we want.

Eventually, we will bump the version to sysprof-3, but not yet.
This commit is contained in:
Christian Hergert
2019-05-07 20:52:05 -07:00
parent 5323cffdb3
commit 1708ad1b48
193 changed files with 1400 additions and 1136 deletions

34
src/tests/test-kallsyms.c Normal file
View File

@ -0,0 +1,34 @@
#include "../shared/sp-address.h"
#include "../shared/sp-kallsyms.h"
#include <glib.h>
#include <stdlib.h>
int
main (gint argc,
gchar *argv[])
{
g_autoptr(SpKallsyms) kallsyms = NULL;
const gchar *name;
SpAddress addr = 0;
guint8 type;
if (argc < 2)
{
g_printerr ("usage: %s FILE\n", argv[0]);
return EXIT_FAILURE;
}
kallsyms = sp_kallsyms_new (argv[1]);
while (sp_kallsyms_next (kallsyms, &name, &addr, &type))
{
g_assert (name != NULL);
g_assert (addr != 0);
g_assert (type != 0);
g_print ("%s %"G_GUINT64_FORMAT"x\n", name, addr);
}
return EXIT_SUCCESS;
}