* Dump DDB(4) captured output (and resets capture buffers). */
| 303 | * Dump DDB(4) captured output (and resets capture buffers). |
| 304 | */ |
| 305 | void |
| 306 | db_capture_dump(struct dumperinfo *di) |
| 307 | { |
| 308 | u_int offset; |
| 309 | |
| 310 | if (db_capture_bufoff == 0) |
| 311 | return; |
| 312 | |
| 313 | db_capture_zeropad(); |
| 314 | textdump_mkustar(textdump_block_buffer, DDB_CAPTURE_FILENAME, |
| 315 | db_capture_bufoff); |
| 316 | (void)textdump_writenextblock(di, textdump_block_buffer); |
| 317 | for (offset = 0; offset < db_capture_bufoff + db_capture_bufpadding; |
| 318 | offset += TEXTDUMP_BLOCKSIZE) |
| 319 | (void)textdump_writenextblock(di, db_capture_buf + offset); |
| 320 | db_capture_bufoff = 0; |
| 321 | db_capture_bufpadding = 0; |
| 322 | } |
| 323 | |
| 324 | /*- |
| 325 | * DDB(4) command to manage capture: |
no test coverage detected