Age | Commit message (Collapse) | Author | Files | Lines |
|
This avoids unnecessary work, and becomes important with the patch in
https://sourceware.org/ml/gdb-patches/2019-10/msg01143.html
gdb/ChangeLog:
2019-10-31 Christian Biesinger <cbiesinger@google.com>
* agent.c (set_can_use_agent): When the setting is turned on,
look up agent symbols if we don't have them yet.
(agent_new_objfile): Don't look up agent symbols when the agent
setting is off.
Change-Id: I6523a5640c95d38299998050a6c620e51096e8ed
|
|
I forgot to do this in the last commit
(b231e86ac9608056ea837e24d42a878927f5787a)
gdb/ChangeLog:
2019-10-31 Christian Biesinger <cbiesinger@google.com>
* config.in: Regenerate.
Change-Id: I60946ffd853a59469c35f19ef8012ac6ea88a31c
|
|
Also stores the result in a thread-local static variable and
changes the return value to a const char*.
This is already important because Guile creates threads and
Python can create threads, but with the patch series here:
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/176
GDB itself will create threads, too.
gdb/ChangeLog:
2019-10-31 Christian Biesinger <cbiesinger@google.com>
* configure: Regenerate.
* configure.ac: Check for strerror_r.
* gdbsupport/common-utils.h (safe_strerror): Change return value
to const char * and document that this function is now threadsafe.
* gdbsupport/posix-strerror.c (safe_strerror): Make buf
thread_local and call strerror_r, if available.
* utils.c (perror_string): Update.
(print_sys_errmsg): Update.
Change-Id: I81048fbaf148035c221c528727f7efe58ba528eb
|
|
Based on feedback from Tromey, update the use of objfile_key in gdb/arm-tdep.c
to use bfd_key instead. That way we don't have to re-create the exception
handling data all over again if it was done before for the same BFD.
gdb/ChangeLog:
2019-10-31 Luis Machado <luis.machado@linaro.org>
* arm-tdep.c (arm_exidx_data_key): Use bfd_key instead of
objfile_key.
(arm_exidx_new_objfile): Adjust to use objfile->obfd instead of
objfile to fetch per-bfd data.
(arm_find_exidx_entry): Likewise.
Change-Id: Ia7b3208ea8d788414600fa6d770ac76db0562859
|
|
Also moves an int declaration inside the for loop.
Code cleanup, no change in behavior intended.
gdb/ChangeLog:
2019-10-31 Christian Biesinger <cbiesinger@google.com>
* gdbsupport/agent.c (debug_agent): Change type to bool.
(use_agent): Likewise.
(all_agent_symbols_look_up): Likewise.
(agent_loaded_p): Change return value to bool.
(agent_look_up_symbols): Update.
(agent_capability_check): Change return value to bool.
* gdbsupport/agent.h (agent_loaded_p): Likewise.
(debug_agent): Change type to bool.
(use_agent): Likewise.
(agent_capability_check): Change return value to bool.
gdb/gdbserver/ChangeLog:
2019-10-31 Christian Biesinger <cbiesinger@google.com>
* ax.h (debug_agent): Remove duplicate declaration.
Change-Id: Icb28a65fcc8c7108bcd59287e6be66bf56f8ccb5
|
|
* testsuite/gas/i386/general.s: Add .code16gcc fldenv tests.
* testsuite/gas/i386/general.l: Updated.
|
|
There's a pattern:
...
gdb_test <command> <pattern> <command>
...
that can be written shorter as:
...
gdb_test <command> <pattern>
...
Detect this pattern in proc gdb_test:
...
global gdb_prompt
upvar timeout timeout
if [llength $args]>2 then {
set message [lindex $args 2]
+ if { $message == [lindex $args 0] } {
+ error "HERE"
+ }
} else {
set message [lindex $args 0]
}
...
and fix all occurences in gdb.ada.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-10-31 Tom de Vries <tdevries@suse.de>
* gdb.ada/array_bounds.exp: Drop superfluous 3rd argument to gdb_test.
* gdb.ada/array_subscript_addr.exp: Same.
* gdb.ada/arrayidx.exp: Same.
* gdb.ada/arrayparam.exp: Same.
* gdb.ada/arrayptr.exp: Same.
* gdb.ada/boolean_expr.exp: Same.
* gdb.ada/call_pn.exp: Same.
* gdb.ada/complete.exp: Same.
* gdb.ada/fixed_cmp.exp: Same.
* gdb.ada/fun_addr.exp: Same.
* gdb.ada/funcall_param.exp: Same.
* gdb.ada/interface.exp: Same.
* gdb.ada/mod_from_name.exp: Same.
* gdb.ada/null_array.exp: Same.
* gdb.ada/packed_array.exp: Same.
* gdb.ada/packed_tagged.exp: Same.
* gdb.ada/print_chars.exp: Same.
* gdb.ada/print_pc.exp: Same.
* gdb.ada/ptype_arith_binop.exp: Same.
* gdb.ada/ptype_field.exp: Same.
* gdb.ada/ptype_tagged_param.exp: Same.
* gdb.ada/rec_return.exp: Same.
* gdb.ada/ref_tick_size.exp: Same.
* gdb.ada/str_ref_cmp.exp: Same.
* gdb.ada/taft_type.exp: Same.
* gdb.ada/tagged.exp: Same.
* gdb.ada/type_coercion.exp: Same.
* gdb.ada/uninitialized_vars.exp: Same.
Change-Id: Ibb84a41573c7f21295f3fd42da9b96534205c5c4
|
|
If the extension is not found in the context sensitive table, the legacy
tables are still checked as a fallback. This is particularly useful for
Armv8.1-M as it enables the use of '.arch_extension' with the 'mve' and
'mve.fp' extensions which are not part of the legacy table.
* config/tc-arm.c (selected_ctx_ext_table) New static variable.
(arm_parse_arch): Set context sensitive extension table based on the
chosen base architecture.
(s_arm_arch_extension): Change to lookup extensions in the new context
sensitive tables.
* gas/testsuite/gas/arm/mve-ext.s: New.
* gas/testsuite/gas/arm/mve-ext.d: New.
* gas/testsuite/gas/arm/mvefp-ext.s: New.
* gas/testsuite/gas/arm/mvefp-ext.d: New.
|
|
|
|
Proc gdb_test_multiple builds up and executes a gdb_expect expression with
pattern/action clauses. The clauses are either implicit (added by
gdb_test_multiple) or explicit (passed via the gdb_test_multiple parameter
user_code).
However, there are a few implicit clauses which are inserted before the
explicit ones, making sure those take precedence.
Add an -early pattern flag for a gdb_test_multiple user_code clause to specify
that the clause needs to be inserted before any implicit clause.
Using this pattern flag, we can f.i. setup a kfail for an assertion failure
<assert> during gdb_continue_to_breakpoint by the rewrite:
...
gdb_continue_to_breakpoint <msg> <pattern>
...
into:
...
set breakpoint_pattern "(?:Breakpoint|Temporary breakpoint) .* (at|in)"
gdb_test_multiple "continue" "continue to breakpoint: <msg>" {
-early -re "internal-error: <assert>" {
setup_kfail gdb/nnnnn "*-*-*"
exp_continue
}
-re "$breakpoint_pattern <pattern>\r\n$gdb_prompt $" {
pass $gdb_test_name
}
}
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-10-30 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (gdb_test_multiple): Handle -early pattern flag.
Change-Id: I376c636b0812be52e7137634b1a4f50bf2b999b6
|
|
The array starts out initialized to zero:
minimal_symbol *msymbol_hash[MINIMAL_SYMBOL_HASH_SIZE] {};
So we only need to explicitly clear it if there were previous minsyms
added to it. This patch does that.
gdb/ChangeLog:
2019-10-30 Christian Biesinger <cbiesinger@google.com>
* minsyms.c (clear_minimal_symbol_hash_tables): New function.
(build_minimal_symbol_hash_tables): Code to clear the table moved
to clear_minimal_symbol_hash_tables.
(minimal_symbol_reader::install): Call clear_minimal_symbol_hash_tables
when needed.
Change-Id: I7da994fe6747f67714e7efe9fdbb0dbc4d6ea532
|
|
for the writeback form of the LDRAA and LDRAB mnemonics
This is a shorthand for the immediate argument being 0, as described here:
https://developer.arm.com/docs/ddi0596/latest/base-instructions-alphabetic-order/ldraa-ldrab-load-register-with-pointer-authentication
This is because the instructions still have a use with an immediate
argument of 0, unlike loads without the PAC functionality. Currently,
the mnemonics are
LDRAA Xt, [Xn, #<simm10>]!
LDRAB Xt, [Xn, #<simm10>]!
After this patch they become
LDRAA Xt, [Xn {, #<simm10>}]!
LDRAB Xt, [Xn {, #<simm10>}]!
gas * config/tc-aarch64.c (parse_address_main): Accept the omission of
the immediate argument for ldraa and ldrab as a shorthand for the
immediate being 0.
* testsuite/gas/aarch64/ldraa-ldrab-no-offset.d: New test.
* testsuite/gas/aarch64/ldraa-ldrab-no-offset.s: New test.
* testsuite/gas/aarch64/illegal-ldraa.s: Modified to accept the
writeback form with no offset.
* testsuite/gas/aarch64/illegal-ldraa.s: Removed missing offset
error.
opcodes * aarch64-opc.c (print_immediate_offset_address): Don't print the
immediate for the writeback form of ldraa/ldrab if it is 0.
* aarch64-tbl.h: Updated the documentation for ADDR_SIMM10.
* aarch64-opc-2.c: Regenerated.
|
|
* elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
New field.
(_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
New functions.
(elf_read_notes): Add declaration.
* elf.c (elf_read_notes): Move elf-bfd.h.
(_bfd_elf_core_find_build_id): New function.
(bfd_section_from_phdr): Scan core file PT_LOAD segments for
build-id if none is known.
(elf_parse_notes): For core files, scan for notes.
* elfcore.h (elf_core_file_matches_executable_p): If both
BFDs have identical build-ids, then they match.
(_bfd_elf_core_find_build_id): New function.
* elfxx-target.h (elf_backend_core_find_build_id): Define.
(elfNN_bed): Add elf_backend_core_find_build_id.
|
|
* MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
|
|
directory.
* ar.c (emum long option numbers): Declare. Use to provide
numerical values for long options.
(long_options): Add --output option.
(usage): Mention the --output option.
(open_output_file): New function. Create a filepath for an output
file and open it.
(extract_file): Use open_output_file().
(open_output_file):
* testsuite/binutils-all/ar.exp: Add a test of the new feature.
* doc/binutils.texi: Document the new feature.
* NEWS: Mention the new feature.
|
|
Prior to changing the logic in the assembler install tests to make sure
the present defaulting of operand sizes won't get broken. There are a
few anomalies pointed out by this:
- arithmetic insns (add, sub, etc) allow defaulting when their immediate
fits in (signed) 8 bits, but they fail to assemble with larger values,
- mov, other than arithmetic insns, doesn't allow any defaulting,
- movsx/movzx default to byte sources (in AT&T mode), and their special
casing needs to be adjusted first
- bt and friends allow defaulting, while shl and friends don't,
- ambiguous AVX and AVX512 insns don't allow defaulting.
This should ultimately all become consistent (perhaps with the exception
some of the SIMD insns); respective tests will be added to the test
cases here as the issues get addressed.
|
|
Now that the opcode table gets preprocessed, undo parts of commit
dc821c5f9a ("x86: replace Reg8, Reg16, Reg32, and Reg64"): Have the
preprocessor handle the expansion there, while making the expansions
explicit in i386-gen and the register table.
|
|
This avoids holes between the individual fields, (potentially) shrinking
the overall template table size by 4 bytes per entry.
|
|
The flag is used to indicate opcodes which can be switched between byte
and word/dword/qword forms (in a "canonical" way). Obviously it's quite
odd then to see it on insns not allowing for byte operands in the first
place. As a result the opcode bytes need to be adjusted accordingly,
which includes comparisons done in optimize_encoding().
To make re-introduction of such issues less likely have i386-gen
diagnose it (in a generally non-fatal way for now).
|
|
|
|
include-what-you-use reported this:
../../../src/binutils-gdb/gdb/infcmd.c should remove these lines:
- #include <signal.h> // lines 22-22
- #include "cli/cli-decode.h" // lines 48-48
- #include "cli/cli-utils.h" // lines 56-56
- #include "event-top.h" // lines 38-38
- #include "infcall.h" // lines 57-57
- #include "parser-defs.h" // lines 39-39
../../../src/binutils-gdb/gdb/infrun.c should remove these lines:
- #include <signal.h> // lines 37-37
- #include "cli/cli-script.h" // lines 31-31
- #include "continuations.h" // lines 54-54
- #include "dictionary.h" // lines 45-45
- #include "gdbsupport/gdb_wait.h" // lines 28-28
- #include "interps.h" // lines 55-55
Remove those includes.
Tested by rebuilding, and by quick inspection that the include fields
were indeed unnecessary.
gdb/ChangeLog:
* infcmd.c: Remove includes.
* infrun.c: Remove includes.
Change-Id: I5e25af54ecd2235960c4127add8f604ddbb19153
|
|
This patch cleans up ada-lang.h:
- Some functions just don't exist anymore, remove their declaration
- Some functions are implemented in ada-lang.c and only used there, make
them static to that file.
I moved some functions higher in the file to avoid having to
forward-declare them, but the implementations are unchanged.
gdb/ChangeLog:
* ada-lang.h (GROW_VECT): Move to ada-lang.c.
(grow_vect): Remove declaration.
(ada_type_of_array): Remove declaration.
(ada_update_initial_language): Remove declaration.
(ada_fold_name): Remove declaration.
(ada_fill_in_ada_prototype): Remove declaration.
(user_select_syms): Remove declaration.
(get_selections): Remove declaration.
(ada_tag_type): Remove declaration.
(ada_value_tag): Remove declaration.
(ada_is_others_clause): Remove declaration.
(ada_in_variant): Remove declaration.
(ada_value_struct_elt): Remove declaration.
(ada_attribute_name): Remove declaration.
(ada_system_address_type): Remove declaration.
* ada-lang.c (ada_watch_location_expression): Make static.
(GROW_VECT): Move here from ada-lang.h.
(grow_vect): Make static.
(ada_update_initial_language): Make static.
(ada_fold_name): Make static.
(ada_type_of_array): Make static.
(encoded_ordered_before): Move up.
(sort_choices): Move up.
(print_signatures): Move up.
(ada_print_symbol_signature): Move up.
(get_selections): Move up and make static.
(user_select_syms): Move up and make static.
(ada_value_struct_elt): Move up and make static.
(ada_tag_type): Make static.
(ada_value_tag): Make static.
(ada_is_others_clause): Make static.
(ada_in_variant): Make static.
(ada_attribute_name): Make static.
Change-Id: If0d46ba87d6585ab674c87244068a19e84718fc9
|
|
include-what-you-use reports:
../../../src/binutils-gdb/gdb/ada-lang.c should remove these lines:
- #include <sys/stat.h> // lines 43-43
- #include <map> // lines 66-66
- #include "c-lang.h" // lines 33-33
- #include "demangle.h" // lines 23-23
- #include "dictionary.h" // lines 47-47
- #include "gdbsupport/gdb_vecs.h" // lines 53-53
- #include "psymtab.h" // lines 58-58
../../../src/binutils-gdb/gdb/ada-lang.c should remove these lines:
- #include <sys/stat.h> // lines 43-43
- #include <map> // lines 66-66
- #include "c-lang.h" // lines 33-33
- #include "demangle.h" // lines 23-23
- #include "dictionary.h" // lines 47-47
- #include "gdbsupport/gdb_vecs.h" // lines 53-53
- #include "psymtab.h" // lines 58-58
../../../src/binutils-gdb/gdb/ada-valprint.c should remove these lines:
- #include "c-lang.h" // lines 31-31
- #include "demangle.h" // lines 26-26
- #include "infcall.h" // lines 32-32
- #include "objfiles.h" // lines 33-33
- #include "symtab.h" // lines 22-22
Remove these includes. Adding an include for gdbarch.h in
ada-valprint.c was necessary, because gdbarch_byte_order wouldn't be
found anymore.
gdb/ChangeLog:
* ada-lang.c: Remove includes.
* ada-typeprint.c: Remove includes.
* ada-valprint.c: Remove includes.
Change-Id: I07c2f2237ef0ed5fd9aa855d33711d780794fce2
|
|
These assertions can be done at compile time instead of at runtime.
gdb/ChangeLog:
* addrmap.c: Add static assertions of type size, moved from
_initialize_addrmap.
(_initialize_addrmap): Remove.
Change-Id: If089fc5d620a7168bdcdf967c6c4fecd6696b670
|
|
Just some code cleanup. This change has a few benefits:
- Shorter argument list in the functions
- If the caller needs to calculate the string, they no longer
need to explicitly call strlen
- It is easy to pass std::string to this (done in one place
currently)
This also updates a couple of places that were passing 0/1 to
a bool parameter.
gdb/ChangeLog:
2019-10-29 Christian Biesinger <cbiesinger@google.com>
* coffread.c (record_minimal_symbol): Update.
(process_coff_symbol): Update.
* dbxread.c (read_dbx_symtab): Update.
* dwarf2read.c (add_partial_symbol): Update.
(fixup_go_packaging): Update.
(load_partial_dies): Update.
(new_symbol): Update.
* elfread.c (record_minimal_symbol): Change signature to use
gdb::string_view instead of name+len.
(elf_symtab_read): Update.
(elf_rel_plt_read): Update.
* mdebugread.c (parse_partial_symbols): Update.
(handle_psymbol_enumerators): Update.
(new_symbol): Update.
* minsyms.c (minimal_symbol_reader::record_full): Change signature
to use gdb::string_view instead of name+len.
* minsyms.h (class minimal_symbol_reader) <record_full>: Likewise.
* psympriv.h (add_psymbol_to_list): Likewise.
* psymtab.c (add_psymbol_to_bcache): Likewise.
(add_psymbol_to_list): Likewise.
* stabsread.c (define_symbol): Update.
* symtab.c (symbol_set_names): Change signature to use gdb::string_view.
* symtab.h (SYMBOL_SET_NAMES): Likewise.
(symbol_set_names): Likewise.
* xcoffread.c (scan_xcoff_symtab): Update.
Change-Id: I2675c6865e0368f9c755a1081088a53aa54dda4c
|
|
As of 7bb43059820c5febb4509b15202a93efde442bc6, we no longer need
a nullterminated linkage_name to look up the entry in the hash table.
So this patch makes it so we only make the copy if the entry was
not found.
By auditing all callers of symbol_set_names, I found out that all cases
where the string may not be nullterminated already pass true for COPY_NAME.
So here, I am documenting that as a requirement and am removing the code
that relies on undefined behavior in symbol_set_names (it accessed the string
past the provided length to check for nulltermination). Note that the Ada
case at the beginning of symbol_set_names was already relying on this.
gdb/ChangeLog:
2019-10-29 Christian Biesinger <cbiesinger@google.com>
* symtab.h (symbol_set_names): Document that copy_name must be
set to true for non-nullterminated strings.
* symtab.c (symbol_set_names): Only make a nullterminated copy of
linkage_name if the entry was not found and we need to demangle.
Change-Id: I183302e1f51483ff6dff0fd5c3b0f32f0f04a5d2
|
|
This is more type-safe and can be faster due to inlining and
avoiding overhead from calling through a function pointer.
gdb/ChangeLog:
2019-10-29 Christian Biesinger <cbiesinger@google.com>
* Makefile.in (HFILES_NO_SRCDIR): Add gdb_binary_search.h.
* dwarf2-frame.c (bsearch_fde_cmp): Update.
(dwarf2_frame_find_fde): Replace bsearch with gdb::binary_search.
* gdbsupport/gdb_binary_search.h: New file.
Change-Id: I07e0a0e333f4062b27fc68d3a3f24881ebc68fd4
|
|
Adds a configure option --with-system-gdbinit-dir to specify a directory
in which to look for gdbinit files. All files in this directory are
loaded on startup (subject to -n/-nx as usual) as long as the extension
matches a known and enabled scripting language (.gdb/.py/.scm).
This also changes get_ext_lang_of_file to support ".gdb" files, similar
to get_ext_lang_defn's handling of EXT_LANG_GDB.
gdb/ChangeLog:
2019-10-29 Christian Biesinger <cbiesinger@google.com>
* NEWS: Mention new --with-system-gdbinit-dir option.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Add new option --with-system-gdbinit-dir.
* extension.c (get_ext_lang_of_file): Return extension_language_gdb
for a ".gdb" suffix.
* main.c (get_init_files): Change system_gdbinit argument to
a vector and return the files in SYSTEM_GDBINIT_DIR in
addition to SYSTEM_GDBINIT.
(captured_main_1): Update.
(print_gdb_help): Update.
* top.c (print_gdb_configuration): Also print the value of
SYSTEM_GDBINIT_DIR.
gdb/doc/ChangeLog:
2019-10-29 Christian Biesinger <cbiesinger@google.com>
* Makefile.in: Also set SYSTEM_GDBINIT_DIR for the info manual
generation.
* gdb.texinfo (many sections): Document new --with-system-gdbinit-dir
option.
Change-Id: If233859ecc21bc6421d589b37cd658a3c7d030f2
|
|
re-initiialising it.
* libcoff-in.h (struct pe_tdata): Add dos_message field.
* libcoff.h: Regenerate.
* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
dos_message field rather than initialising it.
(_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
field.
* peicode.h (pe_mkobject): Initialise the dos_message field.
(pe_mkobject_hook): Copy the dos_message field.
(pe_bfd_object_p): Copy the dos_message field.
|
|
* tic30-dis.c (print_branch): Correct size of operand array.
|
|
* d30v-dis.c (print_insn): Check that operand index is valid
before attempting to access the operands array.
|
|
* ia64-opc.c (locate_opcode_ent): Prevent a negative shift when
locating the bit to be tested.
|
|
* s12z-dis.c (opr_emit_disassembly): Check for illegal register
values.
(shift_size_table): Use a fixed size defined as S12Z_N_SIZES.
(print_insn_s12z): Check for illegal size values.
|
|
structure on hosts where sizeof(long) == 8.
* coff/internal.h (struct internal_extra_pe_filehdr): Use ints
instead of longs to hold dos_message.
|
|
If we happen to get the fixed and variable parts of the advance_loc
in different frags, bad things happen when subtracting one from a
fr_fix of zero.
PR 25125
* dw2gencfi.c (output_cfi_insn): Don't allow DW_CFA_advance_loc4
to be placed in a different frag to the rs_cfa.
|
|
|
|
Makes sure that the string is longer than prefix, so that strncmp will
do the right thing even if the string is not null-terminated.
For use in my string_view conversion patch:
https://sourceware.org/ml/gdb-patches/2019-10/msg00030.html
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/125
gdb/ChangeLog:
2019-10-28 Christian Biesinger <cbiesinger@google.com>
* gdbsupport/common-utils.h (startswith): Add an overloaded version
that takes gdb::string_view arguments.
Change-Id: I5389855de2fd70e7065a789a79374b0693651b71
|
|
* csky-dis.c (csky_chars_to_number): Check for a negative
count. Use an unsigned integer to construct the return value.
|
|
* tic30-dis.c (OPERAND_BUFFER_LEN): Define. Use as length of
operand buffer. Set value to 15 not 13.
(get_register_operand): Use OPERAND_BUFFER_LEN.
(get_indirect_operand): Likewise.
(print_two_operand): Likewise.
(print_three_operand): Likewise.
(print_oar_insn): Likewise.
|
|
* ns32k-dis.c (bit_extract): Add sanitiy check of parameters.
(bit_extract_simple): Likewise.
(bit_copy): Likewise.
(pirnt_insn_ns32k): Ensure that uninitialised elements in the
index_offset array are not accessed.
|
|
* xgate-dis.c (print_insn): Fix decoding of the XGATE_OP_DYA
operand.
|
|
|
|
|
|
PR gas/25121
* config/tc-hppa.c (tc_gen_reloc): Cast some enums to int.
(md_assemble): Likewise.
|
|
These can be generated when multiple cfi directives are emitted for an
instruction and the insn frag is closed off between directives, as
happens when listings are enabled. No doubt the advance_loc of zero
could be avoided by backtracking over frags in dw2gencfi.c before
calling cfi_add_advance_loc, but that seems like more work than
cleaning up afterwards as this patch does.
Noticed when looking at the testcase in PR25125.
PR 25125
* dw2gencfi.c (output_cfi_insn): Don't output DW_CFA_advance_loc+0.
* ehopt.c (eh_frame_estimate_size_before_relax): Return -1 for
an advance_loc of zero.
(eh_frame_relax_frag): Translate fr_subtype of 7 to size -1.
(eh_frame_convert_frag): Handle fr_subtype of 7. Abort on
unexpected fr_subtype.
|
|
Fix typos in comments. NFC.
Tested on x86_64-linux.
gdb/ChangeLog:
2019-10-26 Tom de Vries <tdevries@suse.de>
* aarch64-linux-tdep.c: Fix typos in comments.
* aarch64-tdep.c: Same.
* ada-lang.c: Same.
* amd64-nat.c: Same.
* arc-tdep.c: Same.
* arch/aarch64-insn.c: Same.
* block.c: Same.
* breakpoint.h: Same.
* btrace.h: Same.
* c-varobj.c: Same.
* cli/cli-decode.c: Same.
* cli/cli-script.c: Same.
* cli/cli-utils.h: Same.
* coff-pe-read.c: Same.
* coffread.c: Same.
* compile/compile-cplus-symbols.c: Same.
* compile/compile-object-run.c: Same.
* completer.c: Same.
* corelow.c: Same.
* cp-support.c: Same.
* demangle.c: Same.
* dwarf-index-write.c: Same.
* dwarf2-frame.c: Same.
* dwarf2-frame.h: Same.
* eval.c: Same.
* frame-base.h: Same.
* frame.h: Same.
* gdbcmd.h: Same.
* gdbtypes.h: Same.
* gnu-nat.c: Same.
* guile/scm-objfile.c: Same.
* i386-tdep.c: Same.
* i386-tdep.h: Same.
* infcall.c: Same.
* infcall.h: Same.
* linux-nat.c: Same.
* m68k-tdep.c: Same.
* macroexp.c: Same.
* memattr.c: Same.
* mi/mi-cmd-disas.c: Same.
* mi/mi-getopt.h: Same.
* mi/mi-main.c: Same.
* minsyms.c: Same.
* nat/aarch64-sve-linux-sigcontext.h: Same.
* objfiles.h: Same.
* ppc-linux-nat.c: Same.
* ppc-linux-tdep.c: Same.
* ppc-tdep.h: Same.
* progspace.h: Same.
* prologue-value.h: Same.
* python/py-evtregistry.c: Same.
* python/py-instruction.h: Same.
* record-btrace.c: Same.
* record-full.c: Same.
* remote.c: Same.
* rs6000-tdep.c: Same.
* ser-tcp.c: Same.
* sol-thread.c: Same.
* sparc-sol2-tdep.c: Same.
* sparc64-tdep.c: Same.
* stabsread.c: Same.
* symfile.c: Same.
* symtab.h: Same.
* target.c: Same.
* tracepoint.c: Same.
* tui/tui-data.h: Same.
* tui/tui-io.c: Same.
* tui/tui-win.c: Same.
* tui/tui.c: Same.
* unittests/rsp-low-selftests.c: Same.
* user-regs.h: Same.
* utils.c: Same.
* utils.h: Same.
* valarith.c: Same.
* valops.c: Same.
* valprint.c: Same.
* valprint.h: Same.
* value.c: Same.
* value.h: Same.
* varobj.c: Same.
* x86-nat.h: Same.
* xtensa-tdep.c: Same.
gdb/gdbserver/ChangeLog:
2019-10-26 Tom de Vries <tdevries@suse.de>
* linux-aarch64-low.c: Fix typos in comments.
* linux-arm-low.c: Same.
* linux-low.c: Same.
* linux-ppc-low.c: Same.
* proc-service.c: Same.
* regcache.h: Same.
* server.c: Same.
* tracepoint.c: Same.
* win32-low.c: Same.
gdb/stubs/ChangeLog:
2019-10-26 Tom de Vries <tdevries@suse.de>
* ia64vms-stub.c: Fix typos in comments.
* m32r-stub.c: Same.
* m68k-stub.c: Same.
* sh-stub.c: Same.
gdb/testsuite/ChangeLog:
2019-10-26 Tom de Vries <tdevries@suse.de>
* gdb.base/bigcore.c: Fix typos in comments.
* gdb.base/ctf-ptype.c: Same.
* gdb.base/long_long.c: Same.
* gdb.dwarf2/dw2-op-out-param.S: Same.
* gdb.python/py-evthreads.c: Same.
* gdb.reverse/i387-stack-reverse.c: Same.
* gdb.trace/tfile.c: Same.
* lib/compiler.c: Same.
* lib/compiler.cc: Same.
Change-Id: I8573d84a577894270179ae30f46c48d806fc1beb
|
|
* objcopy.c (sort_gnu_build_notes): Correct sort of deleted
note2.
|
|
|
|
Report unknown x86 feature:
$ ./elfedit --disable-x86-feature foo a.out
elfedit: Error: Unknown x86 feature: foo
$
* elfedit.c (elf_x86_feature): Report unknown x86 feature.
|
|
Since BYTE_PUT is defined as
#define BYTE_PUT(field, val) byte_put (field, val, sizeof (field))
use byte_put, instead of BYTE_PUT, to put 4-byte bitmask at ptr with
"byte_put (ptr, bitmask, 4)", instead of "BYTE_PUT (ptr, bitmask)", to
work with "unsigned char *ptr".
* elfedit.c (update_gnu_property): Replace BYTE_PUT with byte_put.
|