#Debugging

  1. Using AddressSanitizer with Xcode 4.6.1

    Clang 3.3 now supports AddressSanitizer. Here is the description from the Clang 3.3 documentation:
    [Read More]
  2. Simple code injection using DYLD_INSERT_LIBRARIES

    In the following article I will describe a simple method to inject code into executables on Mac OS X 10.8 using the DYLD_INSERT_LIBRARIES environment variable.
    [Read More]
  3. Embedded computers in aircrafts

    I am back from vacations and had a 11 hours flight with AirAustral. On board each seat has an embedded computer. With this computer, you can watch movies, play games, …
    [Read More]
  4. Automatic Backtraces

    Here are different solutions to display automatically a backtrace when entering a specific function in your application. As an example we will take the following program. It’s a really simple program: the main function calls the function function1 which prints a string.
    [Read More]
  5. getrlimit and randomness

    To determine the maximum number of files your application can open, there is a function getrlimit() available.
    [Read More]
  6. Major issue in SimplePing

    The SimplePing sample from Apple can fail to perform a ping request (ICMP).
    [Read More]
  7. Programmatically break into GDB

    You may want to stop into the debugger if something bad happened while executing your program. The easier way to do that is to have a breakpoint always set and to run your program in the debugger. But sometimes you want to break even if there are no breakpoint. For example you know that something is wrong now and your program will crash later.
    [Read More]
  8. Breakpoint conditions with GDB

    When debugging your application, you use breakpoints. The program will return control to GDB every time it reaches a breakpoint you set. This may not be desirable if you have breakpoint on a method that is called many times and you want to break only with certain values passed to that method. GDB provides several ways to do conditional breakpoints that I’ll try to explain.
    [Read More]
  9. libMallocDebug

    Here is a little description on how to use libMallocDebug for developers and QA people. It seems not many people know about it.
    [Read More]