554 static int available(int fd, jlong *bytes); |
554 static int available(int fd, jlong *bytes); |
555 |
555 |
556 //File i/o operations |
556 //File i/o operations |
557 |
557 |
558 static size_t read(int fd, void *buf, unsigned int nBytes); |
558 static size_t read(int fd, void *buf, unsigned int nBytes); |
|
559 static size_t read_at(int fd, void *buf, unsigned int nBytes, jlong offset); |
559 static size_t restartable_read(int fd, void *buf, unsigned int nBytes); |
560 static size_t restartable_read(int fd, void *buf, unsigned int nBytes); |
560 static size_t write(int fd, const void *buf, unsigned int nBytes); |
561 static size_t write(int fd, const void *buf, unsigned int nBytes); |
561 |
562 |
562 // Reading directories. |
563 // Reading directories. |
563 static DIR* opendir(const char* dirname); |
564 static DIR* opendir(const char* dirname); |
601 // lookup symbol in a shared library |
602 // lookup symbol in a shared library |
602 static void* dll_lookup(void* handle, const char* name); |
603 static void* dll_lookup(void* handle, const char* name); |
603 |
604 |
604 // Unload library |
605 // Unload library |
605 static void dll_unload(void *lib); |
606 static void dll_unload(void *lib); |
|
607 |
|
608 // Callback for loaded module information |
|
609 // Input parameters: |
|
610 // char* module_file_name, |
|
611 // address module_base_addr, |
|
612 // address module_top_addr, |
|
613 // void* param |
|
614 typedef int (*LoadedModulesCallbackFunc)(const char *, address, address, void *); |
|
615 |
|
616 static int get_loaded_modules_info(LoadedModulesCallbackFunc callback, void *param); |
606 |
617 |
607 // Return the handle of this process |
618 // Return the handle of this process |
608 static void* get_default_process_handle(); |
619 static void* get_default_process_handle(); |
609 |
620 |
610 // Check for static linked agent library |
621 // Check for static linked agent library |