Commit b3d9719d authored by mae's avatar mae
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents cb6f0dfb 61eadde6
......@@ -85,7 +85,7 @@ namespace Internal {
using namespace Debugger::Constants;
//#define DEBUG_PENDING 1
//#define DEBUG_SUBITEM 1
#define DEBUG_SUBITEM 1
#if DEBUG_PENDING
# define PENDING_DEBUG(s) qDebug() << s
......@@ -1283,6 +1283,9 @@ void GdbEngine::reloadStack()
if (stackDepth && !m_gdbAdapter->isAdapter())
cmd += _(" 0 ") + QString::number(stackDepth);
postCommand(cmd, WatchUpdate, CB(handleStackListFrames), false);
// FIXME: gdb 6.4 likes to be asked twice
if (m_gdbAdapter->isAdapter())
postCommand(cmd, WatchUpdate, CB(handleStackListFrames), false);
}
void GdbEngine::handleAsyncOutput2(const GdbResultRecord &, const QVariant &cookie)
......@@ -3767,6 +3770,16 @@ void GdbEngine::setLocals(const QList<GdbMi> &locals)
// pass through the insertData() machinery
if (isIntOrFloatType(data.type) || isPointerType(data.type))
setWatchDataValue(data, item.findChild("value"));
if (isSymbianIntType(data.type)) {
setWatchDataValue(data, item.findChild("value"));
data.setHasChildren(false);
}
// Let's be a bit more bold:
//if (!hasDebuggingHelperForType(data.type)) {
// QByteArray value = item.findChild("value").data();
// if (!value.isEmpty() && value != "{...}")
// data.setValue(decodeData(value, 0));
//}
if (!qq->watchHandler()->isExpandedIName(data.iname))
data.setChildrenUnneeded();
if (isPointerType(data.type) || data.name == __("this"))
......
......@@ -50,7 +50,7 @@
# include <unistd.h>
#endif
enum { TimerInterval = 100 };
enum { TimerInterval = 10 };
#ifdef Q_OS_WIN
......
......@@ -66,7 +66,7 @@ namespace Debugger {
namespace Internal {
static const QString strNotInScope =
QCoreApplication::translate("Debugger::Internal::WatchData", "<not in scope>");
QCoreApplication::translate("Debugger::Internal::WatchData", "<not in scope>");
static int watcherCounter = 0;
static int generationCounter = 0;
......
......@@ -339,6 +339,13 @@ bool isIntType(const QString &type)
return types.contains(type);
}
bool isSymbianIntType(const QString &type)
{
static const QStringList types = QStringList()
<< QLatin1String("TInt") << QLatin1String("TBool");
return types.contains(type);
}
bool isIntOrFloatType(const QString &type)
{
static const QStringList types = QStringList()
......
......@@ -73,6 +73,7 @@ bool extractTemplate(const QString &type, QString *tmplate, QString *inner);
QString extractTypeFromPTypeOutput(const QString &str);
bool isIntOrFloatType(const QString &type);
bool isIntType(const QString &type);
bool isSymbianIntType(const QString &type);
enum GuessChildrenResult { HasChildren, HasNoChildren, HasPossiblyChildren };
GuessChildrenResult guessChildren(const QString &type);
......
......@@ -428,7 +428,7 @@ bool JavaScriptParser::parse(JavaScriptEnginePrivate *driver)
_Lcheck_token:
if (yytoken == -1 && -TERMINAL_COUNT != action_index[action]) {
yyprevlloc = yylloc;
yyprevlloc = yylloc;
if (first_token == last_token) {
yytoken = lexer->lex();
......@@ -2119,7 +2119,12 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
token_buffer[1].loc = yylloc = location(lexer);
if (t_action(errorState, yytoken)) {
const QString msg = QString::fromUtf8("Removed token: `%1'").arg(spell[token_buffer[0].token]);
QString msg = QString::fromUtf8("Removed token");
if (const char *tokenSpell = spell[token_buffer[0].token]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
......@@ -2149,7 +2154,12 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
int a = t_action(errorState, *tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Inserted token: `%1'").arg(spell[*tk]);
QString msg = QString::fromUtf8("Inserted token");
if (const char *tokenSpell = spell[*tk]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
......@@ -2169,7 +2179,13 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
for (int tk = 1; tk < TERMINAL_COUNT; ++tk) {
int a = t_action(errorState, tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Inserted token: `%1'").arg(spell[tk]);
QString msg = QString::fromUtf8("Inserted token");
if (const char *tokenSpell = spell[tk]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
......@@ -2182,7 +2198,13 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
}
}
const QString msg = QString::fromUtf8("Unexpected token: `%1'").arg(spell[token_buffer[0].token]);
QString msg = QString::fromUtf8("Unexpected token");
if (const char *tokenSpell = spell[token_buffer[0].token]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
}
......
// This file was generated by qlalr - DO NOT EDIT!
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** This file is part of the $MODULE$ of the Qt Toolkit.
**
** $TROLLTECH_DUAL_LICENSE$
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#include "javascriptgrammar_p.h"
const char *const JavaScriptGrammar::spell [] = {
......
......@@ -132,7 +132,7 @@ bool JavaScriptParser::parse(JavaScriptEnginePrivate *driver)
_Lcheck_token:
if (yytoken == -1 && -TERMINAL_COUNT != action_index[action]) {
yyprevlloc = yylloc;
yyprevlloc = yylloc;
if (first_token == last_token) {
yytoken = lexer->lex();
......@@ -1123,7 +1123,12 @@ case 266: {
token_buffer[1].loc = yylloc = location(lexer);
if (t_action(errorState, yytoken)) {
const QString msg = QString::fromUtf8("Removed token: `%1'").arg(spell[token_buffer[0].token]);
QString msg = QString::fromUtf8("Removed token");
if (const char *tokenSpell = spell[token_buffer[0].token]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
......@@ -1153,7 +1158,12 @@ case 266: {
for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
int a = t_action(errorState, *tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Inserted token: `%1'").arg(spell[*tk]);
QString msg = QString::fromUtf8("Inserted token");
if (const char *tokenSpell = spell[*tk]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
......@@ -1173,7 +1183,13 @@ case 266: {
for (int tk = 1; tk < TERMINAL_COUNT; ++tk) {
int a = t_action(errorState, tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Inserted token: `%1'").arg(spell[tk]);
QString msg = QString::fromUtf8("Inserted token");
if (const char *tokenSpell = spell[tk]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
......@@ -1186,7 +1202,13 @@ case 266: {
}
}
const QString msg = QString::fromUtf8("Unexpected token: `%1'").arg(spell[token_buffer[0].token]);
QString msg = QString::fromUtf8("Unexpected token");
if (const char *tokenSpell = spell[token_buffer[0].token]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment