• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No 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/rth/x86-seg
RSS
Rev. Time Author
247584d users/rth/x86-seg 2015-11-05 22:50:24 Richard Henderson

Segment support for x86_64, part 2

* amd64-tdep.c (amd64_address_to_pointer): New.
(amd64_pointer_to_address): New.
(amd64_init_abi): Register them.

4a2bd92 2015-11-03 17:46:11 Richard Henderson

Segment support for x86_64, part 1

* amd64-tdep.c (amd64_address_class_type_flags): New.
(amd64_address_class_type_flags_to_name): New.
(amd64_address_class_name_to_type_flags): New.
(amd64_init_abi): Register them.

220c78a 2015-11-03 16:48:38 Richard Henderson

Use register cache for x86_64 ps_get_thread_area

* amd64-linux-nat.c (ps_get_thread_area): Use regcache to
fetch FS_BASE contents.

47eb5bb 2015-10-31 04:23:18 Richard Henderson

Add amd64 registers fs_base and gs_base

* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers): Read
seg bases from ARCH_PRCTL if they're not present in struct user.
(amd64_linux_store_inferior_registers): Likewise write them.
* amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add offsets
for seg bases if they're present in struct user.
* amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM): Set to
AMD64_NUM_REGS.
* amd64-tdep.c (amd64_init_abi): Init org.gnu.gdb.i386.seg.
* amd64-tdep.h (AMD64_FSBASE_REGNUM, AMD64_GSBASE_REGNUM): New.
(AMD64_NUM_REGS): Update.

* features/i386/64bit-seg.xml: New file.
* features/i386/amd64-avx-linux.xml: Include it.
* features/i386/amd64-avx512-linux.xml: Likewise.
* features/i386/amd64-linux.xml: Likewise.
* features/i386/amd64-mpx-linux.xml: Likewise.
* features/i386/x32-avx-linux.xml: Likewise.
* features/i386/x32-avx512-linux.xml: Likewise.
* features/i386/x32-linux.xml: Likewise.

* features/i386/amd64-avx-linux.c: Regenerate.
* features/i386/amd64-avx512-linux.c: Likewise.
* features/i386/amd64-linux.c: Likewise.
* features/i386/amd64-mpx-linux.c: Likewise.
* features/i386/x32-avx-linux.c: Likewise.
* features/i386/x32-avx512-linux.c: Likewise.
* features/i386/x32-linux.c: Likewise.

* regformats/i386/amd64-avx-linux.dat: Regenerate.
* regformats/i386/amd64-avx512-linux.dat: Likewise.
* regformats/i386/amd64-linux.dat: Likewise.
* regformats/i386/amd64-mpx-linux.dat: Likewise.
* regformats/i386/x32-avx-linux.dat: Likewise.
* regformats/i386/x32-avx512-linux.dat: Likewise.
* regformats/i386/x32-linux.dat: Likewise.

6929161 2015-10-30 03:28:48 Henrik Wallin

gdbserver: Move pointer dereference to after assert checks.

gdb/gdbserver/ChangeLog:

* linux-arm-low.c (arm_new_thread): Move pointer dereference
to after assert checks.

Signed-off-by: Henrik Wallin <henrik.wallin@windriver.com>

b42945f 2015-10-30 03:15:08 Simon Marchi

Add/adjust casts in gdbserver's proc-service

The casts are required because ps_pd{read,write} must respect a fixed
interface.

gdb/gdbserver/ChangeLog:

* proc-service.c (ps_pdread): Add/adjust casts.
(ps_pdwrite): Add/adjust casts.

d2242e3 2015-10-30 02:54:20 Pedro Alves

mdebugread.c: Address class -> address class index

This fixes this error in C++ mode:

/home/pedro/gdb/mygit/cxx-convertion/src/gdb/mdebugread.c:654:11: error: invalid conversion from ‘int’ to ‘address_class’ [-fpermissive]
theclass = mdebug_register_index;
^

The "theclass" local is of type enum address_class, however, what it
really holds is an address class index. Class index values by design
match the address class values up until LOC_FINAL_VALUE, but extend
beyond that, so it's not really right to store an address class index
in an enum address_class.

The fix is really the same making the 'theclass' local be of type int,
but while we're at it, we get rid of the goto, and thus the local
becomes the 'aclass_index' parameter in the new add_data_symbol
function.

gdb/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* mdebugread.c (add_data_symbol): New function, factored out from
...
(parse_symbol): ... here. Delete 'theclass' local.

cb0a270 2015-10-30 02:43:02 Simon Marchi

Add a cast in jit_target_read_impl

We could change the signature of the function. However, it would
require changing gdb_target_read in jit-reader.h, which is an exported
interface. It's probably better to just add a cast in our code than to
break other people's code.

gdb/ChangeLog:

* jit.c (jit_target_read_impl): Add cast.

15cf126 2015-10-30 02:43:02 Simon Marchi

Cast gdb_dlsym return value

gdb/ChangeLog:

* jit.c (jit_reader_load): Add cast.

d6f85c8 2015-10-30 02:43:02 Simon Marchi

gdbserver/server.c: Cast return value of memmem

gdb/gdbserver/ChangeLog:

* server.c (handle_search_memory_1): Cast return value of
memmem.

f98cd05 2015-10-30 02:43:01 Simon Marchi

Change type of write_qxfer_response parameter

Fixes:

/home/simark/src/binutils-gdb/gdb/gdbserver/server.c: In function ‘int write_qxfer_response(char*, const void*, int, int)’:
/home/simark/src/binutils-gdb/gdb/gdbserver/server.c:398:32: error: invalid conversion from ‘const void*’ to ‘const gdb_byte* {aka const unsigned char*}’ [-fpermissive]
&out_len, PBUFSIZ - 2) + 1;
^
gdb/gdbserver/ChangeLog:

* server.c (write_qxfer_response): Change type of data to
gdb_byte *.

b406995 2015-10-30 02:43:01 Simon Marchi

dwarf2read.c: Add cast

There is no enum value representing 0. It seems like the value of the
name field is irrelevant here.

gdb/ChangeLog:

* dwarf2read.c (partial_die_full_name): Add cast.

7535d5e 2015-10-30 02:39:33 Pedro Alves

Add cast to VEC_iterate

Fixes this in C++:

../../src/gdb/break-catch-sig.c: In function ‘int VEC_gdb_signal_type_iterate(const VEC_gdb_signal_type*, unsigned int, gdb_signal_type*)’:
../../src/gdb/common/vec.h:576:12: error: invalid conversion from ‘int’ to ‘gdb_signal_type {aka gdb_signal}’ [-fpermissive]
*ptr = 0; \
^
../../src/gdb/common/vec.h:417:1: note: in expansion of macro ‘DEF_VEC_FUNC_P’
DEF_VEC_FUNC_P(T) \
^
../../src/gdb/break-catch-sig.c:37:1: note: in expansion of macro ‘DEF_VEC_I’
DEF_VEC_I (gdb_signal_type);
^

I actually carried a different fix in the C++ branch that removed this
assignment and then adjusted all callers that depended on it. The
thinking was that this is for the case where we're returning false,
indicating end of iteration. But that results in a much larger and
tricker patch; looking back it seems quite pointless. I looked at the
history of GCC's C++ conversion and saw that they added this same cast
to their version of vec.h, FWIW. (GCC's vec.h is completely different
nowadays, having been converted to templates meanwhile.)

gdb/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* common/vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T.

fa4c39c 2015-10-30 02:33:27 Pedro Alves

guile/: Add enum cast

gdb/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Add cast.

e681cf3 2015-10-30 02:27:31 Eli Zaretskii

Disable paging when run by Emacs 25.1 and later.

gdb/ChangeLog:

* utils.c (init_page_info): Disable paging if INSIDE_EMACS is set
in the environment.

ebf0534 2015-10-30 02:23:34 Pedro Alves

gnu-v2-abi.c: Add casts

I looked at changing these is_destructor_name/is_constructor_name
interfaces in order to detangle the boolean result from the ctor/dtor
kind return, but then realized that this design goes all the way down
to the libiberty demangler interfaces. E.g, include/demangle.h:

~~~
/* Return non-zero iff NAME is the mangled form of a constructor name
in the G++ V3 ABI demangling style. Specifically, return an `enum
gnu_v3_ctor_kinds' value indicating what kind of constructor
it is. */
extern enum gnu_v3_ctor_kinds
is_gnu_v3_mangled_ctor (const char *name);


enum gnu_v3_dtor_kinds {
gnu_v3_deleting_dtor = 1,
gnu_v3_complete_object_dtor,
gnu_v3_base_object_dtor,
/* These are not part of the V3 ABI. Unified destructors are generated
as a speed-for-space optimization when the -fdeclone-ctor-dtor option
is used, and are always internal symbols. */
gnu_v3_unified_dtor,
gnu_v3_object_dtor_group
};
~~~

libiberty/cp-demangle.c:

~~~
enum gnu_v3_ctor_kinds
is_gnu_v3_mangled_ctor (const char *name)
{
enum gnu_v3_ctor_kinds ctor_kind;
enum gnu_v3_dtor_kinds dtor_kind;

if (! is_ctor_or_dtor (name, &ctor_kind, &dtor_kind))
return (enum gnu_v3_ctor_kinds) 0;
return ctor_kind;
}
~~~

etc.

gdb/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* gnu-v2-abi.c (gnuv2_is_destructor_name)
(gnuv2_is_constructor_name): Add casts.

41e83f2 2015-10-30 01:26:41 H.J. Lu

Make GOT entry size target-dependent

The GOT entry size is target-dependent. This patch adds a got_entry_size
function to Sized_target class so that a target can provide a value
different from default.

PR gold/19184
* incremental.cc (Got_plt_view_info): Add got_entry_size.
(Local_got_offset_visitor::visit): Replace got_entry_size_
with info_.got_entry_size.
(Local_got_offset_visitor::got_entry_size_): Removed.
(Global_got_offset_visitor::visit): Replace got_entry_size_
with info_.got_entry_size.
(Global_got_offset_visitor::got_entry_size_): Removed.
(Output_section_incremental_inputs::write_got_plt): Initialize
view_info.got_entry_size.
* target.h (Sized_target::got_entry_size): New virtual function.
* x86_64.cc (Target_x86_64::got_entry_size): New function.

b10a8bc 2015-10-30 01:18:57 H.J. Lu

Also check GOTPCRELX

* ld-x86-64/plt-main3.rd: Also check GOTPCRELX.

ca9584f 2015-10-29 22:58:16 Catherine Moore

2015-10-29 Catherine Moore <clm@codesourcery.com>

bfd/
* elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
section to bfd_abs_section_ptr if the stub is discarded.

ld/testsuite/
* ld-mips-elf/mips16-fp-stub-1.s: New.
* ld-mips-elf/mips16-fp-stub-2.s: New.
* ld-mips-elf/mips16-fp-stub.d: New.
* ld-mips-elf/mips-elf.exp: Run new tests.
* ld-mips-elf/mips16-intermix.d: Update expected output.

https://sourceware.org/ml/binutils/2015-10/msg00137.html

a75cf61 2015-10-29 22:49:03 Ed Schouten

Add support for AArch64 CloudABI binaries.

ld * Makefile.am (ALL_64_EMULATION_SOURCES): Add support for
CloudABI on aarch64. For this target we have to make sure we use
ELFOSABI_CLOUDABI instead of ELFOSABI_NONE.
* configure.tgt (targ_emul): Likewise.
* emulparams/aarch64cloudabi.sh: New file.
* emulparams/aarch64cloudabib.sh: New file.
* Makefile.in: Regenerate.

bfd * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
For this target we have to make sure we use ELFOSABI_CLOUDABI
instead of ELFOSABI_NONE.
* configure.ac (tb): Likewise.
* elfnn-aarch64.c: Likewise.
* targets.c (_bfd_target_vector): Likewise.
* configure: Regenerate.

gas * config/tc-aarch64.c (elf64_aarch64_target_format): Select the
cloudabi format if the TARGET_OS is cloudabi.

