GNU DDD 3.3 (sparc-sun-solaris2.6) Copyright (C) 1995-1999 Technische Université…¹ Braunschweig, Germany. Copyright (C) 1999-2001 Université…¹ Passau, Germany. Compiled with GCC 2.95.2 19991024 (release), libstdc++ 2.8.0 Requires X11R6, Xt11R6, Motif 1.2.6 (OSF/Motif Version 1.2.6) Includes XPM 3.4.11, Athena Panner, DDD core Built 2001-02-23 by Chun-Yi Liu . $ ddd a.out + /bin/sh -c 'exec gdb -q -fullname '\''a.out'\''' # Hello, world! # Starting GDB... # Enabling core dumps... # Enabling core dumps...done. # Running GDB (pid 19927, tty /dev/pts/8)... # Current language: C/C++ # Searching "vsllib/ddd.vsl"... # Trying "/home/wllee/.ddd/vsllib/ddd.vsl" # Searching "vsllib/ddd.vsl"..."/home/wllee/.ddd/vsllib/ddd.vsl". <- "(gdb) " -> "set prompt (gdb) \n" <- "(gdb) " -> "set height 0\n" <- "(gdb) " -> "set width 0\n" <- "(gdb) " -> "set annotate 1\n" <- "(gdb) " -> " set verbose off\n" <- "(gdb) " -> "info line\n" <- "No line number information available.\n" "(gdb) " -> "list\n" <- "1\t#include \n" "2\t\n" "3\tmain(int argc, char **argv)\n" "4\t{\n" "5\t printf(\"hello world!\");\n" "6\t}\n" "(gdb) " -> "info line\n" <- "Line 6 of \"aa.c\" starts at address 0x10784 and ends at 0x1078c <__do_global_ctors_aux>.\n" "\032\032/home/wllee/tmp/aa.c:6:78:beg:0x10784\n" "(gdb) " -> "output 4711\n" <- "4711(gdb) " -> "show language\n" <- "The current source language is \"auto; currently c\".\n" "(gdb) " -> "show version\n" <- "GNU gdb 4.17\n" "Copyright 1998 Free Software Foundation, Inc.\n" "GDB is free software, covered by the GNU General Public License, and you are\n" "welcome to change it and/or distribute copies of it under certain conditions.\n" "Type \"show copying\" to see the conditions.\n" "There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n" "This GDB was configured as \"sparc-sun-solaris2.6\".\n" "(gdb) " -> "pwd\n" <- "Working directory /home/wllee/tmp.\n" "(gdb) " -> "info breakpoints\n" <- "No breakpoints or watchpoints.\n" "(gdb) " -> "show history filename\n" <- "The filename in which to record the command history is \"/home/wllee/tmp/.gdb_history\".\n" "(gdb) " -> "show history size\n" <- "The size of the command history is 256.\n" "(gdb) " # Reading file "/home/wllee/tmp/aa.c"... # Reading file "/home/wllee/tmp/aa.c"...done. # File "/home/wllee/tmp/aa.c" 6 lines, 110 characters # Setting buttons... # Setting buttons...done. -> "info source\n" <- "Current source file is aa.c\n" "Compilation directory is /home/wllee/tmp/\n" "Located in /home/wllee/tmp/aa.c\n" "Contains 6 lines.\n" "Source language is c.\n" "Compiled with stabs debugging format.\n" "(gdb) " -> "info files\n" <- "Symbols from \"/home/wllee/tmp/a.out\".\n" "Local exec file:\n" "\t`/home/wllee/tmp/a.out\', file type elf32-sparc.\n" "\tEntry point: 0x10690\n" "\t0x000100d4 - 0x000100e5 is .interp\n" "\t0x000100e8 - 0x0001021c is .hash\n" "\t0x0001021c - 0x000104dc is .dynsym\n" "\t0x000104dc - 0x00010633 is .dynstr\n" "\t0x00010634 - 0x00010654 is .SUNW_version\n" "\t0x00010654 - 0x00010660 is .rela.bss\n" "\t0x00010660 - 0x00010690 is .rela.plt\n" "\t0x00010690 - 0x000107f0 is .text\n" "\t0x000107f0 - 0x00010804 is .init\n" "\t0x00010804 - 0x00010818 is .fini\n" "\t0x00010818 - 0x0001082d is .rodata\n" "\t0x00020830 - 0x0002083c is .got\n" "\t0x0002083c - 0x000208a0 is .plt\n" "\t0x000208a0 - 0x00020948 is .dynamic\n" "\t0x00020948 - 0x00020950 is .ctors\n" "\t0x00020950 - 0x00020958 is .dtors\n" "\t0x00020958 - 0x0002095c is .bss\n" "(gdb) " -> "info program\n" <- "The program being debugged is not being run.\n" "(gdb) " -> "set confirm off\n" <- "(gdb) " -> "source /var/tmp/aaaLLTtD_\n" <- "Byte order is not selectable.The target is assumed to be big endian\n" "(gdb) " -> "info breakpoints\n" <- "No breakpoints or watchpoints.\n" "(gdb) " -> "# reset\n" <- "(gdb) " -> "info breakpoints\n" <- "No breakpoints or watchpoints.\n" "(gdb) " -> "display\n" <- "(gdb) " -> "info display\n" <- "There are no auto-display expressions now.\n" "(gdb) " -> "set environment TERM dumb\n" <- "(gdb) " -> "info files\n" <- "Symbols from \"/home/wllee/tmp/a.out\".\n" "Local exec file:\n" "\t`/home/wllee/tmp/a.out\', file type elf32-sparc.\n" "\tEntry point: 0x10690\n" "\t0x000100d4 - 0x000100e5 is .interp\n" "\t0x000100e8 - 0x0001021c is .hash\n" "\t0x0001021c - 0x000104dc is .dynsym\n" "\t0x000104dc - 0x00010633 is .dynstr\n" "\t0x00010634 - 0x00010654 is .SUNW_version\n" "\t0x00010654 - 0x00010660 is .rela.bss\n" "\t0x00010660 - 0x00010690 is .rela.plt\n" "\t0x00010690 - 0x000107f0 is .text\n" "\t0x000107f0 - 0x00010804 is .init\n" "\t0x00010804 - 0x00010818 is .fini\n" "\t0x00010818 - 0x0001082d is .rodata\n" "\t0x00020830 - 0x0002083c is .got\n" "\t0x0002083c - 0x000208a0 is .plt\n" "\t0x000208a0 - 0x00020948 is .dynamic\n" "\t0x00020948 - 0x00020950 is .ctors\n" "\t0x00020950 - 0x00020958 is .dtors\n" "\t0x00020958 - 0x0002095c is .bss\n" "(gdb) " -> "info program\n" <- "The program being debugged is not being run.\n" "(gdb) " -> "help detach\n" <- "Detach a process or file previously attached.\n" "If a process, it is no longer traced, and it continues its execution. If you\n" "were debugging a file, the file is closed and gdb no longer accesses it.\n" "(gdb) " -> "help run\n" <- "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) " -> "help step\n" <- "Step program until it reaches a different source line.\n" "Argument N means do this N times (or till program stops for another reason).\n" "(gdb) " -> "help stepi\n" <- "Step one instruction exactly.\n" "Argument N means do this N times (or till program stops for another reason).\n" "(gdb) " # Starting GDB...done. # Welcome to DDD 3.3 "Blues by Night" (sparc-sun-solaris2.6) -> "help next\n" <- "Step program, proceeding through subroutine calls.\n" "Like the \"step\" command as long as subroutine calls do not happen;\n" "when they do, the call is treated as one instruction.\n" "Argument N means do this N times (or till program stops for another reason).\n" "(gdb) " -> "help nexti\n" <- "Step one instruction, but proceed through subroutine calls.\n" "Argument N means do this N times (or till program stops for another reason).\n" "(gdb) " -> "help until\n" <- "Execute until the program reaches a source line greater than the current\n" "or a specified line or address or function (same args as break command).\n" "Execution will also stop upon exit from the current stack frame.\n" "(gdb) " -> "help finish\n" <- "Execute until selected stack frame returns.\n" "Upon return, the value returned is printed and put in the value history.\n" "(gdb) " -> "help cont\n" <- "Continue program being debugged, after signal or breakpoint.\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" "(gdb) " -> "help signal\n" <- "Continue program giving it signal specified by the argument.\n" "An argument of \"0\" means continue program without giving it a signal.\n" "(gdb) " -> "help kill\n" <- "Kill execution of program being debugged.\n" "(gdb) " -> "help up\n" <- "Select and print stack frame that called this one.\n" "An argument says how many frames up to go.\n" "(gdb) " -> "help down\n" <- "Select and print stack frame called by this one.\n" "An argument says how many frames down to go.\n" "(gdb) " -> "set environment TERM dumb\n" <- "(gdb) " -> "r \n" <- "Starting program: /home/wllee/tmp/a.out \n" <- "hello world!" <- "\n" "Program exited with code 01.\n" <- "(gdb) " -> "info breakpoints\n" <- "No breakpoints or watchpoints.\n" <- "(gdb) " -> "output stdio.h\n" <- "No symbol \"stdio\" in current context.\n" "(gdb) " -> "output printf\n" <- "Cannot access memory at address 0xef6e3708.\n" "(gdb) " -> "break aa.c:5\n" <- "Breakpoint 1 at 0x10774: file aa.c, line 5.\n" "(gdb) " -> "info breakpoints\n" <- "Num Type Disp Enb Address What\n" "1 breakpoint keep y 0x00010774 in main at aa.c:5\n" "(gdb) " -> "set environment TERM dumb\n" <- "(gdb) " -> "r\n" <- "Starting program: /home/wllee/tmp/a.out \n" "\n" "Breakpoint 1, main (argc=1, argv=0xefffef34) at aa.c:5\n" "\032\032/home/wllee/tmp/aa.c:5:50:beg:0x10774\n" "(gdb) " -> "info breakpoints\n" <- "Num Type Disp Enb Address What\n" "1 breakpoint keep y 0x00010774 in main at aa.c:5\n" "\tbreakpoint already hit 1 time\n" "(gdb) " -> "output argc\n" <- "1(gdb) " -> "frame\n" <- "#0 main (argc=1, argv=0xefffef34) at aa.c:5\n" "\032\032/home/wllee/tmp/aa.c:5:50:beg:0x10774\n" "(gdb) " -> "display argc\n" <- "1: argc = 1\n" "(gdb) " # Creating display... # Creating display...done. # Display 1: argc (enabled, scope main) # Display 1: argc (enabled, scope main) -> "output argv\n" <- "(char **) 0xefffef34(gdb) " -> "frame\n" <- "#0 main (argc=1, argv=0xefffef34) at aa.c:5\n" "\032\032/home/wllee/tmp/aa.c:5:50:beg:0x10774\n" "(gdb) " -> "display argv\n" <- "2: argv = (char **) 0xefffef34\n" "(gdb) " # Creating display... # Creating display...done. # Display 2: argv (enabled, scope main) # Display 2: argv (enabled, scope main) # Display 2: argv (enabled, scope main) # Display 2: argv (enabled, scope main) # Display 2: argv (enabled, scope main) -> "frame\n" <- "#0 main (argc=1, argv=0xefffef34) at aa.c:5\n" "\032\032/home/wllee/tmp/aa.c:5:50:beg:0x10774\n" "(gdb) " -> "undisplay 2\n" <- "(gdb) " # New displays will be placed below the downmost display. # New displays will be placed on the right of the rightmost display. -> "frame\n" <- "#0 main (argc=1, argv=0xefffef34) at aa.c:5\n" "\032\032/home/wllee/tmp/aa.c:5:50:beg:0x10774\n" "(gdb) " -> "display argv\n" <- "3: argv = (char **) 0xefffef34\n" "(gdb) " # Creating display... # Creating display...done. # Display 3: argv (enabled, scope main) # Display 3: argv (enabled, scope main) -> "quit\n" <- "The program is running. Exit anyway? (y or n) " -> "yes\n" # Running GDB (pid 19927, tty /dev/pts/8)...Exit 0. # Saving history in "/home/wllee/.ddd/history"... # Saving history in "/home/wllee/.ddd/history"...done. # Thanks for using DDD 3.3!