Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This function performs all gdbserial command procesing

Proto:int gdb_serial_stub(struct kgdb_state *ks)

Type:int

Parameter:

TypeParameterName
struct kgdb_state *ks
946  error = 0
950  memset(remcom_out_buffer, 0, size of remcom_out_buffer )
951  kgdb_usethread = task
952  kgdb_usethreadid = Remap normal tasks to their real PID,* CPU shadow threads are mapped to -CPU - 2
953  pass_exception = 0
955  If kgdb_connected - Is a host GDB connected to us? Then
960  ptr = remcom_out_buffer
961  ptr++ = 'T'
962  ptr = hex_byte_pack(ptr, signo)
963  ptr += strlen - Find the length of a string*@s: The string to be sized
964  int_to_threadref(thref, Remap normal tasks to their real PID,* CPU shadow threads are mapped to -CPU - 2)
965  ptr = pack_threadid(ptr, thref)
966  ptr++ = ';'
967  Send the packet in buffer.* Check for gdb connection if asked for.
970  When 1 cycle
971  error = 0
974  memset(remcom_out_buffer, 0, size of remcom_out_buffer )
976  scan for the sequence $#
979  Case Our I/O buffers. [0] == '?'
981  Break
982  Case Our I/O buffers. [0] == 'g'
984  Break
985  Case Our I/O buffers. [0] == 'G'
987  Break
988  Case Our I/O buffers. [0] == 'm'
990  Break
991  Case Our I/O buffers. [0] == 'M'
993  Break
1002  Case Our I/O buffers. [0] == 'X'
1004  Break
1008  Case Our I/O buffers. [0] == 'D'
1009  Case Our I/O buffers. [0] == 'k'
1011  Go to default_handle
1012  Case Our I/O buffers. [0] == 'R'
1015  Break
1016  Case Our I/O buffers. [0] == 'q'
1018  Break
1019  Case Our I/O buffers. [0] == 'H'
1021  Break
1022  Case Our I/O buffers. [0] == 'T'
1024  Break
1025  Case Our I/O buffers. [0] == 'z'
1026  Case Our I/O buffers. [0] == 'Z'
1028  Break
1030  Case Our I/O buffers. [0] == '3'
1031  If Our I/O buffers. [1] == '\0' Then
1037  Case Our I/O buffers. [0] == 'C'
1039  If tmp > 0 Then Go to default_handle
1041  If tmp == 0 Then Break
1044  Case Our I/O buffers. [0] == 'c'
1045  Case Our I/O buffers. [0] == 's'
1049  Break
1053  Default
1054  default_handle :
1065  If error >= 0 || Our I/O buffers. [0] == 'D' || Our I/O buffers. [0] == 'k' Then
1067  error = 0
1068  Go to kgdb_exit
1074  Send the packet in buffer.* Check for gdb connection if asked for.
1077  kgdb_exit :
1078  If pass_exception Then error = 1
1080  Return error
Caller
NameDescribe
kgdb_cpu_enter