-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrace: Add type casting feature for saved variables
Signed-off-by: iipeace <[email protected]>
- Loading branch information
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
__credits__ = "Peace Lee" | ||
__license__ = "GPLv2" | ||
__version__ = "3.9.8" | ||
__revision__ = "231207" | ||
__revision__ = "231210" | ||
__maintainer__ = "Peace Lee" | ||
__email__ = "[email protected]" | ||
__repository__ = "https://github.com/iipeace/guider" | ||
|
@@ -34985,7 +34985,7 @@ def printHelp(force=False, isExit=True): | |
rdmem print specific memory or register [VAR|ADDR|REG:SIZE] | ||
repeat call again repeatedly [CNT] | ||
ret return specific value immediately [VAL] | ||
save save previous value [VAR] | ||
save save previous or specific or argument value [VAR:VAL:TYPE] | ||
setarg change value for specific register [REG#VAR|VAL] | ||
setenv change specific environment variable [VAR:VAR|VAL] | ||
setret change return value [VAL:CMD] | ||
|
@@ -35341,6 +35341,7 @@ def printHelp(force=False, isExit=True): | |
|
||
- {5:1} {7:1} and run multiple commands when specific function calls return | ||
# {0:1} {1:1} {9:1} -c "write|getret:sleep:1\\$exec:ls\\$stop" | ||
# {0:1} {1:1} {9:1} -c "write|getret:save:VAR1\\$rdmem:@VAR1" | ||
|
||
- {5:1} {7:1} and print resource usage for tasks | ||
# {0:1} {1:1} {9:1} -c "*loadData*|getret:proctop:a.out|proctop:a.out" | ||
|
@@ -35386,9 +35387,11 @@ def printHelp(force=False, isExit=True): | |
- {5:1} and print python contexts {4:1} {7:1} | ||
# {0:1} {1:1} {9:1} -c "write|print" -q PYSTACK | ||
|
||
- {5:1} and save specific values to specific variables {4:1} {7:1} | ||
# {0:1} {1:1} {9:1} -c "write|save:VAR1|print:VAR1|save:VAR2:123" | ||
- {5:1} and save specific values to specific variables and handle them {4:1} {7:1} | ||
# {0:1} {1:1} {9:1} -c "write|save:VAR1:123|print:VAR1" | ||
# {0:1} {1:1} {9:1} -c "write|save:ARG1:1:arg|print:VAR1" | ||
# {0:1} {1:1} {9:1} -c "write|save:VAR1:1|save:VAR1:@VAR1:float|print:VAR1" | ||
# {0:1} {1:1} {9:1} -c "write|getret|save:VAR1|print:VAR1" | ||
|
||
- {5:1} and print call contexts if only specific conditions are met {4:1} {7:1} | ||
# {0:1} {1:1} {9:1} -c "write|filter:2:EQ:4096" | ||
|
@@ -83347,12 +83350,17 @@ def _getFunc(): | |
cmdlist = cmdset[1].split(":") | ||
var = cmdlist[0] | ||
|
||
# set target data # | ||
if len(cmdlist) == 1: | ||
data = self.prevReturn | ||
else: | ||
data = cmdlist[1] | ||
if not data: | ||
data = self.prevReturn | ||
elif data.startswith("@") and len(data) > 1: | ||
vardata = self.retList.get(data[1:]) | ||
if vardata: | ||
data = vardata | ||
|
||
# convert type # | ||
if len(cmdlist) == 3: | ||
|