Commit Graph

3472 Commits

Author SHA1 Message Date
Jan Kratochvil ccf2624776 gdb/
* solib-svr4.c (LM_ADDR_CHECK) <info_verbose>: Use printf_unfiltered
	for the PIC displacement, print also the displacement value.
	(svr4_exec_displacement):  Print DISPLACEMENT if INFO_VERBOSE.

gdb/testsuite/
	* gdb.base/break-interp.exp: Create new displacement parameter value
	for the test_ld calls.
	(reach): New parameter displacement, verify its content.  New push of
	pf_prefix "reach-$func:".  Import global expect_out.
	(test_core): New parameter displacement, verify its content.  New push
	of pf_prefix "core:".  New command "set verbose on".  Import global
	expect_out.
	(test_attach): New parameter displacement, verify its content.  New
	push of pf_prefix "attach:".  New command "set verbose on".  Import
	global expect_out.
	(test_ld): New parameter displacement, pass it to the reach, test_core
	and test_attach calls and verify its content in the "ld.so exit" test.
	* gdb.base/prelink.exp: Remove gdb_exit and final return.
	(prelink): Update expected text, use gdb_test.
2010-03-11 22:07:03 +00:00
Doug Evans e469c7fb68 * gdb.base/checkpoint.exp: Fix comment.
Lengthen timeout while doing >600 checkpoints test.
	Rename duplicate "kill all one" test to keep test names unique.
2010-03-11 00:20:29 +00:00
Pedro Alves 60e1c644b7 gdb/
* breakpoint.c (condition_command): Handle watchpoint conditions.
	(is_hardware_watchpoint): Add comment.
	(is_watchpoint): New.
	(update_watchpoint): Don't reparse the watchpoint's condition
	unless necessary.
	(WP_IGNORE): New.
	(watchpoint_check): Use it.
	(bpstat_check_watchpoint): Handle it.
	(bpstat_check_breakpoint_conditions): Evaluate watchpoint local
	conditions in a frame where it makes sense.
	(watch_command_1): Store the innermost block of the condition
	expression.
	(delete_breakpoint): Delete the watchpoint condition expression.
	* breakpoint.h (struct bp_location) <cond>: Update comment.
	(struct breakpoint): New fields `cond_exp' and
	`cond_exp_valid_block'.

	gdb/testsuite/
	* gdb.base/watch-cond.c, gdb.base/watch-cond.exp: New.
2010-03-10 13:25:40 +00:00
Keith Seitz cec808ecec * gdb.cp/cp-relocate.exp: Remove single-quoting of C++ methods.
* gdb.cp/cplusfuncs.cc (dm_type_short): New function.
        (dm_type_long): New function.
        (dm_type_unsigned_short): New function.
        (dm_type_unsigned_long): New function.
        (myint): New typedef.
        * gdb.cp/cplusfuncs.exp (probe_demangler): Add tests for short,
        long, unsigned shor and long, operator char*, and typedef.
        (test_lookup_operator_functions): Add operator char* test.
        (test_paddr_operator_functions): Likewise.
        (test_paddr_overloaded_functions): Use probe values for
        short, long, and unsigned short and long.
        (test_paddr_hairy_functions): If the demangler probe detected
        gdb type printers, "expect" them. Otherwise "expect" the v2 or v3
        demangler.
        * gdb.cp/expand-sals.exp: Backtrace may contain class names.
        * gdb.cp/member-ptr.exp: Refine expected result for "print pmf"
        and "print null_pmf".
        Add test "ptype a.*pmf".
        * gdb.cp/overload.exp: Allow optional "int" to appear with
        "short" and "long".
        * gdb.cp/ovldbreak.exp: Use append to construct super-duper
        long expect value for men_overload1arg.
        Allow "int" to appear with "short" and "long".
        When testing "info break", add argument for main (void).
        Also allow "int" to appear with "short" and "long".
        Ditto with "unsigned" and "long long".
	* gdb.java/jmain.exp: Do not enclose methods names in single
	quotes.
	* gdb.java/jmisc.exp: Likewise.
	* gdb.java/jprint.exp: Likewise.
	* gdb.python/py-symbol.exp: Update expected "linkage_name" value.

	From Jan Kratochvil  <jan.kratochvil@redhat.com>:
	* gdb.cp/exception.exp (backtrace after first throw)
	(backtrace after second throw): Allow a namespace before __cxa_throw.
	(backtrace after first catch, backtrace after second catch): Allow
	a namespace before __cxa_begin_catch.

	* gdb.cp/cpexprs.exp: New file.
	* gdb.cp/cpexprs.cc: New file.

	From Daniel Jacobowitz  <dan@codesourcery.com>
	* gdb.cp/cpexprs.exp (escape): Delete.  Change all callers
	to use string_to_regexp.
	(ctor, dtor): New functions.  Use them to match constructor
	and destructor function types.
	(Top level): Use runto_main.
2010-03-09 18:08:05 +00:00
Tom Tromey f870a310ee gdb
2010-03-05  Corinna Vinschen  <vinschen@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* utils.c (host_char_to_target): Add 'gdbarch' argument.
	(parse_escape): Likewise.
	* python/py-utils.c (unicode_to_target_string): Update.
	(unicode_to_target_python_string): Update.
	(target_string_to_unicode): Update.
	* printcmd.c (printf_command): Update.
	* p-exp.y (yylex): Update.
	* objc-exp.y (yylex): Update.
	* mi/mi-parse.c: Include charset.h.
	(mi_parse_escape): New function.
	(mi_parse_argv): Use it.
	* jv-exp.y (yylex): Update.
	* i386-cygwin-tdep.c (i386_cygwin_auto_wide_charset): New
	function.
	(i386_cygwin_init_abi): Call set_gdbarch_auto_wide_charset.
	* gdbarch.sh (auto_charset, auto_wide_charset): New.
	* gdbarch.c: Rebuild.
	* gdbarch.h: Rebuild.
	* defs.h (parse_escape): Update.
	* cli/cli-setshow.c: Include arch-utils.h.
	(do_setshow_command): Update.
	* cli/cli-cmds.c (echo_command): Update.
	* charset.h (target_charset, target_wide_charset): Update.
	* charset.c: Include arch-utils.h.
	(target_charset_name): Default to "auto".
	(target_wide_charset_name): Likewise.
	(show_target_charset_name): Handle "auto".
	(show_target_wide_charset_name): Likewise.
	(be_le_arch): New global.
	(set_be_le_names): Add 'gdbarch' argument.
	(validate): Likewise.  Don't call set_be_le_names.
	(set_charset_sfunc, set_host_charset_sfunc)
	(set_target_charset_sfunc, set_target_wide_charset_sfunc):
	Update.
	(target_charset): Add 'gdbarch' argument.
	(target_wide_charset): Likewise.  Remove 'byte_order' argument.
	(auto_target_charset_name): New global.
	(default_auto_charset, default_auto_wide_charset): New functions.
	(_initialize_charset): Set auto_target_charset_name.  Allow "auto"
	for target charsets.  Copy result of nl_langinfo.  Use GetACP if
	USE_WIN32API.
	* c-lang.c (charset_for_string_type): Add 'gdbarch' argument,
	remove 'byte_order' argument.  Update.
	(classify_type): Likewise.
	(c_emit_char): Update.
	(c_printchar): Update.
	(c_printstr): Update.
	(c_get_string): Update.
	(evaluate_subexp_c): Update.
	* arch-utils.h (default_auto_charset, default_auto_wide_charset):
	Declare.
	* python/python.c (gdbpy_target_charset): New function.
	(gdbpy_target_wide_charset): Likewise.
	(GdbMethods): Update.
	* NEWS: Update.
gdb/doc
	* gdb.texinfo (Basic Python): Document target_charset and
	target_wide_charset.
gdb/testsuite
	* gdb.python/py-prettyprint.py (pp_nullstr.to_string): Use
	gdb.target_charset.
	(pp_ns.to_string): Likewise.
2010-03-05 20:18:19 +00:00
Keith Seitz 0c199f28ac * gdb.cp/overload.exp: Test that the filename portion of a linespec
can be quoted.  Test that both the filename and function/line
	portions can be quoted at the same time.
2010-03-04 18:38:17 +00:00
Pedro Alves c7437ca6e4 gdb/
* breakpoint.c (update_watchpoint): Create a sentinel location if
	the software watchpoint isn't watching any memory.
	(breakpoint_address_bits): Skip dummy software watchpoint locations.

	gdb/testsuite/
	* gdb.base/watch-non-mem.c, gdb.base/watch-non-mem.exp: New.
2010-03-04 15:37:26 +00:00
Doug Evans 24486cb784 * lib/gdb.exp (gdb_compile_pthreads): Handle case where
libc contains libpthread.
2010-03-03 22:19:05 +00:00
Doug Evans b111b80540 * gdb.threads/linux-dp.c (shared_random): Call rand instead of rand_r.
* gdb.threads/linux-dp.exp: Compile with gdb_compile_pthreads instead
	of gdb_compile.  Add another pattern to match android backtrace.
2010-03-03 22:13:51 +00:00
Tom Tromey a0e0ef55c6 gdb
2010-03-03  Dainis Jonitis  <jonitis@gmail.com>
	PR gdb/11345:
	* printcmd.c (printf_command): Print end of format string using
	printf_filtered.
gdb/testsuite
2010-03-03  Tom Tromey  <tromey@redhat.com>
	PR gdb/11345:
	* gdb.base/printcmds.exp (test_printf): Add test.
2010-03-03 18:05:05 +00:00
H.J. Lu 1ba53b71ca Support x86 pseudo byte, word and dword registers.
gdb/

