File: thread-db.h

package info (click to toggle)
mono-debugger 0.60%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,556 kB
  • ctags: 22,787
  • sloc: ansic: 99,407; cs: 42,429; sh: 9,192; makefile: 376
file content (41 lines) | stat: -rw-r--r-- 1,193 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef __MONO_DEBUGGER_THREAD_DB_H__
#define __MONO_DEBUGGER_THREAD_DB_H__

#include <server.h>
#include <pthread.h>
#include <thread_db.h>
#include "linux-proc-service.h"

G_BEGIN_DECLS

/* C# delegates. */
typedef ps_err_e (*GlobalLookupFunc) (const char *object_name, const char *sym_name, guint64 *addr);
typedef ps_err_e (*ReadMemoryFunc) (guint64 address, void *buffer, guint32 size);
typedef ps_err_e (*WriteMemoryFunc) (guint64 address, const void *buffer, guint32 size);

typedef gboolean (*IterateOverThreadsFunc) (const td_thrhandle_t *th);

typedef struct ps_prochandle {
	td_thragent_t *thread_agent;
	GlobalLookupFunc global_lookup;
	ReadMemoryFunc read_memory;
	WriteMemoryFunc write_memory;
} ThreadDbHandle;

ThreadDbHandle *
mono_debugger_thread_db_init (GlobalLookupFunc global_lookup,
			      ReadMemoryFunc read_memory, WriteMemoryFunc write_memory);

void
mono_debugger_thread_db_destroy (ThreadDbHandle *handle);

gboolean
mono_debugger_thread_db_get_thread_info (const td_thrhandle_t *th, guint64 *tid, guint64 *tls,
					 guint64 *lwp);

gboolean
mono_debugger_thread_db_iterate_over_threads (ThreadDbHandle *handle, IterateOverThreadsFunc cb);

G_END_DECLS

#endif