Is it possible to set an automatic (or permanent) breakpoint on malloc_error_break
under Xcode? (If its in Xcode and I missed it, please point it out). I want it to work everywhere under Xcode - from GDB to LLDB, to old and new projects. I would really like it to work on device, but that might be stretch (it appears something is broken with malloc guard on device).
I was thinking .lldbinit
might be helpful, but LLDB kind of kills that idea. It appears LLDB does not honor breakpoints set in .lldbinit
(according to breakpoint list
) (http://lldb.llvm.org/tutorial.html). LLDB also disregards breakpoints in .lldbinit-Xcode
(thanks Rob).
.gdbinit
might also be useful, but we will likely run into the bug discussed at Unable to set pending breakpoints in .gdbinit. This is Apple, and they have a completely broken QA process, so I don't expect it to be fixed.
To summarize, the following does not work on this Mac (MacBook Pro, 10.8) and Xcode (4.5.2):
riemann: jwalton$ cat ~/.lldbinit
# http://lldb.llvm.org/tutorial.html
# Not honored by LLDB
breakpoint set --name malloc_error_break
# Shot in the dark since the previous is not honored
breakpoint set pending --name malloc_error_break
riemann: jwalton$ cat ~/.gdbinit
set breakpoint pending on
set breakpoint malloc_error_break
set breakpoint pending auto
EDIT (2013/02/07): Also see lldb equivalent of .gdbinit and future break?.
Jeff