Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Write memory due to an 'M' or 'X' packet.

Proto:static int write_mem_msg(int binary)

Type:int

Parameter:

TypeParameterName
intbinary
370  ptr = Our I/O buffers. [1]
375  If While we find nice hex chars, build a long_val.* Return number of chars processed. > 0 && * ptr++ == ',' && While we find nice hex chars, build a long_val.* Return number of chars processed. > 0 && * ptr++ == ':' Then
377  If binary Then err = Copy the binary array pointed to by buf into mem. Fix $, #, and* 0x7d escaped with 0x7d. Return -EFAULT on failure or 0 on success.* The input buf is overwitten with the result to write to mem.
379  Else err = Convert the hex array pointed to by buf into binary to be placed in* mem. Return a pointer to the character AFTER the last byte* written. May return an error.
381  If err Then Return err
383  If CACHE_FLUSH_IS_SAFE Then flush_icache_range(addr, addr + length)
385  Return 0
388  Return -EINVAL
Caller
NameDescribe
gdb_cmd_memwriteHandle the 'M' memory write bytes
gdb_cmd_binwriteHandle the 'X' memory binary write bytes