2010-03-02  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-tdep.c (amd64_byte_names): New.
	(amd64_word_names): Likewise.
	(amd64_dword_names): Likewise.
	(amd64_pseudo_register_name): Likewise.
	(amd64_pseudo_register_read): Likewise.
	(amd64_pseudo_register_write): Likewise.
	(amd64_init_abi): Set num_byte_regs, num_word_regs, num_dword_regs
	and num_mmx_regs.  Call set_gdbarch_pseudo_register_read,
	set_gdbarch_pseudo_register_write and
	set_tdesc_pseudo_register_name.  Don't call
	set_gdbarch_num_pseudo_regs.  Don't set mm0_regnum.

	* i386-tdep.c (i386_num_mmx_regs): Removed.
	(i386_num_pseudo_regs): Likewise.
	(i386_byte_names): New.
	(i386_word_names): Likewise.
	(i386_byte_regnum_p): Likewise.
	(i386_word_regnum_p): Likewise.
	(i386_mmx_regnum_p): Updated.
	(i386_pseudo_register_name): Make it global.  Handle byte and
	word pseudo-registers.
	(i386_pseudo_register_read): Likewise.
	(i386_pseudo_register_write): Likewise.
	(i386_pseudo_register_type): Handle byte, word and dword
	pseudo-registers
	(i386_register_reggroup_p): Don't include pseudo
	registers, except for MXX, in any register groups.  Don't
	include pseudo byte, word, dword registers in general_reggroup.
	(i386_gdbarch_init): Set num_byte_regs, num_word_regs,
	num_dword_regs, al_regnum, ax_regnum and eax_regnum.  Put MMX
	pseudo-registers after word pseudo-registers.  Call
	set_gdbarch_num_pseudo_regs after calling gdbarch_init_osabi.

	* i386-tdep.h (gdbarch_tdep): Add num_mmx_regs, num_byte_regs,
	al_regnum, num_word_regs, ax_regnum, num_dword_regs and
	eax_regnum.
	(i386_byte_regnum_p): New.
	(i386_word_regnum_p): Likewise.
	(i386_dword_regnum_p): Likewise.
	(i386_pseudo_register_name): Likewise.
	(i386_pseudo_register_read): Likewise.
	(i386_pseudo_register_write): Likewise.

gdb/testsuite/

2010-03-02  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.arch/amd64-byte.exp: New.
	* gdb.arch/amd64-dword.exp: Likewise.
	* gdb.arch/amd64-pseudo.c: Likewise.
	* gdb.arch/amd64-word.exp: Likewise.
	* gdb.arch/i386-byte.exp: Likewise.
	* gdb.arch/i386-pseudo.c: Likewise.
	* gdb.arch/i386-word.exp: Likewise.
2010-03-02 13:14:36 +00:00
Daniel Jacobowitz f5dff77744 * gdbtypes.c (append_composite_type_field_raw): New.
(append_composite_type_field_aligned): Use the new function.
	* gdbtypes.h (append_composite_type_field_raw): Declare.
	* target-descriptions.c (struct tdesc_type_field): Add start and end.
	(struct tdesc_type_flag): New type.
	(struct tdesc_type): Add TDESC_TYPE_STRUCT and TDESC_TYPE_FLAGS to
	kind.  Add size to u.u.  Add u.f for flags.
	(tdesc_gdb_type): Handle TDESC_TYPE_STRUCT and TDESC_TYPE_FLAGS.
	(tdesc_free_type): Likewise.
	(tdesc_create_struct, tdesc_set_struct_size, tdesc_create_flags): New.
	(tdesc_add_field): Handle TDESC_TYPE_STRUCT.
	(tdesc_add_bitfield, tdesc_add_flag): New.
	* target-descriptions.h (tdesc_create_struct, tdesc_set_struct_size)
	(tdesc_create_flags, tdesc_add_bitfield, tdesc_add_flag): Declare.
	* xml-tdesc.c (struct tdesc_parsing_data): Rename current_union to
	current_type.  Add current_type_size and current_type_is_flags.
	(tdesc_start_union): Clear the new fields.
	(tdesc_start_struct, tdesc_start_flags): New.
	(tdesc_start_field): Handle struct fields, including bitfields.
	(field_attributes): Make type optional.  Add start and end.
	(union_children): Rename to struct_union_children.
	(union_attributes): Rename to struct_union_attributes.  Add optional
	size.
	(flags_attributes): New.
	(feature_children): Add struct and flags.
	* features/gdb-target.dtd: Add flags and struct to features.
	Make field type optional.  Add field start and end.

	doc/
	* gdb.texinfo (Types): Describe <struct> and <flags>.

	testsuite/
	* gdb.xml/extra-regs.xml: Add struct1, struct2, and flags
	types.  Add structreg, bitfields, and flags registers.
	* gdb.xml/tdesc-regs.exp: Test structreg and bitfields
	registers.
2010-03-01 17:19:23 +00:00
H.J. Lu 90884b2b1f Enable XML target descriptions for x86.
gdb/

2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-linux-nat.c (AMD64_LINUX_USER64_CS): New.
	(amd64_linux_read_description): Likewise.
	(_initialize_amd64_linux_nat): Set to_read_description to
	amd64_linux_read_description.

	* amd64-linux-tdep.c: Include "features/i386/amd64-linux.c".
	(amd64_linux_register_name): Removed.
	(amd64_linux_register_type): Likewise.
	(amd64_linux_core_read_description): New.
	(amd64_linux_init_abi): Set target description to
	tdesc_amd64_linux if needed.  Support orig_rax in target
	description.  Don't call set_gdbarch_register_name nor
	set_gdbarch_register_type.  Call
	set_gdbarch_core_read_description.
	(_initialize_amd64_linux_tdep): Call
	initialize_tdesc_amd64_linux.

	* amd64-linux-tdep.h (tdesc_amd64_linux): New.

	* amd64-tdep.c:  Include "features/i386/amd64.c".
	(amd64_register_names): Removed.
	(amd64_register_name): Likewise.
	(amd64_register_type): Likewise.
	(amd64_init_abi):  Set num_core_regs and register_names.  Set
	target description to tdesc_amd64 if needed.  Don't call
	set_gdbarch_register_name nor set_gdbarch_register_type.
	(_initialize_amd64_tdep): New.

	* i386-linux-nat.c (i386_linux_read_description): New.
	(_initialize_i386_linux_nat): Set to_read_description to
	i386_linux_read_description.

	* i386-linux-tdep.c: Include "features/i386/i386-linux.c".
	(i386_linux_register_name): Removed.
	(i386_linux_core_read_description): New.
	(i386_linux_read_description): Likewise.
	(i386_linux_init_abi): Don't call set_gdbarch_register_name.
	Set target description to tdesc_i386_linux if needed.  Support
	orig_eax.  Set register_reggroup_p.  Call
	set_gdbarch_core_read_description.
	(_initialize_i386_linux_tdep): Call initialize_tdesc_i386_linux.

	* i386-linux-tdep.h (tdesc_i386_linux): New.

	* i386-nto-tdep.c (i386nto_regset_id): Replace I386_NUM_FREGS
	with I387_NUM_REGS.

	* i386-tdep.c: Include "features/i386/i386.c".
	(i386_register_names): Make it const.
	(i386_mmx_names): Likewise.
	(i386_num_register_names): Removed.
	(i386_register_name): Likewise.
	(i386_eflags_type): Likewise.
	(i386_mxcsr_type): Likewise.
	(i386_sse_type): Likewise.
	(i386_register_type): Likewise.
	(i387_ext_type): Call tdesc_find_type instead of arch_float_type.
	(i386_pseudo_register_name): New.
	(i386_pseudo_register_type): Likewise.
	(i386_mmx_type): Make it static.
	(i386_gdbarch_init): Check arch.  Replace I386_NUM_FREGS with
	I387_NUM_REGS.  Set num_core_regs and register_names.  Don't
	call set_gdbarch_register_name nor set_gdbarch_register_type.
	Set register_reggroup_p.  Set target description to tdesc_i386
	if needed.  Call set_tdesc_pseudo_register_type,
	set_tdesc_pseudo_register_name and tdesc_use_registers.
	(_initialize_i386_tdep): Call initialize_tdesc_i386.
	initialize_tdesc_x86_64.

	* i386-tdep.h (gdbarch_tdep): Remove i386_eflags_type,
	i386_mxcsr_type and i386_sse_type.  Add num_core_regs,
	register_names, tdesc and register_reggroup_p.
	(I386_NUM_FREGS): Removed.
	(i386_eflags_type): Likewise.
	(i386_mxcsr_type): Likewise.
	(i386_mmx_type): Likewise.
	(i386_sse_type): Likewise.
	(i386_register_name): Likewise.
	(i386_regnum): Add I386_MXCSR_REGNUM.
	(I386_SSE_NUM_REGS): Defined with I386_MXCSR_REGNUM.

	* i387-tdep.h (I387_NUM_REGS): New.

	* regformats/i386/i386-linux.dat: Generated.
	* regformats/i386/i386.dat: Likewise.
	* regformats/i386/amd64-linux.dat: Likewise.
	* regformats/i386/amd64.dat: Likewise.

	* regformats/reg-i386-linux.dat: Removed.
	* regformats/reg-i386.dat: Likewise.
	* regformats/reg-x86-64-linux.dat: Likewise.
	* regformats/reg-x86-64.dat: Likewise.

gdb/gdbserver/

