A: 

For anyone who may be interested, I could not figure out why it does not map atmel_rx_chars to an address in System.map. You can still set a breakpoint as normal in order to debug in this situation. I suppose it should have been more obvious when I was searching for answers. Anyway in the gdb command line type

b source_file.c:line#

so in this example, it would be

b atmel_serial.c:381

and it will break whenever you hit the "missing" routine. This is still an incomplete solution, though. Breaking into a specific line works but it doesn't leave the stack frame of the calling function (atmel_handle_receive), so locals of atmel_rx_chars are inaccessible to gdb. As always, any help or insight would be appreciated. Hope this serves as a good jumping off point if someone else ever runs into this problem or one like it.

Thank you,

Jayce

A: 

Dear all,

I have the same problem as above. I don't have a clue why my "static void" function doesn't appear in the System.Map file or as a debug symbol in vmlinux. However, other similar functions within the same file work properly.

I can break into the function by using "b filename.c:" but then again the local variables on the stack are not visible to gdb. :-(

Did you find any solutions already?

So long, Markus


Thanks a lot for the hint. I also thought about the inlining. Then I compiled with "-O0" flag in order to disable all compiler optimizations. However, this doesn't seem to solve the problem.

Best regards, Markus

Markus Franke
+2  A: 

The reason you don't see it is because the compiler is inlining that function. It's declared static and only called in one place so the compiler inlines it. If you want to put a breakpoint on it, change the source so it's no longer declared static and recompile.

JayM

related questions