Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gdb - break in static functions

Tags:

debugging

gdb

I have two static functions with same name in two different files.

radio.c
-------
static audio_call_back(...)
{
    // code to execute when audio from radio is acquired
}

mp3.c
-----
static audio_call_back(...)
{
    // code to execute when audio from mp3 player is acquired
}

They are executed by function pointer method.

With gdb, how can I have a break point in "audio_call_back" of mp3 file. By default if I run

(gdb) break audio_call_back

a break point is set up in radio.c file. How can I set break point in "audio_call_back" present in file mp3.c

like image 970
Kamath Avatar asked Mar 14 '11 15:03

Kamath


1 Answers

break filename:function - mp3.c:audio_call_back

BTW, aren't you forgetting a return type?

like image 103
Lightness Races in Orbit Avatar answered Oct 14 '22 13:10

Lightness Races in Orbit