View | Details | Raw Unified | Return to bug 193761
Collapse All | Expand All

(-)sys/amd64/amd64/minidump_machdep.c (-2 / +3 lines)
Lines 215-221 Link Here
215
/* A fake page table page, to avoid having to handle both 4K and 2M pages */
215
/* A fake page table page, to avoid having to handle both 4K and 2M pages */
216
static pd_entry_t fakepd[NPDEPG];
216
static pd_entry_t fakepd[NPDEPG];
217
217
218
void
218
int
219
minidumpsys(struct dumperinfo *di)
219
minidumpsys(struct dumperinfo *di)
220
{
220
{
221
	uint32_t pmapsize;
221
	uint32_t pmapsize;
Lines 441-447 Link Here
441
	/* Signal completion, signoff and exit stage left. */
441
	/* Signal completion, signoff and exit stage left. */
442
	dump_write(di, NULL, 0, 0, 0);
442
	dump_write(di, NULL, 0, 0, 0);
443
	printf("\nDump complete\n");
443
	printf("\nDump complete\n");
444
	return;
444
	return (0);
445
445
446
 fail:
446
 fail:
447
	if (error < 0)
447
	if (error < 0)
Lines 462-467 Link Here
462
		printf("Dump failed. Partition too small.\n");
462
		printf("Dump failed. Partition too small.\n");
463
	else
463
	else
464
		printf("** DUMP FAILED (ERROR %d) **\n", error);
464
		printf("** DUMP FAILED (ERROR %d) **\n", error);
465
	return (error);
465
}
466
}
466
467
467
void
468
void
(-)sys/amd64/include/md_var.h (-1 / +1 lines)
Lines 118-124 Link Here
118
void	printcpuinfo(void);
118
void	printcpuinfo(void);
119
void	setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist);
119
void	setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist);
120
int	user_dbreg_trap(void);
120
int	user_dbreg_trap(void);
121
void	minidumpsys(struct dumperinfo *);
121
int	minidumpsys(struct dumperinfo *);
122
struct savefpu *get_pcb_user_save_td(struct thread *td);
122
struct savefpu *get_pcb_user_save_td(struct thread *td);
123
struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb);
123
struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb);
124
struct pcb *get_pcb_td(struct thread *td);
124
struct pcb *get_pcb_td(struct thread *td);
(-)sys/arm/arm/dump_machdep.c (-4 / +2 lines)
Lines 280-289 Link Here
280
	size_t hdrsz;
280
	size_t hdrsz;
281
	int error;
281
	int error;
282
282
283
	if (do_minidump) {
283
	if (do_minidump)
284
		minidumpsys(di);
284
		return (minidumpsys(di));
285
		return (0);
286
	}
287
285
288
	bzero(&ehdr, sizeof(ehdr));
286
	bzero(&ehdr, sizeof(ehdr));
289
	ehdr.e_ident[EI_MAG0] = ELFMAG0;
287
	ehdr.e_ident[EI_MAG0] = ELFMAG0;
