[asterisk-dev] Finding a named endpoint when in gdb
George Joseph
gjoseph at digium.com
Mon May 11 08:45:14 CDT 2020
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
[image: image.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200511/39f52377/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/20200511/39f52377/attachment.png>
More information about the asterisk-dev
mailing list