diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-11-27 16:01:14 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2007-11-27 16:01:14 +0000 |
commit | 5df40e280d3cbdf9e8b118c8451154d71b4b6872 (patch) | |
tree | 36688e976319fd1cdc84263524430729081ddc57 /src/frames.h | |
parent | 5ca9dbee35cc5f05c8e4abe96bda76e9143f6b2d (diff) |
Save a hash lookup.
Return the Frame instead of looking up the function names individually.
Diffstat (limited to 'src/frames.h')
-rw-r--r-- | src/frames.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/frames.h b/src/frames.h new file mode 100644 index 0000000..12bb52e --- /dev/null +++ b/src/frames.h @@ -0,0 +1,59 @@ +#ifndef FRAMES_H +#define FRAMES_H + +G_BEGIN_DECLS + +typedef struct _frame { + guint ip; + const gchar *function; + const gchar *object; + const gchar *file; + const gchar *directory; + gint line; + gchar *function_srcloc; + gboolean is_alloc_fn; + guint alloc_fns_serial; +} Frame; + +void +frames_add (Frames *frames, + guint ip, + const gchar *function, + const gchar *object, + const gchar *file, + const gchar *directory, + gint line); +gboolean +frames_has_ip (Frames *frames, guint ip); + +gboolean +frames_is_alloc_fn (Frames *frames, guint ip); + +Frame * +frames_get (Frames *frames, guint ip); + +const gchar * +frames_get_function (Frames *frames, guint ip); + +const gchar * +frames_get_function_with_srcloc (Frames *frames, guint ip); + +gchar * +frames_get_source_path (Frames *frames, guint ip); + +gboolean +frames_add_alloc_fn (Frames *frames, const gchar *pattern, GError **error); + +guint +frames_get_alloc_fns_serial (Frames *frames); + +Frames * +frames_create (void); + +void +frames_destroy (Frames *frames); + + +G_END_DECLS + +#endif /* FRAMES */ |