lkml.org 
[lkml]   [2013]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 16/20] scripts/gdb: Add internal helper and convenience function for per-cpu lookup
On 2013-01-29 15:12, Borislav Petkov wrote:
> On Tue, Jan 29, 2013 at 02:56:56PM +0100, Jan Kiszka wrote:
>> Let me guess: You are dumping a weird QEMU/KVM CPU, right?
>
> Nah, I actually have the silicon! :-)
>
> Joking, of course. I wish. I'm booting the guest with -cpu phenom (it
> has been like that since forever in my boot-kernel-in-kvm script) but
> the host is Intel.
>
> If I do this on an AMD host, all is ok:
>
> (gdb) p $lx_per_cpu("cpu_info").x86_vendor_id
> $1 = "AuthenticAMD\000\000\000"
> (gdb) p $lx_per_cpu("cpu_info").x86_model_id
> $2 = "AMD Phenom(tm) 9550 Quad-Core Processor", '\000' <repeats 24 times>
> (gdb)

Remains a bug of QEMU, though possibly a minor one.

>
> [ … ]
>
>>>> +class PerCpu(gdb.Function):
>>>> + __doc__ = "Return per-cpu variable.\n" \
>>>> + "\n" \
>>>> + "$lx_per_cpu(\"VAR\"[, CPU]): Return the per-cpu variable called VAR for the\n" \
>>>> + "given CPU number. If CPU is omitted, the CPU of the current context is used.\n" \
>>>> + "Note that VAR has to be quoted as string."
>>>
>>>
>>> Ok, seriously now:
>>>
>>> apropos shows the "Return per-cpu... " line above. Have you found out
>>> which gdb command shows the rest? help and info both say "Undefined
>>> command".
>>
>> help function lx_...
>>
>> It took me a while to find this, too.
>
> Maybe worth documenting it then at the end of gdb-kernel-debugging.txt?
>

Done. Will come with v6 (if needed), otherwise as an add-on patch.

Thanks,
Jan

--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-01-29 16:02    [W:0.067 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site