Warning: this is a htmlized version!
The original is across this link. |
####### # # E-scripts on gdb. # # Note 1: use the eev command (defined in eev.el) and the # ee alias (in my .zshrc) to execute parts of this file. # Executing this file as a whole makes no sense. # # Note 2: be VERY careful and make sure you understand what # you're doing. # # Note 3: If you use a shell other than zsh things like |& # and the for loops may not work. # # Note 4: I always run as root. # # Note 5: some parts are too old and don't work anymore. Some # never worked. # # Note 6: the definitions for the find-xxxfile commands are on my # .emacs. # # Note 7: if you see a strange command check my .zshrc -- it may # be defined there as a function or an alias. # # Note 8: the sections without dates are always older than the # sections with dates. # # This file is at <http://angg.twu.net/a/e/gdb.e> # or at <http://angg.twu.net/e/gdb.e.html>. # See also <http://angg.twu.net/emacs.html>, # <http://angg.twu.net/a/.emacs[.html]>, # <http://angg.twu.net/a/.zshrc[.html]>, # <http://angg.twu.net/escripts.html>, # and <http://angg.twu.net/>. # ####### ###### # # gdb and eev # 99nov30 # ###### # (find-fline "~/.emacs" "eegdb-bounded") # (find-fline "~/.gdbinit") # (find-fline "~/GDB/") ##### # # gdb internals # ##### # (find-node "(gdbint)Top" "Partial Symbol Tables") # (find-fline "/usr/doc/binutils/bfd/") # (find-node "(gprof)Compiling") # (find-node "(gcc)Option Summary" "-pg") # (find-node "(gcc)Debugging Options" "-pg") # (find-node "(gcc)Debugging Options" "-a") # (find-node "(gdb)Backtrace") ###### # # gdb - basic tricks # ###### # «gdb_basic» pdsc /big/slinks1/dists/slink/main/source/base/findutils_4.1-33.dsc cd /usr/src/findutils-4.1/ # debian/rules CC='gcc -g' binary |& tee odrb ./configure make CC='gcc -g' # (code-c-d "fu" "/usr/src/findutils-4.1/") # (find-fufile "") # (find-fufile "Makefile") # (find-fufile "debian/rules") # (find-node "(make)Top") # (find-node "(make)Implicit Rules") # (find-node "(make)Catalogue of Rules" "$(CC)") # (find-node "(gdb)Index") # (find-node "(gdb)Attach") # (find-node "(gdb)Emacs") # (find-node "(emacs)Debuggers") # (gdb "gdb /usr/src/findutils-4.1/find/find") gdb /usr/src/findutils-4.1/find/find cd /usr/src/findutils-4.1/ (<<'---' br main run ptype argv p argv p argv[0] n help quit --- ) | gdb find/find # (find-fline "~/EXPECT/expgdb") expgdb 'file /usr/src/findutils-4.1/find/find' \ 'br main' 'run' 'ptype argv' 'quit' ##### # # gdb source # 99nov30 # ##### apti libtool # (find-vldifile "libtool.list") # (find-fline "/usr/doc/libtool/") rm -Rv /usr/src/gdb-4.17/ pdsc /big/slinks1/dists/slink/main/source/devel/gdb_4.17-4.m68k.objc.threads.hwwp.fpu.gnat.3.1.dsc cd /usr/src/gdb-4.17/ find * -type f | sort > .files cd /usr/src/gdb-4.17/ debian/rules binary |& tee odrb find * -name '*.[chS]' -and -anewer .files > .files.chS.used find * -name '*.[chS]' -and -not -anewer .files > .files.chS.unused etags `cat .files.chS.used` glimpseindex -H . -F < .files.chS.used # (find-gdbfile "opcodes/dis-buf.c") # (find-gdbfile "opcodes/disassemble.c") # (find-gdbfile "opcodes/i386-dis.c") # Where is the support for dynamic linking? How far does it go? # What if my Tcl program dlopens something, i.e., does a "load foo.so"? gdbglimpse -i dynamic # (find-gdbfile ".files.chS.used") # (find-gdbfile "bfd/bfd-in2.h") # (find-gdbfile "bfd/bfd.c" "dynamic_reloc") # (find-gdbfile "bfd/elf-bfd.h") # (find-gdbfile "bfd/elf.c" "Dynamic linking") # (find-gdbfile "bfd/elf32-i386.c") # (find-gdbfile "bfd/elflink.h") # (find-gdbfile "bfd/bfd.c" "<<typedef bfd>>") # (find-gdbfile "bfd/doc/") apti binutils-dev # (find-vldifile "binutils-dev.list") # (find-fline "/usr/doc/binutils-dev/") # (find-node "(bfd)Top") # (find-node "(bfd)How It Works" "To use the library,") # (find-gdbfile "odrb") # (find-node "(gdbint)Top") ##### # # binutils # 99nov01 # ##### rm -Rv /usr/src/binutils-2.9.1.0.19a/ pdsc /big/slinks1/dists/slink/main/source/devel/binutils_2.9.1.0.19a-4.dsc cd /usr/src/binutils-2.9.1.0.19a/ # (find-binufile "") # (find-binufile "bfd/")