I’ve been putting together some gdb commands to aid gdb debugging. Here’s my current list:
define tbt
thread apply all bt
end
document tbt
Issues "thread apply all bt", thus showing the backtraces for all threads
end
define pc
po [$arg0 class]
end
document pc
Takes one argument and prints its class by sending it the class message.
end
define cdate
set $cdate_result = (int)[$arg0 compare:$arg1]
if($cdate_result == NSOrderedAscending)
printf "NSOrderedAscending\n"
end
if($cdate_result == NSOrderedSame)
printf "NSOrderedSame\n"
end
if($cdate_result == NSOrderedDescending)
printf "NSOrderedDescending\n"
end
end
document cdate
Sends a compare: message to arg0 with arg1 as the argument and prints the
symbolic result
end