On 7/21/06, Shriek <shriek.007@xxxxxxxxx> wrote:
I was under the impression that when you compile a program with gcc -g
(to enable debugging suport) gcc turns off all optimizations. It should
also turn inlining off. So that's the reason why you are not able to
set a breakpoint for the function.I attaching gdb to a daemon ... so it receives some input from a console .. processes the arguments ... and then calls an inline function ...the thing is if that function is say some func_inline( ) ... I am not able to set the breakpoint for it .. it says there is no func_inline( ) in the current context ... how to go about it ...Shrikanth R K
Secondly, if you're running gdb on an executable without debugging support then then figure out the address of the function in the executable. Then breakpoint at that address. Try help break at gdb console to find out how to break at an address.
Figuring out the exact address for a function might be tricky. Basically you stare hard at the disassembly of the not inlined functions where you suspect your function to be inlined and guess the address out by looking out the assembly instructions :). Might not be very easy with optimized code... but what more can you do with a binary blob?
Ritesh