From ff37ea6f96ead38e49ebe4c8356515e4061810c8 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Sat, 9 Jan 2016 00:35:45 +0100 Subject: Add optional debugrun soffice.bin arguments... using the gb_DBGARGS variable. This value is appended to the gdb "set args" command. Change-Id: Ic15754d7edcc448f283522338900684a29a03cf3 Reviewed-on: https://gerrit.libreoffice.org/21364 Reviewed-by: Jan-Marek Glogowski Tested-by: Jan-Marek Glogowski --- solenv/gbuild/gbuild.help.txt | 6 +++++- solenv/gbuild/platform/unxgcc.mk | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt index 9362667f1b23..bbf74f79e785 100644 --- a/solenv/gbuild/gbuild.help.txt +++ b/solenv/gbuild/gbuild.help.txt @@ -30,7 +30,9 @@ AVAILABLE TARGETS all build product and run unit tests (default goal) clean remove all generated files debugrun starts the INSTDIR instance and allows tests to - be run against it + be run against it. You can provide additional + arguments to soffice.bin using the gb_DBGARGS + variable. check run unit tests and if in toplevel subsequentcheck unitcheck run unit tests slowcheck run slow unit tests @@ -139,3 +141,5 @@ INTERACTIVE VARIABLES: gb_Side Either "host" or "build" (default to "host"). determine if config_host.mk or config_build.mk is used to set the build environment. + gb_DBGARGS Append these arguments to GDBs "set args" command for + debugrun. Double quotes will be automatically escaped. diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 7e43ce35cc25..278006bd8631 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -303,7 +303,8 @@ define gb_Module_DEBUGRUNCOMMAND OFFICESCRIPT=`mktemp` && \ printf 'if [ -e $(INSTROOT)/program/ooenv ]; then . $(INSTROOT)/program/ooenv; fi\n' > $${OFFICESCRIPT} && \ printf "gdb $(INSTROOT)/$(LIBO_BIN_FOLDER)/soffice.bin" >> $${OFFICESCRIPT} && \ -printf " -ex \"set args --norestore --nologo '--accept=pipe,name=$(USER);urp;' \"" >> $${OFFICESCRIPT} && \ +printf " -ex \"set args --norestore --nologo '--accept=pipe,name=$(USER);urp;' %s\"" \ + "$(subst ","\\\"",$(value gb_DBGARGS))" >> $${OFFICESCRIPT} && \ $(SHELL) $${OFFICESCRIPT} && \ rm $${OFFICESCRIPT} endef -- cgit