From b65b0ec23184885f212a78aa69edd152bdbd4588 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Thu, 21 Oct 2010 00:53:01 +0200 Subject: Add support for PluginAttachDebuggerToPlugins for linux Opens a terminal with a gdb session for newly started SLPlugin processes if PluginAttachDebuggerToPlugins is set to TRUE. --- linden/indra/llcommon/llprocesslauncher.h | 3 +++ linden/indra/llplugin/llpluginprocessparent.cpp | 11 +++++++++++ 2 files changed, 14 insertions(+) (limited to 'linden/indra') diff --git a/linden/indra/llcommon/llprocesslauncher.h b/linden/indra/llcommon/llprocesslauncher.h index 036732f..9cdb0f6 100644 --- a/linden/indra/llcommon/llprocesslauncher.h +++ b/linden/indra/llcommon/llprocesslauncher.h @@ -80,6 +80,9 @@ private: HANDLE mProcessHandle; #else pid_t mProcessID; + +public: + pid_t getProcessID() const { return mProcessID; } #endif }; diff --git a/linden/indra/llplugin/llpluginprocessparent.cpp b/linden/indra/llplugin/llpluginprocessparent.cpp index 1bf34c5..8db6046 100755 --- a/linden/indra/llplugin/llpluginprocessparent.cpp +++ b/linden/indra/llplugin/llpluginprocessparent.cpp @@ -408,6 +408,17 @@ void LLPluginProcessParent::idle(void) mDebugger.addArgument("end tell"); mDebugger.launch(); + #elif LL_LINUX + + std::stringstream cmd; + + mDebugger.setExecutable("/usr/bin/gnome-terminal"); + mDebugger.addArgument("--geometry=165x24-0+0"); + mDebugger.addArgument("-e"); + cmd << "/usr/bin/gdb -n /proc/" << mProcess.getProcessID() << "/exe " << mProcess.getProcessID(); + mDebugger.addArgument(cmd.str()); + mDebugger.launch(); + #endif } -- cgit v1.1