libs/libc: move the backtrace implement to sched
1. move the backtrace implement to sched 2. rename CONFIG_UNWINDER to CONFIG_SCHED_BACKTRACE Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
0a8d951837
commit
83964231a5
|
@ -34,7 +34,7 @@ extern "C"
|
|||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_UNWINDER)
|
||||
#if defined(CONFIG_SCHED_BACKTRACE)
|
||||
|
||||
/* Store up to SIZE return address of the current program state in
|
||||
* ARRAY and return the exact number of values stored.
|
||||
|
|
|
@ -29,4 +29,3 @@ source "libs/libc/wqueue/Kconfig"
|
|||
source "libs/libc/hex2bin/Kconfig"
|
||||
source "libs/libc/userfs/Kconfig"
|
||||
source "libs/libc/builtin/Kconfig"
|
||||
source "libs/libc/debug/Kconfig"
|
||||
|
|
|
@ -25,7 +25,6 @@ include assert/Make.defs
|
|||
include audio/Make.defs
|
||||
include builtin/Make.defs
|
||||
include ctype/Make.defs
|
||||
include debug/Make.defs
|
||||
include dirent/Make.defs
|
||||
include dlfcn/Make.defs
|
||||
include endian/Make.defs
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
# These are library functions that may be overridden by architecture-
|
||||
# specific implementations. Not all architectures support implementations
|
||||
# for every library function.
|
||||
|
||||
menu "Library Debugging"
|
||||
|
||||
config UNWINDER
|
||||
bool "Stack Unwinder"
|
||||
default "n"
|
||||
---help---
|
||||
This option enables stack unwinding support in NuttX
|
||||
using the information automatically generated by the
|
||||
compiler. The resulting image is slightly bigger but
|
||||
the performance is not affected. Currently, this feature
|
||||
only works with EABI compilers.
|
||||
|
||||
endmenu # Library Debugging Support
|
|
@ -1,30 +0,0 @@
|
|||
############################################################################
|
||||
# libs/libc/debug/Make.defs
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_UNWINDER),y)
|
||||
|
||||
CSRCS += lib_backtrace.c lib_dumpstack.c
|
||||
|
||||
endif
|
||||
|
||||
# Include debug build support
|
||||
|
||||
DEPPATH += --dep-path debug
|
||||
VPATH += :debug
|
|
@ -34,6 +34,10 @@ ifneq ($(CONFIG_BUILD_KERNEL),y)
|
|||
CSRCS += task_startup.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SCHED_BACKTRACE),y)
|
||||
CSRCS += lib_dumpstack.c lib_backtrace.c
|
||||
endif
|
||||
|
||||
# Add the sched directory to the build
|
||||
|
||||
DEPPATH += --dep-path sched
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/debug/lib_backtrace.c
|
||||
* libs/libc/sched/sched_backtrace.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* libs/libc/debug/lib_dumpstack.c
|
||||
* libs/libc/sched/sched_dumpstack.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
|
@ -1822,3 +1822,12 @@ config PTHREAD_STACK_DEFAULT
|
|||
Default pthread stack size
|
||||
|
||||
endmenu # Stack and heap information
|
||||
|
||||
config SCHED_BACKTRACE
|
||||
bool "Stack BackTrace"
|
||||
default "n"
|
||||
---help---
|
||||
This option enables stack backtrace support in the NuttX
|
||||
using the information automatically generated by the
|
||||
compiler or architecture specific approach when ARCH_HAVE_BACKTRACE
|
||||
is selected
|
||||
|
|
Loading…
Reference in New Issue