target/stm8: add support for multi-architecture gdb 53/4753/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Thu, 1 Nov 2018 11:07:03 +0000 (12:07 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Tue, 8 Jan 2019 09:58:17 +0000 (09:58 +0000)
commit97afb8b37229d6a140aaa81a3c71122e5d862296
treeb5e4aef34e079bbb609593a8b3f69d928ee5c70d
parent49bd64347a21f5e12b33c256171b3035126d1260
target/stm8: add support for multi-architecture gdb

GDB can be built for multi-architecture through the command
./configure --enable-targets=all && make
Such multi-architecture GDB requires the target's architecture to
be selected either manually by the user through the GDB command
"set architecture" or automatically by the target description sent
by the remote target (i.e. OpenOCD).

Commit e65acd889c61a424c7bd72fdee5d6a3aee1d8504 ("gdb_server: add
support for architecture element") already provides the required
infrastructure to support multi-architecture gdb.

The gdb patches for stm8 are still not merged in the official
repository and are temporarily hosted in
https://stm8-binutils-gdb.sourceforge.io/
The latest patch set
stm8-binutils-gdb-sources-2018-03-04.tar.gz
define only one possible value ("stm8") for this architecture; it
can be displayed typing "set architecture " followed by a TAB for
autocompletion in gdb for stm8.

Set the gdb architecture value for stm8 to "stm8".

Change-Id: I643ceba662de46cecf061d1dc672b9178a077f1b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4753
Tested-by: jenkins
Reviewed-by: Ake Rehnman <ake.rehnman@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/stm8.c