[<<][arm][>>][..]
Sun May 29 17:52:15 CEST 2011

OpenOCD console output to GDB


Console output to GDB goes through:
src/server/gdb_server.c :
static int gdb_output_con(struct connection *connection, const char* line);

This seems to be only used in:
static void gdb_log_callback(void *priv, const char *file, unsigned line,
		const char *function, const char *string)



What I think is going on here is that log_add_callback() adds to some
kind of global logging facility.  Next is to find out how to "puts" to
that.

To find a list of commands, do:

   grep -re ".name = " src/

It seems that "list" is what I'm looking for.

Probably a better candidate is "echo", defined in src/command.c :

		.name = "echo",
		.handler = jim_echo,
		.mode = COMMAND_ANY,
		.help = "Logs a message at \"user\" priority. "
			"Output message to stdout. "
			"Option \"-n\" suppresses trailing newline",
		.usage = "[-n] string",


This calls LOG_USER / LOG_USER_N.




[Reply][About]
[<<][arm][>>][..]