• R/O
  • HTTP
  • SSH
  • HTTPS

Liste der Commits

Tags
Keine Tags

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/palves/gdbserver-extract-unsigned-integer
RSS
Rev. Zeit Autor
04956cf users/palves/gdbserver-extract-unsigned-integer 2016-02-11 21:20:36 Pedro Alves

Fix gdbserver's regcache_raw_read_unsigned on big endian hosts

The regcache_raw_read_unsigned function is memcpy'ing a 32-bit value
directly into a 64-bit variable, which doesn't work on big endian
targets.

Fix this by memcpy'ing to a buffer, and then using
extract_unsigned_integer, just like gdb's version.

gdb/gdbserver/ChangeLog:
2016-02-11 Pedro Alves <palves@redhat.com>

* Makefile.in (SFILES): Add $(srcdir)/common/gdb-byteswap.c.
(gdb-byteswap.o): New rule.
* regcache.c: Include "gdb-byteswap.h".
(host_bfd_endian): New function.
(regcache_raw_read_unsigned): Use extract_unsigned_integer and
host_bfd_endian.

ca47aa9 2016-02-11 21:14:02 Pedro Alves

Move store/extract ... integer routines to gdb/common/

In preparation for gdbserver using them as well.

gdb/ChangeLog:
2016-02-11 Pedro Alves <palves@redhat.com>

* Makefile.in (SFILES): Add common/gdb-byteswap.c.
(HFILES_NO_SRCDIR): Add common/gdb-byteswap.h.
(COMMON_OBS): Add common/gdb-byteswap.o.
(gdb-byteswap.o): New rule.
* common/common-types.h: Include bfd-types.h.
* common/gdb-byteswap.c: New file.
* common/gdb-byteswap.h: New file.
* defs.h (extract_signed_integer, extract_unsigned_integer)
(extract_long_unsigned_integer, extract_typed_address)
(store_signed_integer, store_unsigned_integer): Moved to
common/gdb-byteswap.h.
* findvar.c (extract_signed_integer, extract_unsigned_integer)
(extract_long_unsigned_integer, extract_typed_address)
(store_signed_integer, store_unsigned_integer): Moved to
common/gdb-byteswap.c.

dd4a4f8 2016-02-11 20:35:04 Pedro Alves

Move 'enum bfd_endian' to a non-generated header

Because:

- GDB uses enum bfd_endian extensively.
- gdbserver does not build/link-with bfd.
- We'd like to share more code between gdb and gdbserver.

It'd make our lives easier if we could just use bfd_endian in
gdbserver as well.

The problem is that bfd_endian is defined in a header that only exists
if bfd is built/configured.

Thus this moves bfd_endian to a separate header, so gdbserver can
include it.

bfd/ChangeLog:
2016-02-11 Pedro Alves <palves@redhat.com>

* bfd-in.h: Include bfd-types.h
* bfd-in2.h: Regenerate.
* targets.c (enum bfd_endian): Moved to include/bfd-types.h.

include/ChangeLog:
2016-02-11 Pedro Alves <palves@redhat.com>

* bfd-types.h: New file.

32875eb 2016-02-11 12:33:52 H.J. Lu

Mask off the least significant bit in GOT offset

The least significant bit in GOT offset is to record whether we have
initialized the GOT entry in R_386_GOT32 processing. We need to mask
it off for R_386_GOT32X.

PR ld/19601
* elf32-i386.c (elf_i386_relocate_section): Mask off the least
significant bit in GOT offset for R_386_GOT32X.

cd7c1b9 2016-02-11 09:00:14 GDB Administrator

Automatic date update in version.in

5ac87a9 2016-02-11 07:31:13 Marcin Kościelnicki

gdb.trace: Read XML target description from tfile.

gdb/ChangeLog:

* tracefile-tfile.c (trace_tdesc): New static variable.
(tfile_open): Clear trace_tdesc, call target_find_description.
(tfile_interp_line): Recognize tdesc lines.
(tfile_close): Clear trace_tdesc.
(tfile_xfer_partial_features): New function.
(tfile_xfer_partial): Call tfile_xfer_partial_features.
(tfile_append_tdesc_line): New function.

18d3cec 2016-02-11 07:31:11 Marcin Kościelnicki

gdb.trace: Save XML target description in tfile.

gdb/ChangeLog:

