History log of /haiku/src/system/kernel/arch/arm/arch_debug.cpp
Revision Date Author Comments
# ef9e2f62 22-Sep-2023 Augustin Cavalier <waddlesplash@gmail.com>

kernel/arch: Make arch_debug_get_caller() a macro implemented by a builtin.

Only the x86 and PPC implementations look like they would have worked,
while the builtin is available and will work across all architectures.
We already use it unconditionally in some parts of libroot.

Change-Id: I2dffb3b2c7cdd605092382b9d649151adb921bb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6942
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 26a211b0 02-Aug-2023 Máximo Castañeda <antiswen@yahoo.es>

Remove trigraphs

Fixes arm64 build

Change-Id: I8e266871df8f124539a4b5d6fb267931e6506dd5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6769
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 425ac1b6 20-Jun-2023 Alexander von Gluck IV <kallisti5@unixzen.com>

refactor: Swap %Ld for %lld in all format usages

* %Ld is an undocumented alias for %lld in glibc.
* muslc doesn't implement it for this reason.
* While we will likely never drop %Ld support,
lets clean house and set a better example.

Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 537d67ae 19-Sep-2022 David Karoly <karolyd577@gmail.com>

kernel/arm: fix frame pointer after unwinding iframe

Change-Id: I285896ff6624e26695e282d02011a31de32fc297
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5678
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# c791590a 02-Sep-2022 David Karoly <karolyd577@gmail.com>

kernel/arm: fix iframe unwinding

* add missing call to thread_get_current_thread()
* apply some better formatting to iframe printout
* pass iframe in lr to exception handlers
* add missing iframe scope in syscall handler
(was removed previously by mistake)

Change-Id: I01c34f2114cd874f72f91be428921ad2002e256a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5611
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# b0f1a824 11-Aug-2022 X512 <danger_mail@list.ru>

kernel/arch/arm: fix stack trace

Change-Id: I51d789b4de312c604184d697e9a0a695534d42d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5540
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>


# 162279b6 06-Apr-2019 Alexander von Gluck IV <kallisti5@unixzen.com>

kernel/arm: Fix a few build regressions around types

Change-Id: I577e64397610bc48e4b7646c533de95d0024dd63


# 6048591e 07-Sep-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

Revert "Added check to ensure KDL does not include frames beyond kernel entry in the backtrace. This prevents KDL from faulting when printing backtrace on ARM."

This reverts commit 3fbb24680c819d0819f4f876fe6565c336a19139.

As I mentioned in #11131, this fix is not correct, and works around
the problem. The real reason was that arch_debug_call_with_fault_handler
was not working properly, so the fault handler went crazy.

With commit eb92810 that is fixed so this can be reverted.


# 3fbb2468 14-Aug-2014 Arvind S Raj <sraj.arvind@gmail.com>

Added check to ensure KDL does not include frames beyond kernel entry in the backtrace. This prevents KDL from faulting when printing backtrace on ARM.


# cc65466f 17-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: kernel: Make KDL more useful on ARM

This adds the -mapcs-frame compiler flag for ARM to have "stable"
stack frames, adds support to the kernel for dumping stack crawls,
and initial support for iframes. There' much more functionality
to unlock in KDL, but this makes debugging already a lot more
comfortable.....


# f86b5828 06-Nov-2012 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: Cleanup of port support code.

This also implements the fault handler correctly now, and cleans up the
exception handling. Seems a lot more stable now, no unexpected panics or
faults happening anymore.


# 258d4ef9 26-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

kernel arm: Quick style cleanup; No functional change


# 9536ec02 03-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Reimplemented the gdb stub support for the 'g' command (read registers):
* Added an arch_debug_gdb_get_registers() interface that is supposed to provide
the register values in the format expected by gdb and implemented it for x86.
* Reimplemented gdb_regreply() to use that. Also made it buffer overflow safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41880 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4535495d 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1ca7a353 17-Oct-2010 Ithamar R. Adema <ithamar.adema@team-embedded.nl>

* let arch_debug_call_with_fault_handler() at least do the call, though without fault handler for now

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38989 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cfefeee3 18-Mar-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed arch_debug_save_registers() to take an arch-specific structure
arch_debug_registers instead.
* Call arch_debug_save_registers() on all CPUs when entering the kernel
debugger.
* Added debug_get_debug_registers() to return a specified CPU's saved
registers.
* x86:
- Replaced the previous arch_debug_save_registers() implementation. Disabled
getting the registers via the gdb interface for the time being.
- Fixed the "sc", "call", and "calling" commands to also work for threads
running on another CPU.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a38f8503 22-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* arch_debug_get_stack_trace():
- Replaced the "userOnly" parameter by a "flags" parameter, that allows to
specify kernel and userland stack traces individually.
- x86, m68k: Don't always skip the first frame as that prevents the caller
from being able to record its own address.
* capture_tracing_stack_trace(): Replaced the "userOnly" parameter by
"kernelOnly", since one is probably always interested in the kernel stack
trace, but might not want the userland stack trace.
* Added stack trace support for VM cache kernel tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34742 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b2a7fcb4 18-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Added an arch_debug_stack_trace() function that is called from the KDL loop
in case there aren't any KDL commands available yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33642 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 23eafdaf 13-Aug-2009 François Revol <revol@free.fr>

