Commit Graph

10 Commits

Author SHA1 Message Date
Ming Wang 35a2472e7a Add LoongArch64 framework code support
Mainly added some environment configurations, macro definitions, specific
architecture structures and some function declarations supported by the
LoongArch64 architecture.

Co-developed-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Ming Wang <wangming01@loongson.cn>
2024-01-26 13:47:17 +09:00
Xianting Tian 12c3156000 Add RISCV64 framework code support
This patch mainly added some environment configurations, macro definitions,
specific architecture structures and some function declarations supported
by the RISCV64 architecture.

We can use the build command to get the simplest version crash tool:
	make target=RISCV64 -j2

Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>
Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
2022-12-22 13:34:40 +09:00
Youling Tang c15a1e025e MIPS64: three fixes for MIPS64 kernels
Three fixes for MIPS64 kernels:
 (1) To support ramdumps, add the machine_type() check for MIPS64 in
     ramdump_to_elf().
 (2) To fix a stuck issue when invoking crash with "-d1" or larger
     debug value, add the machine_type() check to get the correct
     dump NOTE offsets.
 (3) Fix the reference file path to the definition of the pt_regs
     structure, to which mips64_regster refers.

[ kh: merged three patches into one ]

Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
2021-06-09 16:57:26 +09:00
Dave Anderson 67a815b874 Added support for x86_64 ramdump files. Without the patch, the crash
session fails immediately with the message "ramdump: unsupported
machine type: X86_64".
(anderson@redhat.com)
2016-05-04 14:34:53 -04:00
Dave Anderson 89ed9d0a7f Introduction of support for "live" ramdump files, such as those that
are specified by the QEMU mem-path argument of a memory-backend-file
object.  This allows the running of a live crash session against a
QEMU guest from the host machine.  In this example, the /tmp/MEM file
on a QEMU host represents the guest's physical memory:

  $ qemu-kvm ...other-options... \
  -object memory-backend-file,id=MEM,size=128m,mem-path=/tmp/MEM,share=on \
  -numa node,memdev=MEM -m 128

and a live session run can be run against the guest kernel like so:

  $ crash <path-to-guest-vmlinux> live:/tmp/MEM@0

By prepending the ramdump image name with "live:", the crash session will
act as if it were running a normal live session.
(oleg@redhat.com)
2016-05-04 11:50:19 -04:00
Dave Anderson def93c22f9 Several fixes, updates, and enhancements for 32-bit MIPS support:
(1) The MIPS general purpose registers in the elf_gregset_t
      don't start at index 0 but at index 6.
  (2) Adjust for the kernel's pt_regs structure changes between
      kernel versions.  For example, fields are inserted into the
      middle based on build time options, and the amount of padding
      at the head of the structure was changed relatively recently.
      To handle this, split the structure definition into two parts
      and get the offsets of these two parts dynamically.
  (3) Do not display each parsed kernel symbol during initialization
      when invoked with "crash -d8".
  (4) Add support for loading raw MIPS ramdump dumpfiles.
  (5) Add support for compressed kdump dumpfiles.
(rabinv@axis.com)
2015-04-24 12:07:02 -04:00
Dave Anderson ffe155026b Fix for the handling of multiple ramdump images. Without the patch,
entering more than one ramdump image on the command line may result
in a segmentation violation.
(oza@broadcom.com)
2014-11-18 14:26:19 -05:00
Dave Anderson 1a5e568cc7 Correction of the copyright and authorship of ramdump.c.
(oza@broadcom.com)
2014-10-30 09:55:15 -04:00
Dave Anderson 4010619625 Addressed 3 Coverity Scan issues:
(1) task.c: initialize the "curr" and "curr_my_q" variables in the
      dump_tasks_in_task_group_cfs_rq() function.
  (2) ramdump.c: make the "rd" and "len" return values from read()
      and write() calls in write_elf() to be ssize_t types.
  (3) cmdline.c: make the parsed PATH string buffer equal to the size
      of the PATH string + 1 to prevent a possible buffer overflow
      when a command line starts with a "!".
(anderson@redhat.com)
2014-09-18 13:27:45 -04:00
Dave Anderson 25b61f4a2e Implement support for ARM and ARM64 raw RAM dumpfiles. One or
more "ramdump" files may be entered on the crash command line
in an ordered pair format consisting of the RAM dump filename
and the starting physical address expressed in hexadecimal,
connected with an ampersand:

  $ crash vmlinux ramdump@address [ramdump@address]

A temporary ELF header will be created in /var/tmp, and the
combination of the header and the ramdump file(s) will be handled
like a normal ELF vmcore.  The ELF header will only exist during
the crash session.  If desired, an optional "-o <filename>"
may be entered to create a permanent ELF vmcore file from the
ramdump file(s).
(vinayakm.list@gmail.com, paawan1982@yahoo.com, anderson@redhat.com)
2014-07-31 14:58:26 -04:00