* ctf.c (ctf_write_tdesc): New function.
(ctf_write_ops): Wire in ctf_write_tdesc.
* tracefile-tfile.c (tfile_write_tdesc): New function.
(tfile_write_ops): Wire in tfile_write_tdesc.
* tracefile.c (trace_save): Call write_tdesc method.
* tracefile.h (struct trace_file_write_ops): Add write_tdesc method.
* xml-tdesc.c (target_fetch_description_xml): New function.
* xml-tdesc.h: Add target_fetch_description_xml prototype.

9f6a71b 2016-02-11 01:40:52 Yao Qi

Clear *VAL in regcache_raw_read_unsigned

We have function regcache_raw_read_unsigned defined in both GDB and
GDBserver, so that it is used in common like this,

ULONGEST value;
status = regcache_raw_read_unsigned (regcache, regnum, &value);

'value' is correctly set in GDB side, but may not be correctly set
in GDBserver, because &value is passed in regcache_raw_read_unsigned
but collect_register may only set part of the whole variable. In my
test, I see the top half of 'value' is garbage. This patch fixes this
problem by clearing *VAL before calling collect_register.

gdb/gdbserver:

2016-02-10 Yao Qi <yao.qi@linaro.org>

* regcache.c (regcache_raw_read_unsigned): Clear *VAL.

550dc4e 2016-02-11 00:10:18 Simon Marchi

arm-tdep.c: Fix typo

unpriveleged -> unprivileged

gdb/ChangeLog:

* arm-tdep.c (arm_copy_extra_ld_st): Fix "unpriveleged" typo.
(arm_decode_dp_misc): Likewise.

62e5fd5 2016-02-10 23:30:31 Marcin Kościelnicki

gdb/x86: Implement ax_pseudo_register_collect hook.

Makes "collect $ymm15" action work.

gdb/ChangeLog:

* amd64-tdep.c (amd64_ax_pseudo_register_collect): New function.
(amd64_init_abi): Fill ax_pseudo_register_collect hook.
* gdb/i386-tdep.c (i386_pseudo_register_read_into_value): Remove
misleading comment.
(i386_pseudo_register_write): Ditto.
(i386_ax_pseudo_register_collect): New function.
(i386_gdbarch_init): Fill ax_pseudo_register_collect hook.
* i386-tdep.h: Add i386_ax_pseudo_register_collect prototype.

e909d85 2016-02-10 23:30:13 Marcin Kościelnicki

gdb.trace: Use g packet order in tfile_fetch_registers.

tfile_fetch_registers currently wrongly fetches registers using
gdb order instead of g packet order. On x86_64 with AVX, this causes
problems with ymm*h and orig_rax registers: gdb has ymm*h first, while
g packet has orig_rax first.

gdb/ChangeLog:

* tracefile-tfile.c (tfile_fetch_registers): Use g packet order
instead of gdb order.

gdb/doc/ChangeLog:

* gdb.texinfo (Trace File Format): Remove misleading information
about register block ordering.

473b99e 2016-02-10 22:50:22 Marcin Kościelnicki

gdb.trace: Fix off-by-one in tfile_fetch_registers.

This resulted in the last register being considered unavailable.
On plain x86_64 (without AVX), this happened to be orig_rax.

gdb/ChangeLog:

* tracefile-tfile.c (tfile_fetch_registers): Fix off-by-one in bounds
check.

4670103 2016-02-10 21:09:01 Claudiu Zissulescu

Add support for ARC instruction relaxation in the assembler.

gas/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>

* config/tc-arc.h (TC_FRAG_TYPE, TC_PCREL_ADJUST, MAX_INSN_ARGS)
(MAX_INSN_FLGS, MAX_FLAG_NAME_LENGHT, TC_GENERIC_RELAX_TABLE):
Define.
(arc_flags, arc_relax_type): New structure.
* config/tc-arc.c (FRAG_MAX_GROWTH, RELAX_TABLE_ENTRY)
(RELAX_TABLE_ENTRY_MAX): New define.
(relaxation_state, md_relax_table, arc_relaxable_insns)
(arc_num_relaxable_ins): New variable.
(rlx_operand_type, arc_rlx_types): New enums.
(arc_relaxable_ins): New structure.
(OPTION_RELAX): New option.
(arc_insn): New relax member.
(arc_flags): Remove.
(relax_insn_p): New function.
(apply_fixups): Likewise.
(relaxable_operand): Likewise.
(may_relax_expr): Likewise.
(relaxable_flag): Likewise.
(arc_pcrel_adjust): Likewise.
(md_estimate_size_before_relax): Implement.
(md_convert_frag): Likewise.
(md_parse_option): Handle new mrelax option.
(md_show_usage): Likewise.
(assemble_insn): Set relax member.
(emit_insn0): New function.
(emit_insn1): Likewise.
(emit_insn): Handle relaxation case.
* NEWS: Mention the new relaxation option.
* doc/c-arc.texi (ARC Options): Document new mrelax option.

