[Crash-utility] [PATCH] netdump: Add a helper function to check if registers is available for a given active task in ELF notes

HATAYAMA Daisuke d.hatayama at jp.fujitsu.com
Fri Apr 1 00:36:52 UTC 2011


Add a helper function, exist_regs_in_elf_notes(tc), which checks
whether or not register values for a given active task is available in
ELF notes.

I intend to use the helper function in gcore extension module. vmcore
generated by diskdump has NT_PRSTATUS for a panic task only, and so
specifying get_regs_from_elf_notes() directly to non-panic active
tasks leads to a fatal action. So, it's necessary to check, in
advance, that an active task can get registers from ELF notes, but the
variable holding vmcore's data including ELF notes', nd, is defined as
a static global variable in netdump.c and thus the new helper function
needs to be introduced.

The change includes:

  1) Add and export exist_regs_in_elf_notes(), and
  2) Merge two kinds of fatal information printed in the case where no
  corresponding register values exist in ELF notes.

 defs.h    |    1 +
 netdump.c |  174 +++++++++++++++++++++++++++++--------------------------------
 2 files changed, 83 insertions(+), 92 deletions(-)

Signed-off-by: HATAYAMA Daisuke <d.hatayama at jp.fujitsu.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Introduce-and-export-exist_regs_in_elf_notes.patch
Type: text/x-patch
Size: 1860 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20110401/1de36939/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Unify-error-check-conditions-and-information-printed.patch
Type: text/x-patch
Size: 1825 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20110401/1de36939/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Move-all-common-error-processings-in-get_arch_regs_f.patch
Type: text/x-patch
Size: 6649 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20110401/1de36939/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Check-non-support-machine-check-first.patch
Type: text/x-patch
Size: 1424 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20110401/1de36939/attachment-0003.bin>


More information about the Crash-utility mailing list