[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Simulavr-devel] Crash after entering 'target remote localhost:1212'
From: |
Joerg Wunsch |
Subject: |
Re: [Simulavr-devel] Crash after entering 'target remote localhost:1212' in avr-gdb |
Date: |
Tue, 2 Feb 2016 08:04:30 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
As Thomas K wrote:
> I think, we should proceed, like Jörg proposed. E.g. send back an error
> message instead of aborting simulavr. As I have seen, all
> avr_core_flash_... methods (in cmd/gdbserver.cpp) have the same
> behaviour - aborting!
Btw., I'd strongly recommend using C++ exceptions for that kind
of stuff. After all, you're using C++, so it makes sense to use
the features it offers.
I've switched AVaRICE to using exceptions some years ago, and it
helped to make the code much cleaner, because you don't have to
manually add error-handling upon each function call. When
detecting an exceptional situation, simply throw the exception,
and “somewhere upstairs”, some code is going to handle it.
--
cheers, Joerg .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)