The TOOLCHAIN_IGNORE_WSHADOW_BEGIN and TOOLCHAIN_IGNORE_WSHADOW_END
macros can be replaced with the more generic
TOOLCHAIN_DISABLE_WARNING(TOOLCHAIN_WARNING_SHADOW) and
TOOLCHAIN_ENABLE_WARNING(TOOLCHAIN_WARNING_SHADOW) macros.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Add module which can measure CPU idle time. Idle time is measured in
the pre/post CPU idle hooks but they are not provided by this module.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
const is ignored on the function return type. A warning is reported with
-Wignored-qualifers. Remove the ignored const.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This adds the bits to display privileged stack usage for
architectures that support obtaining this information.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Update core dump file format to support a new section which contains
metadata about threads necessary for debugging.
Define configs to capture that metadata and include it in the dumps
when enabled.
Update documentation to reflect the changes.
Signed-off-by: Mark Holden <mholden@meta.com>
Add implementation to analyze threads on each cpu separately. This
feature can be enabled with THREAD_ANALYZER_AUTO_SEPARATE_CORES Kconfig
option. If enabled, an analyzer thread is started for each cpu, and
the threads will only analyze thread on the cpu its running on.
This feature is needed for Intel ADSP platform, where cpu specific
caches are not synchronized between the cpu. It is also probably
needed by other platforms having CONFIG_KERNEL_COHERENCE=y, so default
to THREAD_ANALYZER_AUTO_SEPARATE_CORES=y for those platform.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
The API was placed under a non-existing group: coresight_apis. Place it
under os_services, as other debug/ APIs.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
These headers have been deprecated for > 2 full releases,
let's remove them to keep them out of v3.7.0 LTS.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Make `struct arch_esf` compulsory for all architectures by
declaring it in the `arch_interface.h` header.
After this commit, the named struct `z_arch_esf_t` is only used
internally to generate offsets, and is slated to be removed
from the `arch_interface.h` header in the future.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`start_addr` is the address of the first symbol, rename it to
`first_addr` instead as it seems more intuitive and relatable
to the comments.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This allows a customized coredump_backend_other API to re-use the
COREDUMP_*_STR without re-defining the same strings.
Signed-off-by: Younghyun Park <younghyunpark@google.com>
When compiling with CONFIG_DEBUG_COREDUMP=n and including
<zephyr/debug/coredump.h> from any file, linking fails with a multiple
definitions error. Define the functions in the header file as static
inline.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Use pyelftools to extract the symbol table from the
link stage executable. Then, filter out the function names
and sort them based on their offsets before writing into the
`symtab.c`, this is similar to how the `isr_tables` works.
To access the structure, simply include the new header:
```c
#include <zephyr/debug/symtab.h>
```
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Make the current gdb loop enum public under the name `gdb_loop_state`.
This will allow for extending the current stub with further
functionality in the future as new features will require control over
the loop state.
Signed-off-by: Robert Zieba <robertzieba@google.com>
CONFIG_COVERAGE has been incorrectly used to
change other kconfig options (stack sizes, etc)
code defaults, as well as some samples behaviour,
which should not have dependend on it.
Instead those should have depended on COVERAGE_GCOV,
which, being the one which adds special code and
temporary RAM storage for embedded targets,
require changes to many features.
When building for the native targets, all this was
unnecessary.
=> Fix the dependency.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure coredump.h is properly documented, in particular add missing docs
for coredump_query_id and coredump_cmd_id enums that are part of the
API.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Including thread_analyzer.h implicitly requires a previous include of
thread.h. This adds this include directly to thread_analyzer to remove
this implicit dependency.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
* Add support for coredump on ARM64 architectures.
* Add the script used for post-processing coredump output.
Signed-off-by: Marcelo Ruaro <marcelo.ruaro@huawei.com>
Signed-off-by: Rodrigo Cataldo <rodrigo.cataldo@huawei.com>
Signed-off-by: Roberto Medina <roberto.medina@huawei.com>
Building tests/drivers/coredump/coredump_api with armclang gets:
include/zephyr/debug/coredump.h:98:2: error: unknown type name 'uint8_t'
uint8_t *buffer;
^
Fix simply be including <stdint.h> to get uint8_t typedef.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
The def command Indicates that a comment block contains documentation
for a #define macro. This is useful if the comment block documents a
macro not adjacent to it, e.g.
```c
/**
* @def MAX(x,y)
* @brief Computes the maximum of @a x and @a y.
*/
#ifdef XXX
#define MAX(x,y) ...
#endif
```
However, it is not necessary if the comment is adjacent to the
definition, e.g.
```c
/**
* @brief Computes the maximum of @a x and @a y.
*/
#define MAX(x,y) ...
```
This patch removes all unnecessary def entries in-tree.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new coredump query and command type to retrieve the raw data
stored to the flash backend
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Logging v1 has been removed and log_strdup wrapper function is no
longer needed. Removing the function and its use in the tree.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
In order to bring consistency in-tree, migrate all includes within
include directory to the new prefix <zephyr/...>. Note that the
conversion has been scripted, refer to zephyrproject-rtos#45388 for more
details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
We want to use a sparse address space to identify invalid conversions
between cached and uncached address aliases. This patch adds a
__sparse_cache sparse annotation for that. Where those conversions
must be done that has to be supported by using the __sparse_force
sparse attribute. To avoid compiler complains about unknown
attributes we add a -Wno-attributes flag when building with sparse
support.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
example: <irq.h> -> <zephyr/irq.h>
Issue #41543
Signed-off-by: Yuval Peress <peress@google.com>