aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker3845-3850/+3850
2014-01-01Update copyright year in gdb/gdbserver/gdbreplay version output.Joel Brobecker5-3/+12
gdb/ChangeLog: * top.c (print_gdb_version): Set copyright year to 2014. gdb/gdbserver/ChangeLog: * gdbserver.c (gdbserver_version): Set copyright year to 2014. * gdbreplay.c (gdbreplay_version): Likewise.
2014-01-01Add gdb/ChangeLog-2013 entry in fnchange.lst.Joel Brobecker2-0/+5
2014-01-01New Year - GDB ChangeLog rotation.Joel Brobecker2-13499/+13508
2014-01-01daily updateAlan Modra1-1/+1
2013-12-31 * objcopy.c (dump_sections): New list.Nick Clifton4-0/+103
(command_line_switch): Add OPTION_DUMP_SECTION. (copy_options): Add dump-section. (copy_usage): Document new option. (copy_object): Dump requested sections. (copy_main): Handle --dump-section. * doc/binutils.texi: Document --dump-section option. * NEWS: Mention new feature.
2013-12-31daily updateAlan Modra1-1/+1
2013-12-30 * peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type forIlya Tocar2-2/+7
pointer arithmetic.
2013-12-30Clarify documentation of the gdb.Field.bitpos attributeJoel Brobecker2-2/+7
gdb/doc/ChangeLog: * gdb.texinfo (Types In Python): Clarify the documentation of attribute gdb.Field.bitpos.
2013-12-29Add comment describing arm_stap_is_single_operandSergio Durigan Junior2-0/+8
2013-12-29 Sergio Durigan Junior <sergiodj@redhat.com> * arm-linux-tdep.c (arm_stap_is_single_operand): Add comment describing function.
2013-12-29daily updateAlan Modra1-1/+1
2013-12-28Extend handling of immediates on ARM's SystemTap SDT probe supportSergio Durigan Junior2-4/+11
Continuing my series of fixes on the SystemTap SDT support for the ARM/AArch64 architectures, this patch now extends how ARM's SDT specific parser handles literal numbers (immediates). Currently, it only accepts "#" as the prefix. However, according to "info '(as) ARM-Chars'", expressions can also have "$" and nothing as a prefix. This patch extends the parser to accept those options. 2013-12-28 Sergio Durigan Junior <sergiodj@redhat.com> * arm-linux-tdep.c (arm_stap_is_single_operand): Accept "$" as a literal prefix. Also accept no prefix at all. (arm_stap_parse_special_token): Likewise. (arm_linux_init_abi): Likewise.
2013-12-28Implement SystemTap SDT probe support for AArch64Sergio Durigan Junior3-0/+150
This commit implements the needed bits for SystemTap SDT probe support on AArch64 architectures. First, I started by looking at AArch64 assembly specification and filling the necessary options on gdbarch's stap machinery in order to make the generic asm parser (implemented in stap-probe.c) recognize AArch64's asm. After my last patch for the SystemTap SDT API, which extends it in order to accept multiple prefixes and suffixes, this patch became simpler. I also followed Marcus suggestion and did not shared code between 32- and 64-bit ARM. Tom asked me in a previous message how I did my tests. I believe I replied that, but just in case: I ran the tests on gdb.base/stap-probe.exp by hand. I also managed to run the tests on real hardware, and they pass without regressions. 2013-12-28 Sergio Durigan Junior <sergiodj@redhat.com> PR tdep/15653 * NEWS: Mention SystemTap SDT probe support for AArch64 GNU/Linux. * aarch64-linux-tdep.c: Include necessary headers for parsing of SystemTap SDT probes. (aarch64_stap_is_single_operand): New function. (aarch64_stap_parse_special_token): Likewise. (aarch64_linux_init_abi): Declare SystemTap SDT probe argument prefixes and suffixes. Initialize gdbarch with them.
2013-12-28 Adjust MMIX gas tests for recent bfd/elf.c change.Hans-Peter Nilsson3-3/+10
* gas/mmix/bspec-1.d: Adjust for SHF_INFO_LINK now set on RELA sections. * gas/mmix/bspec-2.d: Ditto.
2013-12-28Fix gdb.Field attributes documentation for enum types.Joel Brobecker2-4/+13
The following patch ... | commit 14e75d8ea4fe9ed4dbf292ae4a9745e33e2ff353 | Date: Wed Apr 18 06:46:47 2012 +0000 | | gdb/ | PR symtab/7259: | [...] ... discussed under ... [PATCH] Allow 64-bit enum values http://www.sourceware.org/ml/gdb-patches/2012-03/msg00772.html ... introduced a change in the gdb.Fields API without documenting it: | I took a separate approach from the one I took in: | | http://sourceware.org/ml/gdb-patches/2012-02/msg00403.html | | and removed the overloaded meaning of the bitpos location variable to | fix PR symtab/7259. In the following patch, I introduce a separate | field_location union member 'enumval' which can accept LONGEST and | hence expand enum values to 64-bit signed values. With this change, | bitpos now only is used for (non-negative) offsets into structures, | since the other overload of bitpos (range bounds) were already | separated into struct range_bound. This patch updates the documentation to reflect that change. gdb/doc/ChangeLog: * gdb.texinfo (Types In Python): Fix the documentation of attribute "bitpos" in class gdb.Field for enum types. Add documentation for attribute "enumval" in that same class.
2013-12-28Turn -list-feature @table into @ftable.Joel Brobecker2-2/+7
This is to make it easier to discover the various options displayed by the -list-features command. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Support Commands): Change @table into @ftable.
2013-12-28daily updateAlan Modra1-1/+1
2013-12-27daily updateAlan Modra1-1/+1
2013-12-26daily updateAlan Modra1-1/+1
2013-12-25daily updateAlan Modra1-1/+1
2013-12-23Reorganize extension language auto-loading docs.Doug Evans2-246/+289
* gdb.texinfo (Auto-loading): Move menu up. Move discussion of auto-loaded objfile scripts and .debug_gdb_scripts section to their corresponding section in Extending GDB. (Extending GDB): Move menu up. New menu item "Auto-loading extensions". (Sequences): New menu item "Auto-loading sequences". (Auto-loading sequences): New node. (Python): Rename section from Scripting GDB to Extending GDB. (Python Auto-loading): Update xref, refer to "Auto-loading extensions". Move docs on ways to auto-load extensions to ... (Auto-loading extensions): ... here. New node.
2013-12-232013-12-17 Sterling Augustine <saugustine@google.com>Sterling Augustine2-1/+6
* linespec.c (add_sal_to_sals): Use "<unknown>" when a symbol isn't found.
2013-12-24daily updateAlan Modra1-1/+1
2013-12-23Some cleanups on stap-probe.cSergio Durigan Junior2-39/+54
This patch does some basic cleanups on the SystemTap SDT probes API. It removes spurious newlines, brackets, reindents some code, and do explicit checks for NULL, NUL, and 0 where applicable. 2013-12-23 Sergio Durigan JUnior <sergiodj@redhat.com> * stap-probe.c (struct stap_probe) <args_parsed>: Add comment. (stap_is_generic_prefix): Delete extra brackets. Reindent. (stap_parse_register_operand): Remove spurious newlines. Simplify code to parse special token. (stap_parse_argument_conditionally): Add gdb_assert. (stap_parse_argument_1): Likewise. Explicitly check for NULL and NUL. (stap_parse_probe_arguments): Likewise. (handle_stap_probe): Likewise. Reindent code. (get_stap_base_address): Explicitly check for NULL. (stap_get_probes): Likewise. Reindent code. (stap_relocate): Explicitly check for 0. (stap_gen_info_probes_table_values): Likewise.
2013-12-23Move GDB/MI commands related to support-query to their own @node.Joel Brobecker2-141/+165
A number of commands provide the capability to query the debugger about support for various features, and one of them in particular (-list-features), is expected to grow as new features get added. -list-target-features should also grow a bit over time, but probably slower. These commands deserve their own section and @node. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI): Add "GDB/MI Support Commands" entry in menu. (GDB/MI Variable Objects): Adjust reference to "-list-features" command, now in a new node. (GDB/MI Support Commands): New node, with its contents being extracted from the "GDB/MI Miscellaneous Commands" node. A small paragraph introducing the section is also added at the start. (GDB/MI Miscellaneous Commands): Delete the description of the -info-gdb-mi-command, -list-features and -list-target-features commands, now hosted in the "GDB/MI Support Commands" node.
2013-12-23daily updateAlan Modra1-1/+1
2013-12-22daily updateAlan Modra1-1/+1
2013-12-21daily updateAlan Modra1-1/+1
2013-12-20Define IREL_IN_PLT for elf_k1om.sh and elf_l1om.shH.J. Lu3-0/+7
* emulparams/elf_k1om.sh (IREL_IN_PLT): Define. * emulparams/elf_l1om.sh (IREL_IN_PLT): Likewise.
2013-12-20Covert leading spaces to tabH.J. Lu1-1/+1
2013-12-20 PR binutils/16218Nick Clifton11-111/+139
* dwarf.c (read_and_display_attr_value): Only print a tab character if it preceeds further text. * binutils-all/dw2-1.W: Update expected objdump output. * binutils-all/i386/compressed-1a.d: Likewise. * binutils-all/objdump.W: Likewise. * binutils-all/x86-64/compressed-1a.d: Likewise. * gas/elf/dwarf2-1.d: Update expected objdump output. * gas/elf/dwarf2-2.d: Likewise. * gas/i386/dw2-compress-1.d: Likewise.
2013-12-21Don't segv on cie.initial_instructions[] overflow.Alan Modra2-6/+18
Don't attempt to merge CIEs with a larger number of insns than will fit in the buffer. * elf-eh-frame.c (cie_eq): Return false when initial_insn_length is too large. (cie_compute_hash): Don't exceed bounds of initial_instructions. (_bfd_elf_parse_eh_frame): Always set initial_insn_length, and save as much of insns to initial_instructions[] as will fit.
2013-12-202013-12-20 Chung-Lin Tang <cltang@codesourcery.com>Chung-Lin Tang2-44/+12
* nios2-linux-tdep.c (nios2_linux_sigreturn_init): Remove. (nios2_linux_sigreturn_tramp_frame): Remove. (nios2_linux_rt_sigreturn_tramp_frame): Update rt_sigreturn syscall number. (nios2_linux_syscall_next_pc): Likewise. Remove sigreturn case. (nios2_linux_init_abi): Remove registration of nios2_linux_sigreturn_tramp_frame.
2013-12-20Remove duplicated entry for .pad in c-arm.texiTristan Gingold2-7/+5
* doc/c-arm.texi (ARM Directives): Remove duplicate .pad entry.
2013-12-19 * stringpool.cc (Stringpool_template::reserve): AddIan Lance Taylor2-2/+11
HAVE_UNORDERED_MAP case. * stringpool.cc (Stringpool_template::print_stats): Likewise.
2013-12-20daily updateAlan Modra1-1/+1
2013-12-19Mask out PREFIX_ADDR when adding prefix to opcodeH.J. Lu2-1/+8
PREFIX_ADDR isn't a prefix to opcode. This patch masks out PREFIX_ADDR when adding prefix to opcode. PR gdb/16305 * i386-tdep.c (i386_process_record): Mask out PREFIX_ADDR when adding prefix to opcode.
2013-12-19Properly decode MODRM byte for 64-bitH.J. Lu2-2/+8
64-bit mode doesn't use 16-bit address. We should always check SIB byte for address in 64-bit mode. PR gdb/16304 * i386-tdep.c (i386_record_lea_modrm_addr): Don't use 16-bit address in 64-bit mode.
2013-12-19Zero-extend address from 32-bit to 64-bit for ADDR32 prefixH.J. Lu2-0/+13
When there is ADDR32 prefix in 64-bit mode, we should zero-extend address from 32-bit to 64-bit. PR gdb/16304 * i386-tdep.c (i386_record_lea_modrm_addr): Zero-extend 32-bit address to 64-bit in 64-bit mode.
2013-12-19Add amd64_x32_linux_record_tdep and amd64_x32_sysH.J. Lu3-57/+807
X32 Linux system calls are diffferent from amd64 Linux system calls in system call numbers as well as parameter types/values. This patch adds amd64_x32_linux_record_tdep and amd64_x32_syscall for x32. PR gdb/16304 * amd64-linux-tdep.c (amd64_canonicalize_syscall): Handle x32 system calls. (amd64_x32_linux_record_tdep): New. (amd64_linux_syscall_record_common): New function. (amd64_linux_syscall_record): Call amd64_linux_syscall_record_common with amd64_linux_record_tdep. (amd64_x32_linux_syscall_record): Call amd64_linux_syscall_record_common with amd64_x32_linux_record_tdep. (amd64_linux_init_abi_common): Move amd64_linux_record_tdep initialization and tdep->i386_syscall_record setup to ... (amd64_linux_init_abi): Here. (amd64_x32_linux_init_abi): Initialize amd64_x32_linux_record_tdep. Set tdep->i386_syscall_record to amd64_x32_linux_syscall_record. * amd64-linux-tdep.h (amd64_x32_syscall): New enum.
2013-12-19Extend SystemTap SDT probe argument parserSergio Durigan Junior11-208/+513
This patch extends the current generic parser for SystemTap SDT probe arguments. It can be almost considered a cleanup, but the main point of it is actually to allow the generic parser to accept multiple prefixes and suffixes for the its operands (i.e., integers, register names, and register indirection). I have chosen to implement this as a list of const strings, and declare this list as "static" inside each target's method used to initialize gdbarch. This patch is actually a preparation for an upcoming patch for ARM, which implements the support for multiple integer prefixes (as defined by ARM's asm spec). And AArch64 will also need this, for the same reason. This patch was regtested on all architectures that it touches (i.e., i386, x86_64, ARM, PPC/PPC64, s390x and IA-64). No regressions were found. 2013-12-19 Sergio Durigan Junior <sergiodj@redhat.com> * amd64-tdep.c (amd64_init_abi): Declare SystemTap SDT probe argument prefixes and suffixes. Initialize gdbarch with them. * arm-linux-tdep.c (arm_linux_init_abi): Likewise. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh (stap_integer_prefix, stap_integer_suffix) (stap_register_prefix, stap_register_suffix) (stap_register_indirection_prefix) (stap_register_indirection_suffix): Declare as "const char *const *" instead of "const char *". Adjust printing function. Rename all of the variables to the plural. (pstring_list): New function. * i386-tdep.c (i386_elf_init_abi): Declare SystemTap SDT probe argument prefixes and suffixes. Initialize gdbarch with them. * ia64-linux-tdep.c (ia64_linux_init_abi): Likewise. * ppc-linux-tdep.c (ppc_linux_init_abi): Likewise. * s390-linux-tdep.c (s390_gdbarch_init): Likewise. * stap-probe.c (stap_is_generic_prefix): New function. (stap_is_register_prefix): Likewise. (stap_is_register_indirection_prefix): Likewise. (stap_is_integer_prefix): Likewise. (stap_generic_check_suffix): Likewise. (stap_check_integer_suffix): Likewise. (stap_check_register_suffix): Likewise. (stap_check_register_indirection_suffix): Likewise. (stap_parse_register_operand): Remove unecessary declarations for variables holding prefix and suffix information. Use the new functions listed above for checking for prefixes and suffixes. (stap_parse_single_operand): Likewise.
2013-12-19Set SHF_INFO_LINK bit for SHT_REL/SHT_RELA sectionsH.J. Lu9-3/+46
It is a good pratice to set the SHF_INFO_LINK bit when the sh_info field represents a section header index. bfd/ PR binutils/16317 * elf.c (assign_section_numbers): Set the SHF_INFO_LINK bit for SHT_REL/SHT_RELA sections when setting the sh_info field. binutils/testsuite/ PR binutils/16317 * binutils-all/readelf.s: Updated. * binutils-all/readelf.s-64: Likewise. ld/testsuite/ PR binutils/16317 * ld-elf/linkinfo1.s: New file. * ld-elf/linkinfo1a.d: Likewise. * ld-elf/linkinfo1b.d: Likewise.
2013-12-19Don't run x86-64-disassem for mingw targetsH.J. Lu2-1/+5
mingw targets pad text sections which won't work with x86-64-disassem. * gas/i386/i386.exp: Don't run x86-64-disassem for mingw targets.
2013-12-19Fix PR breakpoints/16297: catch syscall with syscall 0Gabriel Krisman Bertazi5-9/+43
Code rationale ============== by: Gabriel Krisman Bertazi This is a fix for bug 16297. The problem occurs when the user attempts to catch any syscall 0 (such as syscall read on Linux/x86_64). GDB was not able to catch the syscall and was missing the breakpoint. Now, breakpoint_hit_catch_syscall returns immediately when it finds the correct syscall number, avoiding a following check for the end of the search vector, that returns a no hit if the syscall number was zero. Testcase rationale ================== by: Sergio Durigan Junior This testcase is a little difficult to write. By doing a quick inspection at the Linux source, one can see that, in many targets, the syscall number 0 is restart_syscall, which is forbidden to be called from userspace. Therefore, on many targets, there's just no way to test this safely. My decision was to take the simpler route and just adds the "read" syscall on the default test. Its number on x86_64 is zero, which is "good enough" since many people here do their tests on x86_64 anyway and it is a popular architecture. However, there was another little gotcha. When using "read" passing 0 as the third parameter (i.e., asking it to read 0 bytes), current libc implementations could choose not to effectively call the syscall. Therefore, the best solution was to create a temporary pipe, write 1 byte into it, and then read this byte from it. gdb/ChangeLog 2013-12-19 Gabriel Krisman Bertazi <gabriel@krisman.be> PR breakpoints/16297 * breakpoint.c (breakpoint_hit_catch_syscall): Return immediately when expected syscall is hit. gdb/testsuite/ChangeLog 2013-12-19 Sergio Durigan Junior <sergiodj@redhat.com> PR breakpoints/16297 * gdb.base/catch-syscall.c (read_syscall, pipe_syscall) (write_syscall): New variables. (main): Create a pipe, write 1 byte in it, and read 1 byte from it. * gdb.base/catch-syscall.exp (all_syscalls): Include "pipe, "write" and "read" syscalls. (fill_all_syscalls_numbers): Improve the way to obtain syscalls numbers.
2013-12-19 * Fix indentation issue and reorganize last commit entryPierre Muller2-21/+26
so that it is shorter than 80. peXXigen.c (rsrc_cmp): Fix unused variable warning.
2013-12-19don't allocate serial_opsTom Tromey5-182/+226
Now that struct serial_ops is const everywhere, we can easily turn the instances into globals. This patch implements this idea. On the one hand I think this is nicer since it makes a bit more data readonly and slightly reduces allocations. On the other hand it reduces readability somewhat. If the readability is a concern to anyone I was thinking I could write a macro that conditionally uses GCC's designated initializer extension. Tested by rebuilding on x86-64 Fedora 18, both natively and using the mingw cross tools. 2013-12-19 Tom Tromey <tromey@redhat.com> * ser-unix.c (hardwire_ops): New global. (_initialize_ser_hardwire): Use it. * ser-tcp.c (tcp_ops): New global. (_initialize_ser_tcp): Use it. * ser-pipe.c (pipe_ops): New global. (_initialize_ser_pipe): Use it. * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): New globals. (_initialize_ser_windows): Use them.
2013-12-19make serial_ops constTom Tromey8-24/+36
I noticed that the serial_ops vtable is not const, but really it ought to be. This patch constifies it, removing the only mutable field in the process. Tested by rebuilding on x86-64 Fedora 18, both natively and using the mingw cross tools. 2013-12-19 Tom Tromey <tromey@redhat.com> * serial.c (serial_ops_p): New typedef. (serial_ops_list): Now a VEC. (serial_interface_lookup): Return const. Use VEC_iterate. (serial_add_interface): Make parameter const. (serial_open): Update. (serial_fdopen_ops): Make 'ops' const. (serial_pipe): Update. * ser-tcp.c (_initialize_ser_tcp): Update. * ser-pipe.c (_initialize_ser_pipe): Update. * ser-unix.c (_initialize_ser_hardwire): Update. * ser-mingw.c (_initialize_ser_windows): Update. * ser-go32.c (dos_ops): Now const. Update. * serial.h (struct serial) <ops>: Now const. (struct serial_ops) <next>: Remove. (serial_add_interface): Make parameter const.
2013-12-19remove remnants of old Mach-O workaroundTom Tromey2-14/+13
I happened to run readelf on an ELF file created by Guile. readelf complained about invalid values for DW_FORM_strp. At first I assumed this was just a Guile bug, but eu-readelf did the right thing, so I looked a bit deeper. I came across some old Mach-O code to bias some offsets by section addresses. Guile, unlike many ELF writers, sets the address for the various DWARF-related sections, causing this unusual code to be run. This code came from an old commit: 2005-09-30 H.J. Lu <hongjiu.lu@intel.com> * dwarf.c (fetch_indirect_string): Adjust for section address. (process_debug_info): Likewise. (display_debug_loc): Likewise. (display_debug_ranges): Likewise. * objdump.c (mach_o_dwarf_sections): New. (generic_dwarf_sections): Likewise. (check_mach_o_dwarf): Likewise. (dump_dwarf): Call check_mach_o_dwarf. However it was partially reverted here: https://sourceware.org/ml/binutils/2008-11/msg00134.html This patch just completes the reversion. Built and regtested on x86-64 Fedora 18. I also ran the resulting readelf against the Guile-created object with success. I have no way of testing this on Mach-O, so your feedback is solicited. 2013-12-19 Tom Tromey <tromey@redhat.com> * dwarf.c (fetch_indirect_string): Don't bias by section address. (fetch_indexed_string): Likewise. (process_debug_info): Likewise. (display_debug_loc): Likewise. (display_debug_ranges): Likewise.
2013-12-19 * peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding ifPierre Muller2-75/+122
__CYGWIN__ or __MINGW32__ macro is defined. (rsrc_cmp): Fix Windows host version and version without wchar header. [__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro. Fix coding standard issues.
2013-12-19fortran: enable ptype/whatis for modules.Keven Boell8-4/+74
Added new domain MODULE_DOMAIN for fortran modules to avoid issues with sharing namespaces (e.g. when a variable currently in scope has the same name as a module). (gdb) ptype modname old> No symbol "modname" in current context. new> type = module modname This fixes PR 15209 and also addresses the issue with sharing namespaces: https://sourceware.org/ml/gdb-patches/2013-02/msg00643.html 2013-11-19 Keven Boell <keven.boell@intel.com> Sanimir Agovic <sanimir.agovic@intel.com> * cp-namespace.c (cp_lookup_nested_symbol): Enable nested lookups for fortran modules. * dwarf2read.c (read_module): Add fortran module to the symbol table. (add_partial_symbol, add_partial_module): Add fortran module to the partial symbol table. (new_symbol_full): Create full symbol for fortran module. * f-exp.y (yylex): Add new module domain to be parsed. * symtab.h: New domain for fortran modules. testsuite/ * gdb.fortran/module.exp: Completion matches fortran module names as well. ptype/whatis on modules return a proper type. Add new check for having the correct scope.