aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-16xtensa constifyAlan Modra5-567/+581
Move lots of read-only arrays to .rodata. include/ * xtensa-isa-internal.h (xtensa_format_internal), (xtensa_slot_internal, xtensa_operand_internal), (xtensa_arg_internal, xtensa_iclass_internal), (xtensa_opcode_internal, xtensa_regfile_internal), (xtensa_interface_internal, xtensa_funcUnit_internal), (xtensa_state_internal, xtensa_sysreg_internal): Constify. bfd/ * elf32-xtensa.c (narrowable, widenable): Constify. * xtensa-modules.c: Constify many arrays.
2020-12-16ppc64 constifyAlan Modra2-1/+5
Nothing to see here. * elf64-ppc.c (synthetic_opd): Constify.
2020-12-16arc constifyAlan Modra3-5/+11
Move a read-only array to .rodata. * arc-plt.h (plt_versions): Constify. * elf32-arc.c (arc_get_plt_version): Constify return pointer, adjust uses throughout.
2020-12-16Lose some COFF/PE static vars, and peicode.h constifyAlan Modra4-27/+37
This patch tidies some COFF and PE code that unnecessarily used static variables to communicate between functions. * coffcode.h (pelength, peheader): Delete static variables. (coff_apply_checksum): Instead, define them as auto vars, and pass.. (coff_read_word, coff_compute_checksum): ..to here. Delete unnecessary forward declarations. * pei-x86_64.c (pdata_count): Delete static variable. (struct pex64_paps): New. (pex64_print_all_pdata_sections, pex64_bfd_print_pdata): Pass a pex64_paps for counting. * peicode.h (jtab): Constify.
2020-12-15gdb: multi-line support for "document" commandRae Kim5-7/+89
"document" command executed in python, gdb.execute("document <comname>\n...\nend\n"), will wait for user input. Python extension stops working from that point. multi-line suport was introduced in commit 56bcdbea2. But "document" support seem to be implemented. gdb/ChangeLog: 2020-12-02 Rae Kim <rae.kim@gmail.com> * cli/cli-script.c (do_document_command): Rename from document_command. Handle multi-line input. (multi_line_command_p): Handle document_control. (build_command_line): Likewise. (execute_control_command_1): Likewise. (process_next_line): Likewise. (document_command): Call do_document_command. * cli/cli-script.h (enum command_control_type): Add document_control. gdb/testsuite/ChangeLog: 2020-12-02 Rae Kim <rae.kim@gmail.com> * gdb.base/document.exp: New test. Change-Id: Ice262b980c05051de4c106af9f3fde5b2a6df6fe
2020-12-15Add expected type parameter to evaluate_expressionTom Tromey6-15/+26
While working on the expression rewrite, I found a few spots that called the internal functions of the expression evaluator, just to pass in an expected type. This patch adds a parameter to evaluate_expression so that these functions can avoid this dependency. Regression tested on x86-64 Fedora 28. gdb/ChangeLog 2020-12-15 Tom Tromey <tom@tromey.com> * stap-probe.c (stap_probe::evaluate_argument): Use evaluate_expression. * dtrace-probe.c (dtrace_probe::evaluate_argument): Use evaluate_expression. * value.h (evaluate_expression): Add expect_type parameter. * objc-lang.c (print_object_command): Call evaluate_expression. * eval.c (evaluate_expression): Add expect_type parameter.
2020-12-15Introduce expression::first_opcodeTom Tromey9-11/+31
This adds a new helper method, expression::first_opcode, that extracts the outermost opcode of an expression. This simplifies some patches in the expression rewrite series. Note that this patch requires the earlier patch to avoid manual dissection of OP_TYPE operations. 2020-12-15 Tom Tromey <tom@tromey.com> * varobj.c (varobj_create): Use first_opcode. * value.c (init_if_undefined_command): Use first_opcode. * typeprint.c (whatis_exp): Use first_opcode. * tracepoint.c (validate_actionline): Use first_opcode. (encode_actions_1): Use first_opcode. * stack.c (return_command): Use first_opcode. * expression.h (struct expression) <first_opcode>: New method. * eval.c (parse_and_eval_type): Use first_opcode. * dtrace-probe.c (dtrace_process_dof_probe): Use first_opcode.
2020-12-15Clean up arguments to evaluate_subexp_do_callTom Tromey4-19/+28
I noticed hat evaluate_subexp_do_call takes an array of arguments and a count -- but, unlike the usual convention, the count does not include the first element. This patch changes this function to match call_function_by_hand -- passing the callee separately, and using an array_view for the arguments. This makes it simpler to understand. Regression tested on x86-64 Fedora 28. gdb/ChangeLog 2020-12-15 Tom Tromey <tom@tromey.com> * f-lang.c (evaluate_subexp_f): Update. * expression.h (evaluate_subexp_do_call): Update. * eval.c (evaluate_subexp_do_call): Add callee parameter. Replace nargs, argvec with array_view. (evaluate_funcall): Update.
2020-12-15C++-ify Ada component interval handlingTom Tromey2-74/+43
The Ada component interval handling code, used for aggregate assignments, does a pre-pass over the sub-expressions so that it can size an array. For my expression rewrite, it was handy to C++-ify this. gdb/ChangeLog 2020-12-15 Tom Tromey <tom@tromey.com> * ada-lang.c (num_component_specs): Remove. (assign_aggregate): Update. (aggregate_assign_positional, aggregate_assign_from_choices) (aggregate_assign_others, add_component_interval): Change arguments.
2020-12-16Automatic date update in version.inGDB Administrator1-1/+1
2020-12-15Cosmetic improvements for OSABI access.Cary Coutant7-14/+33
Add accessor methods to elfcpp::Ehdr class for EI_OSABI and EI_ABIVERSION; use those to simplify initialization of Osabi class and eliminate the need to template the class. elfcpp/ * elfcpp.h (class Ehdr): Add get_ei_osabi and get_ei_abiversion methods. gold/ * dwp.cc (class Dwo_file): Use new Ehdr::get_ei_osabi and get_ei_abiversion methods. * incremental.cc (make_sized_incremental_binary): Likewise. * object.cc (Sized_relobj_file::Sized_relobj_file): Likewise. (make_elf_sized_object): Likewise. * object.h (class Osabi): Make the class untemplated.
2020-12-15gold: Add missing ChangeLog entries for commit ff4bc37d7H.J. Lu2-0/+30
2020-12-15Highlight deprecated commands using title styleTom Tromey4-7/+32
After Andrew's latest patch, I noticed that the deprecation warnings could use the (so-called) title style when printing command names. This patch implements this idea. gdb/ChangeLog 2020-12-15 Tom Tromey <tromey@adacore.com> * cli/cli-decode.c (deprecated_cmd_warning): Use title style for command names. gdb/testsuite/ChangeLog 2020-12-15 Tom Tromey <tromey@adacore.com> * gdb.base/style.exp: Add deprecation tests.
2020-12-16PR27071, gas bugs uncovered by fuzzingAlan Modra4-8/+34
PR 27071 * config/obj-elf.c (elf_obj_symbol_clone_hook): New function. (elf_format_ops): Set symbol_clone_hook. * config/obj-elf.h (elf_obj_symbol_clone_hook): Declare. (obj_symbol_clone_hook): Define. * listing.c (buffer_line): Avoid integer overflow on paper_width set to zero.
2020-12-15Add support for the SDIV and UDIV instructions to the ARM simulator.Jens Bauer4-19/+132
* armemu.c (handle_v6_insn): Add support for SDIV and UDIV. * thumbemu.c (handle_T2_insn): Likewise.
2020-12-15[gdb/testsuite] Handle PS1 quirk in gdb.base/multi-line-starts-subshell.expTom de Vries1-3/+3
On SLE-11, I run into: ... (gdb) if 1^M >shell HOME=/dev/null PS1="gdb-subshell$ " /bin/sh^M >end^M hostname:/dir> FAIL: gdb.base/multi-line-starts-subshell.exp: \ spawn subshell from multi-line (timeout) ... The problem is that the PS1 setting has no effect, due to a bug on older openSUSE/SLE version. The mechanism there is: - /etc/profile sets ENV=/etc/bash.bashrc - /bin/sh is started - /bin/sh executes ENV, in other words /etc/bash.bashrc - during the execution of /etc/bash.bashrc, PS1 is set unconditionally Fix this by setting PS1 after spawning the subshell. Tested on x86_64-linux. 2020-12-15 Tom de Vries <tdevries@suse.de> PR testsuite/26952 * gdb.base/multi-line-starts-subshell.exp: Set PS1 after spawning shell.
2020-12-15Implement and document -z unique / -z nounique handling in goldVivek Das Mohapatra3-0/+15
* layout.cc (Layout::finish_dynamic_section): Set DF_GNU_1_UNIQUE. * options.h (class General_options): Handle -z unique, -z nounique.
2020-12-15Define DT_GNU_FLAGS_1 and DF_GNU_1_UNIQUE for goldVivek Das Mohapatra2-0/+12
* elfcpp.h (enum DT): New enum member DT_GNU_FLAGS_1. (enum DF_GNU_1): New enum DF_GNU_1 containing DF_GNU_1_UNIQUE.
2020-12-15Handle DT_GNU_FLAGS_1 in readelfVivek Das Mohapatra2-0/+28
* readelf.c (get_dynamic_type): Handle DT_GNU_FLAGS_1. (process_dynamic_section): Likewise.
2020-12-15Document -z unique/-z nounique in the ld man page and help outputVivek Das Mohapatra3-0/+16
* ld.texi (Options): Document -z unique and -z nounique. * lexsup.c (elf_shlib_list_options): Likewise.
2020-12-15Handle -z unique/-z nounique in ldVivek Das Mohapatra6-1/+22
Add (or suppress) a DT_GNU_FLAGS_1 dynamic section with a bit flag value of DF_GNU_1_UNIQUE. bfd/ * elflink.c (bfd_elf_size_dynamic_sections): Call _bfd_elf_add_dynamic_entry to add a DT_GNU_FLAGS_1 section. include/ * bfdlink.h (struct bfd_link_info): New field gnu_flags_1. ld/ * emultempl/elf.em (gld${EMULATION_NAME}_handle_option): Parse -z unique / -z nounique options.
2020-12-15Define a new DT_GNU_FLAGS_1 dynamic section for ld, readelf et alVivek Das Mohapatra2-0/+8
DT_GNU_FLAGS_1 added to the DT_VALRNGLO-DT_VALRNGHI range. DT_GNU_FLAGS_1 value DF_GNU_1_UNIQUE added. * elf/common.h (DT_GNU_FLAGS_1, DF_GNU_1_UNIQUE): Define.
2020-12-14gdb/testsuite: fix typo in gdb_test_multiple docSimon Marchi2-1/+5
gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_test_multiple): Fix typo in doc. Change-Id: Ieb188b3382395ce951bfba5a5f25aaea0f89ebf9
2020-12-15Automatic date update in version.inGDB Administrator1-1/+1
2020-12-14Keep input SHF_GNU_RETAIN sections and strip output SHF_GNU_RETAIN for ↵Cary Coutant9-20/+294
GNU/FreBSD ELFOSABIs. 2020-12-14 H.J. Lu <hjl.tools@gmail.com> Cary Coutant <ccoutant@gmail.com> elfcpp/ PR gold/27039 * elfcpp.h (SHF): Add SHF_GNU_RETAIN. gold/ PR gold/27039 * layout.cc (Layout::layout): Strip SHF_GNU_RETAIN. * object.cc (Sized_relobj_file::Sized_relobj_file): Initialize osabi_. (Sized_relobj_file::do_layout): Keep SHF_GNU_RETAIN sections for GNU/FreBSD ELFOSABIs. * object.h (Osabi) New class. (Sized_relobj_file): Add osabi() and osabi_. * testsuite/Makefile.am (check_SCRIPTS): Add retain.sh. (check_DATA): Add retain_1.out retain_2.out. (MOSTLYCLEANFILES): Add retain_1 retain_2. (retain_1.out): New target. (retain_1): Likewise. (retain_1.o): Likewise. (retain_2.out): Likewise. (retain_2): Likewise. (retain_2.o): Likewise. * testsuite/Makefile.in: Regenerate. * testsuite/retain.sh: New file. * testsuite/retain_1.s: Likewise. * testsuite/retain_2.s: Likewise.
2020-12-14Add form used for SPECIAL_expr as comment in testsuite Dwarf AssemblerMark Wielaard2-1/+16
Replace the "SPECIAL_expr" comment with either "DW_FORM_block" or "DW_FORM_exprloc" in the abbrev. gdb/testsuite/ChangeLog: * lib/dwarf.exp (Dwarf::_handle_attribute): Handle SPECIAL_expr specially, set attr_form_comment to the actual FORM string used.
2020-12-14Use DW_FORM_exprloc in testsuite Dwarf Assembler for DWARF version 4+.Mark Wielaard2-5/+16
Since DWARF version 4 expressions are represented by DW_FORM_exprloc instead of a block form. Support this in the testsuite Dwarf Assembler by setting the SPECIAL_expr form once we know the CU version. This doesn't change any testsuite results, it just makes the produced DWARF valid. gdb also accepts expressions in block form for DWARF version 4 and above, but this is technically incorrect. gdb/testsuite/ChangeLog: * lib/dwarf.exp (Dwarf::_read_constants): Don't set _constants(SPECIAL_expr) here, but set it... (Dwarf::cu): ...here based on _cu_version.
2020-12-14[gdb/testsuite] Don't pass -fPIC to gdb_compile_shlibTom de Vries12-23/+38
When running test-case gdb.base/info-shared.exp, I see in gdb.log: ... Executing on host: \ gcc ... -fPIC -fpic -c -o info-shared-solib1.c.o info-shared-solib1.c ... The -fPIC comes from the test-case: ... if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 \ [list additional_flags=-fPIC]] != "" } { ... but the -fpic, which overrides the -fPIC comes from gdb_compile_shlib. The proc gdb_compile_shlib adds the -fpic or similar dependent on platform and compiler. However, in some cases it doesn't add anything, which is probably why all those test-case pass -fPIC. Fix this by removing -fPIC from all the calls to gdb_compile_shlib, and ensuring that gdb_compile_shlib takes care of adding it, if required. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-12-14 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (gdb_compile_shlib): Make sure it's not necessary to pass -fPIC. * gdb.ada/catch_ex_std.exp: Don't pass -fPIC to gdb_compile_shlib. * gdb.base/break-probes.exp: Same. * gdb.base/ctxobj.exp: Same. * gdb.base/dso2dso.exp: Same. * gdb.base/global-var-nested-by-dso.exp: Same. * gdb.base/info-shared.exp: Same. * gdb.base/jit-reader-simple.exp: Same. * gdb.base/print-file-var.exp: Same. * gdb.base/skip-solib.exp: Same. * gdb.btrace/dlopen.exp: Same.
2020-12-14Do not manually dissect OP_TYPE operationsTom Tromey3-29/+15
Some code in GDB will examine the structure of an expression to see if it starts with OP_TYPE, and then proceed to extract the type by hand. There is no need to do this dissection manually. evaluate_type does the same thing via an "allowed" API. This patch changes such code to use evaluate_type. In two cases this simplifies the code. Regression tested on x86-64 Fedora 28. gdb/ChangeLog 2020-12-14 Tom Tromey <tom@tromey.com> * dtrace-probe.c (dtrace_process_dof_probe): Use value_type. * typeprint.c (whatis_exp): Always use evaluate_type. (maintenance_print_type): Likewise. Simplify.
2020-12-14[gdb/testsuite] Handle missing xz in gdb.base/gnu-debugdata.expTom de Vries2-1/+10
When running test-case gdb.base/gnu-debugdata.exp on SLE-11, I run into: ... FAIL: gdb.base/gnu-debugdata.exp: xz ... The fact that xz is not installed does not mean there's a fail, merely that the test is unsupported. Fix this by detecting the "spawn failed" reply in run_on_host and issuing UNSUPPORTED instead. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-12-14 Tom de Vries <tdevries@suse.de> PR testsuite/26963 * lib/gdb.exp (run_on_host): Declare test unsupported if spawn fails.
2020-12-14[gdb/testsuite] Handle no glibc debuginfo in gdb.base/solib-corrupted.expTom de Vries2-1/+17
When running test-case gdb.base/solib-corrupted.exp on SLE-11, I get: ... (gdb) PASS: gdb.base/solib-corrupted.exp: normal list p/x _r_debug->r_map->l_next = _r_debug->r_map^M '_r_debug' has unknown type; cast it to its declared type^M (gdb) FAIL: gdb.base/solib-corrupted.exp: make solibs looping ... The reason that _r_debug has unknown type is that glibc debuginfo is not installed. The test-case attempts to detect this but doesn't handle this particular error string. Fix this by adding the "unknown type" line to the regexp detecting missing glibc debuginfo. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-12-14 Tom de Vries <tdevries@suse.de> PR testsuite/26962 * gdb.base/solib-corrupted.exp: Handle "'_r_debug' has unknown type; cast it to its declared type".
2020-12-14[gdb/testsuite] Handle shell prompt in batch-preserve-term-settings.expTom de Vries2-3/+12
On SLE-11, I run into: ... FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell \ (timeout) ... The problem is that the shell prompt has PS1="\h:\w> ", but the test expects a shell prompt ending in a space preceded by either '$' or '#': ... set shell_prompt_re "\[$#\] " ... We could easily fix this by adding '>' to shell_prompt_re, but this wouldn't work for other PS1 setting. Fix this instead by setting the shell prompt to "gdb-subshell$ " (as in gdb.base/multi-line-starts-subshell.exp). Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-12-14 Tom de Vries <tdevries@suse.de> PR testsuite/26951 * gdb.base/batch-preserve-term-settings.exp: Use "gdb-subshell$ " as shell prompt.
2020-12-14Handle block-local names for AdaTom Tromey6-25/+92
GNAT can generate a mangled name with "B_N" (where N is a number) in the middle, like "hello__B_1__fourth.0". This is used for names local to a block. Multiple levels of block-local name can also occur, a possibility that was neglected by v1 of this patch. This patch changes gdb to handle these names. The wild name matcher is updated a straightforward way. The full matcher is rewritten. The hash function is updated to ensure that this works. This version does not seem to have the performance problems that affected v1. In particular, the previously-slow "bt" problem has been fixed. gdb/ChangeLog 2020-12-14 Tom Tromey <tromey@adacore.com> * dictionary.c (language_defn::search_name_hash): Ignore "B". * ada-lang.c (advance_wild_match): Ignore "B". (full_match): Remove. (do_full_match): Rewrite. gdb/testsuite/ChangeLog 2020-12-14 Tom Tromey <tromey@adacore.com> * gdb.ada/nested.exp: Add new tests. * gdb.ada/nested/hello.adb (Fourth, Fifth): New procedures.
2020-12-14Use exact match in get_var_valueTom Tromey2-3/+9
get_var_value is only used when an exact match is needed. This changes this function to ensure this sort of matching is done. gdb/ChangeLog 2020-12-14 Tom Tromey <tromey@adacore.com> * ada-lang.c (get_var_value): Only consider exact matches.
2020-12-14Be more careful when rewriting thick pointer array typeTom Tromey4-13/+162
To handle thick pointers with -fgnat-encodings=minimal, gdb will rewrite the underlying array type to remove the bounds. However, if the same DWARF type is used both for a thick pointer and for an ordinary array, this will have the side effect of removing the bounds from the array. This breaks the printing of objects of this type. This patch fixes the problem by copying the array type, its range, and its bounds. gdb/ChangeLog 2020-12-14 Tom Tromey <tromey@adacore.com> * dwarf2/read.c (rewrite_array_type): New function. (quirk_ada_thick_pointer_struct): Use rewrite_array_type. gdb/testsuite/ChangeLog 2020-12-14 Tom Tromey <tromey@adacore.com> * gdb.dwarf2/ada-thick-pointer.exp: New file.
2020-12-14Handle fixed-point division by zeroTom Tromey4-0/+13
fixed_point_binop did not account for division by zero. This would lead to gdb getting SIGFPE and subsequently cause some test cases to hang. gdb/ChangeLog 2020-12-14 Tom Tromey <tromey@adacore.com> * valarith.c (fixed_point_binop): Call error on division by zero. gdb/testsuite/ChangeLog 2020-12-14 Tom Tromey <tromey@adacore.com> * gdb.dwarf2/dw2-fixed-point.exp: Add test for division by zero.
2020-12-14Add a plugin for processing static library dependencies.Howard Chu7-1524/+2180
* libdep_plugin.c: New file: Processes archives that contain a special library dependencies element. * Makefile.am: Add build rules for libdep_plugin. * Makefile.in: Regenerate. * NEWS: Mention the new plugin. * ld.texi: Document the new plugin.
2020-12-14Put bfd_section_from_shdr loop detection array in elf_tdataAlan Modra4-45/+20
The static variables used by bfd_section_from_shdr to detect loops in ELF sections have a problem: Comparing a BFD pointer doesn't guarantee that the current bfd is the same as the one previously used to allocate the sections_being_created array. For example, doing size bad_elf_1 bad_elf_2 with two corrupted ELF files containing section loops will leave the section_being_created array allocated for the first file and since bfd_close is called for bad_elf_1 before bfd_elf_2 is opened, it is possible that the BFD for the second file is allocated in the same memory as the first file. If bad_elf_2 has more sections than bad_elf_1 then we might write beyond the end of the array. So this patch implements the FIXME Nick put in a comment about attaching the array to the BFD. * elf-bfd.h (struct elf_obj_tdata): Add being_created. * elf.c (bfd_section_from_shdr): Delete static vars for loop detection. Use new tdata variable instead. * elfcode.h (elf_object_p): Allocate being_created.
2020-12-14PR26836, memory leak in parse_argsAlan Modra2-0/+10
PR 26836 * lexsup.c (parse_args): Free really_longopts, longopts and shortopts.
2020-12-14Fix a use of an uninitialised variable in the bfd linker.Nick Clifton2-1/+7
PR 27050 * lexsup.c (parse_args): Ensure that the longind local variable is set.
2020-12-14Solaris 11.4 ld build failureAlan Modra2-4/+9
/usr/include/sys/mman.h:81:0: note: this is the location of the previous definition #define SHARED 0x10 PR 27064 * deffilep.y (SHARED_K): Rename from SHARED. Update uses.
2020-12-14rx-elf FAIL: SHF_GNU_RETAIN sections 27Alan Modra2-10/+16
rx-elf is an odd target with non-standard names for default text, data and bss sections. This patch tweaks a new test to make it pass. * testsuite/gas/elf/section27.s: Reorder .text, .data and .bss so that output section order does not depend on those sections being already created. Use ".section .text" rather than ".text".
2020-12-14sim/mips/cp1.c: Include <stdlib.h> for abort() declarationPavel I. Kryukov2-0/+6
sim/mips/ChangeLog: * cp1.c: Include <stdlib.h>
2020-12-13Re-enable incremental tests that were failing with GCC 9+.Cary Coutant3-55/+58
gold/ PR gold/23539 PR gold/24123 * testsuite/Makefile.am (incremental_copy_test): Re-enable for GCC 9+. (incremental_comdat_test_1): Likewise. * testsuite/Makefile.in: Regenerate.
2020-12-14Automatic date update in version.inGDB Administrator1-1/+1
2020-12-13Fix incremental tests using gcc 9, which adds Gnu properties sections.Cary Coutant2-0/+10
During an incremental link, we should simply ignore the Gnu properties sections. We were not handling them properly -- failing to process the properties from the base file. While that could be fixed, the property sections are meant for deployed binaries, and incremental linking is for development, so keeping the properties sections just adds to the likelihood of forcing a full link sooner. gold/ PR gold/23539 * object.cc (Sized_relobj_file::layout_gnu_property_section): Ignore Gnu properties during incremental links.
2020-12-13Fix incremental linking with rodata merge sections.Cary Coutant2-1/+8
When processing the incremental update, incoming .rodata merge sections do not match the corresponding section in the base file, because the SHF_MERGE flag had not been masked out of the latter. gold/ PR gold/24123 * layout.cc (Layout::init_fixed_output_section): Mask out flags that should be ignored when matching sections.
2020-12-13Update ELF headers and readelf with recent e_machine assignments.Cary Coutant4-1/+36
binutils/ * readelf.c (get_machine_name): Update list of e_machine values. include/ * elf/common.h: Update list of e_machine values.
2020-12-13Constify parse_and_eval_typeTom Tromey4-3/+9
I noticed that the argumen to parse_and_eval_type could be "const". This patch implements this change. I wonder if this could be removed. It's only called via check_stub_method_group, which seems questionable to me. However, I didn't look into doing this. gdb/ChangeLog 2020-12-13 Tom Tromey <tom@tromey.com> * gdbtypes.c (safe_parse_type): Make argument const. * value.h (parse_and_eval_type): Make argument const. * eval.c (parse_and_eval_type): Make argument const.
2020-12-13[gdb/testsuite] Fix gdb.base/endianity.exp with gcc-4.8Tom de Vries2-4/+13
When running test-case gdb.base/endianity.exp using gcc-4.8, we get: ... (gdb) x/x &o.v^M 0x7fffffffd120: 0x00000004^M (gdb) XFAIL: gdb.base/endianity.exp: x/x &o.v x/xh &o.w^M 0x7fffffffd124: 0x0003^M (gdb) FAIL: gdb.base/endianity.exp: x/xh &o.w ... The gcc 4.8 compiler does not support the scalar_storage_order attribute, so the testcase is compiled without that attribute, and the expected results are different. Fix this by rather than xfailing, skipping the tests if the compiler does not support the scalar_storage_order attribute. Tested on x86_64-linux, with gcc-4.8, gcc-7, and clang-10. gdb/testsuite/ChangeLog: 2020-12-13 Tom de Vries <tdevries@suse.de> PR testsuite/26953 * gdb.base/endianity.exp: Skip tests requiring scalar_storage_order attribute support if compiler doesn't support it.