Function report |
Source Code:kernel\debug\gdbstub.c |
Create Date:2022-07-28 11:38:50 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Handle the 'q' query packets
Proto:static void gdb_cmd_query(struct kgdb_state *ks)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct kgdb_state * | ks |
| 706 | finished = 0 |
| 709 | Case Our I/O buffers. [1] == 's' |
| 710 | Case Our I/O buffers. [1] == 'f' |
| 711 | If memcmp(Our I/O buffers. + 2, "ThreadInfo", 10) Then Break |
| 714 | i = 0 |
| 715 | remcom_out_buffer[0] = 'm' |
| 716 | ptr = remcom_out_buffer + 1 |
| 717 | If Our I/O buffers. [1] == 'f' Then |
| 719 | for_each_online_cpu(cpu) |
| 720 | thr_query = 0 |
| 721 | int_to_threadref(thref, - cpu - 2) |
| 722 | ptr = pack_threadid(ptr, thref) |
| 723 | * ptr++ = ',' |
| 724 | i++ |
| 730 | int_to_threadref(thref, process id) |
| 731 | ptr = pack_threadid(ptr, thref) |
| 732 | * ptr++ = ',' |
| 733 | thr_query++ |
| 734 | If thr_query % KGDB_MAX_THREAD_QUERY == 0 Then finished = 1 |
| 737 | i++ |
| 740 | *--ptr = '\0' |
| 741 | Break |
| 743 | Case Our I/O buffers. [1] == 'C' |
| 745 | strcpy(remcom_out_buffer, "QC") |
| 747 | int_to_threadref(thref, threadid) |
| 748 | pack_threadid(remcom_out_buffer + 2, thref) |
| 749 | Break |
| 750 | Case Our I/O buffers. [1] == 'T' |
| 751 | If memcmp(Our I/O buffers. + 1, "ThreadExtraInfo,", 16) Then Break |
| 754 | threadid = 0 |
| 755 | ptr = Our I/O buffers. + 17 |
| 757 | If Not getthread(linux_regs, threadid) Then |
| 758 | error_packet(remcom_out_buffer, - EINVAL) |
| 759 | Break |
| 761 | If threadid > 0 Then |
| 765 | Else |
| 772 | Break |
| 774 | Case Our I/O buffers. [1] == 'R' |
| 775 | If strncmp(Our I/O buffers. , "qRcmd,", 6) == 0 Then |
| 778 | If len % 2 != 0 Then |
| 779 | strcpy(remcom_out_buffer, "E01") |
| 780 | Break |
| 785 | remcom_out_buffer[len++] = 0 |
| 787 | kdb_common_init_state(ks) |
| 789 | kdb_common_deinit_state() |
| 791 | strcpy(remcom_out_buffer, "OK") |
| 793 | Break |
| Name | Describe |
|---|---|
| gdb_serial_stub | This function performs all gdbserial command procesing |
| 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 |