Display stack of current execution context Usage: MYNAME [linecount]
(self, *arg)
| 4327 | |
| 4328 | @msg.bufferize |
| 4329 | def context_stack(self, *arg): |
| 4330 | """ |
| 4331 | Display stack of current execution context |
| 4332 | Usage: |
| 4333 | MYNAME [linecount] |
| 4334 | """ |
| 4335 | (count,) = normalize_argv(arg, 1) |
| 4336 | |
| 4337 | if not self._is_running(): |
| 4338 | return |
| 4339 | |
| 4340 | text = blue("[%s]" % "stack".center(78, "-")) |
| 4341 | msg(text) |
| 4342 | sp = peda.getreg("sp") |
| 4343 | if peda.is_address(sp): |
| 4344 | self.telescope(sp, count) |
| 4345 | else: |
| 4346 | msg("Invalid $SP address: 0x%x" % sp, "red") |
| 4347 | |
| 4348 | return |
| 4349 | |
| 4350 | def context(self, *arg): |
| 4351 | """ |
no test coverage detected