Linux下进程崩溃时定位源代码位置

gcc编译器的默认选项设置:

gcc -dumpspecs

gdb 调试打印完整字符串

如何在调试内核时,同时可以调试应用程序的做法:

(cskygdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
default_idle () at arch/csky/kernel/process.c:83
83 __asm__ __volatile__(
(cskygdb) hb *0x00065e34           ==》对应应用反汇编处的地址
Hardware assisted breakpoint 1 at 0x65e34
(cskygdb) c
Continuing. Program received signal SIGTRAP, Trace/breakpoint trap.
0x00065e36 in ?? ()
(cskygdb) disa
disable disassemble
(cskygdb) disa
disable disassemble
(cskygdb) disassemble
No function contains program counter for selected frame.
(cskygdb) disassemble $pc,$pc+30    ==》确认地址是否跟反汇编处的地址一样
Dump of assembler code from 0x65e36 to 0x65e54:
=> 0x00065e36: st r15, (r0, 24)
0x00065e38: st r8, (r0, 28)
0x00065e3a: mov r8, r0
0x00065e3c: st r2, (r8, 8)
0x00065e3e: st r3, (r8, 12)
0x00065e40: st r4, (r8, 16)
0x00065e42: bmaski r7, 0
0x00065e44: st r7, (r8, 0)
0x00065e46: ld r7, (r8, 12)
0x00065e48: bmaski r6, 8
0x00065e4a: andn r7, r7, r6
0x00065e4c: cmpnei r7, 0
0x00065e4e: bt 0x65e5c
0x00065e50: ld r2, (r8, 8)
0x00065e52: ld r3, (r8, 12)
End of assembler dump.
(cskygdb) add-symbol-file /home/yingc/nfs/dvb/out.elf 0x00080e0  ==》0x00080e0是text段的地址
add symbol table from file "/home/yingc/nfs/dvb/out.elf" at
.text_addr = 0x80e0
(y or n) y
Reading symbols from /home/yingc/nfs/dvb/out.elf...done.
(cskygdb) si
\0x00065e38 23 {
(cskygdb) l
18
19 #include "module/app_ioctl.h"
20 //#include "module/app_ca_manager.h"
21
22 status_t app_ioctl(uint32_t id, uint32_t cmd, void * params)
23 {
24 status_t ret = GXCORE_ERROR;
25 switch (cmd & (~0xff))
26 {
27 case APP_FRONTEND_BASE:
(cskygdb) n \yingc@yingc:~/work/goxceed-dvbs-hd/test/solution/output$ csky-elf-readelf -S out.elf
There are 28 section 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 00  AX  0   0  4
  [ 2] .text             PROGBITS        000080e0 0000e0 2f779a 00  AX  0   0 16
  [ 3] .fini             PROGBITS        002ff87c 2f787c 000016 00  AX  0   0  4
  [ 4] .rodata           PROGBITS        002ff8a0 2f78a0 071b60 00   A  0   0 16
  [ 5] .eh_frame         PROGBITS        00371400 369400 0013a8 00   A  0   0  4
  [ 6] .tdata            PROGBITS        003737a8 36a7a8 000004 00 WAT  0   0  4
  [ 7] .tbss             NOBITS          003737ac 36a7ac 000008 00 WAT  0   0  4
  [ 8] .ctors            PROGBITS        003737ac 36a7ac 000008 00  WA  0   0  4
  [ 9] .dtors            PROGBITS        003737b4 36a7b4 000008 00  WA  0   0  4
  [10] .jcr              PROGBITS        003737bc 36a7bc 000004 00  WA  0   0  4
  [11] .got              PROGBITS        003737c0 36a7c0 0000c4 04  WA  0   0  4
  [12] .data             PROGBITS        00373888 36a888 04a8f8 00  WA  0   0  8
  [13] .bss              NOBITS          003be180 3b5180 05a4cc 00  WA  0   0  8
  [14] .comment          PROGBITS        00000000 3b5180 000082 01  MS  0   0  1
  [15] .debug_aranges    PROGBITS        00000000 3b5202 008558 00      0   0  1
  [16] .debug_pubnames   PROGBITS        00000000 3bd75a 01cd87 00      0   0  1
  [17] .debug_info       PROGBITS        00000000 3da4e1 3b54ec 00      0   0  1
  [18] .debug_abbrev     PROGBITS        00000000 78f9cd 03ddac 00      0   0  1
  [19] .debug_line       PROGBITS        00000000 7cd779 19ac68 00      0   0  1
  [20] .debug_frame      PROGBITS        00000000 9683e4 043dc0 00      0   0  4
  [21] .debug_str        PROGBITS        00000000 9ac1a4 06262a 01  MS  0   0  1
  [22] .debug_loc        PROGBITS        00000000 a0e7ce 00e472 00      0   0  1
  [23] .debug_pubtypes   PROGBITS        00000000 a1cc40 061f78 00      0   0  1
  [24] .debug_ranges     PROGBITS        00000000 a7ebb8 0060e8 00      0   0  1
  [25] .shstrtab         STRTAB          00000000 a84ca0 0000fe 00      0   0  1
  [26] .symtab           SYMTAB          00000000 a85200 034710 10     27 7115  4
  [27] .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) 259129 00065e34 <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); 注意:hb 的个数有限制,即使disable的话,也可能会不响应下一个
Unable to handle kernel paging request at virtual address 00000000, epc == 90164fc4
。。。。。。
[   54.940000] CURRENT PROCESS:
[ 54.940000]
[ 54.950000] COMM=out.elf PID=922
[ 54.950000] TEXT=00008000-0029e630 DATA=0029f630-0031d180 BSS=0031d180-0041e000
[ 54.960000] USER-STACK=7faa2e80 KERNEL-STACK=904ef560
[ 54.960000]
[ 54.960000] PC: 0x90164fc4
[ 54.970000] PSR: 0x8f150141
[ 54.970000] r1: 0x00000030 syscallr2: 0x0000e190 r2: 0x0000e190 r3: 0x00000000
[ 54.980000] r4: 0x9025908c r5: 0xe470e190 r6: 0xe40e0020 r7: 0x9023b08c
[ 54.990000] r8: 0x00000000 r9: 0x92cb4000 r10: 0x00001101 r11: 0x00000000
[ 54.990000] r12: 0x902e6ef4 r13: 0x00043800 r14: 0x9023b08c r15: 0x90162154
[ 55.000000]
[ 55.000000] CODE:
[ 55.010000] 90164fa4: 97361c47 75737e87 1ce41254 f00e12e7
[ 55.010000] 90164fb4: 3d06c607 1e26c217 3d05c527 1e25c237
[ 55.020000] 90164fc4: 12359503 96052035 20732077 e7f00f47
[ 55.020000] 90164fd4: 12236002 77637f7c 747b8607 75661c46
[ 55.030000]
[ 55.030000] KERNEL STACK:
[ 55.030000] 92cb5dc0: 00000000 92cb5e54 000000a0 00000000
[ 55.040000] 92cb5dd0: 0000011c 0000003b 902dd310 90029f84
Unable to handle kernel paging request at virtual address 00000000, epc == c07055f0

[root@gx3201 /]# lsmod
ohci_hcd 15264 0 - Live 0xc0074000
ehci_hcd 25520 0 - Live 0xc006c000
av 1121948 2 - Live 0xc06e2000 (cskygdb) p /x 0xc07055f0-0xc06e2000
$2 = 0x235f0

av.ko 反汇编:

105593 RetCode VPU_Init(PhysicalAddress workBuf,VirtualAddress Virtual_addr)
105594 235d6: 7547 lrw r5, 0x1E000
105595 235d8: 1254 mov r4, r5
105596 235da: 1ce4 addu r4, r4, r14
105597 disFlagRegAddr[0] = BIT_FRM_DIS_FLG_0;
105598 disFlagRegAddr[1] = BIT_FRM_DIS_FLG_1;
105599 disFlagRegAddr[2] = BIT_FRM_DIS_FLG_2;
105600 disFlagRegAddr[3] = BIT_FRM_DIS_FLG_3;
105601
105602 for (i = 0; i < sizeof(bit_code) / sizeof(bit_code[0]); i += 4)
105603 235dc: 12e7 mov r7, r14
105604 235de: f00e br 0x235fc
105605 {
105606 dataH = (bit_code[i+0] << 16) | bit_code[i+1];
105607 235e0: c607 ldh r6, (r7, 0)
105608 235e2: 3d06 lsli r6, r6, 16
105609 235e4: c217 ldh r2, (r7, 2)
105610 235e6: 1e26 or r6, r6, r2
105611 dataL = (bit_code[i+2] << 16) | bit_code[i+3];
105612 235e8: c527 ldh r5, (r7, 4)
105613 235ea: 3d05 lsli r5, r5, 16
105614 235ec: c237 ldh r2, (r7, 6)
105615 235ee: 1e25 or r5, r5, r2
105616 VpuWriteMem(vir_code_buf+i*2, dataL);
105617 235f0: 9503 st r5, (r3, 0)
105618 int VPU_IsBusy()
105619 {
105620 return VpuReadReg(BIT_BUSY_FLAG) != 0;
105621 }
105622
  79     for (i = 0; i < sizeof(bit_code) / sizeof(bit_code[0]); i += 4)
80 {
81 dataH = (bit_code[i+0] << 16) | bit_code[i+1];
82 dataL = (bit_code[i+2] << 16) | bit_code[i+3];
83 VpuWriteMem(vir_code_buf+i*2, dataL);
84 VpuWriteMem(vir_code_buf+i*2+4, dataH);
85 }

gdb dump内存中的数据及查看代码段是否被冲:

(cskygdb) dump memory 111.yuv 0x94f54cc8 0x94f54cc8 + 0x450*200
(cskygdb) p 0x450
$7 = 1104 display -size 1104x200 111.yuv Loading section .text, size 0x64b628 lma 0x90000000
    section progress: 100.0%, total progress: 100.0%
Loading section .devtab, size 0xa28 lma 0x9064b628
    section progress: 100.0%, total progress: 100.0%
Start address 0x90000458, load size 6602832
Transfer rate: 853 KB/sec, 4093 bytes/write.
0x90000458 in __reset_vector ()
(cskygdb) 46edfc
Undefined command: "46edfc".  Try "help".
(cskygdb) dump binary memory text.ok 0x90000000 0x90000000+0x46edfc
(cskygdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x900e99ce in idle_thread_main (data=0)
    at /home/yingc/work/gitcode/v1.9-dev/gxcoreapi/ecos3.0/packages/kernel/v3_0/src/common/thread.cxx:1244
1244            HAL_IDLE_THREAD_ACTION(idle_thread_loops[CYG_KERNEL_CPU_THIS()]);
(cskygdb) dump binary memory text1.ok 0x90000000 0x90000000+0x46edfc
(cskygdb) c  21 SECTIONS
 22 {
 23
 24     .text : {
 25             _start_text = .;
 26             . = ALIGN (0x4);
 27         . = ALIGN (0x4); *(.rel.*) *(.rela.*)
 28         . = ALIGN (0x4); _stext = .; _etext = .; _ftext = . ; *(.text*) *(.stub)
 29
 30         . = ALIGN (0x4);
 31                                 _sdata = . ;
 32                                 __data_start = . ;
 33                                 data_start = . ;
 34                                 *(.got_plt)
 35                                 *(.got)
 36                                 FILL(0);
 37                                 . = ALIGN(0x20) ;
 38                                 LONG(-1)
 39                 . = ALIGN(0x20) ;
 40                 *(.rodata)
 41                 *(.rodata*)
 42                 *(.rodata1)
 43                 *(.rodata.*)
 44                 *(.rodata.str1.4)
 45                 *(.gnu.linkonce.r*)
 46                 *(.data)
 47                 *(.data*) 16434 9046ec14 T yaffs_ECCCalculateOther
16435 9046ecbc T yaffs_ECCCorrectOther
16436 9046edfc T __data_start
16437 9046edfc T _sdata
16438 9046edfc T data_start
16439 90473fc4 t __FUNCTION__.11312
16440 90473fd8 t __FUNCTION__.11303
16441 90473fec t __FUNCTION__.11293 ecos3.0/packages/hal/gx/ckmmu/ck610m/var/v3_0/src/ckmmu_ck610m.ld

gdb调试内核.gdbinit文件的写法:

  1 tar jtag jtag://127.0.1.1:1025
2 handle SIG32 nostop noprint
3 handle SIG33 nostop noprint
4 #set $cr18=0x7d
5 #set *0x0030a178 |= 0x7
6 #set *0x0030a178 |= 0x3
7 #set *0x0030a178 |= (1<<4)|(1<<5)
8
9 load
10 #b main
11 #display /i $pc
12 #b IMG.c:1244
13 #b widget.c:968
14
15 #c
16 #q

编译中间结果:

 2155  make ARCH=csky CROSS_COMPILE=csky-linux- uImage -j4
2156 make ARCH=csky CROSS_COMPILE=csky-linux- uImage -j4 V=1
2157 csky-linux-gcc -Wp,-MD,net/sunrpc/.rpcb_clnt.o.d -nostdinc -isystem /usr/local/csky-linux/bin/../lib/gcc/csky-linux/4.5.1/include -D__KERNEL__ -Iinclude -I/home/yingc/gcyin/vgitcode/3211-sync/linux-2.6.27.55/arch/csky/include -include include/linux/autoconf.h -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O0 -fsigned-char -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O0 -I -pipe -DNO_FPU -D__ELF__ -DMAGIC_ROM_PTR -D__linux__ -DNO_TEXT_SECTIONS -Wa,-no-jsri2bsr,-mcpu=ck610f -Iarch/csky/gx3xxx/include -Wframe-larger-than=1024 -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(rpcb_clnt)" -D"KBUILD_MODNAME=KBUILD_STR(sunrpc)" -c -o net/sunrpc/rpcb_clnt.o net/sunrpc/rpcb_clnt.c
2158 csky-linux-gcc -Wp,-MD,net/sunrpc/.rpcb_clnt.o.d -nostdinc -isystem /usr/local/csky-linux/bin/../lib/gcc/csky-linux/4.5.1/include -D__KERNEL__ -Iinclude -I/home/yingc/gcyin/vgitcode/3211-sync/linux-2.6.27.55/arch/csky/include -include include/linux/autoconf.h -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O0 -fsigned-char -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O0 -I -pipe -DNO_FPU -D__ELF__ -DMAGIC_ROM_PTR -D__linux__ -DNO_TEXT_SECTIONS -Wa,-no-jsri2bsr,-mcpu=ck610f -Iarch/csky/gx3xxx/include -Wframe-larger-than=1024 -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(rpcb_clnt)" -D"KBUILD_MODNAME=KBUILD_STR(sunrpc)" -c -o net/sunrpc/rpcb_clnt.o net/sunrpc/rpcb_clnt.c --save-temps
2159 vi rpcb_clnt.i
2160 vi net/sunrpc/rpcb_clnt.c +122 rpcb_clnt.i -O
2161 csky-linux-gcc -Wp,-MD,net/sunrpc/.rpcb_clnt.o.d -nostdinc -isystem /usr/local/csky-linux/bin/../lib/gcc/csky-linux/4.5.1/include -D__KERNEL__ -Iinclude -I/home/yingc/gcyin/vgitcode/3211-sync/linux-2.6.27.55/arch/csky/include -include include/linux/autoconf.h -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O0 -fsigned-char -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O2 -I -pipe -DNO_FPU -D__ELF__ -DMAGIC_ROM_PTR -D__linux__ -DNO_TEXT_SECTIONS -Wa,-no-jsri2bsr,-mcpu=ck610f -Iarch/csky/gx3xxx/include -Wframe-larger-than=1024 -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(rpcb_clnt)" -D"KBUILD_MODNAME=KBUILD_STR(sunrpc)" -c -o net/sunrpc/rpcb_clnt.o net/sunrpc/rpcb_clnt.c --save-temps
2162 vi rpcb_clnt.i
2163 history

linux下用GDB调试可加载模块

http://blog.csdn.net/justlinux2010/article/details/8508333

[root@gx6602 /]# lsmod
ohci_hcd 19028 0 - Live 0xc009e000
ehci_hcd 33276 0 - Live 0xc00b9000
fe 221368 0 - Live 0xc03c7000
av 1933852 0 - Live 0xc0b7f000

yingc@yingc:~/nfs/lib/modules/2.6.27.55$ csky-linux-objdump -h av.ko

av.ko:     file format elf32-csky-little

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .note.gnu.build-id 00000024  00000000  00000000  00000034  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .text         000c1824  00000000  00000000    2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  2 .init.text    000001e8  00000000  00000000  000c187c  2**2

(cskygdb) add-symbol-file ~/nfs/lib/modules/2.6.27.55/av.ko
The address where /home/yingc/nfs/lib/modules/2.6.27.55/av.ko has been loaded is missing
(cskygdb) add-symbol-file ~/nfs/lib/modules/2.6.27.55/av.ko 0xc0b7f058
add symbol table from file "/home/yingc/nfs/lib/modules/2.6.27.55/av.ko" at
    .text_addr = 0xc0b7f058
(y or n) y
Reading symbols from /home/yingc/nfs/lib/modules/2.6.27.55/av.ko...done.
(cskygdb) b gx3201_hdmi_open

yingc@yingc:~/tmp$ csky-linux-gcc -O0 -g -I/usr/local/csky-linux -I/usr/local/csky-linux/csky-linux -I/usr/local/csky-linux/csky-linux/libc/usr/include  -L/usr/local/csky-linux/csky-linux/lib/libstdc++.a  thread.c -L/usr/local/csky-linux/libc/usr/lib/libpthread.a  -static
/tmp/ccCOd8La.o: In function `main':
/home/yingc/tmp/thread.c:31: undefined reference to `pthread_attr_init'
/home/yingc/tmp/thread.c:33: undefined reference to `pthread_attr_setstacksize'
/home/yingc/tmp/thread.c:35: undefined reference to `pthread_create'
/home/yingc/tmp/thread.c:41: undefined reference to `pthread_attr_destroy'
/tmp/ccCOd8La.o: In function `main':
thread.c:(.text+0x90): undefined reference to `pthread_attr_init'
thread.c:(.text+0x94): undefined reference to `pthread_attr_setstacksize'
thread.c:(.text+0x9c): undefined reference to `pthread_create'
thread.c:(.text+0xa8): undefined reference to `pthread_attr_destroy'
collect2: ld returned 1 exit status
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$ csky-linux-gcc -O0 -g -I/usr/local/csky-linux -I/usr/local/csky-linux/csky-linux -I/usr/local/csky-linux/csky-linux/libc/usr/include -L/usr/local/csky-linux/csky-linux/lib/libstdc++.a thread.c -L/usr/local/csky-linux/libc/usr/lib lpthread -static
csky-linux-gcc: lpthread: 没有那个文件或目录
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$ csky-linux-gcc -O0 -g -I/usr/local/csky-linux -I/usr/local/csky-linux/csky-linux -I/usr/local/csky-linux/csky-linux/libc/usr/include -L/usr/local/csky-linux/csky-linux/lib/libstdc++.a thread.c -L/usr/local/csky-linux/libc/usr/lib -lpthread -static
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$
yingc@yingc:~/tmp$ csky-linux-gcc -O0 -g -I/usr/local/csky-linux -I/usr/local/csky-linux/csky-linux -I/usr/local/csky-linux/csky-linux/libc/usr/include -L/usr/local/csky-linux/csky-linux/lib/libstdc++.a thread.c -L/usr/local/csky-linux/libc/usr/lib -lpthread -static

hello world的本质-----预编译,编译,汇编

gcc -E hello.c -o hello.i

这个命令就是用来生成预处理后的文件的。
生成汇编代码文件的命令
gcc -S hello.i -o hello.s
汇编命令
gcc -c hello.s -o hello.o

aa

gdb调试高级用法的更多相关文章

  1. Linux gdb调试器用法全面解析

    GDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具,GDB主要可帮助工程师完成下面4个方面的功能: 启动程序,可以按照工程师自定义的要求随心所欲的运行程序. 让被调试的程序在工程师指定的断 ...

  2. GDB 调试工具高级用法

    解决core核心文件转出问题 ulimit -c #查看core文件的生成开关,若为0则关闭 ulimit -c unlimited #打开开关,只在当前shell生效 sudo sh -c 'ech ...

  3. gdb调试汇总

    1. 启动GDB开始调试: (1)gdb program ///最常用的用gdb启动程序,开始调试的方式(2)gdb program core ///用gdb查看core dump文件,跟踪程序cor ...

  4. Fiddler 高级用法:Fiddler Script 与 HTTP 断点调试

    转载自 https://my.oschina.net/leejun2005/blog/399108 1.Fiddler Script 1.1 Fiddler Script简介 在web前端开发的过程中 ...

  5. Linux高级调试与优化——gdb调试命令

    番外 2019年7月26日至27日,公司邀请<软件调试>和<格蠹汇编——软件调试案例集锦>两本书的作者张银奎老师进行<Linux高级调试与优化>培训,有幸聆听张老师 ...

  6. GDB之调试器用法

    GDB 完成的作用: 启动程序,可以按照工程师自定义的要求随心所欲的运行程序 让被调试的程序在工程师指定的断点处停住,断点可以是条件表达式 当程序被停住时,可以检查此时程序中所发生的事,并追索上文 动 ...

  7. 比较全面的gdb调试命令 (转载)

    转自http://blog.csdn.net/dadalan/article/details/3758025 用GDB调试程序 GDB是一个强大的命令行调试工具.大家知道命令行的强大就是在于,其可以形 ...

  8. gdb调试若干问题

    1.若干命令速查 file <文件名>:加载被调试的可执行程序文件.因为一般都在被调试程序所在目录下执行GDB,因而文本名不需要带路径.示例:(gdb) file gdb-sample r ...

  9. GDB调试:Linux开发人员必备技能

    开篇词:Linux C/C++ 开发人员要熟练掌握 GDB 调试 大家好,我是范蠡,目前在某知名互联网旅游公司基础框架业务部技术专家组任开发经理一职. 本系列课程的主题是 Linux 后台开发的 C/ ...

随机推荐

  1. 【转】Android 应用测试总结

    前提所有的功能分支已完成 启动:1. 启动入口:桌面正常启动,最近运行启动,所有程序列表中启动,锁屏快捷启动2. 其他入口:从其他程序开启应用,从外部以文件形式打开应用(如果有)3. 退回:从其他程序 ...

  2. 数据交互 ajax代码整理

    请求列表通用 /** **加载对应的试卷套题 ** */ function loadQuestions(){ var businessSubClass = { pageNo:pageNo, pageS ...

  3. linux的终端,网络虚拟终端,伪终端(转)

    转自http://www.xuebuyuan.com/877887.html 2013年09月07日 ⁄ 综合 ⁄ 共 4047字 ⁄ 字号 小 中 大 ⁄ 评论关闭 Linux上许多网络服务应用,如 ...

  4. Visual C++ 打印编程技术-编程基础

    背景: windows产生前,操作系统(如DOS等)都不提供支持图像处理的打印机驱动程序,使得程序员为打印出图像,不得不针对使用的打印机 自己编写设备驱动程序,导致了大量的.不必要的重复开发. 随着w ...

  5. SQL 编译与重编译

    编译的含义 当SQLSERVER收到任何一个指令,包括查询(query).批处理(batch).存储过程.触发器(trigger) .预编译指令(prepared statement)和动态SQL语句 ...

  6. c语言数组不同初始化方式的结果

    第一种初始化方式: #include <stdio.h> int main() { int numbers[5]={12,14}; for (int i=0; i<5; i++) { ...

  7. use mkisofs 重新打包beini,tinycore linux

    mkisofs -r -J -V Beini-Custom -v --boot-info-table --boot-load-size 4 -b boot/isolinux/isolinux.bin ...

  8. window redis 安装配置

    1 下载 https://github.com/MSOpenTech/redis/releases 当前最新版本为 redis-2.8.21   下载的为zip包,下载连接为:https://gith ...

  9. 05_天气查询_JAX-WS方式_客户端

    [客户端特点] 支持面向对象开发. 客户端功能调用webService,首先得知道WebService的地址. 一般情况下,只要知道了wsdl的地址,就可以知道WebService的地址. 我们上一篇 ...

  10. C++指针学习笔记

    本文参考http://www.prglab.com/cms/pages/c-tutorial/advanced-data/pointers.php 1.存储其它变量地址的变量(如下面例子中的addre ...