133 if (libptr != null) { 134 try { 135 nextDwarf = new DwarfParser(libptr); 136 } catch (DebuggerException e) { 137 // Bail out to Java frame 138 } 139 } 140 } 141 142 if (nextDwarf != null) { 143 nextDwarf.processDwarf(nextPC); 144 } 145 146 return nextDwarf; 147 } 148 149 @Override 150 public CFrame sender(ThreadProxy thread) { 151 ThreadContext context = thread.getContext(); 152 153 Address nextPC = getNextPC(dwarf != null); 154 if (nextPC == null) { 155 return null; 156 } 157 158 DwarfParser nextDwarf = getNextDwarf(nextPC); 159 Address nextCFA = getNextCFA(nextDwarf, context); 160 return isValidFrame(nextCFA, context) ? new LinuxAMD64CFrame(dbg, nextCFA, nextPC, nextDwarf) 161 : null; 162 } 163 164 // package/class internals only 165 private static final int ADDRESS_SIZE = 8; 166 private Address rip; 167 private Address cfa; 168 private LinuxDebugger dbg; 169 private DwarfParser dwarf; 170 } | 133 if (libptr != null) { 134 try { 135 nextDwarf = new DwarfParser(libptr); 136 } catch (DebuggerException e) { 137 // Bail out to Java frame 138 } 139 } 140 } 141 142 if (nextDwarf != null) { 143 nextDwarf.processDwarf(nextPC); 144 } 145 146 return nextDwarf; 147 } 148 149 @Override 150 public CFrame sender(ThreadProxy thread) { 151 ThreadContext context = thread.getContext(); 152 153 Address nextPC; 154 DwarfParser nextDwarf; 155 try { 156 nextPC = getNextPC(dwarf != null); 157 if (nextPC == null) { 158 return null; 159 } 160 nextDwarf = getNextDwarf(nextPC); 161 } catch (DebuggerException e) { // Bail out to Java frame case 162 nextDwarf = null; 163 nextPC = getNextPC(false); 164 if (nextPC == null) { 165 return null; 166 } 167 } 168 169 Address nextCFA = getNextCFA(nextDwarf, context); 170 return isValidFrame(nextCFA, context) ? new LinuxAMD64CFrame(dbg, nextCFA, nextPC, nextDwarf) 171 : null; 172 } 173 174 // package/class internals only 175 private static final int ADDRESS_SIZE = 8; 176 private Address rip; 177 private Address cfa; 178 private LinuxDebugger dbg; 179 private DwarfParser dwarf; 180 } |