Hi, Sorry for bringing this thread up again. I have combined the tips of Michael and Peeyush. I rebuilt the ffmpeg to be debuggable(it should have been overwriten on my older version) I also installed "ddd" I run my simple decode program, and put a breakpoint on function "avcodec_decode_video()", but when I do "step" , and reach that function, instead of getting into ffmpeg source code, and seeing the called files and functions, I get the following message:
*(gdb) step > Single stepping until exit from function avcodec_decode_video, > which has no line number information. > Cannot access memory at address 0x18e > (gdb) > * Dose anybody have an idea what does it mean? Have I had a mistake in building ffmpeg to be debuggable? Or I am using "ddd" incorrectly? The code runs correctly, and decodes the video frames, but I can't get inside the functions. Thanks, Alireza On Thu, Dec 18, 2008 at 10:46 PM, Peeyush Mishra <[email protected]>wrote: > Put break point to the specific FUNCTION name and then do STEP , STEP > > > Thanks > Peeyush > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of AliReza Khoshgoftar > Sent: Friday, December 19, 2008 12:18 AM > To: Libav* user questions and discussions > Subject: Re: [libav-user] Debugging / Finding Function Stack in FFMPEG > > Thanks again. > I'm Debugging the executable fime under ddd, and it's great. > So, here's just another thing. > I want it to track the program with some more details. i.e. when it arrives > to the line on which "avcodec_decode_video()" is called. it goes to the > source code for this function(which is in utils.c), and then shows me > exactly which parts of the source code are used in decoding. > So, What should I do to make it trace the program with thus much details? > (Currently, it only passes over functions like "avcodec_decode_video()" or > "av_read_frame()", etc, and doesn't get into the source code) > > Thanks > Alireza > > On Thu, Dec 18, 2008 at 12:55 AM, Peeyush Mishra > <[email protected]>wrote: > > > Lets consider ur exe name is X and file name Y > > > > Do following : > > > > > > ddd X > > u will get console > > break 1 (on main ()) > > run Y > > then step > > step > > > > thanks > > Peeyush > > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of AliReza > Khoshgoftar > > Sent: Thursday, December 18, 2008 10:44 AM > > To: Libav* user questions and discussions > > Subject: Re: [libav-user] Debugging / Finding Function Stack in FFMPEG > > > > Thanks very much for the help. > > I re-compiled ffmpeg with the options Michael told. > > And as the easiest option, I am trying ddd now. > > I have the package now. > > So, just a quick question, how should I pass a video file as an argument > to > > my executable file, when I run it on ddd? > > Since I just open the executable file from the file menu, but it can't be > > executed unless I pass it a video. > > > > > > 2008/12/17 Peeyush Mishra <[email protected]> > > > > > > > > Why don't u use DDD debugger, run the executable and do "step" . It > will > > > tell you the relevant function and file... > > > > > > Thanks > > > Peeyush > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > From: [email protected] > > > [mailto:[email protected]] On Behalf Of AliReza > > Khoshgoftar > > > Sent: Thursday, December 18, 2008 6:15 AM > > > To: Libavcodec / Libavformat Mailing List > > > Subject: [libav-user] Debugging / Finding Function Stack in FFMPEG > > > > > > Hi There, > > > > > > I had another question which maybe rather categorized as a programming > > > question, but anyway it may be good to ask it here. Since it is about > > > FFMPEG > > > somehow. > > > I wanted to see if there is anyway to debug an FFMPEG code, and see the > > > function stack in Linux. > > > What I exactly wanna do is here: > > > I've made a simple code to decode a video and extract a frame. > > > I've compiled it using GCC and have the executable file. > > > Now, I wanna know while I am running the executable file on a video > which > > > functions in FFMPEG's source code are called exactly. > > > For example, I wanna see when I call "av_codec_decode_video", the > > "decode" > > > function inside this function points to which function in FFMPEG's > source > > > code? > > > Is there anyway to find it out in Linux, and have a list of the > functions > > > called during the program execution and the c file in which these > > functions > > > are located. > > > > > > Thanks is in Advance, > > > Alireza. > > > > > > PS:If you don't know of a way to do it Linux, but you believe it can be > > > done > > > easily in Windows (e.g. in MVC++), I still appreciate your guidance on > > how > > > to do that > > > _______________________________________________ > > > libav-user mailing list > > > [email protected] > > > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > > > > > > -- > > > This message has been scanned for viruses and > > > dangerous content by MailScanner, and is > > > believed to be clean. > > > > > > > > > No virus found in this incoming message. > > > Checked by AVG. > > > Version: 7.5.552 / Virus Database: 270.9.18 - Release Date: 12/14/2008 > > > 12:00 > > > AM > > > > > > > > > No virus found in this outgoing message. > > > Checked by AVG. > > > Version: 7.5.552 / Virus Database: 270.9.18 - Release Date: 12/14/2008 > > > 12:00 > > > AM > > > > > > > > > _______________________________________________ > > > libav-user mailing list > > > [email protected] > > > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > > > > > _______________________________________________ > > libav-user mailing list > > [email protected] > > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > > > > -- > > This message has been scanned for viruses and > > dangerous content by MailScanner, and is > > believed to be clean. > > > > > > No virus found in this incoming message. > > Checked by AVG. > > Version: 7.5.552 / Virus Database: 270.9.18 - Release Date: 12/14/2008 > > 12:00 > > AM > > > > > > No virus found in this outgoing message. > > Checked by AVG. > > Version: 7.5.552 / Virus Database: 270.9.18 - Release Date: 12/14/2008 > > 12:00 > > AM > > > > > > _______________________________________________ > > libav-user mailing list > > [email protected] > > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > > > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.552 / Virus Database: 270.9.18 - Release Date: 12/14/2008 > 12:00 > AM > > > No virus found in this outgoing message. > Checked by AVG. > Version: 7.5.552 / Virus Database: 270.9.18 - Release Date: 12/14/2008 > 12:00 > AM > > > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
