Commit Graph

118 Commits

Author SHA1 Message Date
Tobias Hunger
592e494d1a Fix typos
Reviewed-by: thorbjorn
2010-01-11 10:26:13 +01:00
hjk
e3712f9687 debugger: refactoring, use QByteArray instead of QString when appropriate 2010-01-05 18:13:24 +01:00
hjk
9ad447b8a4 debugger: make gdb-6.8-symbianelf work 2010-01-04 13:16:46 +01:00
hjk
1324a1c600 debugger: gracefully handle commands that might not produce output 2009-12-11 18:00:37 +01:00
hjk
2548779d1f debugger: Remove EmbedToken fglag for gdb commands.
The token is not needed anymore.
2009-12-11 18:00:36 +01:00
hjk
bf077800b8 debugger: make watchdog timeout configurable 2009-12-09 17:41:59 +01:00
hjk
8c52f5720c debugger: make use of full source file list optional 2009-12-09 13:52:12 +01:00
hjk
f2392ffbc0 debugger: allow the user to hide the std:: and Qt's namespace 2009-11-25 13:46:33 +01:00
Oswald Buddenhagen
5976b1ba43 actively try to obtain PID of non-pthread inferiors with gdb < 7 on linux
Reviewed-by: hjk
2009-11-10 13:02:33 +01:00
Oswald Buddenhagen
0ae60ba412 add timeout handling for gdb commands
sometimes, commands simply don't return ...

the debug message doesn't say anything which couldn't be found in the
log already, but that way it is more convenient.

and we kill gdb to get creator back to a defined state.

Reviewed-by: hjk
2009-11-03 18:20:43 +01:00
Friedemann Kleint
10e07e01c7 Debugger: Use LD_PRELOAD to load debugging helper.
on UNIX. Either set the LD_PRELOAD environment variable
using a gdb command or have the TermGdbAdapter set the
variable for the debuggee. For the remote adapter,
switch on toolchain. dlopen() is a fallback for
platforms where it is not supported and attaching
to running processes. Fixes a crash with gdb 7.0
(and spurious gdb 6.8 crashes with dlopen()).
Reviewed-by: hjk <qtc-committer@nokia.com>
2009-11-03 14:06:21 +01:00
Oswald Buddenhagen
a4f2396323 fix shutdowns triggered while inferior is not stopped
Reviewed-by: hjk
2009-11-02 17:13:47 +01:00
Oswald Buddenhagen
e2d468312c flush queued commands on non-fatal continuation failures
Reviewed-By: hjk
2009-11-02 17:13:46 +01:00
Oswald Buddenhagen
151b785d01 terminal adapter: make skipping of initial SIGSTOPs more reliable
first, _start being resolvable depends on libc-dbg being installed.
second, depending on the frame being in the dynloader makes it
a) work only for dynamic executables and b) fail on multi-target
systems (due to a hard-coded file name).
so instead just remember the entry point, as we are already there
anyway.

Reviewed-By: hjk
2009-10-30 17:47:51 +01:00
hjk
50961cb98d debugger: list registers only after we have a known target 2009-10-30 16:46:33 +01:00
Oswald Buddenhagen
7713fc514b do not post source & module list query commands too early
if the respective view is enabled, the manager will request the
initial update in some unholy state, probably AdapterStarting -
when gdb isn't up yet.
2009-10-29 15:34:01 +01:00
Oswald Buddenhagen
658f439398 missed some functions while marking iface impls with virtual 2009-10-29 15:34:00 +01:00
Oswald Buddenhagen
0c0925b69c couple breakpoint listing with source listing
the assumption is that pending breakpoints will only be resolved when
the source list changes. consequently it is pointless to update just
one of them.
2009-10-29 15:34:00 +01:00
Oswald Buddenhagen
eee5e4b18b integrate handleStop2 into handleStop1
there seems to be no reason for delaying the display because
of -break-list
2009-10-29 15:34:00 +01:00
Oswald Buddenhagen
76b2f9f28e make sure that symgdb 6.4 "fullnames" are fully normalized 2009-10-29 15:34:00 +01:00
Oswald Buddenhagen
0ee09af63a eliminate handleDebuggingHelperValue1()
doesn't seem to serve any purpose at this time.
2009-10-27 20:21:59 +01:00
Oswald Buddenhagen
9b4e6512e0 protect against recursing into handleResponse
those pesky nested event loops ...

i pondered various other scenarios (in particular, the adapter or
gdb crashing while the nested loop is running), but did not discover
serious side effects of it, so i'm not trying to handle it specially.
2009-10-27 20:21:59 +01:00
hjk
05e56fc1a3 debugger: prevent endless recursion due to broken dumpers 2009-10-27 16:36:23 +01:00
Friedemann Kleint
93759263d0 S60/Debugger: Add Bluetooth starter to Debugger
- Remove old rfcomm process handler from TrkGdbAdapter, use
  Bluetooth starter instead
- Synchronous connection, remove waitForTrkConnect()
- Move gdb start into Trk version answer, pass on
  settings id hint
- Prevent exit crash triggered by signal gdbProcessFinished()
- Set DebuggerNotReady correctly on AdapterStartFailed when no
  gdb is started yet
