darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.55k stars 446 forks source link

implement Buffered Output For XTrace #1427

Closed CuriousTommy closed 1 year ago

CuriousTommy commented 1 year ago

Because of how Darlingserver handles printing kernel messages to dserver.log, it will always create a new line. This has the unfortunate side effect of producing some hard to read output.

[1693713069.981230](kprintf, Info)[P:374504(21)][T:374504(21)] xtrace: getrlimit
[1693713069.981364](kprintf, Info)[P:374504(21)][T:374504(21)] xtrace: (
[1693713069.981482](kprintf, Info)[P:374504(21)][T:374504(21)] xtrace: 4104
[1693713069.981601](kprintf, Info)[P:374504(21)][T:374504(21)] xtrace: ,
[1693713069.981718](kprintf, Info)[P:374504(21)][T:374504(21)] xtrace: 0x7FFFFFDFF798
[1693713069.981835](kprintf, Info)[P:374504(21)][T:374504(21)] xtrace: )

This PR implements a basic buffered string that will temporarily store the string until we are ready to print it out.

[1693714612.128821](kprintf, Info)[P:1879717(38)][T:1879717(38)] xtrace: [38] getrlimit(4104, 0x7FFFFFDFF728)