| Function report | 
| Source Code: kernel\debug\kdb\kdb_main.c | Create Date:2022-07-28 11:41:45 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:kdb_md
Proto:static int kdb_md(int argc, const char **argv)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| int | argc | |
| const char ** | argv | 
| 1556 | radix = 16 , mdcount = 8 , bytesperword = KDB_WORD_SIZE | 
| 1557 | nosect = 0 | 
| 1561 | offset = 0 | 
| 1562 | symbolic = 0 | 
| 1563 | valid = 0 | 
| 1564 | phys = 0 | 
| 1565 | raw = 0 | 
| 1572 | repeat = mdcount * 16 / bytesperword | 
| 1580 | bytesperword = argv[0][2] - '0' | 
| 1581 | If bytesperword == 0 Then | 
| 1582 | bytesperword = last_bytesperword | 
| 1583 | If bytesperword == 0 Then bytesperword = 4 | 
| 1586 | last_bytesperword = bytesperword | 
| 1587 | repeat = mdcount * 16 / bytesperword | 
| 1593 | mdcount = ( repeat * bytesperword + 15) / 16 | 
| 1596 | last_repeat = repeat | 
| 1604 | If Not valid Then Return KDB return codes from a command or internal kdb function | 
| 1607 | If argc == 0 Then | 
| 1608 | If last_addr == 0 Then Return KDB_ARGCOUNT | 
| 1611 | radix = last_radix | 
| 1612 | bytesperword = last_bytesperword | 
| 1613 | repeat = last_repeat | 
| 1616 | Else mdcount = ( repeat * bytesperword + 15) / 16 | 
| 1620 | If argc Then | 
| 1622 | nextarg = 1 | 
| 1623 | diag = kdbgetaddrarg - This function is responsible for parsing an* address-expression and returning the value of the expression,* symbol name, and offset to the caller | 
| 1627 | If argc > nextarg + 2 Then Return KDB_ARGCOUNT | 
| 1652 | last_repeat = mdcount | 
| 1653 | last_bytesperword = bytesperword | 
| 1654 | Return ret | 
| 1658 | Case radix == 10 | 
| 1659 | fmtchar = 'd' | 
| 1660 | Break | 
| 1661 | Case radix == 16 | 
| 1662 | fmtchar = 'x' | 
| 1663 | Break | 
| 1664 | Case radix == 8 | 
| 1665 | fmtchar = 'o' | 
| 1666 | Break | 
| 1667 | Default | 
| 1668 | Return KDB_BADRADIX | 
| 1671 | last_radix = radix | 
| 1673 | If bytesperword > KDB_WORD_SIZE Then Return KDB_BADWIDTH | 
| 1677 | Case bytesperword == 8 | 
| 1680 | Case bytesperword == 4 | 
| 1683 | Case bytesperword == 2 | 
| 1686 | Case bytesperword == 1 | 
| 1689 | Default | 
| 1690 | Return KDB_BADWIDTH | 
| 1693 | last_repeat = repeat | 
| 1694 | last_bytesperword = bytesperword | 
| 1697 | symbolic = 1 | 
| 1701 | bytesperword = KDB_WORD_SIZE | 
| 1708 | addr &= ~(bytesperword - 1) | 
| 1712 | num = If symbolic Then 1 Else 16 / bytesperword | 
| 1714 | If KDB_FLAG(CMD_INTERRUPT) Then Return 0 | 
| 1717 | If phys Then | 
| 1724 | n = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(num, repeat) | 
| 1727 | addr += bytesperword * n | 
| 1730 | If z > 2 Then | 
| 1732 | kdb_printf(kdb_machreg_fmt0"-"kdb_machreg_fmt0" zero suppressed\n", addr, addr + bytesperword * s - 1) | 
| 1735 | addr += bytesperword * s | 
| 1741 | Return 0 | 
| 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 |