mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 06:42:51 +01:00
Add a /S mode to DDB "ex" command, which interprets and prints the
value at the requested address as a symbol. For example, "ex /S aio_swake" prints the name of the function currently registered in via aio_swake hook. The change as committed differs slightly from the patch in the PR, as I force the size of the retrieved value (and the automatic address increment) to be sizeof(void *). This seems to provide the most useful auto-increment behavior, and defaults using the default size (4), which is not sizeof(void *) on 64-bit platforms. MFC after: 3 days PR: 57976 Submitted by: Dan Strick <strick at covad.net>
This commit is contained in:
parent
226bb60e94
commit
7c7b7f8e1b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176914
@ -166,6 +166,12 @@ db_examine(addr, fmt, count)
|
||||
db_printf("\\%03o", (int)value);
|
||||
}
|
||||
break;
|
||||
case 'S': /* symbol */
|
||||
value = db_get_value(addr, sizeof(void *),
|
||||
FALSE);
|
||||
addr += sizeof(void *);
|
||||
db_printsym(value, DB_STGY_ANY);
|
||||
break;
|
||||
case 'i': /* instruction */
|
||||
addr = db_disasm(addr, FALSE);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user