History log of /haiku/src/system/kernel/debug/core_dump.cpp
Revision Date Author Comments
# 2bffaa64 15-Aug-2023 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

null check fTeam in CoreDumper::Dump()

gcc warns "writing 4 bytes into a region of size 0"
on ARM64 (-march=armv8.1-a -mno-outline-atomics)
if it thinks fTeam can be null in atomic_or.

Change-Id: I44c88dadf0cee6e3e54d2baaf0453ae70aa1f3c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6838
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 057fe191 01-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Break thread-related AutoLockers into a separate header.

Including thread.h brings a massive array of things with it from
the kernel thread arch headers, team and thread definitions,
hash tables, linked lists, Referenceable, etc. that the vast majority
of AutoLock.h consumers neither want nor need.

So, put these in a separate header, and adjust all consumers of these
lockers to include the new file.

This change exposes the fact that a lot of files were inadvertently
making use of headers included indirectly through thread.h. Those
will be fixed in the next commit.


# 1761cb8e 30-Aug-2019 Jaroslaw Pelczar <jarek@jpelczar.com>

arm64: Add more headers for code compilation

This makes ARM64 target compile more files. This patch is one of
series of patches to support new architecture, as fixes in many
places are required just to compile the code.

Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ia060612733cd3a0fcb781fec449da164ed635b8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1807
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# d7c7d50e 04-Apr-2019 Alexander von Gluck IV <kallisti5@unixzen.com>

kernel/debug: Add riscv64 to core_dump


# c1566b15 23-Feb-2019 PulkoMandy <pulkomandy@pulkomandy.tk>

sparc: more platform headers

Previous commit adding these was merged very quickly, so here's one
more...

Change-Id: I23c424db7631db1f0ec48e2d0ae47c8409ae6af2
Reviewed-on: https://review.haiku-os.org/c/1088
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 8efb6db7 06-Aug-2016 Adrien Destugues <pulkomandy@gmail.com>

elf.h: rename ELF_MAGIC to ELFMAG

- This is how it is named in other versions of elf.h (Linux, glibc, possibly more)
- ELF_MAGIC is used by libelf for the same thing, and the defines conflicts,
breaking libelf build on Haiku.


# c60453fd 22-May-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

Core dump: Add symbols for commpage to core file


# a0c364c7 29-Apr-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

Core file images note: Add text delta field


# 5cde7a85 26-Apr-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

Add symbol and string table addresses to core file


# 8c6cb8af 26-Apr-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

runtime loader: Register extended image info with kernel

Add structure extended_image_info which extends image_info by the
fields symbol_table, symbol_hash, string_table.


# 82185a52 26-Apr-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

Future proofing core file format

* The Haiku specific notes contain a structure size field, now.
* Change the type of the count and size fields in the Haiku specific
notes to uint32 also for 64 bit ELF. The size field for a note is a
uint32 anyway.


# 467fe4ca 24-Apr-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

kernel: Add core dump facility

* Add function core_dump_write_core_file(). It writes a core file for
the current thread's team. The file format is similar to that of
other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
most of the notes are Haiku specific (infos for team, areas, images,
threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
a condition variable available while a core dump is progress. A
thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
exiting the kernel to userland calls core_dump_trap_thread(), which
blocks on the condition variable until the core dump has finished. We
need the team's threads to stop so we can get their CPU state (and
have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
implemented yet, but that should be fairly straight forward.