2009-10-26 11:55:02 +01:00
Oswald Buddenhagen
c0a46ace61 improve breakpoint setting
first, try harder to have an up-to-date sources list.
then, use the mapping whenever applicable and available.
2009-10-23 22:01:14 +02:00
Oswald Buddenhagen
31818acb11 eliminate desperate attempts to keep short-long filename mapping complete
*in theory*, there is no way we could at any point know more than gdb
knows and tells us about full path names. let's see what practice shows
for the gdbs we support ...
2009-10-23 22:01:13 +02:00
Oswald Buddenhagen
087733e5d5 avoid copy of GdbResponse struct 2009-10-23 22:01:13 +02:00
Oswald Buddenhagen
5b01cbcb2b run-time detection of apple gdb
in theory, we should support fsf gdb on apple now.
this also cleans and documents some execution paths.
2009-10-22 20:12:00 +02:00
Oswald Buddenhagen
ad092d11d5 re-add debug-in-terminal in form of a new gdb adapter 2009-10-20 11:26:55 +02:00
Oswald Buddenhagen
3dc1e31deb fix initial breakpoint setting
as it turns out, it is not possible to set pending breakpoints until
gdb has loaded as image. so add some hooks to enable adapters to trigger
the initial breakpoint syncing at the right time. do not add additional
states (say, InferiorPreparing), as it would just complicate things.
2009-10-20 11:26:55 +02:00
Oswald Buddenhagen
b3addf14f1 fix shutdown paths
this includes:
- move the gdb ownership back to the engine (thus strip down the
  adaptors as far as possible)
- make gdb startup synchronous
- make adapter shutdown synchronous
- fix the state transitions relating to shutdown
2009-10-20 11:26:55 +02:00
Oswald Buddenhagen
e0a0aebbae group declarations logically 2009-10-20 11:26:55 +02:00
Oswald Buddenhagen
0e398303cc remove dead code 2009-10-20 11:26:55 +02:00
Friedemann Kleint
25ee70bb24 Debugger: Use the code model to detect unitialized variables.
This should save debugger round trips and crashes in the debugging
helpers.
Add respective option to debugging helper option page, defaulting to
true.On this occasion, make CDB detect shadowed variables correctly
and display them as "<shadowed n>" as does the Gdb engine by
reversing the direction in which
CdbSymbolGroupContext::populateINameIndexMap works.
Rubber-stamped-by: hjk <qtc-committer@nokia.com>
2009-10-16 16:26:28 +02:00
hjk
fa71a4879c debugger: work on autotests 2009-10-14 10:02:07 +02:00
Oswald Buddenhagen
70f696d056 -gdb-exit has a special return code as well 2009-10-13 20:43:13 +02:00
Oswald Buddenhagen
d1783e0974 fold preparing inferior into starting inferior
after refactoring the trk adapter startup, the split was not necessary
any more. in fact, it seemed fairly arbitrary at this point.
2009-10-13 20:43:12 +02:00
Oswald Buddenhagen
a2cc84194f remove dead code 2009-10-13 20:43:12 +02:00
Oswald Buddenhagen
7782e26ae6 comment out handleExecRunToFunction()
it is currently unused. do not just remove it, as hjk says he wants to
revive it.
2009-10-13 20:42:11 +02:00
Oswald Buddenhagen
68c2156f6f add docu to GdbCommandFlag values 2009-10-12 14:56:35 +02:00
Oswald Buddenhagen
a1a8f6adcb centralize gdb command result class checking
each command can have only one of two legitimate responses: "error" or -
depending on the command, and thus declared via a flag - "done" or
"running".
this is way nicer than sprinkling the code with else-ifs (where elses
are sufficient) and asserts all over the place - and silently failing in
release builds.
2009-10-12 14:56:35 +02:00
hjk
7e3d954195 debugger: work on a "synchroneous" mode
For the case that gdb can give all the interesting data in one go.
2009-10-12 14:51:23 +02:00
Oswald Buddenhagen
8e6d25d14a centralize gdb comm log queuing
this drastically improves the usefulness of the debugger output window
by making internal and external messages appear in sync.
2009-10-09 16:36:58 +02:00
Oswald Buddenhagen
9ae0575ae2 add central GdbEngine::handleInferiorPidChanged()
fixes build
2009-10-09 13:39:27 +02:00
Oswald Buddenhagen
1610c14d22 make direct call of handleStop1() more elegant 2009-10-09 13:01:51 +02:00
Oswald Buddenhagen
21314b78d9 rename handleAsyncOutput() => handleStopResponse() 2009-10-09 13:01:50 +02:00
Oswald Buddenhagen
0eca150031 debug output: don't claim "continuing after temporary stop" if we are not 2009-10-09 13:01:50 +02:00
Friedemann Kleint
22ab8d5662 Debugger: Do configuration error checking early on.
Add a configuration checking method to the Debugger manager,
depending on toolchain, wire it to the engines.
Check that in the debugger run controls.

Add a convenience method to ICore that shows a warning
message with a "Settings" button, pointing the user
to a configuration error on a settings page.

Remove leftovers of the dumper parser.
Acked-by: con <qtc-committer@nokia.com>
2009-10-08 17:23:27 +02:00
Oswald Buddenhagen
aa97f43a92 rename m_continuationAfterDone => m_commandsDoneCallback for clarity 2009-10-08 12:43:48 +02:00
Oswald Buddenhagen
ccf4fe9a5f use gdb's target stream output
at least in theory, this is the output of a remote debuggee
2009-10-08 12:18:03 +02:00