<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/scripts/gdb/vmlinux-gdb.py, branch v4.19-rc5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Revert "scripts/gdb: add a Radix Tree Parser"</title>
<updated>2016-07-15T05:54:27+00:00</updated>
<author>
<name>Kieran Bingham</name>
<email>kieran@ksquared.org.uk</email>
</author>
<published>2016-07-14T19:07:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b447e02548a3304c47b78b5e2d75a4312a8f17e1'/>
<id>b447e02548a3304c47b78b5e2d75a4312a8f17e1</id>
<content type='text'>
This reverts commit e127a73d41ac ("scripts/gdb: add a Radix Tree
Parser")

The python implementation of radix-tree was merged at the same time as
the radix-tree system was heavily reworked from commit e9256efcc8e3
("radix-tree: introduce radix_tree_empty") to 3bcadd6fa6c4 ("radix-tree:
free up the bottom bit of exceptional entries for reuse") and no longer
functions, but also prevents other gdb scripts from loading.

This functionality has not yet hit a release, so simply remove it for
now

Link: http://lkml.kernel.org/r/1467127337-11135-6-git-send-email-kieran@bingham.xyz
Signed-off-by: Kieran Bingham &lt;kieran@bingham.xyz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e127a73d41ac ("scripts/gdb: add a Radix Tree
Parser")

The python implementation of radix-tree was merged at the same time as
the radix-tree system was heavily reworked from commit e9256efcc8e3
("radix-tree: introduce radix_tree_empty") to 3bcadd6fa6c4 ("radix-tree:
free up the bottom bit of exceptional entries for reuse") and no longer
functions, but also prevents other gdb scripts from loading.

This functionality has not yet hit a release, so simply remove it for
now

Link: http://lkml.kernel.org/r/1467127337-11135-6-git-send-email-kieran@bingham.xyz
Signed-off-by: Kieran Bingham &lt;kieran@bingham.xyz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: add a Radix Tree Parser</title>
<updated>2016-05-24T00:04:14+00:00</updated>
<author>
<name>Kieran Bingham</name>
<email>kieran.bingham@linaro.org</email>
</author>
<published>2016-05-23T23:25:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e127a73d41ac471d7e3ba950cf128f42d6ee3448'/>
<id>e127a73d41ac471d7e3ba950cf128f42d6ee3448</id>
<content type='text'>
Linux makes use of the Radix Tree data structure to store pointers
indexed by integer values.  This structure is utilised across many
structures in the kernel including the IRQ descriptor tables, and
several filesystems.

This module provides a method to lookup values from a structure given
its head node.

Usage:

The function lx_radix_tree_lookup, must be given a symbol of type struct
radix_tree_root, and an index into that tree.

The object returned is a generic integer value, and must be cast
correctly to the type based on the storage in the data structure.

For example, to print the irq descriptor in the sparse irq_desc_tree at
index 18, try the following:

 (gdb) print (struct irq_desc)$lx_radix_tree_lookup(irq_desc_tree, 18)

Link: http://lkml.kernel.org/r/d2028c55e50cf95a9b7f8ca0d11885174b0cc709.1462865983.git.jan.kiszka@siemens.com
Signed-off-by: Kieran Bingham &lt;kieran.bingham@linaro.org&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Linux makes use of the Radix Tree data structure to store pointers
indexed by integer values.  This structure is utilised across many
structures in the kernel including the IRQ descriptor tables, and
several filesystems.

This module provides a method to lookup values from a structure given
its head node.

Usage:

The function lx_radix_tree_lookup, must be given a symbol of type struct
radix_tree_root, and an index into that tree.

The object returned is a generic integer value, and must be cast
correctly to the type based on the storage in the data structure.

For example, to print the irq descriptor in the sparse irq_desc_tree at
index 18, try the following:

 (gdb) print (struct irq_desc)$lx_radix_tree_lookup(irq_desc_tree, 18)

Link: http://lkml.kernel.org/r/d2028c55e50cf95a9b7f8ca0d11885174b0cc709.1462865983.git.jan.kiszka@siemens.com
Signed-off-by: Kieran Bingham &lt;kieran.bingham@linaro.org&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: provide linux constants</title>
<updated>2016-05-24T00:04:14+00:00</updated>
<author>
<name>Kieran Bingham</name>
<email>kieran.bingham@linaro.org</email>
</author>
<published>2016-05-23T23:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f197d75fcad125f41cc6e2fdf1b3ea733db995f1'/>
<id>f197d75fcad125f41cc6e2fdf1b3ea733db995f1</id>
<content type='text'>
Some macro's and defines are needed when parsing memory, and without
compiling the kernel as -g3 they are not available in the debug-symbols.

We use the pre-processor here to extract constants to a dedicated module
for the linux debugger extensions

Top level Kbuild is used to call in and generate the constants file,
while maintaining dependencies on autogenerated files in
include/generated

Link: http://lkml.kernel.org/r/bc3df9c25f57ea72177c066a51a446fc19e2c27f.1462865983.git.jan.kiszka@siemens.com
Signed-off-by: Kieran Bingham &lt;kieran.bingham@linaro.org&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some macro's and defines are needed when parsing memory, and without
compiling the kernel as -g3 they are not available in the debug-symbols.

We use the pre-processor here to extract constants to a dedicated module
for the linux debugger extensions

Top level Kbuild is used to call in and generate the constants file,
while maintaining dependencies on autogenerated files in
include/generated

Link: http://lkml.kernel.org/r/bc3df9c25f57ea72177c066a51a446fc19e2c27f.1462865983.git.jan.kiszka@siemens.com
Signed-off-by: Kieran Bingham &lt;kieran.bingham@linaro.org&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: add version command</title>
<updated>2016-03-22T22:36:02+00:00</updated>
<author>
<name>Kieran Bingham</name>
<email>kieran.bingham@linaro.org</email>
</author>
<published>2016-03-22T21:27:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d061d999424efd99e30fa4115c7dced07533223'/>
<id>2d061d999424efd99e30fa4115c7dced07533223</id>
<content type='text'>
lx-version Report the Linux Version of the current kernel.

Add a command to identify the version specified by the banner in the
debugged kernel.

This lets the user identify the kernel of the running kernel, and will
let later scripts compare the banner of the attached kernel against the
banner in the vmlinux symbols files to verify that the files are
correct.

[jan.kiszka@siemens.com: remove blank line from help output and fix pep8 warning]
Signed-off-by: Kieran Bingham &lt;kieran.bingham@linaro.org&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lx-version Report the Linux Version of the current kernel.

Add a command to identify the version specified by the banner in the
debugged kernel.

This lets the user identify the kernel of the running kernel, and will
let later scripts compare the banner of the attached kernel against the
banner in the vmlinux symbols files to verify that the files are
correct.

[jan.kiszka@siemens.com: remove blank line from help output and fix pep8 warning]
Signed-off-by: Kieran Bingham &lt;kieran.bingham@linaro.org&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: add command to check list consistency</title>
<updated>2015-07-01T02:44:57+00:00</updated>
<author>
<name>Thiébaud Weksteen</name>
<email>thiebaud@weksteen.fr</email>
</author>
<published>2015-06-30T21:58:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=084f6b1ec65170c2f8e38688bc83ff15b9a963e0'/>
<id>084f6b1ec65170c2f8e38688bc83ff15b9a963e0</id>
<content type='text'>
Add a gdb script to verify the consistency of lists.

Signed-off-by: Thiébaud Weksteen &lt;thiebaud@weksteen.fr&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a gdb script to verify the consistency of lists.

Signed-off-by: Thiébaud Weksteen &lt;thiebaud@weksteen.fr&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: add internal helper and convenience function for per-cpu lookup</title>
<updated>2015-02-17T22:34:54+00:00</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2015-02-17T21:47:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fe7f9ed98dad611ceaf17403f1c5bfd016eadcaa'/>
<id>fe7f9ed98dad611ceaf17403f1c5bfd016eadcaa</id>
<content type='text'>
This function allows to obtain a per-cpu variable, either of the current
or an explicitly specified CPU.

Note: sparc64 version is untested.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function allows to obtain a per-cpu variable, either of the current
or an explicitly specified CPU.

Note: sparc64 version is untested.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: add helper and convenience function to look up tasks</title>
<updated>2015-02-17T22:34:54+00:00</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2015-02-17T21:47:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4752871081ba4fbb3c539488a95e77d8011bfe49'/>
<id>4752871081ba4fbb3c539488a95e77d8011bfe49</id>
<content type='text'>
Add the helper task_by_pid that can look up a task by its PID.  Also
export it as a convenience function.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the helper task_by_pid that can look up a task by its PID.  Also
export it as a convenience function.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: add lx-dmesg command</title>
<updated>2015-02-17T22:34:53+00:00</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2015-02-17T21:47:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ae7dbaad23f0346dc4e2476be63a9a5a376ee472'/>
<id>ae7dbaad23f0346dc4e2476be63a9a5a376ee472</id>
<content type='text'>
This pokes into the log buffer of the debugged kernel, dumping it to the
gdb console.  Helping in case the target should or can no longer execute
dmesg itself.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pokes into the log buffer of the debugged kernel, dumping it to the
gdb console.  Helping in case the target should or can no longer execute
dmesg itself.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: add internal helper and convenience function to look up a module</title>
<updated>2015-02-17T22:34:53+00:00</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2015-02-17T21:46:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7b599ef535a7faef53034fb7fb150b61057efe28'/>
<id>7b599ef535a7faef53034fb7fb150b61057efe28</id>
<content type='text'>
Add the internal helper get_module_by_name to obtain the module structure
corresponding to the given name.  Also export this service as a
convenience function.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the internal helper get_module_by_name to obtain the module structure
corresponding to the given name.  Also export this service as a
convenience function.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb: add lx-symbols command</title>
<updated>2015-02-17T22:34:53+00:00</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2015-02-17T21:46:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=66051720b84127cac32f34a30c91390c0ebf898f'/>
<id>66051720b84127cac32f34a30c91390c0ebf898f</id>
<content type='text'>
This is probably the most useful helper when debugging kernel modules:
lx-symbols first reloads vmlinux.  Then it searches recursively for *.ko
files in the specified paths and the current directory.  Finally it walks
the kernel's module list, issuing the necessary add-symbol-file command
for each loaded module so that gdb knows which module symbol corresponds
to which address.  It also looks up variable sections (bss, data, rodata)
and appends their address to the add-symbole-file command line.  This
allows to access global module variables just like any other variable.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is probably the most useful helper when debugging kernel modules:
lx-symbols first reloads vmlinux.  Then it searches recursively for *.ko
files in the specified paths and the current directory.  Finally it walks
the kernel's module list, issuing the necessary add-symbol-file command
for each loaded module so that gdb knows which module symbol corresponds
to which address.  It also looks up variable sections (bss, data, rodata)
and appends their address to the add-symbole-file command line.  This
allows to access global module variables just like any other variable.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
