aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-11-03[LD][AARCH64]Add test cases for big-endian.Renlin Li24-0/+316
ld/testsuite 2015-11-03 Renlin Li <renlin.li@arm.com> * ld-aarch64/aarch64-elf.exp: Run newly added test cases. * ld-aarch64/emit-relocs-301.d: Skip aarch64_be. * ld-aarch64/emit-relocs-302.d: Likwise. * ld-aarch64/emit-relocs-310.d: Likwise. * ld-aarch64/emit-relocs-515.d: Likwise. * ld-aarch64/emit-relocs-516.d: Likwise. * ld-aarch64/tls-large-desc.d: Likwise. * ld-aarch64/tls-large-ie.d: Likwise. * ld-aarch64/tls-relax-large-desc-ie.d: Likwise. * ld-aarch64/tls-relax-large-desc-le.d: Likwise. * ld-aarch64/tls-relax-large-gd-ie.d: Likwise. * ld-aarch64/tls-relax-large-gd-le.d: Likwise. * ld-aarch64/emit-relocs-301-be.d: New for aarch64_be. * ld-aarch64/emit-relocs-302-be.d: Likewise. * ld-aarch64/emit-relocs-310-be.d: Likewise. * ld-aarch64/emit-relocs-515-be.d: Likewise. * ld-aarch64/emit-relocs-516-be.d: Likewise. * ld-aarch64/tls-large-desc-be.d: Likewise. * ld-aarch64/tls-large-ie-be.d: Likewise. * ld-aarch64/tls-relax-large-desc-ie-be.d: Likewise. * ld-aarch64/tls-relax-large-desc-le-be.d: Likewise. * ld-aarch64/tls-relax-large-gd-ie-be.d: Likewise. * ld-aarch64/tls-relax-large-gd-le-be.d: Likewise.
2015-11-03Obvious typo fix in gdb.reverse/readv-reverse.expMarcin Kościelnicki2-1/+5
gdb/testsuite/ChangeLog: * gdb.reverse/readv-reverse.exp: Obvious typo fixed.
2015-11-03gdb/reverse: Fix continue_to_breakpoint in syscall testcases.Marcin Kościelnicki8-28/+41
continue_to_breakpoint always continues to the next breakpoint, not to the one named in parameter. This rendered the tests effectively useless, since marker2 was never reached. gdb/testsuite/ChangeLog: * gdb.reverse/fstatat-reverse.exp: Set breakpoint on marker1 after reaching marker2. * gdb.reverse/getresuid-reverse.exp: Likewise. * gdb.reverse/pipe-reverse.exp: Likewise. * gdb.reverse/readv-reverse.exp: Likewise. * gdb.reverse/recvmsg-reverse.exp: Likewise. * gdb.reverse/time-reverse.exp: Likewise. * gdb.reverse/waitpid-reverse.exp: Likewise and add KFAILs.
2015-11-03Add myself to gdb MAINTAINERSMarcin Kościelnicki2-0/+5
gdb/ChangeLog: * MAINTAINERS (Write After Approval): Add Marcin Kościelnicki.
2015-11-03Automatic date update in version.inGDB Administrator1-1/+1
2015-11-02Disassemble RX NOP instructions as such.Nick Clifton9-23/+131
opcode * rx.h (enum RX_Opcode_ID): Add more NOP opcodes. opcodes * rx-decode.opc (rx_decode_opcode): Decode extra NOP instructions. * rx-decode.c: Regenerate. tests * gas/rx/max.d: Update expecetd disassembly. * gas/rx/nod.d: Likewise. * gas/rx/nop.sm: Add tests of more NOP instructions.
2015-11-02Fix disassembly of RX zero-offset register indirect instructions.Nick Clifton11-480/+560
opcode * rx.h (enum RX_Operand_Type): Add RX_Operand_Zero_Indirect. opcodes * rx-decode.opc (rx_disp): If the displacement is zero, set the type to RX_Operand_Zero_Indirect. * rx-decode.c: Regenerate. * rx-dis (print_insn): Handle RX_Operand_Zero_Indirect. gas * config/rx-parse.y: Allow zero value for 5-bit displacements. tests * gas/rx/mov.sm: Add tests for zero offset indirect moves. * gas/rx/mov.d: Update expected output.
2015-11-02Fix the RX assembler's section alignment parameter to use multiples of N ↵Nick Clifton2-4/+9
rather than powers of N * config/tc-rx.c (parse_rx_section): Align parameter provides a multiple of n argument, not a power of n argument.
2015-11-02Automatic date update in version.inGDB Administrator1-1/+1
2015-11-01Automatic date update in version.inGDB Administrator1-1/+1
2015-10-31Automatic date update in version.inGDB Administrator1-1/+1
2015-10-30Don't displaced step when there's a breakpoint in the scratch pad rangePedro Alves4-0/+96
Assuming displaced stepping is enabled, and a breakpoint is set in the memory region of the scratch pad, things break. One of two cases can happen: #1 - The breakpoint wasn't inserted yet (all threads were stopped), so after setting up the displaced stepping scratch pad with the adjusted copy of the instruction we're trying to single-step, we insert the breakpoint, which corrupts the scratch pad, and the inferior executes the wrong instruction. (Example below.) This is clearly unacceptable. #2 - The breakpoint was already inserted, so setting up the displaced stepping scratch pad overwrites the breakpoint. This is OK in the sense that we already assume that no thread is going to executes the code in the scratch pad range (after initial startup) anyway. This commit addresses both cases by simply punting on displaced stepping if we have a breakpoint in the scratch pad range. The #1 case above explains a few regressions exposed by the AS/NS series on x86: Running ./gdb.dwarf2/callframecfa.exp ... FAIL: gdb.dwarf2/callframecfa.exp: set display for call-frame-cfa FAIL: gdb.dwarf2/callframecfa.exp: step 1 for call-frame-cfa FAIL: gdb.dwarf2/callframecfa.exp: step 2 for call-frame-cfa FAIL: gdb.dwarf2/callframecfa.exp: step 3 for call-frame-cfa FAIL: gdb.dwarf2/callframecfa.exp: step 4 for call-frame-cfa Running ./gdb.dwarf2/typeddwarf.exp ... FAIL: gdb.dwarf2/typeddwarf.exp: continue to breakpoint: continue to typeddwarf.c:53 FAIL: gdb.dwarf2/typeddwarf.exp: check value of x at typeddwarf.c:53 FAIL: gdb.dwarf2/typeddwarf.exp: check value of y at typeddwarf.c:53 FAIL: gdb.dwarf2/typeddwarf.exp: check value of z at typeddwarf.c:53 FAIL: gdb.dwarf2/typeddwarf.exp: continue to breakpoint: continue to typeddwarf.c:73 FAIL: gdb.dwarf2/typeddwarf.exp: check value of w at typeddwarf.c:73 FAIL: gdb.dwarf2/typeddwarf.exp: check value of x at typeddwarf.c:73 FAIL: gdb.dwarf2/typeddwarf.exp: check value of y at typeddwarf.c:73 FAIL: gdb.dwarf2/typeddwarf.exp: check value of z at typeddwarf.c:73 Enabling "maint set target-non-stop on" implies displaced stepping enabled as well, and it's the latter that's to blame here. We can see the same failures with "maint set target-non-stop off + set displaced on". Diffing (good/bad) gdb.log for callframecfa.exp shows: @@ -99,29 +99,29 @@ Breakpoint 2 at 0x80481b0: file q.c, lin continue Continuing. -Breakpoint 2, func (arg=77) at q.c:2 +Breakpoint 2, func (arg=52301) at q.c:2 2 in q.c (gdb) PASS: gdb.dwarf2/callframecfa.exp: continue to breakpoint: continue to breakpoint for call-frame-cfa display arg -1: arg = 77 -(gdb) PASS: gdb.dwarf2/callframecfa.exp: set display for call-frame-cfa +1: arg = 52301 +(gdb) FAIL: gdb.dwarf2/callframecfa.exp: set display for call-frame-cfa The problem is here, when setting up the func call: Breakpoint 1, main (argc=-13345, argv=0x0) at q.c:7 7 in q.c (gdb) disassemble Dump of assembler code for function main: 0x080481bb <+0>: push %ebp 0x080481bc <+1>: mov %esp,%ebp 0x080481be <+3>: sub $0x4,%esp => 0x080481c1 <+6>: movl $0x4d,(%esp) 0x080481c8 <+13>: call 0x80481b0 <func> 0x080481cd <+18>: leave 0x080481ce <+19>: ret End of assembler dump. (gdb) disassemble /r Dump of assembler code for function main: 0x080481bb <+0>: 55 push %ebp 0x080481bc <+1>: 89 e5 mov %esp,%ebp 0x080481be <+3>: 83 ec 04 sub $0x4,%esp => 0x080481c1 <+6>: c7 04 24 4d 00 00 00 movl $0x4d,(%esp) 0x080481c8 <+13>: e8 e3 ff ff ff call 0x80481b0 <func> 0x080481cd <+18>: c9 leave 0x080481ce <+19>: c3 ret End of assembler dump. Note the breakpoint at main is set at 0x080481c1. Right at the instruction that sets up func's argument. Executing that instruction should write 0x4d to the address pointed at by $esp. However, if we stepi, the program manages to write 52301/0xcc4d there instead (0xcc is int3, the x86 breakpoint instruction), because the breakpoint address is 4 bytes inside the scratch pad location, which is 0x080481bd: (gdb) p 0x080481c1 - 0x080481bd $1 = 4 IOW, instead of executing: "c7 04 24 4d 00 00 00" [ movl $0x4d,(%esp) ] the inferior executes: "c7 04 24 4d cc 00 00" [ movl $0xcc4d,(%esp) ] gdb/ChangeLog: 2015-10-30 Pedro Alves <palves@redhat.com> * breakpoint.c (breakpoint_in_range_p) (breakpoint_location_address_range_overlap): New functions. * breakpoint.h (breakpoint_in_range_p): New declaration. * infrun.c (displaced_step_prepare_throw): If there's a breakpoint in the scratch pad range, don't displaced step.
2015-10-30Simplify gdb.threads/wp-replication.exp on counting HW watchpointsYao Qi3-72/+36
Nowadays, test gdb.threads/wp-replication.exp uses a while loop to repeatedly insert HW watchpoint, resume and check no error message coming out, in order to count HW watchpoints There are some drawbacks in this way, - the loop could be endless. I think this is use to making trouble to S/390, since we had such comment # Some targets (like S/390) behave as though supporting # unlimited hardware watchpoints. In this case we just take a # safe exit out of the loop. I hit this today too because a GDB internal error is triggered on "continue" in the loop, and $done is 0 invariantly, so the loop can't end. - the code counting hardware watchpoint is too complicated. We can use "set breakpoint always-inserted on" to get the result of inserting HW watchpoint without resuming the inferior. In this way, watch_count_done and empty_cycle in c file is no longer needed. In this patch, I change to use "set breakpoint always-inserted on" trick, and only iterate $NR_THREADS times, to count the HW watchpoint. In this way, the loop can't be endless, and GDB doesn't need to resume the inferior. gdb/testsuite: 2015-10-30 Yao Qi <yao.qi@linaro.org> * gdb.threads/wp-replication.c (watch_count_done): Remove. (empty_cycle): Remove. (main): Don't call empty_cycle. Don't use watch_count_done. * gdb.threads/wp-replication.exp: Don't set breakpoint on empty_cycle. Rewrite the code counting HW watchpoints.
2015-10-30gdb/linux-record: Fix struct sizes for x32Marcin Kościelnicki2-4/+9
While x32 syscall interface is mostly shared with x86_64, some syscalls are truly 32-bit. Correct sizes accordingly. gdb/ChangeLog: * amd64-linux-tdep.c (amd64_x32_linux_init_abi): Fix size_msghdr, size_stack_t, size_size_t, size_iovec.
2015-10-30gdb/linux-record: Fix size_termios for x32, amd64, aarch64Marcin Kościelnicki3-3/+9
60 bytes is the size of glibc's struct termios, the one used by kernel is 36 bytes long. gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_linux_init_abi): Fix size_termios. * amd64-linux-tdep.c (amd64_linux_init_abi): Fix size_termios. (amd64_x32_linux_init_abi): Fix size_termios.
2015-10-30gdb/linux-record: TASK_COMM_LEN is 16 on ppc tooMarcin Kościelnicki2-2/+6
gdb/ChangeLog: * ppc-linux-tdep.c (ppc_init_linux_record_tdep): Fix TASK_COMM_LEN.
2015-10-30gdb/linux-record: Fix old_select syscall handlingMarcin Kościelnicki2-19/+30
We have to use extract_unsigned_integer to read paramaters structure - target pointers can have different endianness and size. gdb/ChangeLog: * linux-record.c (record_linux_system_call): Fix old_select.
2015-10-30gdb/linux-record: Fix newfstatat handlingMarcin Kościelnicki2-1/+11
The struct stat pointer is in the third argument, not the second. gdb/ChangeLog: * linux-record.c (record_linux_system_call): Fix newstatat.
2015-10-30gdb/linux-record: Fix [gs]etgroups16 syscallMarcin Kościelnicki2-7/+14
Memory size for getgroups16 needs to be multiplied by entry count, and only needs recording if the pointer is non-NULL. setgroups16, on the other hand, doesn't write to user memory and doesn't need special handling at all. gdb/ChangeLog: * linux-record.c (record_linux_system_call): Fix [gs]etgroups16.
2015-10-30gdb/linux-record: Support time, waitpid, pipe syscallsMarcin Kościelnicki8-0/+43
gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add size_time_t. * amd64-linux-tdep.c (amd64_linux_init_abi): Add size_time_t. (amd64_x32_linux_init_abi): Add size_time_t. * arm-linux-tdep.c (arm_linux_init_abi): Add size_time_t. * i386-linux-tdep.c (i386_linux_init_abi): Add size_time_t. * linux-record.c (record_linux_system_call): Add time, waitpid, pipe handling. * linux-record.h (struct linux_record_tdep): Add size_time_t. * ppc-linux-tdep.c (ppc_init_linux_record_tdep): Add size_time_t.
2015-10-30gdb/linux-record: Fix msghdr parsing on 64-bit targetsMarcin Kościelnicki2-1/+7
The code failed to account for padding between the int and subsequent pointer present on 64-bit architectures. gdb/ChangeLog: * linux-record.c (record_linux_msghdr): Fix msg_namelen handling.
2015-10-30gdb/linux-record: Fix readdir and getdents handlingMarcin Kościelnicki8-32/+32
getdents buffer size is given in bytes, not dirent entries (which have variable size anyway). We don't need size_dirent and size_dirent64 for this reason. readdir, on the other hand, needs size of old_linux_dirent, which is a somewhat different structure. Accordingly, rename size_dirent to size_old_dirent. gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_linux_init_abi): Remove size_dirent{,64}, add size_old_dirent. * amd64-linux-tdep.c (amd64_linux_init_abi): Remove size_dirent{,64}, add size_old_dirent. (amd64_x32_linux_init_abi): Remove size_dirent{,64}, add size_old_dirent. * arm-linux-tdep.c (arm_linux_init_abi): Remove size_dirent{,64}, add size_old_dirent. * i386-linux-tdep.c (i386_linux_init_abi): Remove size_dirent{,64}, add size_old_dirent. * linux-record.c (record_linux_system_call): Fix handling of readdir and getdents{,64}. * linux-record.h (struct linux_record_tdep): Remove size_dirent{,64}, add size_old_dirent. * ppc-linux-tdep.c (ppc_init_linux_record_tdep): Remove size_dirent{,64}, add size_old_dirent.
2015-10-30gdb/linux-record: Fix sizes of sigaction and sigset_tMarcin Kościelnicki6-26/+41
The values were mistakenly set to size of glibc's sigset_t (128 bytes) and sigaction (140 or 152 bytes) instead of the kernel ones. The kernel has 4 or 8 byte old_sigset_t, 8 byte sigset_t, 16 or 32 byte old_sigaction, 20 or 32 byte sigaction. gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_linux_init_abi): Fix size_sigaction, size_sigset_t, size_old_sigaction, size_old_sigset_t. * amd64-linux-tdep.c (amd64_linux_init_abi): Fix size_sigaction, size_sigset_t, size_old_sigaction, size_old_sigset_t. (amd64_x32_linux_init_abi): Fix size_sigaction, size_sigset_t, size_old_sigaction, size_old_sigset_t. * arm-linux-tdep.c (arm_linux_init_abi): Fix size_sigaction, size_old_sigaction, size_old_sigset_t. * i386-linux-tdep.c (i386_linux_init_abi): Fix size_sigaction, size_old_sigaction, size_old_sigset_t. * ppc-linux-tdep.c (ppc_init_linux_record_tdep): Fix size_sigaction, size_sigset_t, size_old_sigaction, size_old_sigset_t.
2015-10-30gdb/linux-record: Fix size_[ug]id valuesMarcin Kościelnicki3-4/+9
i386 and arm wrongly set them to 2, when it should be 4. size_[ug]id is used by getgroups32 etc syscalls, while size_old_[ug]id is used for getgroups16 and friends. gdb/ChangeLog: * arm-linux-tdep.c (arm_linux_init_abi): Fix size_[ug]id. * i386-linux-tdep.c (i386_linux_init_abi): Fix size_[ug]id.
2015-10-30gdb/linux-record: Remove size_siginfoMarcin Kościelnicki8-9/+13
It's a duplicate of size_siginfo_t. gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_linux_init_abi): Remove size_siginfo. * amd64-linux-tdep.c (amd64_linux_init_abi): Remove size_siginfo. (amd64_x32_linux_init_abi): Remove size_siginfo. * arm-linux-tdep.c (arm_linux_init_abi): Remove size_siginfo. * i386-linux-tdep.c (i386_linux_init_abi): Remove size_siginfo. * linux-record.c (record_linux_system_call): Change size_siginfo to size_siginfo_t. * linux-record.h (struct linux_record_tdep): Remove size_siginfo. * ppc-linux-tdep.c (ppc_init_linux_record_tdep): Remove size_siginfo.
2015-10-30gdb/record: Add testcases for a few syscalls.Marcin Kościelnicki15-0/+777
gdb/testsuite/ChangeLog: * gdb.reverse/fstatat-reverse.c: New test. * gdb.reverse/fstatat-reverse.exp: New file. * gdb.reverse/getresuid-reverse.c: New test. * gdb.reverse/getresuid-reverse.exp: New file. * gdb.reverse/pipe-reverse.c: New test. * gdb.reverse/pipe-reverse.exp: New file. * gdb.reverse/readv-reverse.c: New test. * gdb.reverse/readv-reverse.exp: New file. * gdb.reverse/recvmsg-reverse.c: New test. * gdb.reverse/recvmsg-reverse.exp: New file. * gdb.reverse/time-reverse.c: New test. * gdb.reverse/time-reverse.exp: New file. * gdb.reverse/waitpid-reverse.c: New test. * gdb.reverse/waitpid-reverse.exp: New file.
2015-10-30gdbserver/proc-service.c: Change CORE_ADDR cast to uintptr_tSimon Marchi2-2/+7
Fixes on i386: ../../../binutils-gdb/gdb/gdbserver/proc-service.c: In function ps_pdread: ../../../binutils-gdb/gdb/gdbserver/proc-service.c:83:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] ../../../binutils-gdb/gdb/gdbserver/proc-service.c: In function ps_pdwrite: ../../../binutils-gdb/gdb/gdbserver/proc-service.c:93:30: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] I could have kept both casts: (CORE_ADDR) (uintptr_t) addr but it's cleaner this way. The uintptr_t implicitely gets promoted to a CORE_ADDR, which is at least as long as uintptr_t. gdb/gdbserver/ChangeLog: * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t. (ps_pdwrite): Likewise.
2015-10-30Updated (simplified) Chinese translations for ld, bfd, binutils and gold.Nick Clifton8-3816/+16137
* po/zh_CN.po: Updated (simplified) Chinese translation.
2015-10-30Automatic date update in version.inGDB Administrator1-1/+1
2015-10-29gdbserver: Move pointer dereference to after assert checks.Henrik Wallin2-2/+10
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>
2015-10-29Add/adjust casts in gdbserver's proc-serviceSimon Marchi2-2/+8
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.
2015-10-29mdebugread.c: Address class -> address class indexPedro Alves2-20/+34
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.
2015-10-29Add a cast in jit_target_read_implSimon Marchi2-1/+6
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.
2015-10-29Cast gdb_dlsym return valueSimon Marchi2-1/+5
gdb/ChangeLog: * jit.c (jit_reader_load): Add cast.
2015-10-29gdbserver/server.c: Cast return value of memmemSimon Marchi2-1/+7
gdb/gdbserver/ChangeLog: * server.c (handle_search_memory_1): Cast return value of memmem.
2015-10-29Change type of write_qxfer_response parameterSimon Marchi2-1/+6
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 *.
2015-10-29dwarf2read.c: Add castSimon Marchi2-1/+5
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.
2015-10-29Add cast to VEC_iteratePedro Alves2-1/+5
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.
2015-10-29guile/: Add enum castPedro Alves2-1/+5
gdb/ChangeLog: 2015-10-29 Pedro Alves <palves@redhat.com> * guile/scm-frame.c (gdbscm_unwind_stop_reason_string): Add cast.
2015-10-29Disable paging when run by Emacs 25.1 and later.Eli Zaretskii2-2/+8
gdb/ChangeLog: * utils.c (init_page_info): Disable paging if INSIDE_EMACS is set in the environment.
2015-10-29gnu-v2-abi.c: Add castsPedro Alves2-2/+7
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.
2015-10-29Make GOT entry size target-dependentH.J. Lu4-4/+33
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.
2015-10-29Also check GOTPCRELXH.J. Lu2-1/+5
* ld-x86-64/plt-main3.rd: Also check GOTPCRELX.
2015-10-292015-10-29 Catherine Moore <clm@codesourcery.com>Catherine Moore8-3/+132
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
2015-10-29Add support for AArch64 CloudABI binaries.Ed Schouten14-2/+125
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.
2015-10-29bfd/libhppa.h: Make C++ compatiblePedro Alves2-1/+5
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.
2015-10-29gdbserver/mem-break.c: Add castPedro Alves2-1/+5
... 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.
2015-10-29gdbserver/tracepoint: Add casts out of tpoint->handlePedro Alves2-2/+16
... 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.
2015-10-29gdbserver: enum gdb_signal castsPedro Alves2-6/+11
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.
2015-10-29gdbserver: btrace enumsPedro Alves4-5/+24
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.