diff --git a/model/task/environment/openmp/capture/gomp/GOMP_task.py b/model/task/environment/openmp/capture/gomp/GOMP_task.py index 6fd67b08f56df5e4949f25b65498801d58bcce3d..31a2adf5903851740f673dd4b290e16887d09315 100644 --- a/model/task/environment/openmp/capture/gomp/GOMP_task.py +++ b/model/task/environment/openmp/capture/gomp/GOMP_task.py @@ -165,7 +165,7 @@ class GOMP_task_function_Breakpoint(OmpFunctionBreakpoint): taskjob = self.identify() if taskjob is None: - log.warn("Could not identify the current task.") + log.error("Could not identify the task currently running ...") return True, False, data else: data["taskjob"] = taskjob @@ -191,17 +191,20 @@ class GOMP_task_function_Breakpoint(OmpFunctionBreakpoint): def identify(self): task = None + try: task = gdb.newest_frame().older().read_var("child_task") if task.is_optimized_out: task = None except ValueError: pass - + if task is None: - assert gdb.newest_frame().older().name() == "GOMP_taskwait" try: + #assert gdb.newest_frame().older().name() == "GOMP_taskwait" task_ptr = gdb.newest_frame().older().read_register("r14") + if int(task_ptr) == 0: + raise ValueError("Task pointer shouldn't be NULL...") except ValueError as e: log.critical("Could not read task register: {}".format(e)) log.error("Maybe it's not the right architecture ... ?")