News for hackers. Stuff that matters.
Re:Debug Programs by Modifying Them by nefitty on Wednesday April 28, 2021 @03:04AM (#26966573)
This is genius. I hadn’t heard of this logging style before. I’m going to try it tomorrow morning.
Re:Debug Programs by Modifying Them by pjc50 on Wednesday April 28, 2021 @05:12AM (#26967334)
A variant I developed in an embedded system, which had weirdly defective debugging facilities: define an area of memory which is not cleared on startup. Log into a circular buffer there. On startup, output the contents of the buffer over the serial link (or similar).
Re:Debug Programs by Modifying Them by hyperman1 on Wednesday April 28, 2021 @05:54AM (#26967612)
There are many variants. One is to put the ringbuffer in a shared memory segment or mmapped file, and use another process to read and print the content.