On Sat, May 9, 2020 at 3:50 PM roger <ro...@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]
-- 
_____________________________________________________________________
-- 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

Reply via email to