Andes Workshop http://forum.andestech.com/ |
|
如何在Andesight debug session中裡置換不同的file http://forum.andestech.com/viewtopic.php?f=23&t=656 |
Page 1 of 1 |
Author: | cindy [ Wed Jan 09, 2013 7:07 pm ] |
Post subject: | 如何在Andesight debug session中裡置換不同的file |
Attachment: 步驟: 在gdb command view裡打 (1) file (2) file E:/Andestech/AndeSight200MCU/mcu/workspace/demo2/Debug/demo2.adx 即可 步驟(1) 裡是為了放棄舊的file。影片裡少做了這個步驟。 注意! 這裡的path的斜線是相反的 一般的路徑是 E:\Andestech\AndeSight200MCU\mcu\workspace\demo2\Debug\demo2.adx 這裡為了要讓gdb認得,必須打成E:/Andestech/AndeSight200MCU/mcu/workspace/demo2/Debug/demo2.adx 或者是E:\\Andestech\\AndeSight200MCU\\mcu\\workspace\\demo2\\Debug\\demo2.adx 打gdb command "info files" 可以查詢是否置換成功。 影片中我用load。 這是我demo用的,在sram上做,才需要load code。 在disassembly view裡按下refresh可以更新組合語言。 |
Author: | cindy [ Wed Jan 16, 2013 7:09 pm ] |
Post subject: | Re: 如何在Andesight debug session中裡置換不同的file |
更新 如果是MCU Program Debug請這樣子做。 換檔案的步驟 dir file file 新的elf檔 先用dir把原有路徑清除。再file新檔。 以下是參考用的。 ------------------------------------------------------------------------------ 我們測得重現錯誤的方法,紅色字體是錯誤的地方 set $r0=1 set $r1=0x100 set $r2=0x300 tbreak main Temporary breakpoint 1 at 0x8cc: file ../src/main.c, line 48. c Continuing. Temporary breakpoint 1, main () at ../src/main.c:48 48 puts("\nISR in C example\n"); file A program is being debugged already. Are you sure you want to change the file? (y or n) [answered Y; input not from terminal] No executable file now. Discard symbol table from `e:\andestech\andesight200mcusn801\mcu\wspace1\demo1\debug\demo1.adx'? (y or n) [answered Y; input not from terminal] No symbol file now. file E:\\Andestech\\AndeSight200MCUsn801\\mcu\\wspace2\\demo2\\Debug\\demo2.adx A program is being debugged already. Are you sure you want to change the file? (y or n) [answered Y; input not from terminal] Reading symbols from e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\debug\demo2.adx...done. info files Symbols from "e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\debug\demo2.adx". Remote serial target in gdb-specific protocol: Debugging a target over a serial line. While running this, GDB does not access memory from... Local exec file: `e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\debug\demo2.adx', file type elf32-nds32. Entry point: 0x102a0 0x00010000 - 0x000102a0 is .nds32_init 0x000102a0 - 0x00010b10 is .text 0x00010b10 - 0x00010cd4 is .rodata 0x00010cd4 - 0x00010cd8 is .sdata_w 0x00010cd8 - 0x00010ce8 is .bss 0x00010ce8 - 0x00010d0c is .scommon_w load sending: "qPart:nds32:request:InvalidateCache" received: "OK" sending: "qPart:nds32:request:MemAccBus" received: "OK" Loading section .nds32_init, size 0x2a0 lma 0x10000 Loading section .text, size 0x870 lma 0x102a0 Loading section .rodata, size 0x1c4 lma 0x10b10 Loading section .sdata_w, size 0x4 lma 0x10cd4 Start address 0x102a0, load size 3288 Transfer rate: 103 KB/sec, 822 bytes/write. sending: "qPart:nds32:request:MemAccCPU" received: "OK" set $pc=0x0 si 0x000002a0 in ?? () b main Breakpoint 2 at 0x108d0: file ../src/main.c, line 49. c Continuing. Program received signal SIGINT, Interrupt. 0x0000092a in ?? () set $pc=main si 0x000108cc 47 { info source Current source file is ../src/main.c Compilation directory is E:\Andestech\AndeSight200MCUsn801\mcu\wspace2\demo2\Debug Located in e:\andestech\andesight200mcusn801\mcu\wspace1\demo1\src\main.c Contains 103 lines. Source language is c. Compiled with DWARF 2 debugging format. Includes preprocessor macro info. show dir Source directories searched: E:/Andestech/AndeSight200MCUsn801/mcu/wspace1/demo1;E:/Andestech/AndeSight200MCUsn801/mcu/wspace1/demo1/.settings;E:/Andestech/AndeSight200MCUsn801/mcu/wspace1/demo1/CmdMakefile;E:/Andestech/AndeSight200MCUsn801/mcu/wspace1/demo1/Debug;E:/Andestech/AndeSight200MCUsn801/mcu/wspace1/demo1/Debug/output;E:/Andestech/AndeSight200MCUsn801/mcu/wspace1/demo1/Debug/src;E:/Andestech/AndeSight200MCUsn801/mcu/wspace1/demo1/src;$cdir;$cwd info files Symbols from "e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\debug\demo2.adx". Remote serial target in gdb-specific protocol: Debugging a target over a serial line. While running this, GDB does not access memory from... Local exec file: `e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\debug\demo2.adx', file type elf32-nds32. Entry point: 0x102a0 0x00010000 - 0x000102a0 is .nds32_init 0x000102a0 - 0x00010b10 is .text 0x00010b10 - 0x00010cd4 is .rodata 0x00010cd4 - 0x00010cd8 is .sdata_w 0x00010cd8 - 0x00010ce8 is .bss 0x00010ce8 - 0x00010d0c is .scommon_w info source Current source file is ../src/main.c Compilation directory is E:\Andestech\AndeSight200MCUsn801\mcu\wspace2\demo2\Debug Located in e:\andestech\andesight200mcusn801\mcu\wspace1\demo1\src\main.c Contains 103 lines. Source language is c. Compiled with DWARF 2 debugging format. Includes preprocessor macro info. ----------------------------------------------------------------- 下面這是正確的版本,請看藍色字體 source E:\Andestech\AndeSight200MCUsn801\toolchains\nds32le-elf-newlib-v3m\bin\.Andesgdbinit [info] Loading nds32-elf.gdbinit. [info] nds32-elf.gdbinit loaded. [nds32] Hook remote stopped data address for watchpoints. info mem Using memory regions provided by the target. There are no memory regions defined. mem 0x00000000 0x00800000 rw mem 0x00800000 0x00c00000 ro mem 0x00e00000 0x00e00090 rw mem 0x00e01000 0x00e01088 rw mem 0x00e02000 0x00e02108 rw mem 0x00e03000 0x00e03178 rw mem 0x00e04000 0x00e040c4 rw mem 0x00e10000 0x00e1c800 rw mem 0x00e50000 0x00e500fc rw mem 0x00f01000 0x00f01104 rw mem 0x00f03000 0x00f03078 rw mem 0x00f04000 0x00f04040 rw mem 0x00f05000 0x00f05020 rw mem 0x00f06000 0x00f06040 rw mem 0x00f07000 0x00f07080 rw mem 0x00f08000 0x00f08070 rw mem 0x00f0a000 0x00f0a038 rw mem 0x00f0b000 0x00f0b068 rw mem 0x00f0d000 0x00f0d038 rw mem 0x00f0e000 0x00f0e0a4 rw mem 0x00f11000 0x00f1101c rw mem 0x00f14000 0x00f14068 rw mem 0x00f16000 0x00f16078 rw load sending: "qPart:nds32:request:InvalidateCache" received: "OK" sending: "qPart:nds32:request:MemAccBus" received: "OK" Loading section .nds32_init, size 0x2a0 lma 0x0 Loading section .text, size 0x854 lma 0x2a0 Loading section .rodata, size 0x1c4 lma 0xaf4 Loading section .sdata_w, size 0x4 lma 0xcb8 Start address 0x2a0, load size 3260 Transfer rate: 102 KB/sec, 815 bytes/write. sending: "qPart:nds32:request:MemAccCPU" received: "OK" set $r0=1 set $r1=0x100 set $r2=0x300 tbreak main Temporary breakpoint 1 at 0x8cc: file ../src/main.c, line 48. c Continuing. Temporary breakpoint 1, main () at ../src/main.c:48 48 puts("\nISR in C example\n"); dir Reinitialize source path to empty? (y or n) [answered Y; input not from terminal] Source directories searched: $cdir;$cwd file A program is being debugged already. Are you sure you want to change the file? (y or n) [answered Y; input not from terminal] No executable file now. Discard symbol table from `e:\andestech\andesight200mcusn801\mcu\wspace1\demo1\debug\demo1.adx'? (y or n) [answered Y; input not from terminal] No symbol file now. file E:\\Andestech\\AndeSight200MCUsn801\\mcu\\wspace2\\demo2\\Debug\\demo2.adx A program is being debugged already. Are you sure you want to change the file? (y or n) [answered Y; input not from terminal] Reading symbols from e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\debug\demo2.adx...done. load sending: "qPart:nds32:request:InvalidateCache" received: "OK" sending: "qPart:nds32:request:MemAccBus" received: "OK" Loading section .nds32_init, size 0x2a0 lma 0x10000 Loading section .text, size 0x870 lma 0x102a0 Loading section .rodata, size 0x1c4 lma 0x10b10 Loading section .sdata_w, size 0x4 lma 0x10cd4 Start address 0x102a0, load size 3288 Transfer rate: 69 KB/sec, 822 bytes/write. sending: "qPart:nds32:request:MemAccCPU" received: "OK" info files Symbols from "e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\debug\demo2.adx". Remote serial target in gdb-specific protocol: Debugging a target over a serial line. While running this, GDB does not access memory from... Local exec file: `e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\debug\demo2.adx', file type elf32-nds32. Entry point: 0x102a0 0x00010000 - 0x000102a0 is .nds32_init 0x000102a0 - 0x00010b10 is .text 0x00010b10 - 0x00010cd4 is .rodata 0x00010cd4 - 0x00010cd8 is .sdata_w 0x00010cd8 - 0x00010ce8 is .bss 0x00010ce8 - 0x00010d0c is .scommon_w si 182 la $fp, _FP_BASE_ ! init FP info source Current source file is ../src/crt0.S Compilation directory is E:\Andestech\AndeSight200MCUsn801\mcu\wspace2\demo2\Debug Located in e:\andestech\andesight200mcusn801\mcu\wspace2\demo2\src\crt0.S Contains 199 lines. Source language is asm. Compiled with DWARF 2 debugging format. Does not include preprocessor macro info. show dir Source directories searched: $cdir;$cwd |
Page 1 of 1 | All times are UTC + 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |