diff options
author | Christian Hopps <chopps@labn.net> | 2023-07-07 00:24:48 +0200 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2023-12-26 14:34:56 +0100 |
commit | 8790457c463476a4ecec0edff07482f707b84fc2 (patch) | |
tree | 1c48cd4ef2455833e0a36735ff0fd22e0a641a89 /gdb/lib.txt | |
parent | Merge pull request #15063 from idryzhov/dev-doc-graphviz (diff) | |
download | frr-8790457c463476a4ecec0edff07482f707b84fc2.tar.xz frr-8790457c463476a4ecec0edff07482f707b84fc2.zip |
lib: add simplified native msg support
This is intended to replace protobuf use in mgmtd.
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'gdb/lib.txt')
-rw-r--r-- | gdb/lib.txt | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/gdb/lib.txt b/gdb/lib.txt index 5d22321b6..435ec7eda 100644 --- a/gdb/lib.txt +++ b/gdb/lib.txt @@ -306,8 +306,9 @@ define mq_walk end set $mg = $mg->next end +end -document mg_walk +document mq_walk Walk the memory data structures to show what is holding memory. Arguments: @@ -315,3 +316,49 @@ Arguments: sure where to start pass it mg_first, which is a global DS for all memory allocated in FRR end + +define __darr_meta + set $_ = ((struct darr_metadata *)$arg0) - 1 +end +document __darr_meta +Store a pointer to the struct darr_metadata in $_ for the given dynamic array. + +Argument: a pointer to a darr dynamic array. +Returns: pointer to the struct darr_metadata in $_. +end + +define darr_meta + __darr_meta $arg0 + p *$_ +end +document darr_meta +Print the struct darr_metadata for the given dynamic array. Store the value +in $_ as well. + +Argument: a pointer to a darr dynamic array. +Returns: pointer to the struct darr_metadata in $_. +end + +define darr_len + __darr_meta $arg0 + set $_ = $_->len + p $_ +end +document darr_len +Print the length of the given dynamic array, and store in $_. + +Argument: a pointer to a darr dynamic array. +Returns: length of the array. +end + +define darr_cap + __darr_meta $arg0 + set $_ = $_->cap + p $_ +end +document darr_len +Print the capacity of the given dynamic array, and store in $_. + +Argument: a pointer to a darr dynamic array. +Returns: capacity of the array. +end |