projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[msbuild] Install a `deniedAssembliesList.txt` to support denied ... (#5358)
[mono.git]
/
mono
/
metadata
/
image.c
diff --git
a/mono/metadata/image.c
b/mono/metadata/image.c
index b43c891041131b585956f058245e56fcebf54c9b..5c952efa4ac27f5d8ad2943c8a3a382781f58567 100644
(file)
--- a/
mono/metadata/image.c
+++ b/
mono/metadata/image.c
@@
-200,14
+200,14
@@
mono_cli_rva_image_map (MonoImage *image, guint32 addr)
}
/**
}
/**
- * mono_image
s
_rva_map:
- *
@image: a
MonoImage
- *
@addr:
relative virtual address (RVA)
+ * mono_image_rva_map:
+ *
\param image a \c
MonoImage
+ *
\param addr
relative virtual address (RVA)
*
* This is a low-level routine used by the runtime to map relative
* virtual address (RVA) into their location in memory.
*
*
* This is a low-level routine used by the runtime to map relative
* virtual address (RVA) into their location in memory.
*
- *
Returns:
the address in memory for the given RVA, or NULL if the
+ *
\returns
the address in memory for the given RVA, or NULL if the
* RVA is not valid for this image.
*/
char *
* RVA is not valid for this image.
*/
char *
@@
-256,7
+256,7
@@
mono_images_init (void)
for(hash_idx = 0; hash_idx < IMAGES_HASH_COUNT; hash_idx++)
loaded_images_hashes [hash_idx] = g_hash_table_new (g_str_hash, g_str_equal);
for(hash_idx = 0; hash_idx < IMAGES_HASH_COUNT; hash_idx++)
loaded_images_hashes [hash_idx] = g_hash_table_new (g_str_hash, g_str_equal);
- debug_assembly_unload = g_
getenv ("MONO_DEBUG_ASSEMBLY_UNLOAD") != NULL
;
+ debug_assembly_unload = g_
hasenv ("MONO_DEBUG_ASSEMBLY_UNLOAD")
;
install_pe_loader ();
install_pe_loader ();
@@
-291,13
+291,13
@@
mono_images_cleanup (void)
/**
* mono_image_ensure_section_idx:
/**
* mono_image_ensure_section_idx:
- *
@image:
The image we are operating on
- *
@section:
section number that we will load/map into memory
+ *
\param image
The image we are operating on
+ *
\param section
section number that we will load/map into memory
*
* This routine makes sure that we have an in-memory copy of
*
* This routine makes sure that we have an in-memory copy of
- * an image section (
.text, .rsrc, .data
).
+ * an image section (
<code>.text</code>, <code>.rsrc</code>, <code>.data</code>
).
*
*
- *
Returns:
TRUE on success
+ *
\returns
TRUE on success
*/
int
mono_image_ensure_section_idx (MonoImage *image, int section)
*/
int
mono_image_ensure_section_idx (MonoImage *image, int section)
@@
-326,13
+326,13
@@
mono_image_ensure_section_idx (MonoImage *image, int section)
/**
* mono_image_ensure_section:
/**
* mono_image_ensure_section:
- *
@image:
The image we are operating on
- *
@section:
section name that we will load/map into memory
+ *
\param image
The image we are operating on
+ *
\param section
section name that we will load/map into memory
*
* This routine makes sure that we have an in-memory copy of
* an image section (.text, .rsrc, .data).
*
*
* This routine makes sure that we have an in-memory copy of
* an image section (.text, .rsrc, .data).
*
- *
Returns:
TRUE on success
+ *
\returns
TRUE on success
*/
int
mono_image_ensure_section (MonoImage *image, const char *section)
*/
int
mono_image_ensure_section (MonoImage *image, const char *section)
@@
-759,6
+759,9
@@
mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error)
return image->modules [idx - 1];
}
return image->modules [idx - 1];
}
+/**
+ * mono_image_load_module:
+ */
MonoImage*
mono_image_load_module (MonoImage *image, int idx)
{
MonoImage*
mono_image_load_module (MonoImage *image, int idx)
{
@@
-784,6
+787,9
@@
class_next_value (gpointer value)
return (gpointer*)&klass->next_class_cache;
}
return (gpointer*)&klass->next_class_cache;
}
+/**
+ * mono_image_init:
+ */
void
mono_image_init (MonoImage *image)
{
void
mono_image_init (MonoImage *image)
{
@@
-797,7
+803,7
@@
mono_image_init (MonoImage *image)
class_next_value);
image->field_cache = mono_conc_hashtable_new (NULL, NULL);
class_next_value);
image->field_cache = mono_conc_hashtable_new (NULL, NULL);
- image->typespec_cache =
g_hash_
table_new (NULL, NULL);
+ image->typespec_cache =
mono_conc_hash
table_new (NULL, NULL);
image->memberref_signatures = g_hash_table_new (NULL, NULL);
image->helper_signatures = g_hash_table_new (g_str_hash, g_str_equal);
image->method_signatures = g_hash_table_new (NULL, NULL);
image->memberref_signatures = g_hash_table_new (NULL, NULL);
image->helper_signatures = g_hash_table_new (g_str_hash, g_str_equal);
image->method_signatures = g_hash_table_new (NULL, NULL);
@@
-1107,6
+1113,11
@@
Right now the list of nugets are the ones that provide the assemblies in $ignore
This is to be removed once a proper fix is shipped through nuget.
This is to be removed once a proper fix is shipped through nuget.
+Please keep this in sync with mcs/tools/xbuild/data/deniedAssembliesList.txt
+If any assemblies are added/removed, then this should be regenerated with:
+
+ $ mono tools/nuget-hash-extractor/nuget-hash-extractor.exe nugets guids_for_msbuild > mcs/tools/xbuild/data/deniedAssembliesList.txt
+
*/
typedef enum {
*/
typedef enum {
@@
-1116,7
+1127,7
@@
typedef enum {
SYS_NET_HTTP = 3, //System.Net.Http
SYS_TEXT_ENC_CODEPAGES = 4, //System.Text.Encoding.CodePages
SYS_REF_DISP_PROXY = 5, //System.Reflection.DispatchProxy
SYS_NET_HTTP = 3, //System.Net.Http
SYS_TEXT_ENC_CODEPAGES = 4, //System.Text.Encoding.CodePages
SYS_REF_DISP_PROXY = 5, //System.Reflection.DispatchProxy
- SYS_
VALUE_TUPLE = 6, //System.ValueTuple
+ SYS_
THREADING_OVERLAPPED = 6, //System.Threading.Overlapped
} IgnoredAssemblyNames;
typedef struct {
} IgnoredAssemblyNames;
typedef struct {
@@
-1137,7
+1148,7
@@
const char *ignored_assemblies_file_names[] = {
"System.Net.Http.dll",
"System.Text.Encoding.CodePages.dll",
"System.Reflection.DispatchProxy.dll",
"System.Net.Http.dll",
"System.Text.Encoding.CodePages.dll",
"System.Reflection.DispatchProxy.dll",
- "System.
ValueTuple
.dll"
+ "System.
Threading.Overlapped
.dll"
};
#define IGNORED_ASSEMBLY(HASH, NAME, GUID, VER_STR) { .hash = HASH, .assembly_name = NAME, .guid = GUID }
};
#define IGNORED_ASSEMBLY(HASH, NAME, GUID, VER_STR) { .hash = HASH, .assembly_name = NAME, .guid = GUID }
@@
-1151,6
+1162,8
@@
static const IgnoredAssembly ignored_assemblies [] = {
IGNORED_ASSEMBLY (0x27726A90, SYS_NET_HTTP, "269B562C-CC15-4736-B1B1-68D4A43CAA98", "4.1.0 net46"),
IGNORED_ASSEMBLY (0x10CADA75, SYS_NET_HTTP, "EA2EC6DC-51DD-479C-BFC2-E713FB9E7E47", "4.1.1 net46"),
IGNORED_ASSEMBLY (0x8437178B, SYS_NET_HTTP, "C0E04D9C-70CF-48A6-A179-FBFD8CE69FD0", "4.3.0 net46"),
IGNORED_ASSEMBLY (0x27726A90, SYS_NET_HTTP, "269B562C-CC15-4736-B1B1-68D4A43CAA98", "4.1.0 net46"),
IGNORED_ASSEMBLY (0x10CADA75, SYS_NET_HTTP, "EA2EC6DC-51DD-479C-BFC2-E713FB9E7E47", "4.1.1 net46"),
IGNORED_ASSEMBLY (0x8437178B, SYS_NET_HTTP, "C0E04D9C-70CF-48A6-A179-FBFD8CE69FD0", "4.3.0 net46"),
+ IGNORED_ASSEMBLY (0xFAFDA422, SYS_NET_HTTP, "817F01C3-4011-477D-890A-98232B85553D", "4.3.1 net46"),
+ IGNORED_ASSEMBLY (0x472FA630, SYS_NET_HTTP, "09D4A140-061C-4884-9B63-22067E841931", "4.3.2 net46"),
IGNORED_ASSEMBLY (0x4A15555E, SYS_REF_DISP_PROXY, "E40AFEB4-CABE-4124-8412-B46AB79C92FD", "4.0.0 net46"),
IGNORED_ASSEMBLY (0xD20D9783, SYS_REF_DISP_PROXY, "2A69F0AD-B86B-40F2-8E4C-5B671E47479F", "4.0.1 netstandard1.3"),
IGNORED_ASSEMBLY (0xA33A7E68, SYS_REF_DISP_PROXY, "D4E8D2DB-BD65-4168-99EA-D2C1BDEBF9CC", "4.3.0 netstandard1.3"),
IGNORED_ASSEMBLY (0x4A15555E, SYS_REF_DISP_PROXY, "E40AFEB4-CABE-4124-8412-B46AB79C92FD", "4.0.0 net46"),
IGNORED_ASSEMBLY (0xD20D9783, SYS_REF_DISP_PROXY, "2A69F0AD-B86B-40F2-8E4C-5B671E47479F", "4.0.1 netstandard1.3"),
IGNORED_ASSEMBLY (0xA33A7E68, SYS_REF_DISP_PROXY, "D4E8D2DB-BD65-4168-99EA-D2C1BDEBF9CC", "4.3.0 netstandard1.3"),
@@
-1158,7
+1171,9
@@
static const IgnoredAssembly ignored_assemblies [] = {
IGNORED_ASSEMBLY (0xD07383BB, SYS_RT_INTEROP_RUNTIME_INFO, "DD91439F-3167-478E-BD2C-BF9C036A1395", "4.3.0 net45"),
IGNORED_ASSEMBLY (0x911D9EC3, SYS_TEXT_ENC_CODEPAGES, "C142254F-DEB5-46A7-AE43-6F10320D1D1F", "4.0.1 net46"),
IGNORED_ASSEMBLY (0xFA686A38, SYS_TEXT_ENC_CODEPAGES, "FD178CD4-EF4F-44D5-9C3F-812B1E25126B", "4.3.0 net46"),
IGNORED_ASSEMBLY (0xD07383BB, SYS_RT_INTEROP_RUNTIME_INFO, "DD91439F-3167-478E-BD2C-BF9C036A1395", "4.3.0 net45"),
IGNORED_ASSEMBLY (0x911D9EC3, SYS_TEXT_ENC_CODEPAGES, "C142254F-DEB5-46A7-AE43-6F10320D1D1F", "4.0.1 net46"),
IGNORED_ASSEMBLY (0xFA686A38, SYS_TEXT_ENC_CODEPAGES, "FD178CD4-EF4F-44D5-9C3F-812B1E25126B", "4.3.0 net46"),
- IGNORED_ASSEMBLY (0x75B4B041, SYS_VALUE_TUPLE, "F81A4140-A898-4E2B-B6E9-55CE78C273EC", "4.3.0 netstandard1.0"),
+ IGNORED_ASSEMBLY (0xAA21986B, SYS_THREADING_OVERLAPPED, "9F5D4F09-787A-458A-BA08-553AA71470F1", "4.0.0 net46"),
+ IGNORED_ASSEMBLY (0x7D927C2A, SYS_THREADING_OVERLAPPED, "FCBD003B-2BB4-4940-BAEF-63AF520C2336", "4.0.1 net46"),
+ IGNORED_ASSEMBLY (0x6FE03EE2, SYS_THREADING_OVERLAPPED, "87697E71-D192-4F0B-BAD4-02BBC7793005", "4.3.0 net46")
};
};
@@
-1169,7
+1184,7
@@
const char *ignored_assemblies_names[] = {
"System.Net.Http",
"System.Text.Encoding.CodePages",
"System.Reflection.DispatchProxy",
"System.Net.Http",
"System.Text.Encoding.CodePages",
"System.Reflection.DispatchProxy",
- "System.
ValueTuple
"
+ "System.
Threading.Overlapped
"
};
#define IGNORED_ASM_VER(NAME, MAJOR, MINOR, BUILD, REVISION) { .assembly_name = NAME, .major = MAJOR, .minor = MINOR, .build = BUILD, .revision = REVISION }
};
#define IGNORED_ASM_VER(NAME, MAJOR, MINOR, BUILD, REVISION) { .assembly_name = NAME, .major = MAJOR, .minor = MINOR, .build = BUILD, .revision = REVISION }
@@
-1183,6
+1198,7
@@
static const IgnoredAssemblyVersion ignored_assembly_versions [] = {
IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 0, 0),
IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 0, 1),
IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 1, 0),
IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 0, 0),
IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 0, 1),
IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 1, 0),
+ IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 1, 1),
IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 0, 0),
IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 1, 0),
IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 2, 0),
IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 0, 0),
IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 1, 0),
IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 2, 0),
@@
-1190,7
+1206,9
@@
static const IgnoredAssemblyVersion ignored_assembly_versions [] = {
IGNORED_ASM_VER (SYS_RT_INTEROP_RUNTIME_INFO, 4, 0, 1, 0),
IGNORED_ASM_VER (SYS_TEXT_ENC_CODEPAGES, 4, 0, 1, 0),
IGNORED_ASM_VER (SYS_TEXT_ENC_CODEPAGES, 4, 0, 2, 0),
IGNORED_ASM_VER (SYS_RT_INTEROP_RUNTIME_INFO, 4, 0, 1, 0),
IGNORED_ASM_VER (SYS_TEXT_ENC_CODEPAGES, 4, 0, 1, 0),
IGNORED_ASM_VER (SYS_TEXT_ENC_CODEPAGES, 4, 0, 2, 0),
- IGNORED_ASM_VER (SYS_VALUE_TUPLE, 4, 0, 1, 0),
+ IGNORED_ASM_VER (SYS_THREADING_OVERLAPPED, 4, 0, 0, 0),
+ IGNORED_ASM_VER (SYS_THREADING_OVERLAPPED, 4, 0, 1, 0),
+ IGNORED_ASM_VER (SYS_THREADING_OVERLAPPED, 4, 0, 2, 0),
};
gboolean
};
gboolean
@@
-1259,7
+1277,7
@@
do_mono_image_load (MonoImage *image, MonoImageOpenStatus *status,
GSList *errors = NULL;
GSList *l;
GSList *errors = NULL;
GSList *l;
-
mono_profiler_module_event (image, MONO_PROFILE_START_LOAD
);
+
MONO_PROFILER_RAISE (image_loading, (image)
);
mono_image_init (image);
mono_image_init (image);
@@
-1323,7
+1341,7
@@
do_mono_image_load (MonoImage *image, MonoImageOpenStatus *status,
load_modules (image);
done:
load_modules (image);
done:
-
mono_profiler_module_loaded (image, MONO_PROFILE_OK
);
+
MONO_PROFILER_RAISE (image_loaded, (image)
);
if (status)
*status = MONO_IMAGE_OK;
if (status)
*status = MONO_IMAGE_OK;
@@
-1335,7
+1353,7
@@
invalid_image:
g_warning ("Could not load image %s due to %s", image->name, info->message);
mono_free_verify_list (errors);
}
g_warning ("Could not load image %s due to %s", image->name, info->message);
mono_free_verify_list (errors);
}
-
mono_profiler_module_loaded (image, MONO_PROFILE_FAILED
);
+
MONO_PROFILER_RAISE (image_failed, (image)
);
mono_image_close (image);
return NULL;
}
mono_image_close (image);
return NULL;
}
@@
-1396,14
+1414,14
@@
do_mono_image_open (const char *fname, MonoImageOpenStatus *status,
}
/**
}
/**
- * mono_image_loaded:
- *
@name:
path or assembly name of the image to load
- *
@refonly:
Check with respect to reflection-only loads?
+ * mono_image_loaded
_full
:
+ *
\param name
path or assembly name of the image to load
+ *
\param refonly
Check with respect to reflection-only loads?
*
* This routine verifies that the given image is loaded.
* It checks either reflection-only loads only, or normal loads only, as specified by parameter.
*
*
* This routine verifies that the given image is loaded.
* It checks either reflection-only loads only, or normal loads only, as specified by parameter.
*
- *
Returns: the loaded
MonoImage, or NULL on failure.
+ *
\returns the loaded \c
MonoImage, or NULL on failure.
*/
MonoImage *
mono_image_loaded_full (const char *name, gboolean refonly)
*/
MonoImage *
mono_image_loaded_full (const char *name, gboolean refonly)
@@
-1421,11
+1439,9
@@
mono_image_loaded_full (const char *name, gboolean refonly)
/**
* mono_image_loaded:
/**
* mono_image_loaded:
- * @name: path or assembly name of the image to load
- *
+ * \param name path or assembly name of the image to load
* This routine verifies that the given image is loaded. Reflection-only loads do not count.
* This routine verifies that the given image is loaded. Reflection-only loads do not count.
- *
- * Returns: the loaded MonoImage, or NULL on failure.
+ * \returns the loaded \c MonoImage, or NULL on failure.
*/
MonoImage *
mono_image_loaded (const char *name)
*/
MonoImage *
mono_image_loaded (const char *name)
@@
-1451,6
+1467,9
@@
find_by_guid (gpointer key, gpointer val, gpointer user_data)
data->res = image;
}
data->res = image;
}
+/**
+ * mono_image_loaded_by_guid_full:
+ */
MonoImage *
mono_image_loaded_by_guid_full (const char *guid, gboolean refonly)
{
MonoImage *
mono_image_loaded_by_guid_full (const char *guid, gboolean refonly)
{
@@
-1465,6
+1484,9
@@
mono_image_loaded_by_guid_full (const char *guid, gboolean refonly)
return data.res;
}
return data.res;
}
+/**
+ * mono_image_loaded_by_guid:
+ */
MonoImage *
mono_image_loaded_by_guid (const char *guid)
{
MonoImage *
mono_image_loaded_by_guid (const char *guid)
{
@@
-1538,18
+1560,27
@@
mono_image_open_from_data_internal (char *data, guint32 data_len, gboolean need_
return register_image (image);
}
return register_image (image);
}
+/**
+ * mono_image_open_from_data_with_name:
+ */
MonoImage *
mono_image_open_from_data_with_name (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly, const char *name)
{
return mono_image_open_from_data_internal (data, data_len, need_copy, status, refonly, FALSE, name);
}
MonoImage *
mono_image_open_from_data_with_name (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly, const char *name)
{
return mono_image_open_from_data_internal (data, data_len, need_copy, status, refonly, FALSE, name);
}
+/**
+ * mono_image_open_from_data_full:
+ */
MonoImage *
mono_image_open_from_data_full (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly)
{
return mono_image_open_from_data_with_name (data, data_len, need_copy, status, refonly, NULL);
}
MonoImage *
mono_image_open_from_data_full (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly)
{
return mono_image_open_from_data_with_name (data, data_len, need_copy, status, refonly, NULL);
}
+/**
+ * mono_image_open_from_data:
+ */
MonoImage *
mono_image_open_from_data (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status)
{
MonoImage *
mono_image_open_from_data (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status)
{
@@
-1581,6
+1612,9
@@
mono_image_open_from_module_handle (HMODULE module_handle, char* fname, gboolean
}
#endif
}
#endif
+/**
+ * mono_image_open_full:
+ */
MonoImage *
mono_image_open_full (const char *fname, MonoImageOpenStatus *status, gboolean refonly)
{
MonoImage *
mono_image_open_full (const char *fname, MonoImageOpenStatus *status, gboolean refonly)
{
@@
-1668,7
+1702,7
@@
mono_image_open_a_lot (const char *fname, MonoImageOpenStatus *status, gboolean
}
#endif
}
#endif
- absfname = mono_path_
canonicalize
(fname);
+ absfname = mono_path_
resolve_symlinks
(fname);
/*
* The easiest solution would be to do all the loading inside the mutex,
/*
* The easiest solution would be to do all the loading inside the mutex,
@@
-1697,13
+1731,12
@@
mono_image_open_a_lot (const char *fname, MonoImageOpenStatus *status, gboolean
/**
* mono_image_open:
/**
* mono_image_open:
- * @fname: filename that points to the module we want to open
- * @status: An error condition is returned in this field
- *
- * Returns: An open image of type %MonoImage or NULL on error.
+ * \param fname filename that points to the module we want to open
+ * \param status An error condition is returned in this field
+ * \returns An open image of type \c MonoImage or NULL on error.
* The caller holds a temporary reference to the returned image which should be cleared
* The caller holds a temporary reference to the returned image which should be cleared
- * when no longer needed by calling
mono_image_close ()
.
- * if NULL, then check the value of
@
status for details on the error
+ * when no longer needed by calling
\c mono_image_close
.
+ * if NULL, then check the value of
\p
status for details on the error
*/
MonoImage *
mono_image_open (const char *fname, MonoImageOpenStatus *status)
*/
MonoImage *
mono_image_open (const char *fname, MonoImageOpenStatus *status)
@@
-1713,13
+1746,12
@@
mono_image_open (const char *fname, MonoImageOpenStatus *status)
/**
* mono_pe_file_open:
/**
* mono_pe_file_open:
- * @fname: filename that points to the module we want to open
- * @status: An error condition is returned in this field
- *
- * Returns: An open image of type %MonoImage or NULL on error. if
- * NULL, then check the value of @status for details on the error.
- * This variant for mono_image_open DOES NOT SET UP CLI METADATA.
- * It's just a PE file loader, used for FileVersionInfo. It also does
+ * \param fname filename that points to the module we want to open
+ * \param status An error condition is returned in this field
+ * \returns An open image of type \c MonoImage or NULL on error. if
+ * NULL, then check the value of \p status for details on the error.
+ * This variant for \c mono_image_open DOES NOT SET UP CLI METADATA.
+ * It's just a PE file loader, used for \c FileVersionInfo. It also does
* not use the image cache.
*/
MonoImage *
* not use the image cache.
*/
MonoImage *
@@
-1732,11
+1764,9
@@
mono_pe_file_open (const char *fname, MonoImageOpenStatus *status)
/**
* mono_image_open_raw
/**
* mono_image_open_raw
- * @fname: filename that points to the module we want to open
- * @status: An error condition is returned in this field
- *
- * Returns an image without loading neither pe or cli data.
- *
+ * \param fname filename that points to the module we want to open
+ * \param status An error condition is returned in this field
+ * \returns an image without loading neither pe or cli data.
* Use mono_image_load_pe_data and mono_image_load_cli_data to load them.
*/
MonoImage *
* Use mono_image_load_pe_data and mono_image_load_cli_data to load them.
*/
MonoImage *
@@
-1758,6
+1788,9
@@
mono_image_open_metadata_only (const char *fname, MonoImageOpenStatus *status)
return do_mono_image_open (fname, status, TRUE, TRUE, FALSE, TRUE, FALSE);
}
return do_mono_image_open (fname, status, TRUE, TRUE, FALSE, TRUE, FALSE);
}
+/**
+ * mono_image_fixup_vtable:
+ */
void
mono_image_fixup_vtable (MonoImage *image)
{
void
mono_image_fixup_vtable (MonoImage *image)
{
@@
-1831,9
+1864,8
@@
free_array_cache_entry (gpointer key, gpointer val, gpointer user_data)
/**
* mono_image_addref:
/**
* mono_image_addref:
- * @image: The image file we wish to add a reference to
- *
- * Increases the reference count of an image.
+ * \param image The image file we wish to add a reference to
+ * Increases the reference count of an image.
*/
void
mono_image_addref (MonoImage *image)
*/
void
mono_image_addref (MonoImage *image)
@@
-1951,7
+1983,7
@@
mono_image_close_except_pools (MonoImage *image)
}
#endif
}
#endif
-
mono_profiler_module_event (image, MONO_PROFILE_START_UNLOAD
);
+
MONO_PROFILER_RAISE (image_unloading, (image)
);
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading image %s [%p].", image->name, image);
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading image %s [%p].", image->name, image);
@@
-2057,7
+2089,7
@@
mono_image_close_except_pools (MonoImage *image)
free_hash (image->pinvoke_scopes);
free_hash (image->pinvoke_scope_filenames);
free_hash (image->native_func_wrapper_cache);
free_hash (image->pinvoke_scopes);
free_hash (image->pinvoke_scope_filenames);
free_hash (image->native_func_wrapper_cache);
-
free_hash
(image->typespec_cache);
+
mono_conc_hashtable_destroy
(image->typespec_cache);
mono_wrapper_caches_free (&image->wrapper_caches);
mono_wrapper_caches_free (&image->wrapper_caches);
@@
-2112,7
+2144,7
@@
mono_image_close_except_pools (MonoImage *image)
mono_dynamic_image_free ((MonoDynamicImage*)image);
}
mono_dynamic_image_free ((MonoDynamicImage*)image);
}
-
mono_profiler_module_event (image, MONO_PROFILE_END_UNLOAD
);
+
MONO_PROFILER_RAISE (image_unloaded, (image)
);
return TRUE;
}
return TRUE;
}
@@
-2169,8
+2201,7
@@
mono_image_close_finish (MonoImage *image)
/**
* mono_image_close:
/**
* mono_image_close:
- * @image: The image file we wish to close
- *
+ * \param image The image file we wish to close
* Closes an image file, deallocates all memory consumed and
* unmaps all possible sections of the file
*/
* Closes an image file, deallocates all memory consumed and
* unmaps all possible sections of the file
*/
@@
-2183,9
+2214,8
@@
mono_image_close (MonoImage *image)
/**
* mono_image_strerror:
/**
* mono_image_strerror:
- * @status: an code indicating the result from a recent operation
- *
- * Returns: a string describing the error
+ * \param status an code indicating the result from a recent operation
+ * \returns a string describing the error
*/
const char *
mono_image_strerror (MonoImageOpenStatus status)
*/
const char *
mono_image_strerror (MonoImageOpenStatus status)
@@
-2285,13
+2315,12
@@
mono_image_walk_resource_tree (MonoCLIImageInfo *info, guint32 res_id,
/**
* mono_image_lookup_resource:
/**
* mono_image_lookup_resource:
- * @image: the image to look up the resource in
- * @res_id: A MONO_PE_RESOURCE_ID_ that represents the resource ID to lookup.
- * @lang_id: The language id.
- * @name: the resource name to lookup.
- *
- * Returns: NULL if not found, otherwise a pointer to the in-memory representation
- * of the given resource. The caller should free it using g_free () when no longer
+ * \param image the image to look up the resource in
+ * \param res_id A \c MONO_PE_RESOURCE_ID_ that represents the resource ID to lookup.
+ * \param lang_id The language id.
+ * \param name the resource name to lookup.
+ * \returns NULL if not found, otherwise a pointer to the in-memory representation
+ * of the given resource. The caller should free it using \c g_free when no longer
* needed.
*/
gpointer
* needed.
*/
gpointer
@@
-2356,12
+2385,10
@@
mono_image_lookup_resource (MonoImage *image, guint32 res_id, guint32 lang_id, g
/**
* mono_image_get_entry_point:
/**
* mono_image_get_entry_point:
- * @image: the image where the entry point will be looked up.
- *
+ * \param image the image where the entry point will be looked up.
* Use this routine to determine the metadata token for method that
* has been flagged as the entry point.
* Use this routine to determine the metadata token for method that
* has been flagged as the entry point.
- *
- * Returns: the token for the entry point method in the image
+ * \returns the token for the entry point method in the image
*/
guint32
mono_image_get_entry_point (MonoImage *image)
*/
guint32
mono_image_get_entry_point (MonoImage *image)
@@
-2371,15
+2398,15
@@
mono_image_get_entry_point (MonoImage *image)
/**
* mono_image_get_resource:
/**
* mono_image_get_resource:
- *
@image:
the image where the resource will be looked up.
- *
@offset:
The offset to add to the resource
- *
@size:
a pointer to an int where the size of the resource will be stored
+ *
\param image
the image where the resource will be looked up.
+ *
\param offset
The offset to add to the resource
+ *
\param size
a pointer to an int where the size of the resource will be stored
*
* This is a low-level routine that fetches a resource from the
*
* This is a low-level routine that fetches a resource from the
- * metadata that starts at a given
@offset. The @
size parameter is
+ * metadata that starts at a given
\p offset. The \p
size parameter is
* filled with the data field as encoded in the metadata.
*
* filled with the data field as encoded in the metadata.
*
- *
Returns: the pointer to the resource whose offset is @
offset.
+ *
\returns the pointer to the resource whose offset is \p
offset.
*/
const char*
mono_image_get_resource (MonoImage *image, guint32 offset, guint32 *size)
*/
const char*
mono_image_get_resource (MonoImage *image, guint32 offset, guint32 *size)
@@
-2470,6
+2497,9
@@
done:
return res;
}
return res;
}
+/**
+ * mono_image_load_file_for_image:
+ */
MonoImage*
mono_image_load_file_for_image (MonoImage *image, int fileidx)
{
MonoImage*
mono_image_load_file_for_image (MonoImage *image, int fileidx)
{
@@
-2481,13
+2511,13
@@
mono_image_load_file_for_image (MonoImage *image, int fileidx)
/**
* mono_image_get_strong_name:
/**
* mono_image_get_strong_name:
- *
@image:
a MonoImage
- *
@size: a
guint32 pointer, or NULL.
+ *
\param image
a MonoImage
+ *
\param size a \c
guint32 pointer, or NULL.
*
*
- * If the image has a strong name, and
@
size is not NULL, the value
+ * If the image has a strong name, and
\p
size is not NULL, the value
* pointed to by size will have the size of the strong name.
*
* pointed to by size will have the size of the strong name.
*
- *
Returns:
NULL if the image does not have a strong name, or a
+ *
\returns
NULL if the image does not have a strong name, or a
* pointer to the public key.
*/
const char*
* pointer to the public key.
*/
const char*
@@
-2509,13
+2539,13
@@
mono_image_get_strong_name (MonoImage *image, guint32 *size)
/**
* mono_image_strong_name_position:
/**
* mono_image_strong_name_position:
- *
@image: a
MonoImage
- *
@size: a
guint32 pointer, or NULL.
+ *
\param image a \c
MonoImage
+ *
\param size a \c
guint32 pointer, or NULL.
*
*
- * If the image has a strong name, and
@
size is not NULL, the value
+ * If the image has a strong name, and
\p
size is not NULL, the value
* pointed to by size will have the size of the strong name.
*
* pointed to by size will have the size of the strong name.
*
- *
Returns:
the position within the image file where the strong name
+ *
\returns
the position within the image file where the strong name
* is stored.
*/
guint32
* is stored.
*/
guint32
@@
-2535,15
+2565,15
@@
mono_image_strong_name_position (MonoImage *image, guint32 *size)
/**
* mono_image_get_public_key:
/**
* mono_image_get_public_key:
- *
@image: a
MonoImage
- *
@size: a
guint32 pointer, or NULL.
+ *
\param image a \c
MonoImage
+ *
\param size a \c
guint32 pointer, or NULL.
*
*
- * This is used to obtain the public key in the
@
image.
+ * This is used to obtain the public key in the
\p
image.
*
*
- * If the image has a public key, and
@
size is not NULL, the value
+ * If the image has a public key, and
\p
size is not NULL, the value
* pointed to by size will have the size of the public key.
*
* pointed to by size will have the size of the public key.
*
- *
Returns:
NULL if the image does not have a public key, or a pointer
+ *
\returns
NULL if the image does not have a public key, or a pointer
* to the public key.
*/
const char*
* to the public key.
*/
const char*
@@
-2571,9
+2601,8
@@
mono_image_get_public_key (MonoImage *image, guint32 *size)
/**
* mono_image_get_name:
/**
* mono_image_get_name:
- * @name: a MonoImage
- *
- * Returns: the name of the assembly.
+ * \param name a \c MonoImage
+ * \returns the name of the assembly.
*/
const char*
mono_image_get_name (MonoImage *image)
*/
const char*
mono_image_get_name (MonoImage *image)
@@
-2583,11
+2612,9
@@
mono_image_get_name (MonoImage *image)
/**
* mono_image_get_filename:
/**
* mono_image_get_filename:
- * @image: a MonoImage
- *
- * Used to get the filename that hold the actual MonoImage
- *
- * Returns: the filename.
+ * \param image a \c MonoImage
+ * Used to get the filename that hold the actual \c MonoImage
+ * \returns the filename.
*/
const char*
mono_image_get_filename (MonoImage *image)
*/
const char*
mono_image_get_filename (MonoImage *image)
@@
-2595,12
+2622,18
@@
mono_image_get_filename (MonoImage *image)
return image->name;
}
return image->name;
}
+/**
+ * mono_image_get_guid:
+ */
const char*
mono_image_get_guid (MonoImage *image)
{
return image->guid;
}
const char*
mono_image_get_guid (MonoImage *image)
{
return image->guid;
}
+/**
+ * mono_image_get_table_info:
+ */
const MonoTableInfo*
mono_image_get_table_info (MonoImage *image, int table_id)
{
const MonoTableInfo*
mono_image_get_table_info (MonoImage *image, int table_id)
{
@@
-2609,6
+2642,9
@@
mono_image_get_table_info (MonoImage *image, int table_id)
return &image->tables [table_id];
}
return &image->tables [table_id];
}
+/**
+ * mono_image_get_table_rows:
+ */
int
mono_image_get_table_rows (MonoImage *image, int table_id)
{
int
mono_image_get_table_rows (MonoImage *image, int table_id)
{
@@
-2617,6
+2653,9
@@
mono_image_get_table_rows (MonoImage *image, int table_id)
return image->tables [table_id].rows;
}
return image->tables [table_id].rows;
}
+/**
+ * mono_table_info_get_rows:
+ */
int
mono_table_info_get_rows (const MonoTableInfo *table)
{
int
mono_table_info_get_rows (const MonoTableInfo *table)
{
@@
-2625,11
+2664,9
@@
mono_table_info_get_rows (const MonoTableInfo *table)
/**
* mono_image_get_assembly:
/**
* mono_image_get_assembly:
- * @image: the MonoImage.
- *
+ * \param image the \c MonoImage .
* Use this routine to get the assembly that owns this image.
* Use this routine to get the assembly that owns this image.
- *
- * Returns: the assembly that holds this image.
+ * \returns the assembly that holds this image.
*/
MonoAssembly*
mono_image_get_assembly (MonoImage *image)
*/
MonoAssembly*
mono_image_get_assembly (MonoImage *image)
@@
-2639,12
+2676,11
@@
mono_image_get_assembly (MonoImage *image)
/**
* mono_image_is_dynamic:
/**
* mono_image_is_dynamic:
- *
@image: the
MonoImage
+ *
\param image the \c
MonoImage
*
* Determines if the given image was created dynamically through the
*
* Determines if the given image was created dynamically through the
- * System.Reflection.Emit API
- *
- * Returns: TRUE if the image was created dynamically, FALSE if not.
+ * \c System.Reflection.Emit API
+ * \returns TRUE if the image was created dynamically, FALSE if not.
*/
gboolean
mono_image_is_dynamic (MonoImage *image)
*/
gboolean
mono_image_is_dynamic (MonoImage *image)
@@
-2654,12
+2690,10
@@
mono_image_is_dynamic (MonoImage *image)
/**
* mono_image_has_authenticode_entry:
/**
* mono_image_has_authenticode_entry:
- * @image: the MonoImage
- *
+ * \param image the \c MonoImage
* Use this routine to determine if the image has a Authenticode
* Certificate Table.
* Use this routine to determine if the image has a Authenticode
* Certificate Table.
- *
- * Returns: TRUE if the image contains an authenticode entry in the PE
+ * \returns TRUE if the image contains an authenticode entry in the PE
* directory.
*/
gboolean
* directory.
*/
gboolean
@@
-2789,8
+2823,7
@@
mono_image_unlock (MonoImage *image)
/**
* mono_image_property_lookup:
/**
* mono_image_property_lookup:
- *
- * Lookup a property on @image. Used to store very rare fields of MonoClass and MonoMethod.
+ * Lookup a property on \p image . Used to store very rare fields of \c MonoClass and \c MonoMethod .
*
* LOCKING: Takes the image lock
*/
*
* LOCKING: Takes the image lock
*/
@@
-2808,8
+2841,8
@@
mono_image_property_lookup (MonoImage *image, gpointer subject, guint32 property
/**
* mono_image_property_insert:
/**
* mono_image_property_insert:
- *
- *
Insert a new property @property with value @value on @subject in @image. Used to store very rare fields of MonoClass and
MonoMethod.
+ *
Insert a new property \p property with value \p value on \p subject in \p
+ *
image. Used to store very rare fields of \c MonoClass and \c
MonoMethod.
*
* LOCKING: Takes the image lock
*/
*
* LOCKING: Takes the image lock
*/
@@
-2824,8
+2857,7
@@
mono_image_property_insert (MonoImage *image, gpointer subject, guint32 property
/**
* mono_image_property_remove:
/**
* mono_image_property_remove:
- *
- * Remove all properties associated with @subject in @image. Used to store very rare fields of MonoClass and MonoMethod.
+ * Remove all properties associated with \p subject in \p image. Used to store very rare fields of \c MonoClass and \c MonoMethod .
*
* LOCKING: Takes the image lock
*/
*
* LOCKING: Takes the image lock
*/