2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
	reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
	i386-linux.c and amd64-linux.c.
	(reg-i386.o): Removed.
	(reg-i386.c): Likewise.
	(reg-i386-linux.o): Likewise.
	(reg-i386-linux.c): Likewise.
	(reg-x86-64.o): Likewise.
	(reg-x86-64.c): Likewise.
	(reg-x86-64-linux.o): Likewise.
	(reg-x86-64-linux.c): Likewise.
	(i386.o): New.
	(i386.c): Likewise.
	(i386-linux.o): Likewise.
	(i386-linux.c): Likewise.
	(amd64.o): Likewise.
	(amd64.c): Likewise.
	(amd64-linux.o): Likewise.
	(amd64-linux.c): Likewise.

	* configure.srv (srv_i386_regobj): New.
	(srv_i386_linux_regobj): Likewise.
	(srv_amd64_regobj): Likewise.
	(srv_amd64_linux_regobj): Likewise.
	(srv_i386_32bit_xmlfiles): Likewise.
	(srv_i386_64bit_xmlfiles): Likewise.
	(srv_i386_xmlfiles): Likewise.
	(srv_amd64_xmlfiles): Likewise.
	(srv_i386_linux_xmlfiles): Likewise.
	(srv_amd64_linux_xmlfiles): Likewise.
	(i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
	srv_xmlfiles to $srv_i386_xmlfiles.
	(i[34567]86-*-mingw32ce*): Likewise.
	(i[34567]86-*-mingw*): Likewise.
	(i[34567]86-*-nto*): Likewise.
	(i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
	and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
	$srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
	(x86_64-*-linux*): Likewise.

	* linux-x86-low.c (init_registers_x86_64_linux): Removed.
	(init_registers_amd64_linux): New.
	(x86_arch_setup): Replace init_registers_x86_64_linux with
	init_registers_amd64_linux.

gdb/testsuite/

2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.xml/tdesc-regs.exp (architecture): New.  Set it for x86.
	(load_description): Set architecture if defined.
2010-03-01 15:33:32 +00:00
Phil Muldoon dc00d89fd0 2010-02-28 Phil Muldoon <pmuldoon@redhat.com>
PR python/11036
	* python/py-frame.c (frapy_read_var): Add block argument and logic
	to cope with user provided blocks.

2010-02-28  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Frames In Python): Add block parameter and
	description to read_var text.

2010-02-28  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-frame.exp: Add read_var block tests.
	* gdb.python/py-frame.c (block): New function.
2010-02-28 21:56:50 +00:00
Jan Kratochvil 0e095b7eee gdb/
* infcall.c (call_function_by_hand): Remove gdb_assert on sp and old_sp.
	New comment.

gdb/testsuite/
	* gdb.base/callfuncs.exp: New tests for $spval 0 and -1.  Remove return.
2010-02-28 17:56:37 +00:00
David S. Miller 624f1a6562 gdb: Enable catch syscall test on sparc*-*-liunx and fix logic bug.
gdb/testsuite/

2010-02-25  David S. Miller  <davem@davemloft.net>

	* gdb.base/catch-syscall.exp: Allow to run on sparc*-*-linux and
	fix logic for setting all_syscalls_numbers.
2010-02-26 05:50:35 +00:00
Phil Muldoon f3e9a8177c 2010-02-24 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* python/python.c (_initialize_python): Call
	gdbpy_initialize_symtabs, gdbpy_initialize_symbols and
	gdbpy_initialize_blocks.
	* python/python-internal.h: Declare struct symbol, block and
	symtab_and_line.  Declare block_object_type and
	symbol_object_type
	(gdbpy_lookup_symbol gdbpy_block_for_pc)
	(symtab_and_line_to_sal_object, symtab_to_symtab_object)
	(symbol_to_symbol_object,  block_to_block_object)
	(gdbpy_initialize_symtabs,gdbpy_initialize_symbols)
	(gdbpy_initialize_blocks ): Declare.
	* python/py-frame.c (frapy_block, frapy_function, frapy_find_sal)
	(frapy_select): Add methods.
	(frapy_read_var): Add symbol branch.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-symbol, py-symtab,
	py-block.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-symbol.o): New rule.
	(py-symtab.o): Likewise.
	(py-block.o): Likewise.
	* python/py-symbol.c: New file.
	* python/py-symtab.c: Likewise.
	* python/py-block.c: Likewise.


2010-02-24  Phil Muldoon  <pmuldoon@redhat.com>

	* Makefile.in: Add py-block and py-symbol.
	* gdb.python/py-symbol.exp: New File.
	* gdb.python/py-symtab.exp: New File.
	* gdb.python/py-block.exp: New File.
	* gdb.python/py-symbol.c: New File.
	* gdb.python/py-block.c: New File.


2010-02-24  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Frames In Python): Add block, find_sal, function
	and select method descriptions.
	(Python API): Add Blocks In Python, Symbols in Python and Symbol
	Tables in Python to menu.
	(Blocks In Python): New node.
	(Symbols In Python): New node.
	(Symbol Tables in Python): New node.
2010-02-24 21:18:28 +00:00
Phil Muldoon f6bbabf054 2010-02-24 Phil Muldoon <pmuldoon@redhat.com>
PR python/11314
	* lib/gdb.exp (skip_python_tests): New function.
	* gdb.python/py-cmd.exp: Use skip_python_tests.
	* gdb.python/py-frame.exp: Likewise.
	* gdb.python/py-function.exp: Likewise.
	* gdb.python/py-prettyprint.exp: Likewise.
	* gdb.python/py-template.exp: Likewise.
	* gdb.python/py-type.exp: Likewise.
	* gdb.python/py-value.exp: Likewise.
2010-02-24 11:11:17 +00:00
Vladimir Prus a79b8f6ea8 Multiexec MI
* breakpoint.c (clear_syscall_counts): Take struct inferior*.
	* inferior.c (add_inferior_silent): Notify inferior_added
	observer.
	(delete_inferior_1): Notify inferior_removed observer.
	(exit_inferior_1): Pass inferior, not pid, to observer.
	(inferior_appeared): Likewise.
	(add_inferior_with_spaces): New.
	(add_inferior_command): Use the above.
	* inferior.h (delete_inferior_1, add_inferior_with_spaces):
	Declare.

	* inflow.c (inflow_inferior_exit): Likewise.
	* jit.c (jit_inferior_exit_hook): Likewise.

	* mi/mi-cmds.c (mi_cmds): Register add-inferior and
	remove-inferior.
	* mi/mi-cmds.h (mi_cmd_add_inferior, mi_cmd_remove_inferior): New.
	* mi/mi-interp.c (mi_inferior_added, mi_inferior_removed): New.
	(report_initial_inferior): New.
	(mi_inferior_removed): Register the above. Make sure
	inferior_added observer is called on the first inferior.
	(mi_new_thread, mi_thread_exit): Thread group is now identified by
	inferior number, not pid.
	(mi_solib_loaded, mi_solib_unloaded): Report which inferiors are
	affected.
	* mi/mi-main.c (current_context): New.
	(proceed_thread_callback): Use typed closure.
	Proceed everything if pid is 0. Most implementation split into
	(proceed_thread): ... this.
	(run_one_inferior): New.
	(mi_cmd_exec_continue, mi_cmd_exec_interrupt, mi_cmd_exec_run):
	Adjust for multiexec behaviour.
	(mi_cmd_add_inferior, mi_cmd_remove_inferior): New.
	(mi_cmd_execute): Handle the 'thread-group' option here.
	Do some extra checks.
	* mi-parse.c (mi_parse): Handle the --all and --thread-group
	options.
	* mi-parse.h (struct mi_parse): New fields all and thread_group.
2010-02-24 07:51:46 +00:00
Pedro Alves 85d721b88f 2010-02-22 Pedro Alves <pedro@codesourcery.com>
PR9605

	gdb/
	* breakpoint.c (insert_bp_location): If inserting the read
	watchpoint failed, fallback to an access watchpoint.
	(bpstat_check_watchpoint): Stop for read watchpoint triggers even
	if the value changed, if not watching the same memory for writes.
	(watchpoint_locations_match): Add comment.
	(update_global_location_list): Copy the location's watchpoint type.
	* i386-nat.c (i386_length_and_rw_bits): It's an internal error to
	handle read watchpoints here.
	(i386_insert_watchpoint): Read watchpoints aren't supported.
	* remote.c (remote_insert_watchpoint): Return 1 for unsupported
	packets.
	* target.h (target_insert_watchpoint): Update description.

2010-02-22  Pedro Alves  <pedro@codesourcery.com>

	PR9605

	gdbserver/
	* i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
	handing a read watchpoint.
	(i386_low_insert_watchpoint): Read watchpoints aren't supported.

2010-02-22  Pedro Alves  <pedro@codesourcery.com>

	PR9605

	gdb/testsuite/
	* gdb.base/watch-read.c, gdb.base/watch-read.exp: New files.
2010-02-22 23:35:17 +00:00
Tom Tromey 48e32051ca gdb
PR c++/8693, PR c++/9496:
	* cp-namespace.c (cp_lookup_nested_type): Handle TYPE_CODE_UNION.
	* c-exp.y (lex_one_token): Rename from yylex.  Don't call
	write_dollar_variable.  Don't try to classify NAME tokens.
	(token_and_value): New type.
	(token_fifo, popping, name_obstack): New globals.
	(classify_name): New function.
	(classify_inner_name): Likewise.
	(yylex): Likewise.
	(VARIABLE): Now has type sval.
	(exp : VARIABLE): Call write_dollar_variable.
	(qualified_name): Use TYPENAME, not typebase.  Add production for
	multiple "::" instances.
	(variable): Use name_not_typename.
	(qualified_type): Remove.
	(typebase): Update.
gdb/testsuite
	PR c++/8693, PR c++/9496:
	* gdb.cp/namespace.exp: Remove some setup_kfail calls.  Added
	regression tests.
2010-02-19 20:22:03 +00:00
Jan Kratochvil ac9c004837 gdb/testsuite/
Fix compatibility with m68k as.
	* gdb.dwarf2/member-ptr-forwardref.S: Use .data section.  Use .2byte.
	Use only /* comments */.
2010-02-19 19:14:18 +00:00
Ulrich Weigand 57bb97a492 testsuite/
* configure.ac: Add gdb.multi/Makefile to AC_OUTPUT.
	* configure: Regenerate.
2010-02-19 17:13:21 +00:00
Daniel Jacobowitz 7d1bf85cc5 * gdb.python/py-type.exp: Check for Python support. 2010-02-18 15:27:35 +00:00
Pedro Alves 061b528517 * lib/gdb.exp (build_id_debug_filename_get): Don't assume new
`regsub' syntax available.
2010-02-17 23:07:24 +00:00
Pedro Alves f8a8bc2ce4 * gdb.base/shmain.c (main): Remove printf call.
* gdb.base/sizeof.c (main): Cast return of sizeof to int.
	* gdb.base/unload.c (main): Make format of fprintf a string
	literal.  Add missing endlines to prints to stderr.
	* gdb.base/watchpoint-solib.c (open_shlib): Ditto.
2010-02-17 22:55:40 +00:00
Tom Tromey 6f451e5ec4 gdb
* objfiles.c (gdb_bfd_ref): Handle abfd==NULL.
gdb/testsuite
	* gdb.java/jprint.java (jprint.props): New field.
	* gdb.java/jprint.exp (set_lang_java): Add regression test.
2010-02-17 22:25:05 +00:00
Pedro Alves ef801a0e1d Use tab, not spaces. 2010-02-17 22:09:05 +00:00
Pedro Alves 12d79008ef * gdb.base/charset.exp: Don't assume new `regsub' syntax
available.
2010-02-17 22:05:58 +00:00
Daniel Jacobowitz d252f7e5ab gdb/testsuite/
* gdb.xml/tdesc-arch.exp, gdb.xml/tdesc-regs.exp: Rewrite file
	creation to support remote host testing.
2010-02-16 21:26:48 +00:00
Daniel Jacobowitz 67bdab6cc5 gdb/testsuite/
* gdb.base/valgrind-db-attach.exp: Use unsupported instead of xfail.
	Recognize "command not found".
2010-02-16 21:22:46 +00:00
Daniel Jacobowitz bb3912236d gdb/testsuite/
* gdb.arch/thumb2-it.exp (test_it_break): Handle hardware
	single-stepping.
2010-02-16 21:20:14 +00:00
Daniel Jacobowitz 70362913a3 * gdb.python/py-value.exp (test_value_in_inferior): Skip arg0 test
if arguments are not supported.
2010-02-16 21:13:10 +00:00
Daniel Jacobowitz 493f3c00fe gdb/testsuite/
* gdb.cp/overload.exp: Allow foo::overload1arg's "this" pointer to
	be const or non-const.
2010-02-16 21:09:32 +00:00
Daniel Jacobowitz 8034c7498c gdb/testsuite/
* gdb.mi/mi-break.exp (test_breakpoint_commands): Use
	mi_send_resuming_command to send -exec-continue.
2010-02-16 21:08:10 +00:00
Daniel Jacobowitz 791dfb6488 gdb/
* linespec.c (decode_line_1): Handle FILE:FUNCTION even if
	FUNCTION contains parentheses.  Improve removal of a trailing
	single quote.

	gdb/testsuite/
	* gdb.base/list.exp (test_list_filename_and_function): Add test
	with single quotes.
	* gdb.cp/overload.cc (intToChar): Rewrite onto one line for easy
	matching.
	* gdb.cp/overload.exp: Add tests with filename, function, and quotes.
	Add KFAIL'd tests for PR gdb/11289.
2010-02-16 20:51:51 +00:00
Daniel Jacobowitz 7c5fe86876 gdb/testsuite/
* gdb.cp/cpcompletion.exp: Specify source file name explicitly.
2010-02-16 20:23:43 +00:00
Daniel Jacobowitz fdc498b81c gdb/testsuite/
* gdb.base/comp-dir/subdir/dummy.txt: New file.
	* gdb.base/completion.exp: Use comp-dir/subdir instead of creating
	a temporary directory.
2010-02-16 20:18:53 +00:00
Daniel Jacobowitz b519e2a636 gdb/testsuite/
* gdb.base/charset.exp: Use a single regular expression to match
	show host-charset and show target-charset output.
2010-02-16 20:13:14 +00:00
Jan Kratochvil 74164c5624 gdb/
* defs.h (parse_pid_to_attach): New.
	* utils.c (parse_pid_to_attach): New.
	* darwin-nat.c (darwin_attach): Replace ARGS parsing by parse_pid.
	* gnu-nat.c (gnu_attach): Likewise.
	* nto-procfs.c (procfs_attach): Likewise.
	* procfs.c (procfs_attach): Likewise.
	* windows-nat.c (windows_attach): Likewise.
	* inf-ptrace.c (inf_ptrace_attach): Likewise.  Remove variable dummy.
	* inf-ttrace.c (inf_ttrace_attach): Likewise.
	* remote.c (extended_remote_attach_1): Likewise.  New comment on getpid
	check.

gdb/testsuite/
	* gdb.base/attach.exp (attach to nonsense is prohibited): Make the
	"Illegal process-id" expect string more exact.
	(attach to digits-starting nonsense is prohibited): New.
2010-02-15 17:35:50 +00:00
Jan Kratochvil 701ed6dcfb gdb/
* solib-svr4.c: (LM_ADDR_CHECK): Print successful prelink adjustment
	only if INFO_VERBOSE.

gdb/testsuite/
	* gdb.base/prelink.exp (set verbose on): New.
2010-02-13 12:02:29 +00:00
Michael Snyder fa19b4e579 2010-02-12 Tomas Holmberg <th@virtutech.com>
* mi-reverse.exp: New file. Test for reverse option to the
	following MI commands: exec-continue, exec-finish, exec-next,
	exec-step, exec-next-instruction, exec-step-instruction.
2010-02-12 21:39:27 +00:00
Joel Brobecker dadf0e9c7a * gdb.ada/ptype_tagged_param: New testcase. 2010-02-09 13:16:33 +00:00
Tom Tromey 714f19d557 gdb
PR c++/8017:
	* value.h: Update.
	* valops.c (search_struct_field): Make 'name' const.
	(search_struct_method): Likewise.
	(find_method_list): Make 'method' const.
	(value_struct_elt): Make 'name' and 'err' const.
	(value_find_oload_method_list): Make 'method' const.
	(find_overload_match): Make 'name' const.
	* eval.c (evaluate_subexp_standard): New locals function,
	function_name.
	<OP_FUNCALL>: Handle OP_SCOPE specially.
gdb/testsuite
	PR c++/8017:
	* gdb.cp/overload.exp: Add tests.
	* gdb.cp/overload.cc (struct K): New.
	(namespace N): New.
	(main): Call new functions.
	(K::staticoverload): Define.
2010-02-08 20:55:43 +00:00
Chris Moller 83b10087f4 PR gdb/10728
* valarith.c (value_ptrdiff): Added a test for a zero type length,
	warn if found, and assume length = 1.
* gdb.cp/pr10728-x.h: New file.
* gdb.cp/pr10728-x.cc: New file.
* gdb.cp/pr10728-y.cc: New file.
* gdb.cp/pr10728.exp: New file.
* gdb.cp/Makefile.in (EXECUTABLES): Add pr10728
2010-02-08 18:27:53 +00:00
Chris Moller 99903ae39e PR gdb/9067
* cp-valprint.c (cp_print_value_fields) Fix use of obstacks.
	cp_print_static_field)  Fix use of obstacks.
* gdb.cp/pr9067.exp:  New
* gdb.cp/pr9067.cc:   New
* gdb.cp/Makefile.in (EXECUTABLES): Add pr9067
2010-02-08 18:04:17 +00:00
Joel Brobecker 7b356089ca * lib/gdb.exp (gdb_test_timeout): New global variable.
Set it to timeout if not already set.
        (gdb_init): Reset the value of timeout to gdb_test_timeout.
2010-02-08 11:33:54 +00:00
Doug Evans 1be008824d testsuite/
* lib/gdb.exp (INTERNAL_GDBFLAGS): Don't override value provided by
	user.
	doc/
	* gdbint.texinfo (Testsuite): Document INTERNAL_GDBFLAGS.
2010-02-05 21:51:38 +00:00
Sami Wagiaalla 8285698016 2010-02-05 Sami Wagiaalla <swagiaal@redhat.com>
PR c++/7935:
	* gdb.cp/namespace-using.exp: Removed kfail; bug has been fixed.

2010-02-05  Sami Wagiaalla  <swagiaal@redhat.com>

	PR c++/7935:
	* cp-support.h: Added char* alias element to using_direct data
	struct.
	(cp_add_using): Added char* alias argument.
	(cp_add_using_directive): Ditto.
	* cp-namespace.c: Updated with the above changes.
	(cp_lookup_symbol_imports): Check for aliases.
	* dwarf2read.c (read_import_statement): Figure out local alias
	for the import and pass it on to cp_add_using.
	(read_namespace): Pass alias argument to cp_add_using.
2010-02-05 19:03:42 +00:00
Tom Tromey 1a334831c0 gdb
* valops.c (search_struct_field): Account for
	value_embedded_offset.  Fix check for virtual base past the end of
	the object.  Use value_copy when making a slice of the value.
gdb/testsuite
	* gdb.cp/virtbase.exp: Make test case names unique.
2010-02-04 21:04:30 +00:00
Tom Tromey 9c3c02fd15 gdb
* valops.c (value_cast_structs): Try downcasting using the RTTI
	type.
gdb/testsuite
	* gdb.cp/virtbase.exp: Add regression tests.
	* gdb.cp/virtbase.cc (RHA, RHB, RHC): New classes.
	(main): Instantiate RHC.
2010-02-02 23:40:28 +00:00
Tom Tromey 0cc2414c91 gdb
* m2-typeprint.c (m2_record_fields): Don't use
	TYPE_DECLARED_TYPE.
	* gdbtypes.h (TYPE_DECLARED_CLASS): New macro.
	(struct main_type) <flag_declared_class>: New field.
	(struct cplus_struct_type) <declared_type>: Remove.
	<ntemplate_args>: Move earlier.
	(DECLARED_TYPE_CLASS, DECLARED_TYPE_UNION, DECLARED_TYPE_STRUCT)
	(DECLARED_TYPE_TEMPLATE): Remove.
	(TYPE_DECLARED_TYPE): Remove.
	* gdbtypes.c (lookup_union): Don't use TYPE_DECLARED_TYPE.
	* dwarf2read.c (read_structure_type): Set TYPE_DECLARED_CLASS.
	* c-typeprint.c (c_type_print_base): Use TYPE_DECLARED_CLASS, not
	TYPE_DECLARED_TYPE.
gdb/testsuite
	* gdb.dwarf2/member-ptr-forwardref.exp: Update expected result for
	type-printing change.
2010-02-02 16:47:14 +00:00
Tom Tromey edf3d5f3f8 gdb
PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890:
	* valops.c (search_struct_field): Compute nbases after calling
	CHECK_TYPEDEF.
	(check_field): Call CHECK_TYPEDEF.
	* cp-valprint.c (cp_print_value): Pass correct address to
	baseclass_offset.  Fix check for virtual base past the end of the
	object.  Don't offset address passed to cp_print_value_fields or
	apply_val_pretty_printer.
	(cp_print_value_fields): Fix call to val_print.
	(cp_print_value_fields_rtti): New function.
	* c-valprint.c (c_val_print): Use cp_print_value_fields_rtti.
	* p-valprint.c (pascal_object_print_value_fields): Fix call to
	val_print.
	* python/py-prettyprint.c (apply_val_pretty_printer): Add embedded
	offset to address.
	* language.h (struct language_defn) <la_val_print>: Document.
	* c-lang.h (cp_print_value_fields_rtti): Declare.
gdb/testsuite
	PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890:
	* gdb.cp/virtbase.cc: New file.
	* gdb.cp/virtbase.exp: New file.
	* gdb.cp/userdef.exp: Allow 'struct' or 'class'.
