Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. struct node{
  2. int value;
  3. node* next;
  4. };
  5.  
  6. int main(){
  7. node* b;
  8. b->value=1;
  9. linkedList a;
  10. ...
  11.  
  12. Wed Mar 29; 15:59:29; marton;~/documents/github/fmi_summer_2017/daa/bfs ; $ gdb a.out
  13. GNU gdb (GDB; openSUSE Leap 42.1) 7.11.1
  14. Copyright (C) 2016 Free Software Foundation, Inc.
  15. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  16. This is free software: you are free to change and redistribute it.
  17. There is NO WARRANTY, to the extent permitted by law. Type "show copying"
  18. and "show warranty" for details.
  19. This GDB was configured as "x86_64-suse-linux".
  20. Type "show configuration" for configuration details.
  21. For bug reporting instructions, please see:
  22. <http://bugs.opensuse.org/>.
  23. Find the GDB manual and other documentation resources online at:
  24. <http://www.gnu.org/software/gdb/documentation/>.
  25. For help, type "help".
  26. Type "apropos word" to search for commands related to "word"...
  27. Reading symbols from a.out...done.
  28. (gdb) start
  29. Temporary breakpoint 1 at 0x4008f5: file main.cpp, line 5.
  30. Starting program: /home/marton/documents/github/fmi_summer_2017/daa/bfs/a.out
  31. step
  32. Temporary breakpoint 1, main () at main.cpp:5
  33. 5 b->value=1;
  34. (gdb) step
  35.  
  36. Program received signal SIGSEGV, Segmentation fault.
  37. 0x00000000004008f9 in main () at main.cpp:5
  38. 5 b->value=1;
  39. (gdb)
  40.  
  41. Program terminated with signal SIGSEGV, Segmentation fault.
  42. The program no longer exists.
  43. (gdb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement