This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Remote console output


alsp wrote:
Hi,

I hope this is the correct mailing list for this, sorry if it isn't.

I'm experimenting with remote GDB debugging at the moment - I've got a
simple program that prints to the console using printf which I can
successfully run and debug with gdbserver and a gdb client.

As I expected, the printf output is appearing on the gdbserver console
rather than the client gdb console. However, I was wondering if there is a
way to change this behaviour so that any console output from the executing
program appears on the client gdb console. How can I do this?

I'm sure there must be a way of doing this for debugging on embedded devices
that have no display?

Thanks for any help.

Alan

With embedded devices, you may have a standard library that cooperates with gdb and the gdb stub. In that case, the printf function will be implemented so as to send a special "O" packet to gdb, containing the
text to be printed.


If your target is linux, you would have to modify the glibc version of printf.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]