aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-11-30RISC-V: Dump vset[i]vli immediate as numbers once vsew or vlmul is reserved.Nelson Chu4-71/+33
Consider the following case, vsetvli a0, a1, 0x4 # unrecognized vlmul vsetvli a0, a1, 0x20 # unrecognized vsew vsetivli a0, 0xb, 0x4 # unrecognized vlmul vsetivli a0, 0xb, 0x20 # unrecognized vsew For the current dis-assembler, we get the result, 0000000000000000 <.text>: 0: 0045f557 vsetvli a0,a1,e8,(null),tu,mu 4: 0205f557 vsetvli a0,a1,e128,m1,tu,mu 8: c045f557 vsetivli a0,11,e8,(null),tu,mu c: c205f557 vsetivli a0,11,e128,m1,tu,mu The vsew e128 and vlmul (null) are preserved according to the spec, so dump these fields looks wrong. Consider that we are used to dump the unrecognized csr as csr numbers directly, we should also dump the whole vset[i]vli immediates as numbers, once the vsew or vlmul is reserved. Therefore, following is what I expected, 0000000000000000 <.text>: 0: 0045f557 vsetvli a0,a1,4 4: 0205f557 vsetvli a0,a1,32 8: c045f557 vsetivli a0,11,4 c: c205f557 vsetivli a0,11,32 gas/ * testsuite/gas/riscv/vector-insns.d: Rewrite the vset[i]vli testcases since we should dump the immediate as numbers once the vsew or vlmul is reserved. * testsuite/gas/riscv/vector-insns.s: Likewise. opcodes/ * riscv-dis.c (print_insn_args): The reserved vsew and vlmul are NULL string in the riscv_vsew and riscv_vlmul, so dump the whole imm as numbers once one of them is NULL. * riscv-opc.c (riscv_vsew): Set the reserved vsew to NULL. (riscv_vlmul): Set the reserved vlmul to NULL.
2021-11-29zlib: enable silent build rulesMike Frysinger2-2/+42
2021-11-29ld: enable silent build rulesMike Frysinger4-64/+104
Also add $(AM_V_xxx) to various manual rules in here.
2021-11-29libctf: enable silent build rulesMike Frysinger3-3/+43
Also add $(AM_V_xxx) to various manual rules in here.
2021-11-29gprof: enable silent build rulesMike Frysinger4-18/+58
Also add $(AM_V_xxx) to various manual rules in here.
2021-11-29binutils: merge doc subdir up a levelMike Frysinger6-1145/+609
This avoids a recursive make into the doc subdir and speeds up the build slightly. It also allows for more parallelism.
2021-11-29binutils: enable silent build rulesMike Frysinger6-226/+266
Also add $(AM_V_xxx) to various manual rules in here.
2021-11-29bfd: enable silent build rulesMike Frysinger4-90/+130
Also add $(AM_V_xxx) to various manual rules in here.
2021-11-29opcodes: enable silent build rulesMike Frysinger4-54/+94
Also add $(AM_V_xxx) to various manual rules in here.
2021-11-30Automatic date update in version.inGDB Administrator1-1/+1
2021-11-29Allow DW_ATE_UTF for Rust charactersTom Tromey4-13/+75
The Rust compiler plans to change the encoding of a Rust 'char' type to use DW_ATE_UTF. You can see the discussion here: https://github.com/rust-lang/rust/pull/89887 However, this fails in gdb. I looked into this, and it turns out that the handling of DW_ATE_UTF is currently fairly specific to C++. In particular, the code here assumes the C++ type names, and it creates an integer type. This comes from commit 53e710acd ("GDB thinks char16_t and char32_t are signed in C++"). The message says: Both places need fixing. But since I couldn't tell why dwarf2read.c needs to create a new type, I've made it use the per-arch built-in types instead, so that the types are only created once per arch instead of once per objfile. That seems to work fine. ... which is fine, but it seems to me that it's also correct to make a new character type; and this approach is better because it preserves the type name as well. This does use more memory, but first we shouldn't be too concerned about the memory use of types coming from debuginfo; and second, if we are, we should implement type interning anyway. Changing this code to use a character type revealed a couple of oddities in the C/C++ handling of TYPE_CODE_CHAR. This patch fixes these as well. I filed PR rust/28637 for this issue, so that this patch can be backported to the gdb 11 branch.
2021-11-29[PR gdb/27026] CTRL-C is ignored when debug info is downloadedAaron Merey1-0/+15
During debuginfod downloads, ctrl-c should result in the download being cancelled and skipped. However in some cases, ctrl-c fails to get delivered to gdb during downloading. This can result in downloads being unskippable. Fix this by ensuring that target_terminal::ours is in effect for the duration of each download. Co-authored-by: Tom de Vries <tdevries@suse.de> https://sourceware.org/bugzilla/show_bug.cgi?id=27026#c3
2021-11-29strings: Replace references to -u option with references to -U.Nick Clifton1-2/+2
PR 28632
2021-11-29[gdb/symtab] Fix segfault in search_one_symtabTom de Vries3-1/+105
PR28539 describes a segfault in lambda function search_one_symtab due to psymbol_functions::expand_symtabs_matching calling expansion_notify with a nullptr symtab: ... struct compunit_symtab *symtab = psymtab_to_symtab (objfile, ps); if (expansion_notify != NULL) if (!expansion_notify (symtab)) return false; ... This happens as follows. The partial symtab ps is a dwarf2_include_psymtab for some header file: ... (gdb) p ps.filename $5 = 0x64fcf80 "/usr/include/c++/11/bits/stl_construct.h" ... The includer of ps is a shared symtab for a partial unit, with as user: ... (gdb) p ps.includer().user.filename $11 = 0x64fc9f0 \ "/usr/src/debug/llvm13-13.0.0-1.2.x86_64/tools/clang/lib/AST/Decl.cpp" ... The call to psymtab_to_symtab expands the Decl.cpp symtab (and consequently the shared symtab), but returns nullptr because: ... struct dwarf2_include_psymtab : public partial_symtab { ... compunit_symtab *get_compunit_symtab (struct objfile *objfile) const override { return nullptr; } ... Fix this by returning the Decl.cpp symtab instead, which fixes the segfault in the PR. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28539
2021-11-29Update description of string's -n option.Nick Clifton3-5/+17
PR 28632 * strings.c (usage): Update desciption of -n option. * doc/binutils.texi: Likewise.
2021-11-29[gdb/testsuite] Fix typo in proc linesTom de Vries1-1/+1
Proc lines contains a typo: ... string_form { set $_line_string_form $value } ... Remove the incorrect '$' in '$_line_string_form'. Tested on x86_64-linux.
2021-11-29[gdb/testsuite] Use unique files in gdb.dwarf2/dw2-lines.expTom de Vries2-2/+30
While debugging a problem in gdb.dwarf2/dw2-lines.exp, I realized that the test-case generates all executables and associated temporary files using the same filenames. Fix this by adding a new proc prefix_id in lib/gdb.exp, and using it in the test-case. Tested on x86_64-linux.
2021-11-29[gdb/testsuite] Fix gdb.dwarf2/dw2-lines.exp with -m32Tom de Vries1-10/+2
When running test-case gdb.dwarf2/dw2-lines.exp with target board -unix/-m32, we run into another instance of PR28383, where the dwarf assembler generates 64-bit relocations which are not supported by the 32-bit assembler: ... dw2-lines-dw.S: Assembler messages:^M outputs/gdb.dwarf2/dw2-lines/dw2-lines-dw.S:76: Error: \ cannot represent relocation type BFD_RELOC_64^M ... Fix this by using _op_offset in _line_finalize_header. Tested on x86_64-linux.
2021-11-28sim: testsuite: drop most specific istarget checksMike Frysinger42-47/+42
We'll rely on the toolchain probing to determine whether each arch's tests can be run rather the current configure target. This allows testing all of the ports in a multitarget configuration. For now, we don't reformat the files entirely to make it easier to review, and in case we need to make adjustments. Once this feels like it's stable, we can flatten the code a bit by removing the if statement entirely.
2021-11-28sim: testsuite: support parallel executionMike Frysinger2-10/+80
Break up the dejagnu logic so that we can parallelize the testsuite. This takes a page from gcc & gdb where each .exp is run in isolation instead of in serial. For most targets, this doesn't make much of a difference as they only have a single .exp. A few (like cris & frv) have multiple .exp though and will see a bit of a speed up. The real gain is when testing a multitarget build. This way we can run all the targets in parallel and cut the execution time a bit. On my system, it goes from ~155sec to ~100sec. We can gain further speedups by splitting up some of the larger .exp files into smaller groups. We'll do that in a followup though.
2021-11-28sim: testsuite: expand arch specific toolchain settingsMike Frysinger3-7/+63
Leverage the new per-port toolchain settings to initialize the env for eeach set of tests. This allows us to run all the tests in a multitarget build if the user sets up the vars. If they don't, we can still skip all the tests.
2021-11-28sim: testsuite: setup per-port toolchain settings for multitarget buildMike Frysinger5-3/+895
Gas does not support multitarget builds -- it still only supports a single input & output format. ld is a bit better, but requires manual flags to select the right output. This makes it impossible to run the complete testsuite in a multitarget build. To address this limitation, create a suite of FOR_TARGET variables so these can be set to precompiled as & ld programs. It requires a bit of setup ahead of time, but it's a one-time cost, and makes running the full testsuite at once much easier.
2021-11-29Automatic date update in version.inGDB Administrator1-1/+1
2021-11-29PR28629 NIOS2 falloutAlan Modra1-1/+1
The test exactly matched wrong output. PR 28629 * testsuite/gas/nios2/relax.d: Update expected output.
2021-11-28sim: add checks to core headers to prevent incorrect common buildingMike Frysinger3-2/+8
Some of the core sim headers rely on the SIM_AC_OPTION_BITSIZE macro which can change the size of core types. Since these haven't been unified across ports, add checks to make sure they aren't accidentally included when building for all ports. This caught the sim-load file using poisoned headers that it didn't actually need.
2021-11-28sim: unify syscall.o buildingMike Frysinger3-1/+22
Now that we've unified all the syscall tables, this file does not rely on any port-specific settings, so move it up to building as part of the common step so we only do it once in a multibuild.
2021-11-28sim: drop unused gentmap & nltvals.def logicMike Frysinger6-422/+31
Now that all ports have switched to target-newlib-* files, there's no need for these files & generating things at build time. So punt the logic and make target-newlib-syscall a hard requirement.
2021-11-28sim: mcore: switch to new target-newlib-syscallMike Frysinger2-3/+5
Use the new target-newlib-syscall module. This is needed to merge all the architectures into a single build, and mcore has a custom syscall table for its newlib/libgloss port.
2021-11-28sim: riscv: switch to new target-newlib-syscallMike Frysinger2-3/+2
Use the new target-newlib-syscall module. This is needed to merge all the architectures into a single build, and riscv has a custom syscall table for its newlib/libgloss port.
2021-11-28sim: cr16: switch to new target-newlib-syscallMike Frysinger3-51/+28
Use the new target-newlib-syscall module. This is needed to merge all the architectures into a single build, and cr16 has a custom syscall table for its newlib/libgloss port. This allows cleaning up the syscall ifdef logic. We know these will always exist now.
2021-11-28sim: d10v: switch to new target-newlib-syscallMike Frysinger3-36/+26
Use the new target-newlib-syscall module. This is needed to merge all the architectures into a single build, and d10v has a custom syscall table for its newlib/libgloss port. This allows cleaning up the syscall ifdef logic. We know these will always exist now.
2021-11-28sim: sh: switch to new target-newlib-syscallMike Frysinger2-25/+23
Use the new target-newlib-syscall module. This is needed to merge all the architectures into a single build, and sh has a custom syscall table for its newlib/libgloss port.
2021-11-28sim: v850: switch to new target-newlib-syscallMike Frysinger3-67/+26
Use the new target-newlib-syscall module. This is needed to merge all the architectures into a single build, and v850 has a custom syscall table for its newlib/libgloss port. This allows cleaning up the syscall ifdef logic. We know these will always exist now.
2021-11-28sim: iq2000/lm32/m32c/moxie/rx: switch to new target-newlib-syscall.hMike Frysinger5-35/+35
Use the new target-newlib-syscall.h to provide the target syscall defines. These code paths are written specifically for the newlib ABI rather than being generalized, so switching them to the defines rather than trying to go through the dynamic callback conversion seems like the best trade-off for now. Might have to reconsider this in the future.
2021-11-28sim: nltvals: pull target syscalls out into a dedicated source fileMike Frysinger9-65/+987
Like we just did for pulling out the errno map, pull out the syscall maps into a dedicated common file. Most newlib ports are using the same syscall map, but not all, which means we have to do a bit more work to migrate. This commit adds the maps and switches the ports using the common default syscall table over to it. Ports using unique syscall tables are still using the old targ-map.c logic. Switching common ports over is easy by checking NL_TARGET, but the ppc code needs a bit more cleanup here hence its larger diff.
2021-11-28sim: frv: resolve syscalls dynamicallyMike Frysinger1-2/+1
Avoid use of TARGET_<syscall> defines and rely on the callback layers to resolve these dynamically so we can support multiple syscall layers instead of assuming the newlib/libgloss numbers all the time.
2021-11-28sim: mn10300: resolve syscalls dynamicallyMike Frysinger3-5/+4
Avoid use of TARGET_<syscall> defines and rely on the callback layers to resolve these dynamically so we can support multiple syscall layers instead of assuming the newlib/libgloss numbers all the time.
2021-11-28sim: nltvals: drop i960Mike Frysinger2-26/+2
This port was dropped from gdb/bfd/sim years ago, so stop including its syscall constants too.
2021-11-28sim: moxie: fix datadir handlingMike Frysinger1-1/+1
Expand the value at `make` time rather than configure generation time so that we handle $(datarootdir) setting properly.
2021-11-28Automatic date update in version.inGDB Administrator1-1/+1
2021-11-27gdb: fix typos in configureSimon Marchi2-8/+8
The variable names used to restore CFLAGS and LDFLAGS here don't quite match the names used above, resulting in losing the original CFLAGS and LDFLAGS. Fix that. Change-Id: I9cc2c3b48b1dc30c31a7143563c893fd6f426a0a
2021-11-27sim: hw: mark hw_descriptors constMike Frysinger2-2/+2
2021-11-27sim: testsuite: add dedicated flag for init toolchain testsMike Frysinger2-6/+15
As we setup more reliable CC_FOR_TARGET variables for each target, the bfin way of overriding it to stuff custom CFLAGS doesn't scale well. Add a dedicated CFLAGS_FOR_TARGET_init setting that each set of tests can setup if they want to add custom options.
2021-11-27sim: testsuite: clean up arch specific toolchain settingsMike Frysinger3-4/+14
In a multitarget build, we process all targets in order, so make sure the toolchain settings from one don't leak into the next.
2021-11-27sim: cris: always search for local rvdummy toolMike Frysinger1-8/+2
If the board info sets the sim to a basename that is found via $PATH (which is the default dejagnu behavior), the logic here to use its dirname to find rvdummy fails because it looks for `./rvdummy`. So switch it to always use the local build of rvdummy which is the one we want to be testing against in the first place. If we get a request for testing against a different setup, we can figure out & document the needs at that point, and then setup some config knobs to control it.
2021-11-27[gdb/testsuite] Fix FAIL in gdb.base/list-missing-source.expTom de Vries1-1/+1
In commit f8080fb7a44 "[gdb/testsuite] Add gdb.base/include-main.exp" a file gdb.base/main.c was added, which caused the following regression: ... (gdb) list^M <gdb.base/main.c> (gdb) FAIL: gdb.base/list-missing-source.exp: list ... The problem is that the test-case does not expect to find a file main.c, but now it finds gdb.base/main.c. Fix this by using the more specific file name list-missing-source.c. Tested on x86_64-linux.
2021-11-26sim: testsuite: fix bits-gen EXEEXT handlingMike Frysinger2-8/+8
Add missing $(EXEEXT) to dependencies on bits-gen. These are actually build-only tools, but automake doesn't allow for build & host tools, so the rules are re-using EXEEXT.
2021-11-26sim: testsuite: initial support for OS-specific testsMike Frysinger107-107/+158
We usually test against the newlib/libgloss environment, but for a few ports that also support Linux apps, we want to test that logic too. A lot of the C code is written such that it works with either newlib/libgloss or glibc/linux toolchains, but we have some tests that end up being Linux-specific. Cris has been using the target tuple as a rough proxy for this (where cris*-*-elf is assumed to be newlib/libgloss, and everything else is glibc/linux), but that is a bit too rough, and it doesn't work in a multitarget build. So lets create a few stub files that we can do compile tests with to detect the different setups, and then let tests declare which one they require (if they require any at all).
2021-11-26sim: testsuite: unify basic C compiler checksMike Frysinger4-40/+53
Both bfin & cris ports test the C compiler to see if it works, but in their own way. Unify the checks in the common code so we can leverage them in more ports in the future, and collapse the bfin & cris code.
2021-11-26sim: testsuite: rework sim_init usageMike Frysinger44-26/+109
The sim_init function was called by runtest for each test when --tool was set to sim. When we changed to --tool '' to collapse the testsuite dir, the init function was no longer called on every test. However, it was still being called explicitly by config/default.exp. It's not clear why that explicit call ever existed since, in the past, it meant it was redundant. Lets drop the single sim_init call in config/default.exp and move it out to all our tests. This replicates the runtest behavior so we can setup variables on a per-test basis which allows us to recollapse the sim_path logic back. We'll also leverage this in the future for toolchain setup. Also add a few comments clarifying the overall runtime behavior.