]> git.baikalelectronics.ru Git - kernel.git/commit
kgdb/kgdbts: support ppc64
authorTiejun Chen <tiejun.chen@windriver.com>
Wed, 27 Feb 2013 03:09:27 +0000 (11:09 +0800)
committerJason Wessel <jason.wessel@windriver.com>
Sat, 2 Mar 2013 14:52:17 +0000 (08:52 -0600)
commit3e8812ad8dfe757bce80c656d22ffd00fd3187c7
tree457450b97550e956f954a843a52f4a2ebbea1160
parent48a5f8602309ed32d46dae200f54c11d392e1e57
kgdb/kgdbts: support ppc64

We can't look up the address of the entry point of the function simply
via that function symbol for all architectures.

For PPC64 ABI, actually there is a function descriptors structure.

A function descriptor is a three doubleword data structure that contains
the following values:
* The first doubleword contains the address of the entry point of
the function.
* The second doubleword contains the TOC base address for
the function.
* The third doubleword contains the environment pointer for
languages such as Pascal and PL/1.

So we should call a wapperred dereference_function_descriptor() to get
the address of the entry point of the function.

Note this is also safe for other architecture after refer to
"include/asm-generic/sections.h" since:

dereference_function_descriptor(p) always is (p) if without arched definition.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
drivers/misc/kgdbts.c