gdb调试_#0 0x00007ffff41ce387 in raise () from /usr/lib64/-程序员宅基地

技术标签: gdb  shell  linux  编程  gnu  

  1. Ubuntu gdb 调试 过程
    jin@ubuntu:~/jin/gdb$ gdb -v
    GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
    Copyright (C) 2012 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    For bug reporting instructions, please see:
    <http://bugs.launchpad.net/gdb-linaro/>.
    
    jin@ubuntu:~/jin/gdb$ gdb -v
    GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
    Copyright (C) 2012 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    For bug reporting instructions, please see:
    <http://bugs.launchpad.net/gdb-linaro/>.
    jin@ubuntu:~/jin/gdb$ 
    jin@ubuntu:~/jin/gdb$ 
    jin@ubuntu:~/jin/gdb$ 
    jin@ubuntu:~/jin/gdb$ gdb a.out 
    GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
    Copyright (C) 2012 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    For bug reporting instructions, please see:
    <http://bugs.launchpad.net/gdb-linaro/>...
    Reading symbols from /home/jin/jin/gdb/a.out...(no debugging symbols found)...done.
    (gdb) r
    Starting program: /home/jin/jin/gdb/a.out 
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    123
    [New Thread 0x7ffff77fb700 (LWP 11897)]
    Process_pid=[11894]
    This is the main process.
    This is the main process.
    This is the main process.
    This is a pthread. 0
    This is a pthread. 1
    This is a pthread. 2
    This is a pthread. 3
    This is a pthread. 4
    This is a pthread. 5
    ^C
    Program received signal SIGINT, Interrupt.
    0x00007ffff7bc6148 in pthread_join () from /lib/x86_64-linux-gnu/libpthread.so.0
    (gdb) i threads
      Id   Target Id         Frame 
      2    Thread 0x7ffff77fb700 (LWP 11897) "a.out" 0x00007ffff78be06d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
    * 1    Thread 0x7ffff7fe6700 (LWP 11894) "a.out" 0x00007ffff7bc6148 in pthread_join () from /lib/x86_64-linux-gnu/libpthread.so.0
    (gdb) bt
    #0  0x00007ffff7bc6148 in pthread_join () from /lib/x86_64-linux-gnu/libpthread.so.0
    #1  0x0000000000400832 in main ()
    (gdb) c
    Continuing.
    This is a pthread. 6
    This is a pthread. 7
    This is a pthread. 8
    This is a pthread. 9
    This is a pthread. 10
    This is a pthread. 11
    This is a pthread. 12
    This is a pthread. 13
    ^C
    Program received signal SIGINT, Interrupt.
    0x00007ffff7bc6148 in pthread_join () from /lib/x86_64-linux-gnu/libpthread.so.0
    (gdb) q
    A debugging session is active.
    
    	Inferior 1 [process 11894] will be killed.
    
    Quit anyway? (y or n) y
    jin@ubuntu:~/jin/gdb$ 
    
    signal(SIGINT, sigroutine);
    printf( "Process_pid=[%d]\n", getpid() );
                                                      
    void sigroutine(int unused)
    {
        printf("Catch a signal SIGINT \n");
    	//exit(1);
    }
    
    
    (gdb) r
    Starting program: /home/jin/jin/gdb/a.out 
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    123
    [New Thread 0x7ffff77fb700 (LWP 12106)]
    Process_pid=[12103]
    This is a pthread. 0
    This is the main process.
    This is the main process.
    This is the main process.
    This is a pthread. 1
    This is a pthread. 2
    This is a pthread. 3
    ^C
    Program received signal SIGINT, Interrupt.
    0x00007ffff7bc6148 in pthread_join () from /lib/x86_64-linux-gnu/libpthread.so.0
    (gdb) signal SIGINT
    Continuing with signal SIGINT.
    Catch a signal SIGINT 
    This is a pthread. 4
    This is a pthread. 5
    This is a pthread. 6
    This is a pthread. 7
    This is a pthread. 8
    This is a pthread. 9
    This is a pthread. 10
    
    jin@ubuntu:~/jin/gdb$ cat /proc/sys/kernel/core_pattern
    /home/jin/jin/gdb/%t-%e-%p-%c.core
    jin@ubuntu:~/jin/gdb$ 
    jin@ubuntu:~/jin/gdb$ ulimit -c
    10240
    jin@ubuntu:~/jin/gdb$ ./a.out 
    123
    Process_pid=[12418]
    This is the main process.
    This is the main process.
    This is the main process.
    This is a pthread. 0
    This is a pthread. 1
    Segmentation fault (core dumped)
    jin@ubuntu:~/jin/gdb$ 
    jin@ubuntu:~/jin/gdb$ ls
    1646235990-a.out-12412-10485760.core  1646236045-a.out-12418-10485760.core  a.out  test.cpp  test.cpp~
    jin@ubuntu:~/jin/gdb$ rm 164623*
    jin@ubuntu:~/jin/gdb$ ./a.out 
    123
    Process_pid=[12460]
    This is the main process.
    This is the main process.
    This is the main process.
    This is a pthread. 0
    This is a pthread. 1
    Segmentation fault (core dumped)
    jin@ubuntu:~/jin/gdb$ cat 1646236077-a.out-12460-10485760.core 
    ELF>@@8�x @ `0`@�]P���$`��$��`�
                                                                             �$p`�p&�$�`�`F�$@@���F�$  ���F�$PP�G�$���H�$���h�$ ��h�$0��h�$@@p��h�$ p����$00��Њ�$00Ѓ��$����$  �����   �����0�`�����PCORE
    
                                                                                 �0*0�0*0¶��0@�����0����m �$�������������$@3�����+���$�CORER$@���0*0�0*0a.out./a.out 0CORE!�����d@@8	�h�$    0@
               �
    ��yĶ���߶���Ķ��CORE�������������@LINUX�������������PCORE
    
                                                                                  �0*0�0*0R	@`�F�$Њ�$�Њ�$��������Њ�$-�$3��
    �$+
    �$CORE���%%%%%%%%%%%%%%%%�@LINUX���%%%%%%%%%%%%%%%%�ELF>0@@x@8	@@@@@@��88@8@@@$
                                                                                                                         $
                                                                                                                           ``8H @@`@`��TT@T@DDP�td�	�	@�	@LLQ�tdR�td``��/lib64/ld-linux-x86-64.so.2GNUGNU���"o�@X�q�Ns^)
    L%afmzZA 4 tlibpthread.so.0_Jv_RegisterClassespthread_createpthread_join__gmon_start__libc.so.6signalputsgetpidprintfsleep__libc_start_mainGLIBC_2.2.5P ui	�ui	�````` `(`08`
    H����Z�UH���5J
     �%L
     @�%J
     h������%B
     h������%:
     h������%2
     h������%*
     h������%"
     h������%
     h������%
     h�p���1�I��^H��H���PTI��@H��@H�ǒ@��������H�H�y	 H��t��H�Ð������������UH��SH��=�	 uK�0`H��	 H��(`H��H��H9�s$fDH��H��	 ��(`H��	 H9�r��s	 H�[]�fff.�H�=@ UH��t�H��]�8`��]Ð�UH��H�E�H�E��]�UH�������]�UH��H�� H�}��E��"�E��ƿ<	@�������������E��}�/u����u���UH��H���}��S	@�0�����UH��H�� H�E��j	@����H�E���4@�H��������E��}�t
    �o	@������{@�����������ƿ�	@�������E���	@������E��}�����u������������H�E��H���������Ð�������H�l$�L�d$�H�-� L�%� L�l$�L�t$�L�|$�H�\$�H��8L)�A��I��H��I�������H��t1@L��L��D��A��H��H9�u�H�\H�l$L�d$L�l$ L�t$(L�|$0H��8��Ð�������������UH��SH�H� H���t�`DH���H�H���u�H�[]Ð�H��O���H��This is a pthread. %d
    Create pthread error!Process_pid=[%d]
    This is the main process.;����d`����u������������������
                                                              ����,,���TzRx
                                                                                   �$�����FJ
    P                                                                                          �?;*3$"D����A�C
     d����
    F     A�C
    B����GA�C
    R�����A�C
    ������A�C
      $�h����Q��_@��
                        ��������������������P
    (       @���o�@�@�@                       �@
    �
    �$P_�$@�$!�	���op@���o���oX@@`�"��$�1j�$@�G�$p��$�.�$1�$
    �$^C
    jin@ubuntu:~/jin/gdb$ 
    jin@ubuntu:~/jin/gdb$ ls
    1646236077-a.out-12460-10485760.core  a.out  test.cpp  test.cpp~
    jin@ubuntu:~/jin/gdb$ gdb a.out 1646236077-a.out-12460-10485760.core 
    GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
    Copyright (C) 2012 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    For bug reporting instructions, please see:
    <http://bugs.launchpad.net/gdb-linaro/>...
    Reading symbols from /home/jin/jin/gdb/a.out...(no debugging symbols found)...done.
    Illegal process-id: 1646236077-a.out-12460-10485760.core.
    [New LWP 12460]
    [New LWP 12461]
    
    warning: Can't read pathname for load map: Input/output error.
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Core was generated by `./a.out'.
    Program terminated with signal 11, Segmentation fault.
    #0  0x0000000000400724 in fun2() ()
    (gdb) bt
    #0  0x0000000000400724 in fun2() ()
    #1  0x0000000000400732 in fun1() ()
    #2  0x0000000000400830 in main ()
    (gdb) i threads
      Id   Target Id         Frame 
      2    Thread 0x7f24970af700 (LWP 12461) 0x00007f2497198f2d in write () from /lib/x86_64-linux-gnu/libc.so.6
    * 1    Thread 0x7f249789b700 (LWP 12460) 0x0000000000400724 in fun2() ()
    (gdb) 
    
    
    
    jin@ubuntu:~/jin/gdb$ ls 1646236077-a.out-12460-10485760.core -l
    -rw------- 1 jin jin 8794112 Mar  2 07:47 1646236077-a.out-12460-10485760.core
    jin@ubuntu:~/jin/gdb$ 
    

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <pthread.h>

int fun2()
{
  printf("This is a fun2.\n");
  char *prt = 0;
  char *ptr = "test";
  //free(ptr);
  *prt = 0;
}

int fun1()
{
  fun2();
}

void *thread(void *arg)
{
  int i;
  for (i = 0; i < 30000; i++)
  {
    printf("This is a pthread. %d\n", i);
    sleep(1);
  }
}

void sigroutine(int unused)
{
  printf("Catch a signal SIGINT \n");
}

int main()
{
  char *prt = 0;
  printf("123\r\n");
  ///

  pthread_t id;
  int i, ret;
  ret = pthread_create(&id, NULL, thread, NULL);
  if (ret != 0)
  {
    printf("Create pthread error!\n");
    exit (1);
  }

  signal(SIGINT, sigroutine);
  printf("Process_pid=[%d]\n", getpid());

  for (i = 0; i < 3; i++)
    printf("This is the main process.\n");
  pthread_join(id, NULL);

  ///
  // while(1)
  if (0)
  {
    sleep(1);
    fun1();
    //*prt =0;
  }
}
int fun2()
{
  printf("This is a fun2.\n");
  char *prt = 0;
  char *ptr = "test";
  free(ptr);//14
  *prt = 0;
}

g++ test.cpp -lpthread -g


Starting program: /home/jin/jin/gdb/a.out 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
123
[New Thread 0x7ffff77fb700 (LWP 12785)]
Process_pid=[12782]
This is the main process.
This is the main process.
This is the main process.
This is a pthread. 0
This is a fun2.
This is a pthread. 1
*** glibc detected *** /home/jin/jin/gdb/a.out: free(): invalid pointer: 0x00000000004009bc ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7da66)[0x7ffff7879a66]
/home/jin/jin/gdb/a.out[0x400792]
/home/jin/jin/gdb/a.out[0x4007a4]
/home/jin/jin/gdb/a.out[0x4008a2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7ffff781d7ed]
/home/jin/jin/gdb/a.out[0x4006a9]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:01 4200174                            /home/jin/jin/gdb/a.out
00600000-00601000 r--p 00000000 08:01 4200174                            /home/jin/jin/gdb/a.out
00601000-00602000 rw-p 00001000 08:01 4200174                            /home/jin/jin/gdb/a.out
00602000-00623000 rw-p 00000000 00:00 0                                  [heap]
7ffff6dd3000-7ffff6de8000 r-xp 00000000 08:01 659004                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6de8000-7ffff6fe7000 ---p 00015000 08:01 659004                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6fe7000-7ffff6fe8000 r--p 00014000 08:01 659004                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6fe8000-7ffff6fe9000 rw-p 00015000 08:01 659004                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6ffa000-7ffff6ffb000 rw-p 00000000 00:00 0 
7ffff6ffb000-7ffff6ffc000 ---p 00000000 00:00 0 
7ffff6ffc000-7ffff77fc000 rw-p 00000000 00:00 0 
7ffff77fc000-7ffff79b3000 r-xp 00000000 08:01 664893                     /lib/x86_64-linux-gnu/libc-2.15.so
7ffff79b3000-7ffff7bb2000 ---p 001b7000 08:01 664893                     /lib/x86_64-linux-gnu/libc-2.15.so
7ffff7bb2000-7ffff7bb6000 r--p 001b6000 08:01 664893                     /lib/x86_64-linux-gnu/libc-2.15.so
7ffff7bb6000-7ffff7bb8000 rw-p 001ba000 08:01 664893                     /lib/x86_64-linux-gnu/libc-2.15.so
7ffff7bb8000-7ffff7bbd000 rw-p 00000000 00:00 0 
7ffff7bbd000-7ffff7bd5000 r-xp 00000000 08:01 664899                     /lib/x86_64-linux-gnu/libpthread-2.15.so
7ffff7bd5000-7ffff7dd4000 ---p 00018000 08:01 664899                     /lib/x86_64-linux-gnu/libpthread-2.15.so
7ffff7dd4000-7ffff7dd5000 r--p 00017000 08:01 664899                     /lib/x86_64-linux-gnu/libpthread-2.15.so
7ffff7dd5000-7ffff7dd6000 rw-p 00018000 08:01 664899                     /lib/x86_64-linux-gnu/libpthread-2.15.so
7ffff7dd6000-7ffff7dda000 rw-p 00000000 00:00 0 
7ffff7dda000-7ffff7dfc000 r-xp 00000000 08:01 664901                     /lib/x86_64-linux-gnu/ld-2.15.so
7ffff7fe5000-7ffff7fe8000 rw-p 00000000 00:00 0 
7ffff7ff8000-7ffff7ffb000 rw-p 00000000 00:00 0 
7ffff7ffb000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00022000 08:01 664901                     /lib/x86_64-linux-gnu/ld-2.15.so
7ffff7ffd000-7ffff7fff000 rw-p 00023000 08:01 664901                     /lib/x86_64-linux-gnu/ld-2.15.so
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff7832035 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0  0x00007ffff7832035 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff783579b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff786f22e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff7879a66 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000000400792 in fun2 () at test.cpp:14
#5  0x00000000004007a4 in fun1 () at test.cpp:20
#6  0x00000000004008a2 in main () at test.cpp:62
(gdb) bt
#0  0x00007ffff7832035 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff783579b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff786f22e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff7879a66 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000000400792 in fun2 () at test.cpp:14
#5  0x00000000004007a4 in fun1 () at test.cpp:20
#6  0x00000000004008a2 in main () at test.cpp:62
(gdb) f 4
#4  0x0000000000400792 in fun2 () at test.cpp:14
14	  free(ptr);
(gdb) disassemble 
Dump of assembler code for function fun2():
   0x0000000000400764 <+0>:	push   %rbp
   0x0000000000400765 <+1>:	mov    %rsp,%rbp
   0x0000000000400768 <+4>:	sub    $0x10,%rsp
   0x000000000040076c <+8>:	mov    $0x4009ac,%edi
   0x0000000000400771 <+13>:	callq  0x400610 <puts@plt>
   0x0000000000400776 <+18>:	movq   $0x0,-0x10(%rbp)
   0x000000000040077e <+26>:	movq   $0x4009bc,-0x8(%rbp)
   0x0000000000400786 <+34>:	mov    -0x8(%rbp),%rax
   0x000000000040078a <+38>:	mov    %rax,%rdi
   0x000000000040078d <+41>:	callq  0x4005f0 <free@plt>
=> 0x0000000000400792 <+46>:	mov    -0x10(%rbp),%rax
   0x0000000000400796 <+50>:	movb   $0x0,(%rax)
   0x0000000000400799 <+53>:	leaveq 
   0x000000000040079a <+54>:	retq   
End of assembler dump.
(gdb) backtrace
#0  0x00007ffff7832035 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff783579b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff786f22e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff7879a66 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000000400792 in fun2 () at test.cpp:14
#5  0x00000000004007a4 in fun1 () at test.cpp:20
#6  0x00000000004008a2 in main () at test.cpp:62
(gdb) frame 4
#4  0x0000000000400792 in fun2 () at test.cpp:14
14	  free(ptr);
(gdb) 
g++ test.cpp -lpthread

7ffff7ffd000-7ffff7fff000 rw-p 00023000 08:01 664901                     /lib/x86_64-linux-gnu/ld-2.15.so
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff7832035 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff7832035 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff783579b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff786f22e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff7879a66 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000000400792 in fun2() ()
#5  0x00000000004007a4 in fun1() ()
#6  0x00000000004008a2 in main ()
(gdb) f 4
#4  0x0000000000400792 in fun2() ()
(gdb) 

int fun2()
{
  printf("This is a fun2.\n");
  char *prt = 0;
  char *ptr = "test";
  //free(ptr);
  *prt = 0;//15
}

g++ test.cpp -lpthread -g

(gdb) bt
#0  0x000000000040073a in fun2 () at test.cpp:15
#1  0x0000000000400748 in fun1 () at test.cpp:20
#2  0x0000000000400846 in main () at test.cpp:62
(gdb) f 0
#0  0x000000000040073a in fun2 () at test.cpp:15
15	  *prt = 0;
(gdb) 

//

g++ test.cpp -lpthread -g1
g++ test.cpp -lpthread -g0

(gdb) f 0
#0  0x000000000040073a in fun2 ()
(gdb) 

//

g++ test.cpp -lpthread -g2
(gdb) f 0
#0  0x000000000040073a in fun2 () at test.cpp:15
15	  *prt = 0;

 g++ test.cpp -lpthread -g1

$ gdb a.exe
GNU gdb (GDB) (Cygwin 10.2-1) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from a.exe...
(gdb) r
Starting program: /cygdrive/f/jin/gdb/a.exe
[New Thread 36004.0x5ccc]
[New Thread 36004.0x2d7c]
[New Thread 36004.0x8f5c]
123
[New Thread 36004.0x6644]
This is a pthread. 0
Process_pid=[982]
This is the main process.
This is the main process.
This is the main process.
This is a pthread. 1
This is a fun2.

Thread 1 "a" received signal SIGSEGV, Segmentation fault.
0x00000001004010ae in fun2 () at test.cpp:15
15        *prt = 0;
(gdb)

gdb调试coredump(使用篇)_瞌睡的洋葱的博客-程序员宅基地_gdb调试core文件

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/jinchengzhou/article/details/123242760

智能推荐

mysql dir命令_mysql日常命令二-程序员宅基地

文章浏览阅读200次。三、Mysql命令操作(插入、删除、更新)#mysqldump-uwcnc-psmgp_apps_wcnc>wcnc.sqlMysql导出数据库一个表#mysqldump-u用户名-p数据库名表名>导出的文件名#mysqldump-uwcnc-psmgp_apps_wcncusers>wcnc_users.sqlMysql导出一个数据库结构#mys..._mysql中的 cd,dir命令是什么

Driver error 11_xl_err_queue_is_full-程序员宅基地

文章浏览阅读7.6k次,点赞12次,收藏15次。CAN 1 : Message with ID = 1335 could not be sent. Driver error 11 in TransmitCANFrame, “XL_ERR_QUEUE_IS_FULL”很久没用CANOE了,今天使用CANOE进行总线仿真时,没有接入真实的物理节点,完全的虚拟总线仿真,在START后,报错“Driver error 11 in TransmitCANFrame”。后面排查发现,是因为总线仿真设置的问题,将模式调整为Simulat bus就可以了,具体如下图_xl_err_queue_is_full

linux 上使用 samba 共享文件夹给 windows-程序员宅基地

文章浏览阅读775次,点赞17次,收藏11次。Samba 是 Linux 和 Unix 系统上实现 smb 协议的一个软件,分为服务端和客户端。smb 是一种在局域网上共享文件和打印机的一种通信协议,为局域网内的不同计算机之间提供文件和打印机等资源的共享服务。Samba 监听端口有 TCP 139、445,UDP 137、138,其中 TCP 端口对应的服务是 smbd 服务,提供对服务器中文件、打印资源的共享访问;UDP 端口对应的服务是 nmbd 服务,提供基于 NetBIOS 主机名称的解析。Samba 的使用用户都是系统用户,在。

Oracle DBWR,LGWR,CKPT,ARCH 触发条件 总结-程序员宅基地

文章浏览阅读30次。oraclebufferheaderfile磁盘parallel一. DBWR写磁盘数据触发条件 1. 当进程在辅助LRU链表和主LRU链表上扫描以查找可以覆盖的buffer header[...

第三方支付现在处于什么阶段?如何衍生第三方支付的产业链?_支付的衍生场景-程序员宅基地

文章浏览阅读1.3k次。 回答第一个问题我们不如先研究三方支付的产业阶段,研究产业的过去,现在以及未来的价值走向去看看在这个产业链上还有多少空间是尚待开发的,目前又到达了什么阶段。首先我们先看看三方支付究竟帮助我们解决了什么?它为我们提供了什么样的价值?支付双边市场运营机构的价值创造·因交易成本的降低,第三方支付机构创造了四大类价值 一是快捷支付价值。对支付客户而言,相对于银行的支付服务,第三方支付机..._支付的衍生场景

LeetcodeT1.两数之和(未完成)_leetcode 报错is located 56 bytes to the left of glob-程序员宅基地

文章浏览阅读135次。看似正确的代码:/** * Note: The returned array must be malloced, assume caller calls free(). */int* twoSum(int* nums, int numsSize, int target, int* returnSize){ static int indexes[1000] = {0}; i..._leetcode 报错is located 56 bytes to the left of global variable 'sumchild' d

随便推点

人工智能论文合集(18年11月)_人工智能毕业论文csdn-程序员宅基地

文章浏览阅读1.8k次。&nbsp;&nbsp;&nbsp;&nbsp;分享一些NLP相关的论文,简要对摘要做了翻译&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Streaming Graph Neural Networks&nbsp;&nbsp;&nbsp;&nbsp;摘要:图是许多真实世界数据的基本表示,如社交网络。近年来,人们越来越努力将神经网络模型扩展到图形结构数据。这些通常被称为图神经网络的方法已..._人工智能毕业论文csdn

Linux 线程到底是什么(比喻+图解)_什么是占用文件的线程-程序员宅基地

文章浏览阅读378次。抽象概念:进程是资源分配的基本单位,线程是cpu调度的基本单位这样的概念过于抽象,不容易让人理解,下面我们进行一个比喻,将抽象的概念转化为我们生活中的例子进程=火车 线程=车厢我们假如要拉1000人从广州到北京,但是一个火车只有1个车厢,一个车厢只能装下200人。此时我们有两种方案可以选择,第一是增加火车的数量,5个火车同时拉200人;第二种方案是一个火车多拉几个车厢,也就是再增加4个车厢连接到火车末尾,这样子就一个火车就能拉1000人了。此时我们将这两种方案用进程和线程来理解,第一种是多创建几._什么是占用文件的线程

居然有81所大学!今年考408的所有大学集合!-程序员宅基地

文章浏览阅读1.1w次,点赞17次,收藏85次。小编每年都整理考408的院校专业名单:2017年目前考408的院校大全!!小编吐血整理!2018年【重磅】考408的院校和专业大全!2019年重磅!考408的学校..._哪些生物信息考408

巧妙使用ABBYY FineReader PDF 15页面管理功能调整页面布局_abbyy finereader pdf怎么把页面调为大小一致-程序员宅基地

文章浏览阅读2k次。页面管理功能是ABBYYFineReader PDF 15的一项PDF文档管理功能,允许使用者为当前PDF文档添加新页面、调整格式、创建新PDF文档等,以实现快捷的页面布局功能。作为一个独立的面板,页面管理面板可自由地调整大小,以适应我们的页面管理需求。接下来,一起来详细了解下这项功能吧。图1:ABBYY FineReader PDF 15界面一、调整页面管理面板由于ABBYY FineReader PDF 15的页面管理面板是独立于其他面板的,因此,可以通过鼠标拖拉右侧边框的方式,.._abbyy finereader pdf怎么把页面调为大小一致

PostgreSQL 报ERROR: column c.relhasoids does not exist-程序员宅基地

文章浏览阅读3.3k次。错误信息PostgreSQL 远程连接报ERROR: column c.relhasoids does not exist解决方法检查自己的Navicat 是否为15以下版本,直接按照Navicat 15版本即可_error: column c.relhasoids does not exist

高手经验分享,嵌入式开发出现BUG的常见原因-程序员宅基地

文章浏览阅读1k次,点赞2次,收藏8次。点击上方“小麦大叔”,选择“置顶/星标公众号”福利干货,第一时间送达在嵌入式开发软件中查找和消除潜在的错误是一项艰巨的任务。通常需要英勇的努力和昂贵的工具才能从观察到的崩溃,死机或其他计划外的运行时行为追溯到根本原因。在最坏的情况下,根本原因会破坏代码或数据,使系统看起来仍然可以正常工作或至少在一段时间内仍能正常工作。工程师常常放弃尝试发现不常见异常的原因,这些异常在实验..._嵌入式遇到的bug

推荐文章

热门文章

相关标签