gas/testsuite
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>

* gas/arc/relax-avoid1.d: New file.
* gas/arc/relax-avoid1.s: Likewise.
* gas/arc/relax-avoid2.d: Likewise.
* gas/arc/relax-avoid2.s: Likewise.
* gas/arc/relax-avoid3.d: Likewise.
* gas/arc/relax-avoid3.s: Likewise.
* gas/arc/relax-b.d: Likewise.
* gas/arc/relax-b.s: Likewise.

include/opcode/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>

* arc.h (arc_opcode arc_relax_opcodes, arc_num_relax_opcodes):
Declare.

opcodes/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>

* arc-opc.c (arc_relax_opcodes, arc_num_relax_opcodes): New
variable.

83da6e7 2016-02-10 20:25:59 Nick Clifton

Correct assertion in NIOS2 linker to allow signed 16-buit immediate values.

PR 19405
* elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
immediate values.
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
number of messages about FDE encoding preventing .eh_frame_hdr
generation.

52cf976 2016-02-10 19:54:29 Nick Clifton

Sync top level files with gcc.

Import these patches from the GCC mainline:

2016-01-12 Andris Pavenis <andris.pavenis@iki.fi>

* configure.ac: Enable LTO for DJGPP
* configure: Regenerate

2016-01-24 Mikhail Maltsev <maltsevm@gmail.com>

PR bootstrap/69329
* Makefile.tpl (BASE_FLAGS_TO_PASS): Add LSAN_OPTIONS.
* Makefile.in: Regenerate.

2016-01-25 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>

* Makefile.in: Regenerate.
* Makefile.tpl: Export ISLVER.
* configure: Regenerate.
* config/isl.m4: Detect isl-0.15.

2016-01-29 Sebastian Pop <s.pop@samsung.com>

* config/isl.m4: Add comments about isl-0.16.
* configure: Regenerate.

1233c0b 2016-02-10 12:28:01 Joel Brobecker

Update NEWS post GDB 7.11 branch creation.

gdb/ChangeLog:

* NEWS: Create a new section for the next release branch.
Rename the section of the current branch, now that it has
been cut.

d1dc094 2016-02-10 12:20:26 Joel Brobecker

Bump version to 7.11.50.DATE-git.

Now that the GDB 7.11 branch has been created, we can
bump the version number.

gdb/ChangeLog:

GDB 7.11 branch created (9ef9e6a6a0dd8f948708cb67c9afcfd0be40cb0a):
* version.in: Bump version to 7.11.50.DATE-git.

9ef9e6a 2016-02-10 09:04:45 Keith Seitz

breakpoints/19546: Fix crash after updating breakpoints

One of the last checks update_breakpoints_after_exec does while looping
over the list of breakpoints is check that the breakpoint has a valid
location spec. It uses event_location_empty_p to check if the location spec
is "empty", and if it is, the breakpoint is deleted.

momentary_breakpoint types rely on setting the breakpoint structure's
location spec to NULL, thereby causing an update to delete the breakpoint.
However, event_location_empty_p assumed that locations were never NULL.
As a result, GDB would crash dereferencing a NULL pointer whenever
update_breakpoints_after_exec would encounter a momentary_breakpoint.

This patch creates a new wrapper/helper function which tests that the given
breakpoint's location spec is non-NULL and if it is not "empty"
or "unspecified."

gdb/ChangeLog

PR breakpoints/19546
* breakpoint.c (breakpoint_event_location_empty_p): New function.
(update_breakpoints_after_exec, bkpt_re_set): Use this new function
instead of event_location_empty_p.

gdb/testsuite/ChangeLog

PR breakpoints/19546
* gdb.base/infcall-exec.c: New file.
* gdb.base/infcall-exec2.c: New file.
* gdb.base/infcall-exec.exp: New file.

224c1b2 2016-02-10 09:00:21 GDB Administrator

Automatic date update in version.in

39a67dc 2016-02-10 07:31:04 Keith Seitz

Enable/update legacy linespecs in MI.

MI is currently using string_to_event_location to enable the use of legacy
linespecs, but using this function (until this patchset) had the (as yet
unnoticed) side effect of allowing both MI and CLI representation for
explicit locations.

