File tree 1 file changed +14
-9
lines changed
lldb/source/Plugins/Process/Utility
1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -95,16 +95,21 @@ uint32_t UnwindDPU::DoGetFrameCount() {
95
95
// have the good value for r22, but it's normal as its frame is not yet set,
96
96
// let's just add 1 to it so that we are sure that it will be seen as the
97
97
// youngest one when comparing StackID). pc is in r23.
98
- Function *fct;
98
+ Function *fct = NULL ;
99
99
GetFunction (&fct, first_pc_addr);
100
- lldb::addr_t start_addr = fct->GetAddressRange ().GetBaseAddress ().GetFileAddress ();
101
- if (((first_pc_addr >= start_addr) && (first_pc_addr < (start_addr + 16 ))) ||
102
- PCIsInstructionReturn (fct, first_pc_addr)) {
103
- prev_frame->cfa ++;
104
- RegisterValue reg_r23;
105
- reg_ctx_sp->ReadRegister (reg_ctx_sp->GetRegisterInfoByName (" r23" ), reg_r23);
106
- SetFrame (&prev_frame, first_r22_value, FORMAT_PC (reg_r23.GetAsUInt32 ()),
107
- reg_ctx_sp);
100
+ if (fct != NULL ) {
101
+ lldb::addr_t start_addr =
102
+ fct->GetAddressRange ().GetBaseAddress ().GetFileAddress ();
103
+ if (((first_pc_addr >= start_addr) &&
104
+ (first_pc_addr < (start_addr + 16 ))) ||
105
+ PCIsInstructionReturn (fct, first_pc_addr)) {
106
+ prev_frame->cfa ++;
107
+ RegisterValue reg_r23;
108
+ reg_ctx_sp->ReadRegister (reg_ctx_sp->GetRegisterInfoByName (" r23" ),
109
+ reg_r23);
110
+ SetFrame (&prev_frame, first_r22_value, FORMAT_PC (reg_r23.GetAsUInt32 ()),
111
+ reg_ctx_sp);
112
+ }
108
113
}
109
114
110
115
while (true ) {
You can’t perform that action at this time.
0 commit comments