aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-04sim: d10v: gut endian logicMike Frysinger2-77/+5
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.
2016-01-04btrace: do not return out of TRY/CATCHMarkus Metzger6-4/+139
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.
2016-01-03sim: parse_args: display getopt error ourselvesMike Frysinger44-64/+138
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.
2016-01-03sim: TODO: move to wikiMike Frysinger6-71/+12
We're maintaining development docs in the wiki now: https://sourceware.org/gdb/wiki/Sim/TODO
2016-01-04Automatic date update in version.inGDB Administrator1-1/+1
2016-01-03sim: clean up some more device detritusMike Frysinger13-53/+26
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.
2016-01-03sim: use libiberty countargv in more placesMike Frysinger12-65/+44
A bunch of places open code the countargv implementation, or outright duplicate it (as count_argc). Replace all of those w/countargv.
2016-01-03sim: nrun: use lbasenameMike Frysinger2-5/+9
2016-01-03sim: drop host endian configure optionMike Frysinger96-5871/+6648
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.
2016-01-03sim: convert to bfd_endianMike Frysinger90-699/+712
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.
2016-01-03Automatic date update in version.inGDB Administrator1-1/+1
2016-01-02sim: cris: use standard output helpersMike Frysinger2-35/+14
The sim-io module provides output helpers, so no need to define local ones anymore.
2016-01-02sim: iq2000/m32r/lm32/sh64: delete dead option codeMike Frysinger8-55/+18
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.
2016-01-02sim: delete dead current_state globalsMike Frysinger19-86/+42
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.
2016-01-02gdb: ppc: drop unnecessary sim file checkMike Frysinger2-3/+6
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.
2016-01-02sim: ppc: do not exit when parsing args w/gdbMike Frysinger5-22/+50
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.
2016-01-02Automatic date update in version.inGDB Administrator1-1/+1
2016-01-01Copyright update for binutilsAlan Modra2547-2648/+2683
2016-01-01New 2016 binutils ChangeLog filesAlan Modra9-0/+129
Note that this does not create bfd/doc/ChangeLog, */testsuite/ChangeLog and include/*/ChangeLog files.
2016-01-01binutils ChangeLog rotationAlan Modra22-0/+0
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker4743-4753/+4757
gdb/ChangeLog: Update year range in copyright notice of all files.
2016-01-01update copyright year printed by GDB, GDBserver and gdbreplay.Joel Brobecker5-3/+14
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.
2016-01-01Rotate the GDB ChangeLogJoel Brobecker3-14475/+14489
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.
2016-01-01Automatic date update in version.inGDB Administrator1-1/+1
2015-12-31opcodes/arc: Support dmb instruction with no operandsAndrew Burgess2-0/+8
In this GCC commit: https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00735.html GCC started emitting dmb instructions with no operands. The intention was that dmb with no operands should be an alias for 'dmb 0'. The following patch extends the arc opcodes library to support dmb with no operands. opcodes/ChangeLog: * arc-tbl.h (dmb): Add a no operand version of dmb.
2015-12-30sim: m68hc11: fix default endianMike Frysinger3-2/+7
The previous commit here set the default to little instead of big. A typo lost when reviewing the different targets in parallel.
2015-12-30sim: cris/m68hc11: move default endian/alignment to configureMike Frysinger8-14/+115
2015-12-31Automatic date update in version.inGDB Administrator1-1/+1
2015-12-30sim: h8300: inline sim_state_initializeMike Frysinger2-27/+7
All the state is handled already by the common cpu allocation which zeros out the entire state.
2015-12-30sim: h8300: simplify h8300_reg_{fetch,store} funcsMike Frysinger2-53/+29
We can leverage the cpu->regs array rather than going through the function helpers to get nice compact code. Further, fix up the return values: return -1 when we can't find a register (and let the caller write out warnings), return 2/4 when we actually write out that amount, and handle the zero reg.
2015-12-30sim: h8300: switch to common sim-resumeMike Frysinger3-40/+57
2015-12-30sim: h8300: move default endian/alignment to configureMike Frysinger4-6/+112
2015-12-30sim: simplify STATE_MY_NAME setupMike Frysinger2-3/+6
No point in writing basename ourselves when libiberty provides one.
2015-12-30sim: arm/d10v/h8300/m68hc11/microblaze/mips/mn10300/moxie/sh/v850: convert ↵Mike Frysinger20-86/+169
to common sim_{fetch,store}_register
2015-12-30sim: h8300: move unused/buggy lregs arrayMike Frysinger2-4/+5
This array isn't used anywhere, and the init phase actually corrupts some memory because the array has 18 elements but tries to set the 19th (ZERO) position.
2015-12-30sim: h8300: drop unused inst.hMike Frysinger3-104/+5
We can also drop the compile.o rule since the common dep generation logic takes care of this for us.
2015-12-30Fix assorted ChangeLog errorsAlan Modra15-534/+546
2015-12-29sim: ppc: track closed state of file descriptors 0, 1, and 2.Kevin Buettner3-22/+151
This change tracks the "closed" state of file descriptors 0, 1, and 2, introducing the function fdbad() to emul_netbsd.c and emul_unix.c. Note that a function of the same name and purpose exists in sim/common/callback.c. This patch eliminates all of the "unresolved testcases" when testing GDB against the powerpc simulator. This occurs because the powerpc simulator closes, on behalf of the testcase, the file descriptors associated with stdin, stdout, and stderr. GDB still needs these descriptors to communicate with the user or, in this case, with the testing framework.
2015-12-30Automatic date update in version.inGDB Administrator1-1/+1
2015-12-29Automatic date update in version.inGDB Administrator1-1/+1
2015-12-28Use libiberty's crc32 implementation in gdbserverPatrick Palka2-20/+6
Tested on x86_64-pc-linux-gnu native-gdbserver, no new regressions. gdb/gdbserver/ChangeLog: * server.c (crc32_table): Delete. (crc32): Use libiberty's xcrc32 function.
2015-12-28Automatic date update in version.inGDB Administrator1-1/+1
2015-12-27Correct nios2 _gp address computation.Sandra Loosemore2-10/+28
2015-12-27 Sandra Loosemore <sandra@codesourcery.com> bfd/ * elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp address. (nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error messages.
2015-12-27sim: aarch64/msp430: fix disassembler usageMike Frysinger4-4/+14
The disasm framework reserves the private_data field for the disassemblers themselves, not for people who use the disassembler. Instead, there is an application_data field for callers such as the sim. Switch to it to avoid random corruption/crashes when the disassemblers use private_data.
2015-12-27sim: unify sim-hloadMike Frysinger46-67/+93
Pretty much all targets are using this module already, so add it to the common list of objects. The only oddball out here is cris and that's because it supports loading via an offset for all the phdrs. We drop support for that.
2015-12-26sim: punt WITH_DEVICES & tconfig.h supportMike Frysinger95-290/+197
No arch is using this anymore, and we want all new ports using the hardware framework instead. Punt WITH_DEVICES and the two callbacks device_io_{read,write}_buffer. We can also punt the tconfig.h file as no port is using it anymore. This fixes in-tree builds that get confused by picking up the wrong one (common/ vs <port>/) caused by commit ae7d0cac8ce971f7108d270c. Any port that needs to set up a global define can use their own sim-main.h file that they must provide regardless.
2015-12-26sim: bfin: push down mmr address/size checksMike Frysinger33-229/+549
The bfin port is using the WITH_DEVICES framework for two reasons: - get access to the cpu making the request (if available) - check the alignment & size for core & system MMRs We addressed the first part with commit dea10706e9159ba6e94eab4c25010f3, and we handle the second part with this commit. Arguably this is more correct too because trying to do bad reads/writes directly (when devices support is disabled) often results in bad memory accesses. As part of this clean up, we also adjust all of the existing logic that would reject invalid accesses: the code was relying on the checks never returning, but that's not the case when things like gdb (via the user's commands) are making the requests. Thus we'd still end up with bad mem accesses, or sometimes gdb being hung due to while(1) loops. Now we can connect (most of) these models into any address and have them work correctly.
2015-12-27Automatic date update in version.inGDB Administrator1-1/+1
2015-12-26sim: bfin: avoid stack error under asanMike Frysinger2-1/+5
We set up an array of 3 elements and then index into it with a 2bit value. We check the range before we actually use the pointer, but the indexing is enough to make asan upset, so just stuff a fourth value in there to keep things simple.
2015-12-26sim: sim-core: pass down cpu to hw accesses when availableMike Frysinger2-10/+41
The bfin port has been using the device callback largely so it could be passed the cpu when available. Add this logic to the common core code so all ports get access to the active cpu. The semantics of these buffer functions are changed slightly in that errors halt the engine synchronously rather than returning the length to the caller. We'll probably adjust this in a follow up commit. The bfin code isn't updated just yet as it has a bit more logic in the device layer that needs to be unwound at which point we can delete it entirely.