968bc5c 2015-10-29 21:56:27 Pedro Alves

bfd/libhppa.h: Make C++ compatible

Fixes this when GDB is built in C++ mode:

In file included from /home/pedro/gdb/mygit/src/gdb/../bfd/som.h:27:0,
from /home/pedro/gdb/mygit/src/gdb/somread.c:31:
/home/pedro/gdb/mygit/src/gdb/../bfd/libhppa.h: In function ‘int bfd_hppa_insn2fmt(bfd*, int)’:
/home/pedro/gdb/mygit/src/gdb/../bfd/libhppa.h:380:42: error: invalid conversion from ‘int’ to ‘hppa_opcode_type’ [-fpermissive]
#define get_opcode(insn) (((insn) >> 26) & 0x3f)
^
/home/pedro/gdb/mygit/src/gdb/../bfd/libhppa.h:465:30: note: in expansion of macro ‘get_opcode’
enum hppa_opcode_type op = get_opcode (insn);
^

bfd/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* libhppa.h (bfd_hppa_insn2fmt): Add cast.

d2412fa 2015-10-29 21:56:27 Pedro Alves

gdbserver/mem-break.c: Add cast

... for C++.

Fixes:

gdb/gdbserver/mem-break.c:204:28: error: invalid conversion from 'int' to 'bkpt_type' [-fpermissive]

gdb/gdbserver/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* mem-break.c (Z_packet_to_bkpt_type): Add cast.

c17414a 2015-10-29 21:56:27 Pedro Alves

gdbserver/tracepoint: Add casts out of tpoint->handle

... as needed for C++.

tpoint->handle is a generic 'void *' handle.

gdb/gdbserver/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* tracepoint.c (clear_installed_tracepoints): Add casts.

e053fbc 2015-10-29 21:56:27 Pedro Alves

gdbserver: enum gdb_signal casts

This is code parsing RSP signal numbers, checking whether the numbers
are indeed valid/known GDB signals, and then converting to host signal
numbers. I considered adding temporary enum gdb_signal variables
instead, but didn't really like the result.

gdb/gdbserver/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* server.c (handle_v_cont, process_serial_event): Add enum
gdb_signal casts to signal parsing code.

add67df 2015-10-29 21:55:02 Pedro Alves

gdbserver: btrace enums

Fixes:

../../../src/gdb/gdbserver/linux-low.c: In function ‘int linux_low_read_btrace(btrace_target_info*, buffer*, int)’:
../../../src/gdb/gdbserver/linux-low.c:6827:48: error: invalid conversion from ‘int’ to ‘btrace_read_type’ [-fpermissive]
err = linux_read_btrace (&btrace, tinfo, type);
^
In file included from ../../../src/gdb/gdbserver/linux-low.c:98:0:
../../../src/gdb/gdbserver/../nat/linux-btrace.h:116:26: error: initializing argument 3 of ‘btrace_error linux_read_btrace(btrace_data*, btrace_target_info*, btrace_read_type)’ [-fpermissive]
extern enum btrace_error linux_read_btrace (struct btrace_data *btrace,
^

The cyclic dependency the comment talks about is no longer relevant:
https://sourceware.org/ml/gdb-patches/2015-10/msg00643.html

gdb/gdbserver/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* linux-low.c (linux_low_read_btrace): Change type of 'type'
parameter.
* server.c (handle_qxfer_btrace): Change type of 'type'
local.
* target.h (struct target_ops) <read_btrace>: Change type of
'type' parameter. Update comment.

50bc912 2015-10-29 21:55:02 Pedro Alves

gdbserver/Linux: Introduce NULL_REGSET

Fixes errors like:

src/gdb/gdbserver/linux-x86-low.c:477:1: error: invalid conversion from 'int' to 'regset_type' [-fpermissive]

gdb/gdbserver/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* linux-low.h (NULL_REGSET): Define.
* linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
* linux-arm-low.c (arm_regsets): Likewise.
* linux-crisv32-low.c (cris_regsets): Likewise.
* linux-m68k-low.c (m68k_regsets): Likewise.
* linux-mips-low.c (mips_regsets): Likewise.
* linux-nios2-low.c (nios2_regsets): Likewise.
* linux-ppc-low.c (ppc_regsets): Likewise.
* linux-s390-low.c (s390_regsets): Likewise.
* linux-sh-low.c (sh_regsets): Likewise.
* linux-sparc-low.c (sparc_regsets): Likewise.
* linux-tic6x-low.c (tic6x_regsets): Likewise.
* linux-tile-low.c (tile_regsets): Likewise.
* linux-x86-low.c (x86_regsets): Likewise.
* linux-xtensa-low.c (xtensa_regsets): Likewise.

44a8b4d 2015-10-29 21:55:01 Pedro Alves

Add cast to exception_none

Fixes, in C++ mode:

../../src/gdb/common/common-exceptions.c:23:69: error: invalid conversion from ‘int’ to ‘return_reason’ [-fpermissive]
const struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL };
^

(I considered adding an enum value for '0', but the code and comments
around return_reason and its uses explain how 0 is special/internal,
so I'm leaving it be.)

gdb/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* common/common-exceptions.c (exception_none): Add cast.

e3bdafe 2015-10-29 21:55:01 Pedro Alves

compile: Rename struct type_map_instance::gcc_type field

Fixes:

src/gdb/compile/compile-c-types.c:36:12: error: declaration of ‘gcc_type type_map_instance::gcc_type’ [-fpermissive]
gcc_type gcc_type;
^
In file included from src/gdb/../include/gcc-c-interface.h:23:0,
from src/gdb/compile/compile-internal.h:21,
from src/gdb/compile/compile-c-types.c:23:
src/gdb/../include/gcc-interface.h:32:28: error: changes meaning of ‘gcc_type’ from ‘typedef long long unsigned int gcc_type’ [-fpermissive]
typedef unsigned long long gcc_type;
^
src/gdb/compile/compile-c-types.c: In function ‘gcc_type convert_qualified(compile_c_instance*, type*)’:
src/gdb/compile/compile-c-types.c:310:19: error: invalid conversion from ‘int’ to ‘gcc_qualifiers’ [-fpermissive]
quals);
^

gdb/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* compile/compile-c-types.c (struct type_map_instance)
<gcc_type>: Rename to gcc_type_handle.
(insert_type, convert_type): Adjust.

9c6595a 2015-10-29 21:55:01 Pedro Alves

Don't assume break/continue inside a TRY block works

In C++, this:

try
{
break;
}
catch (..)
{}

is invalid. However, because our TRY/CATCH macros support it in C,
the C++ version of those macros support it too. To catch such
assumptions, this adds a (disabled) hack that maps TRY/CATCH to raw
C++ try/catch. Then it goes through all instances that building on
x86_64 GNU/Linux trips on, fixing them.

This isn't strictly necessary yet, but I think it's nicer to try to
keep the tree in a state where it's easier to eliminate the TRY/CATCH
macros.

gdb/ChangeLog:
2015-10-29 Pedro Alves <palves@redhat.com>

* dwarf2-frame-tailcall.c (dwarf2_tailcall_sniffer_first): Don't
assume that "break" breaks out of a TRY/CATCH.
* python/py-framefilter.c (py_print_single_arg): Don't assume
"continue" breaks out of a TRY/CATCH.
* python/py-value.c (valpy_binop_throw): New function, factored
out from ...
(valpy_binop): ... this.
(valpy_richcompare_throw): New function, factored
out from ...
(valpy_richcompare): ... this.
* solib.c (solib_read_symbols): Don't assume "break" breaks out
of a TRY/CATCH.
* common/common-exceptions.h [USE_RAW_CXX_TRY]
<TRY/CATCH/END_CATCH>: Define as 1-1 wrappers around try/catch.

f82aa16 2015-10-29 19:45:10 Nick Clifton

Fix reporting of command line options that need an argument, but which occur as the last option on the command line.

PR ld/19146
* lexsup.c (parse_args): Correct error message for an option that
is missing its argument if that option is the last one on the
command line.