Bob Rossi
2014-07-28 01:03:03 UTC
Hi,
Does anyone know what characters GDB escapes in the GDB/MI protocol
above and beyond what would otherwise be escaped from the CLI?
For instance if i print the variable p,
char *p = "aaa\"aaa\naaa\raaa\\aaa";
from the cli I get,
(gdb) p p
$1 = 0x400584 "aaa\"aaa\naaa\raaa\\aaa"
from MI I get,
p p
~"$2 = 0x400584 \"aaa\\\"aaa\\naaa\\raaa\\\\aaa\""
would be?
The function mi-out.c:mi_field_string might be a clue?
Thanks,
Bob Rossi
Does anyone know what characters GDB escapes in the GDB/MI protocol
above and beyond what would otherwise be escaped from the CLI?
For instance if i print the variable p,
char *p = "aaa\"aaa\naaa\raaa\\aaa";
from the cli I get,
(gdb) p p
$1 = 0x400584 "aaa\"aaa\naaa\raaa\\aaa"
from MI I get,
p p
~"$2 = 0x400584 \"aaa\\\"aaa\\naaa\\raaa\\\\aaa\""
From the output I can see that \ and " are escaped in MI output above
and beyond what is escaped in the CLI. Are there other characters thatwould be?
The function mi-out.c:mi_field_string might be a clue?
Thanks,
Bob Rossi