[runtime] Cleanup the debugger header files. (#4459)
authorZoltan Varga <vargaz@gmail.com>
Thu, 2 Mar 2017 11:22:06 +0000 (06:22 -0500)
committerGitHub <noreply@github.com>
Thu, 2 Mar 2017 11:22:06 +0000 (06:22 -0500)
* Rename debug-mono-debugger.h to debug-internals.h.
* Move the internal debug structures to debug-internals.h from debug-mono-symfile.h.

26 files changed:
mono/metadata/Makefile.am
mono/metadata/appdomain.c
mono/metadata/debug-internals.h [new file with mode: 0644]
mono/metadata/debug-mono-ppdb.c
mono/metadata/debug-mono-symfile.c
mono/metadata/debug-mono-symfile.h
mono/metadata/domain.c
mono/metadata/jit-info.c
mono/metadata/mono-debug-debugger.h [deleted file]
mono/metadata/mono-debug.c
mono/metadata/object.c
mono/metadata/profiler.c
mono/metadata/threads.c
mono/mini/debug-mini.c
mono/mini/debugger-agent.c
mono/mini/dwarfwriter.c
mono/mini/dwarfwriter.h
mono/mini/lldb.c
mono/mini/method-to-ir.c
mono/mini/mini-amd64-gsharedvt.c
mono/mini/mini-llvm.c
mono/mini/tramp-amd64-gsharedvt.c
mono/mini/tramp-amd64.c
mono/mini/tramp-ia64.c
mono/mini/tramp-x86.c
mono/profiler/mono-profiler-vtune.c

index 751eabbb1b613b8020795eb57541ebf53b2aee99..246eec3b68c4605605751b6ac8490decd568b380 100644 (file)
@@ -189,7 +189,7 @@ common_sources = \
        mono-config.c           \
        mono-debug.h            \
        mono-debug.c            \
-       mono-debug-debugger.h   \
+       debug-internals.h       \
        mono-endian.c           \
        mono-endian.h           \
        mono-hash.h             \
index 312c66a115669aaeee76b7b2e89e36a648c2b07b..cfc917660e2034ac87d8e2c5f742248fabc86a6a 100644 (file)
@@ -49,7 +49,6 @@
 #include <mono/metadata/marshal-internals.h>
 #include <mono/metadata/monitor.h>
 #include <mono/metadata/mono-debug.h>
-#include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/attach.h>
 #include <mono/metadata/w32file.h>
 #include <mono/metadata/lock-tracer.h>
diff --git a/mono/metadata/debug-internals.h b/mono/metadata/debug-internals.h
new file mode 100644 (file)
index 0000000..1d5e33c
--- /dev/null
@@ -0,0 +1,87 @@
+#ifndef __DEBUG_INTERNALS_H__
+#define __DEBUG_INTERNALS_H__
+
+#include <glib.h>
+#include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/mono-debug.h>
+#include <mono/utils/mono-compiler.h>
+
+struct _MonoDebugMethodInfo {
+       MonoMethod *method;
+       MonoDebugHandle *handle;
+       uint32_t index;
+       uint32_t data_offset;
+       uint32_t lnt_offset;
+};
+
+typedef struct {
+       int parent;
+       int type;
+       /* IL offsets */
+       int start_offset, end_offset;
+} MonoDebugCodeBlock;
+
+typedef struct {
+       char *name;
+       int index;
+       /* Might be null for the main scope */
+       MonoDebugCodeBlock *block;
+} MonoDebugLocalVar;
+
+/*
+ * Information about local variables retrieved from a symbol file.
+ */
+struct _MonoDebugLocalsInfo {
+       int num_locals;
+       MonoDebugLocalVar *locals;
+       int num_blocks;
+       MonoDebugCodeBlock *code_blocks;
+};
+
+/*
+* Information about method await yield and resume offsets retrieved from a symbol file.
+*/
+struct _MonoDebugMethodAsyncInfo {
+       uint32_t catch_handler_offset;
+       int num_awaits;
+       uint32_t *yield_offsets;
+       uint32_t *resume_offsets;
+       uint32_t *move_next_method_token;
+};
+
+struct _MonoDebugLineNumberEntry {
+       uint32_t il_offset;
+       uint32_t native_offset;
+};
+
+/*
+ * Information about a source file retrieved from a symbol file.
+ */
+typedef struct {
+       char *source_file;
+       /* 16 byte long */
+       guint8 *guid, *hash;
+} MonoDebugSourceInfo;
+
+typedef struct {
+       int il_offset;
+       int line, column;
+       int end_line, end_column;
+} MonoSymSeqPoint;
+
+void            mono_debugger_lock                          (void);
+void            mono_debugger_unlock                        (void);
+
+void
+mono_debug_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrArray **source_file_list, int **source_files, MonoSymSeqPoint **seq_points, int *n_seq_points);
+
+MONO_API void
+mono_debug_free_locals (MonoDebugLocalsInfo *info);
+
+void
+mono_debug_free_method_async_debug_info (MonoDebugMethodAsyncInfo *info);
+
+gboolean
+mono_debug_image_has_debug_info (MonoImage *image);
+
+#endif /* __DEBUG_INTERNALS_H__ */
index b96edfdf697335faa77ecaaffe39041cd02f315e..ba39e5224c4a31f89e9a86fe5fdb0b6906075a03 100644 (file)
@@ -20,8 +20,7 @@
 #include <mono/metadata/tokentype.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/mono-debug.h>
