How you can debug your application while debugging the kernel:
(CSKYGDB) Ccontinuing.^cprogram received signal SIGINT, Interrupt.default_idle () at arch/csky/kernel/process.c:8383__ asm__ __volatile__ (CSKYGDB)HB *0x00065e34 = = "corresponds to the address of the application disassembly officeHardware assisted Breakpoint 1 at 0x65e34 (CSKYGDB) Ccontinuing.program received signal SIGTRAP, Trace/breakpoint trap.0x0 0065e36 in?? () (CSKYGDB) disadisable disassemble (CSKYGDB) disadisable disassemble (CSKYGDB) Disassemble No function Contai NS program counter for selected frame. (CSKYGDB)disassemble $pc, $pc +30 = = Verify that the address is the same as the address in the Disassembly office.Dump of assembler code from 0X65E36 to 0x65e54:=> 0x00065e36:str15, (r0, +) 0x00065e38:str8, (R0,) 0x00065e3a:m OVR8, R0 0x00065e3c:str2, (R8, 8) 0X00065E3E:STR3, (R8, a) 0X00065E40:STR4, (R8, +) 0X00065E42:BMASKIR7, 0 0x0 0065E44:STR7, (R8, 0) 0x00065e46:ldr7, (R8,) 0X00065E48:BMASKIR6, 8 0x00065e4a:andnr7, R7, R6 0x00065e4c:cmpnei R7, 0 0x00065e4e:bt0x65e5c 0X00065E50:LDR2, (R8, 8) 0X00065E52:LDR3, (R8,) End of assembler dump. (CSKYGDB)add-symbol-file/home/yingc/nfs/dvb/out.elf 0x00080e0 = = "0x00080e0 is the address of the text segment Add symbol table from file "/home/yingc/nfs/dvb/out.elf" at.text_addr = 0x80e0 (y or N) yreading symbols from/home/yingc/n Fs/dvb/out.elf...done. (CSKYGDB) si\0x00065e3823{(cskygdb) l1819#include "module/app_ioctl.h" 20//#include "module/app_ca_manager.h" 2122status_t App_ioctl (uint32_t ID, uint32_t cmd, void * params) 23{24 status_t ret = gxcore_error;25 switch (cmd &am P (~0XFF)) App_frontend_base: (CSKYGDB) n
\[email protected]:~/work/goxceed-dvbs-hd/test/solution/output$ csky-elf-readelf-s out.elf
There is headers, starting at offset 0xa84da0:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[0] NULL 00000000 000000 000000 00 0 0 0
[1]. init progbits 000080b4 0000b4 000022 Microsoft AX 0 0 4
[2]. Text Progbits000080e00000e0 2f779a AX 0 0 16
[3]. Fini progbits 002ff87c 2f787c 000016 xx AX 0 0 4
[4]. Rodata progbits 002ff8a0 2f78a0 071b60 xx A 0 0 16
[5]. Eh_frame progbits 00371400 369400 0013a8 xx A 0 0 4
[6]. Tdata progbits 003737a8 36a7a8 000004 0 0 4
[7]. TBSS nobits 003737ac 36a7ac 000008 WAT 0 0 4
[8]. ctors progbits 003737ac 36a7ac 000008 WA 0 0 4
[9]. dtors progbits 003737b4 36a7b4 000008 xx WA 0 0 4
[JCR progbits 003737BC 36a7bc 000004-WA 0 0 4
[All]. Got progbits 003737c0 36a7c0 0000c4 0 0 4
Data progbits 00373888 36a888 04a8f8-WA 0 0 8
BSS nobits 003be180 3b5180 05a4cc-WA 0 0 8
Comment Progbits 00000000 3b5180 000082 MS 0 0 1
[Debug_aranges]. Progbits 00000000 3b5202 008558 00 0 0 1
[+]. Debug_pubnames Progbits 00000000 3bd75a 01cd87 00 0 0 1
[+]. Debug_info Progbits 00000000 3da4e1 3b54ec 00 0 0 1
Debug_abbrev Progbits 00000000 78f9cd 03ddac 00 0 0 1
[+]. Debug_line Progbits 00000000 7cd779 19ac68 00 0 0 1
[]. debug_frame Progbits 00000000 9683e4 043dc0 00 0 0 4
Debug_str Progbits 00000000 9ac1a4 06262a MS 0 0 1
Debug_loc Progbits 00000000 A0e7ce 00e472 00 0 0 1
[Debug_pubtypes]. Progbits 00000000 A1cc40 061f78 00 0 0 1
Debug_ranges Progbits 00000000 A7ebb8 0060e8 00 0 0 1
Shstrtab Strtab 00000000 a84ca0 0000fe 00 0 0 1
[+]. Symtab Symtab 00000000 a85200 034710 10 27 7115 4
Strtab Strtab 00000000 ab9910 03845b 00 0 0 1
Key to Flags:
W (Write), A (Alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), X (unknown)
O (extra OS processing required) O (OS specific), p (processor specific)
25912900065e34<app_ioctl>:
259130
259131 #include "module/app_ioctl.h"
259132//#include "module/app_ca_manager.h"
259133
259134 status_t app_ioctl (uint32_t ID, uint32_t cmd, void * params)
259135 {
259136 65e34:? 25f0? Subi? R0, R0, 32
259137 65e36:? 9f60? St? R15, (R0, 24)
259138 65e38:? 9870? St? R8, (R0, 28)
259139 65e3a:? 1208? MOV?R8, R0
259140 65e3c:? 9228? St? R2, (R8, 8)
259141 65e3e:? 9338? St? R3, (R8, 12)
259142 65e40:? 9448? St? R4, (R8, 16)
259143 status_t ret = gxcore_error;
259144 65e42:? 2c07? Bmaski? R7, 0
259145 65e44:? 9708? St? R7, (R8, 0)
259146 switch (cmd & (~0xff))
259147 65e46:? 8738? Ld? R7, (R8, 12)
259148 65e48:? 2c86? Bmaski? R6, 8
259149 65e4a:? 1f67? Andn? R7, R7, R6
259150 65e4c:? 2a07? Cmpnei? R7, 0
259151 65e4e:? E006? Bt? 0x65e5c
259152 {
259153 Case App_frontend_base:
259154 ret = nim_ioctl (id, cmd, params);
Note: The number of HB is limited, even if disable, may not respond to the next
Aa
GDB Debugging Advanced Usage