[decompiler/compiler] Fixes for task-control (#668)

* fix decompiler for task control

* support in compiler

* changelog

* typo
This commit is contained in:
water111
2021-07-01 21:38:19 -04:00
committed by GitHub
parent d4e68e7ef4
commit 4bea175140
29 changed files with 343 additions and 116 deletions
+5 -1
View File
@@ -104,7 +104,11 @@ Function& LinkedObjectFile::get_function_at_label(int label_id) {
* Get the function starting at this label, or nullptr if there is none.
*/
const Function* LinkedObjectFile::try_get_function_at_label(int label_id) const {
auto& label = labels.at(label_id);
const auto& label = labels.at(label_id);
return try_get_function_at_label(label);
}
const Function* LinkedObjectFile::try_get_function_at_label(const DecompilerLabel& label) const {
for (auto& func : functions_by_seg.at(label.target_segment)) {
// + 4 to skip past type tag to the first word, which is were the label points.
if (func.start_word * 4 + 4 == label.offset) {