-#include <mono/metadata/debug-mono-symfile.h>
-#include <mono/metadata/mono-debug-debugger.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/metadata/mono-endian.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/class-internals.h>
index d9b5de92e8a998b61dcf6d0caaa047bf1d70a713..709c8f278d41352dddd98cd89c08d7b542e0e099 100644 (file)
@@ -28,7 +28,6 @@
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/mono-debug.h>
 #include <mono/metadata/debug-mono-symfile.h>
-#include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/mono-endian.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/class-internals.h>
index bd8252843e5dda15f1221e99a6f2b0ab3e3308b3..2f6020189104161a7f121f64d323fb433c0d23fc 100644 (file)
@@ -12,6 +12,7 @@
 #include <mono/metadata/class.h>
 #include <mono/metadata/reflection.h>
 #include <mono/metadata/mono-debug.h>
+#include <mono/metadata/debug-internals.h>
 
 typedef struct MonoSymbolFileOffsetTable       MonoSymbolFileOffsetTable;
 typedef struct MonoSymbolFileLineNumberEntry   MonoSymbolFileLineNumberEntry;
@@ -71,69 +72,6 @@ struct MonoSymbolFileMethodAddress {
        uint8_t data [MONO_ZERO_LEN_ARRAY];
 };
 
-struct _MonoDebugMethodInfo {
-       MonoMethod *method;
-       MonoDebugHandle *handle;
-       uint32_t index;
-       uint32_t data_offset;
-       uint32_t lnt_offset;
-};
-
-typedef struct {
-       int parent;
-       int type;
-       /* IL offsets */
-       int start_offset, end_offset;
-} MonoDebugCodeBlock;
-
-typedef struct {
-       char *name;
-       int index;
-       /* Might be null for the main scope */
-       MonoDebugCodeBlock *block;
-} MonoDebugLocalVar;
-
-/*
- * Information about local variables retrieved from a symbol file.
- */
-struct _MonoDebugLocalsInfo {
-       int num_locals;
-       MonoDebugLocalVar *locals;
-       int num_blocks;
-       MonoDebugCodeBlock *code_blocks;
-};
-
-/*
-* Information about method await yield and resume offsets retrieved from a symbol file.
-*/
-struct _MonoDebugMethodAsyncInfo {
-       uint32_t catch_handler_offset;
-       int num_awaits;
-       uint32_t *yield_offsets;
-       uint32_t *resume_offsets;
-       uint32_t *move_next_method_token;
-};
-
-struct _MonoDebugLineNumberEntry {
-       uint32_t il_offset;
-       uint32_t native_offset;
-};
-
-/*
- * Information about a source file retrieved from a symbol file.
- */
-typedef struct {
-       char *source_file;
-       /* 16 byte long */
-       guint8 *guid, *hash;
-} MonoDebugSourceInfo;
-
-typedef struct {
-       int il_offset;
-       int line, column;
-       int end_line, end_column;
-} MonoSymSeqPoint;
-
 #define MONO_SYMBOL_FILE_MAJOR_VERSION         50
 #define MONO_SYMBOL_FILE_MINOR_VERSION         0
 #define MONO_SYMBOL_FILE_MAGIC                 0x45e82623fd7fa614ULL