2010-02-02 16:45:17 +00:00
Jan Kratochvil e4b7f41c57 gdb/
PR libc/11214:
	* linux-low.c (linux_tracefork_child) [!(__UCLIBC__ && HAS_NOMMU)]: New.
	(linux_test_for_tracefork): Move `stack' into [__UCLIBC__ && HAS_NOMMU].
	(linux_test_for_tracefork) [!(__UCLIBC__ && HAS_NOMMU)]: New.

gdb/testsuite/
	PR libc/11214:
	* gdb.threads/current-lwp-dead.c: Include features.h.
	(HAS_NOMMU): New.
	(fn, main): Move CLONE_VM into [__UCLIBC__ && HAS_NOMMU].
2010-02-01 20:19:06 +00:00
Jan Kratochvil b381ea14bd gdb/
* solib-svr4.c (scan_dyntag): New variable dyn_addr.  Replace gdb_assert
	by a conditional setting DYN_ADDR.  Use DYN_ADDR.
	* config/djgpp/fnchange.lst: Add translations for
	symbol-without-target_section.exp and symbol-without-target_section.c.

gdb/testsuite/
	* gdb.base/symbol-without-target_section.exp,
	gdb.base/symbol-without-target_section.c: New.
2010-02-01 19:27:55 +00:00
Daniel Jacobowitz c593ac0e23 * gdb.base/bigcore.exp: Reset increased timeout.
* gdb.base/interrupt.exp: Match unexpected gdb prompt.
2010-02-01 17:51:18 +00:00
Daniel Jacobowitz db25f29d62 * gdb.base/gcore.exp (capture_command_output): Use
gdb_test_multiple.
2010-02-01 17:15:36 +00:00
Daniel Jacobowitz f9d67f435f * arm-tdep.c (arm_find_mapping_symbol): New function, from
arm_pc_is_thumb.
	(arm_pc_is_thumb): Use arm_find_mapping_symbol.
	(extend_buffer_earlier): New function.
	(MAX_IT_BLOCK_PREFIX, IT_SCAN_THRESHOLD): New constants.
	(arm_adjust_breakpoint_address): New function.
	(arm_gdbarch_init): Register arm_adjust_breakpoint_address.

	testsuite/
	* gdb.arch/thumb2-it.S (it_breakpoints): New function.
	* gdb.arch/thumb2-it.exp (test_it_break): New function.
	(Top level): Call it.
2010-02-01 16:16:30 +00:00
Daniel Jacobowitz 177321bd85 * arm-linux-tdep.c (arm_linux_thumb2_be_breakpoint)
(arm_linux_thumb2_le_breakpoint): New constants.
	(arm_linux_init_abi): Set thumb2_breakpoint and
	thumb2_breakpoint_size.
	* arm-tdep.c (thumb_insn_size, thumb_advance_itstate): New functions.
	(thumb_get_next_pc): Add a comment.  Rename IT to ITSTATE.
	Implement support for single stepping through IT blocks if
	a 32-bit Thumb breakpoint instruction is available.
	(arm_breakpoint_from_pc): If a 32-bit Thumb breakpoint instruction
	is available, use it when needed.
	(arm_remote_breakpoint_from_pc): New function.
	(arm_gdbarch_init): Register arm_remote_breakpoint_from_pc.
	* arm-tdep.h (struct gdbarch_tdep): Correct thumb_breakpoint
	comment.  Add thumb2_breakpoint and thumb2_breakpoint_size.

	gdbserver/
	* linux-arm-low.c (thumb_breakpoint_len): Delete.
	(thumb2_breakpoint): New.
	(arm_breakpoint_at): Check for Thumb-2 breakpoints.

	testsuite/
	* gdb.arch/thumb2-it.S, gdb.arch/thumb2-it.exp: New files.
2010-02-01 16:13:17 +00:00
Daniel Jacobowitz 97f2ed50d0 * gdb.base/call-strs.exp, gdb.base/default.exp,
gdb.base/ending-run.exp, gdb.base/finish.exp, gdb.base/funcargs.exp,
	gdb.base/huge.exp, gdb.base/nodebug.exp, gdb.base/ptype.exp,
	gdb.base/restore.exp, gdb.base/return.exp, gdb.base/setvar.exp,
	gdb.base/watchpoints.exp, gdb.threads/gcore-thread.exp,
	gdb.base/watchpoint-solib.exp: Save and restore timeout.
	* gdb.base/ending-run.exp: Correct restore of timeout.
	* gdb.base/page.exp: Remove unnecessary timeout setting.
2010-01-29 15:38:38 +00:00
Joel Brobecker e4e2711a4a amd64 - function returning record with field straddling 2 registers
gdb/ChangeLog:

        From Paul Hilfinger  <hilfinger@adacore.com>
        * amd64-tdep.c (amd_classify_aggregate): Handle the case of
        a record of length <= 16 in which a field straddles the two
        eightbytes.

gdb/testsuite/ChangeLog:

        * gdb.ada/rec_return: New testcase.
2010-01-29 14:39:04 +00:00
Joel Brobecker ba581dc13b amd64: Integer parameters in function calls on Windows.
gdb/ChangeLog:

        * i386-tdep.h (enum amd64_reg_class): New, moved here from
        amd64-tdep.c.
        (struct gdbarch_tdep): Add fields call_dummy_num_integer_regs,
        call_dummy_integer_regs, and classify.
        * amd64-tdep.h (amd64_classify): Add declaration.
        * amd64-tdep.c (amd64_dummy_call_integer_regs): New static constant.
        (amd64_reg_class): Delete, moved to i386-tdep.h.
        (amd64_classify): Make non-static.  Move declaration to amd64-tdep.h.
        Replace call to amd64_classify by call to tdep->classify.
        (amd64_push_arguments): Get the list of registers to use for
        passing integer parameters from the gdbarch tdep structure,
        rather than using a hardcoded one.  Replace calls to amd64_classify
        by calls to tdep->classify.
        (amd64_push_dummy_call): Get the register number used for
        the "hidden" argument from tdep->call_dummy_integer_regs.
        (amd64_init_abi): Initialize tdep->call_dummy_num_integer_regs
        and tdep->call_dummy_integer_regs.  Set tdep->classify.
        * amd64-windows-tdep.c: Add include of gdbtypes.h.
        (amd64_windows_dummy_call_integer_regs): New static global.
        (amd64_windows_classify): New function.
        (amd64_windows_init_abi): Initialize tdep->call_dummy_num_integer_regs
        tdep->call_dummy_integer_regs and tdep->classify.

gdb/testsuite/ChangeLog:

        * gdb.ada/call_pn: New testcase.
2010-01-29 05:19:23 +00:00
Daniel Jacobowitz 4ea95be9cd * gdb.mi/mi-nonstop.exp (mi_nonstop_resume): New function.
(Top level): Use it to resume.
	* lib/mi-support.exp (mi_send_resuming_command_raw): Recognize
	the Thumb mode displaced stepping error as unsupported.
2010-01-28 22:14:12 +00:00
Sami Wagiaalla df83a9bf8b 2010-01-28 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/nsusing.exp: Added more tests.
    * gdb.cp/nsrecurs.exp: Ditto.
    * gdb.cp/nsusing.cc: Added test functions.
    * gdb.cp/nsrecurs.cc: Ditto.
2010-01-28 17:58:02 +00:00
Jan Kratochvil 40b27cdc59 gdb/testsuite/
* gdb.base/break-interp.exp: Use [file tail $filename] to omit any
	absolute directory pathnames in gdb.sum file.
2010-01-27 20:53:22 +00:00
Sami Wagiaalla de958931bc 2010-01-27 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/namespace-using.exp: Rename to nsusing.exp.
	* gdb.cp/namespace-using.cc: Rename to nsusing.cc.
2010-01-27 18:04:57 +00:00
Tom Tromey 708ead4e05 gdb
PR exp/7643:
	* eval.c (evaluate_subexp_for_address) <UNOP_IND>: Call
	coerce_array on result.
gdb/testsuite
	PR exp/7643:
	* gdb.base/printcmds.exp (test_print_string_constants): Remove
	setup_kfail.
2010-01-26 16:53:44 +00:00
Sami Wagiaalla b14e635ec4 2010-01-14 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/nsrecurs.exp: New test.
	* gdb.cp/nsrecurs.cc: New test program.
	* gdb.cp/nsstress.exp: New test.
	* gdb.cp/nsstress.cc: New test program.
	* gdb.cp/nsdecl.exp: New test.
	* gdb.cp/nsdecl.cc: New test program.


 2010-01-26  Sami Wagiaalla  <swagiaal@redhat.com>

	* cp-namespace.c (cp_lookup_symbol_namespace): Added
	search_parent argument.
	(cp_add_using): Initialize 'searched' field.
	(reset_directive_searched): New function.
	* cp-support.h: Add 'searched' field to using_direct struct.
	(cp_lookup_symbol_imports): Ditto.
	* cp-namespace.c (cp_lookup_symbol_imports): Ditto.
	Perform recursive search.
	Implement non parent search.
	* valops.c (value_maybe_namespace_elt): Updated.
2010-01-26 16:47:35 +00:00
Sami Wagiaalla 8540c487c6 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/namespace-using.exp: Add test for printing of namespaces
	imported into file scope.
	Marked test as xfail.
	* gdb.cp/namespace-using.cc (marker5): New function.
	* gdb.cp/shadow.exp: New test.
	* gdb.cp/shadow.cc: New test program.
	* gdb.cp/nsimport.exp: New test.
	* gdb.cp/nsimport.cc: New test program.

2010-01-26  Sami Wagiaalla  <swagiaal@redhat.com>

	PR gdb/10929:
	* dwarf2read.c (read_lexical_block_scope): Create blocks for
	scopes which contain using directives even if they contain no
	declarations.
	* symtab.c (lookup_symbol_aux): Pass lowest level block to
	la_lookup_symbol_nonlocal.
	* cp-namespace.c (cp_lookup_symbol_nonlocal): call
	cp_lookup_symbol_namespace.
	(cp_lookup_symbol_namespace): Perform an import lookup at every
	block level.
	(cp_lookup_symbol_imports): New function.
	(cp_lookup_symbol_in_namespace): New function.
2010-01-26 15:48:25 +00:00
Tom Tromey 421d5d99a3 gdb
PR gdb/11049:
	* c-valprint.c (c_val_print): Fix test of extract_unsigned_integer
	result.
gdb/testsuite
	PR gdb/11049:
	* gdb.base/printcmds.exp (test_print_typedef_arrays): Add test
	with "set print null-stop on".
2010-01-25 19:31:24 +00:00
Jan Kratochvil 691f8dc187 gdb/testsuite/
* gdb.arch/i386-bp_permanent.exp (Disassemble function '$function'):
	Adjust it for DISASSEMBLY_OMIT_FNAME.
2010-01-24 04:29:32 +00:00
Tom Tromey 0b92b5bb46 gdb
PR symtab/11199:
	* dwarf2read.c (quirk_gcc_member_function_pointer): Change return
	type and arguments.  Use smash_to_methodptr_type.
	(read_structure_type): Call quirk_gcc_member_function_pointer
	later.
	* gdbtypes.h (smash_to_methodptr_type): Declare.
	* gdbtypes.c (smash_to_methodptr_type): New function.
	(lookup_methodptr_type): Use it.
gdb/testsuite
2010-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR symtab/11199:
	* gdb.dwarf2/member-ptr-forwardref.exp,
	gdb.dwarf2/member-ptr-forwardref.S: New.
2010-01-22 17:06:49 +00:00
Jan Kratochvil 23787403e0 gdb/testsuite/
* gdb.threads/watchthreads-reorder.c (gdbstop_mutex): Remove.
	(thread1_func): Protect thread1_tid with thread1_tid_cond by
	thread1_tid_mutex.  Remove gdbstop_mutex handling.
	(thread2_func): Protect thread2_tid with thread2_tid_cond by
	thread2_tid_mutex.  Remove gdbstop_mutex handling.
	(main): Move thread1_tid_mutex and thread2_tid_mutex locks before
	pthread_create.  Remove gdbstop_mutex handling.  New comment.  Replace
	pthread_cond_wait conditionalizations by while loops.
2010-01-20 21:09:30 +00:00
Tom Tromey b966cb8abe gdb
PR backtrace/10770:
	* valarith.c (value_binop): Handle BINOP_GTR, BINOP_LEQ, and
	BINOP_GEQ.  Handle BINOP_NOTEQUAL in the signed case.
	* dwarf2expr.c (new_dwarf_expr_context): Allocate
	dwarf_stack_values, not CORE_ADDRs.
	(execute_stack_op): Change DW_OP_div and comparison operators to
	use signed operands.
gdb/testsuite
	PR backtrace/10770:
	* gdb.dwarf2/pr10770.exp: New file.
	* gdb.dwarf2/pr10770.c: New file.
	* gdb.dwarf2/Makefile.in (EXECUTABLES): Add pr10770.
2010-01-20 18:06:16 +00:00
Vladimir Prus fcae584be5 * gdb.mi/mi-async.exp: Remove check for 'async' target, because
that target was removed, and the test always runs native anyway.
2010-01-20 14:54:23 +00:00
Jan Kratochvil a0f49112e6 gdb/
* breakpoint.c (watchpoint_check): Check the call
	gdbarch_in_function_epilogue_p before calling frame_find_by_id.
	Extend the comment.
	* config/djgpp/fnchange.lst: Add translations for
	watchpoint-cond-gone.exp, watchpoint-cond-gone.c and
	watchpoint-cond-gone-stripped.c.

gdb/testsuite/
	* gdb.base/watchpoint-cond-gone.exp, gdb.base/watchpoint-cond-gone.c,
	gdb.base/watchpoint-cond-gone-stripped.c: New.
2010-01-19 20:31:38 +00:00
Tom Tromey ceeb3d5ab6 gdb
PR c++/8000:
	* dwarf2read.c (partial_die_parent_scope): Put enumeration type
	into parent scope, and enumerator into grandparent scope.
gdb/testsuite
	PR c++/8000:
	* gdb.cp/namespace.exp: Use new enum.  Fix line numbers in
	existing tests.
	* gdb.cp/namespace.cc (AAA::SomeEnum): New enum.
	(main): Use AAA::SomeEnum.
2010-01-19 18:11:19 +00:00
Jan Kratochvil dd322c54e3 gdb/testsuite/
* gdb.mi/mi-break.exp (set line_callme_head, set line_callme_body): New.
	(test_ignore_count): Declare line_callme_body global.
	(run to breakpoint with ignore count): Use line_callme_body.
	* gdb.mi/mi-cli.exp (set line_main_head, set line_main_body)
	(set line_main_hello, set line_main_return): Reindent.
	(set line_callee4_head, set line_callee4_body, set line_callee4_next):
	New.
	(continue to callee4): Use line_callee4_body.
	(check *stopped from CLI command): Use line_callee4_next.
	* gdb.mi/mi2-cli.exp (set line_main_head, set line_main_body)
	(set line_main_hello, set line_main_return): Reindent.
	(set line_callee4_head, set line_callee4_body): New.
	(continue to callee4): Use line_callee4_body.
2010-01-19 08:00:39 +00:00
Tom Tromey 4e8f195d9d gdb
PR c++/9680:
	* c-exp.y (REINTERPRET_CAST, DYNAMIC_CAST, STATIC_CAST)
	(CONST_CAST): New tokens.
	(exp): Add new productions.
	(ident_tokens): Add const_cast, dynamic_cast, static_cast, and
	reinterpret_cast.
	(is_cast_operator): New function.
	(yylex): Handle cast operators specially.
	* eval.c (evaluate_subexp_standard) <UNOP_DYNAMIC_CAST,
	UNOP_REINTERPRET_CAST>: New cases.
	* expprint.c (print_subexp_standard): Likewise.
	(op_name_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.
	* expression.h (enum exp_opcode): New constants UNOP_DYNAMIC_CAST,
	UNOP_REINTERPRET_CAST.
	* gdbtypes.c (class_types_same_p): New function.
	(is_ancestor): Use it.
	(is_public_ancestor): New function.
	(is_unique_ancestor_worker): Likewise.
	(is_unique_ancestor): Likewise.
	* gdbtypes.h (class_types_same_p, is_public_ancestor)
	(is_unique_ancestor): Declare.
	* valops.c (value_reinterpret_cast): New function.
	(dynamic_cast_check_1): Likewise.
	(dynamic_cast_check_2): Likewise.
	(value_dynamic_cast): Likewise.
	* value.h (value_reinterpret_cast, value_dynamic_cast): Declare.
gdb/testsuite
	PR c++/9680:
	* gdb.cp/casts.cc: Add new classes and variables.
	* gdb.cp/casts.exp: Test new operators.
2010-01-18 20:54:35 +00:00
Joel Brobecker 9e14a9ba25 * gdb.python/source2.py: New file.
* gdb.python/source1: New file.
        * gdb.python/python.exp: Test "source" command.
2010-01-18 06:31:24 +00:00
Stan Shebs 00bf0b8586 Add trace file support.
* tracepoint.h (enum trace_stop_reason): New enum.
	(struct trace_status): New struct.
	(parse_trace_status): Declare.
	(struct uploaded_tp): Move here from remote.c,
	add fields for actions.
	(struct uploaded_tsv): New struct.
	* tracepoint.c (tfile_ops): New target vector.
	(trace_fd): New global.
	(tfile_open): New function.
	(tfile_close): New function.
	(tfile_files_info): New function.
	(tfile_get_trace_status): New function.
	(tfile_get_traceframe_address): New function.
	(tfile_trace_find): New function.
	(tfile_fetch_registers): New function.
	(tfile_xfer_partial): New function.
	(tfile_get_trace_state_variable_value): New function.
	(init_tfile_ops): New function.
	(_initialize_tracepoint): Call it, add tfile target.
	(trace_status): New global.
	(current_trace_status): New function.
	(trace_running_p): Remove, change all users to get from
	current_trace_status()->running.
	(get_trace_status): Remove.
	(trace_status_command): Call target_get_trace_status directly,
	report more detail including tracing stop reasons.
	(trace_find_command): Always allow tfind on a file.
	(trace_find_pc_command): Ditto.
	(trace_find_tracepoint_command): Ditto.
	(trace_find_line_command): Ditto.
	(trace_find_range_command): Ditto.
	(trace_find_outside_command): Ditto.
	(trace_frames_offset, cur_offset): Declare as off_t.
	(trace_regblock_size): Rename from reg_size, update users.
	(parse_trace_status): New function.
	(tfile_interp_line): New function.
	(disconnect_or_stop_tracing): Ensure current trace
	status before asking what to do.
	(stop_reason_names): New global.
	(trace_save_command): New command.
	(get_uploaded_tp): Move here from remote.c.
	(find_matching_tracepoint): Ditto.
	(merge_uploaded_tracepoints): New function.
	(parse_trace_status): Use stop_reason_names.
	(_initialize_tracepoint): Define tsave command.
	* target.h (target_ops): New fields to_save_trace_data,
	to_upload_tracepoints, to_upload_trace_state_variables,
	to_get_raw_trace_data, change to_get_trace_status
	to take a pointer to a status struct.
	(target_save_trace_data): New macro.
	(target_upload_tracepoints): New macro.
	(target_upload_trace_state_variables): New macro.
	(target_get_raw_trace_data): New macro.
	* target.c (update_current_target): Add new methods, change
	signature of to_get_trace_status.
	* remote.c (hex2bin): Make globally visible.
	(bin2hex): Ditto.
	(remote_download_trace_state_variable): Download name also.
	(remote_get_trace_status): Update parameter, use
	parse_trace_status.
	(remote_save_trace_data): New function.
	(remote_upload_tracepoints): New function.
	(remote_upload_trace_state_variables): New function.
	(remote_get_raw_trace_data): New function.
	(remote_start_remote): Use them.
	(_initialize_remote_ops): Add operations.
	* ax-gdb.c: Include breakpoint.h.
	* breakpoint.c (create_tracepoint_from_upload): Use
	break_command_really, return tracepoint, warn about unimplemented
	parts.
	* NEWS: Mention trace file addition.

	* gdb.texinfo (Trace Files): New section.
	(Tracepoint Packets): Document QTSave and qTBuffer.
	(Trace File Format): New appendix.

	* generic/gdbtk-bp.c (gdb_trace_status): Use current_trace_status.

	* gdb.trace/tfile.c: New file.
	* gdb.trace/tfile.exp: New file.
2010-01-15 22:37:20 +00:00
Jan Kratochvil 55235ad790 gdb/
* linux-tdep.c: Remove includes gdbcore.h, observer.h and elf-bfd.h.
	(check_is_pie_binary, _initialize_linux_tdep): Remove.

gdb/testsuite/
	* gdb.base/pie-support.exp, gdb.base/pie-support.c: Remove.
2010-01-14 21:20:12 +00:00
Jan Kratochvil 9f2982ff0b gdb/
Support Valgrind attachments broken by the PIE support.
	* auxv.c: Include gdbcore.h.
	(procfs_xfer_auxv): Make static.  Reduce its comment.  Drop its
	parameters ops, object and annex.  Remove their assertions.
	(ld_so_xfer_auxv, memory_xfer_auxv): New function.
	* auxv.h (procfs_xfer_auxv): Remove comment.  Rename to ...
	(memory_xfer_auxv): ... here.
	* linux-nat.c (linux_xfer_partial): Rename procfs_xfer_auxv to
	memory_xfer_auxv.
	* procfs.c (procfs_xfer_partial): Likewise.
	* solib-svr4.c (svr4_relocate_main_executable): New prototype.
	(svr4_special_symbol_handling): Call svr4_relocate_main_executable.
	(svr4_solib_create_inferior_hook): Conditionalize the
	svr4_relocate_main_executable call.

gdb/testsuite/
	* gdb.base/valgrind-db-attach.exp, gdb.base/valgrind-db-attach.c: New.
2010-01-14 21:15:00 +00:00
Jan Kratochvil bbfba9ed15 gdb/testsuite/
* gdb.base/break-interp-lib.c: Include unistd.h, assert.h and stdio.h.
	(libfunc): New parameter action.  Implement also selectable "sleep".
	* gdb.base/break-interp-main.c: Include assert.h.
	(libfunc): New parameter action.
	(main): New parameters argc and argv.  Assert argc.  Pass argv.
	* gdb.base/break-interp.exp (test_core): Pass the "segv" argument.
	(test_attach): New proc.
	(test_ld): Pass new "segv" exec parameter.  Call also test_attach.
	* lib/gdb.exp (core_find): New parameter arg.  Pass it to $binfile.
2010-01-14 21:12:00 +00:00
Jan Kratochvil 61f0d76280 gdb/
* solib-svr4.c (scan_dyntag): Remove variable dyn_addr.  New variable
	target_section.  Find SECT in current_target_sections, gdb_assert it.
	(elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile.
	New variable abfd.
	* symtab.c (lookup_objfile_from_block): Return the binary file instead
	of separate debug info file.

gdb/testsuite/
	* gdb.base/break-interp.exp (test_core): New proc.
	(test_ld): Call it.
2010-01-14 21:09:05 +00:00
Jan Kratochvil 06a6f27066 gdb/testsuite/
* gdb.base/break-interp-main.c, gdb.base/break-interp-lib.c: New.
	* gdb.base/break-interp.exp: Exit on skip_shlib_tests.  Change $srcfile.
	New variables $binfile_lib and $srcfile_lib.  Call get_compiler_info
	and gdb_compile_shlib.  Use new -Wl compiler options.
	(dl bt, main bt): New tests.
2010-01-14 21:04:53 +00:00
Jan Kratochvil 51bee8e9b7 gdb/
Support PIEs with no symfile_objfile.
	* exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point.
	* solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block.

gdb/testsuite/
	Support PIEs with no symfile_objfile.
	* gdb.base/break-interp.exp: New argument at the test_ld calls.
	(test_ld): New parameter trynosym.
	(test_ld <$trynosym>): New block.
2010-01-14 21:01:25 +00:00
Jan Kratochvil b8040f198c gdb/
* solib-svr4.c (svr4_relocate_main_executable): Move the static exec
	code part to ...
	(svr4_static_exec_displacement): ... a new function.
	(svr4_exec_displacement): New function.
	(svr4_relocate_main_executable): Call svr4_exec_displacement.  Allocate
	new_offsets using alloca now.  Remove variable old_chain and changed.
	Call objfile_relocate unconditionally now.

gdb/testsuite/
	* gdb.base/break-interp.exp: New file.
2010-01-14 20:48:26 +00:00
Phil Muldoon be759fcf73 2010-01-13 Phil Muldoon <pmuldoon@redhat.com>
PR python/10705

	* python/python-internal.h: Add lazy_string_object_type
	definition.
	(create_lazy_string_object, gdbpy_initialize_lazy_string)
	(gdbpy_is_lazystring, gdbpy_extract_lazy_string): Define.
	* python/py-value.c (valpy_lazy_string): New function.
	(convert_value_from_python): Add lazy string conversion.
	* python/py-prettyprint.c (pretty_print_one_value): Check if
	return is also a lazy string.
	(print_string_repr): Add lazy string printing branch.
	(print_children): Likewise.
	* python/py-lazy-string.c: New file. Implement lazy strings.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_lazy_string.
	* varobj.c (value_get_print_value): Add lazy string printing
	branch.  Account for encoding.
	* c-lang.c (c_printstr): Account for new encoding argument.  If
	encoding is NULL, find encoding suited for type, otherwise use
	user encoding.
	* language.h (language_defn): Add encoding argument.
	(LA_PRINT_STRING): Likewise.
	* language.c (unk_lang_printstr): Update to reflect new encoding
	argument to language_defn.
	* ada-lang.h (ada_printstr): Likewise.
	* c-lang.h (c_printstr): Likewise.
	* p-lang.h (pascal_printstr);
	* f-lang.c (f_printstr): Likewise.
	* m2-lang.c (m2_printstr): Likewise.
	* objc-lang.c (objc_printstr): Likewise.
	* p-lang.c (pascal_printstr): Likewise.
	* scm-lang.c (scm_printstr): Likewise.
	* c-valprint.c (c_val_print): Update LA_PRINT_STRING call for
	encoding argument.
	* ada-valprint.c (ada_printstr): Likewise.
	* f-valprint.c (f_val_print): Likewise
	* m2-valprint.c (m2_val_print): Likewise.
	* p-valprint.c (pascal_val_print): Likewise.
	* expprint.c (print_subexp_standard): Likewise.
	* valprint.c (val_print_string): Likewise.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-lazy-string.
	(SUBDIR_PYTHON_SRCS): Likewise.
	(py-lazy-string.o): New rule.

2010-01-13  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Values From Inferior): Document lazy_string value
	method.
	(Python API): Add Lazy strings menu item.
	(Lazy Strings In Python): New node.

2010-01-13  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-value.exp (test_lazy_strings): Add lazy string test.
	* gdb.python/py-prettyprint.py (pp_ls): New printer.
	* gdb.python/py-prettyprint.exp (run_lang_tests): Add lazy string
	test.
	* gdb.python/py-prettyprint.c: Define lazystring test structure.
	* gdb.python/py-mi.exp: Add lazy string test.
2010-01-14 08:03:37 +00:00
Vladimir Prus dc146f7c09 Implement core awareness.
* bcache.c (compare_ints): Remove
	(print_percentage): Use compare_positive_ints.
	* defs.h (compare_positive_ints): Declare.
	* linux-nat.h (struct lin_lwp): New field core.
	(linux_nat_core_of_thread_1): Declare.
	* linux-nat.c (add_lwp): Init the 'core' field.
	(linux_nat_wait_1): Record the core.
	(linux_nat_core_of_thread_1, linux_nat_core_of_thread): New.
	(linux_nat_add_target): Register the above.
	* linux-thread-db.c (update_thread_core): New.
	(thread_db_find_new_threads): Update core information for
	every thread.
	* remote.c (struct private_thread_info): New.
	(free_private_thread_info, demand_private_info): New.
	(PACKET_qXfer_threads, use_osdata_threads): New.
	(struct thread_item, threads_parsing_context
	(start_thread, end_thread, thread_attributes)
	(thread_children, threads_children, threads_elements): New.
	(remote_threads_info): Try qXfer:threads before anything
	else.
	(remote_protocol_packets): Register qXfer:threads.
	(remote_open_1): Init use_osdata_threads.
	(struct stop_reply): New field 'core'.
	(remote_parse_stop_reply): Parse core number.
	(process_stop_reply): Record core number.
	(remote_xfer_partial): Handle qXfer:threads.
	(remote_core_of_thread): New.
	(init_remote_ops): Register remote_core_of_thread.
	(_initialize_remote): Register qXfer:read.
	* target.c (target_core_of_thread): New
	* target.h (enum target_object): New value TARGET_OBJECT_THREADS.
	(struct target_ops): New field to_core_of_threads.
	(target_core_of_thread): Declare.
	* gdbthread.h (struct thread_info): New field private_dtor.
	* thread.c (print_thread_info): Report the core.
	* ui-out.c (MAX_UI_OUT_LEVELS): Increase.
	* utils.c (compare_positive_ints): New.
	* features/threads.dtd: New.
	* mi/mi-interp.c (mi_on_normal_stop): Report the core.
	* mi/mi-main.c (struct collect_cores_data, collect_cores)
	(do_nothing, free_vector_of_osdata_items)
	(splay_tree_int_comparator, free_splay_tree): New.
	(print_one_inferior_data): Implemented printing of selected
	inferiors.  Collect and print cores.
	(output_cores): New.
	(mi_cmd_list_thread_groups): Support --recurse.  Permit specifying
	thread groups together with --available.
2010-01-12 21:40:25 +00:00
Joel Brobecker b4ba55a181 gdb/ChangeLog:
Add support for DW_AT_GNAT_descriptive_type.
        * gdbtypes.h (enum type_specific_kind): New enum.
        (struct main_type) [type_specific_field]: New component.
        [type_specific]: Add new component "gnat_stuff".
        (struct gnat_aux_type): New type.
        (INIT_CPLUS_SPECIFIC): Also set TYPE_SPECIFIC_FIELD (type).
        (HAVE_CPLUS_STRUCT): Also check TYPE_SPECIFIC_FIELD (type).
        (gnat_aux_default, allocate_gnat_aux_type): Add declaration.
        (INIT_GNAT_SPECIFIC, ALLOCATE_GNAT_AUX_TYPE, HAVE_GNAT_AUX_INFO)
        (TYPE_SPECIFIC_FIELD): New macros.
        (TYPE_CPLUS_SPECIFIC): Return cplus_struct_default if the given
        type does not hold any cplus-specific data.
        (TYPE_RAW_CPLUS_SPECIFIC): New macro.
        (TYPE_GNAT_SPECIFIC, TYPE_DESCRIPTIVE_TYPE): New macros.
        (TYPE_IS_OPAQUE): Use HAVE_CPLUS_STRUCT to check if type has
        cplus-specific data.
        * gdbtypes.c (allocate_cplus_struct_type): Minor stylistic rewrite.
        Set new component TYPE_SPECIFIC_FIELD (type).
        (gnat_aux_default): New constant.
        (allocate_gnat_aux_type): New function.
        (init_type): Add initialization the type-specific stuff for
        TYPE_CODE_FLT and TYPE_CODE_FUNC types.
        (print_gnat_stuff): New function.
        (recursive_dump_type): Use HAVE_CPLUS_STRUCT to check for cplus-
        specific data.  Adjust code that prints the contents of the
        type-specific union using the TYPE_SPECIFIC_FIELD value.
        * dwarf2read.c (dwarf2_attach_fields_to_type): Do not allocate
        the type cplus stuff for Ada types.
        (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
        Error out if these routines are called with an Ada type.
        (read_structure_type, read_array_type, read_subrange_type):
        Add call to set_descriptive_type.
        (set_die_type): Initialize the gnat-specific data if necessary.
        (need_gnat_info, die_descriptive_type, set_descriptive_type):
        New functions.
        * ada-lang.c (decode_constrained_packed_array_type): Use
        decode_constrained_packed_array_type instead of doing a standard
        lookup to locate a parallel type.
        (find_parallel_type_by_descriptive_type): New function.
        (ada_find_parallel_type_with_name): New function.
        (ada_find_parallel_type): Reimplement using
        ada_find_parallel_type_with_name.
        * ada-valprint.c (print_field_values): Use HAVE_CPLUS_STRUCT
        to check if type has a cplus stuff.
        * linespec.c (total_number_of_methods): Likewise.
        * mdebugread.c (new_type): Likewise.

gdb/testsuite/ChangeLog:

        * gdb.base/maint.exp: Adjust the expected output for the
        "maint print type" test. Use gdb_test_multiple instead of
        gdb_sent/gdb_expect.
2010-01-12 05:49:00 +00:00
Doug Evans 6496a6093d * lib/gdbserver-support.exp (gdbserver_download_current_prog): Rename
from gdbserver_download.  All callers updated.
2010-01-12 00:50:26 +00:00
Doug Evans 08e24bd4ab * gdb.server/ext-run.exp: "info os processes" requires xml support. 2010-01-12 00:48:33 +00:00
Jan Kratochvil b5cfddf53b gdb/
Implement binary numbers parsing.
	* c-exp.y (parse_number): New case 'b' and 'B'.

gdb/testsuite/
	Implement binary numbers parsing.
	* gdb.base/printcmds.exp (test_integer_literals_accepted)
	(test_integer_literals_rejected): New binary tests.
2010-01-11 17:58:16 +00:00
Ralf Wildenhues 3725885a65 Sync Libtool from GCC.
/:
	* libtool.m4: Sync from git Libtool.
	* ltmain.sh: Likewise.
	* ltoptions.m4: Likewise.
	* ltversion.m4: Likewise.
	* lt~obsolete.m4: Likewise.

sim/iq2000/:
	* configure: Regenerate.

sim/d10v/:
	* configure: Regenerate.

sim/m32r/:
	* configure: Regenerate.

sim/frv/:
	* configure: Regenerate.

sim/:
	* avr/configure: Regenerate.
	* cris/configure: Regenerate.
	* microblaze/configure: Regenerate.

sim/h8300/:
	* configure: Regenerate.

sim/mn10300/:
	* configure: Regenerate.

sim/erc32/:
	* configure: Regenerate.

sim/arm/:
	* configure: Regenerate.

sim/m68hc11/:
	* configure: Regenerate.

sim/lm32/:
	* configure: Regenerate.

sim/sh64/:
	* configure: Regenerate.

sim/v850/:
	* configure: Regenerate.

sim/cr16/:
	* configure: Regenerate.

sim/moxie/:
	* configure: Regenerate.

sim/m32c/:
	* configure: Regenerate.

sim/mips/:
	* configure: Regenerate.

sim/mcore/:
	* configure: Regenerate.

sim/sh/:
	* configure: Regenerate.

gprof/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

opcodes/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

gas/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

ld/:
	* configure: Regenerate.

gdb/testsuite/:
	* gdb.cell/configure: Regenerate.

binutils/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

bfd/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

bfd/doc/:
	* Makefile.in: Regenerate.
2010-01-09 21:11:44 +00:00
Jan Kratochvil 37aeb5df6e gdb/testsuite/
* gdb.base/corefile.exp: Move the core finding block out and call it as
	core_find, new variable $corefile, replace corefile by $corefile and
	[file tail $corefile] for usage vs. test names resp.
	* lib/gdb.exp (core_find): Move it as a new function here.  New
	parameter binfile and deletefiles.  New variable $destcore.  Pre-delete
	$destcore.  Return "" on error.
2010-01-09 00:14:11 +00:00
Jan Kratochvil d521f56333 gdb/testsuite/
Workaround PR binutils/10802.
	* lib/gdb.exp (gdb_gnu_strip_debug): Preserve the file attributes
	(twice).
2010-01-08 22:59:47 +00:00
Daniel Jacobowitz 28f2482621 * gdb.cp/gdb2495.exp: Skip if gdb,nosignals. 2010-01-08 17:48:04 +00:00
Joel Brobecker 2de75e717c * lib/gdb.exp (gdb_start_cmd): Move comment outside of gdb_expect
call, to avoid interruption.
2010-01-08 12:03:36 +00:00
Joel Brobecker fe00719b00 Fix typo in date. 2010-01-08 12:01:59 +00:00