Age | Commit message (Collapse) | Author | Files | Lines |
|
GCC PR 66827 reports some problems with left shifting a negative
value:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66827
Of the problems reported only two remain - in libiberty/regex.c:
libiberty/regex.c:6970:11: runtime error: left shift of negative value -1
libiberty/regex.c:7165:4: runtime error: left shift of negative value -1
The patch below fixes these errors by casting the value to be shifted
to unsigned before the shift occurs.
No regressions were found in the libiberty testsuite or bootstrapping
gcc (on an x86_64 target).
|
|
There has never been a GNU/sim port for the S+Core architecture.
It was added to support private code that has (and most likely
never will) see the light of day [1]. Punt this as we don't do
this for other people. If you want to maintain a proprietary
internal build, then that's not really our problem.
[1] https://sourceware.org/ml/gdb-patches/2009-03/msg00390.html
|
|
There's no need, or desire, to call sim_load_file from sim_open. The
higher levels (gdb/run) take care of calling sim_load for us already.
|
|
The output should largely be the same.
|
|
|
|
The output format is a bit different, but the new form matches all the
other trace lines. Otherwise, it should be functionally equivalent.
|
|
Some targets have started to add support for calling the disassembler
automatically when executing code. Add support for that directly into
the trace core.
|
|
|
|
ld * emulparams/msp430elf.sh (RAM_START): Move to 0x500 - above the
MSP430 hardware multiply address range.
* scripttempl/elf32msp430.sc (__romdatastart): Define.
(__romdatacopysize): Define.
* scripttempl/elf32msp430_3.sc: Likewise.
tests * testutils.inc (__pass): Use the LMA addresses of the _passmsg
symbol.
(__fail): Likewise.
|
|
gdb/ChangeLog:
PR sim/13418
* rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
of WITH_SIM.
|
|
Multitarget builds currently fail when:
(1) simulator support is enabled (the main --target supports target sim)
(2) powerpc is included in the --enable-targets list
(3) powerpc is not the main/default target (--target)
This is because the powerpc sim provides a non-standard API function
sim_spr_register_name which gdb/rs6000-tdep.c utilizes. Since the sim
does not yet support multitarget, only the sim (if one exists) for the
main target is built. When that target isn't powerpc, this function
is not available leading to linking errors:
rs6000-tdep.c:(.text+0x1e34d): undefined reference to
`sim_spr_register_name'
Fix this by only using that API if the sim linked in is the powerpc
sim.
gdb/ChangeLog:
2016-01-05 Pedro Alves <palves@redhat.com>
PR sim/13418
* configure.ac: Define WITH_PPC_SIM when linking in the sim and
the target is powerpc*.
* configure: Regenerate.
* config.in: Regenerate.
|
|
|
|
Import defines from gdb/defs.h to the sim core so we can delete the
various copies that already exist.
|
|
The simulator is including syscall.h which is not standard and apparently
not required (builds correctly without it on my machine).
|
|
|
|
ld/
* emultempl/mipself.em (PARSE_AND_LIST_PROLOGUE): Convert
OPTION_INSN32 and OPTION_NO_INSN32 macros to an enum.
|
|
Factor out the parts of `_bfd_mips_elf_merge_private_bfd_data'
responsible for ABI flag merging to `mips_elf_merge_obj_abiflags'. No
functional change.
bfd/
* elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
factored out from...
(_bfd_mips_elf_merge_private_bfd_data): ... here.
|
|
We have a problem in that in making compatibility checks while merging
private BFD data on the MIPS target we give priority to the attribute
check, which may fail and cause the function to abort early on. The
problem with this is the ABI compatibility aspect recorded in the
attributes is relatively minor compared to aspects recorded in the ELF
file header. However the premature exit causes any more important
compatibility aspect violated to be masked and not reported to the user
once a problem with attributes has been noticed.
So move the attribute check after the ELF file header flag check in
`_bfd_mips_elf_merge_private_bfd_data', and do not return prematurely
there. Take advantage of the resulting grouping of ELF file header
handling together and remove the premature success return point for the
first input object being handled, letting the code later on figure out
output ABI flags even for this object.
Update LD test cases according to messages from ELF file header checks
now preceding ones from attribute checks.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
attribute check after ELF file header flag check.
ld/
* testsuite/ld-mips-elf/attr-gnu-4-14.d: Update the order of
messages expected according to MIPS BFD private data merge
changes.
* testsuite/ld-mips-elf/attr-gnu-4-24.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-34.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-41.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-42.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-43.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-45.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-46.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-47.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-48.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-49.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-54.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-64.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-74.d: Likewise.
|
|
Fix the issue of any failure from `_bfd_elf_merge_object_attributes' not
being propagated by `mips_elf_merge_obj_attributes'.
bfd/
* elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
return status from `_bfd_elf_merge_object_attributes'.
|
|
Factor out the parts of `_bfd_mips_elf_merge_private_bfd_data'
responsible for ELF file header flag compatibility checks to
`mips_elf_merge_obj_e_flags'. As a side effect remove a premature
return point from `_bfd_mips_elf_merge_private_bfd_data'. No functional
change otherwise.
bfd/
* elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
factored out from...
(_bfd_mips_elf_merge_private_bfd_data): ... here.
|
|
Fold the handling of input MIPS ABI flags in private BFD data merging
together, moving the attribute check afterwards, and consequently making
input vs output compatibility checks only start once all input ABI flag
data has been gathered, checked for inconsistencies and put in order.
Consequently also address the issue of input ABI flag inconsistencies
being masked by a failing attribute check, which currently makes
`_bfd_mips_elf_merge_private_bfd_data' exit prematurely and therefore
prevent input ABI flag inconsistencies from being reported. Such
inconsistencies need to be reported as they may be the very cause of an
attribute check failure.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
handling of input MIPS ABI flags together.
|
|
We currently special-case the handling of attribute checks on input
objects and make them even before we check a given input object actually
contains any sections. This does not add value as empty objects do not
cause a compatibility concern and we already make this observation for
other properties such as ELF file header flags. Moreover the attributes
themselves are stored in a `.gnu.attributes' section so the absence of
any section (except from a few special cases) implies there have been no
attributes provided either. Therefore it is safe to move the attribute
checks later on, after the null-section check has been made.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
attribute checks for null input.
|
|
Use local pointers to target data to reduce the amount of indirection
and improve the readability of `_bfd_mips_elf_merge_private_bfd_data'.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
pointers to target data.
|
|
Correct a warning produced on any FP ABI mismatch observed. Unlike the
other settings, which in the presence of `.MIPS.abiflags' are duplicated
in the `e_flags' member of the ELF file header, information on the FP
ABI in use is duplicated in `.gnu.attributes' rather than in the former
place. Update the warning message accordingly.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
an FP ABI warning.
|
|
The cris sim hit a few failures after the recent getopt logic, and the
expected output showed a few ways we can improve things to better match
other utils.
|
|
The compiler/C library should produce reasonable code for htonl/ntohl,
and at least glibc tries pretty hard to always produce good code for
them. This logic only had support for 32-bit x86 systems anymore, and
it's unlikely people were even opting into this, so drop it all.
|
|
The compiler should produce reasonable code here in general, so punt the
various arch checks and bswap defines. This code will eventually go away
entirely when we convert it to the common memory code.
|
|
In btrace_pt_readmem_callback, we read memory inside TRY/CATCH and return in
case of an error return value. This corrupts the cleanup chain, which
eventually results in a SEGV when doing or discarding cleanups later on.
gdb/
* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
testsuite/
* gdb.btrace/dlopen.exp: New.
* gdb.btrace/dlopen.c: New.
* gdb.btrace/dlopen-dso.c: New.
|
|
Fix a long standing todo where we let getopt write directly to stderr
when an invalid option is passed. Use the sim io funcs instead as they
go through the filtered callbacks that gdb wants.
|
|
We're maintaining development docs in the wiki now:
https://sourceware.org/gdb/wiki/Sim/TODO
|
|
|
|
Clean up some more remains of WITH_DEVICES that escaped notice.
We also clean up GETTWI/SETTWI defines in a few ports where they
were copied & pasted and are unused as they happen to be near the
device code.
|
|
A bunch of places open code the countargv implementation, or outright
duplicate it (as count_argc). Replace all of those w/countargv.
|
|
|
|
The --enable-sim-hostendian flag was purely so people had an escape route
for when cross-compiling. This is because historically, AC_C_BIGENDIAN
did not work in those cases. That was fixed a while ago though, so we can
require that macro everywhere now and simplify a good bit of code.
|
|
Rather than re-invent endian defines, as well as maintain our own list
of OS & arch-specific includes, punt all that logic in favor of the bfd
ones already set up and maintained elsewhere. We already rely on the
bfd library, so leveraging the endian aspect should be fine.
|
|
|
|
The sim-io module provides output helpers, so no need to define local
ones anymore.
|
|
The iq2000/m32r/sh64 option parsing logic appears to have always been
dead. At least iq2000/sh64 are simply copy & paste rot from m32r.
The lm32 option parsing hack here hasn't been needed for a while -- this
was fixed back in commit 11409fac6b95d71a92848a4499b02d60a4f4c5bb in the
common code.
|
|
The global current_state handle to the current simulator state is a
design idea that was half implemented, but never really cleaned up.
The point was to have a global variable pointing to the state so that
funcs could more quickly & easily access the state anywhere. We've
instead moved in the direction of passing state around everywhere and
don't have any intention of moving back.
I also can't find any references to gdb using this variable, or to
cgen related "dump_regs" functions, both of which were used in the
comments related to this code.
|
|
We don't do this for other ppc targets in this file (we assume the sim
subdir exists), and it has existed for over a decade at this point.
|
|
When connecting to the simulator in gdb, we don't want it to exit on
us when we pass down unknown/invalid/help/etc... options. Plumb down
the kind argument so we can handle both gdb & psim interfaces.
|
|
|
|
|
|
Note that this does not create bfd/doc/ChangeLog, */testsuite/ChangeLog
and include/*/ChangeLog files.
|
|
|
|
gdb/ChangeLog:
Update year range in copyright notice of all files.
|
|
gdb/ChangeLog:
* top.c (print_gdb_version): Change copyright year in version
message.
gdb/gdbserver/ChangeLog:
* gdbreplay.c (gdbreplay_version): Change copyright year in
version message.
* server.c (gdbserver_version): Likewise.
|
|
Per GDB the "Start of New Year Procedure", this patch
- renames the current ChangeLog into ChangeLog-2015;
- starts a new ChangeLog file.
gdb/ChangeLog:
* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
|
|
|