diff options
| author | Bernard Xiong <[email protected]> | 2013-01-08 05:05:02 -0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2013-01-08 05:05:02 -0800 |
| commit | 72782e920325808bbc58fc2344fc52033479b627 (patch) | |
| tree | 45badbfa9818b8d1722463949beba0f88d1cbd9f /libcpu/arm/common | |
| parent | b3cf278502e605fa03861a2da5685b4c8d72879e (diff) | |
convert end of line
Diffstat (limited to 'libcpu/arm/common')
| -rw-r--r-- | libcpu/arm/common/backtrace.c | 134 | ||||
| -rw-r--r-- | libcpu/arm/common/showmem.c | 84 |
2 files changed, 109 insertions, 109 deletions
diff --git a/libcpu/arm/common/backtrace.c b/libcpu/arm/common/backtrace.c index 764c0f5e1b..a9f9f63bf8 100644 --- a/libcpu/arm/common/backtrace.c +++ b/libcpu/arm/common/backtrace.c @@ -1,67 +1,67 @@ -/*
- * File : backtrace.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006, 2008 RT-Thread Development Team
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://openlab.rt-thread.com/license/LICENSE
- *
- * Change Logs:
- * Date Author Notes
- * 2008-07-29 Bernard first version from QiuYi implementation
- */
-
-#include <rtthread.h>
-
-#ifdef __GNUC__
-/*
--->High Address,Stack Top
-PC<-----|
-LR |
-IP |
-FP |
-...... |
-PC<-| |
-LR | |
-IP | |
-FP---|-- |
-...... |
-PC |
-LR |
-IP |
-FP---
--->Low Address,Stack Bottom
-*/
-void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry)
-{
- rt_uint32_t i, pc, func_entry;
-
- pc = *fp;
- rt_kprintf("[0x%x]\n", pc-0xC);
-
- for(i=0; i<10; i++)
- {
- fp = (rt_uint32_t *)*(fp - 3);
- pc = *fp ;
-
- func_entry = pc - 0xC;
-
- if(func_entry <= 0x30000000) break;
-
- if((func_entry == thread_entry))
- {
- rt_kprintf("EntryPoint:0x%x\n", func_entry);
-
- break;
- }
-
- rt_kprintf("[0x%x]\n", func_entry);
- }
-}
-#else
-void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry)
-{
- /* old compiler implementation */
-}
-#endif
+/* + * File : backtrace.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006, 2008 RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://openlab.rt-thread.com/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2008-07-29 Bernard first version from QiuYi implementation + */ + +#include <rtthread.h> + +#ifdef __GNUC__ +/* +-->High Address,Stack Top +PC<-----| +LR | +IP | +FP | +...... | +PC<-| | +LR | | +IP | | +FP---|-- | +...... | +PC | +LR | +IP | +FP--- +-->Low Address,Stack Bottom +*/ +void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry) +{ + rt_uint32_t i, pc, func_entry; + + pc = *fp; + rt_kprintf("[0x%x]\n", pc-0xC); + + for(i=0; i<10; i++) + { + fp = (rt_uint32_t *)*(fp - 3); + pc = *fp ; + + func_entry = pc - 0xC; + + if(func_entry <= 0x30000000) break; + + if((func_entry == thread_entry)) + { + rt_kprintf("EntryPoint:0x%x\n", func_entry); + + break; + } + + rt_kprintf("[0x%x]\n", func_entry); + } +} +#else +void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry) +{ + /* old compiler implementation */ +} +#endif diff --git a/libcpu/arm/common/showmem.c b/libcpu/arm/common/showmem.c index c171a9bcd7..38f037f83d 100644 --- a/libcpu/arm/common/showmem.c +++ b/libcpu/arm/common/showmem.c @@ -1,42 +1,42 @@ -/*
- * File : showmem.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006, 2008 RT-Thread Development Team
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://openlab.rt-thread.com/license/LICENSE
- *
- * Change Logs:
- * Date Author Notes
- * 2008-07-29 Bernard first version from QiuYi implementation
- */
-
-#include <rtthread.h>
-
-void rt_hw_show_memory(rt_uint32_t addr, rt_uint32_t size)
-{
- int i = 0, j =0;
-
- RT_ASSERT(addr);
-
- addr = addr & ~0xF;
- size = 4*((size + 3)/4);
-
- while(i < size)
- {
- rt_kprintf("0x%08x: ", addr );
-
- for(j=0; j<4; j++)
- {
- rt_kprintf("0x%08x ", *(rt_uint32_t *)addr);
-
- addr += 4;
- i++;
- }
-
- rt_kprintf("\n");
- }
-
- return;
-}
+/* + * File : showmem.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006, 2008 RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://openlab.rt-thread.com/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2008-07-29 Bernard first version from QiuYi implementation + */ + +#include <rtthread.h> + +void rt_hw_show_memory(rt_uint32_t addr, rt_uint32_t size) +{ + int i = 0, j =0; + + RT_ASSERT(addr); + + addr = addr & ~0xF; + size = 4*((size + 3)/4); + + while(i < size) + { + rt_kprintf("0x%08x: ", addr ); + + for(j=0; j<4; j++) + { + rt_kprintf("0x%08x ", *(rt_uint32_t *)addr); + + addr += 4; + i++; + } + + rt_kprintf("\n"); + } + + return; +} |
