Commit Graph

3 Commits

Author SHA1 Message Date
Tom Tromey a8a5dbcab8 Do not accidentally include in-tree readline headers
PR build/17077 points out that when --with-system-readline is given,
gdb will still pick up the in-tree readline headers.  Normally this is
not a big problem, because readline is very stable and so the ABI does
not change much; but it is clearly a bug to do this, and could bite at
some point.

The basic problem is that OPCODES_CFLAGS uses -I$(OPCODES_SRC)/..  so
that #include "opcodes/..." works.  However, this also makes it so the

This patch fixes the problem in a mildly hacky way: remove the
offending -I option, and change gdb to use #include "../opcodes/..."
instead.  This continues to make it clear where the header comes from,
without allowing incorrect behavior.

Tested by rebuilding and then looking at the *.Po files.

gdb/ChangeLog
2018-10-06  Tom Tromey  <tom@tromey.com>

	PR build/17077:
	* Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
	* arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
	microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
	#include.
2018-10-06 22:46:56 -06:00
Joel Brobecker e2882c8578 Update copyright year range in all GDB files
gdb/ChangeLog:

        Update copyright year range in all GDB files
2018-01-02 07:38:06 +04:00
Franck Jullien a994fec4f8 gdb: Add OpenRISC or1k and or1knd target support
This patch prepares the current GDB port of the OpenRISC processor from
https://github.com/openrisc/binutils-gdb for upstream merging.

Testing has been done with a cgen sim provided in a separate patch. This
has been tested with 2 toolchains. GCC [1] 5.4.0 from the OpenRISC
project with Newlib [2] and GCC 5.4.0 with Musl [3] 1.1.4.

It supports or1knd (no delay slot target).
The default target is or1k (with delay slot).

You can change the target arch with:

(gdb) set architecture or1knd
The target architecture is assumed to be or1knd

[1] https://github.com/openrisc/or1k-gcc
[2] https://github.com/openrisc/newlib
[3] https://github.com/openrisc/musl-cross

gdb/doc/ChangeLog:

2017-12-12  Stafford Horne  <shorne@gmail.com>
	    Stefan Wallentowitz  <stefan@wallentowitz.de>
	    Franck Jullien  <franck.jullien@gmail.com>
	    Jeremy Bennett  <jeremy.bennett@embecosm.com>

	* gdb.texinfo: Add OpenRISC documentation.

gdb/ChangeLog:

2017-12-12  Stafford Horne  <shorne@gmail.com>
	    Stefan Wallentowitz  <stefan@wallentowitz.de>
	    Stefan Kristiansson  <stefan.kristiansson@saunalahti.fi>
	    Franck Jullien  <franck.jullien@gmail.com>
	    Jeremy Bennett  <jeremy.bennett@embecosm.com>

	* configure.tgt: Add targets for or1k and or1knd.
	* or1k-tdep.c: New file.
	* or1k-tdep.h: New file.
	* features/Makefile: Add or1k.xml to build.
	* features/or1k.xml: New file.
	* features/or1k-core.xml: New file.
	* features/or1k.c: Generated.
2017-12-12 23:36:00 +09:00