@@ -169,9 +107,6 @@ mono_debug_symfile_lookup_locals (MonoDebugMethodInfo *minfo);
 void
 mono_debug_symfile_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrArray **source_file_list, int **source_files, MonoSymSeqPoint **seq_points, int *n_seq_points);
 
-gboolean
-mono_debug_image_has_debug_info (MonoImage *image);
-
 MONO_END_DECLS
 
 #endif /* __MONO_SYMFILE_H__ */
index 0785369e0c65662c1e35da8696d3ab2ecf47789c..db2ccd592fccaf2c99c51c27ed19f1afd5730ebc 100644 (file)
 #include <mono/metadata/object-internals.h>
 #include <mono/metadata/domain-internals.h>
 #include <mono/metadata/class-internals.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/exception.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/appdomain.h>
-#include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/mono-config.h>
 #include <mono/metadata/threads-types.h>
 #include <mono/metadata/runtime.h>
index efbb373197f0db84c8b91517ced171c10f621bbf..5761a8a00e35875b2174e07923a1fe7c96f4a3f3 100644 (file)
@@ -35,7 +35,7 @@
 #include <mono/metadata/exception.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/appdomain.h>
-#include <mono/metadata/mono-debug-debugger.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/metadata/mono-config.h>
 #include <mono/metadata/threads-types.h>
 #include <mono/metadata/runtime.h>
diff --git a/mono/metadata/mono-debug-debugger.h b/mono/metadata/mono-debug-debugger.h
deleted file mode 100644 (file)
index 740b2db..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __MONO_DEBUG_DEBUGGER_H__
-#define __MONO_DEBUG_DEBUGGER_H__
-
-#include <mono/metadata/debug-helpers.h>
-#include <mono/metadata/debug-mono-symfile.h>
-#include <mono/utils/mono-compiler.h>
-
-void            mono_debugger_lock                          (void);
-void            mono_debugger_unlock                        (void);
-
-void
-mono_debug_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrArray **source_file_list, int **source_files, MonoSymSeqPoint **seq_points, int *n_seq_points);
-
-MONO_API void
-mono_debug_free_locals (MonoDebugLocalsInfo *info);
-
-void
-mono_debug_free_method_async_debug_info (MonoDebugMethodAsyncInfo *info);
-
-#endif /* __MONO_DEBUG_DEBUGGER_H__ */
index 2eba05b36fa7d16178603afd22dfe74d678f09d0..50b10a9280abadc87b43d739e4c6ae9fb28e83a4 100644 (file)
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/class-internals.h>
 #include <mono/metadata/mono-debug.h>
-#include <mono/metadata/mono-debug-debugger.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/metadata/mono-endian.h>
 #include <mono/metadata/gc-internals.h>
 #include <mono/metadata/mempool.h>
+#include <mono/metadata/debug-mono-symfile.h>
 #include <mono/metadata/debug-mono-ppdb.h>
 #include <mono/metadata/exception-internals.h>
 #include <mono/metadata/runtime.h>
index b3ce33d12642a64502897a015d4184896039593e..418cc818ca920170eb63a55b34fd3a9fc9843c15 100644 (file)
@@ -36,7 +36,6 @@
 #include <mono/metadata/environment.h>
 #include "mono/metadata/profiler-private.h"
 #include "mono/metadata/security-manager.h"
