debugger-only log on Linux, equivalent of OutputDebugString

Tom Tromey tom@tromey.com
Thu Sep 17 17:10:26 GMT 2020


>>>>> ">" == A M Miera via Gdb <gdb@sourceware.org> writes:

>> The main question I'd like to ask though, is this: is that actually
>> the right way to go, or can this be done better in terms of operation 
>> principles? I have several concerns here:
>> a. this might be very system-specific, e.g. for bare-metal Cortex-Mx
>> targets there's sth called "semihosting", which effectively does the 
>> same (though is something different in principle). Windows already its
>> own call, too, etc.
>> b. most likely a simple pipe-based solution is not going to work with
>> remote targets, e.g. gdbserver? Should it be added?
>> c. and last but not least: maybe a mechanism already exists and I'm
>> reinventing the wheel now?

I don't know of another existing implementation of this.

Your approach sounds maybe a bit like what "libust" is doing.
That might be worth a look.

Tom


More information about the Gdb mailing list