Function report |
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 activity | Download SCCT | Chinese |
Name:This function performs all gdbserial command procesing
Proto:int gdb_serial_stub(struct kgdb_state *ks)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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) |
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++ = ';' |
970 | When 1 cycle |
971 | error = 0 |
974 | memset(remcom_out_buffer, 0, size of remcom_out_buffer ) |
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' |
1013 | If Handle the 'R' reboot packets Then Go to default_handle |
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' |
1046 | If kgdb_contthread && kgdb_contthread != current process Then |
1048 | error_packet(remcom_out_buffer, - EINVAL) |
1049 | Break |
1053 | Default |
1054 | default_handle : |
1065 | If error >= 0 || Our I/O buffers. [0] == 'D' || Our I/O buffers. [0] == 'k' Then |
1077 | kgdb_exit : |
1078 | If pass_exception Then error = 1 |
1080 | Return error |
Name | Describe |
---|---|
kgdb_cpu_enter |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |