Mistake on this page?
Report an issue in GitHub or email us
utest_stack_trace.h
1 
2 /** \addtogroup frameworks */
3 /** @{*/
4 /****************************************************************************
5  * Copyright (c) 2016, ARM Limited, All Rights Reserved
6  * SPDX-License-Identifier: Apache-2.0
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License"); you may
9  * not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  ****************************************************************************
20  */
21 
22 #ifndef UTEST_STACK_TRACE_H
23 #define UTEST_STACK_TRACE_H
24 
25 #ifdef UTEST_STACK_TRACE
26 #include <string>
27 
28 #define UTEST_MAX_BACKTRACE 100
29 extern std::string utest_trace[UTEST_MAX_BACKTRACE];
30 
31 extern void utest_trace_initialise();
32 extern void utest_add_to_trace(char *func_name);
33 extern void utest_dump_trace();
34 
35 #define UTEST_LOG_FUNCTION(); utest_add_to_trace((char *)__func__);
36 #define UTEST_TRACE_START utest_trace_initialise();
37 #define UTEST_DUMP_TRACE utest_dump_trace();
38 
39 #else
40 
41 #define UTEST_LOG_FUNCTION();
42 #define UTEST_TRACE_START
43 #define UTEST_DUMP_TRACE
44 
45 #endif // UTEST_STACK_TRACE
46 
47 #endif // UTEST_STACK_TRACE_H
48 
49 /** @}*/
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.