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

智能推荐

Docker 快速上手学习入门教程_docker菜鸟教程-程序员宅基地

文章浏览阅读2.5w次,点赞6次,收藏50次。官方解释是,docker 容器是机器上的沙盒进程,它与主机上的所有其他进程隔离。所以容器只是操作系统中被隔离开来的一个进程,所谓的容器化,其实也只是对操作系统进行欺骗的一种语法糖。_docker菜鸟教程

电脑技巧:Windows系统原版纯净软件必备的两个网站_msdn我告诉你-程序员宅基地

文章浏览阅读5.7k次,点赞3次,收藏14次。该如何避免的,今天小编给大家推荐两个下载Windows系统官方软件的资源网站,可以杜绝软件捆绑等行为。该站提供了丰富的Windows官方技术资源,比较重要的有MSDN技术资源文档库、官方工具和资源、应用程序、开发人员工具(Visual Studio 、SQLServer等等)、系统镜像、设计人员工具等。总的来说,这两个都是非常优秀的Windows系统镜像资源站,提供了丰富的Windows系统镜像资源,并且保证了资源的纯净和安全性,有需要的朋友可以去了解一下。这个非常实用的资源网站的创建者是国内的一个网友。_msdn我告诉你

vue2封装对话框el-dialog组件_<el-dialog 封装成组件 vue2-程序员宅基地

文章浏览阅读1.2k次。vue2封装对话框el-dialog组件_

MFC 文本框换行_c++ mfc同一框内输入二行怎么换行-程序员宅基地

文章浏览阅读4.7k次,点赞5次,收藏6次。MFC 文本框换行 标签: it mfc 文本框1.将Multiline属性设置为True2.换行是使用"\r\n" (宽字符串为L"\r\n")3.如果需要编辑并且按Enter键换行,还要将 Want Return 设置为 True4.如果需要垂直滚动条的话将Vertical Scroll属性设置为True,需要水平滚动条的话将Horizontal Scroll属性设_c++ mfc同一框内输入二行怎么换行

redis-desktop-manager无法连接redis-server的解决方法_redis-server doesn't support auth command or ismis-程序员宅基地

文章浏览阅读832次。检查Linux是否是否开启所需端口,默认为6379,若未打开,将其开启:以root用户执行iptables -I INPUT -p tcp --dport 6379 -j ACCEPT如果还是未能解决,修改redis.conf,修改主机地址:bind 192.168.85.**;然后使用该配置文件,重新启动Redis服务./redis-server redis.conf..._redis-server doesn't support auth command or ismisconfigured. try

实验四 数据选择器及其应用-程序员宅基地

文章浏览阅读4.9k次。济大数电实验报告_数据选择器及其应用

随便推点

灰色预测模型matlab_MATLAB实战|基于灰色预测河南省社会消费品零售总额预测-程序员宅基地

文章浏览阅读236次。1研究内容消费在生产中占据十分重要的地位,是生产的最终目的和动力,是保持省内经济稳定快速发展的核心要素。预测河南省社会消费品零售总额,是进行宏观经济调控和消费体制改变创新的基础,是河南省内人民对美好的全面和谐社会的追求的要求,保持河南省经济稳定和可持续发展具有重要意义。本文建立灰色预测模型,利用MATLAB软件,预测出2019年~2023年河南省社会消费品零售总额预测值分别为21881...._灰色预测模型用什么软件

log4qt-程序员宅基地

文章浏览阅读1.2k次。12.4-在Qt中使用Log4Qt输出Log文件,看这一篇就足够了一、为啥要使用第三方Log库,而不用平台自带的Log库二、Log4j系列库的功能介绍与基本概念三、Log4Qt库的基本介绍四、将Log4qt组装成为一个单独模块五、使用配置文件的方式配置Log4Qt六、使用代码的方式配置Log4Qt七、在Qt工程中引入Log4Qt库模块的方法八、获取示例中的源代码一、为啥要使用第三方Log库,而不用平台自带的Log库首先要说明的是,在平时开发和调试中开发平台自带的“打印输出”已经足够了。但_log4qt

100种思维模型之全局观思维模型-67_计算机中对于全局观的-程序员宅基地

文章浏览阅读786次。全局观思维模型,一个教我们由点到线,由线到面,再由面到体,不断的放大格局去思考问题的思维模型。_计算机中对于全局观的

线程间控制之CountDownLatch和CyclicBarrier使用介绍_countdownluach于cyclicbarrier的用法-程序员宅基地

文章浏览阅读330次。一、CountDownLatch介绍CountDownLatch采用减法计算;是一个同步辅助工具类和CyclicBarrier类功能类似,允许一个或多个线程等待,直到在其他线程中执行的一组操作完成。二、CountDownLatch俩种应用场景: 场景一:所有线程在等待开始信号(startSignal.await()),主流程发出开始信号通知,既执行startSignal.countDown()方法后;所有线程才开始执行;每个线程执行完发出做完信号,既执行do..._countdownluach于cyclicbarrier的用法

自动化监控系统Prometheus&Grafana_-自动化监控系统prometheus&grafana实战-程序员宅基地

文章浏览阅读508次。Prometheus 算是一个全能型选手,原生支持容器监控,当然监控传统应用也不是吃干饭的,所以就是容器和非容器他都支持,所有的监控系统都具备这个流程,_-自动化监控系统prometheus&grafana实战

React 组件封装之 Search 搜索_react search-程序员宅基地

文章浏览阅读4.7k次。输入关键字,可以通过键盘的搜索按钮完成搜索功能。_react search