History

scripts/gdb: fix 'lx-current' for x86

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.

Jeff Xie committed 3 years ago

Commit c16a3b11 parent 67222c41 file · +1 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/gdb/linux/cpus.py+1−1
@@ -163,7 +163,7 @@ def get_current_task(cpu): · 162 unmodified lines
163163 task_ptr_type = task_type.get_type().pointer()
164164
165165 if utils.is_target_arch("x86"):
166− var_ptr = gdb.parse_and_eval("&current_task")
166+ var_ptr = gdb.parse_and_eval("&pcpu_hot.current_task")
167167 return per_cpu(var_ptr, cpu).dereference()
168168 elif utils.is_target_arch("aarch64"):
169169 current_task_addr = gdb.parse_and_eval("$SP_EL0")