Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\gdbstub.c Create Date:2022-07-28 11:38:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:scan for the sequence $<data>#<checksum>

Proto:static void get_packet(char *buffer)

Type:void

Parameter:

TypeParameterName
char *buffer
98  Do
103  When (ch = GDB remote protocol parser:) != '$' cycle
106  kgdb_connected - Is a host GDB connected to us? = 1
107  checksum = 0
108  xmitcsum = -1
110  count = 0
115  When count < BUFMAX - 1 cycle
117  If ch == '#' Then Break
119  checksum = checksum + ch
120  buffer[count] = ch
121  count = count + 1
124  If ch == '#' Then
128  If checksum != xmitcsum Then write_char('-')
131  Else write_char('+')
134  If flush Then flush()
137  buffer[count] = 0
138  When checksum != xmitcsum cycle
Caller
NameDescribe
gdb_serial_stubThis function performs all gdbserial command procesing