This patch simply changes MI to use the same legacy linespec functions
that the python and guile interpreters use. This eliminates the CLI syntax
for explicit locations (in MI).

gdb/ChangeLog

* mi/mi-cmd-break.c (mi_cmd_break_insert_1): Use
string_to_event_location_basic instead of string_to_event_location.

a96e36d 2016-02-10 07:29:21 Keith Seitz

Use string_to_event_location_basic in guile.

This patch, analogous to the previous python patch, implements proper
legacy linespec support in guile code using the newly introduced
string_to_event_location_basic.

gdb/ChangeLog

* guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Skip
leading whitespace and use string_to_event_location_basic instead
of new_linespec_location.

gdb/testsuite/ChangeLog

* gdb.guile/scm-breakpoint.exp (test_bkpt_address): New procedure.
(toplevel): Call test_bkpt_address.

9f61929 2016-02-10 07:27:50 Keith Seitz

python/19506 -- gdb.Breakpoint address location regression

Now that "legacy" linespecs benefit from consolidated support in
string_to_event_location_basic, python's Breakpoint command should use this
function to turn strings into event locations.

As a result, this patch fixes python/19506. Before:

(gdb) python gdb.Breakpoint("*main")
Traceback (most recent call last):
File "<string>", line 1, in <module>
RuntimeError: Function "*main" not defined.
Error while executing Python code.

After:

(gdb) python gdb.Breakpoint("*main")
Breakpoint 1 at 0x4005fb: file ../../../src/gdb/testsuite/gdb.python/py-breakpoint.c, line 32.

gdb/ChangeLog

PR python/19506
* python/py-breakpoint.c (bppy_init): Use
string_to_event_location_basic instead of new_linespec_location.

gdb/testsuite/ChangeLog

PR python/19506
* gdb.python/py-breakpoint.exp (test_bkpt_address): New procedure.
(toplevel): Call test_bkpt_address.

eeb1af4 2016-02-10 03:02:53 Keith Seitz

Refactor string_to_event_location for legacy linespec support.

This patch refactors string_to_event_location, breaking it into two
separate functions:

1) string_to_event_location_basic
A "basic" string parser that implements support for "legacy" linespecs
(linespec, address, and probe locations). This function is intended to
be used by any UI wishing/needing to support this legacy behavior.

2) string_to_event_location
This is now intended as a CLI-only function which adds explicit location
parsing in a CLI-appropriate manner (in the form of traditional option/value
pairs).

Together these patches serve to simplify string-to-event location parsing
for all existing non-CLI interfaces (MI, guile, and python).

gdb/ChangeLog

* location.c (string_to_explicit_location): Note that "-p" is
reserved for probe locations and return NULL for any input
that starts with that.
(string_to_event_location): Move "legacy" linespec code to ...
(string_to_event_location_basic): ... here.
* location.h (string_to_event_location): Update comment.
(string_to_event_location_basic): New function.

609332f 2016-02-10 01:34:24 Nick Clifton

Fix compile time warnings building the binutils with a gcc6 compiler.

include * opcode/metag.h (metag_scondtab): Mark as possibly unused.
* opcode/nds32.h (nds32_r45map): Likewise.
(nds32_r54map): Likewise.
* opcode/visium.h (gen_reg_table): Likewise.
(fp_reg_table, cc_table, opcode_table): Likewise.

bfd * oasys.c (oasys_archive_p): Fix indentation.
* elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
constant for left shifting.

1e94266 2016-02-09 23:01:58 Simon Marchi

Modernize configure.ac's

Using AC_OUTPUT with arguments has been deprecated for some time in
autoconf, even in version 2.64, which we are using. This change should
not affect functionality.

I also removed the "exit 0"'s, they shouldn't be necessary.

gdb/ChangeLog:

* configure.ac: Use AC_CONFIG_FILES instead of passing arguments
to AC_OUTPUT. Remove "exit 0" at the end.
* configure: Regenerate.

gdb/testsuite/ChangeLog:

* configure.ac: Use AC_CONFIG_FILES instead of passing arguments
to AC_OUTPUT.
* configure: Regenerate.

gdb/gdbserver/ChangeLog:

* configure.ac: Use AC_CONFIG_FILES instead of passing arguments
to AC_OUTPUT.
* configure: Regenerate.

2a7f3df 2016-02-09 21:12:17 Pedro Alves

Fix PR19548: Breakpoint re-set inserts breakpoints when it shouldn't

PR19548 shows that we still have problems related to 13fd3ff34329:

[PR17431: following execs with "breakpoint always-inserted on"]
https://sourceware.org/ml/gdb-patches/2014-09/msg00733.html

The problem this time is that we currently update the global location
list and try to insert breakpoint locations after re-setting _each_
breakpoint in turn.

Say:

- We have _more_ than one breakpoint set. Let's assume 2.

- There's a breakpoint with a pre-exec address that ends up being an
unmapped address after the exec.

- That breakpoint is NOT the first in the breakpoint list.

Then when handling an exec, and we re-set the first breakpoint in the
breakpoint list, we mistakently try to install the old pre-exec /
un-re-set locations of the other breakpoint, which fails:

(gdb) continue
Continuing.
process 28295 is executing new program: (...)/execl-update-breakpoints2
Error in re-setting breakpoint 1: Warning:
Cannot insert breakpoint 2.
Cannot access memory at address 0x1000764

Breakpoint 1, main (argc=1, argv=0x7fffffffd368) at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/execl-update-breakpoints.c:34
34 len = strlen (argv[0]);
(gdb)

Fix this by deferring the global location list update till after all
breakpoints are re-set.

Tested on x86_64 Fedora 20, native and gdbserver.

gdb/ChangeLog:
2016-02-09 Pedro Alves <palves@redhat.com>

PR breakpoints/19548
* breakpoint.c (create_overlay_event_breakpoint): Don't update
global location list here.
(create_longjmp_master_breakpoint)
(create_std_terminate_master_breakpoint)
(create_exception_master_breakpoint, create_jit_event_breakpoint)
(update_breakpoint_locations):
(breakpoint_re_set): Update global location list after all
breakpoints are re-set.

gdb/testsuite/ChangeLog:
2016-02-09 Pedro Alves <palves@redhat.com>

PR breakpoints/19548
* gdb.base/execl-update-breakpoints.c (some_function): New
function.
(main): Call it.
* gdb.base/execl-update-breakpoints.exp: Add a second breakpoint.
Tighten expected GDB output.

8adce03 2016-02-09 20:18:15 Simon Marchi

Fix siginfo C++ build error

Change the signature of gdbserver's siginfo_fixup functions so that it's
in line with gdb's. This gets rid of the following build error in C++:

/home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c: In function ‘int x86_siginfo_fixup(siginfo_t*, void*, int)’:
/home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:694:21: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
FIXUP_32);
^
In file included from /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:31:0:
/home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/amd64-linux-siginfo.h:52:5: error: initializing argument 2 of ‘int amd64_linux_siginfo_fixup_common(siginfo_t*, gdb_byte*, int, amd64_siginfo_fixup_mode)’ [-fpermissive]
int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
^
/home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:698:20: error: invalid conversion from ‘void*’ to ‘gdb_byte* {aka unsigned char*}’ [-fpermissive]
FIXUP_X32);
^
In file included from /home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-x86-low.c:31:0:
/home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/amd64-linux-siginfo.h:52:5: error: initializing argument 2 of ‘int amd64_linux_siginfo_fixup_common(siginfo_t*, gdb_byte*, int, amd64_siginfo_fixup_mode)’ [-fpermissive]
int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
^

gdb/gdbserver/ChangeLog:

* linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
void * to gdb_byte *.
* linux-low.c (siginfo_fixup): Likewise.
(linux_xfer_siginfo): Likewise.
* linux-low.h (struct linux_target_ops) <siginfo_fixup>:
Likewise.
* linux-x86-low.c (x86_siginfo_fixup): Likewise.

027e9c7 2016-02-09 19:47:54 Nick Clifton

Add a more helpful warning message to explain why some AArch64 relocations can overflow.

bfd * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
helpful warning message to explain why certain AArch64 relocs
might overflow.

ld * testsuite/ld-aarch64/reloc-overflow-bad.d: New test.
* testsuite/ld-aarch64/reloc-overflow-1.s: New source file.
* testsuite/ld-aarch64/reloc-overflow-2.s: New source file.
* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.

c23bbc1 2016-02-09 19:36:54 Walfred Tedeschi

Revert "Fix build breakage"

This reverts commit 222cab58b7ed37df6e01dacb0932f400a2588137.

0635c87 2016-02-09 19:36:15 Walfred Tedeschi

Revert "Add a more helpful warning message to explain why some AArch64 relocations can overflow."

This reverts commit 2ea53e003163338a403d5afbb2046cafb8f3abe9.