--- old/src/share/vm/runtime/os.hpp 2019-01-28 17:44:33.000000000 +0800 +++ new/src/share/vm/runtime/os.hpp 2019-01-28 17:44:32.000000000 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -556,6 +556,7 @@ //File i/o operations static size_t read(int fd, void *buf, unsigned int nBytes); + static size_t read_at(int fd, void *buf, unsigned int nBytes, jlong offset); static size_t restartable_read(int fd, void *buf, unsigned int nBytes); static size_t write(int fd, const void *buf, unsigned int nBytes); @@ -605,6 +606,16 @@ // Unload library static void dll_unload(void *lib); + // Callback for loaded module information + // Input parameters: + // char* module_file_name, + // address module_base_addr, + // address module_top_addr, + // void* param + typedef int (*LoadedModulesCallbackFunc)(const char *, address, address, void *); + + static int get_loaded_modules_info(LoadedModulesCallbackFunc callback, void *param); + // Return the handle of this process static void* get_default_process_handle();