aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-05-20ranged_breakpoint: move initialization to ctorPedro Alves1-8/+19
Move initialization of ranged_breakpoint's fields to its ctor. Change-Id: If7b842861f3cc6a429ea329d45598b5852283ba3
2022-05-20ranged_breakpoint: use install_breakpointPedro Alves1-12/+5
This commit replaces a chunk of code in break_range_command by an equivalent call to install_breakpoint. Change-Id: I31c06cabd36f5be91740aab029265f678aa78e35
2022-05-20ranged_breakpoint: don't use init_raw_breakpointPedro Alves1-1/+1
ranged_breakpoint's ctor already sets the breakpoint's type to bp_hardware_breakpoint. Since this is a "regular" breakpoint, b->pspace should remain NULL. Thus, the only thing init_raw_breakpoint is needed for, is to add the breakpoint's location. Do that directly. Change-Id: I1505de94c3919881c2b300437e2c0da9b05f76bd
2022-05-20Make structs breakpoint/base_breakpoint/catchpoint be abstractPedro Alves2-1/+20
You should never instanciate these types directly. Change-Id: I8086c74c415eadbd44924bb0ef20f34b5b97ee6f
2022-05-20add_location_to_breakpoint -> breakpoint::add_locationPedro Alves2-37/+36
Make add_location_to_breakpoint be a method of struct breakpoint. A patch later in the series will move this to base_breakpoint, but for now, it needs to be here. Change-Id: I5bdc2ec1a7c2d66f26f51bf6f6adc8384a90b129
2022-05-20PowerPC: Make test gdb.arch/powerpc-power10.exp Endian independent.Carl Love1-368/+746
The .quad statement stores the 64-bit hex value in Endian order. When used to store a 64-bit prefix instructions on Big Endian (BE) systems, the .quad statement stores the 32-bit suffix followed by the 32-bit prefix rather than the expected order of prefix word followed by the suffix word. GDB fetches 32-bits at a time when disassembling instructions. The disassembly on BE gets messed up since GDB fetches the suffix first and interprets it as a word instruction not a prefixed instruction. When gdb fetches the prefix part of the instruction, following the initial suffix word, gdb associates the prefix word incorrectly with the following 32-bits as the suffix for the instruction when in fact it is the following instruction. For example on BE we have two prefixed instructions stored using the .quad statement as follows: addr word GDB action --------------------------------------------- 1 suffix inst A <- GDB interprets as a word instruction 2 prefix inst A <- GDB uses this prefix with 3 suffix inst B <- this suffix rather than the suffix at addr 1. 4 prefix inst B This patch changes the .quad statement into two .longs to explicitly store the prefix followed by the suffix of the instruction. The patch rearranges the instructions to put all of the word instructions together followed by the prefix instructions for clarity. The patch has been tested on Power 10 and Power 7 BE and LE to verify the change works as expected.
2022-05-20Remove obsolete text from documentationTom Tromey1-3/+0
The documentation says that -enable-pretty-printing is experimental in 7.0 and may change -- that's long enough ago that I think we can say that this text is no longer correct or useful.
2022-05-20Stop readekf and objdump from aggressively following links.Nick Clifton8-66/+179
* dwarf.c (dwarf_select_sections_by_names): Return zero if no sections were selected. (dwarf_select_sections_by_letters): Likewise. * dwarf.h: (dwarf_select_sections_by_names): Update prototype. (dwarf_select_sections_by_letters): Update prototype. * objdump.c (might_need_separate_debug_info): New function. (dump_bfd): Call new function before attempting to load separate debug info files. (main): Do not enable dwarf section dumping for -WK or -WN. * readelf.c (parse_args): Do not enable dwarf section dumping for -wK or -wN. (might_need_separate_debug_info): New function. (process_object): Call new function before attempting to load separate debug info files. * testsuite/binutils-all/debuginfo.exp: Expect -WE and -wE debuginfod tests to pass. * testsuite/binutils-all/objdump.Wk: Add extra regexps. * testsuite/binutils-all/readelf.k: Add extra regexps.
2022-05-20RISC-V: Update zfinx implement with zicsr.Jia-Wei Chen3-14/+51
Update zfinx implement with zicsr, fix missing fcsr use by zfinx. add zicsr imply by zfinx. bfd/ChangeLog: * elfxx-riscv.c: New imply. gas/ChangeLog: * testsuite/gas/riscv/csr-insns-pseudo-zfinx.d: New test. opcodes/ChangeLog: * riscv-opc.c: Update insn class.
2022-05-20RISC-V: Remove RV128-only fmv instructionsTsukasa OI5-8/+8
As fmv.x.q and fmv.q.x instructions are RV128-only (not RV64-only), it should be removed until RV128 support for GNU Binutils is required again. gas/ChangeLog: * testsuite/gas/riscv/fmv.x.q-rv64-fail.d: New failure test. * testsuite/gas/riscv/fmv.x.q-rv64-fail.l: Likewise. * testsuite/gas/riscv/fmv.x.q-rv64-fail.s: Likewise. include/ChangeLog: * opcode/riscv-opc.h (MATCH_FMV_X_Q, MASK_FMV_X_Q, MATCH_FMV_Q_X, MASK_FMV_Q_X): Remove RV128-only instructions. opcodes/ChangeLog: * riscv-opc.c (riscv_opcodes): Remove RV128-only instructions.
2022-05-20Fix non-pointer type compilation error in aix-thread.cAditya Vidyadhar Kamath1-2/+2
In aix-thread.c we use ms->value_address () to get the symbol address. This triggers the following compiler error... base operand of '->' has non-pointer type 'bound_minimal_symbol' ... because ms is not a pointer. This commit fixes this error by using ms.value_address () instead.
2022-05-20add a trie to map quickly from address range to compilation unitSteinar H. Gunderson1-19/+367
When using perf to profile large binaries, _bfd_dwarf2_find_nearest_line() becomes a hotspot, as perf wants to get line number information (for inline-detection purposes) for each and every sample. In Chromium in particular (the content_shell binary), this entails going through 475k address ranges, which takes a long time when done repeatedly. Add a radix-256 trie over the address space to quickly map address to compilation unit spaces; for content_shell, which is 1.6 GB when some (but not full) debug information turned is on, we go from 6 ms to 0.006 ms (6 µs) for each lookup from address to compilation unit, a 1000x speedup. There is a modest RAM increase of 180 MB in this binary (the existing linked list over ranges uses about 10 MB, and the entire perf job uses between 2–3 GB for a medium-size profile); for smaller binaries with few ranges, there should be hardly any extra RAM usage at all.
2022-05-20Tidy warn-execstack handlingAlan Modra6-22/+17
Make ld and bfd values consistent by swapping values 0 and 2 in link_info.warn_execstack. This has the benefit of making the value an "extended" boolean, with 0 meaning no warning, 1 meaning warn, other values a conditional warning. Yes, this patch introduces fails on arm/aarch64. Not a problem with this patch but an arm/aarch64 before_parse problem. bfd/ * elflink.c (bfd_elf_size_dynamic_sections): Adjust warn_execstack test. include/ * bfdlink.h (warn_execstack): Swap 0 and 2 meaning. ld/ * configure.ac (DEFAULT_LD_WARN_EXECSTACK): Use values of 0, 1, 2 consistent with link_info.warn_execstack. * ld.texi: Typo fixes. * lexsup.c (parse_args): Adjust setting of link_info.warn_execstack. (elf_static_list_options): Adjust help message conditions. * configure: Regenerate.
2022-05-20Automatic date update in version.inGDB Administrator1-1/+1
2022-05-19arm: Fix system register fpcxt_ns and fpcxt_s naming convention.Srinath Parvathaneni3-3/+88
The current assembler accepts system registers FPCXTNS and FPCXTS for Armv8.1-M Mainline Instructions VSTR, VLDR, VMRS and VMSR. Assembler should be also allowing FPCXT_NS, fpcxt_ns, fpcxtns, FPCXT_S, fpcxt_s and fpcxts. This patch fixes the issue.
2022-05-19gdb/doc: use @value{GDBP} in 'info pretty-printer' exampleAndrew Burgess1-8/+8
Update the 'info pretty-printer' example in the manual to make use of @value{GDBP} instead of hard-coding '(gdb)'.
2022-05-19gdb/doc: make use of group/end group in 'info pretty-printers' exampleAndrew Burgess1-0/+10
The 'info pretty-printers' example is pretty long and consists of many commands and their output. Currently, when the pdf manual is generated this example spans a page-break, with the page-break falling part way through some example output from GDB. This commit breaks up the example using @group .... @end group, within each group is a single GDB command and all its output. Now, when the pdf manual is created, the page-break is placed after the output of one GDB command, and before the subsequent command, this looks much nicer.
2022-05-19gdb/doc: fix inconsistent info pretty-printer exampleNikolaos Chatzikonstantinou1-3/+1
The example for 'info pretty-printer' in the manual passes an object-regexp in some cases, but presents output as though no object-regexp was passed. This commit fixes the two mistakes, in one case, fixing the output to filter based on object-regexp, and in the other, to remove the object-regexp from the command and leave all the output.
2022-05-19Fix potentially uninitialised variables in the Windows toolsNick Clifton7-7/+19
2022-05-19gdb: testsuite: Support displaced stepping on LoongArchTiezhu Yang1-1/+1
When execute the following command on LoongArch: make check-gdb TESTS="gdb.base/async-shell.exp" we can see the following message in gdb/testsuite/gdb.sum: UNSUPPORTED: gdb.base/async-shell.exp: displaced stepping modify support_displaced_stepping to support displaced stepping on LoongArch. With this patch: PASS: gdb.base/async-shell.exp: run & PASS: gdb.base/async-shell.exp: shell echo foo PASS: gdb.base/async-shell.exp: interrupt PASS: gdb.base/async-shell.exp: process stopped I did the following tests that use support_displaced_stepping with this patch on LoongArch, there is no failed testcases. loongson@linux:~/gdb.git$ grep -r support_displaced_stepping gdb/testsuite/gdb.* gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.base/step-over-no-symbols.exp: if { $displaced != "off" && ![support_displaced_stepping] } { gdb/testsuite/gdb.base/moribund-step.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.base/async-shell.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.base/inferior-died.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.base/step-over-syscall.exp: if {$displaced == "on" && ![support_displaced_stepping]} { gdb/testsuite/gdb.mi/mi-watch-nonstop.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.mi/mi-nonstop.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.mi/mi-nsmoribund.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.mi/mi-nsintrall.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.mi/mi-nsthrexec.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.mi/mi-nonstop-exit.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.multi/watchpoint-multi.exp:if [support_displaced_stepping] { gdb/testsuite/gdb.python/py-evthreads.exp:if { ![support_displaced_stepping] } { gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp: if { $displaced != "off" && ![support_displaced_stepping] } { gdb/testsuite/gdb.threads/interrupt-while-step-over.exp: if { ${displaced-stepping} != "off" && ![support_displaced_stepping] } { gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp: if { $displaced != "off" && ![support_displaced_stepping] } { Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
2022-05-19gdbsupport: fix path_join crash with -std=c++17 and -D_GLIBCXX_DEBUGSimon Marchi1-1/+1
When building GDB with -std=c++17 and -D_GLIBCXX_DEBUG=1, I get: $ ./gdb -nx --data-directory=data-directory -q -ex "maint selftest path_join" /usr/include/c++/11.2.0/string_view:233: constexpr const value_type& std::basic_string_view<_CharT, _Traits>::operator[](std::basic_string_view<_CharT, _Traits>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; std::basic_string_view<_CharT, _Traits>::const_reference = const char&; std::basic_string_view<_CharT, _Traits>::size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed. The problem is that we're passing an empty string_view to IS_ABSOLUTE_PATH. IS_ABSOLUTE_PATH accesses [0] on that string_view, which is out-of-bounds. The reason this is not seen with -std less than c++17 is that our local copy of string_view (used with C++ < 17) does not have the assert in operator[], as that wouldn't work in a constexpr method: https://gitlab.com/gnutools/binutils-gdb/-/blob/5890af36e5112bcbb8d7555e63570f68466e6944/gdbsupport/gdb_string_view.h#L180 IS_ABSOLUTE_PATH is normally used with null-terminated string. It's fine to pass an empty null-terminated string to IS_ABSOLUTE_PATH, because index 0 in such a string is valid. But not with an empty string_view. Fix that by avoiding the "call" to IS_ABSOLUTE_PATH if the string_view is empty. Change-Id: Idf4df961b63f513b3389235e93814c02b89ea32e
2022-05-19Arm64: force emission of ILP32-dependent relocsJan Beulich1-1/+1
Like the placeholder types added in 04dfe7aa5217 ("Arm64: follow-on to PR gas/27217 fix"), these are also placeholders which are subsequently resolved (albeit later, hence this being a separate issue). As for the resolved types 1 is returned, these pseudo-relocs should also have 1 returned to force retaining of the [eventual] relocations. This is also spelled out individually for each of them in md_apply_fix().
2022-05-19COFF: use hash for string table also when copying / strippingJan Beulich4-219/+78
Otherwise the string table may grow and hence e.g. change a final binary (observed with PE/COFF ones) even if really there's no change. Doing so in fact reduces the overall amount of code, and in particular the number of places which need to remain in sync. Afaics there's no real equivalent to the "traditional_format" field used when linking, so hashing is always enabled when copying / stripping.
2022-05-19COFF/PE: keep linker version during objcopy / stripJan Beulich1-4/+14
Neither of the tools is really a linker, so whatever was originally recorded should be retained rather than being overwritten by these tools' versions.
2022-05-19COFF/PE: don't leave zero timestamp after objcopy / stripJan Beulich1-6/+8
Fill the timestamp field suitably for _bfd_XXi_only_swap_filehdr_out(). Instead of re-arranging the present if(), fold this logic with that of copying the optional header.
2022-05-19COFF: make objcopy / strip honor --keep-file-symbolsJan Beulich1-6/+4
So far this option had no effect when used together with e.g. --strip-debug. Set BSF_FILE on these symbols to change that. While altering this also join two adjacent blocks of case labeled statements with identical code.
2022-05-19don't over-align file positions of PE executable sectionsJan Beulich1-15/+14
When a sufficiently small alignment was specified via --file-alignment, individual section alignment shouldn't affect placement within the file. This involves first of all clearing D_PAGED for images when section and file alignment together don't permit paging of the image. The involved comparison against COFF_PAGE_SIZE in turn helped point out (through a compiler warning) that 'page_size' should be of unsigned type (as in particular FileAlignment is). This yet in turn pointed out a dubious error condition (which is being deleted). For the D_PAGED case I think the enforced file alignment may still be too high, but I'm wary of changing that logic without knowing of possible corner cases. Furthermore file positions in PE should be independent of the alignment recorded in section headers anyway. Otherwise there are e.g. anomalies following commit 6f8f6017a0c4 ("PR27567, Linking PE files adds alignment section flags to executables") in that linking would use information a subsequent processing step (e.g. stripping) wouldn't have available anymore, and hence a binary could change in that 2nd step for no actual reason. (Similarly stripping a binary linked with a linker pre-dating that commit would change the binary again when stripping it a 2nd time.)
2022-05-19 _bfd_real_fopen should not use ccs parameter on WindowsYvan Roux2-3/+6
PR 25713 * bfdio.c (_bfd_real_fopen): Delete ccs string.
2022-05-19RISC-V: Fix canonical extension order (K and J)Tsukasa OI1-1/+1
This commit fixes canonical extension order to follow the RISC-V ISA Manual draft-20210402-1271737 or later. bfd/ChangeLog: * elfxx-riscv.c (riscv_recognized_prefixed_ext): Fix "K" extension prefix to be placed before "J".
2022-05-19Automatic date update in version.inGDB Administrator1-1/+1
2022-05-18Use aarch64_features to describe register features in target descriptions.John Baldwin13-59/+90
Replace the sve bool member of aarch64_features with a vq member that holds the vector quotient. It is zero if SVE is not present. Add std::hash<> specialization and operator== so that aarch64_features can be used as a key with std::unordered_map<>. Change the various functions that create or lookup aarch64 target descriptions to accept a const aarch64_features object rather than a growing number of arguments. Replace the multi-dimension tdesc_aarch64_list arrays used to cache target descriptions with unordered_maps indexed by aarch64_feature.
2022-05-18Arm64: follow-on to PR gas/27217 fixJan Beulich1-2/+7
PR gas/27217 Prior to trying to address PR gas/28888 I noticed anomalies in how certain insns would / wouldn't be affected in similar ways. Commit eac4eb8ecb26 ("Fix a problem assembling AArch64 sources when a relocation is generated against a symbol that has a defined value") had two copy-and-paste mistakes, passing the wrong type to aarch64_force_reloc(). It further failed to add placeholder relocation types to that function's block of case labels leading to a return of 1. While not of interest for aarch64_force_relocation() (these placeholders are resolved right in parse_operands()), calls to aarch64_force_reloc() happen before that resolution would take place.
2022-05-18Fix compile time warning building gold with Clang-14.Nick Clifton2-5/+5
* int_encoding.cc (get_length_as_unsigned_LEB_128): Remove current_length variable.
2022-05-18oops - forgot changelog entry for the previous delta.Victor Do Nascimento1-0/+16
2022-05-18arm: Add unwind support for mixed register listsVictor Do Nascimento4-42/+107
* config/tc-arm.c (parse_reg_list): Add handling of mixed register types. (reg_names): Enumerate pseudoregister according to mapped physical register number. (s_arm_unwind_save_pseudo): Modify function signature. (s_arm_unwind_save_core): Likewise. (s_arm_unwind_save_mixed): New function. (s_arm_unwind_save): Generate register list mask to pass to nested functions. * testsuite/gas/arm/unwind-pacbti-m.s: Expand test for mixed register type lists. * testsuite/gas/arm/unwind-pacbti-m.d: Likewise. * testsuite/gas/arm/unwind-pacbti-m-readelf.d: Likewise.
2022-05-18PowerPC: bp-permanent.exp, kill-after-signal fixCarl Love2-12/+18
Fix changes that didn't make it into commit: dd9cd55e990bcc9f8448cac38d242d53974b3604. Fix missing -wrap on gdb_test_multiple in gdb.base/kill-after-signal.exp that is causing regression test on x86_64-linux with taskset -c 0.
2022-05-18[AArch64] Return the regnum for PC (32) on aarch64Yichao Yu4-0/+122
This will allow the unwind info to explicitly specify a different value for the return address from the link register. Such usage, although uncommon, is valid and useful for signal frames. It is also supported by aadwarf64 from ARM (Note 9 in [1]). Ref https://sourceware.org/pipermail/gdb/2022-May/050091.html [1] https://github.com/ARM-software/abi-aa/blob/2022Q1/aadwarf64/aadwarf64.rst#dwarf-register-names Signed-off-by: Luis Machado <luis.machado@arm.com>
2022-05-18x86: shrink op_riprelJan Beulich1-18/+12
It is only ever initialized from a boolean, so it as well as related variables' types can simply be bool and there's no masking to 32 bits needed in set_op().
2022-05-18Add a --no-weak option to nm.Nick Clifton6-2/+74
PR 29135 * nm.c (non_weak): New variable. (filter_symbols): When non-weak is true, ignore weak symbols. (long_options): Add --no-weak. (usage): Mention --no-weak. (main): Handle -W/--no-weak. * doc/binutils.texi: Document new feature. * NEWS: Mention the new feature. * testsuite/binutils-all/nm.exp: Add test of new feature. * testsuite/binutils-all/no-weak.s: New test source file.
2022-05-18Support -prompt and -lbl in gdb_testPedro Alves3-35/+42
This teaches gdb_test to forward the -prompt and -lbl options to gdb_test_multiple. The option parsing is done with parse_args. As a cleanup, instead of using llength and lindex to get at the positional arguments, use lassign, and check whether the corresponding variable is empty. Convert gdb.base/ui-redirect.exp and gdb.xml/tdesc-reload.exp to use gdb_test -prompt/-lbl instead of gdb_test_multiple as examples. Change-Id: I243e1296d32c05a421ccef30b63d43a89eaeb4a0
2022-05-18Remove unused DWARF PAUTH registersLuis Machado2-5/+0
The AARCH64_DWARF_PAUTH_DMASK and AARCH64_DWARF_PAUTH_CMASK DWARF registers never made their way into the aadwarf64. The following patch removes these constants and their use. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26295
2022-05-18Rename PAUTH_RA_STATE to RA_SIGN_STATELuis Machado2-18/+18
The aadwarf64 [1] names this register RA_SIGN_STATE, so update the code to use the same name. [1] https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst
2022-05-18[gdb/testsuite] Simplify unknown lang testing in gdb.base/parse_number.expTom de Vries1-3/+8
Move testing of language unknown out of the $supported_archs loop in gdb.base/parse_number.exp. This reduces total amount of tests from 18466 to 17744. Tested on x86_64-linux.
2022-05-18[gdb/testsuite] Use hex_for_lang in gdb.base/parse_number.expTom de Vries1-1/+14
In gdb.base/parse_number.exp, add a new proc hex_for_lang that formats a hex number appropriately for a given language. Tested on x86_64-linux.
2022-05-18[gdb/tdep] Add gdb/syscalls/update-linux-from-src.shTom de Vries23-38/+1230
Add a new script gdb/syscalls/update-linux-from-src.sh, that can be used to generate *-linux.xml.in files from linux kernel sources, like so: ... $ ./update-linux-from-src.sh ~/upstream/linux-stable.git Skipping aarch64-linux.xml.in, no syscall.tbl Generating amd64-linux.xml.in Skipping arm-linux.xml.in, use arm-linux.py instead Skipping bfin-linux.xml.in, no longer supported Generating i386-linux.xml.in Generating mips-n32-linux.xml.in Generating mips-n64-linux.xml.in Generating mips-o32-linux.xml.in Generating ppc64-linux.xml.in Generating ppc-linux.xml.in Generating s390-linux.xml.in Generating s390x-linux.xml.in Generating sparc64-linux.xml.in Generating sparc-linux.xml.in ... Update *-linux.xml.in and *-linux.xml using linux kernel tag v5.18-rc6.
2022-05-18AArch64: Enable FP16 by default for Armv9-A.Tamar Christina1-0/+1
In Armv9-A SVE is mandatory, and for SVE FP16 is mandatory. This fixes a disconnect between GCC and binutils where GCC has FP16 on by default and gas doesn't. include/ChangeLog: 2022-05-16 Tamar Christina <tamar.christina@arm.com> * opcode/aarch64.h (AARCH64_ARCH_V9_FEATURES): Add AARCH64_FEATURE_F16.
2022-05-18gas: avoid octal numbers being accepted when processing .linefileJan Beulich3-0/+12
Compilers would put decimal numbers there, so I think we should treat finding octal numbers the same as finding bignums - ignore them as actually being comments of some very specific form.
2022-05-18gas: avoid bignum related errors when processing .linefileJan Beulich4-4/+27
Any construct which to the scrubber looks like a C preprocessor line/file "directive" is converted to .linefile, but the amount of checking the scrubber does is minimal (albeit it does let through only decimal digits for the line part of the contruct). Since the scrubber conversion is further tied to # being a line comment character, anything which upon closer inspection turns out not to be a line/file "directive" is supposed to be treated as a comment, i.e. ignored. Therefore we cannot use get_absolute_expression(), as this may raise errors. Open- code the function instead, treating everything not resulting in O_constant as a comment as well. Furthermore also bounds-check the parsed value. This bounds check tries to avoid implementation defined behavior (which may be the raising of an implementation defined signal), but for now makes the assumption that int has less than 64 bits. The way bfd_signed_vma (which is what offsetT aliases) is defined in bfd.h for the BFD64 case I cannot really see a clean way of avoiding this assumption. Omitting the #ifdef, otoh, would risk "condition is always false" warnings by compilers. Convert get_linefile_number() to return bool at this occasion as well.
2022-05-18gas: fold do_repeat{,_with_expander}()Jan Beulich4-46/+15
do_repeat_with_expander() already deals with the "no expander" case quite fine, so there's really little point having two functions. What it lacks compared with do_repeat() is a call to sb_build(), which can simply be moved (and the then redundant sb_new() be avoided). Along with this moving also flip if the main if()'s condition such that the "no expander" case is handled first.
2022-05-18gas: don't ignore .linefile inside false conditionalsJan Beulich4-0/+26
When assembling code previously pre-processed by a C compiler, long enough comments may have been collapsed into "# <line> <file>" constructs. If we skip these, line numbers (and possibly even file names) will be off / wrong in both diagnostics and debug info.