Skip to content

Commit

Permalink
Fixed Seer working with 'avr-gdb'. Can use 'simavr' as a gdbserver.
Browse files Browse the repository at this point in the history
  • Loading branch information
epasveer committed Jan 2, 2024
1 parent add9552 commit 00e5b71
Show file tree
Hide file tree
Showing 37 changed files with 29,256 additions and 13 deletions.
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

0 comments on commit 00e5b71

Please sign in to comment.