bash-4.3$ ddd --trace stacktest GNU DDD 3.3.12 (x86_64-redhat-linux-gnu) Copyright (C) 1995-1999 Technische Universit�t Braunschweig, Germany. Copyright (C) 1999-2001 Universit�t Passau, Germany. Copyright (C) 2001 Universit�t des Saarlandes, Germany. Copyright (C) 2001-2009 Free Software Foundation, Inc. Compiled with GCC 6.0.0 20160201 (Red Hat 6.0.0-0.9), GNU libc 2.22 Requires X11R6, Xt11R6, Motif 2.3.4 (Motif Version 2.3.4) Includes XPM 3.4.11, Athena Panner (7000002L), DDD core, Readline 6.3 Built 2016-02-03 by mockbuild . $ ddd --trace stacktest + /bin/sh -c 'exec gdb -q -fullname '\''stacktest'\''' Warning: Cannot convert string "-*-symbol-*-*-*-*-*-120-*-*-*-*-adobe-*" to type FontStruct (Annoyed? Try 'Edit->Preferences->General->Suppress X Warnings'!) # Hello, world! # Opening session "104313b40bf89b766b148191590616548300000015050067"... # Enabling core dumps... # Enabling core dumps...done. # Running GDB (pid 3232, tty /dev/pts/4)... # Current language: C/C++ # Searching "vsllib/ddd.vsl"... # Trying "/home/murray/.ddd/vsllib/ddd.vsl" # Trying "/usr/share/ddd-3.3.12/vsllib/ddd.vsl" # Searching "vsllib/ddd.vsl"..."/usr/share/ddd-3.3.12/vsllib/ddd.vsl". # Creating "/home/murray/.ddd/sessions/104313b40bf89b766b148191590616548300000015050067/"... # Creating "/home/murray/.ddd/sessions/104313b40bf89b766b148191590616548300000015050067/"...done. # Copying "/home/murray/.ddd/init" to "/home/murray/.ddd/sessions/104313b40bf89b766b148191590616548300000015050067/init"... # Copying "/home/murray/.ddd/init" to "/home/murray/.ddd/sessions/104313b40bf89b766b148191590616548300000015050067/init"...done. # Copying "/home/murray/.ddd/history" to "/home/murray/.ddd/sessions/104313b40bf89b766b148191590616548300000015050067/history"... # Copying "/home/murray/.ddd/history" to "/home/murray/.ddd/sessions/104313b40bf89b766b148191590616548300000015050067/history"...done. # Saving session in "/home/murray/.ddd/sessions/104313b40bf89b766b148191590616548300000015050067/init"... # Saving session in "/home/murray/.ddd/sessions/104313b40bf89b766b148191590616548300000015050067/init"...done. 2016.12.16 14:18:26 <- "Reading symbols from stacktest..." 2016.12.16 14:18:26 <- "done.\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "set prompt (gdb) \n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "set height 0\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "set width 0\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "set annotate 1\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> " set verbose off\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "info line\n" 2016.12.16 14:18:26 <- "No line number information available.\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "list\n" 2016.12.16 14:18:26 <- "1\t#include \n" 2016.12.16 14:18:26 <- "2\tvoid first_function(void);\n" 2016.12.16 14:18:26 <- "3\tvoid second_function(int);\n" 2016.12.16 14:18:26 <- "4\tvoid third_function(int);\n" 2016.12.16 14:18:26 <- "5\t\n" 2016.12.16 14:18:26 <- "6\tint main(void)\n" 2016.12.16 14:18:26 <- "7\t{\n" 2016.12.16 14:18:26 <- "8\t printf(\"hello world\\n" "\");\n" 2016.12.16 14:18:26 <- "9\t first_function();\n" 2016.12.16 14:18:26 <- "10\t printf(\"goodbye goodbye\\n" "\");\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "info line\n" 2016.12.16 14:18:26 <- "Line 10 of \"stacktest.c\" starts at address 0x400509 and ends at 0x400513 .\n" 2016.12.16 14:18:26 <- "\032\032/home/murray/stacktest.c:10:166:beg:0x400509\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "output 4711\n" 2016.12.16 14:18:26 <- "4711" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "show language\n" 2016.12.16 14:18:26 <- "The current source language is \"auto; currently c\".\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "show version\n" 2016.12.16 14:18:26 <- "GNU gdb (GDB) Fedora 7.12-29.fc25\n" 2016.12.16 14:18:26 <- "Copyright (C) 2016 Free Software Foundation, Inc.\n" 2016.12.16 14:18:26 <- "License GPLv3+: GNU GPL version 3 or later \n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n" "and \"show warranty\" for details.\n" 2016.12.16 14:18:26 <- "This GDB was configured as \"x86_64-redhat-linux-gnu\".\n" 2016.12.16 14:18:26 <- "Type \"show configuration\" for configuration details.\n" "For bug reporting instructions, please see:\n" 2016.12.16 14:18:26 <- ".\n" 2016.12.16 14:18:26 <- "Find the GDB manual and other documentation resources online at:\n" ".\n" 2016.12.16 14:18:26 <- "For help, type \"help\".\n" 2016.12.16 14:18:26 <- "Type \"apropos word\" to search for commands related to \"word\".\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "pwd\n" 2016.12.16 14:18:26 <- "Working directory /home/murray.\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "info breakpoints\n" 2016.12.16 14:18:26 <- "No breakpoints or watchpoints.\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "show history filename\n" 2016.12.16 14:18:26 <- "The filename in which to record the command history is \"/home/murray/.gdb_history\".\n" 2016.12.16 14:18:26 <- "(gdb) " 2016.12.16 14:18:26 -> "show history size\n" 2016.12.16 14:18:26 <- "The size of the command history is 256.\n" 2016.12.16 14:18:26 <- "(gdb) " # Reading file "/home/murray/stacktest.c"... # Reading file "/home/murray/stacktest.c"...done. # File "/home/murray/stacktest.c" 36 lines, 534 characters # Setting buttons... # Setting buttons...done. 2016.12.16 14:18:27 -> "set confirm off\n" 2016.12.16 14:18:27 <- "(gdb) " 2016.12.16 14:18:27 -> "source /tmp/ddd5LyQD1\n" 2016.12.16 14:18:27 <- "(gdb) " 2016.12.16 14:18:27 -> "info breakpoints\n" 2016.12.16 14:18:27 <- "No breakpoints or watchpoints.\n" "(gdb) " 2016.12.16 14:18:27 -> "info source\n" 2016.12.16 14:18:27 <- "Current source file is stacktest.c\n" "Compilation directory is /home/murray\n" "Located in /home/murray/stacktest.c\n" "Contains 36 lines.\n" "Source language is c.\n" "Producer is GNU C11 6.2.1 20160916 (Red Hat 6.2.1-2) -mtune=generic -march=x86-64 -ggdb3.\n" "Compiled with DWARF 2 debugging format.\n" "Includes preprocessor macro info.\n" "(gdb) " 2016.12.16 14:18:27 -> "# reset\n" 2016.12.16 14:18:27 <- "(gdb) " 2016.12.16 14:18:27 -> "info breakpoints\n" 2016.12.16 14:18:27 <- "No breakpoints or watchpoints.\n" "(gdb) " 2016.12.16 14:18:27 -> "display\n" 2016.12.16 14:18:27 <- "(gdb) " 2016.12.16 14:18:27 -> "info display\n" 2016.12.16 14:18:27 <- "There are no auto-display expressions now.\n" "(gdb) " 2016.12.16 14:18:27 -> "set environment TERM dumb\n" 2016.12.16 14:18:27 <- "(gdb) " 2016.12.16 14:18:27 -> "info files\n" 2016.12.16 14:18:27 <- "Symbols from \"/home/murray/stacktest\".\n" "Local exec file:\n" "\t`/home/murray/stacktest\', file type elf64-x86-64.\n" "\tEntry point: 0x400400\n" "\t0x0000000000400238 - 0x0000000000400254 is .interp\n" "\t0x0000000000400254 - 0x0000000000400274 is .note.ABI-tag\n" "\t0x0000000000400274 - 0x0000000000400298 is .note.gnu.build-id\n" "\t0x0000000000400298 - 0x00000000004002b4 is .gnu.hash\n" "\t0x00000000004002b8 - 0x0000000000400318 is .dynsym\n" "\t0x0000000000400318 - 0x0000000000400355 is .dynstr\n" "\t0x0000000000400356 - 0x000000000040035e is .gnu.version\n" "\t0x0000000000400360 - 0x0000000000400380 is .gnu.version_r\n" "\t0x0000000000400380 - 0x00000000004003b0 is .rela.dyn\n" "\t0x00000000004003b0 - 0x00000000004003c8 is .rela.plt\n" "\t0x00000000004003c8 - 0x00000000004003df is .init\n" "\t0x00000000004003e0 - 0x0000000000400400 is .plt\n" "\t0x0000000000400400 - 0x00000000004005f2 is .text\n" "\t0x00000000004005f4 - 0x00000000004005fd is .fini\n" "\t0x0000000000400600 - 0x000000000040062c is .rodata\n" "\t0x000000000040062c - 0x0000000000400678 is .eh_frame_hdr\n" "\t0x0000000000400678 - 0x00000000004007cc is .eh_frame\n" "\t0x0000000000600e08 - 0x0000000000600e10 is .init_array\n" "\t0x0000000000600e10 - 0x0000000000600e18 is .fini_array\n" "\t0x0000000000600e18 - 0x0000000000600e20 is .jcr\n" "\t0x0000000000600e20 - 0x0000000000600ff0 is .dynamic\n" "\t0x0000000000600ff0 - 0x0000000000601000 is .got\n" "\t0x0000000000601000 - 0x0000000000601020 is .got.plt\n" "\t0x0000000000601020 - 0x0000000000601024 is .data\n" "\t0x0000000000601024 - 0x0000000000601028 is .bss\n" "(gdb) " 2016.12.16 14:18:27 -> "info program\n" 2016.12.16 14:18:27 <- "The program being debugged is not being run.\n" "(gdb) " # Opening session "104313b40bf89b766b148191590616548300000015050067"...done. # Welcome to DDD 3.3.12 "Dale Head" (x86_64-redhat-linux-gnu) 2016.12.16 14:18:27 -> "x /i 0x400509\n" 2016.12.16 14:18:27 <- " 0x400509 :\tmov $0x40061c,%edi\n" "(gdb) " 2016.12.16 14:18:27 -> "x /i 0x4005f6\n" 2016.12.16 14:18:27 <- " 0x4005f6 <_fini+2>:\tin (%dx),%al\n" "(gdb) " # Disassembling location 0x400509... 2016.12.16 14:18:27 -> "disassemble 0x400509\n" 2016.12.16 14:18:27 <- "Dump of assembler code for function main:\n" " 0x00000000004004f6 <+0>:\tpush %rbp\n" " 0x00000000004004f7 <+1>:\tmov %rsp,%rbp\n" " 0x00000000004004fa <+4>:\tmov $0x400610,%edi\n" " 0x00000000004004ff <+9>:\tcallq 0x4003f0 \n" " 0x0000000000400504 <+14>:\tcallq 0x40051a \n" " 0x0000000000400509 <+19>:\tmov $0x40061c,%edi\n" " 0x000000000040050e <+24>:\tcallq 0x4003f0 \n" " 0x0000000000400513 <+29>:\tmov $0x0,%eax\n" " 0x0000000000400518 <+34>:\tpop %rbp\n" " 0x0000000000400519 <+35>:\tretq \n" "End of assembler dump.\n" "(gdb) " # Disassembling location 0x400509...done. 2016.12.16 14:18:27 -> "help detach\n" 2016.12.16 14:18:27 <- "Detach a process or file previously attached.\n" "If a process, it is no longer traced, and it continues its execution. If\n" "you were debugging a file, the file is closed and gdb no longer accesses it.\n" "\n" "List of detach subcommands:\n" "\n" "detach checkpoint -- Detach from a checkpoint (experimental)\n" "detach inferiors -- Detach from inferior ID (or list of IDS)\n" "\n" "Type \"help detach\" followed by detach subcommand name for full documentation.\n" "Type \"apropos word\" to search for commands related to \"word\".\n" "Command name abbreviations are allowed if unambiguous.\n" "(gdb) " 2016.12.16 14:18:27 -> "help run\n" 2016.12.16 14:18:27 <- "Start debugged program. You may specify arguments to give it.\n" "Args may include \"*\", or \"[...]\"; they are expanded using \"sh\".\n" "Input and output redirection with \">\", \"<\", or \">>\" are also allowed.\n" "\n" "With no arguments, uses arguments last specified (with \"run\" or \"set args\").\n" "To cancel previous arguments and run with no arguments,\n" "use \"set args\" without arguments.\n" "(gdb) " 2016.12.16 14:18:27 -> "help step\n" 2016.12.16 14:18:27 <- "Step program until it reaches a different source line.\n" "Usage: step [N]\n" "Argument N means step N times (or till program stops for another reason).\n" "(gdb) " 2016.12.16 14:18:28 -> "help stepi\n" 2016.12.16 14:18:28 <- "Step one instruction exactly.\n" "Usage: stepi [N]\n" "Argument N means step N times (or till program stops for another reason).\n" "(gdb) " 2016.12.16 14:18:28 -> "help next\n" 2016.12.16 14:18:28 <- "Step program, proceeding through subroutine calls.\n" "Usage: next [N]\n" "Unlike \"step\", if the current source line calls a subroutine,\n" "this command does not enter the subroutine, but instead steps over\n" "the call, in effect treating it as a single source line.\n" "(gdb) " 2016.12.16 14:18:28 -> "help nexti\n" 2016.12.16 14:18:28 <- "Step one instruction, but proceed through subroutine calls.\n" "Usage: nexti [N]\n" "Argument N means step N times (or till program stops for another reason).\n" "(gdb) " 2016.12.16 14:18:28 -> "help until\n" 2016.12.16 14:18:28 <- "Execute until the program reaches a source line greater than the current\n" "or a specified location (same args as break command) within the current frame.\n" "(gdb) " 2016.12.16 14:18:28 -> "help finish\n" 2016.12.16 14:18:28 <- "Execute until selected stack frame returns.\n" "Usage: finish\n" "Upon return, the value returned is printed and put in the value history.\n" "(gdb) " 2016.12.16 14:18:28 -> "help cont\n" 2016.12.16 14:18:28 <- "Continue program being debugged, after signal or breakpoint.\n" "Usage: continue [N]\n" "If proceeding from breakpoint, a number N may be used as an argument,\n" "which means to set the ignore count of that breakpoint to N - 1 (so that\n" "the breakpoint won\'t break until the Nth time it is reached).\n" "\n" "If non-stop mode is enabled, continue only the current thread,\n" "otherwise all the threads in the program are continued. To \n" "continue all stopped threads in non-stop mode, use the -a option.\n" "Specifying -a and an ignore count simultaneously is an error.\n" "(gdb) " 2016.12.16 14:18:28 -> "help signal\n" 2016.12.16 14:18:28 <- "Continue program with the specified signal.\n" "Usage: signal SIGNAL\n" "The SIGNAL argument is processed the same as the handle command.\n" "\n" "An argument of \"0\" means continue the program without sending it a signal.\n" "This is useful in cases where the program stopped because of a signal,\n" "and you want to resume the program while discarding the signal.\n" "\n" "In a multi-threaded program the signal is delivered to, or discarded from,\n" "the current thread only.\n" "(gdb) " 2016.12.16 14:18:28 -> "help kill\n" 2016.12.16 14:18:28 <- "Kill execution of program being debugged.\n" "\n" "List of kill subcommands:\n" "\n" "kill inferiors -- Kill inferior ID (or list of IDs)\n" "\n" "Type \"help kill\" followed by kill subcommand name for full documentation.\n" "Type \"apropos word\" to search for commands related to \"word\".\n" "Command name abbreviations are allowed if unambiguous.\n" "(gdb) " 2016.12.16 14:18:28 -> "help up\n" 2016.12.16 14:18:28 <- "Select and print stack frame that called this one.\n" "An argument says how many frames up to go.\n" "(gdb) " 2016.12.16 14:18:28 -> "help down\n" 2016.12.16 14:18:28 <- "Select and print stack frame called by this one.\n" "An argument says how many frames down to go.\n" "(gdb) " 2016.12.16 14:18:40 -> "quit\n" # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # GDB: EOF detected # Running GDB (pid 3232, tty /dev/pts/4)...Exit 0. # Saving options in "/home/murray/.ddd/init"... # Saving options in "/home/murray/.ddd/init"...done. # Deleting session "104313b40bf89b766b148191590616548300000015050067"... # Current session is [none]. # Deleting session "104313b40bf89b766b148191590616548300000015050067"...done. # Saving history in "/home/murray/.ddd/history"... # Saving history in "/home/murray/.ddd/history"...done. # Thanks for using DDD 3.3.12! bash-4.3$