baremetal: log memory mapping functions
This commit is contained in:
@ -140,6 +140,9 @@ if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# NOTE: Step through wamr in gdb
|
||||||
|
# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb")
|
||||||
|
|
||||||
# The following flags are to enhance security, but it may impact performance,
|
# The following flags are to enhance security, but it may impact performance,
|
||||||
# we disable them by default.
|
# we disable them by default.
|
||||||
#if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
#if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
||||||
|
|||||||
@ -95,23 +95,30 @@ bh_log_proc_mem(const char *function, uint32 line)
|
|||||||
void *
|
void *
|
||||||
os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
|
os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
|
||||||
{
|
{
|
||||||
|
printf("os_mmap(size=%u, prot=%d, flags=%d)\n", (unsigned)size, prot,
|
||||||
|
flags);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
os_mremap(void *old_addr, size_t old_size, size_t new_size)
|
os_mremap(void *old_addr, size_t old_size, size_t new_size)
|
||||||
{
|
{
|
||||||
|
printf("os_mremap(old=%p, old_size=%u, new_size=%u)\n", old_addr,
|
||||||
|
(unsigned)old_size, (unsigned)new_size);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
os_munmap(void *addr, size_t size)
|
os_munmap(void *addr, size_t size)
|
||||||
{
|
{
|
||||||
|
printf("os_munmap(addr=%p, size=%u)\n", addr, (unsigned)size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
os_mprotect(void *addr, size_t size, int prot)
|
os_mprotect(void *addr, size_t size, int prot)
|
||||||
{
|
{
|
||||||
|
printf("os_mprotect(addr=%p, size=%u, prot=%d)\n", addr, (unsigned)size,
|
||||||
|
prot);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user