| 682 | ssw << "--> local variables\n"; |
| 683 | } |
| 684 | virtual void onVariable ( FuncInfo *, LocalVariableInfo * lv, void * addr, bool inScope ) override { |
| 685 | ssw << "\t" << lv->name |
| 686 | << ": " << debug_type(lv); |
| 687 | string location; |
| 688 | if ( !inScope ) { |
| 689 | } else if ( lv->cmres ) { |
| 690 | location = "CMRES"; |
| 691 | } else if ( lv->isRefValue( ) ) { |
| 692 | location = "ref *(sp + " + to_string(lv->stackTop) + ")"; |
| 693 | } else { |
| 694 | location = "sp + " + to_string(lv->stackTop); |
| 695 | } |
| 696 | if ( addr ) { |
| 697 | ssw << " = \t" << debug_value(addr, lv, PrintFlags::stackwalker) |
| 698 | << " at " << location |
| 699 | << " 0x" << HEX << intptr_t(addr) << DEC |
| 700 | << "\n"; |
| 701 | } else { |
| 702 | if ( !inScope ) { |
| 703 | ssw << "\t// variable out of scope\n"; |
| 704 | } else { |
| 705 | ssw << "\t// variable was optimized out\n"; |
| 706 | } |
| 707 | } |
| 708 | } |
| 709 | virtual bool onAfterCall ( Prologue * ) override { |
| 710 | return !stackTopOnly; |
| 711 | } |
no test coverage detected