_ss: rename to ssd

This commit is contained in:
Dr-Carlos 2022-12-18 08:02:08 +10:30
parent 6b45ad0661
commit b969f48894
1 changed files with 14 additions and 14 deletions

View File

@ -242,10 +242,10 @@ void _s4(Session &session, uint32_t value, std::vector<MemoryRegion> &regions)
}
//---
// ss
// ssd
//---
struct _ss_args
struct _ssd_args
{
/* String to find */
std::string pattern;
@ -255,9 +255,9 @@ struct _ss_args
bool identify_claims;
};
static _ss_args parse_ss(Session &session, Parser &parser)
static _ssd_args parse_ssd(Session &session, Parser &parser)
{
_ss_args args;
_ssd_args args;
args.identify_claims = true;
parser.option("claims", [&args](std::string const &value) {
@ -299,7 +299,7 @@ static _ss_args parse_ss(Session &session, Parser &parser)
return args;
}
void _ss(Session &session, char const *pattern, bool identify_claims,
void _ssd(Session &session, char const *pattern, bool identify_claims,
std::string vspace_name)
{
VirtualSpace *space = session.current_space;
@ -555,28 +555,28 @@ sh align=4 "b4..0000"
all currently bound regions.
)");
static ShellCommand _ss_cmd(
"ss",
static ShellCommand _ssd_cmd(
"ssd",
[](Session &s, Parser &p) {
auto args = parse_ss(s, p);
_ss(s, args.pattern.c_str(), args.identify_claims, args.vspace_name);
auto args = parse_ssd(s, p);
_ssd(s, args.pattern.c_str(), args.identify_claims, args.vspace_name);
},
[](Session &s, Parser &p) { parse_ss(s, p); }, "Search string",
[](Session &s, Parser &p) { parse_ssd(s, p); }, "Search string",
R"(
ss [claims=true] [vspace=<virtual_space>] "<pattern>"
ssd [claims=true] [vspace=<virtual_space>] "<pattern>"
Searches disassembly from $ to the last analysed instruction for a string
pattern. If claims=true, the resulting addresses are then checked for claims so
that the command can output whether it is within a syscall, and what the names
of those syscalls are.
ss "%12a8"
ssd "%12a8"
Searches for all usages of syscall 0x12a8 and print which syscalls they are
within.
ss claims=false "%12a8"
ssd claims=false "%12a8"
Searches for all usages of syscall 0x12a8.
ss claims=false vspace=cg_2.00 "%12a8"
ssd claims=false vspace=cg_2.00 "%12a8"
Searches for all usages of syscall 0x12a8 within the 'cg_2.00' virtual space.
)");