(-)sys/arm/arm/minidump_machdep.c (-2 / +3 lines)
Lines 196-202 Link Here
196
/* A fake page table page, to avoid having to handle both 4K and 2M pages */
196
/* A fake page table page, to avoid having to handle both 4K and 2M pages */
197
static pt_entry_t fakept[NPTEPG];
197
static pt_entry_t fakept[NPTEPG];
198
198
199
void
199
int
200
minidumpsys(struct dumperinfo *di)
200
minidumpsys(struct dumperinfo *di)
201
{
201
{
202
	struct minidumphdr mdhdr;
202
	struct minidumphdr mdhdr;
Lines 460-466 Link Here
460
	/* Signal completion, signoff and exit stage left. */
460
	/* Signal completion, signoff and exit stage left. */
461
	dump_write(di, NULL, 0, 0, 0);
461
	dump_write(di, NULL, 0, 0, 0);
462
	printf("\nDump complete\n");
462
	printf("\nDump complete\n");
463
	return;
463
	return (0);
464
464
465
fail:
465
fail:
466
	if (error < 0)
466
	if (error < 0)
Lines 472-477 Link Here
472
		printf("\nDump failed. Partition too small.\n");
472
		printf("\nDump failed. Partition too small.\n");
473
	else
473
	else
474
		printf("\n** DUMP FAILED (ERROR %d) **\n", error);
474
		printf("\n** DUMP FAILED (ERROR %d) **\n", error);
475
	return (error);
475
}
476
}
476
477
477
void
478
void
(-)sys/arm/include/md_var.h (-1 / +1 lines)
Lines 68-73 Link Here
68
void busdma_swi(void);
68
void busdma_swi(void);
69
void dump_add_page(vm_paddr_t);
69
void dump_add_page(vm_paddr_t);
70
void dump_drop_page(vm_paddr_t);
70
void dump_drop_page(vm_paddr_t);
71
void minidumpsys(struct dumperinfo *);
71
int minidumpsys(struct dumperinfo *);
72
72
73
#endif /* !_MACHINE_MD_VAR_H_ */
73
#endif /* !_MACHINE_MD_VAR_H_ */
(-)sys/i386/i386/minidump_machdep.c (-2 / +3 lines)
Lines 178-184 Link Here
178
/* A fake page table page, to avoid having to handle both 4K and 2M pages */
178
/* A fake page table page, to avoid having to handle both 4K and 2M pages */
179
static pt_entry_t fakept[NPTEPG];
179
static pt_entry_t fakept[NPTEPG];
180
180
181
void
181
int
182
minidumpsys(struct dumperinfo *di)
182
minidumpsys(struct dumperinfo *di)
183
{
183
{
184
	uint64_t dumpsize;
184
	uint64_t dumpsize;
Lines 377-383 Link Here
377
	/* Signal completion, signoff and exit stage left. */
377
	/* Signal completion, signoff and exit stage left. */
378
	dump_write(di, NULL, 0, 0, 0);
378
	dump_write(di, NULL, 0, 0, 0);
379
	printf("\nDump complete\n");
379
	printf("\nDump complete\n");
380
	return;
380
	return (0);
381
381
382
 fail:
382
 fail:
383
	if (error < 0)
383
	if (error < 0)
Lines 389-394 Link Here
389
		printf("\nDump failed. Partition too small.\n");
389
		printf("\nDump failed. Partition too small.\n");
390
	else
390
	else
391
		printf("\n** DUMP FAILED (ERROR %d) **\n", error);
391
		printf("\n** DUMP FAILED (ERROR %d) **\n", error);
392
	return (error);
392
}
393
}
393
394
394
void
395
void
(-)sys/i386/include/md_var.h (-1 / +1 lines)
Lines 113-118 Link Here
113
void	printcpuinfo(void);
113
void	printcpuinfo(void);
114
void	setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec);
114
void	setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec);
115
int     user_dbreg_trap(void);
115
int     user_dbreg_trap(void);
116
void	minidumpsys(struct dumperinfo *);
116
int	minidumpsys(struct dumperinfo *);
117
117
118
#endif /* !_MACHINE_MD_VAR_H_ */
118
#endif /* !_MACHINE_MD_VAR_H_ */
(-)sys/mips/include/md_var.h (-1 / +1 lines)
Lines 79-83 Link Here
79
struct	dumperinfo;
79
struct	dumperinfo;
80
void	dump_add_page(vm_paddr_t);
80
void	dump_add_page(vm_paddr_t);
81
void	dump_drop_page(vm_paddr_t);
81
void	dump_drop_page(vm_paddr_t);
82
void	minidumpsys(struct dumperinfo *);
82
int	minidumpsys(struct dumperinfo *);
83
#endif /* !_MACHINE_MD_VAR_H_ */
83
#endif /* !_MACHINE_MD_VAR_H_ */
(-)sys/mips/mips/dump_machdep.c (-4 / +2 lines)
Lines 266-275 Link Here
266
	size_t hdrsz;
266
	size_t hdrsz;
267
	int error;
267
	int error;
268
268
269
	if (do_minidump) {
269
	if (do_minidump)
270
		minidumpsys(di);
270
		return (minidumpsys(di));
271
		return (0);
272
	}
273
271
274
	bzero(&ehdr, sizeof(ehdr));
272
	bzero(&ehdr, sizeof(ehdr));
275
	ehdr.e_ident[EI_MAG0] = ELFMAG0;
273
	ehdr.e_ident[EI_MAG0] = ELFMAG0;
(-)sys/mips/mips/minidump_machdep.c (-2 / +3 lines)
Lines 153-159 Link Here
153
	return (0);
153
	return (0);
154
}
154
}
155
155
156
void
156
int
157
minidumpsys(struct dumperinfo *di)
157
minidumpsys(struct dumperinfo *di)
158
{
158
{
159
	struct minidumphdr mdhdr;
159
	struct minidumphdr mdhdr;
Lines 325-331 Link Here
325
	/* Signal completion, signoff and exit stage left. */
325
	/* Signal completion, signoff and exit stage left. */
326
	dump_write(di, NULL, 0, 0, 0);
326
	dump_write(di, NULL, 0, 0, 0);
327
	printf("\nDump complete\n");
327
	printf("\nDump complete\n");
328
	return;
328
	return (0);
329
329
330
fail:
330
fail:
331
	if (error < 0)
331
	if (error < 0)
Lines 337-340 Link Here
337
		printf("\nDump failed. Partition too small.\n");
337
		printf("\nDump failed. Partition too small.\n");
338
	else
338
	else
339
		printf("\n** DUMP FAILED (ERROR %d) **\n", error);
339
		printf("\n** DUMP FAILED (ERROR %d) **\n", error);
340
	return (error);
340
}
341
}
(-)sys/x86/x86/dump_machdep.c (-4 / +3 lines)
Lines 275-284 Link Here
275
	size_t hdrsz;
275
	size_t hdrsz;
276
	int error;
276
	int error;
277
277
278
	if (do_minidump) {
278
	if (do_minidump)
279
		minidumpsys(di);
279
		return (minidumpsys(di));
280
		return (0);
280
281
	}
282
	bzero(&ehdr, sizeof(ehdr));
281
	bzero(&ehdr, sizeof(ehdr));
283
	ehdr.e_ident[EI_MAG0] = ELFMAG0;
282
	ehdr.e_ident[EI_MAG0] = ELFMAG0;
284
	ehdr.e_ident[EI_MAG1] = ELFMAG1;
283
	ehdr.e_ident[EI_MAG1] = ELFMAG1;

Return to bug 193761