Re: Debugging an AudioServer plugin
Re: Debugging an AudioServer plugin
- Subject: Re: Debugging an AudioServer plugin
- From: Eric Gorouben <email@hidden>
- Date: Tue, 12 Mar 2013 18:53:46 +0100
Thanks,
I finally found out this way. Now in the hard stuff...
Best regards
Eric
Le 12 mars 2013 à 18:49, Jeff Moore <email@hidden> a écrit :
>
>
> --
>
> Jeff Moore
> Core Audio
> Apple
>
>
>
> On Mar 8, 2013, at 5:45 AM, Eric Gorouben <email@hidden> wrote:
>
>> Hi Jeff,
>>
>> It would be helpful to have something like a short tutorial. I've never used lldb to debug coreaudiod.
>>
>> when I type sudo lldb --wait-for coreaudiod lldb opens, that's all
>> then after "sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist" , nothing happens.
>> I suppose I have to enter something like pro at -n coreaudiod -w, which attaches to coreaudiod before that last command.
>> It starts as expected…
>
> It stops for me when coreaudiod starts. That allows me to load symbols and set other break points, like in the initialize routine of a plug-in or what have you. Then I tell the debugger to continue running.
>
>
>
>> But then, I don't know what to do. I can't get any of the logs from my plugin (I can't even get IOLog to display anything to the console, how can I solve this?) and I don't know how to set breakpoints into my plugin.
>
> Like most daemons, coreaudiod has it's stderr and stdout routed to /dev/null. So, you need to use a logging service that goes to syslog in your plug-in to see any logging. In fact, syslog itself is a fine thing to use.
>
>
>
>> let's say we want to debug SimpleAudioPlugin, and break in SA_Device::Device_GetPropertyDataSize, at line 349.
>> What would be the path?
>
> You need to load the symbols for the plug-in and then it's just like setting a break point on anything.
>
> Your next step is probably to go read the lldb documentation to learn about how it all works and the differences in syntax between lldb and gdb. FWIW, I keep this link handy in a web browser to help me map my too-many-years of gdb debugging to lldb commands.
>
>
>
>> I would greatly appreciate this help!!!
>>
>> Thanks
>> Eric
>> Le 7 mars 2013 à 19:41, Jeff Moore <email@hidden> a écrit :
>>
>>> The right way to debug coreaudiod at startup is:
>>>
>>> 0) Unload coreaudiod
>>> % sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist
>>>
>>> 1) Start lldb/gdb up such that they await the launch of coreaudiod (note that you need to be root to debug coreaudiod):
>>> % sudo lldb --wait-for coreaudiod
>>>
>>> 2) Start coreaudiod again:
>>> % sudo launchctl load /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist
>>>
>>> --
>>>
>>> Jeff Moore
>>> Core Audio
>>> Apple
>>>
>>>
>>>
>>> On Mar 7, 2013, at 9:14 AM, Eric Gorouben <email@hidden> wrote:
>>>
>>>> I'm trying to debug my AudioServer plugin with xcode 4.6 and Mac OS 10.8.2.
>>>> Therefore, I want to attach the debugger to coreaudiod and restart it. But it doesn't work.
>>>> What is he proper recipe for this?
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Coreaudio-api mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden