[Vorbis-dev] debugging question.
Michael Smith
mlrsmith at gmail.com
Fri Aug 5 09:16:47 PDT 2005
On 8/5/05, Shashank Khanvilkar <shashank at mia.ece.uic.edu> wrote:
> Hi,
> I am using libvorbis-1.0.1 and I am trying to debug the example decoder
> (examples/decoder_example.c) using gdb. I have compiled the source tree
> for debug and can single step through the program.
> However i am facing the following problem (which I think is more of C
> than vorbis)
You've built with optimisation turned on. As usual, this makes
debugging harder. In this case, your compiler has eliminated the local
variable 'ci', so you need to access it through the 'vi' pointer - and
then it's just a matter of syntax.
To print out the entire codec_setup_info struct:
print *(codec_setup_info *)vi->codec_setup
To print out the first blocksize:
print ((codec_setup_info *)vi->codec_setup).blocksizes[0]
Note that you shouldn't be doing development with such an old version
of libvorbis - please upgrade to 1.1.1 (unless you're using gcc4, in
which case use the current version from svn, which disables a gcc4
optimisation which breaks libvorbis).
Mike
More information about the Vorbis-dev
mailing list