-#include "mono/metadata/mono-debug-debugger.h"
 #include <mono/metadata/verify-internals.h>
 #include <mono/metadata/reflection-internals.h>
 #include <mono/metadata/w32event.h>
index 5902d17378a1e47726cc60166c258926bb6816c2..ec29d9d45d29033772aadeb58cb86168e5b550c1 100644 (file)
@@ -16,7 +16,7 @@
 #include "mono/metadata/assembly.h"
 #include "mono/metadata/debug-helpers.h"
 #include "mono/metadata/mono-debug.h"
-#include "mono/metadata/debug-mono-symfile.h"
+#include "mono/metadata/debug-internals.h"
 #include "mono/metadata/metadata-internals.h"
 #include "mono/metadata/class-internals.h"
 #include "mono/metadata/domain-internals.h"
index 238abb9504cb949f0d247daefa9d7dca32bbc40d..5269045c16e9452d8a3ddec6ad33386b40bffa54 100644 (file)
@@ -29,7 +29,7 @@
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/runtime.h>
 #include <mono/metadata/object-internals.h>
-#include <mono/metadata/mono-debug-debugger.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/utils/monobitset.h>
 #include <mono/utils/mono-compiler.h>
 #include <mono/utils/mono-mmap.h>
index 68780e5056a42385db381f00e4d43dfd995403cb..4dc68f255c0deaa30497fd0b808996d5dad126f2 100644 (file)
@@ -16,7 +16,7 @@
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/threads-types.h>
 
-#include <mono/metadata/mono-debug-debugger.h>
+#include <mono/metadata/debug-internals.h>
 
 #include <mono/utils/valgrind.h>
 
index ed1b7a14a7f3f502ef5708be026901355408022f..088bfceea8261377c8423eefc3dabb1f6c94a573 100644 (file)
@@ -53,8 +53,7 @@
 #endif
 
 #include <mono/metadata/mono-debug.h>
-#include <mono/metadata/mono-debug-debugger.h>
-#include <mono/metadata/debug-mono-symfile.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/metadata/gc-internals.h>
 #include <mono/metadata/environment.h>
 #include <mono/metadata/threads-types.h>
index 5aacab1c440f8bba6cfbc9313530ab57db01ef41..773ea4924b3af98d143e59f141dd958cd2b0affd 100644 (file)
@@ -21,7 +21,7 @@
 #endif
 
 #include <mono/metadata/mono-endian.h>
-#include <mono/metadata/mono-debug-debugger.h>
+#include <mono/metadata/debug-internals.h>
 
 #ifndef HOST_WIN32
 #include <mono/utils/freebsd-elf32.h>
index 83d6a1c16d5391e673984b8fdf4a3e5514edf5b9..f157e16d69503eed80fbd7ab9859da1e600effa0 100644 (file)
@@ -14,7 +14,7 @@
 #include "image-writer.h"
 #include "mini.h"
 
-#include <mono/metadata/debug-mono-symfile.h>
+#include <mono/metadata/debug-internals.h>
 
 #include <glib.h>
 
index 6ff4ef6cc09108ae31d0e74d227f57cab0f8b655..360fbfbb67d80d1fedcf697645430f907a2befee 100644 (file)
@@ -12,9 +12,7 @@
 #include "lldb.h"
 #include "seq-points.h"
 
-#include <mono/metadata/mono-debug.h>
-#include <mono/metadata/mono-debug-debugger.h>
-#include <mono/metadata/debug-mono-symfile.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/utils/mono-counters.h>
 
 #if !defined(DISABLE_JIT) && !defined(DISABLE_LLDB)
index 5982e0c200851a771b00e243d5a71586c450c074..f80eb84d2b11952e847f296f0307636cb67c2716 100644 (file)
@@ -50,8 +50,7 @@
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/debug-helpers.h>
-#include <mono/metadata/mono-debug.h>
-#include <mono/metadata/mono-debug-debugger.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/metadata/gc-internals.h>
 #include <mono/metadata/security-manager.h>
 #include <mono/metadata/threads-types.h>