[GSoC] [ARM] Patch by Johannes Wischert.
- stubbed out many arch kernel functions (borrowed from other archs),
- partially implement ELF relocations code, enough to load the kernel,
- move uart.c to kernel sources and use the same one for the loader,
- default implementation for gensyscalls,
- assembler code functions for interrupt masking (enable/disable/restore/query).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32327 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6048591e9dd5c3f461dd3dd6cb5e6f4a17167439 07-Sep-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

Revert "Added check to ensure KDL does not include frames beyond kernel entry in the backtrace. This prevents KDL from faulting when printing backtrace on ARM."

This reverts commit 3fbb24680c819d0819f4f876fe6565c336a19139.

As I mentioned in #11131, this fix is not correct, and works around
the problem. The real reason was that arch_debug_call_with_fault_handler
was not working properly, so the fault handler went crazy.

With commit eb92810 that is fixed so this can be reverted.


# 3fbb24680c819d0819f4f876fe6565c336a19139 14-Aug-2014 Arvind S Raj <sraj.arvind@gmail.com>

Added check to ensure KDL does not include frames beyond kernel entry in the backtrace. This prevents KDL from faulting when printing backtrace on ARM.


# cc65466f0de34d946d9311517f4e7781b7294ef8 17-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: kernel: Make KDL more useful on ARM

This adds the -mapcs-frame compiler flag for ARM to have "stable"
stack frames, adds support to the kernel for dumping stack crawls,
and initial support for iframes. There' much more functionality
to unlock in KDL, but this makes debugging already a lot more
comfortable.....


# f86b5828486b661145eb15952ec14648c9bb8d9b 06-Nov-2012 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: Cleanup of port support code.

This also implements the fault handler correctly now, and cleans up the
exception handling. Seems a lot more stable now, no unexpected panics or
faults happening anymore.


# 258d4ef93d3f51cef60b05d1c5ae418108b55782 26-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

kernel arm: Quick style cleanup; No functional change


# 9536ec02971d96e1941af928eb3645bc6e3133e3 03-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Reimplemented the gdb stub support for the 'g' command (read registers):
* Added an arch_debug_gdb_get_registers() interface that is supposed to provide
the register values in the format expected by gdb and implemented it for x86.
* Reimplemented gdb_regreply() to use that. Also made it buffer overflow safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41880 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4535495d80c86e19e2610e7444a4fcefe3e0f8e6 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1ca7a3536cf41d959c4ae2d28600a09e31bde934 17-Oct-2010 Ithamar R. Adema <ithamar.adema@team-embedded.nl>

* let arch_debug_call_with_fault_handler() at least do the call, though without fault handler for now

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38989 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cfefeee3f81bd3ed97243986cdd6bf710d16d0bc 18-Mar-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed arch_debug_save_registers() to take an arch-specific structure
arch_debug_registers instead.
* Call arch_debug_save_registers() on all CPUs when entering the kernel
debugger.
* Added debug_get_debug_registers() to return a specified CPU's saved
registers.
* x86:
- Replaced the previous arch_debug_save_registers() implementation. Disabled
getting the registers via the gdb interface for the time being.
- Fixed the "sc", "call", and "calling" commands to also work for threads
running on another CPU.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a38f85036021b7ccaffa47fd8584afff473acf3d 22-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* arch_debug_get_stack_trace():
- Replaced the "userOnly" parameter by a "flags" parameter, that allows to
specify kernel and userland stack traces individually.
- x86, m68k: Don't always skip the first frame as that prevents the caller
from being able to record its own address.
* capture_tracing_stack_trace(): Replaced the "userOnly" parameter by
"kernelOnly", since one is probably always interested in the kernel stack
trace, but might not want the userland stack trace.
* Added stack trace support for VM cache kernel tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34742 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b2a7fcb4045ff77189f7431fde83e16e21258736 18-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Added an arch_debug_stack_trace() function that is called from the KDL loop
in case there aren't any KDL commands available yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33642 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 23eafdaf313f2e756170f6a543205311a4d9bc96 13-Aug-2009 François Revol <revol@free.fr>

[GSoC] [ARM] Patch by Johannes Wischert.
- stubbed out many arch kernel functions (borrowed from other archs),
- partially implement ELF relocations code, enough to load the kernel,
- move uart.c to kernel sources and use the same one for the loader,
- default implementation for gensyscalls,
- assembler code functions for interrupt masking (enable/disable/restore/query).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32327 a95241bf-73f2-0310-859d-f6bbb57e9c96