Commit Graph

3139 Commits

Author SHA1 Message Date
Pierre Muller 09f00d9a9c * gdb.base/find.exp: Set newline variable
using quotes instead of braces to fix cygwin failures.
2009-01-27 08:22:23 +00:00
Pedro Alves 1e8fb9762b 2009-01-23 Pedro Alves <pedro@codesourcery.com>
* cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
	* cli/cli-setshow.c (do_setshow_command): Handle it.
	* command.h (enum var_types): Add var_zuinteger.
	(add_setshow_zuinteger_cmd): Declare.

	* valprint.c (_initialize_valprint): Change the set input-radix
	and set output-radix commands to zuinteger type.

2009-01-23  Pedro Alves  <pedro@codesourcery.com>

	* gdb.base/radix.exp: Add tests to ensure that that set
	input-radix 0 and set output-radix 0 are really rejected.
2009-01-23 18:47:46 +00:00
Pedro Alves da06171272 * gdb.base/hook-stop-frame.c, gdb.base/hook-stop-frame.exp: Update
copyright years.
2009-01-23 16:01:46 +00:00
Pedro Alves dd7e2d2bc7 2009-01-23 Pedro Alves <pedro@codesourcery.com>
PR gdb/9664:
	* infrun.c (normal_stop): Tag threads as stopped, and run the
	hook-stop before printing the stack frame.

2009-01-23  Pedro Alves  <pedro@codesourcery.com>

	PR gdb/9664:
	* gdb.base/hook-stop-frame.c, gdb.base/hook-stop-frame.exp: New.
2009-01-23 15:47:03 +00:00
Pedro Alves 392452f69e 2009-01-22 Pedro Alves <pedro@codesourcery.com>
PR c++/9631:
	* gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
	vbasetype.

2009-01-22  Pedro Alves  <pedro@codesourcery.com>

	PR c++/9631:
	* gdb.cp/pr9631.cc, gdb.cp/pr9631.exp: New.
2009-01-22 22:50:39 +00:00
Pierre Muller 8653e71c5e 2009-01-22 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.server/file-transfer.exp: Use EXEEXT variable for
	binfile definition to fix Windows OS failure.
2009-01-22 16:01:10 +00:00
Daniel Jacobowitz a12cc160ab PR gdb/9346
* infcmd.c (signal_command): Do not specify a resume PC.

	testsuite/
	PR gdb/9346
	* gdb.base/interrupt.c (sigint_handler): New.
	(main): Install a SIGINT handler if SIGNALS is defined.  Exit
	on error.
	* gdb.base/interrupt.exp: Define SIGNALS unless gdb,nosignals.
	Test "signal SIGINT".
2009-01-20 15:33:14 +00:00
Doug Evans b89667ebd4 * dummy-frame.c (dummy_frame): Replace regcache member with
caller_state.
	(dummy_frame_push): Replace caller_regcache arg with caller_state.
	All callers updated.
	(remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
	(dummy_frame_pop): Rewrite.  Verify requested frame is in the
	dummy frame stack.  Restore program state.
	(cleanup_dummy_frames): Rewrite.
	(dummy_frame_sniffer): Update.  Make static.
	* dummy-frame.h (regcache,frame_info): Delete forward decls.
	(inferior_thread_state): New forward decl.
	(dummy_frame_push): Update prototype.
	* frame.c (frame_pop): dummy_frame_pop now does all the work for
	DUMMY_FRAMEs.
	* infcall.c (breakpoint_auto_delete_contents): Delete.
	(get_function_name,run_inferior_call): New fns.
	(call_function_by_hand): Simplify by moving some code to
	get_function_name, run_inferior_call.  Inferior function call wrapped
	in TRY_CATCH so there's less need for cleanups and all exits from
	proceed are handled similarily.  Detect program exit.
	Detect program stopping in a different thread.
	Make error messages more consistent.
	* inferior.h (inferior_thread_state): Declare (opaque type).
	(save_inferior_thread_state,restore_inferior_thread_state,
	make_cleanup_restore_inferior_thread_state,
	discard_inferior_thread_state, get_inferior_thread_state_regcache):
	Declare.
	(save_inferior_status): Update prototype.
	* infrun.c: (normal_stop): When stopped for the completion of an
	inferior function call, verify the expected stack frame kind.
	(inferior_thread_state): New struct.
	(save_inferior_thread_state,restore_inferior_thread_state,
	do_restore_inferior_thread_state_cleanup,
	make_cleanup_restore_inferior_thread_state,
	discard_inferior_thread_state,
	get_inferior_thread_state_regcache): New functions.
	(inferior_status): Move stop_signal, stop_pc, registers to
	inferior_thread_state.  Remove restore_stack_info.
	(save_inferior_status): Remove arg restore_stack_info.
	All callers updated.  Remove saving of state now saved by
	save_inferior_thread_state.
	(restore_inferior_status): Remove restoration of state now done by
	restore_inferior_thread_state.
	(discard_inferior_status): Remove freeing of registers, now done by
	discard_inferior_thread_state.

	* gdb.base/break.exp: Update expected gdb output.
	* gdb.base/sepdebug.exp: Ditto.
	* gdb.mi/mi-syn-frame.exp: Ditto.
	* gdb.mi/mi2-syn-frame.exp: Ditto.

	* gdb.base/call-signal-resume.exp: New file.
	* gdb.base/call-signals.c: New file.
	* gdb.base/unwindonsignal.exp: New file.
	* gdb.base/unwindonsignal.c: New file.
	* gdb.threads/interrupted-hand-call.exp: New file.
	* gdb.threads/interrupted-hand-call.c: New file.
	* gdb.threads/thread-unwindonsignal.exp: New file.
2009-01-19 19:05:01 +00:00
Daniel Jacobowitz adb483feb8 * NEWS: Document "define" for prefixed commands.
* cli/cli-cmds.c (show_user): Update calls to show_user_1.  Call
	show_user_1 for prefix commands.
	* cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
	* cli/cli-script.c (validate_comname): Rewrite to handle prefix
	commands.  Return the containing command list.
	(define_command, document_command): Update to handle prefix commands.
	(show_user_1): Add prefix and name arguments.  Handle prefix
	commands.
	* cli/cli-script.h (show_user_1): Update prototype.

	doc/
	* gdb.texinfo (Define, Hooks): Document prefix command support.

	testsuite/
	* gdb.base/define.exp: Test defining and hooking prefix commands.
	* gdb.python/python.exp: Update test for "show user" output.
2009-01-14 20:40:09 +00:00
Joel Brobecker e4d013fc0f Update the copyright notice of some of the files I missed
in the previous copyright update.
2009-01-14 10:53:10 +00:00
Jan Kratochvil 60023297c3 gdb/
* f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
	spacing, a regression from 2008-04-22.

gdb/testsuite/
	* gdb.fortran/derived-type.exp: New variables int4 and real4.  Match
	now the output exactly, using less wildcards.  Expect also the output
	of gfortran-4.3.  Update for the f-valprint.c modification from
	2008-04-22.
	* gdb.fortran/subarray.exp: Expect also the output of gfortran-4.3.
	Remove gdb_test test names where matching the command.
2009-01-07 12:39:13 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Pedro Alves ccc57cf9e6 2009-01-01 Pedro Alves <pedro@codesourcery.com>
PR breakpoints/9681:
	* exceptions.h (enum errors): New error type, MEMORY_ERROR.
	* corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
	* breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
	retrow all other exceptions.

2009-01-01  Pedro Alves  <pedro@codesourcery.com>

	PR breakpoints/9681:
	* gdb.base/watchpoint.exp: Add regression test.
2009-01-01 22:02:03 +00:00
Pedro Alves c7a6ca08d7 2008-12-31 Pedro Alves <pedro@codesourcery.com>
* gdb.threads/attach-into-signal.exp: Don't use
	gdb_suppress_entire_file.
	* gdb.threads/attach-stopped.exp: Ditto.
	* gdb.threads/attachstop-mt.exp: Ditto.
2008-12-31 15:44:21 +00:00
Pedro Alves 3a031f650c 2008-12-31 Pedro Alves <pedro@codesourcery.com>
PR gdb/8812:
	* infrun.c (handle_command): Don't print a header or notify the
	target about signal changes if we didn't change any signal.

2008-12-31  Pedro Alves  <pedro@codesourcery.com>

	PR gdb/8812:
	* gdb.base/signal.exp: Change kfail to fail, and update PR number.
2008-12-31 01:34:10 +00:00
Pedro Alves 09e6485fa9 2008-12-29 Pedro Alves <pedro@codesourcery.com>
PR gdb/7536:
	* valprint.c (input_radix_1): New static global.
	(set_input_radix): Use it instead of "input_radix".
	(set_input_radix_1): Always leave input_radix_1 set to
	input_radix.
	(output_radix_1): New static global.
	(set_output_radix): Use it instead of "output_radix".
	(set_output_radix_1): Always leave output_radix_1 set to
	output_radix.
	(_initialize_valprint): Use "input_radix_1" instead of
	"input_radix" with the "input-radix" command.  Use
	"output_radix_1" instead of "output_radix" with the "output-radix"
	command.

2008-12-29  Pedro Alves  <pedro@codesourcery.com>

	PR gdb/7536:
	* gdb.base/radix.exp: Add tests to ensure invalid input radices
	and unsupported output radices are really rejected.
2008-12-29 02:18:48 +00:00
Jan Kratochvil 0cd530490f * gdb.cp/punctuator.exp: Backslash the '$' signs. 2008-12-23 17:19:00 +00:00
Tom Tromey ba163c7e44 gdb
* c-exp.y (ident_tokens): New global.
	(struct token) <cxx_only>: New field.
	(tokentab3): Update.
	(tokentab2): Update.
	(yylex): Use ident_tokens.
gdb/testsuite
	* gdb.cp/punctuator.exp: New file.
2008-12-22 14:21:01 +00:00
Jan Kratochvil 6f4de6c97d gdb/
Fix memory double-free.
	* completer.c (line_completion_function): Clear LIST after called xfree.
gdb/testsuite/
	* gdb.base/completion.exp (Completing non-existing component): New test.
2008-12-22 13:19:30 +00:00
Jan Kratochvil 0f34d0b4f9 Fix for PR gdb/8648.
* gdb.arch/ppc-fp.exp, gdb.arch/vsx-regs.exp, gdb.base/watchpoint-hw.c,
	gdb.gdbtk/browser.test, gdb.gdbtk/console.test, gdb.gdbtk/srcwin.test,
	gdb.gdbtk/srcwin2.test, gdb.gdbtk/srcwin3.test, gdb.gdbtk/windows.test,
	gdb.threads/tls2.c: Remove reference to bug-gdb@prep.ai.mit.edu .
2008-12-21 17:38:55 +00:00
Jan Kratochvil db2ad4c3f7 gdb/
Fix hw watchpoints created before the inferior was started.
	* breakpoint.c (update_watchpoint): Convert the bp_watchpoint and
	bp_hardware_watchpoint types according to the current runtime state.
gdb/testsuite/
	* gdb.base/watchpoint-hw.exp, gdb.base/watchpoint-hw.c: New.
2008-12-21 15:01:32 +00:00
Denis Pilat bb5ef15eff 2008-12-16 Christophe Lyon <christophe.lyon@st.com>
* gdb.base/expand-psymtabs.c: Insert code in foo so that the
       compiler actually generate code at the expected line number.
2008-12-16 13:15:50 +00:00
Jie Zhang 90142adc1d * gdb.base/consecutive.exp: Don't use global in gdb_expect. 2008-12-15 13:04:56 +00:00
Tom Tromey fad6eecd5d gdb
PR cli/2563:
	* cli/cli-decode.c (delete_cmd): Add hook-related out parameters.
	(add_cmd): Update.  Install hooks into new command.
	(add_alias_cmd): Update.
gdb/testsuite
	* gdb.base/commands.exp (redefine_hook_test): New proc.
	Call it.
2008-12-12 17:58:48 +00:00
Tom Tromey 17c8aaf507 gdb
* macroexp.c (get_pp_number): Require digit after leading ".".
	Correctly handle suffixes.
gdb/testsuite
	* gdb.base/macscp.exp: New regression test.
2008-12-12 17:03:37 +00:00
Tom Tromey 7c8adf682b gdb
PR macros/2564:
	* c-exp.y (macro_original_text, expansion_obstack,
	expression_macro_scope): New globals.
	(scan_macro_expansion): New function.
	(scanning_macro_expansion): Likewise.
	(finished_macro_expansion): Likewise.
	(scan_macro_cleanup): Likewise.
	(c_parse): Find macro scope.  Initialize obstack.
	* c-lang.h (scan_macro_expansion, scanning_macro_expansion,
	finished_macro_expansion, expression_macro_lookup_func,
	expression_macro_lookup_baton): Remove.
	* c-lang.c (scan_macro_expansion, scanning_macro_expansion,
	finished_macro_expansion, expression_macro_lookup_func,
	expression_macro_lookup_baton): Remove.
	(macro_original_text, macro_expanded_text,
	c_preprocess_and_parse): Remove.
	(c_language_defn, cplus_language_defn, asm_language_defn,
	minimal_language_defn): Use c_parse.
gdb/testsuite
	* gdb.base/macscp.exp: Print "address.addr".
	* gdb.base/macscp1.c (struct outer): New struct.
	(address): New global.
2008-12-11 18:30:28 +00:00
Tom Tromey b05dcbb7f9 gdb
PR gdb/1815:
	* cli/cli-decode.c (delete_cmd): Forward declare.
	(delete_cmd): Now static.  Change return type.  Remove command
	from alias chain.  Rewrite.
	(add_cmd): Initialize new fields.  Update cmd_pointer on all
	aliases.
	(add_alias_cmd): Put command on alias chain.
	* command.h (delete_cmd): Don't declare.
	* cli/cli-decode.h (delete_cmd): Don't declare.
	(struct cmd_list_element) <aliases, alias_chain>: New fields.
gdb/testsuite
	* gdb.base/commands.exp (redefine_backtrace_test): New proc.
	Call it.
2008-12-10 01:05:16 +00:00
Doug Evans 2d476de178 * gdb.server/ext-run.exp: Relax regexp for init program. 2008-12-04 17:41:42 +00:00
Tristan Gingold 87bdc95928 2008-12-03 Tristan Gingold <gingold@adacore.com>
* gdb.base/macscp.exp: Generate an object file during compilation
	to work around Darwin dsymutil limitations.
2008-12-04 15:35:43 +00:00
Jan Kratochvil e0740f779c gdb/
Fix resolving external references to TLS variables.
	* findvar.c: Include `objfiles.h'.
	(read_var_value <LOC_UNRESOLVED>): New variable `obj_section'.  Handle
	SEC_THREAD_LOCAL variables.
	* printcmd.c (address_info <LOC_UNRESOLVED>): Handle SEC_THREAD_LOCAL
	variables.

gdb/testsuite/
	Test resolving external references to TLS variables.
	* gdb.threads/tls.exp: New tests to examine A_THREAD_LOCAL and
	FILE2_THREAD_LOCAL.
	(testfile2, srcfile2): New variables.
	* gdb.threads/tls.c (file2_thread_local)
	(function_referencing_file2_thread_local): New.
	* gdb.threads/tls2.c: New file.
2008-12-02 14:51:01 +00:00
Vladimir Prus 07e059b5a9 Implement -list-thread-groups --available
* Makefile.in (XMLFILES): Add osdata.dtd.
        (SFILES): Add osdata.c.
        (COMMON_OBS): Add osdata.o.
        * linux-nat.c: Include pwd.h, sys/types.h, gdb_dirent.h and xml-support.h.
        (linux_nat_xfer_osdata): New function.
        (linux_xfer_partial): Handle TARGET_OBJECT_OSDATA.
        * osdata.c: New file.
        * osdata.h: New file.
        * remote.c (PACKET_qXfer_osdata): New packet enum.
        (remote_protocol_features): Add "qXfer:osdata:read".
        (remote_read_qxfer): Handle TARGET_OBJECT_OSDATA.
        (extended_remote_can_run): New.
        (init_extended_remote_ops): Set to_can_run to
        extended_remote_can_run.
        (_initialize_remote): Add packet config command for
        "qXfer:osdata:read".
        * xml-support.c (obstack_xml_printf): New function.
        * xml-support.h (obstack_xml_printf): Declare.
        * target.c (target_get_osdata): New function.
        * target.h (enum target_object): Add TARGET_OBJECT_OSDATA.
        (target_os_data): Declare.
        * features/osdata.dtd: New file.
        * mi/mi-main.c (mi_list_thread_groups): Handle the --available
        option.
2008-12-02 07:57:38 +00:00
Joel Brobecker 67f0aac52a * gdb.ada/int_deref.exp: Convert the addresses into long_integer
rather than integer, as integer might not be big enough when
        on 64bit targets.
2008-11-28 23:26:54 +00:00
Jerome Guitton c332165e45 * gdb.cp/formatted-ref.exp: Add equality test.
* gdb.ada/formatted_ref.exp: Ditto.
2008-11-27 09:52:55 +00:00
Jan Kratochvil fc9b693caa * gdb.base/breakpoint-shadow.exp, gdb.base/breakpoint-shadow.c: New.
* gdb.base/start.exp: New comment about an alternative - `runto_main'.
2008-11-26 05:25:56 +00:00
Andreas Schwab a9c640111d * gdb.base/foll-fork.exp (catch_fork_child_follow): Fix patterns
matching syscall entry point.
* gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow)
(tcatch_vfork_then_child_follow): Likewise.  Finish through
vfork even if we stopped at the syscall trampoline.
2008-11-20 17:17:59 +00:00
Doug Evans e2fd701eb4 * printcmd.c (sym_info): Don't print the offset if it's zero.
* gdb.base/sepsymtab.exp: Update, old "info sym" format restored.
2008-11-20 16:13:11 +00:00
Thiago Jung Bauermann 69abc51c17 gdb/
* ppc-linux-nat.c (ppc_register_u_addr): Add special case to return
	offset for full 64-bit slot of FPSCR when in 32-bits.
	(ppc_linux_read_description): Return target description with 64-bit
	FPSCR when inferior is running on an ISA 2.05 or later processor.
	* ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Call
	initialize_tdec_powerpc_isa205_32l,
	initialize_tdec_powerpc_isa205_altivec32l,
	initialize_tdec_powerpc_isa205_vsx32l,
	initialize_tdec_powerpc_isa205_64l,
	initialize_tdec_powerpc_isa205_altivec64l and
	initialize_tdec_powerpc_isa205_vsx64l.
	* ppc-linux-tdep.h: Add external declaration for
	tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l,
	tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_64l,
	tdesc_powerpc_isa205_altivec64l and tdesc_powerpc_isa205_vsx64l.
	* features/rs600/powerpc-fpu-isa205.xml: New file.
	* features/rs600/powerpc-isa205-32l.xml: New file.
	* features/rs600/powerpc-isa205-64l.xml: New file.
	* features/rs600/powerpc-isa205-altivec32l.xml: New file.
	* features/rs600/powerpc-isa205-altivec64l.xml: New file.
	* features/rs600/powerpc-isa205-vsx32l.xml: New file.
	* features/rs600/powerpc-isa205-vsx64l.xml: New file.
	* features/rs600/powerpc-isa205-32l.c: Generate.
	* features/rs600/powerpc-isa205-64l.c: Generate.
	* features/rs600/powerpc-isa205-altivec32l.c: Generate.
	* features/rs600/powerpc-isa205-altivec64l.c: Generate.
	* features/rs600/powerpc-isa205-vsx32l.c: Generate.
	* features/rs600/powerpc-isa205-vsx64l.c: Generate.

gdb/testsuite/
	* gdb.arch/ppc-dfp.exp: New file.
	* gdb.arch/ppc-dfp.c: New file.
2008-11-18 21:39:47 +00:00
Paul Pluzhnikov c14c28ba11 2008-11-18 Paul Pluzhnikov <ppluzhnikov@google.com>
* objfiles.h: New MULTI_OBJFILE_P macro.
	* printcmd.c (sym_info): Print object name.
	* maint.c (maintenance_translate_address): Likewise.
2008-11-18 21:31:27 +00:00
Doug Evans 2e74121d77 * infcall.c (call_function_by_hand): Fix punctuation and capitalization
on error messages.

	* gdb.mi/mi-syn-frame.exp: Update expected output.
	* gdb.mi/mi2-syn-frame.exp: Update expected output.
2008-11-18 00:13:04 +00:00
Vladimir Prus 66bb093b5f Implement =thread-selected notification.
* mi/mi-common.h (struct mi_interp): New, moved from ...
        * mi/mi-interp.c: ...here.
        * mi/mi-main.c (mi_execute_command): If the thread changed
        as result of command, report that.
2008-11-17 16:43:34 +00:00
Vladimir Prus 3d043ef6a3 Include group-id in thread-created notification.
* mi/mi-interp.c (mi_new_thread, mi_thread_exit): Include
        group id in the output.
2008-11-17 12:34:19 +00:00
Joel Brobecker 808104c836 * gdb.base/help.exp: Remove the "catch load" and "catch unload"
commands from the expected output for "help catch".
2008-11-16 18:03:25 +00:00
Joel Brobecker 00b22944a0 * gdb.ada/int_deref.exp: New testcase. 2008-11-15 18:30:38 +00:00
Tom Tromey 5966943567 gdb
PR mi/2549:
	* mi/mi-main.c (get_register): Use get_formatted_print_options.

gdb/testsuite

2008-11-14  Nick Roberts  <nickrob@snap.net.nz>

	* gdb.mi/gdb2549.exp: New file.
2008-11-14 18:38:32 +00:00
Doug Evans 2580417f09 (set_lang_c): Delete.
(runto_main): If it fails, call fail instead of gdb_suppress_tests.
2008-11-14 06:55:40 +00:00
Doug Evans de04a24895 * infcall.c (call_function_by_hand): Handle inferior exit.
* gdb.base/callexit.exp: New file.
	* gdb.base/callexit.c: New file.
2008-11-12 00:39:28 +00:00
Doug Evans 6b8ce72729 * lib/gdb.exp (GDBFLAGS): Move -nx ...
(INTERNAL_GDBFLAGS): ... to here.  Move -nw to here as well.
	(default_gdb_version): Add $INTERNAL_GDBFLAGS to gdb invocations.
	(default_gdb_start,default_gdb_exit): Ditto.
	* lib/mi-support.exp (default_mi_gdb_start): Ditto.
	(mi_uncatched_gdb_exit): Add $INTERNAL_GDBFLAGS to log message.
	* gdb.base/corefile.exp: Add $INTERNAL_GDBFLAGS to gdb invocations.
	* gdb.base/dbx.exp (dbx_gdb_start): Ditto.
	* gdb.base/args.exp (GDBFLAGS): Don't overwrite, append.
	* gdb.base/remotetimeout.exp (GDBFLAGS): Ditto.
2008-11-11 01:23:34 +00:00
Andreas Schwab 1b14b8aa25 * gdb.base/hashline2.exp: Fix typo.
* gdb.base/hashline3.exp: Likewise.
2008-11-03 19:36:39 +00:00
Tom Tromey f3134b8886 gdb
* value.c (coerce_array): Use check_typedef.
gdb/testsuite
	* gdb.base/pointers.exp: Add test.
	* gdb.base/pointers.c (k, S): New typedefs.
	(instance): New global.
2008-10-30 21:44:15 +00:00
Andreas Schwab c22261528c * infcmd.c (construct_inferior_arguments): Handle newlines
specially.

testsuite/:
	* gdb.base/args.exp: Add tests for newlines.
2008-10-30 10:07:16 +00:00
Joel Brobecker 462f405c6e gdb.base/foll-exec.exp: Update the expected output of a couple
of "info breakpoints" tests.
2008-10-30 05:17:58 +00:00
Tom Tromey 79a45b7d67 gdb
* varobj.c (value_get_print_value): Include valprint.h.
	(value_get_print_value): Use get_formatted_print_options.
	* value.h (struct value_print_options): Declare.
	(value_print, val_print, common_val_print, val_print_string):
	Update.
	* value.c: Include valprint.h.
	(show_values): Use get_user_print_options.
	(show_convenience): Likewise.
	* valprint.h (prettyprint_arrays, prettyprint_structs): Don't
	declare.
	(struct value_print_options): New type.
	(vtblprint, unionprint, addressprint, objectprint, print_max,
	inspect_it, repeat_count_threshold, output_format,
	stop_print_at_null): Don't declare.
	(user_print_options, get_user_print_options,
	get_raw_print_options, get_formatted_print_options): Declare.
	(print_array_indexes_p): Don't declare.
	(maybe_print_array_index, val_print_array_elements): Update.
	* valprint.c (print_max): Remove.
	(user_print_options): New global.
	(get_user_print_options, get_raw_print_options,
	get_formatted_print_options): New functions.
	(print_array_indexes, repeat_count_threshold, stop_print_at_null,
	prettyprint_structs, prettyprint_arrays, unionprint,
	addressprint): Remove.
	(val_print): Remove format, deref_ref, pretty arguments; add
	options.  Update.
	(common_val_print): Likewise.
	(print_array_indexes_p): Remove.
	(maybe_print_array_index): Remove format, pretty arguments; add
	options.  Update.
	(val_print_array_elements): Remove format, deref_ref, pretty
	arguments; add options.  Update.
	(val_print_string): Add options argument.  Update.
	(_initialize_valprint): Use user_print_options.
	(output_format): Remove.
	(set_output_radix_1): Use user_print_options.
	* typeprint.c: Include valprint.h.
	(objectprint): Don't declare.
	(whatis_exp): Use get_user_print_options.
	* tui/tui-regs.c: Include valprint.h.
	(tui_register_format): Use get_formatted_print_options.
	* tracepoint.c: Include valprint.h.
	(addressprint): Don't declare.
	(trace_mention): Use get_user_print_options.
	(tracepoints_info): Likewise.
	* stack.c (print_frame_args): Use get_raw_print_options.
	(print_frame_info): Use get_user_print_options.
	(print_frame): Likewise.
	* sh64-tdep.c: Include valprint.h
	(sh64_do_register): Use get_formatted_print_options.
	* scm-valprint.c (scm_inferior_print): Remove format, deref_ref,
	pretty arguments; add options.
	(scm_scmlist_print): Likewise.  Update.
	(scm_scmval_print): Likewise.
	(scm_val_print): Likewise.
	(scm_value_print): Remove format, pretty arguments; add options.
	Update.
	* scm-lang.h (scm_value_print, scm_val_print, scm_scmval_print):
	Update.
	* scm-lang.c (scm_printstr): Add options argument.
	* python/python-value.c: Include valprint.h.
	(valpy_str): Use get_user_print_options.
	* printcmd.c: Include valprint.h.
	(addressprint): Don't declare.
	(inspect_it): Remove.
	(print_formatted): Remove format option; add options.  Update.
	(print_scalar_formatted): Likewise.
	(print_address_demangle): Use get_user_print_options.
	(do_examine): Use get_formatted_print_options.
	(print_command_1): Likewise.
	(output_command): Use get_formatted_print_options.
	(do_one_display): Likewise.
	(print_variable_value): Use get_user_print_options.
	* p-valprint.c (pascal_val_print): Remove format, deref_ref,
	pretty arguments; add options.  Update.
	(pascal_value_print): Remove format, pretty arguments; add
	options.  Update.
	(vtblprint, objectprint): Don't declare.
	(pascal_static_field_print): Remove.
	(pascal_object_print_value_fields): Remove format, pretty
	arguments; add options.  Update.
	(pascal_object_print_static_field): Likewise.
	(_initialize_pascal_valprint): Use user_print_options.  Update.
	* p-lang.h (pascal_val_print, pascal_value_print,
	pascal_printstr, pascal_object_print_value_fields): Update.
	(vtblprint, static_field_print): Don't declare.
	* p-lang.c (pascal_printstr): Add options argument.  Update.
	* objc-lang.c (objc_printstr): Add options argument.  Update.
	* mt-tdep.c: Include valprint.h.
	(mt_registers_info): Use get_raw_print_options.
	* mips-tdep.c: Include valprint.h.
	(mips_print_fp_register): Use get_formatted_print_options.
	(mips_print_register): Likewise.
	* mi/mi-main.c: Include valprint.h.
	(get_register): Use get_user_print_options.
	(mi_cmd_data_evaluate_expression): Likewise.
	(mi_cmd_data_read_memory): Use get_formatted_print_options.
	* mi/mi-cmd-stack.c: Include valprint.h.
	(list_args_or_locals): Use get_raw_print_options.
	* m2-valprint.c (print_function_pointer_address): Add addressprint
	argument.
	(m2_print_long_set): Remove format, pretty arguments.
	(m2_print_unbounded_array): Remove format, deref_ref, pretty
	arguments; add options.  Update.
	(print_unpacked_pointer): Remove format argument; add options.
	Now static.  Update.
	(print_variable_at_address): Remove format, deref_ref, pretty
	arguments; add options.  Update.
	(m2_print_array_contents): Likewise.
	(m2_val_print): Likewise.
	* m2-lang.h (m2_val_print): Update.
	* m2-lang.c (m2_printstr): Add options argument. Update.
	* language.h (struct value_print_options): Declare.
	(struct language_defn) <la_printstr>: Add options argument.
	<la_val_print>: Remove format, deref_ref, pretty argument; add
	options.
	<la_value_print>: Remove format, pretty arguments; add options.
	<la_print_array_index>: Likewise.
	(LA_VAL_PRINT, LA_VALUE_PRINT, LA_PRINT_STRING,
	LA_PRINT_ARRAY_INDEX): Update.
	(default_print_array_index): Update.
	* language.c (default_print_array_index): Remove format, pretty
	arguments; add options.  Update.
	(unk_lang_printstr): Add options argument.
	(unk_lang_val_print): Remove format, deref_ref, pretty arguments;
	add options.
	(unk_lang_value_print): Remove format, pretty arguments; add
	options.
	* jv-valprint.c (java_value_print): Remove format, pretty
	arguments; add options.  Update.
	(java_print_value_fields): Likewise.
	(java_val_print): Remove format, deref_ref, pretty arguments; add
	options.  Update.
	* jv-lang.h (java_val_print, java_value_print): Declare.
	* infcmd.c: Include valprint.h.
	(print_return_value): Use get_raw_print_options.
	(default_print_registers_info): Use get_user_print_options,
	get_formatted_print_options.
	(registers_info): Use get_formatted_print_options.
	* gdbtypes.h (struct value_print_options): Declare.
	(print_scalar_formatted): Update.
	* f-valprint.c (f77_print_array_1): Remove format, deref_ref,
	pretty arguments; add options.  Update.
	(f77_print_array): Likewise.
	(f_val_print): Likewise.
	* f-lang.h (f_val_print): Update.
	* f-lang.c (f_printstr): Add options argument.  Update.
	(c_value_print): Update declaration.
	* expprint.c: Include valprint.h.
	(print_subexp_standard): Use get_raw_print_options,
	get_user_print_options.
	* eval.c: Include valprint.h.
	(objectprint): Don't declare.
	(evaluate_subexp_standard): Use get_user_print_options.
	* cp-valprint.c (vtblprint, objectprint, static_field_print):
	Remove.
	(cp_print_value_fields): Remove format, pretty arguments; add
	options.  Update.
	(cp_print_value): Likewise.
	(cp_print_static_field): Likewise.
	(_initialize_cp_valprint): Use user_print_options.  Update.
	* c-valprint.c (print_function_pointer_address): Add addressprint
	argument.
	(c_val_print): Remove format, deref_ref, pretty arguments; add
	options.  Update.
	(c_value_print): Add options argument.  Update.
	* c-lang.h (c_val_print, c_value_print, c_printstr): Update.
	(vtblprint, static_field_print): Don't declare.
	(cp_print_value_fields): Update.
	* c-lang.c (c_printstr): Add options argument.  Update.
	* breakpoint.c: Include valprint.h.
	(addressprint): Don't declare.
	(watchpoint_value_print): Use get_user_print_options.
	(print_one_breakpoint_location): Likewise.
	(breakpoint_1, print_it_catch_fork, print_it_catch_vfork, mention,
	print_exception_catchpoint): Likewise.
	* auxv.c (fprint_target_auxv): Don't declare addressprint.  Use
	get_user_print_options.
	* ada-valprint.c (struct ada_val_print_args): Remove format,
	deref_ref, and pretty; add options.
	(print_optional_low_bound): Add options argument.
	(val_print_packed_array_elements): Remove format and pretty
	arguments; add options.  Update.
	(printstr): Add options argument.  Update.
	(ada_printstr): Likewise.
	(ada_val_print): Remove format, deref_ref, pretty arguments; add
	options argument.  Update.
	(ada_val_print_stub): Update.
	(ada_val_print_array): Remove format, deref_ref, pretty arguments;
	add options.  Update.
	(ada_val_print_1): Likewise.
	(print_variant_part): Likewise.
	(ada_value_print): Remove format, pretty arguments; add options.
	Update.
	(print_record): Likewise.
	(print_field_values): Likewise.
	* ada-lang.h (ada_val_print, ada_value_print, ada_printstr):
	Update.
	* ada-lang.c (ada_print_array_index): Add options argument; remove
	format and pretty arguments.
	(print_one_exception): Use get_user_print_options.
gdb/testsuite
	* gdb.base/exprs.exp (test_expr): Add enum formatting tests.
2008-10-28 17:19:58 +00:00
Pedro Alves adc13a145e * gdb.python/python-value.exp (test_value_in_inferior): Don't use
gdb_start_cmd.
	Use runto_main before any test that requires execution.
2008-10-24 18:54:03 +00:00
Pedro Alves 252fbfc86a gdb/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

	* defs.h: Mention ptid_is_pid.
	* inferior.h (ptid_is_pid): Declare.
	* gdbthread.h (struct thread_info) <stop_requested>: New field.
	(set_stop_requested): Declare.
	* infcmd.c (interrupt_target_1): Call set_stop_requested.
	* infrun.c (clear_proceed_status): Clear stop_requested.
	(infrun_thread_stop_requested_callback,
	infrun_thread_stop_requested): New.
	(handle_inferior_event): If a TARGET_SIGNAL_TRAP is reported on a
	thread that had an explicit stop request, pretend we got a
	TARGET_SIGNAL_0.  Always stop if the thread had an explicit stop
	request.
	(print_stop_reason): In the SIGNAL_RECEIVED case, if we're not
	outputting to MI, and we got a TARGET_SIGNAL_0, print "# Stopped",
	instead of mentioning signal 0.
	(ptid_is_pid): New.
	* thread.c (set_stop_requested): New.

	* linux-nat.c (queued_waitpid): Rename to ...
	(queued_waitpid_1): ... this.  Add `peek' argument.  Handle it.
	(queued_waitpid): New, as wrapper to queued_waitpid_1.
	(push_waitpid): Push the SIGTRAP to the local event queue, to the
	kernel's.
	(send_sigint_callback): Delete.
	(linux_nat_stop_lwp): New.
	(linux_nat_stop): Use it.

gdb/doc/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

	* observer.texi (thread_stop_requested): New.

gdb/testsuite/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

	* lib/mi-support.exp (mi_expect_interrupt): Expect signal 0
	instead of SIGINT.
2008-10-23 23:11:21 +00:00
Joel Brobecker 28148e3d4d * gdb.base/completion.exp: Update expected output following
the addition of the "info tasks" command.
2008-10-22 19:46:13 +00:00
Tom Tromey c209f8472e gdb
PR gdb/2506:
	* c-exp.y (string_exp): New production.
	(exp): Use it.
gdb/testsuite
	* gdb.base/exprs.exp (test_expr): Add test for string
	concatenation.
2008-10-22 16:38:09 +00:00
Pedro Alves f177e35094 * configure.ac: Output gdb.python/Makefile.
* configure: Regenerate.
	* gdb.python/Makefile.in: New.
2008-10-19 19:59:31 +00:00
Joel Brobecker cce893561b * gdb.base/foll-fork.exp: Adjust the expected output to match
the new description for fork/vfork catchpoints in the "info
        breakpoints" output.
2008-10-16 16:25:37 +00:00
Thiago Jung Bauermann 176d289d29 2008-10-16 Paul Pluzhnikov <ppluzhnikov@google.com>
* Makefile.in: Add gdb.python to ALL_SUBDIRS.
2008-10-16 15:08:28 +00:00
Thiago Jung Bauermann a08702d647 2008-10-16 Thiago Jung Bauermann <bauerman@br.ibm.com>
Tom Tromey  <tromey@redhat.com>

gdb/
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-value.o.
	(SUBDIR_PYTHON_SRCS): Add python-value.c.
	(python-value.o): New target.
	* configure.ac (CONFIG_OBS): Add python-value.o.
	(CONFIG_SRCS): Add python/python-value.c
	* configure: Regenerate.
	* python-internal.h (value_object_type): Add external declaration.
	(gdbpy_get_value_from_history, value_to_value_object,
	convert_value_from_python, gdbpy_initialize_values): Add function
	prototype.
	* python/python-value.c: New file.
	* python/python.c (GdbMethods): Add gdbpy_get_value_from_history.
	(_initialize_python): Call gdbpy_initialize_values.
	* python/python.h (values_in_python): Add external declaration.
	* value.c (value_prepend_to_list, value_remove_from_list): New
	functions.
	(preserve_values): Iterate over values_in_python list as well.
	* value.h (value_prepend_to_list, value_remove_from_list): Add
	function prototypes.

gdb/doc/
	* gdb.texinfo. (Values From Inferior): New subsubsection.

gdb/testsuite/
	* gdb.python/python-value.c: New file.
	* gdb.python/python-value.exp: New file.
2008-10-16 03:54:00 +00:00
Pedro Alves 1c5cfe8615 gdb/
*	breakpoint.c (breakpoint_init_inferior): Clean up the moribund
	locations list.
	(moribund_breakpoint_here_p): Record the moribund
	location in the moribund_locations vector.
	* breakpoint.h (moribund_breakpoint_here_p): Declare.
	(displaced_step_fixup): Check if the breakpoint the thread was
	trying to step over has been removed since having been placed in
	the displaced stepping queue.
	(adjust_pc_after_break): In non-stop mode, check for a moribund
	breakpoint at the stop pc.
	(handle_inferior_event): Don't retire moribund breakpoints on
	TARGET_WAITKIND_IGNORE.

gdb/testsuite/
	* gdb.mi/mi-nsmoribund.exp, gdb.mi/nsmoribund.c: New test.
2008-10-15 19:15:34 +00:00
Denis Pilat 41702f1b33 Typo 2008-10-15 13:06:54 +00:00
Denis Pilat 5a98ad698f typo. 2008-10-15 07:55:24 +00:00
Tom Tromey dcb1a1e279 * gdb.base/macscp.exp: Use 'vafunc' and 'fixedarg' rather than
'fprintf' and 'stderr'.
2008-10-09 16:49:47 +00:00
Joel Brobecker 9124fe4822 * gdb.ada/ref_tick_size.exp: New testcase. 2008-10-07 14:10:31 +00:00
Doug Evans 4545259105 * dwarf2read.c (offset_in_cu_p): New function.
(find_partial_die,follow_die_ref): Use it.

	* gdb.dwarf2/dw2-cu-size.exp: New file.
	* gdb.dwarf2/dw2-cu-size.S: New file.

	* gdb.dwarf2/dw2-intercu.S (.Ltype_int_in_cu2): Renamed from
	.Ltype_int for clarity.
2008-10-06 21:54:24 +00:00
Paul Pluzhnikov 4fc5b20858 2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/2384:
	* gdb.cp/gdb2384.exp: Extended to test more cases.
	* gdb.cp/gdb2384.cc: Likewise.
	* gdb.cp/gdb2384-base.h: Likewise.
	* gdb.cp/gdb2384-base.cc: Likewise.
2008-10-03 22:02:20 +00:00
Jan Kratochvil d78df37042 gdb/
Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
	* c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
	(m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
	valops.c (value_cast), varobj.c (c_number_of_children): Replace
	TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	* parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	* f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
	(f77_get_upperbound): ... this function handling now only
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	(f77_get_dynamic_lowerbound): Replace with ...
	(f77_get_lowerbound): ... this function handling now only
	TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
	(f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
	Update their callers.
	* eval.c (evaluate_subexp_standard): Update their callers.
	* f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
	(f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
	prototypes.
	(BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
	* f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
	the lower_bound_was_default variable.  Update the
	f77_get_dynamic_upperbound, f77_get_upperbound and
	TYPE_ARRAY_UPPER_BOUND_TYPE calls.
	* gdbtypes.c (print_bound_type): Remove the function.
	(recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
	LOWER_BOUND_TYPE.
	* gdbtypes.h (enum array_bound_type): Remove.
	(struct main_type): Remove the fields upper_bound_type and
	lower_bound_type.  Comment the new overload of the field artificial.
	(TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
	(TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
	(TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
	(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.

gdb/testsuite/
	* gdb.base/maint.exp (maint print type): Remove printing
	UPPER_BOUND_TYPE and LOWER_BOUND_TYPE.
2008-10-02 22:06:08 +00:00
Tom Tromey 9a044a8903 gdb
PR gdb/2484:
	* symtab.c (struct add_macro_name_data): New struct.
	(add_macro_name): New function.
	(default_make_symbol_completion_list): Complete macro names.
	* scm-lang.c (scm_language_defn): Update.
	* p-lang.c (pascal_language_defn): Update.
	* objc-lang.c (objc_language_defn): Update.
	* macrotab.h (macro_callback_fn): Add user_data argument.
	(macro_for_each): Likewise.
	(macro_for_each_in_scope): Declare.
	* macrotab.c: (struct macro_for_each_data): New struct.
	(foreach_macro): Use it.
	(macro_for_each): Likewise.
	(foreach_macro_in_scope): New function.
	(macro_for_each_in_scope): Likewise.
	* macrocmd.c (print_one_macro): Add argument.
	(macro_list_command): Pass NULL to macro_for_each.
	* m2-lang.c (m2_language_defn): Update.
	* language.h (struct language_defn) <la_macro_expansion>: New
	field.
	(macro_expansion): New enum.
	* language.c (unknown_language_defn): Update.  Fix order of
	initializers.
	(auto_language_defn): Likewise.
	(local_language_defn): Update.
	* jv-lang.c (java_language_defn): Update.
	* f-lang.c (f_language_defn): Update.
	* c-lang.c (c_language_defn): Update.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	* ada-lang.c (ada_language_defn): Update.
gdb/testsuite
	* gdb.base/macscp.exp: Add completion tests.
	* gdb.base/macscp1.c (FIFTY_SEVEN): New macro.
	(TWENTY_THREE): Likewise.
	(FORTY_EIGHT): Likewise.
2008-09-30 17:21:28 +00:00
Tom Tromey 506800a969 * gdb.base/macscp.exp: Change "M" to "MACRO_TO_EXPAND"
everywhere.
	* gdb.base/macscp1.c (MACRO_TO_EXPAND): Rename from "M".
2008-09-30 16:53:06 +00:00
Jan Kratochvil 1a6f01b5dc gdb/testsuite/
* gdb.threads/attachstop-mt.exp: Note a real testcase name this
	testcase is derived from.  Fix racy dependency on an expected PID
	number.  No longer support the testcase on Linux kernel 2.4.x.
2008-09-28 11:39:45 +00:00
Tom Tromey 2fae03e85b gdb
* NEWS: Update.
	* macrocmd.c (extract_identifier): Add is_parameter argument.
	(macro_define_command): Update.
	(macro_undef_command): Likewise.
	* macroexp.c (stringify): New function.
	(find_parameter): Likewise.
	(gather_arguments): Add nargs argument.  Handle varargs.
	(substitute_args): Add is_varargs and va_arg_name arguments.
	Handle varargs, splicing, stringification.  Use find_parameter.
	(expand): Handle varargs.
gdb/doc
	* gdb.texinfo (Macros): Remove text about stringification,
	varargs, and splicing.
gdb/testsuite
	* gdb.base/macscp.exp: Add tests for stringification, splicing,
	and varargs.
2008-09-27 21:40:49 +00:00
Pedro Alves 1ad15515cd gdb/
* linux-nat.c (linux_nat_wait): Only use set_ignore_sigint in
	all-stop mode.

gdb/testsuite/
	* lib/mi-support.exp (mi_expect_interrupt): New.
	(mi_reverse_list, mi_check_thread_states): New, moved and renamed
	from gdb.mi/mi-nonstop.exp.
	* gdb.mi/mi-nsintrall.exp, gdb.mi/nsintrall.c: New.
	* gdb.mi/mi-nonstop.exp (myreverse, check_thread_states): Moved to
	lib/mi-support.exp.
	Use mi_check_thread_states throughout.  Avoid ".*" and do not
	require an anchor after -exec-run.
2008-09-22 11:00:41 +00:00
Daniel Jacobowitz d0b76dc6df * gdb.mi/mi-nonstop.exp: Do not check thread state while a
stop is pending.  Avoid ".*" when two stops are pending.
	* lib/gdb.exp (fullname_syntax_POSIX, fullname_syntax_UNC)
	(fullname_syntax_DOS_CASE, fullname_syntax_DOS): Do not match
	newlines in fullnames.
	* lib/mi-support.exp (mi_run_cmd): Do not require an anchor.
	(mi_expect_stop): Update comments.  Only anchor in sync mode.
	Do not match newlines.
	(mi_send_resuming_command_raw): Always return status.
	(mi_get_stop_line): Do not match more than one line by accident.
	Only anchor in sync mode.
	(mi_run_inline_test): If -exec-next fails, give up.
2008-09-13 17:54:06 +00:00
Ulrich Weigand 9990c83091 * gdb.base/stack-checking.c (big_frame): Reduce stack consumption
on SPU.
2008-09-11 16:24:17 +00:00
Joel Brobecker ebcf6f00fc * gdb.ada/Makefile.in (EXECUTABLES): Bring up to date. 2008-09-10 17:24:06 +00:00
Joel Brobecker b6db24e549 * gdb.ada/array_bounds.exp, gdb.ada/array_subscript_addr.exp,
gdb.ada/arrayidx.exp, gdb.ada/arrayparam.exp, gdb.ada/arrayptr.exp,
        gdb.ada/assign_1.exp, gdb.ada/boolean_expr.exp,
        gdb.ada/char_param.exp, gdb.ada/exprs.exp, gdb.ada/fixed_cmp.exp,
        gdb.ada/fixed_points.exp, gdb.ada/fun_addr.exp,
        gdb.ada/funcall_param.exp, gdb.ada/homonym.exp,
        gdb.ada/interface.exp, gdb.ada/null_array.exp,
        gdb.ada/packed_array.exp, gdb.ada/packed_tagged.exp,
        gdb.ada/print_chars.exp, gdb.ada/print_pc.exp,
        gdb.ada/str_ref_cmp.exp, gdb.ada/sym_print_name.exp,
        gdb.ada/taft_type.exp, gdb.ada/tagged.exp, gdb.ada/type_coercion.exp:
        Include the "= " sequence in the expected output of print tests.
2008-09-10 17:11:11 +00:00
Joel Brobecker 2bf448e0dc * gdb.ada/packed_tagged.exp: Accept "boolean" as a valid type
description for boolean types.
2008-09-10 16:35:17 +00:00
Pedro Alves d51fd4c898 gdb/
* infrun.c (normal_stop): Run hook-stop last.

gdb/testsuite/
	* gdb.base/hook-stop-continue.c: New.
	* gdb.base/hook-stop-continue.exp: New.
2008-09-09 18:58:20 +00:00
Daniel Jacobowitz 694182d2ba * valops.c (value_cast_structs): Return NULL for failure.
(value_cast): Handle NULL from value_cast_structs.
	(value_fetch_lazy): Call check_typedef.  Remove unused variable.

	testsuite/
	* gdb.base/structs3.c, gdb.base/structs3.exp: New files.
2008-09-08 22:16:51 +00:00
Jerome Guitton 3b8a7fc087 * gdb.arch/powerpc-aix-prologue.c (stack_check_probe_1)
(stack_check_probe_2, stack_check_probe_loop_1)
	(stack_check_probe_loop_2): New functions.
	(main): Add call to these new functions.
	* gdb.arch/powerpc-aix-prologue.exp: When breaking on these
	functions, check that the breakpoint is inserted at the appropriate
	location.
	(insert_breakpoint): Slightly refine this procedure so that it can
	be called several times in the test.
2008-09-08 16:03:14 +00:00
Jerome Guitton 96cc0ae8e0 * gdb.base/stack-checking.c: New file.
* gdb.base/stack-checking.exp: New file.
2008-09-08 15:54:29 +00:00
Thiago Jung Bauermann 1f08b40933 * gdb.arch/altivec-abi.exp: Remove extra verbose call.
* gdb.arch/altivec-regs.exp: Likewise.
	* gdb.arch/vsx-regs.exp: Likewise.
2008-09-05 19:12:11 +00:00
Thiago Jung Bauermann 3099e1c48a * gdb.arch/ppc-fp.exp: New file.
* gdb.arch/ppc-fp.c: New file.
2008-09-05 19:00:41 +00:00
Paul Pluzhnikov cc69bfc122 compile with gcc -fno-inline, lest gcc-4.3.1 optimizes the whole thing away. 2008-09-05 17:39:00 +00:00
Michael Snyder b02a33db50 2008-09-04 Michael Snyder <msnyder@vmware.com>
* lib/gdb.exp (gdb_continue_to_breakpoint): Accept "in" as well
	as "at" (for non-debug functions such as _start).
2008-09-04 22:00:25 +00:00
Ulrich Weigand 2992cbe020 * gdb.base/value-double-free.exp: Respect gdb,no_hardware_watchpoints.
* gdb.base/watchpoint-solib.exp: Likewise.  Update tests to handle
	software watchpoints.
	* gdb.base/watch_thread_num.exp: Likewise.
2008-09-04 00:51:04 +00:00
Aleksandar Ristovski 514f746bdc * breakpoint.c (breakpoint_init_inferior): Mark as not inserted only
non-permanent breakpoints.
	(bpstat_stop_status): Change enable_state to bp_disabled only for
	non-permanent breakpoints.
	(bp_loc_is_permanent): New function.
	(create_breakpoint): Check if the location points to a permanent
	breakpoint and if it does, make breakpoint permanent.
	(update_breakpoint_locations): Make sure new locations of permanent
	breakpoints are properly initialized.
	* i386-tdep.c (i386_skip_permanent_breakpoint): New function.
	(i386_gdbarch_init): Set gdbarch_skip_permanent_breakpoint.

	* gdb.arch/i386-bp_permanent.exp: New test.
2008-09-03 13:39:56 +00:00
Tom Tromey 876cecd0ee gdb:
* xml-tdesc.c (tdesc_end_union): Update.
	* stabsread.c (define_symbol): Update.
	(read_type): Update.
	(read_struct_type): Update.
	(read_enum_type): Update.
	* spu-tdep.c (spu_builtin_type_vec128): Update.
	* sh-tdep.c (sh_push_dummy_call_fpu): Update.
	(sh_push_dummy_call_nofpu): Update.
	* mdebugread.c (parse_symbol): Update.
	(parse_symbol): Update.
	(parse_symbol): Update.
	(upgrade_type): Update.
	* jv-lang.c (java_lookup_class): Update.
	* iq2000-tdep.c (iq2000_pointer_to_address): Update.
	* i386-tdep.c (i386_mmx_type): Update.
	(i386_sse_type): Update.
	* gdbtypes.h (enum type_flag_value): New enum.
	(enum type_instance_flag_value): New enum.
	(TYPE_FLAG_UNSIGNED, TYPE_FLAG_NOSIGN, TYPE_FLAG_STUB,
	TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC, TYPE_FLAG_PROTOTYPED,
	TYPE_FLAG_INCOMPLETE, TYPE_FLAG_VARARGS, TYPE_FLAG_VECTOR,
	TYPE_FLAG_FIXED_INSTANCE, TYPE_FLAG_STUB_SUPPORTED,
	TYPE_FLAG_NOTTEXT): Now enum constants.
	(TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_CODE_SPACE,
	TYPE_FLAG_DATA_SPACE, TYPE_FLAG_ADDRESS_CLASS_1,
	TYPE_FLAG_ADDRESS_CLASS_2): Remove.
	(TYPE_INSTANCE_FLAG_CONST, TYPE_INSTANCE_FLAG_VOLATILE,
	TYPE_INSTANCE_FLAG_CODE_SPACE, TYPE_INSTANCE_FLAG_DATA_SPACE,
	TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1,
	TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2): New constants.
	(TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB, TYPE_TARGET_STUB,
	TYPE_STATIC, TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_VARARGS,
	TYPE_VECTOR, TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED,
	TYPE_NOTTEXT): Update.
	(TYPE_FLAG_ADDRESS_CLASS_ALL): Remove.
	(TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL): New define.
	(TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE,
	TYPE_ADDRESS_CLASS_1, TYPE_ADDRESS_CLASS_2,
	TYPE_ADDRESS_CLASS_ALL): Update.
	(struct main_type) <flags>: Remove.
	<flag_unsigned, flag_nosign, flag_stub, flag_target_stub,
	flag_static, flag_prototyped, flag_incomplete, flag_varargs,
	flag_vector, flag_stub_supported, flag_nottext,
	flag_fixed_instance>: New fields.
	<nfields, vptr_fieldno>: Move earlier.
	(TYPE_FLAGS): Remove.
	* gdbtypes.c (make_pointer_type): Update.
	(address_space_name_to_int): Update.
	(address_space_int_to_name): Update.
	(make_type_with_address_space): Update.
	(make_cv_type): Update.
	(create_range_type): Update.
	(get_discrete_bounds): Update.
	(create_set_type): Update.
	(make_vector_type): Update.
	(smash_to_method_type): Update.
	(check_typedef): Update.
	(check_stub_method): Update.
	(init_type): Individually assign flag fields.
	(recursive_dump_type): Don't print entire TYPE_FLAGS field.  Do
	print TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED, and TYPE_NOTTEXT.
	(copy_type_recursive): Copy the entire main type.  Don't use
	TYPE_FLAGS.
	* features/rs6000/powerpc-altivec64l.c
	(initialize_tdesc_powerpc_altivec64l): Update.
	* features/rs6000/powerpc-altivec64.c
	(initialize_tdesc_powerpc_altivec64): Update.
	* features/rs6000/powerpc-altivec32l.c
	(initialize_tdesc_powerpc_altivec32l): Update.
	* features/rs6000/powerpc-altivec32.c
	(initialize_tdesc_powerpc_altivec32): Update.
	* features/rs6000/powerpc-7400.c (initialize_tdesc_powerpc_7400):
	Update.
	* features/arm-with-iwmmxt.c (initialize_tdesc_arm_with_iwmmxt):
	Update.
	* dwarf2read.c (read_structure_type): Update.
	(read_enumeration_type): Likewise.
	(process_enumeration_scope): Likewise.
	(read_tag_pointer_type): Likewise.
	(read_subroutine_type): Likewise.
	(read_subroutine_type): Likewise.
	(read_base_type): Likewise.
	* coffread.c (coff_read_enum_type): Update.
	* ada-valprint.c (adjust_type_signedness): Update.
	* ada-typeprint.c (print_record_field_types): Update.
	* ada-lang.c (packed_array_type): Update.
	(empty_record): Don't reset TYPE_FLAGS.
	(ada_template_to_fixed_record_type_1): Update.
	(ada_template_to_fixed_record_type_1): Likewise.
	(template_to_static_fixed_type): Likewise.
	(to_record_with_fixed_variant_part): Likewise.
	(to_fixed_record_type): Likewise.
	(to_fixed_array_type): Likewise.
	(to_static_fixed_type): Likewise.
gdb/testsuite:
	* gdb.base/maint.exp: Update "maint print type".
2008-08-24 16:39:57 +00:00
Daniel Jacobowitz 0114d60260 * dwarf2read.c (processing_current_prefix): Delete static
variable.
	(process_full_comp_unit): Do not set processing_current_prefix.
	(dwarf2_full_name): New function.
	(read_func_scope): Do not set processing_current_prefix.  Use
	determine_prefix.
	(read_structure_type): Do not set processing_current_prefix.  Remove
	unused inner cleanup.
	(process_structure_scope): Do not set processing_current_prefix.
	(read_enumeration_type): Use dwarf2_full_name.
	(determine_class_name): Return a const char *.  Put the result
	on the objfile obstack.  Use dwarf2_full_name.
	(read_namespace_type): New function.
	(read_namespace): Do not create the type here.  Use
	determine_prefix.
	(read_typedef): Use dwarf2_full_name.  Do not pass the name
	to init_type.
	(read_base_type): Do not pass the name to init_type.  Handle
	TYPE_FLAG_NOSIGN.
	(read_unspecified_type): Do not pass the name to init_type.
	(new_symbol): Use dwarf2_full_name instead of
	processing_current_prefix.
	(read_type_die): Do not set processing_current_prefix.  Handle
	DW_TAG_namespace.
	(determine_prefix): Handle specifications.  Return the result
	on the objfile obstack.  Handle unions correctly.
2008-08-21 18:57:34 +00:00
Vladimir Prus 80f73d716b * gdb.mi/mi-nonstop.exp: Fix the check for non-stop
support.  Adjust the order of "*running" notifications.
	* gdb.mi/non-stop.c: Don't cast from int to void* and
	back.
2008-08-21 15:09:42 +00:00
Mark Kettenis d9c78d7d2c * gdb.arch/powerpc-prologue.exp: Code doesn't save %r31 so don't
expect to find it in the "info frame" output.
2008-08-21 11:36:38 +00:00
Daniel Jacobowitz 97a2d1d342 * gdb.base/interp.exp: Always consume both prompts. 2008-08-20 18:55:57 +00:00
Pedro Alves b96e292732 gdb/
* linespec.c (symtab_from_filename): Also throw NOT_FOUND_ERROR if
	there are no symbols loaded, instead of throwing a generic error.
	(decode_variable): Likewise.

	gdb/testsuite/
	* gdb.base/pending.exp: Test pending breakpoints without symbols
	loaded.
2008-08-20 11:47:57 +00:00
Vladimir Prus 8cf6e61a08 * lib/mi-support.exp (mi_expect_stop): Produce
more details on failures.
	* gdb.mi/mi-nonstop.exp: New.
	* gdb.mi/non-stop.c: New.
2008-08-19 14:13:29 +00:00
Vladimir Prus c6ebd6cf99 * target.c (target_async_permitted, target_async_permitted_1)
(set_maintenance_target_async_permitted)
        (show_maintenance_target_async_permitted): New.
        (initialize_targets): Register 'set target-async'.
        * target.h (target_async_permitted): Declare.
        * linux-nat.c (linux_nat_async_enabled)
        (linux_nat_async_permitted, set_maintenance_linux_async_permitted)
        (show_maintenance_linux_async_permitted): Remove.
        (sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
        (get_pending_events, linux_nat_async): Use target_async_permitted.
        (linux_nat_set_async_mode): Remove, moving the only used bits
        into...
        (linux_nat_setup_async): This.
        (_initialize_linux_nat): Do not register 'maint set linux-async'.
        Use linux_nat_setup_async.
        * remote.c (remote_async_permitted, remote_async_permitted_set)
        (set_maintenance_remote_async_permitted)
        (show_maintenance_remote_async_permitted): Remove.
        (remote_open_1, remote_terminal_inferior, remote_can_async_p)
        (remote_is_async_p): Use target_async_permitted.
        (_initialize_remote): Don't register 'main set remote-async'.
        * mi/mi-cmds.c (mi_cmds): Register -list-target-features.
        * mi/mi-cmds.h (mi_cmd_list_target_features): New.
        * mi/mi-main.c (mi_cmd_list_target_features): New.
2008-08-19 13:05:02 +00:00
Daniel Jacobowitz 46a9b8ed1b * rs6000-tdep.c (struct rs6000_framedata): Add gpr_mask, used_bl,
lr_register.
	(rs6000_in_function_epilogue_p): Check for bctr.
	(skip_prologue): Initialize lr_register.  Set lr_reg to a register
	number.  Set gpr_mask and used_bl.  Continue scanning while some
	expected registers are not saved.  Set lr_register if LR is not
	stored.
	(rs6000_frame_cache): Handle gpr_mask and lr_register.

	* gdb.arch/powerpc-prologue.exp: Correct saved registers.
2008-08-18 12:32:47 +00:00
Tom Tromey 44feb3ce38 gdb:
PR gdb/1535:
	* breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): New macros.
	(ep_find_event_name_end): Remove.
	(catch_fork_temporary, catch_vfork_temporary,
	catch_fork_permanent, catch_vfork_permanent): New constants.
	(catch_vfork, catch_fork): Remove.
	(catch_fork_command_1): Add 'command' argument.  Remove
	'fork_kind' and 'tempflag'.  Handle NULL 'arg'.  Update switch for
	all cases.
	(catch_exec_command_1): Add 'command' argument; remove
	'tempflag'.  Handle NULL 'arg'.
	(catch_load_command_1): Likewise.
	(catch_unload_command_1): Likewise.
	(catch_ada_exception_command): Likewise.
	(catch_assert_command): Likewise.
	(catch_catch_command): New function.
	(catch_throw_command): Likewise.
	(catch_command_1): Remove.
	(catch_command): Just call error.
	(tcatch_command): Likewise.
	(catch_cmdlist): New global.
	(tcatch_cmdlist): Likewise.
	(add_catch_command): New function.
	(_initialize_breakpoint): Create "catch" and "tcatch" as prefix
	commands.  Create all catch sub-commands.
gdb/testsuite:
	* gdb.base/help.exp (help catch): Rewrite.
2008-08-17 16:58:17 +00:00
Thiago Jung Bauermann 311a4e6b7b gdb/
2008-08-16  Vladimir Prus  <vladimir@codesourcery.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* cli-script.c (read_next_line): Add parse_commands argument.
	(recurse_read_control_structure): Adapt to new read_next_line
	signature.
	(read_command_lines): Add parse_commands argument.
	(define_command): Adapt to new read_command_lines signature.
	(document_command): Likewise.
	* breakpoint.c (commands_command): Likewise.
	* defs.h (read_command_lines): Adjust function prototype.

testsuite/
2008-08-16  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.base/define.exp: Test indented command documentation.
	* gdb.python/python.exp: Test indented multi-line command.
2008-08-16 20:36:30 +00:00
Luis Machado 604c2f837c * rs6000-tdep: Include "features/rs6000/powerpc-vsx32.c".
Include "features/rs6000/powerpc-vsx64.c".
	(ppc_supply_vsxregset): New function.
	(ppc_collect_vsxregset): New function.
	(IS_VSX_PSEUDOREG): New macro.
	(IS_EFP_PSEUDOREG): New macro.
	(vsx_register_p): New function.
	(ppc_vsx_support_p): New function.
	(rs6000_builtin_type_vec128): New function.
	(rs6000_register_name): Hide upper halves of vs0~vs31.  Return
	correct names for VSX registers and EFPR registers.
	(rs6000_pseudo_register_type): Return correct types for VSX
	and EFPR registers.
	(rs6000_pseudo_register_reggroup_p): Return correct group for
	VSX and EFPR registers.
	(ppc_pseudo_register_read): Rename to dfp_pseudo_register_read.
	(ppc_pseudo_register_write): Rename to dfp_pseudo_register_write.
	(vsx_pseudo_register_read): New function.
	(vsx_pseudo_register_write): New function.
	(efpr_pseudo_register_read): New function.
	(efpr_pseudo_register_write): New function.
	(rs6000_pseudo_register_read): Call new VSX and EFPR read functions.
	(rs6000_pseudo_register_write): Call new VSX and EFPR write functions.
	(rs6000_gdbarch_init): Declare have_vsx.
	Initialize new upper half VSX registers.
	Initialize VSX-related and EFPR-related pseudo-registers variables.
	Adjust the number of pseudo registers accordingly.

	* ppc-linux-nat.c: Define PTRACE_GETVSXREGS, PTRACE_SETVSXREGS
	and SIZEOF_VSRREGS.
	(gdb_vsxregset_t): New type.
	(have_ptrace_getsetvsxregs): New variable.
	(fetch_vsx_register): New function.
	(fetch_register): Handle VSX registers.
	(fetch_vsx_registers): New function.
	(fetch_ppc_registers): Handle VSX registers.
	(store_ppc_registers): Handle VSX registers.
	(store_vsx_register): New function.
	(store_register): Handle VSX registers.
	(store_vsx_registers): New function.
	(ppc_linux_read_description): Handle VSX-enabled inferiors.
	(gdb_vsxregset_t): New type.
	(supply_vsxregset): New function.
	(fill_vsxregset): New function.

	* ppc-tdep.h (vsx_register_p): New prototype.
	(vsx_support_p): New prototype.
	(ppc_vsr0_regnum): New variable.
	(ppc_vsr0_upper_regnum): Likewise.
	(ppc_efpr0_regnum): Likewise.
	(ppc_builtin_type_vec128): New type.
	(ppc_num_vsrs): New constant.
	(ppc_num_vshrs): New constant.
	(ppc_num_efprs): Likewise.
	Define POWERPC_VEC_VSX PPC_VSR0_UPPER_REGNUM and PPC_VSR31_UPPER_REGNUM.
	(ppc_supply_vsxregset): New prototype.
	(ppc_collect_vsxregset): New prototype.

	* ppc-linux-tdep.c: Include "features/rs6000/powerpc-vsx32l.c"
	Include "features/rs6000/powerpc-vsx64l.c".
	(_initialize_ppc_linux_tdep): Initialize VSX-enabled targets.
	(ppc_linux_regset_sections): Add new ".reg-ppc-vsx" field.
	(ppc32_linux_vsxregset): New 32-bit VSX-enabled regset.
	(ppc_linux_regset_from_core_section): Handle VSX core section.
	(ppc_linux_core_read_description): Support VSX-enabled core files.

	* ppc-linux-tdep.h: Declare *tdesc_powerpc_vsx32l
	Declare tdesc_powerpc_vsx64l

	* corelow.c (get_core_register_section): Support VSX-enabled
	core files.

	* features/rs6000/power-vsx.xml: New VSX descriptions.
	* features/rs6000/powerpc-vsx32.xml: New file.
	* features/rs6000/powerpc-vsx32l.xml: New file.
	* features/rs6000/powerpc-vsx64.xml: New file.
	* features/rs6000/powerpc-vsx64l.xml: New file.
	* features/rs6000/powerpc-vsx32.c: New file (generated).
	* features/rs6000/powerpc-vsx32l.c: New file (generated).
	* features/rs6000/powerpc-vsx64.c: New file (generated).
	* features/rs6000/powerpc-vsx64l.c: New file (generated).
	* features/Makefile: Updated with new descriptions.
	* regformats/rs6000/powerpc-vsx32l.dat: New file (generated).
	* regformats/rs6000/powerpc-vsx64l.dat: New file (generated).

	* testsuite/gdb.arch/vsx-regs.c: New source file.
	* testsuite/gdb.arch/vsx-regs.exp: New testcase.
	* testsuite/lib/gdb.exp (skip_vsx_tests): New function.
2008-08-15 15:18:34 +00:00
Tom Tromey 886a217cf4 gdb:
* macrocmd.c (macro_define_command): Check for NULL argument.
	(macro_undef_command): Likewise.
gdb/testsuite:
	* gdb.base/macscp.exp: Add regression test for "macro define" or
	"macro undef" with no arguments.
2008-08-14 18:03:22 +00:00
Paul Pluzhnikov c814a4f300 gdb.base/args.exp: Prevent ~/.gdbinit from affecting test. 2008-08-08 17:17:02 +00:00
Ulrich Weigand 12ab8a602f ChangeLog:
* spu-tdep.c (info_spu_dma_cmdlist): Only show entries with
	the valid bit set.  Ensure display order respects partial
	order defined by dependency bits.

testsuite/ChangeLog:

	* gdb.arch/spu-info.exp: Updated for "info spu dma" changes.
2008-08-07 21:25:28 +00:00
Thiago Jung Bauermann d57a3c85f6 Initial python support.
gdb/
2008-08-06  Vladimir Prus  <vladimir@codesourcery.com>
	    Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Doug Evans  <dje@google.com>

	* Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
	SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
	PYTHON_CFLAGS): New.
	(python_h, python_internal_h): New.
	(cli-script.o): Depend on python.h
	(python.o, python-utils.o): New.
	* cli/cli-script.c (print_command_lines): Handle python_control.
	(execute_control_command): Handle python_control.
	(execute_control_command_untraced): New function.
	(while_command): Call execute_control_command_untraced.
	(if_command): Likewise.
	(get_command_line): Remove static attribute.
	(read_next_line): Handle "python".
	(recurse_read_control_structure): Handle python_control.
	(read_command_lines): Handle python_control.
	Include python.h.
	* cli/cli-script.h (get_command_line): Add prototype.
	(execute_control_command_untraced): Likewise.
	* configure.ac: Add --with-python.
	* defs.h (enum command_control_type) <python_control>: New
	constant.
	* python/python-internal.h: New file.
	* python/python.c: New file.
	* python/python.h: New file.
	* python/python-utils.c: New file.
	* NEWS: Mention Python scripting support and its new commands.

gdb/doc/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Extending GDB): New chapter.
	(Sequences): Demoted chapter, now a section under the new
	Extending GDB chapter.
	(Python): New section.

gdb/testsuite/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.python/python.exp: New file.
2008-08-06 19:41:33 +00:00
Jan Kratochvil c7b778ff85 Fix for PR gdb/1543.
* gdb.base/sep.exp: `sep-proc.c' absolute line numbers replaced with
	$LOCATION.
	(location): New variable.
	* config/cfdbug.exp, config/d10v.exp, config/dve.exp, config/i960.exp,
	config/m32r.exp, config/mn10300-eval.exp, config/proelf.exp,
	config/rom68k.exp, config/sh.exp, config/unix.exp, config/vr4300.exp,
	config/vr5000.exp, config/vxworks.exp, gdb.arch/altivec-regs.exp,
	gdb.arch/e500-abi.exp, gdb.arch/e500-regs.exp, gdb.asm/asm-source.exp,
	gdb.base/a2-run.exp, gdb.base/advance.exp, gdb.base/all-bin.exp,
	gdb.base/args.exp, gdb.base/arithmet.exp, gdb.base/assign.exp,
	gdb.base/async.exp, gdb.base/auxv.exp, gdb.base/bigcore.c,
	gdb.base/bigcore.exp, gdb.base/bitfields.exp, gdb.base/bitops.exp,
	gdb.base/break.c, gdb.base/break.exp, gdb.base/break1.c,
	gdb.base/call-ar-st.exp, gdb.base/call-rt-st.exp,
	gdb.base/call-strs.exp, gdb.base/callfuncs.c, gdb.base/callfuncs.exp,
	gdb.base/checkpoint.exp, gdb.base/chng-syms.exp,
	gdb.base/code-expr.exp, gdb.base/commands.exp, gdb.base/completion.exp,
	gdb.base/complex.exp, gdb.base/cond-expr.exp, gdb.base/condbreak.exp,
	gdb.base/consecutive.exp, gdb.base/corefile.exp, gdb.base/cvexpr.c,
	gdb.base/cvexpr.exp, gdb.base/dbx.exp, gdb.base/default.exp,
	gdb.base/define.exp, gdb.base/del.c, gdb.base/detach.exp,
	gdb.base/display.exp, gdb.base/dump.exp, gdb.base/echo.exp,
	gdb.base/environ.exp, gdb.base/eval-skip.exp, gdb.base/exprs.exp,
	gdb.base/fileio.exp, gdb.base/find.exp, gdb.base/finish.exp,
	gdb.base/funcargs.exp, gdb.base/gcore-buffer-overflow.exp,
	gdb.base/gcore.exp, gdb.base/gdb1555.exp, gdb.base/gdbvars.exp,
	gdb.base/help.exp, gdb.base/huge.exp, gdb.base/info-proc.exp,
	gdb.base/interrupt.exp, gdb.base/jump.exp, gdb.base/langs.exp,
	gdb.base/lineinc.exp, gdb.base/list.exp, gdb.base/macscp.exp,
	gdb.base/maint.exp, gdb.base/mips_pro.exp, gdb.base/miscexprs.exp,
	gdb.base/nodebug.exp, gdb.base/nofield.c, gdb.base/opaque.exp,
	gdb.base/overlays.exp, gdb.base/page.exp, gdb.base/pc-fp.exp,
	gdb.base/pending.c, gdb.base/pendshr.c, gdb.base/pointers.exp,
	gdb.base/psymtab.exp, gdb.base/ptype.exp, gdb.base/randomize.c,
	gdb.base/readline.exp, gdb.base/recurse.exp, gdb.base/regs.exp,
	gdb.base/relational.exp, gdb.base/relocate.exp, gdb.base/remote.exp,
	gdb.base/reread.exp, gdb.base/return.exp, gdb.base/return2.exp,
	gdb.base/scope.exp, gdb.base/sect-cmd.exp, gdb.base/sep-proc.c,
	gdb.base/sep.c, gdb.base/sep.exp, gdb.base/sepdebug.c,
	gdb.base/sepdebug.exp, gdb.base/setshow.exp, gdb.base/shlib-call.exp,
	gdb.base/sigaltstack.c, gdb.base/so-indr-cl.exp, gdb.base/solib.exp,
	gdb.base/source.exp, gdb.base/start.c, gdb.base/step-bt.c,
	gdb.base/step-line.exp, gdb.base/structs.c, gdb.base/structs.exp,
	gdb.base/structs2.exp, gdb.base/term.exp, gdb.base/twice.exp,
	gdb.base/type-opaque.exp, gdb.base/until.exp,
	gdb.base/value-double-free.c, gdb.base/varargs.exp,
	gdb.base/watchpoint.exp, gdb.base/whatis-exp.exp, gdb.disasm/am33.exp,
	gdb.disasm/h8300s.exp, gdb.disasm/hppa.exp, gdb.disasm/mn10300.exp,
	gdb.disasm/sh3.exp, gdb.disasm/t01_mov.exp, gdb.disasm/t02_mova.exp,
	gdb.disasm/t03_add.exp, gdb.disasm/t04_sub.exp, gdb.disasm/t05_cmp.exp,
	gdb.disasm/t06_ari2.exp, gdb.disasm/t07_ari3.exp,
	gdb.disasm/t08_or.exp, gdb.disasm/t09_xor.exp, gdb.disasm/t10_and.exp,
	gdb.disasm/t11_logs.exp, gdb.disasm/t12_bit.exp,
	gdb.disasm/t13_otr.exp, gdb.fortran/exprs.exp, gdb.fortran/types.exp,
	gdb.hp/gdb.aCC/exception.exp, gdb.hp/gdb.aCC/optimize.exp,
	gdb.hp/gdb.aCC/watch-cmd.exp, gdb.hp/gdb.base-hp/callfwmall.exp,
	gdb.hp/gdb.base-hp/dollar.exp, gdb.hp/gdb.base-hp/hwwatchbus.exp,
	gdb.hp/gdb.base-hp/pxdb.exp, gdb.hp/gdb.base-hp/reg-pa64.exp,
	gdb.hp/gdb.base-hp/reg.exp, gdb.hp/gdb.base-hp/sized-enum.exp,
	gdb.hp/gdb.base-hp/so-thresh.exp, gdb.hp/gdb.compat/xdb1.exp,
	gdb.hp/gdb.compat/xdb2.exp, gdb.hp/gdb.compat/xdb3.exp,
	gdb.java/jmisc.exp, gdb.java/jv-exp.exp, gdb.java/jv-print.exp,
	gdb.mi/gdb669.exp, gdb.mi/gdb680.exp, gdb.mi/gdb701.exp,
	gdb.mi/gdb792.exp, gdb.mi/mi-basics.exp, gdb.mi/mi-console.exp,
	gdb.mi/mi-hack-cli.exp, gdb.mi/mi-pending.c, gdb.mi/mi-pendshr.c,
	gdb.mi/mi-pthreads.exp, gdb.mi/mi-read-memory.exp, gdb.mi/mi-regs.exp,
	gdb.mi/mi-syn-frame.exp, gdb.mi/mi-until.exp, gdb.mi/mi2-basics.exp,
	gdb.mi/mi2-console.exp, gdb.mi/mi2-hack-cli.exp,
	gdb.mi/mi2-pthreads.exp, gdb.mi/mi2-read-memory.exp,
	gdb.mi/mi2-regs.exp, gdb.mi/mi2-syn-frame.exp, gdb.mi/mi2-until.exp,
	gdb.pascal/types.exp, gdb.stabs/weird.exp,
	gdb.threads/gcore-thread.exp, gdb.threads/manythreads.exp,
	gdb.threads/print-threads.exp, gdb.threads/pthreads.exp,
	gdb.threads/schedlock.exp, gdb.threads/step.exp, gdb.threads/step2.exp,
	gdb.threads/switch-threads.exp, gdb.threads/thread-specific.exp,
	gdb.threads/thread_check.exp, gdb.threads/thread_events.exp,
	gdb.threads/tls-nodebug.exp, gdb.threads/tls-shared.exp,
	gdb.threads/tls.exp, gdb.trace/actions.exp, gdb.trace/backtrace.exp,
	gdb.trace/circ.exp, gdb.trace/collection.exp, gdb.trace/deltrace.exp,
	gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
	gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
	gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
	gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp,
	lib/mi-support.exp, lib/trace-support.exp: Remove reference
	to bug-gdb@prep.ai.mit.edu .
2008-08-06 12:52:08 +00:00
Vladimir Prus 5e06a3d1d5 * lib/mi-support.exp (mi_load_shlibs): New.
* gdb.mi/mi-pending.exp: Use mi_load_shlibs, not gdb_load_shlibs.
2008-07-31 07:38:51 +00:00
Vladimir Prus 9d81d21bde * lib/mi-support.exp (get_mi_thread_list)
(check_mi_and_console_threads): New, moved from ...
	* gdb.mi/mi-pthread.exp: ...here.
	* gdb.mi/gdb669.exp (get_mi_thread_list)
	(check_mi_and_console_threads): Delete.
	* gdb.mi/mi2-pthread.exp: Likewise.
2008-07-30 17:08:45 +00:00
Tom Tromey bae98fe013 * Makefile.in (just-check): Remove. Move body to...
(check): ... here.
2008-07-28 20:05:58 +00:00
Daniel Jacobowitz 57380f4e0b * linux-nat.c (resume_callback): Add more debugging output.
(linux_nat_has_pending_sigint): New function, based on
	linux_nat_has_pending.
	(set_ignore_sigint, maybe_clear_ignore_sigint): New functions.
	(stop_wait_callback): Remove flush_mask handling.  Honor
	ignore_sigint.  Call maybe_clear_ignore_sigint.  Pass NULL
	to recursive calls.
	(linux_nat_has_pending, flush_callback): Remove.
	(linux_nat_filter_event): Check for ignore_sigint.
	(linux_nat_wait): Remove flush_mask support and call to
	flush_callback.  Use set_ignore_sigint and maybe_clear_ignore_sigint.
	* linux-nat.h (struct lwp_info): Add ignore_sigint field.

	* gdb.threads/manythreads.exp: Use remote_expect instead of after.
	Add a test for duplicated SIGINTs.
2008-07-27 21:12:40 +00:00
Daniel Jacobowitz e09490f18a * linux-nat.c (count_events_callback, select_event_lwp_callback): Only
report events from resumed threads.

	* gdb.threads/schedlock.exp (get_args): Update to work for any
	value of NUM.
	(Top level): Report the number of threads that did not resume.
2008-07-27 21:05:37 +00:00
Daniel Jacobowitz 6387b45f80 * gdb.dwarf2/dw2-compressed.S: Also define __start. 2008-07-27 21:01:45 +00:00
Daniel Jacobowitz 62f64ff2d6 * lib/mi-support.exp (default_mi_gdb_start): Remove check for
non-MI prompt.
2008-07-27 20:57:43 +00:00
Tom Tromey fa8de41e93 gdb:
PR gdb/1158:
	* valops.c (value_struct_elt): Treat function-valued field as a
	static method.
gdb/testsuite:
	* gdb.base/callfuncs.c (struct struct_with_fnptr): New struct.
	(function_struct, function_struct_ptr): New globals.
	* gdb.base/callfuncs.exp (do_function_calls): Test calling via a
	function pointer in a struct.
2008-07-27 02:00:04 +00:00
Tom Tromey ccb3ac8a12 gdb:
PR gdb/1136:
	* macroexp.c (get_punctuator) <punctuators>: Rearrange to put
	longer tokens first.
gdb/testsuite:
	* gdb.base/macscp.exp: Add test for macro lexing bug.
2008-07-27 01:58:01 +00:00
Tom Tromey d7d9f01ea1 gdb
PR gdb/855:
	* NEWS: Add entry for macro commands.
	* Makefile.in (macrocmd.o): Add gdb_string.h.
	* macroscope.h (user_macro_scope): Declare.
	(default_macro_scope): Update documentation.
	(macro_user_macros): Declare.
	* c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
	Use user_macro_scope.
	(null_macro_lookup): Remove.
	* macrotab.h (macro_callback_fn): Declare.
	(macro_for_each): Likewise.
	(macro_allow_redefinitions): Likewise.
	* macrotab.c (foreach_macro): New function
	(macro_for_each): Likewise.
	(struct macro_table) <redef_ok>: New field.
	(macro_allow_redefinitions): New function.
	(new_macro_table): Update.
	(macro_define_function): Likewise.
	(macro_define_object): Likewise.
	* macroscope.c (user_macro_scope): New function.
	(default_macro_scope): Use it.
	(macro_user_macros): New global.
	(standard_macro_lookup): Look in macro_user_macros.
	(_initialize_macroscope): New function.
	* macroexp.h (macro_is_whitespace, macro_is_digit,
	macro_is_identifier_nondigit): Declare.
	* macroexp.c (macro_is_whitespace): Rename.  No longer static.
	(macro_is_digit): Likewise.
	(macro_is_identifier_nondigit): Likewise.
	(get_identifier): Update.
	(get_pp_number): Likewise.
	(get_token): Likewise.
	* macrocmd.c (skip_ws): New function.
	(extract_identifier): Likewise.
	(free_macro_definition_ptr): Likewise.
	(user_macros): Remove.
	(macro_define_command): Implement.
	(_initialize_macrocmd): Update.
	(macro_undef_command): Implement.
	(print_one_macro): New function.
	(macro_list_command): Implement.
gdb/doc
	* gdb.texinfo (Macros): Update.  Use @code rather than @command.
gdb/testsuite
	* gdb.base/macscp.exp: Add macro tests.
2008-07-18 20:55:33 +00:00
Paul Pluzhnikov 9bf07184c9 Fix for Linux/VDSO failure. 2008-07-17 20:57:26 +00:00
Paul Pluzhnikov becf64774c Fix for gdb.base/corefile.exp failure on Linux 2008-07-17 19:01:44 +00:00
Paul Pluzhnikov 0709f7d3ac Fix for 'FAIL: gdb.cp/class2.exp: p acp->c2' on spu-elf 2008-07-15 19:15:28 +00:00
Paul Pluzhnikov 7093c834d7 Fix for PR gdb/2477 2008-07-14 18:28:57 +00:00
Jan Kratochvil b432ffe3e2 * gdb.base/randomize.exp: Catch non-Linux targets as untested. 2008-07-13 14:56:02 +00:00
Vladimir Prus b1a268e5b4 * infrun.c (normal_stop): For MI, report which threads
were stopped.
2008-07-12 12:41:56 +00:00
Kevin Buettner e2995f8ea0 * gdb.arch/e500-regs.exp (decimal_vector): Adjust "v8_int8" portion
of regexp to account for changes made to GDB in the printing of
	byte vectors.
2008-07-11 21:57:24 +00:00
Tom Tromey 14032a66f1 gdb
* completer.c (complete_line_internal): New function, from
	complete_line.  Add 'for_help' parameter.
	(complete_line): Use it.
	(command_completer): Move later.  Rewrite.
gdb/testsuite
	* gdb.base/completion.exp: Add 'help' completion test.
2008-07-11 15:07:52 +00:00
Jan Kratochvil 981505ef9a * gdb.base/randomize.exp: Remove dependency on tcl-8.4+. 2008-07-10 20:16:27 +00:00
Jan Kratochvil 10568435e1 gdb/
* NEWS (New commands): Mention "set disable-randomization".
	* configure.ac: Add check for HAVE_PERSONALITY and
	HAVE_DECL_ADDR_NO_RANDOMIZE.
	* configure, config.in: Regenerate.
	* linux-nat.c [HAVE_PERSONALITY]: New include <sys/personality.h>.
	[HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
	ADDR_NO_RANDOMIZE.
	(disable_randomization, show_disable_randomization)
	(set_disable_randomization): New.
	(linux_nat_create_inferior) [HAVE_PERSONALITY]: New variables
	PERSONALITY_ORIG and PERSONALITY_SET.  Disable randomization upon the
	variable DISABLE_RANDOMIZATION.
	(_initialize_linux_nat): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
	DISABLE_RANDOMIZATION.

gdb/doc/
	* gdb.texinfo (Starting): Document "set disable-randomization".

gdb/testsuite/
	* gdb.base/randomize.exp, gdb.base/randomize.c: New files.
2008-07-10 09:31:00 +00:00
Pedro Alves 4487aabf2e gdb/
2008-07-09  Pedro Alves  <pedro@codesourcery.com>

	* symfile.c (load_command): Reopen the exec file and reread
	symbols before anything else.

gdb/testsuite/
2008-07-09  Pedro Alves  <pedro@codesourcery.com>

	* gdb.base/chng-syms.exp: Don't expect "No symbol ...".
2008-07-09 11:16:49 +00:00
Pedro Alves a4a9b1c4f2 * gdb.base/fullname.exp: Restore pwd if compiling failed. 2008-07-09 10:50:52 +00:00
Jan Kratochvil 3c3185ac88 gdb/
* breakpoint.c (bpstat_copy): Call RELEASE_VALUE on the new OLD_VAL.

gdb/testsuite/
	* gdb.base/value-double-free.exp, gdb.base/value-double-free.c: New.
2008-07-07 22:39:59 +00:00
Daniel Jacobowitz ed5e946612 Add missed changelog entry. 2008-07-05 13:48:21 +00:00
Vladimir Prus 7ebd49dca3 * lib/mi-support.exp (mi_send_resuming_command_raw): Revert
previous commit.  Add a comment.
2008-06-28 11:31:02 +00:00
Pedro Alves 84e46146f7 gdb/
2008-06-28  Pedro Alves  <pedro@codesourcery.com>

	* linux-nat.c (enum sigchld_state): New.
	(linux_nat_async_events_state): Renamed from
	linux_nat_async_events_enabled.
	(linux_nat_event_pipe_push, my_waitpid): Adjust.
	(sigchld_default_action): New.
	(lin_lwp_attach_lwp): Adjust.  Call linux_nat_async_events
	unconditionally.
	(linux_nat_create_inferior): Set events state to sigchld_default
	state.
	(linux_nat_resume): Adjust.
	(linux_nat_wait): Call linux_nat_async_events unconditionally.
	(sigchld_handler): Adjust.
	(linux_nat_async_mask): Don't set SIGCHLD actions here.
	(get_pending_events): Adjust.
	(linux_nat_async_events): Rewrite to handle enum sigchld_state
	instead of a boolean.
	(linux_nat_async): Adjust.
	(_initialize_linux_nat): Capture default SIGCHLD action into
	sigchld_default_action.

gdb/testsuite/
2008-06-28  Pedro Alves  <pedro@codesourcery.com>

	* gdb.base/sigchld.c, gdb.base/sigchld.exp: New test.
2008-06-28 11:15:34 +00:00
Vladimir Prus 0f8d4a2f6e * lib/mi-support.exp (mi_send_resuming_command_raw): Report pass. 2008-06-28 10:14:34 +00:00
Vladimir Prus 53c2f6a972 Revert accidental commit 2008-06-28 10:03:42 +00:00
Pedro Alves f747e0ce0a * lib/gdb.exp (gdb_saved_set_unbuffered_mode_obj): New global.
(gdb_compile): If target is *-*-cygwin* or *-*-mingw*, and we're
	compiling an executable, link in an object that forces unbuffered
	output.
	* lib/set_unbuffered_mode.c: New file.
2008-06-27 16:42:19 +00:00
Vladimir Prus d50867903f * target.c (target_read_until_error): New.
* target.h (target_read_until_error): Declare.
        * mi/mi-main.c (mi_cmd_data_read_memory): Use
        target_read_until_error.
2008-06-26 15:10:48 +00:00
Jan Kratochvil 734a5c3612 * lib/gdb.exp (prepare_for_testing): Do not drop the OPTIONS argument. 2008-06-25 15:52:15 +00:00
Daniel Jacobowitz 2c40eaebf8 Revert accidental commit. 2008-06-25 15:21:21 +00:00
Vladimir Prus a2840c3559 Emit ^running via observer.
* mi/mi-interp.c (mi_cmd_interpreter_exec): Do no print
        ^running here.
        (mi_on_resume): Print ^running if not previously output.
        * mi/mi-main.c (running_result_record_printed): New.
        (captured_mi_execute_command): Reset
        running_result_record_printed.  Use running_result_record_printed
        to decide if we should skip ^done.
        (mi_execute_async_cli_command): Don't print ^running here.
        * mi/mi-main.h (current_token, running_result_record_printed):
        Declare.
2008-06-25 14:32:34 +00:00
Daniel Jacobowitz 7413f23fb4 * elf32-arm.c (STUB_ENTRY_NAME): Define.
(arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
	(arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
	R_ARM_ABS32.
	(struct elf32_arm_stub_hash_entry): Add output_name.
	(arm_build_one_stub): Move offsets into the offset argument
	of _bfd_final_link_relocate.  Correct offset for
	arm_thumb_arm_v4t_stub_long_branch.
	(elf32_arm_size_stubs): Set stub_entry->output_name.
	(elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
	Update all callers.
	(elf32_arm_output_stub_sym): New.
	(arm_map_one_stub): Correct formatting.  Use elf32_arm_output_stub_sym.

	* ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d,
	ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
	ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d,
	ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d,
	ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
	ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
	ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm.d,
	ld-arm/farcall-thumb-thumb-blx-pic-veneer.d,
	ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d,
	ld-arm/thumb2-bl-as-thumb1-bad.d, ld-arm/thumb2-bl-bad.d: Update for
	stub symbols and stub corrections.
2008-06-25 14:28:48 +00:00
Vladimir Prus 6ae37fefeb Robustify mi-simplerun.
* gdb.mi/basics.c (main): Add a call to sleep.
        * gdb.mi/mi-cli.exp: Adjust for change in line numbers.
        * gdb.mi/mi2-cli.exp: Likewise.
        * gdb.mi/mi-break.exp: Likewise.
2008-06-13 19:53:42 +00:00
Vladimir Prus b4aa76f032 Fix date in changelog entry 2008-06-11 13:50:55 +00:00
Vladimir Prus 83408de733 * gdb.mi/mi-break.exp (test_ignore_count): Use mi_expect_stop. 2008-06-11 13:35:58 +00:00
Vladimir Prus e1ac332873 Implement *running.
* Makefile.in: Update dependencies.
        * gdbthread.h (struct thread_info): New field
        running_.
        (set_running, is_running): New.
        * thread.c (set_running, is_running): New.
        * inferior.h (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        * infcmd.c (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        (finish_command_continuation, finish_command): Adjust.
        * infcall.c (call_function_by_hand): Adjust.
        * infrun.c (normal_stop): Call set_running.
        * target.c (target_resume): New.  Call set_running.
        * target.h (target_resume): Convert from macro to
        a function.

        * mi/mi-interp.c (mi_on_resume): New.
        (mi_interpreter_init): Register mi_on_resume.
2008-06-10 10:23:54 +00:00
Vladimir Prus f7f9a841a3 Use observers to report stop events in MI.
* mi/mi-interp.c (mi_on_normal_stop): New.
        (mi_interpreter_init): Register mi_on_normal_stop.
        (mi_interpreter_exec_continuation): Remove.
        (mi_cmd_interpreter_exec): Don't register the above.
        * mi/mi-main.c (captured_mi_execute_command): Don't care
        about sync_execution.
        (mi_execute_async_cli_command): Don't install continuation.  Don't
        print *stopped.
        (mi_exec_async_cli_cmd_continuation): Remove.
2008-06-10 09:35:09 +00:00
Tom Tromey 37cd5d19fe gdb
* completer.c (complete_line): Don't special-case
	expression_completer.
	(expression_completer): Only pass last word to
	location_completer.
	* c-exp.y (yylex): Check 'token', not 'operator'.
gdb/testsuite
	* gdb.base/completion.exp: New tests for field name completion
	with spaces, and field name completion with '->'.
2008-06-09 19:25:15 +00:00
Tom Tromey 65d12d83a5 gdb
* value.h (evaluate_subexpression_type, extract_field_op):
	Declare.
	* printcmd.c (_initialize_printcmd): Use expression_completer for
	'p', 'inspect', 'call'.
	* parser-defs.h (parse_field_expression): Declare.
	* parse.c: Include exceptions.h.
	(in_parse_field, expout_last_struct): New globals.
	(mark_struct_expression): New function.
	(prefixify_expression): Return int.
	(prefixify_subexp): Return int.  Use expout_last_struct.
	(parse_exp_1): Update.
	(parse_exp_in_context): Add 'out_subexp' argument.  Handle
	in_parse_field.
	(parse_field_expression): New function.
	* expression.h (parse_field_expression): Declare.
	(in_parse_field): Likewise.
	* eval.c (evaluate_subexpression_type): New function.
	(extract_field_op): Likewise.
	* completer.h (expression_completer): Declare.
	* completer.c (expression_completer): New function.
	(count_struct_fields, add_struct_fields): New functions.
	* c-exp.y (yyparse): Redefine.
	(COMPLETE): New token.
	(exp): New productions.
	(saw_name_at_eof, last_was_structop): New globals.
	(yylex): Return COMPLETE when needed.  Recognize in_parse_field.
	(c_parse): New function.
	* breakpoint.c (_initialize_breakpoint): Use expression_completer
	for watch, awatch, and rwatch.
	* Makefile.in (parse.o): Depend on exceptions_h.
gdb/testsuite
	* gdb.base/break1.c (struct some_struct): New struct.
	(values): New global.
	* gdb.base/completion.exp: Add field name completion test.
gdb/doc
	* gdb.texinfo (Completion): Add field name example.
2008-06-06 20:58:08 +00:00
Paul Pluzhnikov ebfe2e3fb6 2008-06-06 Paul Pluzhnikov <ppluzhnikov@google.com>
* gdb.cp/call-c.exp: Test for incorrect handling of reference
	to pointer.
	* gdb.cp/call-c.cc: Likewise.
2008-06-06 18:29:52 +00:00
Nick Roberts bcf6fc3ae4 *** empty log message *** 2008-06-06 00:41:22 +00:00
Nick Roberts 47741aa56c (thread_switch): Test for thread-changed annotation. 2008-06-06 00:40:21 +00:00
Pedro Alves 49fd4a422b gdb/
* linux-thread-db.c (thread_db_wait): Don't trim event ptid.

testsuite/
	* gdb.threads/execl.c, gdb.threads/execl1.c,
	gdb.threads/execl.exp: New tests.
2008-06-05 21:03:59 +00:00