X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fdebug-mono-symfile.c;h=f456a8e0a45acf01f07b7c7117d2a68d756eb5e0;hb=3478b0aa86b50db14d8cd90bf19dae27f5df100b;hp=8df4c0f902606edc04b31b5b97cb1350b851482d;hpb=60e1beca4a884cf219670c0822994263a52309e4;p=mono.git diff --git a/mono/metadata/debug-mono-symfile.c b/mono/metadata/debug-mono-symfile.c index 8df4c0f9026..f456a8e0a45 100644 --- a/mono/metadata/debug-mono-symfile.c +++ b/mono/metadata/debug-mono-symfile.c @@ -1,11 +1,14 @@ -/* - * debug-mono-symfile.c: +/** + * \file + * + * Support for reading debug info from .mdb files. * * Author: * Mono Project (http://www.mono-project.com) * * Copyright (C) 2005-2008 Novell, Inc. (http://www.novell.com) * Copyright 2012 Xamarin Inc (http://www.xamarin.com) + * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ #include @@ -25,13 +28,14 @@ #include #include #include -#include #include #include #include #include #include +#ifndef DISABLE_MDB + #include #ifdef HAVE_UNISTD_H #include @@ -212,7 +216,6 @@ mono_debug_symfile_is_loaded (MonoSymbolFile *symfile) return symfile && symfile->offset_table; } - static int read_leb128 (const uint8_t *ptr, const uint8_t **rptr) { @@ -296,13 +299,12 @@ check_line (StatementMachine *stm, int offset, MonoDebugSourceLocation **locatio /** * mono_debug_symfile_lookup_location: - * @minfo: A `MonoDebugMethodInfo' which can be retrieved by - * mono_debug_lookup_method(). - * @offset: IL offset within the corresponding method's CIL code. + * \param minfo A \c MonoDebugMethodInfo which can be retrieved by mono_debug_lookup_method(). + * \param offset IL offset within the corresponding method's CIL code. * * This function is similar to mono_debug_lookup_location(), but we * already looked up the method and also already did the - * `native address -> IL offset' mapping. + * native address -> IL offset mapping. */ MonoDebugSourceLocation * mono_debug_symfile_lookup_location (MonoDebugMethodInfo *minfo, uint32_t offset) @@ -430,7 +432,7 @@ add_line (StatementMachine *stm, GPtrArray *il_offset_array, GPtrArray *line_num * mono_debug_symfile_lookup_location */ void -mono_debug_symfile_free_location (MonoDebugSourceLocation *location) +mono_debug_symfile_free_location (MonoDebugSourceLocation *location) { g_free (location->source_file); g_free (location); @@ -648,11 +650,6 @@ mono_debug_symfile_get_seq_points (MonoDebugMethodInfo *minfo, char **source_fil if (source_files) (*source_files) [i] = (*source_file_list)->len - 1; } - if ((*source_file_list)->len == 0 && stm.file) { - MonoDebugSourceInfo *info = get_source_info (symfile, stm.file); - - g_ptr_array_add (*source_file_list, info); - } } if (n_seq_points) { @@ -834,3 +831,54 @@ mono_debug_symfile_lookup_locals (MonoDebugMethodInfo *minfo) return res; } + +#else /* DISABLE_MDB */ + +MonoSymbolFile * +mono_debug_open_mono_symbols (MonoDebugHandle *handle, const uint8_t *raw_contents, + int size, gboolean in_the_debugger) +{ + return NULL; +} + +void +mono_debug_close_mono_symbol_file (MonoSymbolFile *symfile) +{ +} + +mono_bool +mono_debug_symfile_is_loaded (MonoSymbolFile *symfile) +{ + return FALSE; +} + +MonoDebugMethodInfo * +mono_debug_symfile_lookup_method (MonoDebugHandle *handle, MonoMethod *method) +{ + return NULL; +} + +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) +{ + g_assert_not_reached (); +} + +MonoDebugSourceLocation * +mono_debug_symfile_lookup_location (MonoDebugMethodInfo *minfo, uint32_t offset) +{ + return NULL; +} + +MonoDebugLocalsInfo* +mono_debug_symfile_lookup_locals (MonoDebugMethodInfo *minfo) +{ + return NULL; +} + +void +mono_debug_symfile_free_location (MonoDebugSourceLocation *location) +{ +} + +#endif