[asterisk-dev] Finding a named endpoint when in gdb
Roger James
roger at beardandsandals.co.uk
Tue May 12 05:08:28 CDT 2020
On 11 May 2020 14:46:55 George Joseph <gjoseph at digium.com> wrote:
>
>
>
> On Sat, May 9, 2020 at 3:50 PM roger <roger at beardandsandals.co.uk> wrote:
> Hi,
>
> I am debugging a problem witj ipv6 and endpoints. I would like to be
> able to examine a particular named endpoint when a breakpnt has been
> hit. So basically I need a single line of c code that calls a function
> (or nested functions) that take a endpoint name as a parameter and
> returns a pointer thta I can use in gdb print command.
>
> Any ideas gratefully received.
>
>
> (gdb) p *(struct ast_sip_endpoint
> *)ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", "1172")
>
> or to save it to a variable...
>
>
> set $my_endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(),
> "endpoint", "1172")
> (gdb) p *(struct ast_sip_endpoint *)$my_endpoint
>
>
>
>
>
> Roger
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
>
> --
>
> George Joseph
>
> Asterisk Software Developer
> direct/fax +1 256 428 6012
> Check us out at www.sangoma.com and www.asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
Thanks George,
That saved me a shed load of time looking through code.
Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200512/f056f2dd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 5142 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200512/f056f2dd/attachment.png>
More information about the asterisk-dev
mailing list