[alsa-devel] Using GDB for ALSA How to?

Jan-Benedict Glaw jbglaw at lug-owl.de
Mon Sep 1 23:13:26 CEST 2008


On Mon, 2008-09-01 13:33:28 -0700, William Estrada <MrUmunhum at popdial.com> wrote:
> Jan-Benedict Glaw wrote:
> > On Mon, 2008-09-01 13:19:54 -0700, William Estrada <MrUmunhum at popdial.com> wrote:
> > >   I am trying to use GDB with my ALSA program. I wish to display (print) 
> > > a handle for
> > > an snd_pcm_t pointer. I am getting the following error:
> > >     
> > > > (gdb) p Device
> > > > $9 = (snd_pcm_t *) 0x92be458
> > > > (gdb) p *Device
> > > > $10 = <incomplete type>
> > >
> > >   How do I display the snd_pcm_t structure?
> >
> > My guess is that this pointer is simply uninitialized. Did you check
> > that it was properly prepared?
>
> Yes, the device is opened. Is that what you mean??

Partially.  But I misread your log, too.  Seems that gdb failed to
figure out how snd_pcm_t is actually defined. You'd try casting it to
struct _snd_pcm *  if the type information got lost somewhere. (You'd
check the later by examining the `readelf -wi' output for your binary
or library you're hacking on.)

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw at lug-owl.de              +49-172-7608481
Signature of: They that give up essential liberty to obtain temporary safety,
the second  : deserve neither liberty nor safety.  (Ben Franklin)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20080901/878e932a/attachment.sig 


More information about the Alsa-devel mailing list