Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Handle the 'z' or 'Z' breakpoint remove or set packets

Proto:static void gdb_cmd_break(struct kgdb_state *ks)

Type:void

Parameter:

TypeParameterName
struct kgdb_state *ks
856  bpt_type = Our I/O buffers. [1]
857  ptr = Our I/O buffers. [2]
860  error = 0
862  If set_hw_breakpoint && bpt_type >= '1' Then
864  If bpt_type > '4' Then Return
866  Else
867  If bpt_type != '0' && bpt_type != '1' Then Return
876  If bpt_type == '1' && Not (flags & KGDB_HW_BREAKPOINT) Then Return
880  If * ptr++ != ',' Then
881  error_packet(remcom_out_buffer, - EINVAL)
882  Return
884  If Not While we find nice hex chars, build a long_val.* Return number of chars processed. Then
885  error_packet(remcom_out_buffer, - EINVAL)
886  Return
888  If * ptr++ != ',' || Not While we find nice hex chars, build a long_val.* Return number of chars processed. Then
890  error_packet(remcom_out_buffer, - EINVAL)
891  Return
894  If Our I/O buffers. [0] == 'Z' && bpt_type == '0' Then error = dbg_set_sw_break(addr)
896  Else if Our I/O buffers. [0] == 'z' && bpt_type == '0' Then error = dbg_remove_sw_break(addr)
898  Else if Our I/O buffers. [0] == 'Z' Then error = set_hw_breakpoint(addr, (int)length, * bpt_type - '0')
901  Else if Our I/O buffers. [0] == 'z' Then error = remove_hw_breakpoint(addr, (int)length, * bpt_type - '0')
905  If error == 0 Then strcpy(remcom_out_buffer, "OK")
907  Else error_packet(remcom_out_buffer, error)
Caller
NameDescribe
gdb_serial_stubThis function performs all gdbserial command procesing