From 959785a885528f66c56e744641c71d1e7e2fadc8 Mon Sep 17 00:00:00 2001 From: Rajesh Joseph Date: Mon, 25 Jan 2016 01:33:48 +0530 Subject: extras/devel-tool: Added gdb_macros for debugging provided following functions in the script 1) print dictionary (dict_t) items 2) print list members (only address) Change-Id: I5befb2dcdbf258ab3001ff25212a5862b9cc5321 Signed-off-by: Rajesh Joseph Reviewed-on: http://review.gluster.org/13289 Smoke: Gluster Build System Reviewed-by: Raghavendra Talur CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System --- extras/devel-tools/gdb_macros | 84 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 extras/devel-tools/gdb_macros diff --git a/extras/devel-tools/gdb_macros b/extras/devel-tools/gdb_macros new file mode 100644 index 00000000000..aae4ccb3b37 --- /dev/null +++ b/extras/devel-tools/gdb_macros @@ -0,0 +1,84 @@ + +# +# gdb_macros is a gdb script file which can assist +# developer in debugging. This script provides +# following functions for debugging gluster processes +# effectively: +# +# pdict : This function will iterate through all the +# dictionary (dict_t) members and print the +# key-value pair. +# +# plist : This function will print address of each member +# of gluster list (list_head). +# +# gdb script should be loaded in gdb before using these +# functions. gdb script can be loaded on-demand or on gdb +# start-up. Use the following command on gdb prompt for +# loading it on-demand. +# source