@@ -59,7 +58,6 @@
 #include <mono/metadata/profiler-private.h>
 #include <mono/metadata/profiler.h>
 #include <mono/metadata/monitor.h>
-#include <mono/metadata/debug-mono-symfile.h>
 #include <mono/utils/mono-memory-model.h>
 #include <mono/utils/mono-error-internals.h>
 #include <mono/metadata/mono-basic-block.h>
index 6a4e7af9d4485ea1894c08f45c9421519744cc12..c4518da3deda497facfea4dd426603893915f970 100644 (file)
@@ -17,7 +17,6 @@
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
-#include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/profiler-private.h>
 #include <mono/metadata/gc-internals.h>
 #include <mono/arch/amd64/amd64-codegen.h>
index 46ddd5085bb8b100760c3482d21b637ded685a06..3fb5dfce0117b9e7df33932b2fa3a7de384465fd 100644 (file)
@@ -9,7 +9,7 @@
 #include "config.h"
 
 #include <mono/metadata/debug-helpers.h>
-#include <mono/metadata/debug-mono-symfile.h>
+#include <mono/metadata/debug-internals.h>
 #include <mono/metadata/mempool-internals.h>
 #include <mono/metadata/environment.h>
 #include <mono/metadata/object-internals.h>
@@ -9020,7 +9020,7 @@ emit_dbg_subprogram (EmitContext *ctx, MonoCompile *cfg, LLVMValueRef method, co
        if (!minfo)
                return NULL;
 
-       mono_debug_symfile_get_seq_points (minfo, &source_file, NULL, NULL, &sym_seq_points, &n_seq_points);
+       mono_debug_get_seq_points (minfo, &source_file, NULL, NULL, &sym_seq_points, &n_seq_points);
        if (!source_file)
                source_file = g_strdup ("<unknown>");
        dir = g_path_get_dirname (source_file);
index 0c986f14e7b8b7655ad2f16abd636e19197b0963..96d1e71adad3a8a7d874731d0493da317bbdb6d3 100644 (file)
@@ -17,7 +17,6 @@
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
-#include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/profiler-private.h>
 #include <mono/metadata/gc-internals.h>
 #include <mono/arch/amd64/amd64-codegen.h>
@@ -483,4 +482,4 @@ mono_amd64_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpoi
        return NULL;
 }
 
-#endif
\ No newline at end of file
+#endif
index b2b7a7fc5fd556eb43ea7c2332876cba6446856e..92a3788d6ab05a04880cdc8fcb332eea0edda275 100644 (file)
@@ -18,7 +18,6 @@
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
-#include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/profiler-private.h>
 #include <mono/metadata/gc-internals.h>
 #include <mono/arch/amd64/amd64-codegen.h>
index d21ab21e17188c5cbb20c1ef74544bbb1cf80117..48338e3f757c96cdb385771aba5d2fbd97ba0478 100644 (file)
@@ -13,7 +13,6 @@
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
-#include <mono/metadata/mono-debug-debugger.h>
 #include <mono/arch/ia64/ia64-codegen.h>
 
 #include "mini.h"
index d0c778421d3ef278277ec627d0ead7e4264f1bfb..eac0f3141335a7a7f08152dfe6080e3c76151dac 100644 (file)
@@ -15,8 +15,6 @@
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/marshal.h>
 #include <mono/metadata/tabledefs.h>
-#include <mono/metadata/mono-debug.h>
-#include <mono/metadata/mono-debug-debugger.h>
 #include <mono/metadata/profiler-private.h>
 #include <mono/metadata/gc-internals.h>
 #include <mono/arch/x86/x86-codegen.h>
index 78de58aaa08de08e66e16439a294f494979335c5..2ed52c541fda284f3e81b05fa0e6f81dde8a3e6c 100644 (file)
@@ -31,7 +31,7 @@
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/mono-debug.h>
-#include <mono/metadata/debug-mono-symfile.h>
+#include <mono/metadata/debug-internals.h>
 #include <string.h>
 #include <glib.h>