599 // same architecture as Hotspot is running on 600 static void* dll_load(const char *name, char *ebuf, int ebuflen); 601 602 // lookup symbol in a shared library 603 static void* dll_lookup(void* handle, const char* name); 604 605 // Unload library 606 static void dll_unload(void *lib); 607 608 // Return the handle of this process 609 static void* get_default_process_handle(); 610 611 // Check for static linked agent library 612 static bool find_builtin_agent(AgentLibrary *agent_lib, const char *syms[], 613 size_t syms_len); 614 615 // Find agent entry point 616 static void *find_agent_function(AgentLibrary *agent_lib, bool check_lib, 617 const char *syms[], size_t syms_len); 618 619 // Print out system information; they are called by fatal error handler. 620 // Output format may be different on different platforms. 621 static void print_os_info(outputStream* st); 622 static void print_os_info_brief(outputStream* st); 623 static void print_cpu_info(outputStream* st); 624 static void pd_print_cpu_info(outputStream* st); 625 static void print_memory_info(outputStream* st); 626 static void print_dll_info(outputStream* st); 627 static void print_environment_variables(outputStream* st, const char** env_list, char* buffer, int len); 628 static void print_context(outputStream* st, void* context); 629 static void print_register_info(outputStream* st, void* context); 630 static void print_siginfo(outputStream* st, void* siginfo); 631 static void print_signal_handlers(outputStream* st, char* buf, size_t buflen); 632 static void print_date_and_time(outputStream* st, char* buf, size_t buflen); 633 634 static void print_location(outputStream* st, intptr_t x, bool verbose = false); 635 static size_t lasterror(char *buf, size_t len); 636 static int get_last_error(); 637 638 // Determines whether the calling process is being debugged by a user-mode debugger. | 599 // same architecture as Hotspot is running on 600 static void* dll_load(const char *name, char *ebuf, int ebuflen); 601 602 // lookup symbol in a shared library 603 static void* dll_lookup(void* handle, const char* name); 604 605 // Unload library 606 static void dll_unload(void *lib); 607 608 // Return the handle of this process 609 static void* get_default_process_handle(); 610 611 // Check for static linked agent library 612 static bool find_builtin_agent(AgentLibrary *agent_lib, const char *syms[], 613 size_t syms_len); 614 615 // Find agent entry point 616 static void *find_agent_function(AgentLibrary *agent_lib, bool check_lib, 617 const char *syms[], size_t syms_len); 618 619 static int vsnprintf(char* buf, size_t len, const char* fmt, va_list args) ATTRIBUTE_PRINTF(3, 0); 620 static int snprintf(char* buf, size_t len, const char* fmt, ...) ATTRIBUTE_PRINTF(3, 4); 621 622 // Print out system information; they are called by fatal error handler. 623 // Output format may be different on different platforms. 624 static void print_os_info(outputStream* st); 625 static void print_os_info_brief(outputStream* st); 626 static void print_cpu_info(outputStream* st); 627 static void pd_print_cpu_info(outputStream* st); 628 static void print_memory_info(outputStream* st); 629 static void print_dll_info(outputStream* st); 630 static void print_environment_variables(outputStream* st, const char** env_list, char* buffer, int len); 631 static void print_context(outputStream* st, void* context); 632 static void print_register_info(outputStream* st, void* context); 633 static void print_siginfo(outputStream* st, void* siginfo); 634 static void print_signal_handlers(outputStream* st, char* buf, size_t buflen); 635 static void print_date_and_time(outputStream* st, char* buf, size_t buflen); 636 637 static void print_location(outputStream* st, intptr_t x, bool verbose = false); 638 static size_t lasterror(char *buf, size_t len); 639 static int get_last_error(); 640 641 // Determines whether the calling process is being debugged by a user-mode debugger. |