Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7b34156
Reformats gdbinit to use submodules
dholm Oct 21, 2012
2053b9e
Code cleanup
dholm Oct 21, 2012
142d955
Autodetect target architecture
dholm Oct 21, 2012
1075a0e
Adds support for MIPS
dholm Oct 22, 2012
abfb95b
Fixes issues in data printers
dholm Oct 22, 2012
f2c9650
Moves the ChangeLog into a separate file
dholm Oct 22, 2012
e8c3366
Place all hooks in .gdbinit
dholm Oct 22, 2012
b20cc01
Updated README
dholm Oct 22, 2012
41249c9
Fixes issues in markdown
dholm Oct 22, 2012
c90255f
Hook setup-detect-target to the core-file command as well
dholm Oct 22, 2012
a1e6193
Only print valid registers
dholm Oct 22, 2012
46b0391
Place commands into code blocks
dholm Oct 22, 2012
69e25a6
Rename GDB command files to .gdb
dholm Oct 23, 2012
46fc426
add some gdb macros from Apple
cooljeanius May 7, 2013
cabf5d8
Merge pull request #1 from cooljeanius/egall_additions
dholm May 7, 2013
438da47
found some more .gdb files in Apple's version of gdb
cooljeanius May 12, 2013
a43a2a7
Merge pull request #2 from cooljeanius/more_apple_macros
dholm May 12, 2013
70a6125
Attempt to detect the correct processor type under Snow Leopard's gdb.
jszakmeister Jun 7, 2013
0070acb
Merge pull request #3 from jszakmeister/fix-detection-on-snow-leopard
dholm Jun 16, 2013
6729b92
Do not show [code] if CONTEXTSIZE_CODE is set to 0.
May 16, 2014
b8314cc
Merge pull request #4 from bchretien/dotgdb
dholm May 16, 2014
5f6d47b
bug in prompt overwrite itself
D3Hunter Dec 22, 2014
4b0ccbc
Merge pull request #5 from D3Hunter/master
dholm Dec 22, 2014
a40b447
Allow user to override config options
Apr 26, 2016
8ee55b2
Merge pull request #6 from gburca/master
dholm Apr 30, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions .gdb/breakpoints.gdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
define bpl
info breakpoints
end
document bpl
List all breakpoints.
end


define bp
if $argc != 1
help bp
else
break $arg0
end
end
document bp
Set breakpoint.
Usage: bp LOCATION
LOCATION may be a line number, function name, or "*" and an address.
To break on a symbol you must enclose symbol name inside "".
Example:
bp "[NSControl stringValue]"
Or else you can use directly the break command (break [NSControl stringValue])
end


define bpc
if $argc != 1
help bpc
else
clear $arg0
end
end
document bpc
Clear breakpoint.
Usage: bpc LOCATION
LOCATION may be a line number, function name, or "*" and an address.
end


define bpe
if $argc != 1
help bpe
else
enable $arg0
end
end
document bpe
Enable breakpoint with number NUM.
Usage: bpe NUM
end


define bpd
if $argc != 1
help bpd
else
disable $arg0
end
end
document bpd
Disable breakpoint with number NUM.
Usage: bpd NUM
end


define bpt
if $argc != 1
help bpt
else
tbreak $arg0
end
end
document bpt
Set a temporary breakpoint.
This breakpoint will be automatically deleted when hit!.
Usage: bpt LOCATION
LOCATION may be a line number, function name, or "*" and an address.
end


define bpm
if $argc != 1
help bpm
else
awatch $arg0
end
end
document bpm
Set a read/write breakpoint on EXPRESSION, e.g. *address.
Usage: bpm EXPRESSION
end


define bhb
if $argc != 1
help bhb
else
hb $arg0
end
end
document bhb
Set hardware assisted breakpoint.
Usage: bhb LOCATION
LOCATION may be a line number, function name, or "*" and an address.
end


define bht
if $argc != 1
help bht
else
thbreak $arg0
end
end
document bht
Set a temporary hardware breakpoint.
This breakpoint will be automatically deleted when hit!
Usage: bht LOCATION
LOCATION may be a line number, function name, or "*" and an address.
end
49 changes: 49 additions & 0 deletions .gdb/carbon.gdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
define print-char
if ($arg0 > 0xff)
print "not a character"
""
else
if ($arg0 == '\n')
printf "\\n"
else
if ($arg0 == '\t')
printf "\\t"
else
if ($arg0 == '\r')
printf "\\r"
else
if ($arg0 == '\'')
printf "\\'"
else
if (($arg0 < 0x20) || ($arg0 >= 0x7f))
printf "\\%03o", $arg0
else
printf "%c", $arg0
end
end
end
end
end
end
end
document print-char
Print a single character in a readable fashion.
end

define print-ostype
set $tmp0 = ($arg0)
printf "'"
set $tmp1 = (($tmp0 & 0xff000000) >> 24)
print-char $tmp1
set $tmp1 = (($tmp0 & 0x00ff0000) >> 16)
print-char $tmp1
set $tmp1 = (($tmp0 & 0x0000ff00) >> 8)
print-char $tmp1
set $tmp1 = (($tmp0 & 0x000000ff) >> 0)
print-char $tmp1
printf "'"
printf "\n"
end
document print-ostype
Print a value as an OSType (four-byte character string).
end
Loading