From: Sergey Borovikov <sergey.borovikov@top-sportbets.com>
To: ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: [sisyphus] KDevelop4 patch
Date: Tue, 22 Feb 2011 17:51:40 +0100
Message-ID: <201102221751.49526.sergey.borovikov@top-sportbets.com> (raw)
[-- Attachment #1.1: Type: Text/Plain, Size: 1395 bytes --]
Приветствую..
Ковырялся тут с обновлением KDevelop до версии 4.2 (кстати кто всё-таки соберёт?) и случайно починил "Debuging Shell", который уже несколько лет как поломаный. (http://www.kdevelop.org/mediawiki/index.php/FAQ#How_to_debug_exec_objects_with_libtool_.22temporary_wrapper_scripts.22.3F)
Решение конечно немного кривое, но позволяет дебажить libtool-приложения без проблем. По крайней мере других применений "Debuging Shell", кроме как написать туда "libtool --mode=execute" я в инете не нашёл.
По поводу решения: идея в том, чтобы 'gdb' запускал обычный 'sh', которому аргументом передаётся '-c "libtool --mode=execute appName appArgs"'. Естественно это только если "Debuging Shell" указан(не пуст). Работает на ура.
Найденные в коде артефакты по поводу этого функционала не работоспособны в принципе.
--
Sergey Borovikov
Top Sportwetten GesmbH
Hietzinger Kai 137a
A-1130 Wien
email: sergey.borovikov@top-sportbets.com
www.ambassador-bets.com
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
[-- Attachment #2: DebugShellFix.patch --]
[-- Type: text/x-patch, Size: 1793 bytes --]
diff -Naurd kdevelop-4.2.0.orig/debuggers/gdb/debugsession.cpp kdevelop-4.2.0/debuggers/gdb/debugsession.cpp
--- kdevelop-4.2.0.orig/debuggers/gdb/debugsession.cpp 2011-01-23 20:36:25.000000000 +0100
+++ kdevelop-4.2.0/debuggers/gdb/debugsession.cpp 2011-02-22 17:11:48.000000000 +0100
@@ -1024,6 +1024,11 @@
queueCmd(new GDBCommand(GDBMI::EnvironmentCd, dir));
+ if(!config_dbgShell_.isEmpty()){
+ QString realArgs = KShell::joinArgs(arguments);
+ arguments = QStringList( QString("-c"));
+ arguments << config_dbgShell_.toLocalFile()+QString(" ")+executable+QString(" ")+realArgs;
+ }
// Set the run arguments
if (!arguments.isEmpty())
queueCmd(
@@ -1078,6 +1083,12 @@
// Note: script could contain "run" or "continue"
}
+ else if(!config_dbgShell_.isEmpty()){
+ QStringList arguments;
+ queueCmd(new GDBCommand(GDBMI::FileExecAndSymbols, "sh", this, &DebugSession::handleFileExecAndSymbols, true));
+ raiseEvent(connected_to_program);
+ queueCmd(new GDBCommand(GDBMI::ExecRun));
+ }
else
{
queueCmd(new GDBCommand(GDBMI::FileExecAndSymbols, executable, this, &DebugSession::handleFileExecAndSymbols, true));
diff -Naurd kdevelop-4.2.0.orig/debuggers/gdb/gdb.cpp kdevelop-4.2.0/debuggers/gdb/gdb.cpp
--- kdevelop-4.2.0.orig/debuggers/gdb/gdb.cpp 2011-01-23 20:36:25.000000000 +0100
+++ kdevelop-4.2.0/debuggers/gdb/gdb.cpp 2011-02-22 15:07:02.000000000 +0100
@@ -75,7 +75,8 @@
arguments << "--interpreter=mi2" << "-quiet";
QString shell = config.readEntry(GDBDebugger::debuggerShellEntry);
- if( !shell.isEmpty() )
+// if( !shell.isEmpty() )
+ if( false )
{
kDebug(9012) << "have shell\n";
shell = shell.simplified();
next reply other threads:[~2011-02-22 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 16:51 Sergey Borovikov [this message]
2011-02-24 11:20 ` Gleb Kulikov
2011-02-24 14:41 ` Sergey Borovikov
2011-02-24 12:20 ` Sergey V Turchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201102221751.49526.sergey.borovikov@top-sportbets.com \
--to=sergey.borovikov@top-sportbets.com \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git