summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShell <[email protected]>2024-06-13 08:55:53 +0800
committerGitHub <[email protected]>2024-06-13 08:55:53 +0800
commite5b7f3fdd842e95979111b9d3a9d487a217619b5 (patch)
treec8d97627dc914cf413d245b86c1f1ae016beb333 /include
parent1869c543a60b7d05df4dd69d9eb08f6df6ae3d2e (diff)
[kservice] Enhance support for backtrace service (#9037)
[feat] Enhance support for backtrace service rt_backtrace_formatted_print() and rt_backtrace_to_buffer() to help debug routines. Also, following modification are included: - make rt_backtrace_frame patchable with weak attr - replace lwp backtrace with sync output Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/rthw.h2
-rw-r--r--include/rtthread.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/include/rthw.h b/include/rthw.h
index 67a44acd17..f7712cb52f 100644
--- a/include/rthw.h
+++ b/include/rthw.h
@@ -22,7 +22,7 @@
#include <rtdef.h>
-#if defined (RT_USING_CACHE) || defined(RT_USING_SMP)
+#if defined (RT_USING_CACHE) || defined(RT_USING_SMP) || defined(RT_HW_INCLUDE_CPUPORT)
#include <cpuport.h> /* include spinlock, cache ops, etc. */
#endif
diff --git a/include/rtthread.h b/include/rtthread.h
index 386fbaf47e..87383d3428 100644
--- a/include/rtthread.h
+++ b/include/rtthread.h
@@ -296,6 +296,7 @@ void rt_mp_free_sethook(void (*hook)(struct rt_mempool *mp, void *block));
* heap memory interface
*/
void rt_system_heap_init(void *begin_addr, void *end_addr);
+void rt_system_heap_init_generic(void *begin_addr, void *end_addr);
void *rt_malloc(rt_size_t size);
void rt_free(void *ptr);
@@ -729,7 +730,10 @@ void rt_kputs(const char *str);
rt_err_t rt_backtrace(void);
rt_err_t rt_backtrace_thread(rt_thread_t thread);
-rt_err_t rt_backtrace_frame(struct rt_hw_backtrace_frame *frame);
+rt_err_t rt_backtrace_frame(rt_thread_t thread, struct rt_hw_backtrace_frame *frame);
+rt_err_t rt_backtrace_formatted_print(rt_ubase_t *buffer, long buflen);
+rt_err_t rt_backtrace_to_buffer(rt_thread_t thread, struct rt_hw_backtrace_frame *frame,
+ long skip, rt_ubase_t *buffer, long buflen);
#if defined(RT_USING_DEVICE) && defined(RT_USING_CONSOLE)
rt_device_t rt_console_set_device(const char *name);