Skip to content

Commit c16a3b1

Browse files
Jeff Xieakpm00
authored andcommitted
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 e57ef2e ("x86: Put hot per CPU variables into a struct") changed it. Link: https://lkml.kernel.org/r/[email protected] Fixes: e57ef2e ("x86: Put hot per CPU variables into a struct") Signed-off-by: Jeff Xie <[email protected]> Cc: Jan Kiszka <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 67222c4 commit c16a3b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/gdb/linux/cpus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def get_current_task(cpu):
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")

0 commit comments

Comments
 (0)