Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151693605
D26599.id77664.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
887 B
Referenced Files
None
Subscribers
None
D26599.id77664.diff
View Options
Index: sys/gdb/gdb_main.c
===================================================================
--- sys/gdb/gdb_main.c
+++ sys/gdb/gdb_main.c
@@ -361,9 +361,7 @@
}
/*
- * dst must be 2x strlen(max_src) + 1.
- *
- * Squashes invalid XML characters down to _. Sorry. Then escapes for GDB.
+ * Squashes special XML and GDB characters down to _. Sorry.
*/
static void
qXfer_escape_xmlattr_str(char *dst, size_t dstlen, const char *src)
@@ -384,8 +382,18 @@
/* GDB escape. */
if (strchr(forbidden, c) != NULL) {
+ /*
+ * It would be nice to escape these properly, but to do
+ * it correctly we need to escape them in the transmit
+ * layer, potentially doubling our buffer requirements.
+ * For now, avoid breaking the protocol by squashing
+ * them to underscore.
+ */
+#if 0
*dst++ = '}';
c ^= 0x20;
+#endif
+ c = '_';
}
*dst++ = c;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 1:52 AM (13 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31261350
Default Alt Text
D26599.id77664.diff (887 B)
Attached To
Mode
D26599: gdb(4): Don't escape GDB special characters at application layer
Attached
Detach File
Event Timeline
Log In to Comment