aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-03-27record: fix instruction-history-size regressionMarkus Metzger2-8/+14
* record.c (command_size_to_target_size): Fix size comparison. Change parameter type from pointer to integer to integer. Update all users.
2013-03-27 * windows-nat.c (handle_output_debug_string): Avoid typecastPierre Muller2-1/+6
from integer of different size warning.
2013-03-27 * gdb.base/dprintf.exp: Fix typo preventing "dprintf info 2"Keith Seitz2-1/+6
from passing.
2013-03-27*** empty log message ***gdbadmin1-1/+1
2013-03-26 PR binutils/15206Alan Modra2-1/+6
* dwarf.c (read_and_display_attr_value): Cast format '*' arg to int.
2013-03-26windows-nat.c: Add empty line after local block variable definitions.Joel Brobecker2-0/+7
gdb/ChangeLog: * windows-nat.c (handle_output_debug_string): Add empty line after local block variable definition.
2013-03-26daily updateAlan Modra1-1/+1
2013-03-26oops - fix PR attributationNick Clifton1-1/+1
2013-03-26 PR binutils/15205Nick Clifton2-277/+330
* dwarf.c (SAFE_BYTE_GET): New macro - checks remaining buffer space before calling byte_get. (SAFE_BYTE_GET_AND_INC): New macro. (SAFE_SIGNED_BYTE_GET): New macro. (SAFE_SIGNED_BYTE_GET_AND_INC): New macro. (SAFE_BYTE_GET64): New macro. (process_extened_line_op): Use new macros. Use strnlen when appropriate. (fetch_indirect_string): Likewise. (get_FORM_name): Likewise. (decode_location_expression): Likewise. (read_and_display_attr_value): Likewise. (process_debug_info): Likewise. (display_debug_lines_raw): Likewise. (display_debug_lines_decoded): Likewise. (display_debug_pubnames): Likewise. (display_debug_macinfo): Likewise. (get_line_filename_and_dirname): Likewise. (display_debug_macro): Likewise. (display_loc_list): Likewise. (display_loc_list_dwo): Likewise. (display_debug_aranges): Likewise. (display_debug_ranges): Likewise. (frame_display_row): Likewise. (display_debug_frames): Likewise.
2013-03-26ser-tcp.c: Small signed->unsigned cleanup.Pedro Alves2-2/+7
The "set tcp connect-timeout" variable is unsigned: /* Timeout period for connections, in seconds. */ static unsigned int tcp_retry_limit = 15; And used like: /* Check for timeout. */ if (*polls > tcp_retry_limit * POLL_INTERVAL) { errno = ETIMEDOUT; return -1; } Which made me stop and look over why is it that 'polls' is signed. What I found is there's really no reason. gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * ser-tcp.c (wait_for_connect): Make 'polls' parameter unsigned. (net_open): Make 'polls' local unsigned.
2013-03-26Make "set/show remoteaddresssize" a zuinteger command instead of uinteger.Pedro Alves2-5/+10
It makes no sense to talk about an "unlimited" address size in this context. (gdb) show remoteaddresssize The maximum size of the address (in bits) in a memory packet is 0. (gdb) set remoteaddresssize 0 (gdb) show remoteaddresssize The maximum size of the address (in bits) in a memory packet is unlimited. "set remoteaddresssize 0" mapping to UINT_MAX means you can't force gdb through this path twice in the same GDB run: static CORE_ADDR remote_address_masked (CORE_ADDR addr) { unsigned int address_size = remote_address_size; /* If "remoteaddresssize" was not set, default to target address size. */ if (!address_size) address_size = gdbarch_addr_bit (target_gdbarch ()); gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * remote.c (_initialize_remote): Make "set remoteaddresssize" a zuinteger command instead of uinteger.
2013-03-26record-full.c: Remove always true checks.Pedro Alves2-32/+35
The "set record full insn-number-max" command is an uinteger command. If the variable that holds the maximum count of logged instructions is unsigned, it's better if the variable that holds the current number of logged instructions is also unsigned. Looking over the code, there's no case the variable could end up negative. Then, tests like "if (record_full_insn_max_num)" are always true, because being a uinteger command means that "set record full insn-number-max 0" is actually mapped to UINT_MAX internally. IOW, the command's variable is never 0. The checks might make some sense if 0 wasn't mapped to UINT_MAX, and 0 meant unlimited, but, that's not how things work. Tested on x86_64 Fedora 17. gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * record-full.c (record_full_insn_num): Make it unsigned. (record_full_check_insn_num, record_full_message) (record_full_registers_change, record_full_xfer_partial): Remove record_full_insn_max_num check (it's always != 0). (record_full_info, record_full_restore): Use %u as format string. (): Use %u as format string. (set_record_full_insn_max_num): Remove record_full_insn_max_num check (it's always != 0).
2013-03-26Make "set/show dcache line-size" and "set/show dcache size" zinteger ↵Pedro Alves2-12/+17
commands instead of uinteger. It doesn't make sense to request an "unlimited" dcache. You want to configure the cache with specific lines and length of lines. It doesn't actually work anyway: (gdb) set dcache line-size 0 Invalid dcache line size: 4294967295 (must be power of 2). (gdb) set dcache size 0 (gdb) show dcache size Number of dcache lines is unlimited. (gdb) info dcache Dcache 4294967295 lines of 64 bytes each. No data cache available. The code already has guards in place to forbid 0s: static void set_dcache_size (char *args, int from_tty, struct cmd_list_element *c) { if (dcache_size == 0) { dcache_size = DCACHE_DEFAULT_SIZE; error (_("Dcache size must be greater than 0.")); } if (last_cache) dcache_invalidate (last_cache); } static void set_dcache_line_size (char *args, int from_tty, struct cmd_list_element *c) { if (dcache_line_size < 2 || (dcache_line_size & (dcache_line_size - 1)) != 0) { unsigned d = dcache_line_size; dcache_line_size = DCACHE_DEFAULT_LINE_SIZE; error (_("Invalid dcache line size: %u (must be power of 2)."), d); } if (last_cache) dcache_invalidate (last_cache); } So we now get: (gdb) set dcache line-size 0 Invalid dcache line size: 0 (must be power of 2). (gdb) set dcache size 0 Dcache size must be greater than 0. gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * dcache.c (_initialize_dcache): Make the "set dcache line-size" and "set dcache size" commands zuinteger instead of uinteger.
2013-03-26Make "set/show cris-version" a zuinteger instead of uinteger.Pedro Alves2-9/+14
Being a uinteger means you revert back to having GDB decide the version. It makes no sense to have an "unlimited" version. (gdb) show cris-version The current CRIS version is 0. (gdb) set cris-version 0 (gdb) show cris-version The current CRIS version is unlimited. (gdb) gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * cris-tdep.c (_initialize_cris_tdep): Make the "set cris-version" command zuinteger instead of uinteger.
2013-03-26Make "set/show debug coff_pe_read" a zuinteger instead of uinteger.Pedro Alves2-8/+13
Being a uinteger means you can't disable debug output after enabling it... (gdb) show debug coff_pe_read Coff PE read debugging is 0. (gdb) set debug coff_pe_read 0 (gdb) show debug coff_pe_read Coff PE read debugging is unlimited. (gdb) gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * coff-pe-read.c (_initialize_coff_pe_read): Make the command zuinteger instead of uinteger.
2013-03-26Get rid of "No such file or directory" in the testsuite's btrace support ↵Pedro Alves2-1/+8
detection. When I tried running the btrace tests, I noticed something odd in the gdb.log file: (gdb) run Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace22343.x Breakpoint 1, main () at /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace22343.c:1 1 /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace22343.c: No such file or directory. ^^^^^^^^^^^^^^^^^^^^^^^^^ (gdb) record btrace Target does not support branch tracing. (gdb) testcase ../../../src/gdb/testsuite/gdb.btrace/enable.exp completed in 0 seconds I knew that the btrace tests on my machine weren't supposed to work, but still, that error made me wonder if the test had something broken, and waste a few minutes looking up where that is coming from. The issue is that the btrace detection deletes the source file right after compiling it, and before GDB has a chance to open it. It's really harmless, but I'd rather spare others from going through the same exercise. We now get the regular: (gdb) run Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace24210.x ... Breakpoint 1, main () at /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.btrace/btrace24210.c:1 1 int main(void) { return 0; } ... gdb/testsuite/ 2013-03-26 Pedro Alves <palves@redhat.com> * lib/gdb.exp (skip_btrace_tests): Delay deleting the source file until after GDB has run.
2013-03-26"set record instruction-history-size"/"set record ↵Pedro Alves2-16/+101
function-call-history-size" range validation. While the commands are uinteger, the target interfaces are limited to INT_MAX. Don't let the user request more than we can handle. gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * record.c (record_insn_history_size_setshow_var) (record_call_history_size_setshow_var): New globals. (command_size_to_target_size): New function. (cmd_record_insn_history, cmd_record_call_history): Use command_size_to_target_size instead of cast. (validate_history_size, set_record_insn_history_size) (set_record_call_history_size): New functions. (_initialize_record): Install set_record_insn_history_size and set_record_call_history_size as "set" hooks of "set record instruction-history-size" and "set record function-call-history-size".
2013-03-26sim: rewrite SIM_AC_OPTION_HARDWARE a bit to simplify thingsMike Frysinger23-354/+448
There's no need to put the majority of the logic into the 3rd arg of the AC_ARG_ENABLE. Coupled with the lack of indentation, it makes it hard to follow, error prone to update, and duplicates code (with the 4th arg). So pull the logic out of the 3rd arg and outside of the AC_ARG_ENABLE macro. This allows us to gut the 4th arg entirely, merge with the code that followed the macro, and fix bugs related to the new dv-sockser in the process. Hopefully building the various sims with the default sim-hardware settings, as well as with explicit --{dis,en}able-sim-hardware flags, should all just work now.
2013-03-26Use readline's 'history_max_entries' instead of the old 'max_input_history'.Pedro Alves2-7/+7
Ref: http://www.sourceware.org/ml/gdb-patches/2002-08/msg00486.html We've long since imported a newer readline, no need to use the old compatibility variable anymore. Tested on x86_64 Fedora 17. gdb/ 2013-03-26 Pedro Alves <palves@redhat.com> * top.c (gdb_rl_operate_and_get_next): Replace max_input_history use with history_max_entries use. Remove FIXME note.
2013-03-26 PR gas/15295Nick Clifton2-25/+65
* listing.c (rebuffer_line): Rewrite to avoid seeking back to the start of the file each time.
2013-03-26 PR gas/15178Nick Clifton2-1/+7
* config/tc-sparc.h (ELF_TARGET_FORMAT): Set to elf32-sparc for FreeBSD targets.
2013-03-26gdb/testsuite/Yao Qi5-0/+73
* gdb.trace/actions.c, gdb.trace/circ.c: Add license header. * gdb.trace/collection.c, gdb.trace/tfile.c: Likewise.
2013-03-26Fix typo in added CL entry.Tristan Gingold1-1/+1
2013-03-26gas/Tristan Gingold7-14/+43
2013-03-26 Douglas B Rupp <rupp@gnat.com> * config/tc-ia64.c (emit_one_bundle): Move last_slot adjustment after fixup. gas/testsuite/ 2013-03-26 Douglas B Rupp <rupp@adacore.com * gas/ia64/ia64.exp: Add new test reloc-mlx * gas/ia64/reloc-mlx.[sd]: New test for X-unit reloc. * gas/ia64/pcrel.d: Fix output for X-unit reloc.
2013-03-26record-btrace: fix assertion when enabling recording after re-runMarkus Metzger4-0/+24
Reading symbols from /bin/true...(no debugging symbols found)...done. (gdb) b _start Function "_start" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (_start) pending. (gdb) r Starting program: /bin/true Breakpoint 1, 0x00000039a0400af0 in _start () from /lib64/ld-linux-x86-64.so.2 (gdb) rec b (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /bin/true Breakpoint 1, 0x00000039a0400af0 in _start () from /lib64/ld-linux-x86-64.so.2 (gdb) rec b gdb/record-btrace.c:154: internal-error: record_btrace_open: Assertion `record_btrace_thread_observer == NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) gdb/ * record-btrace.c (record_btrace_close): Call record_btrace_auto_disable. testsuite/ * gdb.btrace/enable.exp: Add regression test.
2013-03-26 * elflink.c (_bfd_elf_add_default_symbol): Preserve sectionAlan Modra2-2/+10
over _bfd_elf_merge_symbol calls.
2013-03-26 * elflink.c (elf_link_add_object_symbols): Add assertion forAlan Modra2-1/+10
common override alignment check code. Formatting.
2013-03-26Delete rs6000-nat.c:fixup_breakpoints extern declaration.Joel Brobecker2-2/+4
This function does not exist... gdb/ChangeLog: * rs6000-nat.c (fixup_breakpoints): Delete declaration.
2013-03-26*** empty log message ***gdbadmin1-1/+1
2013-03-25daily updateAlan Modra1-1/+1
2013-03-25 * contrib/cc-with-tweaks.sh: Check exit code of dwp.Doug Evans2-0/+6
2013-03-25 * ld.texinfo (--disable-runtime-pseudo-reloc): Adjust default.Kai Tietz2-1/+5
2013-03-25 PR symtab/11462:Tom Tromey4-0/+61
* c-exp.y (exp): Add new productions for destructors after '.' and '->'. (write_destructor_name): New function. gdb/testsuite * gdb.cp/m-static.exp: Add destructor-printing tests.
2013-03-25 PR c++/9197:Tom Tromey7-34/+48
* opencl-lang.c (evaluate_subexp_opencl) <STRUCTOP_STRUCT>: Use value_struct_elt, not lookup_struct_elt_type. * eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT, STRUCTOP_PTR>: Use value_struct_elt, not lookup_struct_elt_type. * expression.h (EVAL_AVOID_SIDE_EFFECTS): Update comment. gdb/testsuite * gdb.cp/m-static.exp: Add constructor ptype tests. * gdb.cp/m-static.cc (single_constructor): New class. (main): Make instance of single_constructor.
2013-03-25 PR binutils/15202Nick Clifton4-301/+382
* dwarf.c (read_leb128): Add END parameter. Do not read at or beyond end. (read_sleb128): Add END parameter. (read_uleb128): New function. (process_extended_line_op): Pass END to leb128 functions. (process_abbrev_section): Likewise. (decode_location_expression): Likewise. (read_and_display_attr_value): Likewise. (read_and_display_attr): Likewise. (process_debug_info): Likewise. (display_debug_lines_raw): Likewise. (display_debug_lines_decoded): Likewise. (display_debug_macinfo): Likewise. (get_line_filename_and_dirname): Likewise. (display_debug_macro): Likewise. (display_loc_list_dwo): Likewise. (display_debug_ranges): Likewise. * dwarf.h (read_leb128): Update prototype. * readelf.c (read_uleb128): Add END parameter. (decode_arm_unwind_bytecode): Pass END to read_uleb128. (decode_tic6x_unwind_bytecode): Likewise. (display_tag_value): New function. (display_arm_attribute): Add END parameter. Pass END to read_uleb128. Use display_tag_value. (display_gnu_attribute): Likewise. (display_power_gnu_attribute): Likewise. (display_sparc_gnu_attribute): Likewise. (display_mips_gnu_attribute): Likewise. (display_tic6x_attribute): Likewise. (process_attributes): Likewise. (display_raw_attribute): New function.
2013-03-25gdb/Yao Qi2-1/+7
* ctf.c [USE_WIN32API]: Undef 'mkdir' and use 'mkdir' instead of '_mkdir'.
2013-03-25 * elflink.c (_bfd_elf_merge_symbol): Set old_alignment forAlan Modra2-156/+121
usual common symbols as well as for dynamic. Add poldbfd param. Save old bfd. Adjust callers. (_bfd_elf_add_default_symbol): Add poldbfd param. Pass "section" and "value" by value, not pointer. Adjust caller. (elf_link_add_object_symbols): Combine undef_bfd and old_bfd vars. Delete code to set same. Use old_bfd and old_alignment from _bfd_elf_merge_symbol instead. Add default symbol before alignment and size checks. Wrap overlong lines.
2013-03-25 * elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.Alan Modra2-23/+11
(elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol when override is true.
2013-03-25 * elflink.c (_bfd_elf_merge_symbol): Use local var holding valueAlan Modra2-12/+15
of *sym_hash.
2013-03-25 * elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.Alan Modra2-13/+22
Wrap long lines. (elf_link_add_object_symbols): Discard TLS symbols for --just-syms early in symbol loop.
2013-03-25 * elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.Alan Modra5-53/+32
(_bfd_elf_init_reloc_shdr): Delete. * elf.c (_bfd_elf_init_reloc_shdr): Make static. * elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to just what is needed. * elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.
2013-03-25*** empty log message ***gdbadmin1-1/+1
2013-03-24daily updateAlan Modra1-1/+1
2013-03-24*** empty log message ***gdbadmin1-1/+1
2013-03-23daily updateAlan Modra1-1/+1
2013-03-232013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill5-29/+34
* configure.ac: Use $SIM_DV_SOCKSER_O. * configure: Regenerated.
2013-03-232013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill12-8/+590
* configure.ac: Fail if dv-sockser.o not available. Error when --disable-sim-hardware is specified. * configure: Regenerated.
2013-03-232013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill5-3/+175
* configure.ac: Fail if dv-sockser.o not available. Error when --disable-sim-hardware is specified. * tconfig.in: Conditionalize use of dv_sockser_install. * configure: Regenerated. * config.in: Regenerated.
2013-03-232013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill5-6/+60
* configure.ac: Address use of dv-sockser.o. * tconfig.in: Conditionalize use of dv_sockser_install. * configure: Regenerated. * config.in: Regenerated.
2013-03-232013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2-2/+23
* acinclude.m4: Add SIM_DV_SOCKSER_O which is empty on hosts which do not support dv-sockser.o. Add always as option to first argument to SIM_AC_OPTION_HARDWARE. Fail if hardware is always required to be enabled by simulator.