3 Written by Egor Duda <deo@logos-m.ru>
5 This file is part of Cygwin.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License (file COPYING.dumper) for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
45 enum process_entity_type
52 typedef struct _process_entity
54 process_entity_type type
;
57 process_thread thread
;
58 process_mem_region memory
;
59 process_module module
;
62 struct _process_entity
* next
;
65 #define PAGE_BUFFER_SIZE 4096
70 DWORD tid
; /* thread id of active thread */
78 asection
* status_section
;
87 process_entity
* add_process_entity_to_list ( process_entity_type type
);
88 int add_thread ( DWORD tid
, HANDLE hThread
);
89 int add_mem_region ( LPBYTE base
, SIZE_T size
);
91 /* break mem_region by excl_list and add add all subregions */
92 int split_add_mem_region ( LPBYTE base
, SIZE_T size
);
94 int add_module ( LPVOID base_address
);
96 int collect_memory_sections ();
97 int dump_memory_region ( asection
* to
, process_mem_region
* memory
);
98 int dump_thread ( asection
* to
, process_thread
* thread
);
99 int dump_module ( asection
* to
, process_module
* module
);
104 int collect_process_information ();
105 void print_core_section_list ();
107 dumper ( DWORD pid
, DWORD tid
, const char* name
);
110 int init_core_dump ();
111 int prepare_core_dump ();
112 int write_core_dump ();
115 extern int deb_printf ( const char* format
, ... );
117 extern char* psapi_get_module_name ( HANDLE hProcess
, LPVOID BaseAddress
);