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(a)jp.fujitsu.com>