Update to gdb patches – fix for a “new” bug

I was messing around with SoftwarePassport and Amit Singh’s tiny executable to find out why gdb doesn’t breakpoint in those two executables. I thought it was due to incomplete headers, but gdb can’t also breakpoint into nicertiny, which has the segment/section added (otool/otx SoftwarePassport problems can be fixed by manually adding the missing section – there is enough padding space in the header to do that so its developers might want to fix that :-)).

Anyway, I decided to use the int3 trick to see if gdb was able to breakpoint and it worked. But then I wanted to manually fix the code – restore the original byte and point EIP to the correct address – and gdb didn’t allowed me. You get a “Value being assigned to is no longer active.” error message. Web searching for the problem, and there is a small patch at https://bugzilla.redhat.com/attachment.cgi?id=313103&action=diff. I tried it and it works! The problem isn’t exclusive with these two binaries but happens if you stop at the beginning of a function and gdb is missing stack frame information. So it’s a very useful fix 🙂
I have also included in this patch the fix for LIBICONV problem, as described here. If you don’t want to compile gdb yourself, I’m including the (fat) binary, compiled in Snow Leopard, 32/64 bits.


SHA256(all_patches_v0.2.patch.gz)= e9e113b583f6eeea47025fce612028ca76b63386cc35d6fcda5bb7c9a705814f

SHA256(gdb-i386-apple-darwin.gz)= 5ed41b093cd451b55bf35b6f103a9879c1e224f4721647c82757f8aee21293fb

Leave a Reply

Your email address will not be published. Required fields are marked *