Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Seer working with 'avr-gdb'. Can use 'simavr' as a gdbserver. #217

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/SeerGdbLogWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,10 @@ void SeerGdbLogWidget::processText (const QString& text) {
str = text;
}

// Filter escape characters.
str = Seer::filterEscapes(str);

// Remove trailing "\n"
while (str.back() == '\n') {
str.chop(1);
break;
}
// Filter out \n and \t.
// Should probably do something better and expand them.
str.replace("\\t", "");
str.replace("\\n", "");

// Write the string to the log.
textEdit->append(str);
Expand Down
21 changes: 16 additions & 5 deletions src/SeerMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,27 +789,38 @@ void SeerMainWindow::handleShowMessage (QString message, int time) {

void SeerMainWindow::handleText (const QString& text) {

if (text.startsWith("^error,msg=")) {
if (text.startsWith("^error,msg=") || text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) {

// ^error,msg="The program is not being run."
// ^error,msg="ptrace: No such process."
// 3^error,msg="Undefined MI command: symbol-info-variables",code="undefined-command"
// 5^error,msg="No symbol "delta" in current context."
// 5^error,msg="A syntax error in expression, near `'."

QString newtext = Seer::filterEscapes(text); // Filter escaped characters.

// Filter out less important errors.
if (newtext == "^error,msg=\"No registers.\"") {
if (newtext.contains("^error,msg=\"No registers.\"")) {
return;
}

if (newtext == "^error,msg=\"Selected thread is running.\"") {
if (newtext.contains("^error,msg=\"Selected thread is running.\"")) {
return;
}

if (newtext == "^error,msg=\"Cannot inspect Ada tasks when program is not running\"") {
if (newtext.contains("^error,msg=\"Cannot inspect Ada tasks when program is not running\"")) {
return;
}

if (newtext == "^error,msg=\"The current thread has terminated\"") {
if (newtext.contains("^error,msg=\"The current thread has terminated\"")) {
return;
}

if (newtext.contains("^error,msg=\"A syntax error in expression, near ")) {
return;
}

if (newtext.contains("^error,msg=\"No symbol \"")) {
return;
}

Expand Down
6 changes: 6 additions & 0 deletions tests/hellosimavr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.o
*.elf
*.hex
*.pre
*.dep
GNUmakefile
40 changes: 40 additions & 0 deletions tests/hellosimavr/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
dist: xenial
sudo: false

language: python
python:
- 3.6

notifications:
email: false

branches:
except:
- gh-pages

addons:
apt:
packages:
- doxygen
- gcc-avr
- avr-libc

before_install:
- mkdir -p -m 700 ~/.ssh
- base64 -d > ~/.ssh/id_rsa <<<$GH_DEPLOY_KEY
- chmod 400 ~/.ssh/id_rsa

install:
- pip install ghp-import

script:
- make

after_success:
- git remote set-url --push origin [email protected]:larsks/pipower
- make -C docs
- >-
make -C docs publish
PUSH=1
MESSAGE="Update from Travis build $TRAVIS_BUILD_NUMBER ($TRAVIS_COMMIT)"
Loading
Loading