summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* [gdb/testsuite] Set remotedir by default in some boardsTom de Vries2023-03-173-16/+77
| | | | | | | | | | | | | | | | When doing a gdb_simple_compile, and downloading the resulting exec $obj to target the result $target_obj may be a relative file path, which may give problems when trying to do: ... remote_exec target $target_obj ... Fix/workaround this on some target boards by setting remotedir by default, and add a corresponding test in gdb.testsuite/board-sanity.exp. This doesn't work for host/target board local-remote-host-native, so xfail this. Tested on x86_64-linux.
* [gdb/testsuite] Fix have_avx for remote targetTom de Vries2023-03-171-5/+10
| | | | | | | | | | | | | | In proc have_avx we compile some source into an exec, resulting in a file $obj on build, and then attempt to execute it on target: ... set result [remote_exec target $obj] ... Fix this by using gdb_remote_download target. Likewise in a few other procs that use "remote_exec target". Tested on x86_64-linux.
* [gdb/testsuite] Handle precise-aligned-alloc.c for remote hostTom de Vries2023-03-175-2/+22
| | | | | | | | | | | | | | | | | With test-case gdb.arch/i386-sse.exp (and likewise gdb.arch/i386-avx.exp) and host board local-remote-host-notty and target board native-gdbserver I run into: ... gdb compile failed, i386-sse.c:68:10: fatal error: \ ../lib/precise-aligned-alloc.c: No such file or directory #include "../lib/precise-aligned-alloc.c" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... Fix this using '#include "precise-aligned-alloc.c"' and making that work with non-remote and remote host. Tested on x86_64-linux.
* [gdb/testsuite] Handle remote host in escape_for_hostTom de Vries2023-03-171-2/+8
| | | | | | | | | | | | | | | | | | | | | | With test-case gdb.arch/ftrace-insn-reloc.exp and host board local-remote-host-notty and target board native-gdbserver, I run into: ... FAIL: gdb.arch/ftrace-insn-reloc.exp: IPA loaded ... due to having: ... $ readelf -d ftrace-insn-reloc | grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [] ... instead of: ... $ readelf -d ftrace-insn-reloc | grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN] ... Handle this in escape_for_host. Tested on x86_64-linux.
* [gdb/testsuite] Add escape_for_hostTom de Vries2023-03-171-1/+11
| | | | | | | | | | | | | | | | | | | In gdb_compile we have: ... lappend new_options "ldflags=-Wl,-rpath,\\\$ORIGIN" ... and we could improve readability by using {} rather than "": ... lappend new_options {ldflags=-Wl,-rpath,\$ORIGIN} ... But rather than manually adding escapes in a string, add a new proc escape_for_host that care of this for us, allowing us to write: ... lappend new_options [escape_for_host {ldflags=-Wl,-rpath,$ORIGIN}] ... Tested on x86_64-linux.
* mach-o: out of memory in get_dynamic_reloc_upper_boundAlan Modra2023-03-171-26/+29
| | | | | | * mach-o.c (bfd_mach_o_canonicalize_dynamic_reloc): Move sanity checks.. (bfd_mach_o_get_dynamic_reloc_upper_bound): ..to here.
* Another source_shAlan Modra2023-03-171-1/+1
| | | | * scripttempl/z80.sc: Use source_sh to source elf.sc.
* [gdb/testsuite] Declare ada unsupported for remote hostTom de Vries2023-03-171-0/+4
| | | | | | | | Currently gdb_ada_compile doesn't support remote host. Make this explicit in allow_ada_tests. Tested on x86_64-linux.
* gas: apply md_register_arithmetic also to unary '+'Jan Beulich2023-03-172-11/+16
| | | | | | | | | | | | | | Even a unary '+' has to be considered arithmetic; at least on x86 in Intel Syntax mode otherwise bogus insn operands may be accepted. Convert this specific case to binary + (i.e. 0 + <register>). (An implication is that md_operator(,1,) would need to deal with arch- specific equivalents of unary '+' is a similar way, if such an arch- specific variant would be specified in the first place.) To avoid duplicating what make_expr_symbol() does to construct a constant-zero expression, simply make its previously local variable a file-scope static one. This way there's also no need to invoke clean_up_expression().
* gas: expose flag_macro_alternate globallyJan Beulich2023-03-175-33/+20
| | | | | | | | Yet again with the removal of gasp about 20 years ago this extra level of indirection isn't necessary anymore either. Drop macro.c's local variable and make as.c's global. While doing the conversion, switch the variable to "bool".
* gas: use flag_mri directly in macro processingJan Beulich2023-03-174-39/+23
| | | | | | Again with the removal of gasp about 20 years ago the extra level of indirection isn't necessary anymore. Drop macro.c's local variable and use the global flag directly.
* gas: isolate macro_strip_at to macro.cJan Beulich2023-03-173-9/+4
| | | | | | | This removes a leftover from i960 support; with that nothing is left which would set macro_strip_at to non-zero, so the variable is converted to a #define (retaining the logic in case a new user would appear) and macro_init()'s respective parameter is dropped.
* gas: drop function pointer parameter from macro_init()Jan Beulich2023-03-173-40/+16
| | | | | | With the removal of gasp (about 20 years ago) the need for this kind- of-hook has disappeared. Go a step beyond merely moving the to be called function: Inline its contents right at the sole call site.
* [gdb/testsuite] Fix filename in gdb.debuginfod/crc_mismatch.expTom de Vries2023-03-171-1/+1
| | | | | | | | | | | | | | | | After running test-case gdb.debuginfod/crc_mismatch.exp, I find a dir called '$': ... $ ls $build/gdb/testsuite/ $ config.log gdb.log lib outputs site.exp cache config.status gdb.sum Makefile site.bak temp ... Fix this by removing the stray '$' here: ... set debugfile "$[standard_output_file ${testfile}.debug]" ... Tested on x86_64-linux.
* Automatic date update in version.inGDB Administrator2023-03-171-1/+1
|
* gdb/doc: extended documentation for inferior function callsAndrew Burgess2023-03-161-0/+32
| | | | | | | | | | I noticed that the documentation for inferior function calls doesn't say much about what happens if/when an inferior function call is interrupted, i.e. it doesn't describe what the dummy frame looks like on the stack, or how GDB behaves when the inferior is continued and reaches the dummy frame. This commit aims to add some of this missing information.
* Fix build breakage in rs6000-aix-tdep.cTom Tromey2023-03-162-5/+6
| | | | | | | | A recent change to rs6000-aix-tdep.c broke the build. This patch fixes it by declaring a few target descriptions in ppc-tdep.h and then not including the various features .c files in rs6000-aix-tdep.c.
* gdb/testsuite: Add support for LoongArch in gdb.base/float.expHui Li2023-03-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test results on LoongArch as follows: Without this patch: ``` $ make check-gdb TESTS="gdb.base/float.exp" === gdb Summary === # of expected passes 2 # of unexpected failures 1 ``` With this patch: ``` $ make check-gdb TESTS="gdb.base/float.exp" === gdb Summary === # of expected passes 3 ``` Signed-off-by: Hui Li <lihui@loongson.cn> Reviewed-By: Tom Tromey <tom@tromey.com> Approved-By: Simon Marchi <simon.marchi@efficios.com> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
* Re: Add --enable-linker-version optionChristophe Lyon2023-03-162-2/+2
| | | | | | | | | | | | | | | | | | | | The recently-added ld-version*.d tests expect .*GNU ld \(GNU Binutils\) 2.* in the .comment section. However, when buidling --with-pkgversion=XXX, we get GNU ld (XXX) 2.[...] instead, leading to a spurious FAIL. This small patch replaces "GNU Binutils" with ".*" instead. I inspected other testcases to see if we already had similar occurrences but I couldn't see any, so I hope this fix is OK for the purpose? Thanks, Christophe
* gdb/doc: spring clean the Python unwinders documentationAndrew Burgess2023-03-161-39/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for the Python Unwinders API could do with some improvement. The 'Unwinder Skeleton Code' has an error: it says 'unwinders' when it should say 'unwinder' in one case. Additionally, by placing the 'Unwinder Skeleton Code' before the section 'Registering an Unwinder' we have skipping including the registration line in the skeleton code. But this is confusion for users (I think) as the skeleton code is almost complete, except for one missing line which the user has to figure out for themselves. By reordering the sections, it is now obvious that the registration should be included in the skeleton code, and the example is therefore almost complete. Additionally, in the example skeleton code the way in which the frame-id was being built (using the current stack point and program counter is (a) not correct, and (b) counter to what is laid out in the 'Unwinder Input' section when describing building a frame-id. I've removed the incorrect code and replaced it with more generic comments indicating what needs to be done. As the actual actions that need to be performed are both architecture specific, and dependent on the function being unwound, it's almost impossible to include more exact code here, but I think what I'm proposing is less misleading than what we had before. I've also added more cross references. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
* ld/testsuite: disable ilp32 tests for aarch64-qnxClément Chigot2023-03-1639-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aarch64nto32 emulation isn't supported. The tests will then fall back on aarch64elf32. It does work but some extra warnings are being generated because the "-z relro" being added aarch64nto but ignored by aarch64elf32 emulation. Skip the tests to avoid any problems. ld/ChangeLog: * testsuite/ld-aarch64/emit-relocs-112-overflow.d: Skip for aarch64nto. * testsuite/ld-aarch64/emit-relocs-112.d: Likewise. * testsuite/ld-aarch64/emit-relocs-113.d: Likewise. * testsuite/ld-aarch64/emit-relocs-114-overflow.d: Likewise. * testsuite/ld-aarch64/emit-relocs-114.d: Likewise. * testsuite/ld-aarch64/emit-relocs-115.d: Likewise. * testsuite/ld-aarch64/emit-relocs-116-overflow.d: Likewise. * testsuite/ld-aarch64/emit-relocs-116.d: Likewise. * testsuite/ld-aarch64/emit-relocs-117.d: Likewise. * testsuite/ld-aarch64/emit-relocs-118-overflow.d: Likewise. * testsuite/ld-aarch64/emit-relocs-118.d: Likewise. * testsuite/ld-aarch64/emit-relocs-119.d: Likewise. * testsuite/ld-aarch64/emit-relocs-22.d: Likewise. * testsuite/ld-aarch64/emit-relocs-23.d: Likewise. * testsuite/ld-aarch64/emit-relocs-28.d: Likewise. * testsuite/ld-aarch64/emit-relocs-86-overflow.d: Likewise. * testsuite/ld-aarch64/emit-relocs-86.d: Likewise. * testsuite/ld-aarch64/emit-relocs-87.d: Likewise. * testsuite/ld-aarch64/emit-relocs-88-overflow.d: Likewise. * testsuite/ld-aarch64/emit-relocs-88.d: Likewise. * testsuite/ld-aarch64/emit-relocs-89.d: Likewise. * testsuite/ld-aarch64/emit-relocs-90-overflow.d: Likewise. * testsuite/ld-aarch64/emit-relocs-90.d: Likewise. * testsuite/ld-aarch64/emit-relocs-92.d: Likewise. * testsuite/ld-aarch64/tls-desc-ie-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-all-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d: Likewise.
* ld/testsuite: add aarch64nto to ld-aarch64Clément Chigot2023-03-161-0/+3
| | | | | | | ld/ChangeLog: * testsuite/ld-aarch64/aarch64-elf.exp: Add support for aarch64nto.
* ld: add support of QNX stack arguments for aarch64ntoClément Chigot2023-03-166-1/+220
| | | | | | | | | | | | | | | | | | | QNX is handling the stack argument using a .note section. Generate it according to ELF argument -zexecstack, -zstack-size and a new NTO argument --lazy-stack. Another NTO argument --stack mimicking -zstack-size is added in order to ensure compatibility with previously made NTO linkers. This requires a new emultempl nto.em which is applied above the default ${ARCH}elf.em. ld/ChangeLog: * emulparams/aarch64nto.sh: Move to nto.em. * emultempl/nto.em: New file. * testsuite/ld-aarch64/aarch64-nto.exp: New test. * testsuite/ld-aarch64/nto-stack-note-1.d: New test. * testsuite/ld-aarch64/nto-stack-note-2.d: New test. * testsuite/ld-aarch64/start.s: New test.
* readelf: add support for QNT_STACK note subsectionsClément Chigot2023-03-163-9/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QNX provides some .note subsections. QNT_STACK is the one controling the stack allocation. bfd/ChangeLog: * elf.c (BFD_QNT_CORE_INFO): Delete. (BFD_QNT_CORE_STATUS): Likewise. (BFD_QNT_CORE_GREG): Likewise. (BFD_QNT_CORE_FPREG): Likewise. (elfcore_grok_nto_note): Replace BFD_QNT_* by QNT_*. binutils/ChangeLog: * readelf.c (get_qnx_elfcore_note_type): New function. (print_qnx_note): New function. (process_note): Add support for QNX support. include/ChangeLog: * elf/common.h (QNT_DEBUG_FULLPATH): New define. (QNT_DEBUG_RELOC): New define. (QNT_STACK): New define. (QNT_GENERATOR): New define. (QNT_DEFAULT_LIB): New define. (QNT_CORE_SYSINFO): New define. (QNT_CORE_INFO): New define. (QNT_CORE_STATUS): New define. (QNT_CORE_GREG): New define. (QNT_CORE_FPREG): New define. (QNT_LINK_MAP): New define.
* configure: add new target aarch64-*-nto*Clément Chigot2023-03-166-1/+51
| | | | This target has its own ld emulation based on aarch64elf.em.
* BPF relocations review / refactoringCupertino Miranda2023-03-167-300/+129
| | | | | | | | | | | | | | | | | | | | | - Removed not needed relocations. - Renamed relocations to match llvm and linux kernel. Relocation changes: R_BPF_INSN_64 => R_BPF_64_64 R_BPF_INSN_DISP32 => R_BPF_64_32 R_BPF_DATA_32 => R_BPF_64_ABS32 R_BPF_DATA_64 => R_BPF_64_ABS64 ChangeLog: * bfd/bpf-reloc.def: Created file with BPF_HOWTO macro entries. * bfd/reloc.c: Removed non needed relocations. * bfd/bfd-in2.h: regenerated. * bfd/libbfd.h: regenerated. * bfd/elf64-bpf.c: Changed relocations. * include/elf/bpf.h: Adapted relocation values/names. * gas/config/tc-bpf.c: Changed relocation mapping.
* Re: Add --enable-linker-verssionAlan Modra2023-03-1638-87/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Output sections without any input sections to initialise their flags have their flags initialised by data statements to LOAD, ALLOC, HAS_CONTENTS by default. This is wrong for .comment. Fix that by making the script initialise the section type to INFO, one of the noalloc section types. That also allows the address of .comment to be set to zero, as is usual for non-alloc sections. Also, use source_sh for all of the sourced scripts to set up make dependencies. PR 30187 * scripttempl/misc-sections.sc: Set .comment address to zero and type to INFO. * scripttempl/ft32.sc: Fix breakages from last edit. * scripttempl/arclinux.sc: Use source_sh to source DWARF.sc and misc-sections.sc. * scripttempl/avr.sc: Likewise. * scripttempl/dlx.sc: Likewise. * scripttempl/elf.sc: Likewise. * scripttempl/elf32cr16.sc: Likewise. * scripttempl/elf32crx.sc: Likewise. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf64bpf.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfm9s12z.sc: Likewise. * scripttempl/elfmicroblaze.sc: Likewise. * scripttempl/elfxgate.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/epiphany_4x4.sc: Likewise. * scripttempl/i386beos.sc: Likewise. * scripttempl/i386go32.sc: Likewise. * scripttempl/ia64vms.sc: Likewise. * scripttempl/ip2k.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/mmo.sc: Likewise. * scripttempl/nds32elf.sc: Likewise. * scripttempl/pru.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/v850_rh850.sc: Likewise. * scripttempl/visium.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * scripttempl/z80.sc: Likewise. * testsuite/ld-scripts/ld-version-2.d: Don't skip ft32 or pru.
* cpu/mem.opc whitespace tidyAlan Modra2023-03-163-83/+81
| | | | | | | | cpu/ * mep.opc: Whitespace and formatting. opcodes/ * mep-asm.c: Regenerate. * mep-dis.c: Regenerate.
* PR30217, dynamic relocations using local dynamic symbolsAlan Modra2023-03-161-24/+39
| | | | | | | | | | | | | | | | | | | | | glibc's ld.so ignores local dynamic symbols. It's been that way forever. We therefore can't use them on dynamic relocations. Fixing that problem uncovered another problem in sorting of dynamic relocs, caused no doubt by copying make_iplt_section (where we don't want reloc sorting by the generic gold function, we want iplt relocs last) to make_lplt_section (where we do want sorting). PR 30217 * powerpc.cc (branch_needs_plt_entry): New function. (Target_powerpc::plt_off): Use it here.. (Target_powerpc::Scan::global): ..and here to correct PLT16 reloc handling for forced-local global symbols. (Output_data_plt_powerpc::add_entry): Rename "stash" parameter "is_local". Emit relative relocs for globals that are forced local, and don't set_needs_dynsym_entry. (Target_powerpc::make_lplt_section): Don't create a separate reloc section, use rela_dyn. (Target_powerpc::make_brlt_section): Likewise.
* Re: Sanity check read_section_stabs_debugging_infoAlan Modra2023-03-161-1/+2
| | | | | * rddbg.c (read_section_stabs_debugging_info): Don't segfault on zero size string section.
* Automatic date update in version.inGDB Administrator2023-03-161-1/+1
|
* Fix formatting in gdb/printing.pyTom Tromey2023-03-151-0/+3
| | | | | According to black 23, gdb/printing.py was mis-formatted. This patch fixes it.
* Enable vector register visibility in core for AIX.Aditya Vidyadhar Kamath2023-03-151-0/+36
| | | | | This patch enables AIX folks to see vector register contents while they analyse the core file.
* [gdb/testsuite] Fix re-used exec in gdb.arch/ftrace-insn-reloc.expTom de Vries2023-03-151-4/+2
| | | | | | | | | In test-case gdb.arch/ftrace-insn-reloc.exp we generate two executables with the same name, which is confusing and known to cause trouble. Fix this by making the executable names unique. Tested on x86_64-linux.
* [gdb/testsuite] Fix gdb.arch/amd64-stap-special-operands.exp for remote hostTom de Vries2023-03-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | With test-case gdb.arch/amd64-stap-special-operands.exp and host board local-remote-host-notty and target board native-gdbserver I run into: ... (gdb) break -pstap three_arg^M No probe matching objfile=`<any>', provider=`<any>', name=`three_arg'^M Make breakpoint pending on future shared library load? (y or [n]) n^M (gdb) FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: \ gdb_breakpoint: set breakpoint at -pstap three_arg ... due to compiling two executables with the same name, and when uploading the second one from host to build, we run into: ... Upload from 127.0.0.1 failed, \ $outputs/gdb.arch/amd64-stap-special-operands/amd64-stap-special-operands: \ Text file busy. ... Fix this by making the executable names unique. Tested on x86_64-linux.
* [gdb/testsuite] Fix gdb.arch/i386-pkru.exp for native-gdbserverTom de Vries2023-03-151-3/+12
| | | | | | | | | | | | | | | With test-case gdb.arch/i386-pkru.exp and target board native-gdbserver we run into: ... FAIL: gdb.arch/i386-pkru.exp: variable after reading pkru ... This looks similar to the the problem for which there's already an xfail, so fix this by extending the xfail matching. Tested on x86_64-linux. Also tested on openSUSE Tumbleweed, where all tests in the test-case pass.
* [gdb/testsuite] Unset DEBUGINFOD_URLS on remote hostTom de Vries2023-03-151-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | When running test-case gdb.arch/i386-pkru.exp with host board local-remote-host-notty and target board native-gdbserver on openSUSE Tumbleweed (with DEBUGINFOD_URLS set), I run into: ... This GDB supports auto-downloading debuginfo from the following URLs:^M <https://debuginfod.opensuse.org/>^M Enable debuginfod for this session? (y or [n]) ^CQuit^M (gdb) FAIL: gdb.arch/i386-pkru.exp: runto: run to main ... The problem is that the unsetenv for DEBUGINFOD_URLS in default_gdb_init: ... # If DEBUGINFOD_URLS is set, gdb will try to download sources and # debug info for f.i. system libraries. Prevent this. unset -nocomplain ::env(DEBUGINFOD_URLS) ... doesn't work on remote host. Fix this by using "set debuginfod enabled off" for remote host. Tested on x86_64-linux.
* [gdb/testsuite] Fix gdb.arch/amd64*.exp with local-remote-host-native.expTom de Vries2023-03-155-14/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | There's a number of gdb.arch/amd64*.exp test-cases that fail with host+target board local-remote-host-native.exp because of using a .S file, generated from a .c file. If a test-case compiles the .S file when executing on remote host, the .S file is already copied from build to host, such that it's available for the compiler. But that's not the case for the .c file, which is needed by gdb to show a source line: ... (gdb) continue^M Continuing.^M ^M Breakpoint 2, fn2 (y=y@entry=25, x=x@entry=6) at amd64-entry-value-inline.c:32^M 32 in gdb.arch/amd64-entry-value-inline.c^M (gdb) FAIL: gdb.arch/amd64-entry-value-inline.exp: continue to breakpoint: \ break-here ... Fix this by using "gdb_remote_download host <.c file>". Tested on x86_64-linux, with host+target board local-remote-host-native.
* Add --enable-linker-version option to bfd linker to add an entry in the ↵Nick Clifton2023-03-1546-278/+243
| | | | | | | .comment section. PR 30187 * NEWS: Mention the new feature. * ld.texi: Document the new feature. * ldgram.y: Handle LINKER_VERSION token. * ldlang.c (lang_add_version): New function. (enable_linker_version): New global variable. * ldlang.h (land_add_version): Prototype. (enable_linker_version): Export. * ldlex.h (OPTION_ENABLE_LINKER_VERSION): Define. (OPTION_DISABLE_LINKER_VERSION): Define. * ldlex.l (LINKER_VERSION): Add token. * lexsup.c (ld_options): Add --enable-linker-version and --disable-linker-version. (parse_args): Handle the new options. * scripttempl/arclinux.sc: Remove stabs and comment sections and replace with inclusion of misc-sections.sc * scripttempl/avr.sc: Likewise. * scripttempl/dlx.sc: Likewise. * scripttempl/elf.sc: Likewise. * scripttempl/elf32cr16.sc: Likewise. * scripttempl/elf32crx.sc: Likewise. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf64bpf.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfm9s12z.sc: Likewise. * scripttempl/elfmicroblaze.sc: Likewise. * scripttempl/elfxgate.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/epiphany_4x4.sc: Likewise. * scripttempl/ft32.sc: Likewise. * scripttempl/ip2k.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/nds32elf.sc: Likewise. * scripttempl/pru.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/v850_rh850.sc: Likewise. * scripttempl/visium.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * scripttempl/z80.sc: Likewise. * testsuite/ld-scripts/script.exp: Run new tests. * scripttempl/misc-sections.sc: New file. * testsuite/ld-scripts/ld-version-2.d: New file. * testsuite/ld-scripts/ld-version.d: New file. * testsuite/ld-scripts/ld-version.t: New file.
* Fix an illegal memory access when disassembling a corrupt MeP file.Nick Clifton2023-03-154-0/+38
| | | | | PR 30231 * mep.opc (mep_print_insn): Check for an out of range index.
* Fix an illegal memory access when disassebling a corrupt ARM file.Nick Clifton2023-03-152-5/+17
| | | | | PR 30230 * arm-dis.c (get_sym_code_type): Check for non-ELF symbols.
* Automatic date update in version.inGDB Administrator2023-03-151-1/+1
|
* Implement DAP variables, scopes, and evaluate requestsTom Tromey2023-03-147-21/+459
| | | | | | | | | | | | The DAP code already claimed to implement "scopes" and "evaluate", but this wasn't done completely correctly. This patch implements these and also implements the "variables" request. After this patch, variables and scopes correctly report their sub-structure. This also interfaces with the gdb pretty-printer API, so the output of pretty-printers is available.
* Hide the implementation of gdb_mpfTom Tromey2023-03-142-6/+13
| | | | | | | | | | This renames the data member of gdb_mpf and makes it private. It also adds a single new method to aid in this change. Unlike the earlier changes here, I did this one all together because gdb_mpf has very few uses.
* Rename gdb_mpq::val and make contents privateTom Tromey2023-03-142-43/+47
| | | | | | | | This changes gdb_mpq to hide its data, and renames the data member from 'val' to 'm_val', following gdb convention.
* Add operators and methods to gdb_mpqTom Tromey2023-03-144-37/+100
| | | | | | | | | | | This adds some operators and methods to gdb_mpq, in preparation for making its implementation private. This only adds the operators currently needed by gdb. More could be added as necessary.
* Rename gdb_mpz::val and make contents privateTom Tromey2023-03-142-55/+61
| | | | | | | | This changes gdb_mpz to hide its data, and renames the data member from 'val' to 'm_val', following gdb convention.
* Add methods and operators to gdb_mpzTom Tromey2023-03-146-61/+140
| | | | | | | | | | | This adds various methods and operators to gdb_mpz, as a step toward hiding the implementation. This only adds the operators that were needed. Many more could be added as required.
* Clean up gmp-utils.h includesTom Tromey2023-03-143-2/+2
| | | | | | | | | gmp-utils.h includes "defs.h", but normally the rule in gdb is that the .c files include this first. This patch changes this code to match the rest of gdb.
* Fix DAP frame bug with older versions of PythonTom Tromey2023-03-141-18/+15
| | | | | | | | | | Tom de Vries pointed out that one DAP test failed on Python 3.6 because gdb.Frame is not hashable. This patch fixes the problem by using a list to hold the frames. This is less efficient but there normally won't be that many frames. Tested-by: Tom de Vries <tdevries@suse.de>