Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147272207
D33686.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
828 B
Referenced Files
None
Subscribers
None
D33686.id.diff
View Options
diff --git a/sys/gdb/gdb_packet.c b/sys/gdb/gdb_packet.c
--- a/sys/gdb/gdb_packet.c
+++ b/sys/gdb/gdb_packet.c
@@ -315,24 +315,16 @@
runlen--;
}
}
- if (runlen == 1) {
+ /* Don't emit '$', '#', '+', '-' or a run length below 3. */
+ while (runlen == 1 || runlen == 2 ||
+ runlen + 29 == '$' || runlen + 29 == '#' ||
+ runlen + 29 == '+' || runlen + 29 == '-') {
gdb_cur->gdb_putc(c);
cksum += c;
runlen--;
}
if (runlen == 0)
continue;
- /* Don't emit '$', '#', '+' or '-'. */
- if (runlen == 7) {
- gdb_cur->gdb_putc(c);
- cksum += c;
- runlen--;
- }
- if (runlen == 6 || runlen == 14 || runlen == 16) {
- gdb_cur->gdb_putc(c);
- cksum += c;
- runlen--;
- }
gdb_cur->gdb_putc('*');
cksum += '*';
gdb_cur->gdb_putc(runlen+29);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 10, 2:42 PM (2 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29469788
Default Alt Text
D33686.id.diff (828 B)
Attached To
Mode
D33686: gdb(4): Do not use run length encoding for 3-symbol repetitions
Attached
Detach File
Event Timeline
Log In to Comment