Gdbinit v7.4.3

A small update to gdbinit. Many thanks to snare and Plouj for their reports 🙂

Here is the changelog:

Version 7.4.3 (04/11/2011)
– Modified “hexdump” command to support a variable number of lines (optional parameter).
– Removed restrictions on type of addresses used in the “dd” command.
– Modified the assemble command to support 64bits – You will need to recompile nasm since the version shipped with OS X doesn’t supports 64bits (www.nasm.us).
Assumes that the new binary is installed at /usr/local/bin – modify the variable at the top if you need so.
It will assemble based on the target arch being debugged. If you want to use gdb for a quick asm just use the 32bits or 64bits commands to set your target.
– Added “asm” command – it’s a shortcut to the “assemble” command.
– Added configuration variable for colorized prompt. Plouj reported some issues with Ubuntu’s gdb 7.2 if prompt is colorized.

Enjoy!
fG!

gdbinit743.gz
SHA256(gdbinit743.gz)= 18931eac613917b4ef63be7708dfa052e7a0edb629c7d829705e231cf2154451

The latest version can always be found here.

2 thoughts on “Gdbinit v7.4.3

  1. bug on FreeBSD 8.1 + GNU gdb 6.1.1 [FreeBSD]
    ( VMWare Image: http://sourceforge.net/projects/thoughtpolicevm/files/FreeBSD/freebsd-8.1/freebsd-8.1-i386.zip/ )
    =>
    Error while running hook_stop:
    Invalid type combination in ordering comparison.

    # uname -a
    FreeBSD .localdomain 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

    # gdb ./a.out
    GNU gdb 6.1.1 [FreeBSD]
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type “show copying” to see the conditions.
    There is absolutely no warranty for GDB. Type “show warranty” for details.
    This GDB was configured as “i386-marcel-freebsd”…
    gdb$ r

    Program exited with code 0173.

    Error while running hook_stop:
    Invalid type combination in ordering comparison.

    =========================================
    gdb$ exec-file /usr/bin/uname
    gdb$ r
    (no debugging symbols found)…(no debugging symbols found)…FreeBSD

    Program exited normally.
    Error while running hook_stop:
    Invalid type combination in ordering comparison.

    =========================================
    gdb$ shell readelf -l /usr/bin/uname

    Elf file type is EXEC (Executable file)
    Entry point 0×8048500

    gdb$ break *0×8048500
    Breakpoint 2 at 0×8048500
    gdb$ r
    (no debugging symbols found)…(no debugging symbols found)…Error while running hook_stop:
    Invalid type combination in ordering comparison.

    Breakpoint 1, 0×08048500 in ?? ()
    gdb$ ni
    Error while running hook_stop:
    Invalid type combination in ordering comparison.
    0×08048502 in ?? ()
    gdb$ ni
    Error while running hook_stop:
    Invalid type combination in ordering comparison.
    0×08048503 in ?? ()
    gdb$

Leave a Reply

Your email address will not be published. Required fields are marked *