//
archives

Archive for

Inferior call to class_getName() in gdb – Part 3: getting a class name

A simple suggestion to work around this issue Why not read a class name from memory directly? Let’s start from class_getName(). Class_getName() calls _class_getName() with the parameter “Class”. _class_getName changes its parameter “Class” to “class_t *” and calls getName() to get a class name. Let’s take a look at the structures used here. We are … Continue reading

Inferior call to class_getName() in gdb – Part 2: debugging gdb itself

Debugging gdb itself with gdb To debug gdb, copy the current gdb to gdb2 first. Load gdb2 within gdb, and attach gdb2 to Safari. The result should be something like this. Set a breakpoint at objc_msgSend() and class_getName() on gdb2. Now move to gdb that is a parent of gdb2 by pressing “ctrl” + “c”, … Continue reading

Inferior call to class_getName() in gdb – Part 1: crash

Over the last couple of days, I got the chance to dive into iOS again and decided to do some basic things I could use at a later time for an app analysis. What I wanted to do was simply to log class and method names called by apps in runtime. However, as always, I … Continue reading