• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/keiths/template-completion
RSS
修訂. 時間 作者
b1ecccc users/keiths/template-completion 2018-02-24 03:07:29 Keith Seitz

Support template lookups in strncmp_iw_with_mode

This patch adds support for wild template parameter list matches, similar
to how ABI tags or function overloads are now handled.

With this patch, users will be able to "gloss over" the details of matching
template parameter lists. This is accomplished by adding (yet more) logic
to strncmp_iw_with_mode to skip parameter lists if none is explicitly given
by the user.

Here's a simple example using gdb.linespec/cpls-ops.exp:

Before
------
(gdb) ptype test_op_call
type = struct test_op_call {
public:
void operator()(void);
void operator()(int);
void operator()(long);
void operator()<int>(int *);
}
(gdb) b test_op_call::operator()
Breakpoint 1 at 0x400583: test_op_call::operator(). (3 locations)
(gdb) i b
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x400583 in test_op_call::operator()(int)
at cpls-ops.cc:43
1.2 y 0x40058e in test_op_call::operator()()
at cpls-ops.cc:47
1.3 y 0x40059e in test_op_call::operator()(long)
at cpls-ops.cc:51

The breakpoint at test_op_call::operator()<int> was never set.

After
-----
(gdb) b test_op_call::operator()
Breakpoint 1 at 0x400583: test_op_call::operator(). (4 locations)
(gdb) i b
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x400583 in test_op_call::operator()(int)
at cpls-ops.cc:43
1.2 y 0x40058e in test_op_call::operator()()
at cpls-ops.cc:47
1.3 y 0x40059e in test_op_call::operator()(long)
at cpls-ops.cc:51
1.4 y 0x4008d0 in test_op_call::operator()<int>(int*)
at cpls-ops.cc:57

Similar to how scope lookups work, passing "-qualified" to the break command
will cause a literal lookup of the symbol. In the example immediately above,
this will cause GDB to only find the three non-template functions.

gdb/ChangeLog:

