I have an executable and I am debugging it using gdb. This is my first time using gdb so bear with me please.
I want to set a breakpoint at a function and I know the name of the function using class dump. Now it won't let me add breakpoint to that function because it say's that there's no symbol table. I tried adding the symbol table but it still complains that no symbol table loaded.
So, is there's anyway I can set a breakpoint at this method? It's an objective c method, not c (If that makes a difference). All I need to do is examine the argument of this method.
In class-dump there is an -A option will can print the function's address, e.g.
@interface FooObject : NSObject
{
}
- (void)y; // IMP=0x100000d54
@end
With this you can set a break point using the address:
(gdb) b *0x100000d54
Breakpoint 1 at 0x100000d54
Note that, unless you have stripped the executable, you should always be possible to set a break point using the method's name
(gdb) b -[FooObject y]
Breakpoint 2 at 0x100000d60
(The address isn't the same as the latter skips some frame set-up code.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With