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

智能推荐

已解决(selenium操作火狐浏览器报错)TypeError: __init__() got an unexpected keyword argument ‘firefox_options‘-程序员宅基地

文章浏览阅读1.6w次,点赞8次,收藏18次。已解决(selenium操作火狐浏览器报错)TypeError: __init__() got an unexpected keyword argument ‘firefox_options‘_typeerror: __init__() got an unexpected keyword argument 'chrome_options

python方差_Python编程:方差、标准差、均方差、均方根值、均方误差、均方根误差...-程序员宅基地

文章浏览阅读315次。python实现代码# -*- coding: utf-8 -*-import mathdef get_average(records):"""平均值"""return sum(records) / len(records)def get_variance(records):"""方差 反映一个数据集的离散程度"""average = get_average(records)return sum(..._pycharm方差计算代码

jmeter接口测试实例(五)对cookies的自动管理,实现登录后修改用户信息_jmeter中post请求如何更改每次的用户名-程序员宅基地

文章浏览阅读902次。一、前提:cookie是保存在本地,用来记录用户信息,最典型的作用是判断用户是否已经登录。如果一个接口,需要用户登录后,才能进行操作,如下,修改用户信息那么这时候,就需要用到cookie去识别这个登录的用户,因为要修改的是这个登录的用户的信息。二、使用1、jmeter.properties 中 将CookieManager.save.cookies 设置为true。完成后重启jmet..._jmeter中post请求如何更改每次的用户名

python新建项目没有venv_pycharm配置venv虚拟环境-程序员宅基地

文章浏览阅读7.5k次,点赞2次,收藏2次。虚拟环境的好处:搭建独立的python运行环境,不与其他产生冲突虚拟环境有助于包的管理和防止版本冲突3.删除卸载方便虚拟环境的搭建:1.进入python的Scripts下,执行:pip3 install virtualenv2.选择建立虚拟环境的文件夹,我这边是直接在D盘software下面创建了一个virtualenv,如图:image.png3.创建虚拟环境:virtualenv --no-s..._pycharm没有venv怎么办

M1芯片的Mac在开发iOS项目时遇到的问题汇总(模拟器无法运行,Cocoapods错误等)_oc cocospods 安装依赖库之后不能使用模拟器了-程序员宅基地

文章浏览阅读2.3k次。--pod install时报错,且错误提示中有“ffi”字眼,提示错误:/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi/library.rb:275: [BUG] Bus Error at 0x00000001042fc000 ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]解决方案:juejin.cn/post/698064…--pod repo upd_oc cocospods 安装依赖库之后不能使用模拟器了

编辑器VSCode使用心得-程序员宅基地

文章浏览阅读540次。工欲善其事必先利其器,趁手的工具会使我们开发事半功倍。市面上的编辑器我用过许多,编辑器使用经历Notepad++,(开源)这个应该是最轻量级的吧,查看代码还好,编辑代码就算了官网地址:https://notepad-plus-plus.org/Brackets,(开源)这个也不错,github-star:30k了,上次发布版本是6月..._vscode nextick

随便推点

西部数码mysql怎么用织梦_[原创]织梦程序(DeDeCms)常见问题集锦-程序员宅基地

文章浏览阅读95次。前言:织梦程序是最知名的cms程序,使用广泛,但很多朋友对织梦还不太熟悉,通过工单分析得知,经常容易出现本文中的问题,本次统一整理出来,希望对新手朋友有帮助,本文写的非常详细,请仔细阅读,一、描述:“dedecms错误警告:连接数据库失败,可能数据库密码不对或数据库服务器出错”如图:分析:用织梦程序制作的站点做迁移服务器后容易出现这个问题,原因是程序中设置的数据库连接信息有误连接不到数据库,解决方..._西部数码支不支持织梦的程序

免安装mysql启动3534错误处理_mysql 免安装版本启动时 3534出错_mysql-程序员宅基地

文章浏览阅读295次。上午在win7下安装MYSQL,只到“net start mysql”这一步报错:3534的错误:于是在百度中搜索关键字“mysql服务无法启动3534”。参考以下两个链接中的方法,解决了3534启动失败的问题:mysql服务无法启动3534错误。http://jingyan.baidu.com/article/219f4bf7e978fcde442d38a9.htmlhttp://blog.cs..._免安装mysql启动失败

评测了10款画流程图软件,这4款最好用!(完全免费)_好用的流程图软件免费-程序员宅基地

文章浏览阅读5.1w次,点赞58次,收藏295次。最近在做项目和复习的时候,用了不少流程图软件给我帮了大忙,所以今天就来分享分享你在网上搜索一下流程图软件,能找到很多很多:但这些软件多数并不是专门绘制流程图的软件,它可能是一些思维导图软件、或者说一些产品交互原型图软件,使用时或多或少有些麻烦。而且,普遍这些软件缺点也很多,比如:只有在线版:ProcessOn(https://www.processon.com)导出功能收费:迅捷流程图软件体积庞大:VISIO就没有一款简单易用、绿色免费的流程图软件吗?阿虚花了不少时间,挨着_好用的流程图软件免费

在CentOS6.9安装Azkaban3.50.0_centos6.9 azkaban-程序员宅基地

文章浏览阅读1.4k次。cd /data/install_pkgwget https://github.com/azkaban/azkaban/archive/3.50.0.tar.gztar -zxvf 3.50.0.tar.gzvi /data/install_pkg/azkaban-3.50.0/azkaban-common/src/main/java/azkaban/utils/EmailMessage..._centos6.9 azkaban

Java项目基于ssm+vue.js的学生宿舍维修服务平台附带文章和源代码设计说明文档ppt-程序员宅基地

文章浏览阅读586次,点赞23次,收藏30次。博主介绍:CSDN特邀作者、985计算机专业毕业、某互联网大厂高级全栈开发程序员、码云/掘金/华为云/阿里云/InfoQ/StackOverflow/github等平台优质作者、专注于Java、小程序、前端、python等技术领域和毕业项目实战,以及程序定制化开发、全栈讲解、就业辅导、面试辅导、简历修改。精彩专栏 推荐订阅2023-2024年最值得选的微信小程序毕业设计选题大全:100个热门选题推荐2023-2024年最值得选的Java毕业设计选题大全:500个热门选题推荐。

ultralytics的YOLOv8改为自用版本_from ultralytics.utils.plotting import annotator, -程序员宅基地

文章浏览阅读944次。由于需要用pyqt给yolov8做一个界面,而ultralytics一层嵌一层,不是很好用,所以对它的这个源码进行精简,具体代码我放到了这里,ultralytics使用的版本是8.0.54。具体代码如下,需要根据自己的情况来修改data的配置文件以及权值文件,在代码的49和50行。_from ultralytics.utils.plotting import annotator, colors, save_one_box modul

推荐文章

热门文章

相关标签