* NEWS: Mention new template parameter support for
locations/completion.
* cp-support.c (cp_search_name_hash): Break on template parameter
lists.
(cp_symbol_name_matches_1): Tell strncmp_iw_with_mode to ignore
template parameter lists.
* utils.c (skip_template_parameter_list): New function.
(strncmp_iw_with_mode): Support "ignoring" of template parameter lists.
* utils.h (strncmp_iw_with_mode): Add new parameter
`ignore_template_params'.

gdb/doc/ChangeLog:

* gdb.texinfo (Debugging C Plus Plus): Document setting breakpoints
in templates.

gdb/testsuite/ChangeLog:

* gdb.cp/templates.cc (Foozle, operator<, operator<<): New.
(main): Add uses of new functions/types.
* gdb.cp/templates.exp: Add template parameter list tests.
* gdb.linespec/cpcompletion.exp: Load data-structures.exp.
(consume, maket, makearg, makefoo, test_makefoo_1, test_makefoo)
(maketype, makem, test_makem_1, test_makem, template-class-with-method)
(template-function-foo): New procedures.
(template-ret-type): Split range completion to account for template
names completing without template parameter list.
Change "setting breakpoint without template parameter test" to pass.
(test_driver): Call template-function-foo test procedure.
* gdb.linespec/cpls-ops.exp (test_operator_ambiguous): Remove
template restriction.
Add new whitespace tests for template functions.
* gdb.linespec/cpls.cc (foo, a, b, c, d, A, B, NA, NB): New
template definitions.
(template_function_foo): New function.
(main): Call template_function_foo.


f79a008 2018-02-24 03:07:29 Keith Seitz

Remove hard-coded line number from templates.exp

templates.exp has a hard-coded line number in it:

gdb_test "b 770" \
"Breakpoint .* at .*, line 770."

The problems with this are well-known, and this patch simply removes it.
I've also added the missing FSF copyright header to templates.cc.

testsuite/ChangeLog:

* gdb.cp/templates.cc (main): Add breakpoint marker comment.
* gdb.cp/templates.exp: Remove hard-coded line number.

a1c8ba9 2018-02-24 03:07:29 Keith Seitz

Move find_toplevel_char to utils.[ch]

find_toplevel_char is being used more and more outside of linespec.c, so
this patch moves it into utils.[ch].

gdb/ChangeLog:

* linespec.c (find_toplevel_char): Moved to ...
* utils.c (find_toplevel_char): ... here.
* linespec.h (find_toplevel_char): Moved to ...
* utils.h (find_toplevel_char): ... here.

7bdf778 2018-02-23 01:34:36 Andre Simoes Dias Vieira

Diagnose when trying to assemble conditional FP16 vmovx and vins

This patch makes GAS emit a warning when trying to assemble the Armv8.2
FP16 instructions VMOVX and VINS with condition codes. The Armv8-A
Reference Manual specifies these instructions without conditional codes
and says that if they are found in an IT block that they are CONSTRAINED
UNPREDICABLE.

gas/ChangeLog:
2018-02-22 Andre Vieira <andre.simoesdiasvieira@arm.com>

* config/tc-arm.c (do_neon_movhf): If conditional error out when in arm
mode and emit warning in thumb mode.
* testsuite/gas/arm/armv8-2-fp16-scalar-bad.s: Add new tests.
* testsuite/gas/arm/armv8-2-fp16-scalar-bad.l: Idem.

6b6b680 2018-02-22 23:18:39 H.J. Lu

x86: Add {rex} pseudo prefix

Add {rex} pseudo prefix to generate a REX byte for integer and legacy
vector instructions if possible. Note that this differs from the rex
prefix which generates REX prefix unconditionally.

gas/

* config/tc-i386.c (_i386_insn): Add rex_encoding.
(md_assemble): When i.rex_encoding is true, generate a REX byte
if possible.
(parse_insn): Set i.rex_encoding for {rex}.
* doc/c-i386.texi: Document {rex}.
* testsuite/gas/i386/x86-64-pseudos.s: Add {rex} tests.
* testsuite/gas/i386/x86-64-pseudos.d: Updated.

opcodes/

* i386-opc.tbl: Add {rex},
* i386-tbl.h: Regenerated.

39334a6 2018-02-22 21:49:49 A. Wilcox

Fix memory access violation when attempting to shorten a suffixed micromips instruction during lookup.

PR 22014
* config/tc-mips.c (mips_lookup_insn): Use memmove to strip the
instruction size suffix.

f4a69c9 2018-02-22 09:00:27 GDB Administrator

Automatic date update in version.in

54a27fe 2018-02-22 04:13:51 John Baldwin

Fix a typo.

gdb/testsuite/ChangeLog:

* gdb.arch/amd64-i386-address.exp: Fix a typo.

8ec5723 2018-02-22 04:03:41 John Baldwin

Add "common-defs.h" include to files in arch/ subdir not yet including it.

This fixes a build breakage on FreeBSD hosts.

gdb/ChangeLog:

* arch/aarch64.c: Include "common-defs.h".
* arch/amd64.c: Likewise.
* arch/i386.c: Likewise.

3eac2b6 2018-02-22 01:09:45 Tom Tromey

Remove a cleanup from parse_expression_for_completion

This removes a cleanup from parse_expression_for_completion, by
changing various expression-completion functions to use
gdb::unique_xmalloc_ptry rather than explicit malloc+free.

Regression tested by the buildbot.

gdb/ChangeLog
2018-02-21 Tom Tromey <tom@tromey.com>

* value.h: (extract_field_op): Update.
* eval.c (extract_field_op): Return a const char *.
* expression.h (parse_expression_for_completion): Update.
* completer.c (complete_expression): Update.
(add_struct_fields): Make fieldname const.
* parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
(mark_completion_tag, parse_exp_in_context_1): Update.
(parse_expression_for_completion): Change "name" to
unique_xmalloc_ptr*.

6ccb583 2018-02-22 00:54:49 Tom Tromey

Remove a cleanup from call_function_by_hand_dummy

This removes a cleanup from call_function_by_hand_dummy, replacing
manual allocation with std::vector.

Regression tested by the buildbot.

gdb/ChangeLog
2018-02-21 Tom Tromey <tom@tromey.com>

* infcall.c (call_function_by_hand_dummy): Use std::vector.

c113ed0 2018-02-21 20:20:03 Yao Qi

Pass readable_regcache to gdbarch method read_pc

We can pass readable_regcache to gdbarch method read_pc where it is
allowed to do read from regcache.

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* avr-tdep.c (avr_read_pc): Change parameter type to
readable_regcache.
* gdbarch.sh (read_pc): Likewise.
* gdbarch.c: Re-generated.
* gdbarch.h: Re-generated.
* hppa-tdep.c (hppa_read_pc): Change parameter type to
readable_regcache.
* ia64-tdep.c (ia64_read_pc): Likewise.
* mips-tdep.c (mips_read_pc): Likewise.
* spu-tdep.c (spu_read_pc): Likewise.

4c74fe6 2018-02-21 20:20:03 Yao Qi

Move register_dump to regcache-dump.c

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* Makefile.in (COMMON_SFILES): Add regcache-dump.c
* regcache-dump.c: New file.
* regcache.c: Move register_dump to regcache-dump.c.
(maintenance_print_registers): Likewise.
(maintenance_print_raw_registers): Likewise.
(maintenance_print_cooked_registers): Likewise.
(maintenance_print_register_groups): Likewise.
(maintenance_print_remote_registers): Likewise.
(_initialize_regcache): Likewise.
* regcache.h (register_dump): Moved from regcache.c.

796bb02 2018-02-21 20:20:03 Yao Qi

Remove regcache::m_readonly_p

Now, m_readonly_p is always false, so we can remove it, and regcache no
longer includes pseudo registers. Some regcache methods are lift up to
its parent class, like reg_buffer or detached_regcache.

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* regcache.c (regcache::regcache): Update.
(regcache::invalidate): Move it to detached_regcache::invalidate.
(get_thread_arch_aspace_regcache): Update.
(regcache::raw_update): Update.
(regcache::cooked_read): Remove some code.
(regcache::cooked_read_value): Likewise.
(regcache::raw_write): Remove assert on m_readonly_p.
(regcache::raw_supply_integer): Move it to
detached_regcache::raw_supply_integer.
(regcache::raw_supply_zeroed): Likewise.
* regcache.h (detached_regcache) <raw_supply_integer>: New
declaration.
<raw_supply_zeroed, invalidate>: Likewise.
(regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
<invalidate>: Likewise.
<m_readonly_p>: Removed.

215c69d 2018-02-21 20:20:03 Yao Qi

No longer create readonly regcache

Nowadays, we create a readonly regcache in get_return_value, and pass it
to gdbarch_return_value to get the return value. In theory, we can pass a
readable_regcache instance and get the return value, because we don't need
to modify the regcache. Unfortunately, gdbarch_return_value is designed
to multiplex regcache, according to READBUF and WRITEBUF.

# If READBUF is not NULL, extract the return value and save it in this
# buffer.
#
# If WRITEBUF is not NULL, it contains a return value which will be
# stored into the appropriate register.

In fact, gdbarch_return_value should be split to three functions, 1) only
return return_value_convention, 2) pass regcache_readonly and readbuf, 3)
pass regcache and writebuf. These changes are out of the scope of this
patch series, so I pass regcache to gdbarch_return_value even for read,
and trust each gdbarch backend doesn't modify regcache.

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* infcmd.c (get_return_value): Let stop_regs point to
get_current_regcache.
* regcache.c (regcache::regcache): Remove.
(register_dump_reg_buffer): New class.
(regcache_print): Adjust.
* regcache.h (regcache): Remove constructors.

f3384e6 2018-02-21 20:20:03 Yao Qi

Replace regcache::dump with class register_dump

Nowadays, we need to dump registers contents from "readwrite" regcache and
"readonly" regcache,

if (target_has_registers)
get_current_regcache ()->dump (out, what_to_dump);
else
{
/* For the benefit of "maint print registers" & co when
debugging an executable, allow dumping a regcache even when
there is no thread selected / no registers. */
regcache dummy_regs (target_gdbarch ());
dummy_regs.dump (out, what_to_dump);
}

since we'll have two different types/classes for "readwrite" regcache and
"readonly" regcache, we have to move dump method to their parent class,
reg_buffer. However, the functionality of "dump" looks unnecessary to
reg_buffer (because some dump modes like regcache_dump_none,
regcache_dump_remote and regcache_dump_groups don't need reg_buffer at
all, they need gdbarch to do the dump), so I decide to move "dump" into a
separate classes, and each sub-class is about each mode of dump.

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* regcache.c (class register_dump): New class.
(register_dump_regcache, register_dump_none): New class.
(register_dump_remote, register_dump_groups): New class.
(regcache_print): Update.
* regcache.h (regcache_dump_what): Move it to regcache.c.
(regcache) <dump>: Remove.

c8ec2f3 2018-02-21 20:20:03 Yao Qi

Class detached_regcache

jit.c uses the regcache in a slightly different way, the regcache dosen't
write through to target, but it has read and write methods. If I apply
regcache in record-full.c, it has the similar use pattern. This patch
adds a new class detached_regcache, a register buffer, but can be
read and written.

Since jit.c doesn't want to write registers through to target, it uses
regcache as a readonly regcache (because only readonly regcache
disconnects from the target), but it adds a hole in regcache
(raw_set_cached_value) in order to modify a readonly regcache. This patch
fixes this hole completely.

regcache inherits detached_regcache, and detached_regcache inherits
readable_regcache. The ideal design is that both detached_regcache and
readable_regcache inherit reg_buffer, and regcache inherit
detached_regcache and regcache_read (virtual inheritance). I concern
about the performance overhead of virtual inheritance, so I don't do it in
the patch.

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* jit.c (struct jit_unwind_private) <regcache>: Change its type to
reg_buffer_rw *.
(jit_unwind_reg_set_impl): Call raw_supply.
(jit_frame_sniffer): Use reg_buffer_rw.
* record-full.c (record_full_core_regbuf): Change its type.
(record_full_core_open_1): Use reg_buffer_rw.
(record_full_close): Likewise.
(record_full_core_fetch_registers): Use regcache->raw_supply.
(record_full_core_store_registers): Likewise.
* regcache.c (regcache::get_register_status): Move it to
reg_buffer.
(regcache_raw_set_cached_value): Remove.
(regcache::raw_set_cached_value): Remove.
(regcache::raw_write): Call raw_supply.
(regcache::raw_supply): Move it to reg_buffer_rw.
* regcache.h (regcache_raw_set_cached_value): Remove.
(reg_buffer_rw): New class.

daf6667 2018-02-21 20:20:03 Yao Qi

Class readonly_detached_regcache

This patch adds a new class (type) for readonly regcache, which is
created via regcache::save. readonly_detached_regcache inherits
readable_regcache.

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
readonly_detached_regcache.
(dummy_frame_prev_register): Use regcache->cooked_read.
* frame.c (frame_save_as_regcache): Change return type.
(frame_pop): Update.
* frame.h (frame_save_as_regcache): Update declaration.
* inferior.h (get_infcall_suspend_state_regcache): Update
declaration.
* infrun.c (infcall_suspend_state) <registers>: use
readonly_detached_regcache.
(save_infcall_suspend_state): Don't use regcache_dup.
(get_infcall_suspend_state_regcache): Change return type.
* linux-fork.c (struct fork_info) <savedregs>: Change to
readonly_detached_regcache.
<pc>: New field.
(fork_save_infrun_state): Don't use regcache_dup.
(info_checkpoints_command): Adjust.
* mi/mi-main.c (register_changed_p): Update declaration.
(mi_cmd_data_list_changed_registers): Use
readonly_detached_regcache.
(register_changed_p): Change parameter type to
readonly_detached_regcache.
* ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
readonly_detached_regcache.
(ppu2spu_sniffer): Construct a new readonly_detached_regcache.
* regcache.c (readonly_detached_regcache::readonly_detached_regcache):
New.
(regcache::save): Move it to reg_buffer.
(regcache::restore): Change parameter type.
(regcache_dup): Remove.
* regcache.h (reg_buffer) <save>: New method.
(readonly_detached_regcache): New class.
* spu-tdep.c (spu2ppu_cache) <regcache>: Use
readonly_detached_regcache.
(spu2ppu_sniffer): Construct a new readonly_detached_regcache.

fc5b873 2018-02-21 20:20:03 Yao Qi

Remove regcache_save and regcache_cpy

... instead we start to use regcache methods save and restore. It is
quite straightforward to replace regcache_save with regcache->save.

regcache_cpy has some asserts, some of them not necessary, like

gdb_assert (src != dst);

because we already assert !m_readonly_p and src->m_readonly_p, so
src isn't dst. Some of the asserts are moved to ::restore.

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* frame.c (frame_save_as_regcache): Use regcache method save.
(frame_pop): Use regcache method restore.
* infrun.c (restore_infcall_suspend_state): Likewise.
* linux-fork.c (fork_load_infrun_state): Likewise.
* ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
save.
* regcache.c (regcache_save): Remove.
(regcache::restore): More asserts.
(regcache_cpy): Remove.
* regcache.h (regcache_save): Remove the declaration.
(regcache::restore): Move from private to public.
Remove the friend declaration of regcache_cpy.
(regcache_cpy): Remove declaration.

849d0ba 2018-02-21 20:20:03 Yao Qi

class readable_regcache and pass readable_regcache to gdbarch pseudo_register_read and pseudo_register_read_value

pseudo registers are either from raw registers or memory, so
gdbarch methods pseudo_register_read and pseudo_register_read_value
should have regcache object which only have read methods. In other
words, we should disallow writing to regcache in these two gdbarch
methods. In order to apply this restriction, this patch adds a new
class readable_regcache, derived from reg_buffer, and it only has
raw_read and cooked_read methods. regcache is derived from
readable_regcache. This patch also passes readable_regcache instead of
regcache to gdbarch methods pseudo_register_read and
pseudo_register_read_value.

This patch moves raw_read* and cooked_read* methods to readable_regcache,
which is straightforward. One thing not straightforward is that I split
regcache::xfer_part to readable_regcache::read_part and regcache::write_part,
because readable_regcache can only have methods to read.

readable_regcache is an abstract base class, and it has a pure virtual
function raw_update, because I don't want readable_regcache know where
these raw registers are from. They can be from either the target
(readwrite regcache) or the regcache itself (readonly regcache).

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
parameter type to 'readable_regcache *'.
* amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
* arm-tdep.c (arm_neon_quad_read): Likewise.
(arm_pseudo_read): Likewise.
* avr-tdep.c (avr_pseudo_register_read): Likewise.
* bfin-tdep.c (bfin_pseudo_register_read): Likewise.
* frv-tdep.c (frv_pseudo_register_read): Likewise.
* gdbarch.c: Re-generated.
* gdbarch.h: Re-generated.
* gdbarch.sh (pseudo_register_read): Change parameter type to
'readable_regcache *'.
(pseudo_register_read_value): Likewise.
* h8300-tdep.c (pseudo_from_raw_register): Likewise.
(h8300_pseudo_register_read): Likewise.
* hppa-tdep.c (hppa_pseudo_register_read): Likewise.
* i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
(i386_pseudo_register_read_into_value): Likewise.
(i386_pseudo_register_read_value): Likewise.
* i386-tdep.h (i386_pseudo_register_read_into_value): Update
declaration.
* ia64-tdep.c (ia64_pseudo_register_read): Likewise.
* m32c-tdep.c (m32c_raw_read): Likewise.
(m32c_read_flg): Likewise.
(m32c_banked_register): Likewise.
(m32c_banked_read): Likewise.
(m32c_sb_read): Likewise.
(m32c_part_read): Likewise.
(m32c_cat_read): Likewise.
(m32c_r3r2r1r0_read): Likewise.
(m32c_pseudo_register_read): Likewise.
* m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
* mep-tdep.c (mep_pseudo_cr32_read): Likewise.
(mep_pseudo_cr64_read): Likewise.
(mep_pseudo_register_read): Likewise.
* mips-tdep.c (mips_pseudo_register_read): Likewise.
* msp430-tdep.c (msp430_pseudo_register_read): Likewise.
* nds32-tdep.c (nds32_pseudo_register_read): Likewise.
* regcache.c (regcache::raw_read): Move it to readable_regcache.
(regcache::cooked_read): Likewise.
(regcache::cooked_read_value): Likewise.
(regcache_cooked_read_signed):
(regcache::cooked_read): Likewise.
* regcache.h (readable_regcache): New class.
(regcache): Inherit readable_regcache. Move some methods to
readable_regcache.
* rl78-tdep.c (rl78_pseudo_register_read): Change
parameter type to 'readable_regcache *'.
* rs6000-tdep.c (do_regcache_raw_read): Remove.
(e500_pseudo_register_read): Change parameter type to
'readable_regcache *'.
(dfp_pseudo_register_read): Likewise.
(vsx_pseudo_register_read): Likewise.
(efpr_pseudo_register_read): Likewise.
* s390-tdep.c (s390_pseudo_register_read): Likewise.
* sh-tdep.c (sh_pseudo_register_read): Likewise.
* sh64-tdep.c (pseudo_register_read_portions): Likewise.
(sh64_pseudo_register_read): Likewise.
* sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
* sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
* spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
(spu_pseudo_register_read): Likewise.
* xtensa-tdep.c (xtensa_register_read_masked): Likewise.
(xtensa_pseudo_register_read): Likewise.

3171659 2018-02-21 20:20:02 Yao Qi

Class reg_buffer

This patch adds a new class reg_buffer, and regcache inherits it. Class
reg_buffer is a very simple class, which has the buffer for register
contents and status only. It doesn't have any methods to set contents and
status, and it is expected that its children classes can inherit it and
add different access methods.

Another reason I keep class reg_buffer so simple is that I think
reg_buffer can be even reused in other classes which need to record the
registers contents and status, like frame cache for example.

gdb:

2018-02-21 Yao Qi <yao.qi@linaro.org>

* regcache.c (regcache::regcache): Call reg_buffer ctor.
(regcache::arch): Move it to reg_buffer::arch.
(regcache::register_buffer): Likewise.
(regcache::assert_regnum): Likewise.
(regcache::num_raw_registers): Likewise.
* regcache.h (reg_buffer): New class.
(regcache): Inherit reg_buffer.

bbad996 2018-02-21 17:35:47 Alan Modra

ia64 testsuite changes for --gc-sections

* testsuite/ld-elf/group8b.d: Run test on ia64. Use xfail rather
than notarget.
* testsuite/ld-elf/pr12851.d: Likewise.
* testsuite/ld-elf/pr12975.d: Likewise.
* testsuite/ld-elf/pr13177.d: Likewise.
* testsuite/ld-elf/pr13195.d: Likewise.
* testsuite/ld-elf/pr17615.d: Likewise.
* testsuite/ld-elf/pr21562a.d: Likewise.
* testsuite/ld-elf/pr21562b.d: Likewise.
* testsuite/ld-elf/pr21562c.d: Likewise.
* testsuite/ld-elf/pr21562d.d: Likewise.
* testsuite/ld-elf/pr21562i.d: Likewise.
* testsuite/ld-elf/pr21562j.d: Likewise.
* testsuite/ld-elf/pr21562k.d: Likewise.
* testsuite/ld-elf/pr21562l.d: Likewise.
* testsuite/ld-elf/pr21562m.d: Likewise.
* testsuite/ld-elf/pr21562n.d: Likewise.
* testsuite/ld-elf/group9a.d: Run test on ia64 and alpha. Use xfail
rather than notarget.
* testsuite/ld-elf/group9b.d: Likewise.
* testsuite/ld-elf/pr22677.d: Likewise.

50a98a5 2018-02-21 09:00:29 GDB Administrator

Automatic date update in version.in

1f1e0a5 2018-02-21 05:51:37 Maciej W. Rozycki

MIPS16/GAS/testsuite: Add cross-section R_MIPS16_PC16_S1 relocation tests

Add a pair of MIPS16 branch tests to verify correct R_MIPS16_PC16_S1
relocation generation for cross-section references in a single source.
This complements commit c9775dde3277 ("MIPS16: Add R_MIPS16_PC16_S1
branch relocation support").

gas/
* testsuite/gas/mips/mips16-branch-reloc-4.d: New test.
* testsuite/gas/mips/mips16-branch-reloc-5.d: New test.
* testsuite/gas/mips/mips16-branch-reloc-4.s: New test source.
* testsuite/gas/mips/mips16-branch-reloc-5.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new tests.

75f3166 2018-02-21 05:51:36 Maciej W. Rozycki

MIPS16/opcodes: Free up `M' operand code

