Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:int kgdb_hex2mem(char *buf, char *mem, int count)

Type:int

Parameter:

TypeParameterName
char *buf
char *mem
intcount
277  tmp_raw = buf + count * 2
279  tmp_hex = tmp_raw - 1
280  When tmp_hex >= buf cycle
281  tmp_raw--
282  tmp_raw = hex_to_bin - convert a hex digit to its real value*@ch: ascii character represents hex digit* hex_to_bin() converts one hex digit to its actual value or -1 in case of bad* input.
283  tmp_raw |= hex_to_bin - convert a hex digit to its real value*@ch: ascii character represents hex digit* hex_to_bin() converts one hex digit to its actual value or -1 in case of bad* input. << 4
286  Return probe_kernel_write(): safely attempt to write to a location*@dst: address to write to*@src: pointer to the data that shall be written*@size: size of the data chunk* Safely write to address @dst from the buffer at @src. If a kernel fault
Caller
NameDescribe
write_mem_msgWrite memory due to an 'M' or 'X' packet.
gdb_cmd_setregsHandle the 'G' set registers request
gdb_cmd_queryHandle the 'q' query packets