mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 08:38:45 +02:00 
			
		
		
		
	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. Becausee57ef2ed97("x86: Put hot per CPU variables into a struct") changed it. Link: https://lkml.kernel.org/r/20230204090139.1789264-1-xiehuan09@gmail.com Fixes:e57ef2ed97("x86: Put hot per CPU variables into a struct") Signed-off-by: Jeff Xie <xiehuan09@gmail.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									67222c4ba8
								
							
						
					
					
						commit
						c16a3b11ea
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -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") | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Jeff Xie
						Jeff Xie