diff options
| author | Jeff Xie <[email protected]> | 2023-02-04 09:01:39 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-02-09 23:56:51 +0000 |
| commit | c16a3b11eaa88872d07f135df94dfa3fbcd05d10 (patch) | |
| tree | 2be17ea9cd0a6c1ba4789beaf3308db18835a839 | |
| parent | lib: parser: optimize match_NUMBER apis to use local array (diff) | |
| download | kernel-c16a3b11eaa88872d07f135df94dfa3fbcd05d10.tar.gz kernel-c16a3b11eaa88872d07f135df94dfa3fbcd05d10.zip | |
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.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: e57ef2ed97c1 ("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]>
| -rw-r--r-- | scripts/gdb/linux/cpus.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gdb/linux/cpus.py b/scripts/gdb/linux/cpus.py index 15fc4626d236..9ee99f9fae8d 100644 --- a/scripts/gdb/linux/cpus.py +++ b/scripts/gdb/linux/cpus.py @@ -163,7 +163,7 @@ def get_current_task(cpu): task_ptr_type = task_type.get_type().pointer() if utils.is_target_arch("x86"): - var_ptr = gdb.parse_and_eval("¤t_task") + var_ptr = gdb.parse_and_eval("&pcpu_hot.current_task") return per_cpu(var_ptr, cpu).dereference() elif utils.is_target_arch("aarch64"): current_task_addr = gdb.parse_and_eval("$SP_EL0") |
