When printing the name of the current process, it will report an error: (gdb) p $lx_current().comm Python Exception <class 'gdb.error'> No symbol "current_task" in current context.: Error occurred in Python: No symbol "current_task" in current context. Because e57ef2ed97c1 ("x86: Put hot per CPU variables into a struct") changed it.
Unified · Split
| @@ -163,7 +163,7 @@ def get_current_task(cpu): · 162 unmodified lines | |||
| 163 | task_ptr_type = task_type.get_type().pointer() | 163 | task_ptr_type = task_type.get_type().pointer() |
| 164 | 164 | ||
| 165 | if utils.is_target_arch("x86"): | 165 | if utils.is_target_arch("x86"): |
| 166 | var_ptr = gdb.parse_and_eval("¤t_task") | 166 | var_ptr = gdb.parse_and_eval("&pcpu_hot.current_task") |
| 167 | return per_cpu(var_ptr, cpu).dereference() | 167 | return per_cpu(var_ptr, cpu).dereference() |
| 168 | elif utils.is_target_arch("aarch64"): | 168 | elif utils.is_target_arch("aarch64"): |
| 169 | current_task_addr = gdb.parse_and_eval("$SP_EL0") | 169 | current_task_addr = gdb.parse_and_eval("$SP_EL0") |