aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-12-23sim: mn10300: standardize the arch-specific settings a littleMike Frysinger4-43/+27
Rename mn10300_sim.h to mn10300-sim.h to match other ports, and move most of the arch-specific content out of sim-main.h to it. This isn't a big win though as we still have to include the header in sim-main.h due to the igen interface: it hardcodes including sim-main.h in its files. So until we can fix that, we have to keep bleeding these settings into the common codes. Also take the opportunity to purge a lot of unused headers from these. The local modules should already include the right headers, so there's no need to force everyone to pull them in. A lot of this is a hold over from the pre-igen days of this port.
2022-12-23sim: microblaze: move arch-specific settings to internal headerMike Frysinger3-24/+47
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: example-synacor: move arch-specific settings to internal headerMike Frysinger4-14/+42
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: moxie: move arch-specific settings to internal headerMike Frysinger3-11/+36
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23sim: riscv: move arch-specific settings to internal headerMike Frysinger5-55/+83
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include. We can also move the machs.h include out since the model logic was all generalized from compile-time to runtime last year.
2022-12-23sim: v850: standardize the arch-specific settings a littleMike Frysinger6-725/+733
Rename v850_sim.h to v850-sim.h to match other ports, and move most of the arch-specific content out of sim-main.h to it. This isn't a big win though as we still have to include the header in sim-main.h due to the igen interface: it hardcodes including sim-main.h in its files. So until we can fix that, we have to keep bleeding these settings into the common codes.
2022-12-23sim: msp430: move arch-specific settings to internal headerMike Frysinger3-8/+4
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the msp430-sim.h include and move it to the few files that actually need it. While we're here, drop redundant includes from sim-main.h: * sim-config.h & sim-types.h included by sim-basics.h already * sim-engine.h included by sim-base.h already And move sim-options.h to the one file that needs it.
2022-12-23sim: ft32: move arch-specific settings to internal headerMike Frysinger2-2/+2
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the ft32-sim.h include and move it to the few files that actually need it.
2022-12-23sim: d10v: move arch-specific settings to internal headerMike Frysinger6-4/+14
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the d10v_sim.h include and move it to the few files that actually need it. Also rename the file to standardize it a bit better with other ports.
2022-12-23sim: cr16: move arch-specific settings to internal headerMike Frysinger5-3/+7
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so drop the cr16_sim.h include and move it to the few files that actually need it. Also rename the file to standardize it a bit better with other ports.
2022-12-23sim: arm: move arch-specific settings to internal headerMike Frysinger5-5/+35
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include. The BIT override would be better in the place where it's redefined, so move it to armdefs.h instead.
2022-12-23sim: aarch64: move arch-specific settings to internal headerMike Frysinger6-35/+66
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include. While we're here, drop redundant includes from sim-main.h: * sim-types.h is included by sim-base.h already * sim-base.h is included twice * sim-io.h is included by sim-base.h already
2022-12-23sim: avr: move arch-specific settings to internal headerMike Frysinger3-18/+42
There's no need for these settings to be in sim-main.h which is shared with common/ sim code, so move it all out to a new header which only this port will include.
2022-12-23Fix illegal memory access parsing corrupt DWARF information.Nick Clifton2-1/+8
PR 29936 * dwarf2.c (concat_filename): Fix check for a directory index off the end of the directory table.
2022-12-23Fix MinGW build using mingw.org's MinGWEli Zaretskii1-1/+5
This allows to build GDB even though the default value of _WIN32_WINNT is lower than the one needed to expose some new APIs used here, and leave the test for their actual support to run time. * gdb/nat/windows-nat.c (EXTENDED_STARTUPINFO_PRESENT): Define if not defined. (create_process_wrapper): Use 'gdb_lpproc_thread_attribute_list' instead of 'PPROC_THREAD_ATTRIBUTE_LIST' (which might not be defined at compile time). This fixes compilation error using mingw.org's MinGW.
2022-12-23ld: Write linker symbols in PDBMark Harmstone3-34/+327
2022-12-23ld: Copy other symbols into PDB fileMark Harmstone5-0/+1076
2022-12-23ld: Write globals stream in PDBMark Harmstone9-40/+2230
2022-12-23ld: Parse LF_UDT_SRC_LINE records when creating PDB fileMark Harmstone8-10/+459
2022-12-23ld: Write types into IPI stream of PDBMark Harmstone8-18/+699
2022-12-23ld: Write types into TPI stream of PDBMark Harmstone8-22/+2270
2022-12-23ld: Write DEBUG_S_LINES entries in PDB fileMark Harmstone5-6/+204
2022-12-23ld: Fix segfault in populate_publics_streamMark Harmstone1-0/+3
2022-12-23ld: Write DEBUG_S_FILECHKSMS entries in PDBsMark Harmstone8-12/+709
2022-12-23ld: Generate PDB string tableMark Harmstone6-6/+472
2022-12-23pdb build fixesAlan Modra5-101/+156
Enable compilation of ld/pdb.c just for x86, as is done for bfd/pdb.c. This reduces the size of ld and is necessary with the following patches that call a COFF-only bfd function from ld/pdb.c. Without it we'd break every non-COFF target build.
2022-12-23sim: lm32/m32r: drop redundant opcode/cgen.h includeMike Frysinger2-2/+0
The xxx-desc.h header file already includes this, and it's how the other cgen ports are getting it, so drop it from these two.
2022-12-23sim: ppc: drop unused types from sim-main.hMike Frysinger1-7/+0
The common sim headers should define these for us already, so there's no need for the ppc header to set them up.
2022-12-23sim: cgen: move symcat.h include to where it's usedMike Frysinger10-5/+9
Move this out of the global sim-main.h and to the few files that actually use functions from it. Only the cgen ports were pulling this, so this makes cgen & non-cgen behave more the same.
2022-12-23sim: cgen: move cgen-types.h include to cgen-defs.hMike Frysinger8-7/+2
The cgen-types.h header sets up types that are needed by cgen-defs.h, so move the include out of sim-main.h and to that header. It might be needed in other specific modules, but for now let's kick it out of sim-main.h to make some progress. Things still build with just this.
2022-12-23Revert "sim: mn10300: drop unused sim-main.c"Mike Frysinger1-0/+9
This reverts commit 681a422b855e4b20086554b170dae051361f00c7. I missed that this was included via common/sim-inline.c. I thought I had grepped the top of the tree, but I must have only done mn10300. Add a comment to make it clear where/how this file is used.
2022-12-22sim: mn10300: drop unused sim-main.cMike Frysinger1-4/+0
Nothing compiles or references this, so punt it.
2022-12-22sim: endian: move bfd.h from header to sourceMike Frysinger2-2/+2
The bfd APIs are used only by sim-n-endian.h which is only included by sim-endian.c, so move the bfd.h include there and out of sim-endian.h which is included by many other modules.
2022-12-22sim: move bfd.h include out of sim-main.hMike Frysinger20-13/+16
Not all arches include this in sim-main.h, and the ones that do don't actually use bfd defines in the sim-main.h header. Prune it to make sim-main.h simpler so we can kill it off entirely in the future. We add the include to the files that utilize e.g. bfd_vma though.
2022-12-22sim: mcore: replace custom "word" type with int32_tMike Frysinger2-33/+30
This is a 32-bit architecture with 32-bit registers, so replace the custom "word" long int typedef with an explicit int32_t. This is a correctness fix since long will be 64-bits on most 64-bit hosts.
2022-12-22sim: moxie: replace custom "word" type with int32_tMike Frysinger1-13/+11
This is a 32-bit architecture with 32-bit registers, so replace the custom "word" int typedef with an explicit int32_t. Practically speaking, this produces the same code, but it should hopefully make it easier to merge common code in the future.
2022-12-22sim: cr16/d10v/mcore/moxie: clean up unused word & uword typesMike Frysinger4-10/+0
Nothing actually uses these, so punt them. Some of the ports are using local "word" types, but we'll clean those up in a follow up.
2022-12-22sim: mips: trim redundant igen settingsMike Frysinger2-18/+0
These variables are setting the same value as the defaults. Trim this redundant logic to make it easier to see the real differences so we can try to keep unifying cases.
2022-12-22sim: mips: merge mips64* with existing multi-run buildMike Frysinger2-10/+4
Change the default (unhandled) mips64* targets to use the existing mips64 multi-run build. It already handles the formats, we just have to list the mips8000 bfd for it.
2022-12-22sim: mips: merge mips64vr5000 with existing multi-run buildMike Frysinger2-8/+2
The existing mips64vr-* multi-run build already handles mips5000 targets, so reuse that for mips64vr5* targets too. This moves more logic from build-time to runtime so we can have a single binary that supports many targets.
2022-12-23RISC-V: Relax the order checking for the architecture stringNelson Chu8-149/+83
* riscv-toolchain-conventions, PR, https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/14 Issue, https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/11 * Refer to the commit afc41ffb, RISC-V: Reorder the prefixed extensions which are out of order. In the past we only allow to reorder the prefixed extensions. But according to the PR 14 in the riscv-toolchain-convention, we can also relax the order checking to allow the whole extensions be written out of orders, including the single standard extensions and the prefixed multi-letter extensions. Just that we still need to follow the following rules as usual, 1. prefixed extensions need to be seperated with `_'. 2. prefixed extensions need complete <major>.<minor> version if set. Please see the details in the march-ok-reorder gas testcase. Passed the riscv-gnu-toolchain regressions. bfd/ * elfxx-riscv.c (enum riscv_prefix_ext_class): Changed RV_ISA_CLASS_UNKNOWN to RV_ISA_CLASS_SINGLE, since everything that does not belong to the multi-keyword will possible be a single extension for the current parser. (parse_config): Likewise. (riscv_get_prefix_class): Likewise. (riscv_compare_subsets): Likewise. (riscv_parse_std_ext): Removed, and merged with riscv_parse_prefixed_ext into riscv_parse_extensions. (riscv_parse_prefixed_ext): Likewise. (riscv_parse_subset): Only need to call riscv_parse_extensions to parse both single standard and prefixed extensions. gas/ * testsuite/gas/riscv/march-fail-order-std.d: Removed since the relaxed order checking. * testsuite/gas/riscv/march-fail-order-std.l: Likewise. * testsuite/gas/riscv/march-fail-order-x-std.d: Likewise. * testsuite/gas/riscv/march-fail-order-z-std.d: Likewise. * testsuite/gas/riscv/march-fail-order-zx-std.l: Likewise. * testsuite/gas/riscv/march-fail-unknown-std.l: Updated. * testsuite/gas/riscv/march-ok-reorder.d: New testcase.
2022-12-22sim: drop unused SIM_ADDR type [PR sim/7504]Mike Frysinger1-6/+0
Now that sim APIs either use 64-bit addresses all the time, or more appropriate target-specific types, drop this now-unused 32-bit-only address type. Bug: https://sourceware.org/PR7504
2022-12-22sim: mips: switch from SIM_ADDR to address_wordMike Frysinger2-31/+13
The latter type matches the address size configured for this sim. Also take the opportunity to simplify printf logic by leveraging PRI* macros.
2022-12-22sim: v850: switch from SIM_ADDR to address_wordMike Frysinger2-4/+4
The latter type matches the address size configured for this sim.
2022-12-22sim: switch sim_{read,write} APIs to 64-bit all the time [PR sim/7504]Mike Frysinger14-60/+64
We've been using SIM_ADDR which has always been 32-bit. This means the upper 32-bit address range in 64-bit sims is inaccessible. Use 64-bit addresses all the time since we want the APIs to be stable regardless of the active arch backend (which can be 32 or 64-bit). The length is also 64-bit because it's completely feasible to have a program that is larger than 4 GiB in size/image/runtime. Forcing the caller to manually chunk those accesses up into 4 GiB at a time doesn't seem useful to anyone. Bug: https://sourceware.org/PR7504
2022-12-22sim: use bfd_vma when reading start addr from bfd infoMike Frysinger11-12/+12
Since SIM_ADDR is always 32-bit, it might truncate the address with 64-bit ELFs. Since we load that addr from the bfd, use the bfd_vma type which matches the bfd_get_start_address API.
2022-12-22sim: m32r: include sim-hw.h for sim_hw_parseMike Frysinger1-0/+1
2022-12-23COFF build-id writes uninitialised data to fileAlan Modra3-9/+5
1) The first write in write_build_id wrote rubbish past the struct external_IMAGE_DEBUG_DIRECTORY, which was later overwritten with correct data. No user visible problem there, except that tools like valgrind complain. 2) The size for the pdb name was incorrectly calculated. * emultempl/pe.em (write_build_id): Write the debug directory, not the entire section contents. (setup_build_id): Add size for the base name of pdb_name, not the full path. * emultempl/pep.em: Likewise. * testsuite/ld-pe/pdb2-section-contrib.d: Update.
2022-12-22sim: mips: merge mips64vr4300 with existing multi-run buildMike Frysinger2-8/+2
The existing mips64vr-* multi-run build already handles mips4300 targets, so reuse that for mips64vr43* targets too. This moves more logic from build-time to runtime so we can have a single binary that supports many targets.
2022-12-23Automatic date update in version.inGDB Administrator1-1/+1