[Asterisk-code-review] ast coredumper: allow setting asterisk binary explicitly (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Oct 31 06:48:16 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6938 )

Change subject: ast_coredumper: allow setting asterisk binary explicitly
......................................................................

ast_coredumper: allow setting asterisk binary explicitly

Adds an extra option, --asterisk-bin=<path> to ast_coredumper. If
provided, the binary given to gdb will be the parameter, rather than
asterisk from the PATH.

ASTERISK-27380 #close

Change-Id: I25f5b91eb75059b0fb2f142e468c26b283b0a9f3
---
M contrib/scripts/ast_coredumper
1 file changed, 12 insertions(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
index 81e94e9..73c7917 100755
--- a/contrib/scripts/ast_coredumper
+++ b/contrib/scripts/ast_coredumper
@@ -17,6 +17,7 @@
 		[ --tarball-results ] [ --delete-results-after ]
 		[ --tarball-uniqueid="<uniqueid>" ]
 		[ --no-default-search ] [ --append-coredumps ]
+		[ --asterisk-bin="path" ]
 		[ <coredump> | <pattern> ... ]
 
 DESCRIPTION
@@ -95,6 +96,10 @@
 	--append-coredumps
 		Append any coredumps specified on the command line to the
 		config file specified ones instead of overriding them.
+
+	--asterisk-binary
+		Path to the asterisk binary. Default: look for asterisk
+		in the PATH.
 
 	<coredump> | <pattern>
 		A list of coredumps or coredump search patterns.  Unless
@@ -261,6 +266,9 @@
 	--tarball-uniqueid=*)
 		tarball_uniqueid=${a#*=}
 		;;
+	--asterisk-bin=*)
+		asterisk_bin=${a#*=}
+		;;
 	--help|-*)
 		print_help
 		;;
@@ -362,7 +370,10 @@
 for i in ${!COREDUMPS[@]} ; do
 	cf=${COREDUMPS[$i]}
 	echo "Processing $cf"
-	${GDB} -n --batch -q --ex "source /tmp/.ast_coredumper.gdbinit" $(which asterisk) "$cf" 2>/dev/null | (
+	if [ -z "$asterisk_bin" ]; then
+		asterisk_bin=$(which asterisk)
+	fi
+	${GDB} -n --batch -q --ex "source /tmp/.ast_coredumper.gdbinit" "$asterisk_bin" "$cf" 2>/dev/null | (
 		of=/dev/null
 		while IFS= read line ; do
 			if [[ "$line" =~ !@!@!@!\ ([^\ ]+)\ !@!@!@! ]] ; then

-- 
To view, visit https://gerrit.asterisk.org/6938
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I25f5b91eb75059b0fb2f142e468c26b283b0a9f3
Gerrit-Change-Number: 6938
Gerrit-PatchSet: 1
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171031/b8db75cb/attachment.html>


More information about the asterisk-code-review mailing list