Re: [PATCH v2 0/2] GDB: Support getting current task struct in UML

2023-02-16 Thread Jan Kiszka
# differently than other x86 sub architectures > +var_ptr = gdb.parse_and_eval("(struct task_struct > *)cpu_tasks[0].task") > +return var_ptr.dereference() > +else: > @@ scripts/gdb/linux/cpus.py: def get_current_task(cpu): >

Re: [PATCH 2/2] scripts/gdb: Support getting current task struct in UML

2023-02-15 Thread Jan Kiszka
On 15.02.23 16:55, Glenn Washburn wrote: > On Wed, 15 Feb 2023 08:45:20 +0100 > Jan Kiszka wrote: > >> On 15.02.23 00:35, Glenn Washburn wrote: >>> A running x86 UML kernel reports with architecture "i386:x86-64" as >>> it is a sub-architecture

Re: [PATCH 2/2] scripts/gdb: Support getting current task struct in UML

2023-02-15 Thread Jan Kiszka
On 15.02.23 00:35, Glenn Washburn wrote: > A running x86 UML kernel reports with architecture "i386:x86-64" as > it is a sub-architecture. However, a difference with bare-metal x86 > kernels is in how it manages tasks and the current task struct. To > identify that the inferior is a UML kernel and

Re: [PATCH 1/2] scripts/gdb: Correct indentation in get_current_task

2023-02-14 Thread Jan Kiszka
On 15.02.23 00:35, Glenn Washburn wrote: > There is an extra space in a couple blocks in get_current_task. > Though python does not care, let's make the spacing consistent. > > Signed-off-by: Glenn Washburn > --- > scripts/gdb/linux/cpus.py | 18 +- > 1 file changed, 9 insertions