Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
9ae53e49
Commit
9ae53e49
authored
May 06, 2009
by
hjk
Browse files
debugger: rename 'AttachRemote' to 'StartRemote'
parent
6e22eda3
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debugger.pro
View file @
9ae53e49
...
...
@@ -77,7 +77,6 @@ SOURCES += \
gdboptionspage
.
cpp
FORMS
+=
attachexternaldialog
.
ui
\
attachremotedialog
.
ui
\
attachcoredialog
.
ui
\
breakbyfunction
.
ui
\
breakcondition
.
ui
\
...
...
@@ -85,6 +84,7 @@ FORMS += attachexternaldialog.ui \
gdboptionspage
.
ui
\
commonoptionspage
.
ui
\
startexternaldialog
.
ui
\
startremotedialog
.
ui
\
RESOURCES
+=
debugger
.
qrc
...
...
src/plugins/debugger/debuggerdialogs.cpp
View file @
9ae53e49
...
...
@@ -31,8 +31,8 @@
#include "ui_attachcoredialog.h"
#include "ui_attachexternaldialog.h"
#include "ui_attachremotedialog.h"
#include "ui_startexternaldialog.h"
#include "ui_startremotedialog.h"
#ifdef Q_OS_WIN
# include "dbgwinutils.h"
...
...
@@ -302,13 +302,13 @@ void AttachExternalDialog::pidChanged(const QString &pid)
///////////////////////////////////////////////////////////////////////
//
//
Attach
RemoteDialog
//
Start
RemoteDialog
//
///////////////////////////////////////////////////////////////////////
Attach
RemoteDialog
::
Attach
RemoteDialog
(
QWidget
*
parent
)
Start
RemoteDialog
::
Start
RemoteDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
),
m_ui
(
new
Ui
::
Attach
RemoteDialog
)
m_ui
(
new
Ui
::
Start
RemoteDialog
)
{
m_ui
->
setupUi
(
this
);
m_ui
->
buttonBox
->
button
(
QDialogButtonBox
::
Ok
)
->
setDefault
(
true
);
...
...
@@ -317,22 +317,22 @@ AttachRemoteDialog::AttachRemoteDialog(QWidget *parent)
connect
(
m_ui
->
buttonBox
,
SIGNAL
(
rejected
()),
this
,
SLOT
(
reject
()));
}
Attach
RemoteDialog
::~
Attach
RemoteDialog
()
Start
RemoteDialog
::~
Start
RemoteDialog
()
{
delete
m_ui
;
}
void
Attach
RemoteDialog
::
setRemoteChannel
(
const
QString
&
channel
)
void
Start
RemoteDialog
::
setRemoteChannel
(
const
QString
&
channel
)
{
m_ui
->
channelLineEdit
->
setText
(
channel
);
}
QString
Attach
RemoteDialog
::
remoteChannel
()
const
QString
Start
RemoteDialog
::
remoteChannel
()
const
{
return
m_ui
->
channelLineEdit
->
text
();
}
void
Attach
RemoteDialog
::
setRemoteArchitectures
(
const
QStringList
&
list
)
void
Start
RemoteDialog
::
setRemoteArchitectures
(
const
QStringList
&
list
)
{
m_ui
->
architectureComboBox
->
clear
();
if
(
!
list
.
isEmpty
())
{
...
...
@@ -341,14 +341,14 @@ void AttachRemoteDialog::setRemoteArchitectures(const QStringList &list)
}
}
void
Attach
RemoteDialog
::
setRemoteArchitecture
(
const
QString
&
arch
)
void
Start
RemoteDialog
::
setRemoteArchitecture
(
const
QString
&
arch
)
{
int
index
=
m_ui
->
architectureComboBox
->
findText
(
arch
);
if
(
index
!=
-
1
)
m_ui
->
architectureComboBox
->
setCurrentIndex
(
index
);
}
QString
Attach
RemoteDialog
::
remoteArchitecture
()
const
QString
Start
RemoteDialog
::
remoteArchitecture
()
const
{
int
index
=
m_ui
->
architectureComboBox
->
currentIndex
();
return
m_ui
->
architectureComboBox
->
itemText
(
index
);
...
...
src/plugins/debugger/debuggerdialogs.h
View file @
9ae53e49
...
...
@@ -40,8 +40,8 @@ class QPushButton;
namespace
Ui
{
class
AttachCoreDialog
;
class
AttachExternalDialog
;
class
AttachRemoteDialog
;
class
StartExternalDialog
;
class
StartRemoteDialog
;
}
// namespace Ui
QT_END_NAMESPACE
...
...
@@ -101,13 +101,13 @@ private:
ProcessListFilterModel
*
m_model
;
};
class
Attach
RemoteDialog
:
public
QDialog
class
Start
RemoteDialog
:
public
QDialog
{
Q_OBJECT
public:
explicit
Attach
RemoteDialog
(
QWidget
*
parent
);
~
Attach
RemoteDialog
();
explicit
Start
RemoteDialog
(
QWidget
*
parent
);
~
Start
RemoteDialog
();
void
setRemoteChannel
(
const
QString
&
host
);
void
setRemoteArchitecture
(
const
QString
&
arch
);
...
...
@@ -116,7 +116,7 @@ public:
QString
remoteArchitecture
()
const
;
private:
Ui
::
Attach
RemoteDialog
*
m_ui
;
Ui
::
Start
RemoteDialog
*
m_ui
;
};
class
StartExternalDialog
:
public
QDialog
...
...
src/plugins/debugger/debuggermanager.cpp
View file @
9ae53e49
...
...
@@ -929,8 +929,8 @@ void DebuggerManager::startNewDebugger(DebuggerRunControl *runControl)
m_attachedPID
=
-
1
;
break
;
}
case
Attach
Remote
:
{
Attach
RemoteDialog
dlg
(
mainWindow
());
case
Start
Remote
:
{
Start
RemoteDialog
dlg
(
mainWindow
());
QStringList
arches
;
arches
.
append
(
_
(
"i386:x86-64:intel"
));
dlg
.
setRemoteArchitectures
(
arches
);
...
...
src/plugins/debugger/debuggermanager.h
View file @
9ae53e49
...
...
@@ -113,7 +113,7 @@ enum DebuggerStartMode
StartExternal
,
// Start binary found in file system
AttachExternal
,
// Attach to running process
AttachCore
,
// Attach to a core file
Attach
Remote
//
A
ttach to a remote process
Start
Remote
//
Start and a
ttach to a remote process
};
class
IDebuggerEngine
;
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
9ae53e49
...
...
@@ -480,10 +480,10 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
m_attachCoreAction
->
setText
(
tr
(
"Attach to Core..."
));
connect
(
m_attachCoreAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
attachCore
()));
m_
attach
RemoteAction
=
new
QAction
(
this
);
m_
attach
RemoteAction
->
setText
(
tr
(
"Attach to
Running
Remote Application..."
));
connect
(
m_
attach
RemoteAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
attach
RemoteApplication
()));
m_
start
RemoteAction
=
new
QAction
(
this
);
m_
start
RemoteAction
->
setText
(
tr
(
"
Start and
Attach to Remote Application..."
));
connect
(
m_
start
RemoteAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
start
RemoteApplication
()));
Core
::
ActionContainer
*
mdebug
=
...
...
@@ -502,12 +502,9 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
Constants
::
ATTACHCORE
,
globalcontext
);
mdebug
->
addAction
(
cmd
,
Core
::
Constants
::
G_DEFAULT_ONE
);
#if 1
// FIXME: not yet functional
cmd
=
am
->
registerAction
(
m_attachRemoteAction
,
cmd
=
am
->
registerAction
(
m_startRemoteAction
,
Constants
::
ATTACHREMOTE
,
globalcontext
);
mdebug
->
addAction
(
cmd
,
Core
::
Constants
::
G_DEFAULT_ONE
);
#endif
cmd
=
am
->
registerAction
(
m_manager
->
m_continueAction
,
ProjectExplorer
::
Constants
::
DEBUG
,
QList
<
int
>
()
<<
m_gdbRunningContext
);
...
...
@@ -1090,11 +1087,11 @@ void DebuggerPlugin::attachCore()
runControl
->
start
();
}
void
DebuggerPlugin
::
attach
RemoteApplication
()
void
DebuggerPlugin
::
start
RemoteApplication
()
{
QSharedPointer
<
RunConfiguration
>
rc
=
activeRunConfiguration
();
if
(
RunControl
*
runControl
=
m_debuggerRunner
->
run
(
rc
,
ProjectExplorer
::
Constants
::
DEBUGMODE
,
Attach
Remote
))
->
run
(
rc
,
ProjectExplorer
::
Constants
::
DEBUGMODE
,
Start
Remote
))
runControl
->
start
();
}
...
...
src/plugins/debugger/debuggerplugin.h
View file @
9ae53e49
...
...
@@ -98,9 +98,9 @@ private slots:
void
showSettingsDialog
();
void
startExternalApplication
();
void
startRemoteApplication
();
void
attachExternalApplication
();
void
attachCore
();
void
attachRemoteApplication
();
private:
void
readSettings
();
...
...
@@ -122,9 +122,9 @@ private:
QAction
*
m_toggleLockedAction
;
QAction
*
m_startExternalAction
;
QAction
*
m_startRemoteAction
;
QAction
*
m_attachExternalAction
;
QAction
*
m_attachCoreAction
;
QAction
*
m_attachRemoteAction
;
};
}
// namespace Internal
...
...
src/plugins/debugger/gdbengine.cpp
View file @
9ae53e49
...
...
@@ -535,7 +535,7 @@ void GdbEngine::interruptInferior()
return
;
}
if
(
q
->
startMode
()
==
Attach
Remote
)
{
if
(
q
->
startMode
()
==
Start
Remote
)
{
execCommand
(
_
(
"-exec-interrupt"
));
return
;
}
...
...
@@ -1313,7 +1313,7 @@ void GdbEngine::exitDebugger()
qDebug
()
<<
"STATUS ON EXITDEBUGGER: "
<<
q
->
status
());
interruptInferior
();
}
if
(
q
->
startMode
()
==
AttachExternal
||
q
->
startMode
()
==
Attach
Remote
)
if
(
q
->
startMode
()
==
AttachExternal
||
q
->
startMode
()
==
Start
Remote
)
execCommand
(
_
(
"detach"
));
else
execCommand
(
_
(
"kill"
));
...
...
@@ -1357,7 +1357,7 @@ bool GdbEngine::startDebugger()
if
(
q
->
startMode
()
==
AttachCore
||
q
->
startMode
()
==
AttachExternal
)
{
// nothing to do
}
else
if
(
q
->
startMode
()
==
Attach
Remote
)
{
}
else
if
(
q
->
startMode
()
==
Start
Remote
)
{
// nothing to do
}
else
if
(
q
->
m_useTerminal
)
{
m_stubProc
.
stop
();
// We leave the console open, so recycle it now.
...
...
@@ -1495,7 +1495,7 @@ bool GdbEngine::startDebugger()
execCommand
(
_
(
"-file-exec-and-symbols "
)
+
fileName
);
execCommand
(
_
(
"target core "
)
+
coreName
,
CB
(
handleTargetCore
));
qq
->
breakHandler
()
->
removeAllBreakpoints
();
}
else
if
(
q
->
startMode
()
==
Attach
Remote
)
{
}
else
if
(
q
->
startMode
()
==
Start
Remote
)
{
execCommand
(
_
(
"set architecture %1"
).
arg
(
q
->
m_remoteArchitecture
));
qq
->
breakHandler
()
->
setAllPending
();
//QFileInfo fi(q->m_executable);
...
...
src/plugins/debugger/
attach
remotedialog.ui
→
src/plugins/debugger/
start
remotedialog.ui
View file @
9ae53e49
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
Attach
RemoteDialog
</class>
<widget
class=
"QDialog"
name=
"
Attach
RemoteDialog"
>
<class>
Start
RemoteDialog
</class>
<widget
class=
"QDialog"
name=
"
Start
RemoteDialog"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment