Commit Graph

27120 Commits

Author SHA1 Message Date
gdbadmin 966b060329 *** empty log message *** 2010-08-05 00:00:34 +00:00
Pedro Alves 7072899291 * s390-tdep.c: Include linux-tdep.h.
(s390_gdbarch_init): Call linux_init_abi.
2010-08-04 20:40:57 +00:00
Pedro Alves a5ee0f0c4d * corelow.c (core_pid_to_str): Default to using normal_pid_to_str
instead of printing "Thread" here.
	* linux-tdep.c: Include inferior.h.
	(linux_core_pid_to_str): New.
	(linux_init_abi): New.
	* linux-tdep.h (linux_init_abi): Declare.
	* alpha-linux-tdep.c: Include linux-tdep.h.
	(alpha_linux_init_abi): Call linux_init_abi.
	* amd64-linux-tdep.c (amd64_linux_init_abi): Call linux_init_abi.
	* arm-linux-tdep.c (arm_linux_init_abi): Call linux_init_abi.
	* frv-linux-tdep.c: Include linux-tdep.h
	(frv_linux_init_abi): Call linux_init_abi.
	* hppa-linux-tdep.c: Include linux-tdep.h
	(hppa_linux_init_abi): Call linux_init_abi.
	* i386-linux-tdep.c (i386_linux_init_abi): Call linux_init_abi.
	* ia64-linux-tdep.c: Include linux-tdep.h.
	(ia64_linux_init_abi): Call linux_init_abi.
	* m32r-linux-tdep.c: Include linux-tdep.h.
	(m32r_linux_init_abi): Call linux_init_abi.
	* m68klinux-tdep.c: Include linux-tdep.h.
	(m68k_linux_init_abi): Call linux_init_abi.
	* microblaze-linux-tdep.c: Include linux-tdep.h.
	(microblaze_linux_init_abi): Call linux_init_abi.
	* mips-linux-tdep.c: Include linux-tdep.h.
	(mips_linux_init_abi): Call linux_init_abi.
	* mn10300-linux-tdep.c: Include linux-tdep.h.
	(am33_linux_init_osabi): Call linux_init_abi.  Rename the
	'gdbinfo' parameter to 'info'.
	* ppc-linux-tdep.c: Include linux-tdep.h.
	(ppc_linux_init_abi): Call linux_init_abi.
	* sh-linux-tdep.c: Include linux-tdep.h.
	(sh_linux_init_abi): Call linux_init_abi.
	* sparc-linux-tdep.c: Include linux-tdep.h.
	(sparc32_linux_init_abi): Call linux_init_abi.
	* sparc64-linux-tdep.c: Include linux-tdep.h.
	(sparc64_linux_init_abi): Call linux_init_abi.
	* xtensa-linux-tdep.c: Include linux-tdep.h.
	(xtensa_linux_init_abi): Call linux_init_abi.
	* i386-cygwin-tdep.c (i386_windows_core_pid_to_str): New.
	(i386_cygwin_init_abi): Install it as gdbarch_core_pid_to_str
	callback.
2010-08-04 15:27:57 +00:00
gdbadmin 3eb8c159c5 *** empty log message *** 2010-08-04 00:00:33 +00:00
Doug Evans 63cdd22717 Add missing entry to previous checkin.
(bfd_lookup_symbol): Remove unnecessary forward decl.
2010-08-03 22:39:06 +00:00
Doug Evans bc043ef3f9 * breakpoint.c (bpdisp_text): Constify bpdisps.
* solib-svr4.c (solib_break_names): Constify.
	(bkpt_names, main_name_list): Constify.
	(match_main): Constify soname arg.
	(bfd_lookup_symbol): Constify symname arg.
	(enable_break): Constify bkpt_namep.
	* symtab.c (search_symbols): Constify types, types2, types3, types4.
	(symtab_symbol_info): Constify classnames.
2010-08-03 22:35:41 +00:00
Phil Muldoon 585d1eb8a8 2010-08-03 Phil Muldoon <pmuldoon@redhat.com>
* NEWS: Document Python value inferior function calls.
2010-08-03 09:38:16 +00:00
Doug Evans 2de00c64c4 * dwarf2read.c (dwarf_attr_name): Add DW_AT_GNU_odr_signature. 2010-08-03 00:51:29 +00:00
gdbadmin 14b2f517ee *** empty log message *** 2010-08-03 00:00:07 +00:00
Doug Evans 49c3ccf710 * gdb.cp/namespace.exp: When "print ::cOtherFileClassVar" fails
because of an older gcc, change test2
	"print ::C::OtherFileClass::cOtherFileClassVar" from unresolved
	to unsupported.
2010-08-02 23:41:19 +00:00
Kazu Hirata 42c0c4f1c5 * gdb.base/break-always.exp: Do not expect full paths to file
names.
	* gdb.base/commands.exp: Likewise.
2010-08-02 15:07:14 +00:00
gdbadmin 651a8b0448 *** empty log message *** 2010-08-02 00:00:34 +00:00
gdbadmin 16f7fb5408 *** empty log message *** 2010-08-01 00:00:33 +00:00
Paul Pluzhnikov 02d868e86d 2010-07-31 Paul Pluzhnikov <ppluzhnikov@google.com>
* linux-thread-db.c (libthread_db_debug): New variable.
       (thread_db_find_new_threads_silently): Control verbosity with it.
       (try_thread_db_load_1, try_thread_db_load): Likewise.
       (find_new_threads_once): Likewise.
       (_initialize_thread_db): Set/show it.

doc/ChangeLog
2010-07-31  Paul Pluzhnikov  <ppluzhnikov@google.com>

       * gdb.texinfo (Threads): Document 'debug libthread-db'.
2010-07-31 15:34:41 +00:00
Pedro Alves 310444acc2 * Makefile.in (signals_h): New.
(server_h): Depend on it.
	(server.o): Don't depend on $(signals_def).
	(signals.o): Depend on $(signals_def).
2010-07-31 07:58:48 +00:00
Jan Kratochvil a19cae1666 gdb/
* common/signals.c (signals): Move the content to signals.def.
	Include it.  Remove the INDENT comments.

gdb/gdbserver/
	* Makefile.in (signals_def): New.
	(server_h): Append include/gdb/signals.h and signals_def.
	(server.o): Append signals_def.

include/gdb/
	* signals.h (enum target_signal): Move the content to signals.def.
	Include it.
	* signals.def: New file.
2010-07-31 04:17:44 +00:00
gdbadmin e1720182fa *** empty log message *** 2010-07-31 00:00:03 +00:00
Tom Tromey c2bbed2a5a gdb
* Makefile.in (install-only): Install gdb-add-index.
	* gdb-add-index.sh: New file.
gdb/doc
	* gdb.texinfo (Index Files): Mention gdb-add-index.
2010-07-30 20:46:34 +00:00
Doug Evans c98ee71b7c * gdb.cp/temargs.exp: For new tests that require newer gccs,
xfail them when run with older gccs.
2010-07-30 20:12:00 +00:00
Doug Evans fd961404f8 * lib/gdb.exp (build_executable): Forward "c++" option to
get_compiler_info.
2010-07-30 19:59:42 +00:00
Cheng Renquan f32b2f0980 gdb/
* MAINTAINERS: Add myself for write after approval privileges.
2010-07-30 19:11:27 +00:00
Doug Evans 999adef4d9 * gdb.python/py-type.exp (test_template): Mark as xfail tests
"python print ttype.template_argument(1)" and
	"python print isinstance(ttype.template_argument(1), gdb.Value)"
	if using gcc 4.4 or earlier.
2010-07-30 18:46:27 +00:00
Doug Evans d3765805ec * gdb.base/valgrind-db-attach.exp: Use unique test name for
attach-to-debugger handling.
2010-07-30 17:28:07 +00:00
Jan Kratochvil 1276c7599c gdb/
* symfile.c (addr_section_name): New function.
	(addrs_section_compar): Use it.
	(addr_info_make_relative): Use it.  Move variable sect_name into a more
	inner block.  Make ".dynbss" and ".sdynbss" checks more strict.

gdb/testsuite/
	* gdb.base/prelink-lib.c (copyreloc): New initialized variable.
	* gdb.base/prelink.c (copyreloc, bssvar, bssvarp): New variables.
	(main): Use copyreloc.
	* gdb.base/prelink.exp (split debug of executable)
	(.dynbss vs. .bss address shift): New tests.
2010-07-30 16:04:30 +00:00
Tom Tromey 420697bb59 * configure: Rebuild.
* configure.ac: Add missing case for Python 2.7.
2010-07-30 15:59:41 +00:00
Hui Zhu 6c13bbe177 2010-07-30 Hui Zhu <teawater@gmail.com>
* gdb.texinfo (Inferiors and Programs): Update the introduce of
	"detach inferior" and "kill inferior".
2010-07-30 14:32:02 +00:00
gdbadmin 9ff9845ffb *** empty log message *** 2010-07-30 00:00:32 +00:00
Pedro Alves 88caa9b922 * gdb.threads/pthreads.exp (check_backtraces): Consume $gdb_prompt
in gdb_test_multiple.
2010-07-29 23:19:46 +00:00
DJ Delorie d0d995612d * rx-tdep.c (rx_analyze_prologue): Don't require branches to have
conditions.
2010-07-29 17:35:34 +00:00
Pedro Alves 0b29bddec8 * PROBLEMS: Remove mention of all problems. 2010-07-29 14:48:58 +00:00
Pedro Alves c6f2ac4350 * lib/gdb.exp (gdb_init): Set LC_ALL and LANG to C in the
environment.
2010-07-29 14:18:57 +00:00
gdbadmin 67aceb73d6 *** empty log message *** 2010-07-29 00:00:32 +00:00
Pedro Alves 110ed33992 2010-07-28 Pedro Alves <pedro@codesourcery.com>
PR build/11848
	* configure.ac: Check for wresize.
	* configure, config.in: Regenerate.
	* tui/tui-win.c (make_visible_with_new_height): Wrap wresize call
	with HAVE_WRESIZE.
2010-07-28 23:24:57 +00:00
Tom Tromey 326fd672ca gdb
PR python/11060:
	* python/py-type.c (typy_legacy_template_argument): New function,
	extracted from typy_template_argument.
	(typy_template_argument): Use TYPE_TEMPLATE_ARGUMENT.  Return a
	value when needed.
gdb/testsuite
	PR python/11060:
	* gdb.python/py-type.c (Temargs): New template.
	(temvar): New variable.
	* gdb.python/py-type.exp (test_template): New proc.
2010-07-28 20:50:17 +00:00
Tom Tromey 4ac8c4da1d 2010-07-28 Oleg Nesterov <oleg@redhat.com>
* remote.c (readchar): Call pop_target in case of SERIAL_ERROR.
2010-07-28 20:20:26 +00:00
Tom Tromey 053315c213 * dwarf2read.c (dwarf2_const_value_data): Never sign extend. 2010-07-28 20:05:03 +00:00
Pedro Alves 3ce3b1ba31 2010-07-28 Daniel Jacobowitz <dan@codesourcery.com>
gdb/
	* dwarf2read.c (read_subroutine_type): Improve THIS detection,
	handling DW_AT_object_pointer, and workaround GCC PR 43053.

	gdb/testsuite/
	* gdb.cp/member-ptr.exp, gdb.cp/printmethod.exp,
	gdb.dwarf2/member-ptr-forwardref.exp: Adjust.
2010-07-28 19:04:08 +00:00
Tom Tromey 2bb4f988e5 * Makefile.in (HFILES_NO_SRCDIR): Remove link-warning.h. 2010-07-28 18:32:33 +00:00
Joel Brobecker 74232302aa Add missing gettext markup.
gdb/ChangeLog:

        * remote.c (remote_download_tracepoint): Add missing gettext markup.
        * tracepoint.c (parse_static_tracepoint_marker_definition): Likewise.
2010-07-28 18:04:19 +00:00
Joel Brobecker 385d04dc77 [PATCH] breakpoint_re_set fails while connecting to gdbserver.
This is a problem that I noticed on GNU/Linux, when using both GDB
and GDBserver to debug an Ada program.  To reproduce, use any Ada
program, built with debug info ("gnatmake -g ...").

Then start the program with gdbserver:

        % gdbserver :4444 simple_main

And then insert a breakpoint using the name of an Ada function,
followed by connecting to the target server:

        (gdb) b simple.test_simple
        Breakpoint 1 at 0x401f28: file simple.adb, line 16.
        (gdb) tar rem :4444
        Remote debugging using :4444
        Reading symbols from /lib64/ld-linux-x86-64.so.2...
        Reading symbols from /usr/lib/debug/lib/ld-2.11.1.so...done.
        done.
        Loaded symbols for /lib64/ld-linux-x86-64.so.2
!! ->   Error in re-setting breakpoint 1: Can't find member of namespace, class,
!! ->    struct, or union named "simple.test_simple"
!! ->   Hint: try 'simple.test_simple<TAB> or 'simple.test_simple<ESC-?>
!! ->   (Note leading single quote.)
        0x00007f4db3cf2af0 in _start () from /lib64/ld-linux-x86-64.so.2
        Created trace state variable $trace_timestamp for target's variable 1.

The problem is related to the fact that GDB found debug symbols for
ld.so in /usr/lib/debug.  For debugger configured with a prefix that
is different from /usr, one way to force the problem to reproduce is
to use:

        (gdb) set debug-file-directory /usr/lib/debug

(assuming that debug info has been installed at that location).

The problem is that the wrong language is used to parse the breakpoint
location because it gets changed from under us as a side effect of
some of the code that we do in prepration for re-parsing.  In particular,
breakpoint_re_set_one reads:

      set_language (b->language);
      input_radix = b->input_radix;
      s = b->addr_string;

      save_current_space_and_thread ();
      switch_to_program_space_and_thread (b->pspace);

      marker_spec = b->type == bp_static_tracepoint && is_marker_spec (s);
      [if (marker_spec) decode_tracepoint_spec (...) else decode_line_1]

What happens in our case is that debugging information gets found
for ld.so.  As a result, the current_frame language is C whereas it
would have been unknown if we did not have debugging info. And
save_current_space_and_thread() implicitly causes the current frame
to be selected, which changes the language automatically if the new
language is not uknown and the the language mode is auto.

The fix, until all parsing routines (including decode_line_1) get upgraded
to take a language, is to select the breakpoint language as late as possible.
In this case, we don't need to do that until we actually try to parse
the breakpoint addr_string.

gdb/ChangeLog:

        * breakpoint.c (breakpoint_re_set_one): Move call to set_language
        down, just before the block that parse the breakpoint addr_string.
2010-07-28 17:57:54 +00:00
Tom Tromey 34eaf5422c gdb
PR c++/9946:
	* symfile.c (reread_symbols): Clear template_symbols.
	* symtab.h (struct symbol) <is_cplus_template_function>: New
	field.
	(SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): New macro.
	(struct template_symbol): New.
	* symtab.c (lookup_symbol_aux_local): Use
	cp_lookup_symbol_imports_or_template.
	* objfiles.h (struct objfile) <template_symbols>: New field.
	* objfiles.c (relocate_one_symbol): New function.
	(objfile_relocate1): Use it.  Relocate isolated symbols.
	* gdbtypes.h (struct cplus_struct_type) <n_template_arguments,
	template_arguments>: New fields.
	(TYPE_N_TEMPLATE_ARGUMENTS): New macro.
	(TYPE_TEMPLATE_ARGUMENTS): Likewise.
	(TYPE_TEMPLATE_ARGUMENT): Likewise.
	(lookup_typename): Update.
	* gdbtypes.c (lookup_typename): Constify "block" argument.
	* dwarf2read.c: Include vec.h.
	(symbolp): New typedef.
	(read_func_scope): Read template arguments.  Allocate a
	template_symbol when needed.
	(read_structure_type): Read template arguments.
	(new_symbol_full): New function, from new_symbol.  Handle
	DW_TAG_template_type_param and DW_TAG_template_value_param.
	(new_symbol): Rewrite as wrapper.
	* cp-support.h (cp_lookup_symbol_imports_or_template): Declare.
	* cp-namespace.c: Include language.h.
	(search_symbol_list): New function.
	(cp_lookup_symbol_imports_or_template): Likewise.
gdb/testsuite
	PR c++/9946:
	* gdb.cp/temargs.exp: New file.
	* gdb.cp/temargs.cc: New file.
2010-07-28 16:23:59 +00:00
Pedro Alves d27b3be477 2010-07-28 Balazs Kezes <rlblaster@gmail.com>
* tui/tui-win.c (make_visible_with_new_height): Resize and move
	the command window to the new size and position.
2010-07-28 12:08:19 +00:00
Pedro Alves a782f43e86 tabs vs spaces 2010-07-28 12:02:36 +00:00
Pedro Alves 0036e657cb * tui/tui-win.c (tui_resize_all): Update the locator's origin's
coordinates.
2010-07-28 12:01:22 +00:00
Pedro Alves 369003559a 2010-07-28 Balazs Kezes <rlblaster@gmail.com>
* tui/tui-io.c (tui_handle_resize_during_io): Call tui_resize_all
	after a detecting a resize.
        * tui/tui-win.c (tui_resize_all): Remove tui_set_win_resized_to
	call.
2010-07-28 11:56:30 +00:00
Pedro Alves db5e03ae67 * configure.ac: Check for resize_term.
* configure, config.in: Regenerate.
2010-07-28 11:48:23 +00:00
Joel Brobecker b71fff680d misordered names in Write After Approval list
This patch moves a couple of write-after-approval names up to keep
the list in alphabetical order.

2010-07-27  Joel Brobecker  <brobecker@adacore.com>

	* MAINTAINERS (Write After Approval): Reorder a couple of entries.
2010-07-28 04:09:04 +00:00
Joel Brobecker 3422f66621 Minor (space) reformatting. 2010-07-28 04:04:17 +00:00
gdbadmin 9a47dfdc32 *** empty log message *** 2010-07-28 00:00:33 +00:00
Jan Kratochvil d41b819ec2 gdb/testsuite/
* gdb.base/help.exp (help disassemble): Update the content.
2010-07-27 23:18:38 +00:00
Pedro Alves 9b1c24c8f7 * dwarf2read.c (read_string): Rename to ...
(read_direct_string): ... this.
	(skip_one_die, read_attribute_value, dwarf_decode_line_header)
	(dwarf_decode_lines, dwarf_decode_macros): Adjust.
2010-07-27 22:26:27 +00:00
Jan Kratochvil 00390b8433 gdb/
* linux-nat.c (linux_nat_lp_status_is_event): New function.
	(count_events_callback, select_event_lwp_callback)
	(cancel_breakpoints_callback, linux_nat_wait_1): Use it.
2010-07-27 21:22:09 +00:00
Jan Kratochvil 26ab7092a2 gdb/
* ia64-linux-nat.c (ia64_linux_status_is_event): New function.
	(_initialize_ia64_linux_nat): Install it.
	* linux-nat.c (sigtrap_is_event, linux_nat_status_is_event)
	(linux_nat_set_status_is_event): New.
	(stop_wait_callback, count_events_callback, select_event_lwp_callback)
	cancel_breakpoints_callback, linux_nat_filter_event)
	(linux_nat_wait_1): Use linux_nat_status_is_event.
	* linux-nat.h (linux_nat_set_status_is_event): New prototype.

gdb/testsuite/
	* gdb.threads/ia64-sigill.exp: New file.
	* gdb.threads/ia64-sigill.c: New file.
2010-07-27 20:51:40 +00:00
Tom Tromey 283e6a52fc * NEWS: Mention labels, .gdb_index. 2010-07-27 20:44:33 +00:00
Cheng Renquan 53a71c0681 * cli/cli-cmds.c (disassemble_command): Add support of disassemble
"start,+length" form of arguments.
2010-07-27 20:33:40 +00:00
Jan Kratochvil c63a1f8688 gdb/
* top.c (input_from_terminal_p): Return 0 on BATCH_FLAG.
	* utils.c (defaulted_query): Do not explicitly check for BATCH_FLAG.
	(fputs_maybe_filtered): Do not do filtering also on
	! INPUT_FROM_TERMINAL_P.
2010-07-27 19:11:51 +00:00
Doug Evans 872e696d08 Fix file name mentioned in this entry:
2010-07-27  Ken Werner  <ken.werner@de.ibm.com>

	* dwarf2read.c (dwarf2_read_index): Initialize the types_list and
	types_list_elements variables.
2010-07-27 18:13:25 +00:00
Tom Tromey 5283e9e1e3 * gdb.opt/inline-cmds.c (ATTR): New define.
(func1): Use it.
	(func2): Likewise.
	(func3): Likewise.
	(outer_inline1): Likewise.
	(outer_inline2): Likewise.
	* gdb.opt/inline-bt.c (ATTR): New define.
	(func1): Use it.
	(func2): Likewise.
	* gdb.opt/inline-locals.c (ATTR): New define.
	(func1): Use it.
	(func2): Likewise.
2010-07-27 18:08:48 +00:00
Tom Tromey e992ef7345 * gdb.stabs/gdb11479.c (hack): New function.
(test): Use it.
	(test2): Use it.
	* gdb.python/py-inferior.c (int8_search_buf, int16_search_buf)
	(int32_search_buf, int64_search_buf): No longer static.
	(x): Remove.
	* gdb.base/relocate.c (hack): New function.
2010-07-27 16:58:22 +00:00
Joel Brobecker abebb8b041 ARI fix (trailing newline in warning message).
* dwarf2read.c (dw2_find_pc_sect_symtab): Remove trailing newline
        in warning message.
2010-07-27 16:16:32 +00:00
Phil Muldoon 5374244e7a 2010-07-27 Phil Muldoon <pmuldoon@redhat.com>
* python/py-value.c (valpy_call): New Function.

2010-07-27  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-value.exp (test_inferior_function_call): New function.
	* gdb.python/py-value.c (func1): New function.
	(func2): Likewise.

2010-07-27  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Values From Inferior): Add value inferior function
	call description.
2010-07-27 12:40:42 +00:00
Ken Werner ac0b195c01 * valops.c (dwarf2_read_index): Initialize the types_list and types_list_elements variables. 2010-07-27 07:57:49 +00:00
gdbadmin 7bd8aaad48 *** empty log message *** 2010-07-27 00:00:34 +00:00
Tom Tromey 09d8bd0068 * dwarf2loc.c (locexpr_describe_location_piece): Also recognize
TLS with DW_OP_const4u or DW_OP_const8u.
2010-07-26 20:25:00 +00:00
Thiago Jung Bauermann 9fe70b4fe2 * ppc-linux-nat.c (store_vsx_register): Use PTRACE_GETVSXREGS to get
VSX registers contents.
2010-07-26 17:06:26 +00:00
Corinna Vinschen a99aee835b * gdb.asm/xstormy16.inc (gdbasm_startup): Fix beginning of stack so
as not to clash with .data section.
2010-07-26 12:31:11 +00:00
Jerome Guitton a04ba9855e gdb/testsuite/
* gdb.base/code_elim.exp: New file.
	* gdb.base/code_elim1.c: New file.
	* gdb.base/code_elim2.c: New file.
2010-07-26 09:38:50 +00:00
Jerome Guitton caac4577e5 gdb/
* dwarf2read.c (add_partial_symbol): Do not add a global variable if
	its adress is null. Add comment to explain why.
	(new_symbol): Ditto.
2010-07-26 09:30:00 +00:00
gdbadmin ad0d0dfb98 *** empty log message *** 2010-07-26 00:00:03 +00:00
Jan Kratochvil 30d5032895 gdb/gdbserver/
* server.c (handle_target_event): Use target_signal_to_host for
	resume_info.sig initialization.
	* target.h (struct thread_resume) <sig>: New comment.
2010-07-25 10:15:54 +00:00
Jan Kratochvil 857d11d04f gdb/
* linux-nat.c (linux_nat_do_thread_registers): Convert STOP_SIGNAL to
	the host signal first.
2010-07-25 09:31:12 +00:00
gdbadmin 45b143c8af *** empty log message *** 2010-07-25 00:00:03 +00:00
gdbadmin 295b7e0333 *** empty log message *** 2010-07-24 00:00:02 +00:00
Tom Tromey 1fd400ffc4 * dwarf2read.c (struct dwarf2_per_objfile) <n_type_comp_units,
type_comp_units>: New fields.
	(dw2_get_cu): New function.
	(create_cus_from_index): Remove unused argument.
	(create_signatured_type_hash_from_index): New function.
	(create_addrmap_from_index): Update.
	(dwarf2_read_index): Handle version 2.
	(dw2_find_last_source_symtab, dw2_forget_cached_source_info)
	(dw2_lookup_symtab, dw2_do_expand_symtabs_matching)
	(dw2_print_stats, dw2_expand_all_symtabs)
	(dw2_expand_symtabs_with_filename, dw2_find_symbol_file)
	(dw2_expand_symtabs_matching, dw2_map_symbol_filenames): Update.
	(dwarf2_initialize_objfile): Call create_debug_types_hash_table.
	(allocate_signatured_type_hash_table): New function.
	(add_signatured_type_cu_to_list): Likewise.
	(create_debug_types_hash_table): Use them.  Set type_comp_units.
	(read_signatured_type): Ensure section data is available.
	(add_address_entry): Don't record empty ranges.
	(struct signatured_type_index_data): New.
	(write_one_signatured_type): New function.
	(write_psymtabs_to_index): Write type CUs.
	(save_gdb_index_command): Update comment.
	(process_type_comp_unit): Move inititalization of
	from_debug_types...
	(create_debug_types_hash_table): ... here.
2010-07-23 22:15:13 +00:00
Jan Kratochvil 3a674486ec gdb/
* gdb_gcore.sh (tmpfile): Remove the variable, its initialization,
	cleanup and generating of gdb script to it.
	(gdb): Use redirection from /dev/null.  Use --nx.  Turn off pagination
	and terminal size.  Convert $tmpfile to a series of -ex-es.
2010-07-23 21:10:55 +00:00
Keith Seitz 54ec275af0 * symtab.c (basic_lookup_transparent_type): Call pre-expand
hook for STATIC_BLOCK types, too.
2010-07-23 17:42:13 +00:00
Keith Seitz 8fd447e6d3 * dwarf2read.c: Remove unused typedef dwarf2_cu_per_cu_data_ptr
and vector definition.
2010-07-23 14:43:33 +00:00
Jan Kratochvil 25b72ddee0 gdb/
* linux-nat.c (cancel_breakpoint): Remove unused forward declaration.
2010-07-23 12:19:00 +00:00
gdbadmin 8dd40a7aaa *** empty log message *** 2010-07-23 00:00:04 +00:00
Jan Kratochvil 96d19272e8 gdb/
* dwarf2read.c: Include completer.h.
	(save_gdb_index_command): Use matching usage command name.
	(_initialize_dwarf2_read): New variable c, initialize it by add_cmd.
	Set filename_completer for it.
2010-07-22 16:24:38 +00:00
Tom Tromey ca1f3406ef * dwarf2read.c (create_debug_types_hash_table): Set objfile on
type signature's per-CU data.
2010-07-22 15:53:48 +00:00
Pedro Alves ba25b92104 * NEWS: Mention target reported shared libraries support by
default.
2010-07-22 10:52:02 +00:00
gdbadmin 5bc13057e7 *** empty log message *** 2010-07-22 00:00:03 +00:00
Pedro Alves 23bd0f7c5e gdb/
2010-07-21  Pedro Alves  <pedro@codesourcery.com>

	PR symtab/11827

	Revert:
	2010-05-21  Pierre Muller  <muller@ics.u-strasbg.fr>
	* dwarf2read.c (process_die): Also allow DW_TAG_const_type
	and DW_TAG_volatile_type.
	(new_symbol): Likewise.

gdb/testsuite/
2010-07-21  Pedro Alves  <pedro@codesourcery.com>

	PR symtab/11827

	* gdb.base/printcmds.c (enum some_volatile_enum): New enum.
	(some_volatile_enum): New variable.
	* gdb.base/printcmds.exp (test_print_enums): New.
	<top level>: Call it.
2010-07-21 18:08:27 +00:00
Sami Wagiaalla 883df6ddea Corrected pre-overload-resolution function evaluation.
2010-07-21  Sami Wagiaalla  <swagiaal@redhat.com>

	* eval.c (evaluate_subexp_standard): Disabled evaluation of C++
	function symbols before overload resolution.

2010-07-21  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/fpointer.cc: New test.
	* gdb.cp/fpointer.exp: New test.
2010-07-21 14:59:05 +00:00
Pedro Alves 269b11a298 * breakpoint.c (bptype_string): New, abstracted out from
print_one_breakpoint_location.
	(print_one_breakpoint_location): Adjust.
	(breakpoint_1): Adjust the type column width dynamically.
2010-07-21 11:25:53 +00:00
gdbadmin b806f530e2 *** empty log message *** 2010-07-21 00:00:33 +00:00
Jan Kratochvil 569b05a560 gdb/
* symfile.c (find_separate_debug_file_by_debuglink): Remove
	a gdb_assert call, new comment.

gdb/testsuite/
	* gdb.base/solib-nodir.exp: New file.
	* lib/gdb.exp (runto): New case for a GDB internal error.
2010-07-20 22:19:07 +00:00
Jan Kratochvil 51d7d80300 gdb/testsuite/
* gdb.base/charset-malloc.c: New file.
	* gdb.base/charset.c (malloc_stub): New prototype.
	(main): Call it instead of malloc itself.
	* gdb.base/charset.exp: Use only prepare_for_testing.
	(binfile): Remove the variable.
2010-07-20 22:06:59 +00:00
Ozkan Sezer c6f46ca0a4 * gdb/gdbserver/server.c (handle_query): strcpy() the returned string from
paddress() instead of sprintf().
2010-07-20 18:20:27 +00:00
Ozkan Sezer 5c3216e2a7 * gdb/gdbserver/utils.c (paddress): Return phex_nz(). 2010-07-20 18:10:52 +00:00
Jan Kratochvil ad34eb2f7c gdb/
* linux-nat.c (linux_handle_extended_wait): Handle case when
	event == PTRACE_EVENT_CLONE && stopping && WSTOPSIG (status) != SIGSTOP.
2010-07-20 12:54:57 +00:00
Jan Kratochvil 33355866db gdb/
Code cleanup.
	* linux-nat.c (linux_nat_wait_1): Reset STATUS after calling
	linux_nat_wait_1.  Use always LP->STATUS afterwards.
2010-07-20 12:33:30 +00:00
Hui Zhu 26590820c2 2010-07-20 Hui Zhu <teawater@gmail.com>
* inf-ptrace.c (inf_ptrace_create_inferior): Initialize back_to.
	(inf_ptrace_attach): Ditto.
2010-07-20 05:58:53 +00:00
gdbadmin fcdc9c861b *** empty log message *** 2010-07-20 00:00:33 +00:00
Jan Kratochvil 8ea5bce590 gdb/doc/
* gdb.texinfo (Active Targets): Fix wrong comma placement.
2010-07-19 18:11:31 +00:00
Jan Kratochvil c0edd9edad gdb/
Make core files the process_stratum.
	* corefile.c (core_target): New variable.
	(core_file_command): Remove variable t, use core_target.
	* corelow.c (core_ops): Make it static.
	(init_core_ops): Change to process_stratum.  Initialize CORE_TARGET.
	* defs.h (make_cleanup_unpush_target): New prototype.
	* gdbarch.h: Regenerate.
	* gdbarch.sh (core_pid_to_str): Remove core_stratum from its comment.
	* gdbcore.h (core_target): New declaration.
	* inf-ptrace.c (inf_ptrace_create_inferior, inf_ptrace_attach): New
	variables ops_already_pushed and back_to.  Use push_target,
	make_cleanup_unpush_target and discard_cleanups calls.
	* record.c (record_open): Replace core_stratum by a core_bfd check.
	* target.c (target_is_pushed): New function.
	(find_core_target): Remove.
	* target.h (enum strata) <core_stratum>: Remove.
	(target_is_pushed): New declaration.
	(find_core_target): Remove declaration.
	* tracepoint.c (init_tfile_ops) <to_stratum>: Remove comment.
	* utils.c (do_unpush_target, make_cleanup_unpush_target): New functions.

gdb/doc/
	Make core files the process_stratum.
	* gdb.texinfo (Active Targets): Remove core_stratum.  Include
	record_stratum example.

gdb/testsuite/
	Make core files the process_stratum.
	* gdb.base/corefile.exp (run: load core again)
	(run: sanity check we see the core file, run: with core)
	(run: core file is cleared, attach: load core again)
	(attach: sanity check we see the core file, attach: with core)
	(attach: core file is cleared): New tests.
	* gdb.base/coremaker.c (main): New parameters.  Implement "sleep" argv.
2010-07-19 17:51:25 +00:00
Hui Zhu f02253f190 2010-07-19 Hui Zhu <teawater@gmail.com>
* breakpoint.c (single_step_breakpoints_inserted): New
	function.
	* breakpoint.h (single_step_breakpoints_inserted): Extern.
	* infrun.c (maybe_software_singlestep): Add check code.
	* record.c (record_resume): Add code for software single step.
	(record_wait): Ditto.
2010-07-19 07:55:43 +00:00
gdbadmin bd0cd65df4 *** empty log message *** 2010-07-19 00:00:04 +00:00
Jan Kratochvil 78768c4ae4 gdb/
* linux-nat.c (linux_handle_extended_wait): Move variable new_lp into
	a more inner block.  Remove its unused declaration initializer.
2010-07-18 21:21:53 +00:00
gdbadmin a881f11cf9 *** empty log message *** 2010-07-18 00:00:33 +00:00
gdbadmin 72f4afc7a3 *** empty log message *** 2010-07-17 00:00:03 +00:00
Thiago Jung Bauermann 431e49aac1 * NEWS: Mention support for the new ptrace interface and hardware
accelerated watchpoint conditions on powerpc-linux.
2010-07-16 23:19:37 +00:00
Ozkan Sezer bd91e7ae05 * target.c (debug_to_insert_breakpoint): Instead of casting to unsigned
long and %ld, use core_addr_to_string() and %s to print CORE_ADDR vars
and host_address_to_string() and %s for pointers.
(debug_to_remove_breakpoint): Likewise.
(debug_to_region_ok_for_hw_watchpoint): Likewise.
(debug_to_can_accel_watchpoint_condition): Likewise.
(debug_to_stopped_data_address): Likewise.
(debug_to_watchpoint_addr_within_range): Likewise.
(debug_to_insert_hw_breakpoint): Likewise.
(debug_to_remove_hw_breakpoint): Likewise.
(debug_to_insert_watchpoint): Likewise.
(debug_to_remove_watchpoint): Likewise.
2010-07-16 20:04:41 +00:00
Sami Wagiaalla 29df156df4 Use allocated cplus_specific for cplus symbols.
2010-07-16  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.h (symbol_set_demangled_name): Now takes an optional objfile*
	argument.
	(cplus_specific): New struct.
	* symtab.c (symbol_set_demangled_name): Updated.
	Use cplus_specific for cplus symbols.
	(symbol_get_demangled_name): Retrive the name from the cplus_specific
	struct for cplus symbols.
	(symbol_init_language_specific): Set cplus_specific for cplus symbols.
	(symbol_set_names): Pass objfile to symbol_set_demangled_name.
	* symtab.c (symbol_init_cplus_specific): New function.
2010-07-16 19:23:56 +00:00
Sami Wagiaalla b250c185b3 Use setter and getter for demangled_name.
2010-07-16  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.h (symbol_set_demangled_name): New function.
	(symbol_get_demangled_name): New function.
	* symtab.c (symbol_set_demangled_name): New function.
	(symbol_get_demangled_name): New function.
	(symbol_init_language_specific): Use demangled_name setter and getter.
	(symbol_set_names): Ditto.
	(symbol_natural_name): Ditto.
	(symbol_demangled_name): Ditto.
	* dwarf2read.c (new_symbol): Ditto.
2010-07-16 19:00:56 +00:00
Sami Wagiaalla afa1672571 Rename cplus_specific mangled_lang.
2010-07-16  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.h: Renamed cplus_specific to mangled_lang.
	* symtab.c (symbol_init_language_specific): Updated.
	(symbol_set_names): Updated.
	(symbol_natural_name): Updated.
	(symbol_demangled_name): Updated.
	* ada-lang.c (ada_decode_symbol): Updated.
	* dwarf2read.c (new_symbol): Updated.
2010-07-16 18:39:10 +00:00
gdbadmin ad0385697b *** empty log message *** 2010-07-16 00:00:33 +00:00
gdbadmin 8942efd7f0 *** empty log message *** 2010-07-15 00:00:33 +00:00
Ken Werner 3cbaedfff7 gdb/ChangeLog:* valops.c (value_assign): Do not call to value_coerce_to_target.(value_must_coerce_to_target): Return 0 in case of TYPE_VECTOR.gdb/testsuite/ChangeLog:* gdb.arch/altivec-abi.exp: New tests. 2010-07-14 14:54:58 +00:00
Ken Werner c932f1bef2 * MAINTAINERS: Add myself for write after approval privileges. 2010-07-14 14:30:35 +00:00
Tom Tromey 91158a569d 2010-07-13 Emmanuel Thomé <Emmanuel.Thome@gmail.com>
* c-valprint.c (c_val_print): Add embedded_offset to address in
	call to val_print_array_elements.

2010-07-13  Tom Tromey  <tromey@redhat.com>

	* gdb.python/py-prettyprint.c (struct arraystruct): New struct.
	(main): Use it.
	* gdb.python/py-prettyprint.exp (run_lang_tests): Add test.
2010-07-14 14:13:55 +00:00
gdbadmin cae36aed43 *** empty log message *** 2010-07-14 00:00:03 +00:00
Tom Tromey b3b272e108 * dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'. 2010-07-13 22:02:05 +00:00
Tom Tromey bb3fa9d02e * dwarf2read.c (dwarf2_per_cu_text_offset): Fix reference to
objfile.
2010-07-13 21:06:48 +00:00
Tom Tromey dd78685836 * symfile.c (set_initial_language): Update.
(deduce_language_from_filename): Argument type now const.
	* symtab.h (find_main_filename): Update.
	(deduce_language_from_filename): Update.
	* symtab.c (find_main_filename): Make result const.
	* dwarf2read.c (dw2_find_symbol_file): Change return type.
	* psymtab.c (find_symbol_file_from_partial): Change return type.
	* symfile.h (struct quick_symbol_functions) <find_symbol_file>:
	Make result const.
2010-07-13 20:52:52 +00:00
Tom Tromey 9291a0cd80 gdb
* breakpoint.c (save_cmdlist): No longer static.
	* gdbcmd.h (save_cmdlist): Declare.
	* symfile.c (symbol_file_add_with_addrs_or_offsets): Set
	OBJF_READNOW on objfile if readnow_symbol_files.
	* elfread.c (elf_symfile_read): Use dwarf2_initialize_objfile.
	(elf_sym_fns_gdb_index): New global.
	* dwarf2read.c: Include exceptions.h.
	(offset_type): New.
	(struct mapped_index): New.
	(dwarf2_per_cu_data_ptr): New typedef.
	(struct dwarf2_per_objfile) <using_index, index_table, gdb_index>:
	New fields.
	(GDB_INDEX_SECTION): New define.
	(struct dwarf2_per_cu_quick_data): New.
	(struct dwarf2_per_cu_data) <objfile>: New field.
	<psymtab>: Removed.
	<v>: New field.
	(byte_swap): New function.
	(MAYBE_SWAP): New macro.
	(INDEX_SUFFIX): New macro.
	(dw2_do_instantiate_symtab): New function.
	(dw2_instantiate_symtab): Likewise.
	(create_cus_from_index): Likewise.
	(create_addrmap_from_index): Likewise.
	(mapped_index_string_hash): Likewise.
	(find_slot_in_mapped_hash): Likewise.
	(dwarf2_read_index): Likewise.
	(dw2_setup): Likewise.
	(dw2_require_line_header): Likewise.
	(dw2_require_full_path): Likewise.
	(dw2_find_last_source_symtab): Likewise.
	(dw2_forget_cached_source_info): Likewise.
	(dw2_lookup_symtab): Likewise.
	(dw2_lookup_symbol): Likewise.
	(dw2_do_expand_symtabs_matching): Likewise.
	(dw2_pre_expand_symtabs_matching): Likewise.
	(dw2_print_stats): Likewise.
	(dw2_dump): Likewise.
	(dw2_relocate): Likewise.
	(dw2_expand_symtabs_for_function): Likewise.
	(dw2_expand_all_symtabs): Likewise.
	(dw2_expand_symtabs_with_filename): Likewise.
	(dw2_find_symbol_file): Likewise.
	(dw2_map_ada_symtabs): Likewise.
	(dw2_expand_symtabs_matching): Likewise.
	(dw2_find_pc_sect_symtab): Likewise.
	(dw2_map_symbol_names): Likewise.
	(dw2_map_symbol_filenames): Likewise.
	(dw2_has_symbols): Likewise.
	(dwarf2_gdb_index_functions): New global.
	(dwarf2_initialize_objfile): New function.
	(process_psymtab_comp_unit): Update.
	(add_partial_subprogram): Likewise.
	(dwarf2_psymtab_to_symtab): Likewise.
	(psymtab_to_symtab_1): Use dw2_do_instantiate_symtab.
	(process_full_comp_unit): Update.
	(find_file_and_directory): New function.
	(read_file_scope): Use find_file_and_directory.
	(dwarf2_per_cu_objfile): Update.
	(dwarf2_per_cu_addr_size): Update.
	(dwarf2_per_cu_offset_size): Update.
	(dwarf2_free_objfile): Free the index, if needed.
	(dwarf2_per_objfile_free): Unmap the index, if needed.
	(struct strtab_entry): New.
	(hash_strtab_entry): New function.
	(eq_strtab_entry): Likewise.
	(create_strtab): Likewise.
	(add_string): Likewise.
	(struct symtab_index_entry): New.
	(struct mapped_symtab): New.
	(hash_symtab_entry): New function.
	(eq_symtab_entry): Likewise.
	(delete_symtab_entry): Likewise.
	(create_index_table): Likewise.
	(create_mapped_symtab): Likewise.
	(cleanup_mapped_symtab): Likewise.
	(find_slot): Likewise.
	(hash_expand): Likewise.
	(add_index_entry): Likewise.
	(add_indices_to_cpool): Likewise.
	(write_hash_table): Likewise.
	(add_address_entry): Likewise.
	(write_psymbols): Likewise.
	(write_obstack): Likewise.
	(unlink_if_set): Likewise.
	(write_psymtabs_to_index): Likewise.
	(save_gdb_index_command): Likewise.
	(_initialize_dwarf2_read): Install "save gdb-index"
	command.
	(create_all_comp_units): Initialize 'objfile' field of CU.
	(dwarf2_locate_sections): Check for .gdb_index.
	* psymtab.h (dwarf2_gdb_index_functions): Declare.
	* symfile.h (dwarf2_initialize_objfile): Declare.
gdb/doc
	* gdb.texinfo (Index Files): New node.
2010-07-13 20:51:34 +00:00
Tom Tromey 58b6ab1339 * symtab.c (lookup_symbol_aux_symtabs): Call pre-expand hook.
(basic_lookup_transparent_type): Likewise.
	* symfile.h (struct quick_symbol_functions)
	<pre_expand_symtabs_matching>: New field.
	* psymtab.c (pre_expand_symtabs_matching_psymtabs): New function.
	(psym_functions): Update.
2010-07-13 20:49:26 +00:00
Tom Tromey f5011d116d * gdb.texinfo (GDB/MI Variable Objects): Remove extra 'for'. 2010-07-13 20:32:43 +00:00
Tom Tromey 0f5238edfd gdb
PR breakpoints/8357:
	* symtab.h (domain_enum_tag) <LABEL_DOMAIN>: Update comment.
	* linespec.c (decode_line_1): Update comment.  Call decode_label.
	(decode_label): New function.
	(symbol_found): Handle LOC_LABEL.
	* dwarf2read.c (new_symbol) <DW_TAG_label>: Set symbol's type and
	domain.  Call add_symbol_to_list.
gdb/doc
	* gdb.texinfo (Specify Location): Document labels.
gdb/testsuite
	* gdb.base/label.exp: New file.
	* gdb.base/label.c: New file.
2010-07-13 20:07:44 +00:00
Tom Tromey 9aa1f1e339 * dwarf2loc.h (dwarf2_per_cu_text_offset): Declare.
* dwarf2loc.c (find_location_expression): Use
	dwarf2_per_cu_text_offset.
	(dwarf2_evaluate_loc_desc): Likewise.
	(dwarf2_loc_desc_needs_frame): Likewise.
	(compile_dwarf_to_ax): Likewise.
	(loclist_describe_location): Likewise.
	* dwarf2read.c (dwarf2_per_cu_text_offset): New function.
	(dwarf2_per_cu_objfile): Update comment.
2010-07-13 15:09:03 +00:00
gdbadmin 2ef36331d2 *** empty log message *** 2010-07-13 00:00:33 +00:00
H.J. Lu add265ae41 Add is_ilp32_target/is_lp64_target.
2010-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* lib/gdb.exp (is_ilp32_target): New.
	(is_lp64_target): Likewise.

	* gdb.arch/amd64-byte.exp: Use is_lp64_target to check 64bit
	target.
	* gdb.arch/amd64-disp-step.exp: Likewise.
	* gdb.arch/amd64-dword.exp: Likewise.
	* gdb.arch/amd64-i386-address.exp: Likewise.
	* gdb.arch/amd64-word.exp: Likewise.

	* gdb.arch/i386-avx.exp: Use is_ilp32_target to check for 32bit
	target.
	* gdb.arch/i386-bp_permanent.exp: Likewise.
	* gdb.arch/i386-byte.exp: Likewise.
	* gdb.arch/i386-disp-step.exp: Likewise.
	* gdb.arch/i386-gnu-cfi.exp: Likewise.
	* gdb.arch/i386-prologue.exp: Likewise.
	* gdb.arch/i386-size-overlap.exp: Likewise.
	* gdb.arch/i386-size.exp: Likewise.
	* gdb.arch/i386-sse.exp: Likewise.
	* gdb.arch/i386-unwind.exp: Likewise.
	* gdb.arch/i386-word.exp: Likewise.

	* gdb.arch/ppc64-atomic-inst.exp: Use is_lp64_target to execute
	test only when building 64-bit executables.  Do not hard-code
	-m64 option.
2010-07-12 17:33:15 +00:00
Jan Kratochvil 953ac07ed7 gdb/
* dwarf2read.c (read_subrange_type): Call read_subrange_type.
	* p-lang.c (pascal_printstr): Likewise.
2010-07-12 17:07:11 +00:00
gdbadmin c0e7d30b1e *** empty log message *** 2010-07-12 00:00:33 +00:00
gdbadmin a2f028ec35 *** empty log message *** 2010-07-11 00:00:33 +00:00
gdbadmin 73b86bec9f *** empty log message *** 2010-07-10 00:00:03 +00:00
Tom Tromey f04e4012c7 * python/py-prettyprint.c (gdbpy_get_display_hint): Don't use
'hint' if it is NULL.
2010-07-09 20:29:56 +00:00
Hui Zhu f4dfd9c05c 2010-07-04 Hui Zhu <teawater@gmail.com>
* source.c (print_source_lines_base): Add check for noprint.
2010-07-09 02:39:58 +00:00
gdbadmin 2ee2fea804 *** empty log message *** 2010-07-09 00:00:34 +00:00
Joel Brobecker 7e6e39e562 Resync python-config.py with Python-2.7 version.
This is just a copy of the Python 2.7 version of python-config.py.
Tested with versions 2.5 and 2.6.  It's nearly identical to the
previous version, except it's written in a more pythonic way,
so it should be fine for 2.4 as well.

gdb/ChangeLog:

        * python/python-config.py: Resync with Python 2.7 version of this
        script.
2010-07-08 22:12:44 +00:00
Joel Brobecker 76b8507d09 Fix typo in NEWS file (introduced in previous commit).
gdb/ChangeLog:

        * NEWS: Fix typo in section name (s/GDB 7.1/GDB 7.2).
2010-07-08 15:41:56 +00:00
gdbadmin 715036dc99 *** empty log message *** 2010-07-08 00:00:02 +00:00
Doug Evans 2dfb8c1771 * lib/gdb.exp (gdb_test_list_exact): New function.
* gdb.base/default.exp (show convenience): Call it, add tests for
	$_sdata = void, $_thread = 0.
2010-07-07 18:49:51 +00:00
Joel Brobecker 797054e63d * NEWS: Create a new section for the next release branch.
Rename the section of the current branch, now that it has
        been cut.
2010-07-07 17:52:37 +00:00
gdbadmin c80befee39 Record GDB 7.2 branch creation. Bump version number to 7.2.50.20100707-cvs. 2010-07-07 17:34:43 +00:00
Tom Tromey ac56253dde * dwarf2read.c (dwarf2_const_value) <DW_form_addr>: Create a
LOC_COMPUTED symbol.
	* dwarf2loc.c (dwarf2_evaluate_loc_desc): Set new field.
	(dwarf2_loc_desc_needs_frame): Likewise.
	(compile_dwarf_to_ax) <DW_OP_addr>: Use offset.
	* dwarf2expr.h (struct dwarf_expr_context) <offset>: New field.
	* dwarf2expr.c (execute_stack_op) <DW_OP_addr>: Use offset.
	* dwarf2-frame.c (execute_stack_op): Set 'offset' field.  Add
	'offset' argument.
	(struct dwarf2_frame_cache) <text_offset>: New field.
	(dwarf2_frame_cache): Set new field.
	(dwarf2_frame_prev_register): Update.
	(dwarf2_frame_sniffer): Update.
	(dwarf2_frame_base_sniffer): Update.
	(dwarf2_frame_find_fde): Add 'out_offset' argument.
2010-07-07 17:26:38 +00:00
Thiago Jung Bauermann 0cf6dd1543 2010-07-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	Support for hw accelerated condition watchpoints in booke powerpc.

	* breakpoint.c (fetch_watchpoint_value): Rename to fetch_subexp_value
	and move to eval.c.  Change callers.
	(insert_bp_location): Pass watchpoint condition in
	target_insert_watchpoint.
	(remove_breakpoint_1) Pass watchpoint condition in
	target_remove_watchpoint.
	(watchpoint_locations_match): Call
	target_can_accel_watchpoint_condition.
	* eval.c: Include wrapper.h.
	(fetch_subexp_value): Moved from breakpoint.c.
	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint):
	Formatting fix.
	(can_use_watchpoint_cond_accel): New function.
	(calculate_dvc): Likewise.
	(num_memory_accesses): Likewise.
	(check_condition): Likewise.
	(ppc_linux_can_accel_watchpoint_condition): Likewise
	(ppc_linux_insert_watchpoint): Call can_use_watchpoint_cond_accel,
	check_condition and calculate_dvc.
	(ppc_linux_remove_watchpoint): Likewise.
	(_initialize_ppc_linux_nat): Set to_can_accel_watchpoint_condition to
	ppc_linux_can_accel_watchpoint_condition
	* target.c (debug_to_insert_watchpoint): Add argument for watchpoint
	condition.
	(debug_to_remove_watchpoint): Likewise.
	(debug_to_can_accel_watchpoint_condition): New function.
	(update_current_target): Set to_can_accel_watchpoint_condition.
	(setup_target_debug): Set to_can_accel_watchpoint_condition.
	* target.h: Add opaque declaration for struct expression.
	(struct target_ops) <to_insert_watchpoint>,
	<to_remove_watchpoint>: Add new arguments to pass the watchpoint
	<to_can_accel_watchpoint_condition>: New member.
	condition.  Update all callers and implementations.
	(target_can_accel_watchpoint_condition): New macro.
	* value.c (free_value_chain): New function.
	* value.h (fetch_subexp_value): New prototype.
	(free_value_chain): Likewise.
2010-07-07 16:15:18 +00:00
Joel Brobecker 6bd3187468 [PATCH] Unexpected EOF read from connection with GDB after inferior exits.
This is on GNU/Linux.

GDBserver does not exit properly when the inferior exits, as demonstrated
with any program using the procedure below:

   % gdbserver-head :4444 simple_main
   Process simple_main created; pid = 25681
   Listening on port 4444

Then, in another terminal, start GDB, connect to GDBserver, and run
the program to completion:

   % gdb-head simple_main
   (gdb) tar rem :4444
   (gdb) cont
   Continuing.

   Program exited normally.

Going back to the terminal where GDBserver is running, we see the following
output:

    Child exited with status 0
    readchar: Got EOF
    Remote side has terminated connection.  GDBserver will reopen the connection.
    Listening on port 4444

The problem is that we're missing a call to mourn_inferior.  As a result,
after we've handled the vCont packet, we fail to notice that there are
no process left to debug (target_running() returns true), and thus try
to continue reading from the remote socket.  However, since GDB just
disconnected after having received the "exit with status 0" reply to the
vCont request, the read triggers the EOF exception.

gdb/gdbserver/ChangeLog:

        * server.c (handle_v_cont): Call mourn_inferior if process
        just exited.
        (myresume): Likewise.
2010-07-07 16:14:04 +00:00
Ulrich Weigand 2f2241f146 * linux-nat.c (linux_nat_do_thread_registers): Use section size
from gdbarch_core_regset_sections also for .reg if present.

	* amd64-linux-tdep.c (amd64_linux_regset_sections): Fix incorrect
	section size for .reg.
	* ppc-linux-tdep.c (ppc_linux_vsx_regset_sections): Likewise.
	(ppc_linux_vmx_regset_sections): Likewise.
	(ppc_linux_fp_regset_sections): Likewise.
	(ppc64_linux_vsx_regset_sections): New variable.
	(ppc64_linux_vmx_regset_sections): Likewise.
	(ppc64_linux_fp_regset_sections): Likewise.
	(ppc_linux_init_abi): Install core_regset_section lists appropriate
	for current word size.
2010-07-07 12:28:32 +00:00
gdbadmin dd8f1dada6 *** empty log message *** 2010-07-07 00:00:04 +00:00
Joel Brobecker 1fd7cdc24b Make server.c:myresume static.
I just happened to notice that this function was exclusively used in
server.c, and thus could be made static.

2010-07-06  Joel Brobecker  <brobecker@adacore.com>

        * server.c (myresume): Make static.
2010-07-06 21:20:43 +00:00
Tom Tromey 11763c1856 * configure, config.in: Rebuild.
* configure.ac (HAVE_LIBPYTHON2_7): New define.
	* python/python-internal.h: Handle HAVE_LIBPYTHON2_7.
2010-07-06 19:03:12 +00:00
Andreas Schwab a6cc4789c3 * breakpoint.c (_initialize_breakpoint): Add "cl" as alias for
"clear".
2010-07-06 16:17:44 +00:00
Ulrich Weigand f9e9243aad include/ChangeLog:
2010-07-06  Ken Werner  <ken.werner@de.ibm.com>

	* floatformat.h (floatformat_ieee_half_big): Add declaration.
	(floatformat_ieee_half_little): Likewise.

libiberty/ChangeLog:

2010-07-06  Ken Werner  <ken.werner@de.ibm.com>

	* floatformat.c (floatformat_ieee_half_big): New variable.
	(floatformat_ieee_half_little): Likewise.

gdb/ChangeLog:

2010-07-06  Ken Werner  <ken.werner@de.ibm.com>

	* gdbtypes.h (floatformats_ieee_half): Add declaration.
	* gdbtypes.c (floatformats_ieee_half): New variable.
	* doublest.c (floatformat_from_length): Set format to
	gdbarch_half_format if length matches.
	* gdbarch.sh (half_bit): New architecture method.
	(half_format): Likewise.
	* gdbarch.h: Regenerate.
	* gdbarch.c: Likewise.
2010-07-06 12:56:24 +00:00
gdbadmin fcebdddbc5 *** empty log message *** 2010-07-06 00:00:03 +00:00
Jan Kratochvil 4e5799b6d2 gdb/
Fix re-run of PIE executable, PR shlibs/11776.
	* solib-svr4.c (svr4_relocate_main_executable) <symfile_objfile>: Remove
	the part of pre-set SYMFILE_OBJFILE->SECTION_OFFSETS.

gdb/testsuite/
	Fix re-run of PIE executable, PR shlibs/11776.
	* gdb.base/break-interp.exp (test_ld): Turn off "disable-randomization".
	Remove $displacement_main to match the solib-svr4.c change.  New "kill"
	and re-"run" of the inferior.
2010-07-05 18:04:33 +00:00
Jan Kratochvil 1a219cc741 gdb/testsuite/
Cope with missing /usr/sbin/prelink.
	* lib/prelink-support.exp (prelink_no):
	<result == 1 && $output is "no such file or directory">: New.
	(prelink_yes): Likewise.  Return on failed prelink_no.
2010-07-05 18:02:56 +00:00
Jan Kratochvil 5e3b36f879 gdb/testsuite/
* gdb.base/attach-pie-misread.exp: Load prelink-support.exp.  Replace
	build_executable by build_executable_own_libs.  Replace "prelink -R"
	execution by a call of prelink_yes.  Comment why "prelink -r" needs no
	change.
	* gdb.base/break-interp.exp: Load prelink-support.exp.  Rename calls of
	copy to file_copy.  Move setting opts --dynamic-linker and -rpath,
	mkdir $dir and ldd its parsing and copying to lib/prelink-support.exp.
	Replace build_executable by build_executable_own_libs's function
	build_executable_own_libs.
	(prelinkNO): Create new stub to call prelink_no.
	(prelinkYES): Create new stub to call prelink_yes.
	(test_attach): Rename calls of copy to file_copy.
	(section_get, prelinkNO_run, prelinkNO, prelinkYES, symlink_resolve)
	(copy): Move to ...
	* lib/prelink-support.exp: ... a new file.  Rename prelinkNO to
	prelink_no, prelinkYES to prelink_yes, copy to file_copy.
	* gdb.base/prelink.exp: Disable testcase also for is_remote and
	skip_shlib_tests.  Load prelink-support.exp.  Replace gdb_compile with
	special flags by gdb_compile_shlib.  Replace second gdb_compile by
	build_executable_own_libs.  Replace "prelink -R" execution by a call of
	prelink_yes.  Replace "prelink -u" and second "prelink -R" execution by
	a second call of prelink_yes.  Replace restart commands by
	clean_restart.
	(prelink): Rename to ...
	(seen displacement message): ... this test.  Extend its expectation
	strictness.
2010-07-05 18:01:53 +00:00
Jan Kratochvil 86e4bafc3b gdb/
* auxv.c (memory_xfer_auxv): Update attach comment.
	* solib-svr4.c (svr4_special_symbol_handling): Remove the call to
	svr4_relocate_main_executable.
	(svr4_solib_create_inferior_hook): Make the call to
	svr4_relocate_main_executable unconditional.

gdb/testsuite/
	* gdb.base/attach-pie-misread.exp, gdb.base/attach-pie-misread.c: New.
	* gdb.base/break-interp.exp (reach, test_core, test_ld): Require each
	displacement message exactly once.
2010-07-05 18:00:40 +00:00
Jan Kratochvil 3cd07d204b gdb/
* auxv.c (ld_so_xfer_auxv): Do not error on failed read of data_address.
2010-07-05 17:58:56 +00:00
Jan Kratochvil 0a1e94c73e gdb/
Fix attaching to PIEs prelinked on the disk after the process was
	started.
	* solib-svr4.c (svr4_exec_displacement): New variable arch_size.
	Verify it against bfd_get_arch_size.  Try to match arbitrary
	displacement for the phdrs comparison.

gdb/testsuite/
	* gdb.base/break-interp.exp: Run $binpie with new value "ATTACH", new
	code for it.  New variable relink_args.
	(prelinkYES): Call prelinkNO.
	(test_attach): Accept new parameter relink_args.  Re-prelink the binary
	in such case.  Move the core code to ...
	(test_attach_gdb): ... a new function.  Send GDB command "file".
	Extend expected "Attaching to " string.
2010-07-05 17:57:50 +00:00
gdbadmin c944eec01f *** empty log message *** 2010-07-05 00:00:33 +00:00
gdbadmin 4584028a21 *** empty log message *** 2010-07-04 00:00:32 +00:00
gdbadmin ab8efdf25f *** empty log message *** 2010-07-03 00:00:33 +00:00
Tom Tromey 5387647ff8 PR exp/11780:
* libunwind-frame.c (libunwind_frame_prev_register): Don't set
	value as optimized-out.
2010-07-02 21:22:30 +00:00
Thiago Jung Bauermann 38b6c3b38d 2010-07-02 Ulrich Weigand <uweigand@de.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* breakpoint.c (can_use_hardware_watchpoint): Answer "what does this
	represent?" question in comment.  Change comment to a proper sentence.
2010-07-02 19:45:49 +00:00
Tom Tromey 2f70bcfbc6 * gdb.base/bitops.exp: Remove extraneous "pass". 2010-07-02 19:11:55 +00:00
Tom Tromey a17ac5b05f 2010-07-02 Ken Werner <ken.werner@de.ibm.com>
gdb
	* c-valprint.c (c_val_print): Fix printing of character vectors.
gdb/testsuite
	* gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors.
2010-07-02 18:02:19 +00:00
Jan Kratochvil bddaafad33 gdb/
* spu-tdep.c (spu_catch_start): Adjust the caller of changed
	create_breakpoint prototype.
2010-07-02 08:04:03 +00:00
gdbadmin be184a692b *** empty log message *** 2010-07-02 00:00:34 +00:00
Pedro Alves d41c0fc8a9 gdb/
* breakpoint.c (BREAK_ARGS_HELP, _initialize_breakpoint): Clarify
	usefulness suggestion of multiple breakpoints at same location.

	gdb/testsuite/
	* gdb.base/help.exp: Adjust expected output.
2010-07-01 18:03:48 +00:00
Pedro Alves dc10affe0a gdb/
* breakpoint.c (BREAK_ARGS_HELP): Add missing `the'.

	gdb/testsuite/
	* gdb.base/help: Adjust expected output.
2010-07-01 17:42:41 +00:00
Pedro Alves 74c761c17d * gdb.texinfo (Create and Delete Tracepoints): Add more index
entries for fast tracepoints and static tracepoints.
2010-07-01 17:40:04 +00:00
Pedro Alves 501994c0ce * gdb.texinfo (General Query Packets) <qfThreadInfo,
qsThreadInfo>: Spell out `l' as ell.
2010-07-01 17:22:52 +00:00
Pedro Alves cabe9ab66e * dwarf2loc.c (locexpr_tracepoint_var_ref)
(loclist_tracepoint_var_ref): Handle optimized out values.
2010-07-01 15:45:31 +00:00
Pedro Alves cce7e648b9 * breakpoint.c (update_watchpoint, _initialize_breakpoint): Remove
unnecessary space in string.
	* filesystem.c (_initialize_filesystem): Ditto.
	* frame.c (_initialize_frame): Ditto.
	* infcmd.c (step_once): Ditto.
	* infrun.c (_initialize_infrun): Ditto.
	* linux-nat.c (linux_child_follow_fork): Ditto.
	* maint.c (maintenance_deprecate): Ditto.
	* memattr.c (_initialize_mem): Ditto.
	* mips-tdep.c (_initialize_mips_tdep): Ditto.
	* monitor.c (monitor_open): Ditto.
	* procfs.c (procfs_xfer_memory): Ditto.
	* reverse.c (bookmarks_info): Ditto.
	* sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Ditto.
	* stack.c (_initialize_stack): Ditto.
	* tracepoint.c (_initialize_tracepoint): Ditto.
	* xtensa-tdep.c (xtensa_supply_gregset,
	xtensa_regset_from_core_section): Ditto.
2010-07-01 15:36:18 +00:00
Tom Tromey b65c7efe97 * value.h (struct lval_funcs) <check_any_valid>: Rename from
check_all_valid.
	* value.c (value_entirely_optimized_out): Invert result.  Update
	for new function name.
2010-07-01 15:21:11 +00:00
Pedro Alves 0fb4aa4bfc Static tracepoints support, and UST integration.
gdb/gdbserver/
	* configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
	* mem-break.c (uninsert_all_breakpoints)
	(reinsert_all_breakpoints): New.
	* mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
	* tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
	(gdb_agent_ust_loaded, helper_thread_id)
	(gdb_agent_helper_thread_id): New macros.
	(struct ipa_sym_addresses): Add addr_ust_loaded,
	addr_helper_thread_id, addr_cmd_buf.
	(symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
	(in_process_agent_loaded_ust): New.
	(write_e_ust_not_loaded): New.
	(maybe_write_ipa_ust_not_loaded): New.
	(struct collect_static_trace_data_action): New.
	(enum tracepoint_type) <static_tracepoint>: New.
	(struct tracepoint) <handle>: Mention static tracepoints.
	(struct static_tracepoint_ctx): New.
	(CMD_BUF_SIZE): New.
	(add_tracepoint_action): Handle static tracepoint actions.
	(unprobe_marker_at): New.
	(clear_installed_tracepoints): Handle static tracepoints.
	(cmd_qtdp): Handle static tracepoints.
	(probe_marker_at): New.
	(cmd_qtstart): Handle static tracepoints.
	(response_tracepoint): Handle static tracepoints.
	(cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
	(handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
	(get_context_regcache): Handle static tracepoints.
	(do_action_at_tracepoint): Handle static tracepoint actions.
	(traceframe_find_block_type): Handle static trace data blocks.
	(traceframe_read_sdata): New.
	(download_tracepoints): Download static tracepoint actions.
	[HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
	(GDB_PROBE_NAME): New.
	(ust_ops): New.
	(GET_UST_SYM): New.
	(USTF): New.
	(dlsym_ust): New.
	(ust_marker_to_static_tracepoint): New.
	(gdb_probe): New.
	(collect_ust_data_at_tracepoint): New.
	(gdb_ust_probe): New.
	(UNIX_PATH_MAX, SOCK_DIR): New.
	(gdb_ust_connect_sync_socket): New.
	(resume_thread, stop_thread): New.
	(run_inferior_command): New.
	(init_named_socket): New.
	(gdb_ust_socket_init): New.
	(cstr_to_hexstr): New.
	(next_st): New.
	(first_marker, next_marker): New.
	(response_ust_marker): New.
	(cmd_qtfstm, cmd_qtsstm): New.
	(unprobe_marker_at, probe_marker_at): New.
	(cmd_qtstmat, gdb_ust_thread): New.
	(gdb_ust_init): New.
	(initialize_tracepoint_ftlib): Call gdb_ust_init.
	* linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
	(ST_REGENTRY): New.
	(x86_64_st_collect_regmap): New.
	(X86_64_NUM_ST_COLLECT_GREGS): New.
	(AMD64_RIP_REGNUM): New.
	(supply_static_tracepoint_registers): New.
	* linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
	(ST_REGENTRY): New.
	(i386_st_collect_regmap): New.
	(i386_NUM_ST_COLLECT_GREGS): New.
	(supply_static_tracepoint_registers): New.
	* server.c (handle_query): Handle qXfer:statictrace:read.
	<qSupported>: Report support for StaticTracepoints, and
	qXfer:statictrace:read features.
	* server.h (traceframe_read_sdata)
	(supply_static_tracepoint_registers): Declare.
	* remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
	(unpack_varlen_hex): Include in IPA build.
	* Makefile.in (ustlibs, ustinc): New.
	(IPA_OBJS): Add remote-utils-ipa.o.
	($(IPA_LIB)): Link -ldl and -lpthread.
	(UST_CFLAGS): New.
	(IPAGENT_CFLAGS): Add UST_CFLAGS.
	* config.in, configure: Regenerate.

	gdb/
	* NEWS: Mention new support for static tracepoints.
	(New packets): Mention qTfSTM, qTsSTM, qTSTMat and
	qXfer:statictrace:read.
	(New features in the GDB remote stub, GDBserver): Mention static
	tracepoints support using an UST based backend.
	(New commands): Mention "info static-tracepoint-markers" and
	"strace".
	* breakpoint.c (is_marker_spec): New.
	(is_tracepoint): Handle static tracepoints.
	(validate_commands_for_breakpoint): Static tracepoints can't do
	while-stepping.
	(static_tracepoints_here): New.
	(bpstat_what): Handle static tracepoints.
	(print_one_breakpoint_location, allocate_bp_location, mention):
	Ditto.
	(create_breakpoint_sal): Ditto.
	(decode_static_tracepoint_spec): New.
	(create_breakpoint): Replace `hardwareflag', and `traceflag' with
	`type_wanted'.  Adjust.  Handle static tracepoint marker
	locations.
	(break_command_1): Adjust.
	(update_static_tracepoint): New.
	(update_breakpoint_locations): Handle static tracepoints.
	(breakpoint_re_set_one): Handle static tracepoint marker
	locations.
	(disable_command, enable_command): Handle static tracepoints.
	(trace_command, ftrace_command): Adjust.
	(strace_command): New.
	(create_tracepoint_from_upload): Adjust.
	(save_breakpoints): Handle static tracepoints.
	(_initialize_breakpoint): Install the "strace" command.
	* breakpoint.h (enum bptype): New bp_static_tracepoint type.
	(struct breakpoint): New fields static_trace_marker_id and
	static_trace_marker_id_idx.
	(breakpoints_here_p): Declare.
	(create_breakpoint): Adjust.
	(static_tracepoints_here): Declare.
	* remote.c (struct remote_state) <static_tracepoints>: New field.
	(PACKET_qXfer_statictrace_read, PACKET_StaticTracepoints): New.
	(remote_static_tracepoint_marker_at): New.
	(remote_static_tracepoint_markers_by_strid): New.
	(remote_static_tracepoint_feature): New.
	(remote_disconnected_tracing_feature): Handle "StaticTracepoints".
	(remote_xfer_partial): Handle TARGET_OBJECT_STATIC_TRACE_DATA.
	(remote_supports_static_tracepoints): New.
	(remote_download_tracepoint): Download static tracepoints.
	(init_remote_ops): Install remote_static_tracepoint_marker_at and
	remote_static_tracepoint_markers_by_strid.
	(_initialize_remote): Install set|show remote static-tracepoints,
	and set|show remote read-sdata-object commands.
	* target.c (update_current_target): Inherit and default
	to_static_tracepoint_marker_at, and
	to_static_tracepoint_markers_by_strid.
	* target.h (static_tracepoint_marker): Forward declare.
	(enum target_object): New object TARGET_OBJECT_STATIC_TRACE_DATA.
	(static_tracepoint_marker_p): New typedef.
	(DEF_VEC_P(static_tracepoint_marker_p)): New VEC type.
	(struct target_ops): New fields to_static_tracepoint_marker_at and
	to_static_tracepoint_markers_by_strid.
	(target_static_tracepoint_marker_at)
	(target_static_tracepoint_markers_by_strid): New.
	* tracepoint.c: Include source.h.
	(validate_actionline): Handle $_sdata.
	(struct collection_list): New field strace_data.
	(add_static_trace_data): New.
	(clear_collection_list): Clear strace_data.
	(stringify_collection_list): Account for a possible static trace
	data collection.
	(encode_actions_1): Encode an $_sdata collection.
	(parse_tracepoint_definition): Handle static tracepoints.
	(parse_static_tracepoint_marker_definition): New.
	(release_static_tracepoint_marker): New.
	(print_one_static_tracepoint_marker): New.
	(info_static_tracepoint_markers_command): New.
	(sdata_make_value): New.
	(_initialize_tracepoint): Create the $_sdata convenience variable.
	Add the "info static-tracepoint-markers" command.
	Mention $_sdata in the "collect" command's help output.
	* tracepoint.h (struct static_tracepoint_marker): New.
	(parse_static_tracepoint_marker_definition)
	(release_static_tracepoint_marker): Declare.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Adjust.
	* python/py-breakpoint.c (bppy_new): Adjust.

	doc/
	* gdb.texinfo (Convenience Variables): Document $_sdata.
	(Commands to Set Tracepoints): Describe static tracepoints.  Add
	`Listing Static Tracepoint Markers' menu entry.  Document
	"strace".
	(Tracepoint Action Lists): Document collecting $_sdata.
	(Listing Static Tracepoint Markers): New subsection.
	(Tracepoints support in gdbserver): Mention static tracepoints.
	(remote packets, enabling and disabling): Mention
	read-sdata-object.
	(General Query Packets) <qSupported>: Document qXfer:sdata:read
	and StaticTracepoint.
	Mention qTfSTM, qTsSTM and qTSTMat as tracepoint packets.
	Document qXfer:sdata:read.
	(Tracepoint packets): Document qTfSTM, qTsSTM and qTSTMat.
2010-07-01 10:36:12 +00:00
gdbadmin 787d71c20c *** empty log message *** 2010-07-01 00:00:33 +00:00
Joel Brobecker aac63f0f26 Fix build failure with Python installed in non-system location.
The debugger fails to build when configure with --python-python=<path>
where <path> is a non-system location.  The reason is a warning made
fatal due to the definition of _XOPEN_SOURCE inside pyconfig.h.  This
is exactly the same problem as with _POSIX_C_SOURCE, handled in
python-internal.h as follow:

| /* /usr/include/features.h on linux systems will define _POSIX_C_SOURCE
|    if it sees _GNU_SOURCE (which config.h will define).
|    pyconfig.h defines _POSIX_C_SOURCE to a different value than
|    /usr/include/features.h does causing compilation to fail.
|    To work around this, undef _POSIX_C_SOURCE before we include Python.h.  */
| #undef _POSIX_C_SOURCE

This patch fixes this problem the same way.

2010-06-30  Joel Brobecker  <brobecker@adacore.com>

        * python/python-internal.h (_XOPEN_SOURCE): Undefine before
        including Python.h.
2010-06-30 23:12:04 +00:00
Jan Kratochvil 0a600c36f7 gdb/testsuite/
* gdb.cp/namespace.exp (print C::OtherFileClass::cOtherFileClassVar)
	(print ::C::OtherFileClass::cOtherFileClassVar): Remove KFAIL for
	c++/11702.
2010-06-30 15:58:47 +00:00
Doug Evans 3863f96c20 PR gdb/11702
* dwarf2read.c (dwarf2_add_field): Only create a symbol if
	DW_AT_external is present.
2010-06-30 05:39:23 +00:00
gdbadmin f3a42b6842 *** empty log message *** 2010-06-30 00:00:02 +00:00
Jan Kratochvil 37cc8bfee6 gdb/testsuite/
* gdb.base/break-interp.exp (prelinkYES): XFAIL on `Not enough room to
	add .dynamic entry'.
2010-06-29 21:48:10 +00:00
Doug Evans 254e6b9ed4 PR c++/11702
* NEWS: Add entry.
	* dwarf2read.c (dwarf2_add_field): If DW_AT_const_value is present,
	create a symbol for the field and record the value.
	(new_symbol): Handle DW_TAG_member.
	* gdbtypes.c (field_is_static): Remove FIXME.
	* symtab.c (search_symbols): When searching for VARIABLES_DOMAIN,
	only ignore LOC_CONST symbols that are enums.

	testsuite/
	Test PR c++/11702.
	* gdb.cp/m-static.exp: Add testcase.
	* gdb.cp/m-static.h (gnu_obj_4): Add initialized static const member.
2010-06-29 16:53:10 +00:00
Doug Evans 6e70227d64 * dwarf2read.c: Remove trailing whitespace. 2010-06-29 16:35:28 +00:00
Doug Evans e68994a706 Delete FIELD_LOC_KIND_DWARF_BLOCK, unused.
* gdbtypes.h (enum field_loc_kind): Delete FIELD_LOC_KIND_DWARF_BLOCK.
	(struct main_type, field loc): Delete dwarf_block.
	(FIELD_DWARF_BLOCK): Delete.
	(SET_FIELD_DWARF_BLOCK): Delete.
	(TYPE_FIELD_DWARF_BLOCK): Delete.
	* gdb-gdb.py (StructMainTypePrettyPrinter.struct_field_location_img):
	Update.
2010-06-29 16:17:58 +00:00
Hui Zhu a480d2f6c8 2010-06-29 Hui Zhu <teawater@gmail.com>
* record.c (set_record_pic_cmdlist,
	show_record_pic_cmdlist): New variables.
	(set_record_pic_command,
	show_record_pic_command): New functions.
	(record_pic_function, record_pic_line, record_pic_enum,
	set_record_pic_type, record_pic_hide_nofunction,
	record_pic_hide_nosource, record_pic_hide_same): New variables.
	(record_pic_fputs): New function.
	(function_list, node_list, edge_list): New struct.
	(function_list, node_list, edge_list): New variables.
	(record_pic_cleanups, record_pic_node,
	record_pic_edge, cmd_record_pic): New functions.
	(_initialize_record): Add new commands for record pic.
2010-06-29 05:52:17 +00:00
Joel Brobecker dc3b15be96 Fix unmatched @end table in gdb.texinfo.
2010-06-29  Joel Brobecker  <brobecker@adacore.com>

	* gdb.texinfo (Threads In Python): Fix unmatched @end table.
2010-06-29 04:32:35 +00:00
gdbadmin 68e47e3bb1 *** empty log message *** 2010-06-29 00:00:32 +00:00
Jan Kratochvil a0d7a4ff13 gdb/
* dwarf2read.c (read_structure_type) <fi.typedef_field_list>: Call
	ALLOCATE_CPLUS_STRUCT_TYPE.
2010-06-28 22:03:31 +00:00
Phil Muldoon 595939dea1 2010-06-28 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey  <tromey@redhat.com>
            Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* value.c (pack_unsigned_long): New function.
	(value_from_ulongest): New function.
	* value.h (value_from_ulongest): Declare.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_thread and gdbpy_initialize_inferior.
	* python/python-internal.h: Define thread_object.
	(gdbpy_inferiors, gdbpy_selected_thread)
	(frame_info_to_frame_object, create_thread_object)
	(find_thread_object, find_inferior_object)
	(gdbpy_initialize_thread, gdbpy_initialize_inferiors)
	(gdbpy_is_value_object, get_addr_from_python): Declare.
	* python/py-value.c (builtin_type_upylong): Define.
	(convert_value_from_python): Add logic for ulongest.
	(gdbpy_is_value_object): New function.
	* python/py-utils.c (get_addr_from_python): New function.
	* python/py-frame.c (frame_info_to_frame_object): Return a PyObject.
	(gdbpy_selected_frame): Use PyObject over frame_info.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-inferior and
	py-infthread.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-inferior.o): New Rule.
	(py-infthread.o): New Rule.
	* python/py-inferior.c: New File.
	* python/py-infthread.c: New File.

2010-06-28  Phil Muldoon  <pmuldoon@redhat.com>
	    Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.texinfo (Inferiors In Python): New node.
	* gdb.texinfo (Threads In Python): New node.

2010-06-28  Phil Muldoon  <pmuldoon@redhat.com>
            Tom Tromey  <tromey@redhat.com>
            Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/py-inferior.c: New File.
	* gdb.python/py-infthread.c: New File.
	* gdb.python/py-inferior.exp: New File.
	* gdb.python/py-infthread.exp: New File.
2010-06-28 21:16:04 +00:00
Jan Kratochvil 98751a4113 gdb/
* c-typeprint.c (c_type_print_base): For no fields check include also
	TYPE_TYPEDEF_FIELD_COUNT.  Print new typedefs section.
	* dwarf2read.c (struct typedef_field_list)
	(struct field_info) <typedef_field_list, typedef_field_list_count>: New.
	(dwarf2_add_typedef): New.
	(read_structure_type): Call dwarf2_add_typedef for DW_TAG_typedef.
	Copy also FI.TYPEDEF_FIELD_LIST.
	* gdbtypes.h (struct typedef_field)
	(struct cplus_struct_type) <typedef_field, typedef_field_count>
	(TYPE_TYPEDEF_FIELD_ARRAY, TYPE_TYPEDEF_FIELD, TYPE_TYPEDEF_FIELD_NAME)
	(TYPE_TYPEDEF_FIELD_TYPE, TYPE_TYPEDEF_FIELD_COUNT): New.

gdb/testsuite/
	* gdb.cp/namespace.exp (ptype OtherFileClass typedefs)
	(ptype ::C::OtherFileClass typedefs): New.
	* gdb.cp/namespace1.cc (C::OtherFileClass::cOtherFileClassType2)
	(C::OtherFileClass::cOtherFileClassVar2): New.
	(C::OtherFileClass::cOtherFileClassVar_use): Use also
	cOtherFileClassVar2.
	(C::cOtherFileType2, C::cOtherFileVar2): New.
	(C::cOtherFileVar_use): use also cOtherFileVar2.
	* gdb.cp/userdef.exp (ptype &*c): Permit arbitrary trailing text.
2010-06-28 20:39:30 +00:00
Jan Kratochvil 41f62f3939 gdb/
* cp-namespace.c (cp_lookup_nested_type): New variable
	concatenated_name.  Turn the current return condition into a reverse
	one.  Call also lookup_static_symbol_aux on the constructed qualified
	name.
	* symtab.c (lookup_symbol_aux): Move variable objfile and searching in
	other files into a called ...
	(lookup_static_symbol_aux): ... new function here.
	* symtab.h (lookup_static_symbol_aux): New prototype.
	* valops.c (value_maybe_namespace_elt): Call also
	lookup_static_symbol_aux if we failed otherwise.

gdb/testsuite/
	* gdb.cp/namespace.exp (whatis C::cOtherFileType)
	(whatis ::C::cOtherFileType, whatis C::cOtherFileVar)
	(whatis ::C::cOtherFileVar, print C::cOtherFileVar)
	(print ::C::cOtherFileVar)
	(whatis C::OtherFileClass::cOtherFileClassType)
	(whatis ::C::OtherFileClass::cOtherFileClassType)
	(print C::OtherFileClass::cOtherFileClassVar)
	(print ::cOtherFileClassVar)
	(print ::C::OtherFileClass::cOtherFileClassVar): New tests.
	(ptype OtherFileClass, ptype ::C::OtherFileClass): Permit arbitrary
	trailing content.
	* gdb.cp/namespace1.cc (C::OtherFileClass::cOtherFileClassType)
	(C::OtherFileClass::cOtherFileClassVar)
	(C::OtherFileClass::cOtherFileClassVar_use, C::cOtherFileType)
	(C::cOtherFileVar, C::cOtherFileVar_use): New.
2010-06-28 20:35:52 +00:00
Jan Kratochvil af53d23161 gdb/
Fix PR c++/11703 and PR gdb/1448.
	* c-exp.y (yylex) <last_was_coloncolon && first_was_coloncolon>: Add
	FIRST_ITER check.

gdb/testsuite/
	Test PR c++/11703 and PR gdb/1448.
	* gdb.cp/namespace.exp (ptype ::C::NestedClass): Remove KFAIL for
	gdb/1448.
2010-06-28 20:18:27 +00:00
Jan Kratochvil 9655fd1aec gdb/
Fix modification of cplus_struct_default.
	* dwarf2read.c (dwarf2_add_member_fn) <no DW_AT_vtable_elem_location>:
	Call ALLOCATE_CPLUS_STRUCT_TYPE.
	* gdbtypes.c (cplus_struct_default): New empty initializer, comment it.

gdb/testsuite/
	* gdb.cp/virtbase.cc (class RTTI_base, class RTTI_data)
	(main) <rtti_data>: New.
	* gdb.cp/virtbase.exp (print rtti_data): New.
2010-06-28 20:12:53 +00:00
Jan Kratochvil 824cc8dd7c gdb/testsuite/
* lib/gdb.exp (gdb_test_multiple): Error on trailing newlines.
2010-06-28 20:09:59 +00:00
Joel Brobecker 9279c692c1 Document the GDB python directory.
2010-06-27  Joel Brobecker  <brobecker@adacore.com>

        * NEWS: Add entry announcing the python directory.

2010-06-27  Joel Brobecker  <brobecker@adacore.com>

        * gdb.texinfo (Python): Document what the python directory is
        and what its location is.
        (Basic Python): Document the gdb.PYTHONDIR constant.
2010-06-28 19:54:04 +00:00
Tom Tromey d3f41bb170 * dwarf2read.c (read_structure_type): Allocate null cleanup later. 2010-06-28 19:05:42 +00:00
Doug Evans 23e7acfb8e * breakpoint.c (breakpoint_sals_to_pc): Delete arg address, unused.
All callers updated.
2010-06-28 18:56:38 +00:00
Jan Kratochvil 6036c74221 gdb/
* cp-valprint.c (cp_print_value_fields) <recurse == 0>: Call
	obstack_begin after each obstack_free.

gdb/testsuite/
	* gdb.cp/static-print-quit.exp, gdb.cp/static-print-quit.cc: New.
2010-06-28 16:59:47 +00:00
Doug Evans de6a04210c * gdb.base/break-interp.exp (reach): Relax expected output a bit. 2010-06-28 16:54:11 +00:00
gdbadmin 3aa005fffe *** empty log message *** 2010-06-28 00:00:03 +00:00
Doug Evans b2dae948d7 * gdb.cp/m-static.exp: Update expected test output. 2010-06-27 17:19:54 +00:00
Doug Evans 1596cb5d60 * value.c (value_static_field): Use `switch' instead of `if'.
Assert-fail if passed invalid TYPE_FIELD_LOC_KIND.
2010-06-27 16:40:14 +00:00
Doug Evans 9f18a3b398 * valops.c (search_struct_field): Fix typo in error message. 2010-06-27 16:26:41 +00:00
gdbadmin 86a0355979 *** empty log message *** 2010-06-27 00:00:03 +00:00
Ulrich Weigand 43dabe425d * dwarf2expr.c (execute_stack_op): Place preprocessor
directives at the start of the source line.
2010-06-26 14:05:29 +00:00
Paul N. Hilfinger 0f3bb72eb7 Refactor 'maint time' command statistics.
Consolidate code for displaying per-command time and space statistics to avoid
duplication.  Piggyback on cleanups so that statistics get printed even when
commands terminate as a result of an error.

Changelog

    * gdb/defs.h (make_command_stats_cleanup): Declare.
    (set_display_time): Declare.
    (set_display_space): Declare.
    * gdb/event-top.c (command_handler): Use make_command_stats_cleanup.
    * gdb/main.c (display_time, display_space): Move definitions to utils.c.
    (captured_main): Use make_command_stats_cleanup to get start-up
    statistics.
    Use set_display_time and set_display_space for processing OPT_STATISTICS
    case.
    * gdb/maint.c (maintenance_time_display): Use set_display_time.
    (maintenance_space_display): Use set_display_space.
    * gdb/top.c (execute_command): Remove obsolete 'maint time' code.
    (command_loop): Use make_command_stats_cleanup.
    * gdb/utils.c (struct cmd_stats): Structure for storing initial time
    and space usage.
    (display_time, display_space): Move definitions here from utils.c.
    (set_display_time): New function.
    (set_display_space): New function.
    (make_command_stats_cleanup): New function.
    (report_command_stats): New auxiliary function for
    make_command_stats_cleanup.
    * gdb/testsuite/gdb.gdb/selftest.exp: Adjust expected message for
    capturing start-up runtime.
2010-06-26 06:44:47 +00:00
gdbadmin cb97a5c52e *** empty log message *** 2010-06-26 00:00:04 +00:00
Ulrich Weigand 070c802839 * solib-spu.c (append_ocl_sos): Fix xsnprintf statement for
hosts where CORE_ADDR is long long.
2010-06-25 22:00:59 +00:00
Sami Wagiaalla 4656f5c643 Added NEWS entry about C++ improvements. 2010-06-25 18:19:31 +00:00
Tom Tromey bc9f0842f1 gdb
PR python/10808:
	* python/python.c (execute_gdb_command): Add keywords.  Accept
	"to_string" argument.
	(struct restore_ui_file_closure): New.
	(restore_ui_file): New function.
	(make_cleanup_restore_ui_file): Likewise.
	(GdbMethods) <execute>: Update.
gdb/doc
	PR python/10808:
	* gdb.texinfo (Basic Python): Document new gdb.execute argument.
gdb/testsuite
	PR python/10808:
	* gdb.python/python.exp: Add new tests.
2010-06-25 18:15:18 +00:00
Sami Wagiaalla 099ef718e3 Added import loop test.
2010-06-25  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/operator.cc: Created an import loop.
	* gdb.cp/operator.exp: Added testcase for import loop.
2010-06-25 18:05:30 +00:00
Ulrich Weigand c0cc4c83bd * s390-tdep.c (s390_push_dummy_call): Error on stack overflow
during inferior call stack frame setup.
2010-06-25 17:47:29 +00:00
Ulrich Weigand f1d8ee6626 2010-06-25 Ken Werner <ken.werner@de.ibm.com>
* solib-spu.c: Include "exception.h".
	(ocl_program_data_key): New variable.
        (append_ocl_sos): New function.
        (ocl_enable_break): Likewise.
	(spu_current_sos): Call append_ocl_sos.
	(spu_solib_loaded): Call ocl_enable_break.
	(_initialize_spu_solib): Register ocl_program_data_key.
2010-06-25 17:39:56 +00:00
Ulrich Weigand 19c0c0f822 * cp-support.c (reset_directive_searched): New function.
(make_symbol_overload_list_using): Prevent recursive calls.
2010-06-25 16:16:44 +00:00
Jan Kratochvil 5868a63287 gdb/testsuite/
Test PR python/11407.
	* gdb.dwarf2/dw2-ref-missing-frame-func.c: New file.
	* gdb.dwarf2/dw2-ref-missing-frame.S: Use cu_text_start and cu_text_end.
	Split main into func_nofb and func_loopfb dropping NO_FRAME_BASE.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Remove variables sources,
	executable_nofb and executable_fb.  New variables srcsfile, objsfile,
	srcfuncfile, objfuncfile, srcmainfile, objmainfile, executable and
	binfile.  Call gdb_compile with clean_restart twice.
	(func_nofb print, func_nofb backtrace, func_loopfb print)
	(func_loopfb backtrace): New.
2010-06-25 15:34:46 +00:00
Jan Kratochvil af76db58d7 gdb/testsuite/
* gdb.dwarf2/dw2-ref-missing-frame-main.c: New.
	* gdb.dwarf2/dw2-ref-missing-frame.S: Replace compiler generated output
	by a hand made one.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Remove invalid comment.  Remove
	i?86 requirement.  Remove variables srcfile and binfile.  New variable
	sources, executable_nofb and executable_fb.  Call prepare_for_testing.
2010-06-25 15:32:49 +00:00
Phil Muldoon 0f6a939d86 2010-06-24 Phil Muldoon <pmuldoon@redhat.com>
* printcmd.c (print_variable_and_value): Print error message on
	caught exception.
2010-06-25 15:13:52 +00:00
Ulrich Weigand f2c7657e9a ChangeLog:
* dwarf2expr.h (struct dwarf_value_location): Use ULONGEST as type
	of stack values.
	(struct dwarf_expr_piece): Rename "expr" member to "mem".  Add new
	"value" member.
	(dwarf_expr_push): Change input type to ULONGEST.
	(dwarf_expr_fetch): Change return type to ULONGEST.
	(dwarf_expr_fetch_address): Add prototype.
	(dwarf2_read_address): Remove prototype.
	* dwarf2expr.c (dwarf_expr_push): Use ULONGEST as type of stack values.
	Truncate stack values to ctx->addr_size bytes.
	(dwarf_expr_fetch): Change return value to ULONGEST.
	(dwarf_expr_fetch_address): New function.
	(add_piece): Use dwarf_expr_fetch_address instead of dwarf_expr_fetch
	when appropriate.  Update for struct dwarf_expr_piece changes.
	(dwarf2_read_address): Remove.
	(unsigned_address_type): Remove.
	(signed_address_type): Remove.
	(execute_stack_op): Use dwarf_expr_fetch_address instead of
	dwarf_expr_fetch when appropriate.  Use ULONGEST as type of stack
	values.  Perform operations on ULONGEST instead of on GDB values,
	sign-extending from ctx->addr_size bytes as needed.  Read DW_OP_addr
	values and DW_OP_deref results as unsigned integers.
	* dwarf2loc.c (read_pieced_value): Update for struct dwarf_expr_piece
	changes.
	(write_pieced_value): Likewise.
	(dwarf2_evaluate_loc_desc): Use dwarf_expr_fetch_address instead of
	dwarf_expr_fetch when appropriate.
	(compile_dwarf_to_ax): Read DW_OP_addr values as unsigned integers.
	* dwarf2-frame.c (execute_stack_op): Use dwarf_expr_fetch_address
	instead of dwarf_expr_fetch when appropriate.

testsuite/ChangeLog:

	* gdb.cell/dwarfaddr.exp: New file.
	* gdb.cell/dwarfaddr.S: New file.
2010-06-25 13:00:33 +00:00
Pierre Muller b1d61bc9d1 * c-typeprint.c (c_print_typedef): Append new type name for typedefs. 2010-06-25 07:32:25 +00:00
gdbadmin 4f2a93bda2 *** empty log message *** 2010-06-25 00:00:33 +00:00
Joel Brobecker b14285f60e Add support for gdb.PYTHONDIR as $gdb_datadir/python.
Python scripts to be used by GDB can be stored in that directory,
and will be automatically found by the interpreter when importing them.
This patch also sets up <gdb_pythondir>/gdb as the directory where gdb
submodules can be stored.  For now, there is nothing there, but it can
now be added easily without further code changes.

gdb/ChangeLog:
2010-06-24  Joel Brobecker  <brobecker@adacore.com>

        * python/python.c (_initialize_python): Add new "constant"
        PYTHONDIR in gdb module.  Insert this path at the head of
        sys.path. Set gdb.__path__ to gdb.PYTHONDIR + '/gdb' and
        exec its __init__.py script if it exists in that directory.
2010-06-24 22:52:04 +00:00
Kevin Buettner fd60dc691f Add "acc" register. Revise register order and names. 2010-06-24 20:38:05 +00:00
Tom Tromey 1843028924 * psymtab.c (lookup_partial_symbol): Mark definition as static. 2010-06-24 20:17:52 +00:00
Jan Kratochvil 4061892649 gdb/
Fix GDB startup on readonly filesystem.
	* charset.c (find_charset_names): Use PEX_USE_PIPES for pex_init.
2010-06-24 18:24:03 +00:00
Jan Kratochvil 628fe4e4a9 gdb/
Fix PR 9436.
	* breakpoint.c (handle_jit_event): New function.
	(bpstat_what): Remove enum class, kc, ss, sn, sgl, slr, clr, sr, shl,
	jit, err, table and bs_class.  New variables shlib_event, jit_event,
	this_action and bptype.  Change bs_class assignments to this_action
	assignments.  new unhandled bptype internal error.  Move here
	shlib_event and jit_event handling from handle_inferior_event.
	* breakpoint.h (enum bpstat_what_main_action): Extend the comment.
	Reorder items.  Remove BPSTAT_WHAT_CHECK_SHLIBS and
	BPSTAT_WHAT_CHECK_JIT.
	* inferior.h (debug_infrun, stop_on_solib_events): New declarations.
	* infrun.c (debug_infrun, stop_on_solib_events): Remove static.
	(handle_inferior_event): Reinitialize frame and gdbarch after
	bpstat_what call.  Move BPSTAT_WHAT_CHECK_SHLIBS and
	BPSTAT_WHAT_CHECK_JIT handling to bpstat_what.  Reinitialize even
	gdbarch when frame gets reinitialized.

gdb/testsuite/
	Test PR 9436.
	* gdb.base/nostdlib.exp, gdb.base/nostdlib.c: New.
2010-06-24 15:17:32 +00:00
Hui Zhu f1421989e7 Add command "eval". 2010-06-24 06:12:15 +00:00
gdbadmin fee37fbc3a *** empty log message *** 2010-06-24 00:00:09 +00:00
Ulrich Weigand d03285ec7b ChangeLog:
* infrun.c (handle_inferior_event): Handle presence of single-step
	breakpoints for TARGET_WAITKIND_FORKED and TARGET_WAITKIND_VFORKED.
	Cancel single-step breakpoints for TARGET_WAITKIND_EXITED,
	TARGET_WAITKIND_SIGNALED, and TARGET_WAITKIND_EXECD.
	* breakpoint.c (detach_single_step_breakpoints): New function.
	(detach_breakpoints): Call it.
	(cancel_single_step_breakpoints): New function.
	* breakpoint.h (cancel_single_step_breakpoints): Add prototype.

	* spu-tdep.c (spu_memory_remove_breakpoint): New function.
	(spu_gdbarch_init): Install it.

testsuite/ChangeLog:

	* gdb.cell/fork.exp: New file.
	* gdb.cell/fork.c: Likewise.
	* gdb.cell/fork-spu.c: Likewise.
2010-06-23 12:46:37 +00:00
Jan Kratochvil 38f6b338fd gdb/
* configure.ac: Always set RDYNAMIC at least as `-rdynamic'.
	* configure: Regenerate.
2010-06-23 10:12:14 +00:00
gdbadmin ad2506cfd1 *** empty log message *** 2010-06-23 00:00:03 +00:00
Pierre Muller 41b2c92d4c * lib/gdb.exp (banned_variables_traced): New global variable.
(gdb_init, gdb_finish): Use new variable to avoid multiple tracing.
	(gdb_init): Use `trace add variable' instead of obsolete
	`trace variable'.
2010-06-22 07:21:29 +00:00
Stan Shebs e4c0cfae7e 2010-06-21 Stan Shebs <stan@codesourcery.com>
* gdb.texinfo: Add explicit @node and @appendix for GFDL.
	* annotate.texinfo: Ditto.
	* gdbint.texinfo: Ditto.
	* stabs.texinfo: Ditto.
2010-06-22 05:03:19 +00:00
Hui Zhu bb08c43207 2010-06-22 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (i386_record_lea_modrm): Change warning to query.
	(i386_process_record): Ditto.
	* record.c (record_memory_query): New variable.
	(_initialize_record): New command "set record memory-query".
	* record.h (record_memory_query): New extern.

2010-06-22  Hui Zhu  <teawater@gmail.com>

	* gdb.texinfo: (Process Record and Replay): Add documentation
	for command "set record memory-query".
2010-06-22 02:15:46 +00:00
Doug Evans b55078be0a * i386-tdep.h (i386_displaced_step_copy_insn): Declare.
* i386-tdep.c (i386_displaced_step_copy_insn): New function.
	(i386_syscall_p): Change type of lengthp to int.
	(i386_displaced_step_fixup): Handle kernels that run one past a
	syscall insn.
	* i386-linux-tdep.c (i386_linux_init_abi): Use
	i386_displaced_step_copy_insn instead of
	simple_displaced_step_copy_insn.
2010-06-22 00:09:10 +00:00
Doug Evans d5bc977ffb * gdb.gdb/selftest.exp: Remove support for gpl v1 and v2 gdb's. 2010-06-22 00:02:07 +00:00
gdbadmin 68f084b101 *** empty log message *** 2010-06-22 00:00:33 +00:00
Tom Tromey 75079b2b31 * dwarf2read.c (read_base_type): Handle DW_ATE_UTF.
(dwarf_type_encoding_name): Likewise.
2010-06-21 19:49:19 +00:00
Tom Tromey b00fdb7832 * p-valprint.c (pascal_val_print): Use TYPE_ERROR_NAME.
* p-typeprint.c (pascal_type_print_base): Use TYPE_ERROR_NAME.
	* m2-valprint.c (m2_val_print): Use TYPE_ERROR_NAME.
	* gdbtypes.h (TYPE_ERROR_NAME): New macro.
	* f-valprint.c (f_val_print): Use TYPE_ERROR_NAME.
	* f-typeprint.c (f_type_print_base): Use TYPE_ERROR_NAME.
	* dwarf2read.c (tag_type_to_type): Create a new error type on
	failure.
	* c-valprint.c (c_val_print): Use TYPE_ERROR_NAME.
	* c-typeprint.c (c_type_print_base): Use TYPE_ERROR_NAME.
2010-06-21 18:01:51 +00:00
Michael Snyder 84951ab584 2010-06-21 Michael Snyder <msnyder@vmware.com>
* breakpoint.c (_initialize_breakpoint): Use add_prefix_cmd,
	not add_abbrev_prefix_cmd, for "enable breakpoints".
2010-06-21 17:38:35 +00:00
Ulrich Weigand d4a087c799 * dwarf2loc.c (find_location_expression): Add relocation offset
to base-address-selection entry base addresses.  Read addresses
	(and offsets) as signed/unsigned integers, depending on the
	BFD's sign_extend_vma flag.  Do not call dwarf2_read_address.
	(loclist_describe_location): Likewise.
	(disassemble_dwarf_expression): Read DW_OP_addr operand as
	unsigned integer.  Do not call dwarf2_read_address.
	(locexpr_describe_location): Likewise for DW_OP_GNU_push_tls_address.
2010-06-21 16:50:18 +00:00
Stan Shebs 4f5d9f0781 2010-06-21 Stan Shebs <stan@codesourcery.com>
* gdb.texinfo: Relicense under GFDL version 1.3.
	* annotate.texinfo: Relicense under GFDL version 1.3.
	* gdbint.texinfo: Relicense under GFDL version 1.3.
	* stabs.texinfo: Relicense under GFDL version 1.3.
	* fdl.texi: Update to version 1.3.
2010-06-21 16:24:59 +00:00
gdbadmin 0febf158b2 *** empty log message *** 2010-06-21 00:00:03 +00:00
Pedro Alves 9e4344e5ea 2010-06-20 Ian Lance Taylor <iant@google.com>
Pedro Alves  <pedro@codesourcery.com>

	* linux-x86-low.c (always_true): Delete.
	(EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
	trying to fool the compiler with always_true.
2010-06-20 22:23:36 +00:00
Pedro Alves c6beb2cba6 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
conditions in gdbserver.
2010-06-20 22:18:48 +00:00
gdbadmin 59354ce653 *** empty log message *** 2010-06-20 00:00:33 +00:00
Ulrich Weigand 13def385c0 * spu-tdep.c (spu_frame_unwind_cache): Use LSLR register
value instead of hard-coded SPU_LS_SIZE.
	(spu_software_single_step): Likewise.
	* spu-tdep.h (SPU_LS_SIZE): Remove.
2010-06-19 17:59:06 +00:00
Ulrich Weigand d2ed6730f2 ChangeLog:
* spu-multiarch.c (spu_xfer_partial): Wrap around local store
	limit on local store memory accesses.
	* spu-linux-nat.c (spu_xfer_partial): Likewise.
	* spu-tdep.c (spu_lslr): Remove.
	(spu_pointer_to_address): Do not truncate addresses.
	(spu_integer_to_address): Likewise.
	(spu_overlay_new_objfile): Use SPU_OVERLAY_LMA.
	* spu-tdep.h: Add comments.
	(SPUADDR_SPU): Respect SPU_OVERLAY_LMA bit.
	(SPU_OVERLAY_LMA): Define.

gdbserver/ChangeLog:

	* spu-low.c (spu_read_memory): Wrap around local store limit.
	(spu_write_memory): Likewise.

testsuite/ChangeLog:

	* gdb.arch/spu-ls.exp: New file.
	* gdb.arch/spu-ls.c: Likewise.
2010-06-19 17:36:51 +00:00
gdbadmin fbece226ba *** empty log message *** 2010-06-19 00:00:33 +00:00
Stan Shebs a61408f8aa 2010-06-18 Stan Shebs <stan@codesourcery.com>
* osdata.c (get_osdata): Warn separately if target does not report
	type list.
	(info_osdata_command): Allow empty type, report error if target
	does not return available types of OS data.
	* linux-nat.c (linux_nat_xfer_osdata): Report list of OS data
	types if no annex supplied.

	* gdb.texinfo (Operating System Auxiliary Information): Describe
	"info os" when no arguments given.
2010-06-18 23:06:30 +00:00
Stan Shebs 6aed2dbcba * thread.c (thread_id_make_value): Make a value representing the
current thread.
	(_initialize_thread): Create $_thread.

	* gdb.texinfo (Debugging Programs with Multiple Threads): Describe
	$_thread.

	* gdb.threads/thread-specific.exp: Add tests of $_thread.
2010-06-18 17:44:40 +00:00
Ulrich Weigand e075690553 * gdb.base/gdb11531.exp: Respect gdb,no_hardware_watchpoints flag.
* gdb.base/watch-cond.exp: Likewise.
	* gdb.python/py-breakpoint.exp: Likewise.
2010-06-18 16:51:10 +00:00
Pedro Alves d8053d4d67 * gdb.multi/base.exp, gdb.multi/bkpt-multi-exec.exp: Use
clean_restart, make sure every test has a distinct message, and
	that messages don't include the executable' full path.
2010-06-18 15:08:29 +00:00
Hui Zhu 24e933dfc8 2010-06-18 Hui Zhu <teawater@gmail.com>
* gdb.texinfo: (Process Record and Replay): Add documentation
	for commands "record save" and "record restore".
2010-06-18 08:16:15 +00:00
gdbadmin d481c45bde *** empty log message *** 2010-06-18 00:00:03 +00:00
Doug Evans 81ce510cf2 * gdb.arch/i386-size.exp: Updated expected output for
DISASSEMBLY_OMIT_FNAME.
2010-06-17 22:55:53 +00:00
Joel Brobecker ec61707dbb Minor reformatting in dwarf2read.c:psymtabs_addrmap_cleanup.
Really a tiny insignificant detail that just happened to catch my attention.
Fixed thusly.

2010-06-17  Joel Brobecker  <brobecker@adacore.com>

        * dwarf2read.c (psymtabs_addrmap_cleanup): Add empty line after
        last local variable declaration.  No real code change.
2010-06-17 22:36:41 +00:00