The `M' and `m' MIPS16 operand codes are functionally the same, denoting
a 7-bit register list that is encoded the same way for both SAVE and
RESTORE. Use `m' for both instructions then, making `M' available for a
different use.

opcodes/
* mips16-opc.c (decode_mips16_operand) <'M'>: Remove case.
(mips16_opcodes): Replace `M' with `m' for "restore".

include/
* opcode/mips.h: Remove `M' operand code.

cd665a9 2018-02-21 04:49:48 Max Filippov

gas: xtensa: limit size of auto litpools

Literal movement code may grow auto litpool so big that it won't be
possible to jump around it. Limit the size of auto litpools by 1/2 of
the jump range.

gas/
2018-02-20 Max Filippov <jcmvbkbc@gmail.com>

* config/tc-xtensa.c (struct litpool_frag): Add new field
literal_count.
(MAX_AUTO_POOL_LITERALS, MAX_EXPLICIT_POOL_LITERALS)
(MAX_POOL_LITERALS): New macro definitions.
(auto_litpool_limit): Initialize to 0.
(md_parse_option): Set auto_litpool_limit in the presence of
--auto-litpools option.
(xtensa_maybe_create_literal_pool_frag): Zero-initialize
literal_count field.
(xg_find_litpool): New function. Make sure that found literal
pool size is within the limit.
(xtensa_move_literals): Extract literal pool search code into
the new function.
* testsuite/gas/xtensa/all.exp: Add auto-litpools-2 test.
* testsuite/gas/xtensa/auto-litpools-2.d: New file.
* testsuite/gas/xtensa/auto-litpools-2.s: New file.
* testsuite/gas/xtensa/auto-litpools.d: Fix up changed
addresses.
* testsuite/gas/xtensa/auto-litpools.s: Change literal value so
that objdump doesn't get out of sync.

7104e59 2018-02-21 01:41:54 Simon Marchi

remote-sim: Add missing ATTRIBUTE_PRINTF

Fixes:

/home/emaisin/src/binutils-gdb/gdb/remote-sim.c:385:34: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vfprintf_filtered (gdb_stdout, format, args);
^~~~~~
/home/emaisin/src/binutils-gdb/gdb/remote-sim.c:394:34: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vfprintf_filtered (gdb_stdout, format, ap);
^~~~~~
/home/emaisin/src/binutils-gdb/gdb/remote-sim.c:402:34: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vfprintf_filtered (gdb_stderr, format, ap);
^~~~~~
/home/emaisin/src/binutils-gdb/gdb/remote-sim.c:413:11: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
verror (format, args);
^~~~~~
4 errors generated.

gdb/ChangeLog:

* remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.

b0ab9c4 2018-02-20 22:33:15 Ronald Hoogenboom

Fix typo in listing of objcopy's command line options.

binutils* doc/binutils.texi (objcopy): Add missing closing square
parenthesis to listing of objcopy's command line options.

6e8d06d 2018-02-20 22:21:55 Jason Duerstock

Enable link time garbage collection support for the IA64 target.

As suggested in long ago in a galaxy far, far away [1], I tried
turning it on and it seems to work, as is evidenced by the Mesa
package in Debian/ia64. Please enable it with the following patch.
[1] https://sourceware.org/ml/binutils/2007-07/msg00241.html

bfd * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.

2d8adcb 2018-02-20 22:12:33 Markus Metzger

gnulib: import mkstemp

Older versions of MinGW do not support mkstemp causing:

gdb/unittests/scoped_fd-selftests.c:37:29: error: \
'mkstemp' was not declared in this scope
int fd = mkstemp (filename);
^
gdb/unittests/scoped_fd-selftests.c: In function 'void
selftests::scoped_fd::test_release()':
gdb/unittests/scoped_fd-selftests.c:56:29: error: \
'mkstemp' was not declared in this scope
int fd = mkstemp (filename);
^

Import mkstemp from gnulib.

gdb/
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
* gnulib/aclocal.m4: Regenerated.
* gnulib/config.in: Regenerated.
* gnulib/configure: Regenerated.
* gnulib/import/Makefile.am: Regenerated.
* gnulib/import/Makefile.in: Regenerated.
* gnulib/import/m4/gnulib-cache.m4: Regenerated.
* gnulib/import/m4/gnulib-comp.m4: Regenerated.
* gnulib/import/m4/mkstemp.m4: Imported.
* gnulib/import/m4/secure_getenv.m4: Imported.
* gnulib/import/m4/tempname.m4: Imported.
* gnulib/import/mkstemp.c: Imported.
* gnulib/import/secure_getenv.c: Imported.
* gnulib/import/tempname.c: Imported.
* gnulib/import/tempname.h: Imported.