aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-05-07x86-64/ELF: clear src_mask for all reloc typesJan Beulich9-67/+119
x86-64 uses rela relocations. The comment next to the field's declaration says "Non-zero values for ELF USE_RELA targets should be viewed with suspicion ..." And indeed the fields being non-zero causes section contents to be accumulated into the final relocated values in addition to the relocations' addends, which is contrary to the ELF spec.
2021-05-07x86: don't mix disp and imm processingJan Beulich2-1/+6
Surely disp processing should access the disp operand, not an imm one. This is not an active issue only because imms and disps are, at the moment, overlapping fields of the same union.
2021-05-07x86: move register check in immediate operand parsingJan Beulich2-7/+13
i386_finalize_immediate() is used for both AT&T and Intel immediate operand handling. Move an AT&T-only check to i386_immediate(), which at the same time allows it to cover other cases as well, giving an overall better / more consistent diagnostic.
2021-05-07x86: minor improvements to optimize_imm()Jan Beulich2-8/+11
- Drop a pointless & where just before it was checked that the respective bits are clear already anyway. - Avoid a not really necessary operand_type_set() and a redundant operand_type_or() / operand_type_and() pair.
2021-05-07When computing section link order for a relocateable link, ignore section sizes.Nick Clifton2-6/+14
* ldelfgen.c (compare_link_order): Ignore section size when performing a relocateable link.
2021-05-07gdb/guile: Have gdbscm_safe_source_script return a unique_ptrAndrew Burgess5-15/+18
Change gdbscm_safe_source_script to return a gdb::unique_xmalloc_ptr<char> instead of a raw char*. Update the users of this function. There should be no user visible change after this commit. gdb/ChangeLog: * guile/guile-internal.h (gdbscm_safe_source_script): Change function return type. * guile/guile.c (gdbscm_source_script): Update to handle change in gdbscm_safe_source_script. * guile/scm-objfile.c (gdbscm_source_objfile_script): Likewise. * guile/scm-safe-call.c (gdbscm_safe_source_script): Change return type.
2021-05-07dwarf: Don't omit second operand of '?' operatorMichael Forney2-3/+11
This is a GNU C extension and is not valid in ISO C. * dwarf.c: Don't omit second operand of '?' operator.
2021-05-07multiple definition warnings from script symbolsAlan Modra3-4/+14
In commit 89753bbf81 I enabled a warning for scripts redefining symbols. The idea was to not warn for symbols defined by shared libraries (the h->u.def.section->output_section != NULL test), but the test failed to take into account absolute symbols. Absolute symbols defined in shared libraries are currently indistinguishable from absolute symbols defined in relocatable objects, at least when only looking at struct bfd_link_hash_entry. So, don't warn for any absolute symbols. * ldexp.c (update_definedness): Don't return false for absolute symbols. * ldmain.c (multiple_definition): Print "warning: " in message when not a hard error.
2021-05-07sim: m32c: clean up various warningsMike Frysinger5-21/+41
A random grab bag of minor fixes to enable -Werror for this port. Check the return values of read & write calls and issue warnings when they fail. Fixup funky pointer math as the compiler doesn't like ++ on void*. Handle short reads with fread().
2021-05-07sim: m32c: fix warnings about mixing code & declsMike Frysinger3-1/+31
Add scope braces to a bunch of the generated sections to avoid compiler warnings about mixing code & variable declarations.
2021-05-07sim: m32c: switch from custom fgets to getlineMike Frysinger5-105/+17
No need to implement this ourselves when POSIX has a nice API.
2021-05-06sim: m68hc11: fix up last warningsMike Frysinger4-105/+113
Change the printf formats a little to fix the last build warnings in here, and then turn on -Werror by default for the arch port.
2021-05-06sim: m68hc11: warn when emul_write failsMike Frysinger2-2/+10
Not sure what we should do here when this fails, so just emit a warning for now to satisfy unused result compiler warnings. We can see if any users actually notice here.
2021-05-07Regenerate bfd-in2.h and libbfd.hAlan Modra3-2/+7
Commit 0b3e14c90283 edited these by hand. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate.
2021-05-07Automatic date update in version.inGDB Administrator1-1/+1
2021-05-07Re: elf: Always append ".COUNT" to local symbolsAlan Modra3-4/+7
Fixes XPASSes on frv-linux. * testsuite/ld-elf/pr27825-1.d: Correct xfail. * testsuite/ld-elf/pr27825-2.d: Likewise.
2021-05-06gdb: make inferior::args a unique_xmalloc_ptrSimon Marchi4-6/+16
Use unique_xmalloc_ptr to avoid manual memory management. gdb/ChangeLog: * inferior.h (class inferior) <args>: Change type to unique_xmalloc_ptr. * inferior.c (inferior::~inferior): Don't free args. * infcmd.c (get_inferior_args): Adjust. (set_inferior_args): Adjust. Change-Id: I96300e59eb2faf2d80660416a8f5694d243a944e
2021-05-06gdbserver/server: make some functions voidTankut Baris Aktemur2-24/+16
The 'handle_v_attach', 'handle_v_run', and 'handle_v_kill' functions' return values are unused. They indicate error/success result by putting packets. Make the functions void. Tested by rebuilding. gdbserver/ChangeLog: 2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * server.cc (handle_v_attach) (handle_v_run) (handle_v_kill): Make void.
2021-05-06or1k: Support large plt_relocs when generating plt entriesStafford Horne9-39/+248
The current PLT generation code will generate invalid code when the PLT relocation offset exceeds 64k. This fixes the issue by detecting large plt_reloc offsets and generare code sequences to create larger plt relocations. The "large" plt code needs 2 extra instructions to create 32-bit offsets. bfd/ChangeLog: PR 27746 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT, OR1K_ADD, OR1K_ORI): New macros to help with plt creation. (elf_or1k_link_hash_table): New field plt_count. (elf_or1k_link_hash_entry): New field plt_index. (elf_or1k_plt_entry_size): New function. (or1k_write_plt_entry): Update to support variable size PLTs. (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry API. (or1k_elf_finish_dynamic_symbol): Update to write large PLTs when needed. (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for PLT size. ld/ChangeLog: PR 27746 testsuite/ld-or1k/or1k.exp (or1kplttests): Add tests for linking along with gotha() relocations. testsuite/ld-or1k/gotha1.dd: New file. testsuite/ld-or1k/gotha1.s: New file. testsuite/ld-or1k/gotha2.dd: New file. testsuite/ld-or1k/gotha2.s: New file testsuite/ld-or1k/pltlib.s (x): Define size to avoid link failure.
2021-05-06or1k: Avoid R_OR1K_GOT16 overflow failures in presence of R_OR1K_GOT_AHI16Stafford Horne2-0/+18
Now that we support R_OR1K_GOT_AHI16 we can relax the R_OR1K_GOT16 overflow validation check if the section has R_OR1K_GOT_AHI16. We cannot simple disable R_OR1K_GOT16 overflow validation as there will still be binaries that will have only R_OR1K_GOT16. The R_OR1K_GOT_AHI16 relocation will only be added by GCC when building with the option -mcmodel=large. This assumes that R_OR1K_GOT_AHI16 will come before R_OR1K_GOT16, which is the code pattern that will be emitted by GCC. bfd/ChangeLog: PR 21464 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16 overflow check if we have R_OR1K_GOT_AHI16 followed by R_OR1K_GOT16.
2021-05-06or1k: Implement relocation R_OR1K_GOT_AHI16 for gotha()Stafford Horne14-4/+77
The gotha() relocation mnemonic will be outputted by OpenRISC GCC when using the -mcmodel=large option. This relocation is used along with got() to generate 32-bit GOT offsets. This increases the previous GOT offset limit from the previous 16-bit (64K) limit. This is needed on large binaries where the GOT grows larger than 64k. bfd/ChangeLog: PR 21464 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation. * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise. (or1k_final_link_relocate, or1k_elf_relocate_section, or1k_elf_check_relocs): Likewise. * libbfd.h (bfd_reloc_code_real_names): Likewise. * reloc.c: Likewise. cpu/ChangeLog: PR 21464 * or1k.opc (or1k_imm16_relocs, parse_reloc): Define parse logic for gotha() relocation. include/ChangeLog: PR 21464 * elf/or1k.h (elf_or1k_reloc_type): Define R_OR1K_GOT_AHI16 number. opcodes/ChangeLog: PR 21464 * or1k-asm.c: Regenerate. gas/ChangeLog: PR 21464 * testsuite/gas/or1k/reloc-1.s: Add test for new relocation. * testsuite/gas/or1k/reloc-1.d: Add test result for new relocation. Cc: Giulio Benetti <giulio.benetti@benettiengineering.com> fixup reloc, add tests
2021-05-06or1k: Fix issue with plt link failure for local callsStafford Horne2-5/+11
When building protobuf we were seeing the assert failure: /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377 /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377 /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377 collect2: error: ld returned 1 exit status This failure happens while writing out PLT entries, there is a check "BFD_ASSERT (h->dynindx != -1)" to confirm all plt entries have dynamic symbol attributes. This was failing for symbols that were "forced_local" in previous linking code. The fix adds logic to or1k_elf_adjust_dynamic_symbol to identify "forced_local" symbols and exclude them from the the PLT. bfd/ChangeLog: PR 27624 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change condition used to cleanup plt entries to cleanup forced local entries. Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
2021-05-06gdb/guile: don't try to print location for watchpointsAndrew Burgess4-5/+21
Currently, using the guile API, if a user tries to print a breakpoint object that represents a watchpoint, then GDB will crash. For example: (gdb) guile (use-modules (gdb)) (gdb) guile (define wp1 (make-breakpoint "some_variable" #:type BP_WATCHPOINT #:wp-class WP_WRITE)) (gdb) guile (register-breakpoint! wp1) (gdb) guile (display wp1) (newline) Aborted (core dumped) This turns out to be because GDB calls event_location_to_string on the breakpoints location, and watchpoint breakpoints don't have a location. This commit resolves the crash by just skipping the printing of the location if the breakpoint doesn't have one. Potentially, we could improve on this by printing details about what the watchpoint is watching, however, I'm considering this a possible future enhancement, this commit focuses just on having GDB not crash. gdb/ChangeLog: * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob): Only print breakpoint locations when the breakpoint actually has a location. gdb/testsuite/ChangeLog: * gdb.guile/scm-breakpoint.exp (test_watchpoints): Print the watchpoint object before and after registering it with GDB.
2021-05-06gdb/testsuite: use proc_with_prefix in gdb.guile/scm-breakpoint.expAndrew Burgess2-424/+423
Convert gdb.guile/scm-breakpoint.exp to use proc_with_prefix instead of using nested with_test_prefix calls. Allows a level of indentation to be removed from most of the test procs. There were two procs that didn't use with_test_prefix, but I converted them to be proc_with_prefix anyway, for consistency. gdb/testsuite/ChangeLog: * gdb.guile/scm-breakpoint.exp (test_bkpt_basic): Convert to 'proc_with_prefix', remove use of 'with_test_prefix', and reindent. (test_bkpt_deletion): Likewise. (test_bkpt_cond_and_cmds): Likewise. (test_bkpt_invisible): Likewise. (test_watchpoints): Likewise. (test_bkpt_internal): Likewise. (test_bkpt_eval_funcs): Likewise. (test_bkpt_registration): Likewise. (test_bkpt_address): Convert to 'proc_with_prefix'. (test_bkpt_probe): Likewise.
2021-05-06gdb/testsuite: resolve duplicate test names in gdb.guile/scm-breakpoint.expAndrew Burgess2-10/+19
Extend some test names to avoid duplicates. gdb/testsuite/ChangeLog: * gdb.guile/scm-breakpoint.exp (test_bkpt_basic): Extend test names to avoid duplicates. (test_bkpt_cond_and_cmds): Likewise. (test_bkpt_eval_funcs): Likewise.
2021-05-06gdb/mi: add a '--force' flag to the '-break-condition' commandTankut Baris Aktemur11-29/+147
Add a '--force' flag to the '-break-condition' command to be able to force conditions. gdb/ChangeLog: 2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * mi/mi-cmd-break.c (mi_cmd_break_condition): New function. * mi/mi-cmds.c: Change the binding of "-break-condition" to mi_cmd_break_condition. * mi/mi-cmds.h (mi_cmd_break_condition): Declare. * breakpoint.h (set_breakpoint_condition): Declare a new overload. * breakpoint.c (set_breakpoint_condition): New overloaded function extracted out from ... (condition_command): ... this. * NEWS: Mention the change. gdb/testsuite/ChangeLog: 2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.mi/mi-break.exp (test_forced_conditions): Add a test for the -break-condition command's "--force" flag. gdb/doc/ChangeLog: 2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.texinfo (GDB/MI Breakpoint Commands): Mention the '--force' flag of the '-break-condition' command.
2021-05-06gdb/mi: add a '--force-condition' flag to the '-break-insert' cmdTankut Baris Aktemur7-3/+61
Add a '--force-condition' flag to the '-break-insert' command to be able to force conditions. Because the '-dprintf-insert' command uses the same mechanism as the '-break-insert' command, it obtains the '--force-condition' flag, too. gdb/ChangeLog: 2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Recognize the '--force-condition' flag to force the condition in the '-break-insert' and '-dprintf-insert' commands. * NEWS: Mention the change. gdb/testsuite/ChangeLog: 2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.mi/mi-break.exp (test_forced_conditions): New proc that is called by the test. gdb/doc/ChangeLog: 2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.texinfo (GDB/MI Breakpoint Commands): Mention the '--force-condition' flag of the '-break-insert' and '-dprintf-insert' commands.
2021-05-06libctf, ld: fix test results for upstream GCCNick Alcock16-22/+89
The tests currently in binutils are aimed at the original GCC-based implementation of CTF, which emitted CTF directly from GCC's internal representation. The approach now under review emits CTF from DWARF, with an eye to eventually doing this for all non-DWARF debuginfo-like formats GCC supports. It also uses a different flag to enable CTF emission (-gctf rather than -gt). Adjust the testsuite accordingly. Given that the ld testsuite results are dependent on type ordering, which we do not guarantee at all, it's amazing how little changes. We see a few type ordering differences, slices change because the old GCC was buggy (slices were emitted "backwards", from the wrong end of the machine word) and its expected results were wrong, and GCC now emits the underlying integral type for enumerated types, though CTF has no way to record this yet (coming in v4). GCC also now emits even hidden symbols into the symtab (and thus symtypetab), so one symtypetab test changes its expected results slightly to compensate. Also add tests for the CTF_K_UNKNOWN nonrepresentable type: this couldn't be done before now since the only GCC that emits CTF_K_UNKNOWN for nonrepresentable types is the new one. ld/ChangeLog 2021-05-06 Nick Alcock <nick.alcock@oracle.com> * testsuite/ld-ctf/ctf.exp: Use -gctf, not -gt. * testsuite/lib/ld-lib.exp: Likewise. * testsuite/ld-ctf/nonrepresentable-1.c: New test for nonrepresentable types. * testsuite/ld-ctf/nonrepresentable-2.c: Likewise. * testsuite/ld-ctf/nonrepresentable.d: Likewise. * testsuite/ld-ctf/array.d: Larger type section. * testsuite/ld-ctf/data-func-conflicted.d: Likewise. * testsuite/ld-ctf/enums.d: Likewise. * testsuite/ld-ctf/conflicting-enums.d: Don't compare types. * testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Changed type order. * testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise. * testsuite/ld-ctf/slice.d: Adjust for improved slice emission. libctf/ChangeLog 2021-05-06 Nick Alcock <nick.alcock@oracle.com> * testsuite/lib/ctf-lib.exp: Use -gctf, not -gt. * testsuite/libctf-regression/nonstatic-var-section-ld-r.lk: Hidden symbols now get into the symtypetab anyway.
2021-05-06libctf, include: support an alternative encoding for nonrepresentable typesNick Alcock10-11/+78
Before now, types that could not be encoded in CTF were represented as references to type ID 0, which does not itself appear in the dictionary. This choice is annoying in several ways, principally that it forces generators and consumers of CTF to grow special cases for types that are referenced in valid dicts but don't appear. Allow an alternative representation (which will become the only representation in format v4) whereby nonrepresentable types are encoded as actual types with kind CTF_K_UNKNOWN (an already-existing kind theoretically but not in practice used for padding, with value 0). This is backward-compatible, because CTF_K_UNKNOWN was not used anywhere before now: it was used in old-format function symtypetabs, but these were never emitted by any compiler and the code to handle them in libctf likely never worked and was removed last year, in favour of new-format symtypetabs that contain only type IDs, not type kinds. In order to link this type, we need an API addition to let us add types of unknown kind to the dict: we let them optionally have names so that GCC can emit many different unknown types and those types with identical names will be deduplicated together. There are also small tweaks to the deduplicator to actually dedup such types, to let opening of dicts with unknown types with names work, to return the ECTF_NONREPRESENTABLE error on resolution of such types (like ID 0), and to print their names as something useful but not a valid C identifier, mostly for the sake of the dumper. Tests added in the next commit. include/ChangeLog 2021-05-06 Nick Alcock <nick.alcock@oracle.com> * ctf.h (CTF_K_UNKNOWN): Document that it can be used for nonrepresentable types, not just padding. * ctf-api.h (ctf_add_unknown): New. libctf/ChangeLog 2021-05-06 Nick Alcock <nick.alcock@oracle.com> * ctf-open.c (init_types): Unknown types may have names. * ctf-types.c (ctf_type_resolve): CTF_K_UNKNOWN is as non-representable as type ID 0. (ctf_type_aname): Print unknown types. * ctf-dedup.c (ctf_dedup_hash_type): Do not early-exit for CTF_K_UNKNOWN types: they have real hash values now. (ctf_dedup_rwalk_one_output_mapping): Treat CTF_K_UNKNOWN types like other types with no referents: call the callback and do not skip them. (ctf_dedup_emit_type): Emit via... * ctf-create.c (ctf_add_unknown): ... this new function. * libctf.ver (LIBCTF_1.2): Add it.
2021-05-06sim: h8300 special case testYoshinori Sato4-2/+37
In "mov. [bwl] reg, @ -reg", added a special case test using the same register.
2021-05-05sim: m32c/rl78/rx: fix command parsingMike Frysinger6-80/+59
Use buildargv to avoid writing to const memory and freeing invalid pointers, and to avoid doing any string parsing ourselves.
2021-05-05elf: Always append ".COUNT" to local symbolsH.J. Lu11-21/+99
Always append ".COUNT" to local symbols to avoid potential conflicts with existing local symbol "XXX.COUNT". bfd/ PR ld/27825 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT" to local symbols. ld/ PR ld/27825 * testsuite/ld-elf/pr27825-1.d: New file. * testsuite/ld-elf/pr27825-1a.s: Likewise. * testsuite/ld-elf/pr27825-1b.s: Likewise. * testsuite/ld-elf/pr27825-2.d: Likewise. * testsuite/ld-elf/pr27825-2a.s: Likewise. * testsuite/ld-elf/pr27825-2b.s: Likewise.
2021-05-06Automatic date update in version.inGDB Administrator1-1/+1
2021-05-05[gdb/testsuite] Fix timeout in gdb.threads/detach-step-over.exp with readnowTom de Vries2-17/+38
When running test-case gdb.threads/detach-step-over.exp with target board readnow, I run into: ... Reading symbols from /lib64/libc.so.6...^M Reading symbols from \ /usr/lib/debug/lib64/libc-2.26.so-2.26-lp152.26.6.1.x86_64.debug...^M Expanding full symbols from \ /usr/lib/debug/lib64/libc-2.26.so-2.26-lp152.26.6.1.x86_64.debug...^M FAIL: gdb.threads/detach-step-over.exp: \ breakpoint-condition-evaluation=host: target-non-stop=on: non-stop=on: \ displaced=off: iter 2: attach (timeout) ... Fix this by doing exp_continue when encountering the "Reading symbols" or "Expanding full symbols" lines. This is still fragile and times out with a higher load, similated f.i. by stress -c 5. Fix that by using a timeout factor of 2. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2021-05-05 Tom de Vries <tdevries@suse.de> * gdb.threads/detach-step-over.exp: Do exp_continue when encountering "Reading symbols" or "Expanding full symbols" lines. Using timeout factor of 2 for attach.
2021-05-05[gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp with readnowTom de Vries2-2/+7
When running test-case gdb.threads/fork-plus-threads.exp with target board readnow, I run into: ... [LWP 9362 exited]^M [New LWP 9365]^M [New LWP 9363]^M [New LWP 9364]^M FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \ inferior 1 exited (timeout) ... There is code in the test-case to prevent timeouts with readnow: ... -re "Thread \[^\r\n\]+ exited" { # Avoid timeout with check-read1 exp_continue } -re "New Thread \[^\r\n\]+" { # Avoid timeout with check-read1 exp_continue } ... but this doesn't trigger because we get LWP rather than Thread. Fix this by making these regexps accept LWP as well. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2021-05-05 Tom de Vries <tdevries@suse.de> * gdb.threads/fork-plus-threads.exp: Handle "New LWP <n>" and "LWP <n> exited" messages.
2021-05-05asan: stack-buffer-overflow vms-lib.c:367Alan Modra2-1/+6
* vms-lib.c (vms_traverse_index): Account for vms_kbn size when sanity checking keylen.
2021-05-04sim: rl78: clean up various warningsMike Frysinger9-17/+34
A random grab bag of minor fixes to enable -Werror for this port. Fix local prototypes for a bunch of functions (e.g. adding static). Add missing includes for missing prototypes. Move local variable decls from the middle of functions to the top of the scope. Fix a logic error when processing commands where p was reassigned to cmd and then has its leading whitespace scanned a 2nd time. Handle short reads with fread().
2021-05-04gdb: update Type.fields doc based on actual GDB behaviorSimon Marchi4-6/+40
I noticed two errors in the Type.fields documentation: 1. It is possible to call `fields` on an array type, in which case it returns one field representing the array's range. It is not mentioned. 2. When calling `fields` on a type that doesn't have fields (by nature, like an int), GDB raises a TypeError. It does not return an empty sequence, as currently documented. Fix these, and change the text into a bullet list. I find it easier to read than one big paragraph. The first issue is already tested in gdb.python/py-type.exp, but the second one doesn't seem tested. Add a test in gdb.python/py-type.exp for it. gdb/doc/ChangeLog: * python.texi (Types In Python): Re-organize Type.fields doc. Mention handling of array types. Correct doc for when calling the method on another type. gdb/testsuite/ChangeLog: * gdb.python/py-type.exp (test_fields): Test calling fields on an int type. Change-Id: I11c688177504cb070b81a4446ac91dec50b56a22
2021-05-04sim: m68hc11: tweak types to fix warningsMike Frysinger3-2/+7
The hw attach API wants unsigned addresses. The write API wants signed chars.
2021-05-04sim: mips: include stdlib.h for memory prototypesMike Frysinger2-0/+5
This file uses free() and friends, so include it to fix missing prototype warnings.
2021-05-04sim: mips: always enable device modelsMike Frysinger3-18/+8
There's no need to restrict these to only specific targets as the user can select them at runtime if they want them. Always build them so we can improve build coverage too.
2021-05-04sim: mips: delete unused constant variablesMike Frysinger4-29/+10
Since these never change, inline and delete them.
2021-05-04sim: mcore: fix build time warningsMike Frysinger4-3/+11
Once we fix a minor const warning we can enable -Werror in here.
2021-05-04sim: remove sys/times.h in most placesMike Frysinger6-3/+12
The v850 port used this, and then it got copied to other ports even though it wasn't needed. Clean it up to avoid portability issues on platforms not providing this (e.g. mingw64 for Windows).
2021-05-04sim: mips: fix qh_acc tableMike Frysinger2-1/+5
The AccAddLQH func was unused, and looking at this table, it looks like it's due to a typo.
2021-05-04sim: hw: localize init callbackMike Frysinger4-14/+13
Now that we don't need to hardcode the module init list in a single place, move the hw init logic out to the sim-hw file.
2021-05-04sim: microblaze: enable some basic trace pointsMike Frysinger3-0/+9
This isn't super complete, but it's useful enough as-is.
2021-05-04sim: microblaze: hook up libgloss syscallsMike Frysinger6-4/+54
When in the virtual environment, have brki 8 trigger libgloss syscalls like other ports. This also matches the ABI that Linux uses for its syscalls (ignoring the syscall table differences).
2021-05-05PowerPC undefweak testcaseAlan Modra5-0/+28
Test for commit 4916030821bb and b293661219c3. * testsuite/ld-powerpc/empty.s: New file. * testsuite/ld-powerpc/undefweak.d, * testsuite/ld-powerpc/undefweak.s: New testcase. * testsuite/ld-powerpc/powerpc.exp: Run it.
2021-05-05Automatic date update in version.inGDB Administrator1-1/+1