Commit Graph

23198 Commits

Author SHA1 Message Date
gdbadmin ac0cb9be4e *** empty log message *** 2008-08-07 00:00:33 +00:00
Dave Anglin 6536cc32e2 * solib-pa64.c (read_dld_descriptor): Return zero if load map is not
setup.
2008-08-06 20:17:21 +00:00
Mark Kettenis f73a15e424 * i386obsd-nat.c (i386obsd_supply_pcb): Adjust for changes in
OpenBSD 4.3.
2008-08-06 19:56:20 +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
Ulrich Weigand 5141027dd0 * spu-tdep.c (spu_gdbarch_init): Call set_gdbarch_frame_red_zone_size. 2008-08-06 18:28:26 +00:00
Phil Muldoon 353cfe88ae 2008-08-06 Phil Muldoon <pmuldoon@redhat.com>
* MAINTAINERS (Write After Approval): Add self.
2008-08-06 13:45:18 +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
Phil Muldoon d6b74ac48c 2008-08-06 Phil Muldoon <pmuldoon@redhat.com>
* breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled.
	(insert_breakpoint_locations): Likewise.
2008-08-06 10:12:34 +00:00
Michael Snyder ef0d312a8f 2008-08-05 Phil Muldoon <pmuldoon@redhat.com>
* breakpoint.c (create_longjmp_breakpoint): Remove unused struct
	breakpoint.
	(set_longjmp_breakpoint): Likewise.
2008-08-06 04:25:11 +00:00
gdbadmin 08bc6426e4 *** empty log message *** 2008-08-06 00:00:33 +00:00
Ulrich Weigand 3221518cf2 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
(usr_store_inferior_registers): Likewise.
	(regsets_store_inferior_registers): Likewise.
2008-08-05 22:13:23 +00:00
Ulrich Weigand fb6d93b2a9 2008-08-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR build/2490
	* solib-pa64.c: Only compile if both HAVE_ELF_HP_H and __LP64__ are
	defined.
2008-08-05 21:10:30 +00:00
Tom Tromey e6ad058ac4 * bcache.c (deprecated_bcache_added): Initialize obstack.
(bcache_xmalloc): Don't initialize obstack.
	(bcache_xfree): Conditionally free obstack.
	(bcache_memory_used): Update.
2008-08-05 20:43:17 +00:00
Tom Tromey 11d31d9471 * symfile.c (add_psymbol_to_bcache): Return a const pointer. Use
bcache_full.
	(append_psymbol_to_list): Accept a const pointer.
	(add_psymbol_to_list): Fix const correctness.
	* bcache.h: (deprecated_bcache_added, deprecated_bcache): Remove.
	(bcache_full): Declare.
	* bcache.c (bcache_data, deprecated_bcache): Remove.
	(bcache): Use bcache_full.
	(bcache_full): Rename from deprecated_bcache_added.  Change return
	type.
2008-08-05 20:41:16 +00:00
Stan Shebs 5be973eb83 * solib-svr4.c (BKPT_AT_SYMBOL): Remove, always defined.
(bkpt_names): Remove SOLIB_BKPT_NAME, never defined.
	(enable_break): Remove test of BKPT_AT_SYMBOL.
2008-08-05 00:16:23 +00:00
gdbadmin 04ff15ff3b *** empty log message *** 2008-08-05 00:00:03 +00:00
gdbadmin d8b1821a90 *** empty log message *** 2008-08-04 00:00:03 +00:00
gdbadmin 245f377a1e *** empty log message *** 2008-08-03 00:00:34 +00:00
Keith Seitz 5062cc192e * acinclude.m4: Include ../config/tcl.m4 to pick up
standard Tcl configury bits.
        Remove all Tcl, Tk, Itcl, Itk, etc definitions.
        * configure.ac: Don't check if ../itcl exists when building
        gdbtk. It could be installed.
        Rewrite gdbtk configury to allow for using system-supplied
        Tcl and Tk. Gdbtk no longer requires build-time access to
        itcl and itk.
        * Makefile.in: Remove everything related to itcl and itk.
        Rewrite the Tcl bits for gdbtk to correspond to rewrite of
        configure.ac.
        Remove v850ice.o build rule.
        (ALL_TCL_CFLAGS): New convenience defintion. Change all
        gdbtk sources to use it.
        * configure: Regenerate.
2008-08-02 21:36:06 +00:00
gdbadmin 33d88f86a7 *** empty log message *** 2008-08-02 00:00:03 +00:00
Stan Shebs 6d76a53df9 * coffread.c (coff_symtab_read): Remove FUNCTION_EPILOGUE_SIZE.
* gdbint.texinfo: Remove FUNCTION_EPILOGUE_SIZE.
2008-08-01 01:09:00 +00:00
gdbadmin 8a9b3ffff8 *** empty log message *** 2008-08-01 00:00:03 +00:00
Pedro Alves ec56be1b4d * configure.ac: Check for memmem declaration.
* server.c [HAVE_MALLOC_H]: Include malloc.h.
	(disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
	(disable_packet_qfThreadInfo): Unconditionally compile.
	* server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
	* configure, config.in: Regenerate.
2008-07-31 17:46:33 +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
gdbadmin d970b37663 *** empty log message *** 2008-07-31 00:00:33 +00:00
Stan Shebs ed7c5e4396 * objfiles.c (TARGET_KEEP_SECTION): Remove.
(add_to_objfile_sections): Remove use.
2008-07-30 21:53:07 +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 22ad7fee2a * cli/cli-decode.c (lookup_cmd_1): Use memcpy.
(lookup_cmd_composition): Likewise.
2008-07-30 01:10:17 +00:00
Tom Tromey d5529a849e * cli/cli-cmds.c (edit_command): Remove unused variables. Delete
dead code.  Fix indentation.
2008-07-30 01:08:35 +00:00
gdbadmin f0a53eaa82 *** empty log message *** 2008-07-30 00:00:04 +00:00
Stan Shebs 1f70da6a3a * gdbint.texinfo: General round of cleanup and minor
clarifications.
	(Breakpoint Handling): Remove mention of BREAKPOINT macro.
	(Longjmp Support): Update description to reflect how it is done
	for targets without using native header.
	(Symbol Handling): Add a little more general explanation.
	(COFF, ELF): Mention stabs encapsulation.
	(DWARF 3): New section.
	(Adding a New Host): Scrub out some obsolete bits.
	(Generic Host Support Files): Mention ser-pipe.c, ser-mingw.c.
	(Host Conditionals): Remove descriptions of NO_STD_REGS,
	HAVE_MMAP, HAVE_TERMIO, INT_MAX etc, LONGEST, HAVE_LONG_DOUBLE,
	PRINTF_HAS_LONG_DOUBLE, SCANF_HAS_LONG_DOUBLE, L_SET, SEEK_CUR,
	SEEK_SET, STOP_SIGNAL, USG.
	(Raw and Virtual Register Representations): Ditto for
	DEPRECATED_REGISTER_RAW_SIZE, DEPRECATED_REGISTER_VIRTUAL_SIZE,
	DEPRECATED_REGISTER_VIRTUAL_TYPE, REGISTER_CONVERT_TO_TYPE.
	(Target Conditionals): Ditto for DEPRECATED_FP_REGNUM,
	DEPRECATED_FRAMELESS_FUNCTION_INVOCATION, DEPRECATED_FRAME_CHAIN,
	DEPRECATED_FRAME_CHAIN_VALID, DEPRECATED_FRAME_INIT_SAVED_REGS,
	DEPRECATED_FRAME_SAVED_PC, DEPRECATED_FUNCTION_START_OFFSET,
	DEPRECATED_REGISTER_VIRTUAL_SIZE,
	DEPRECATED_REGISTER_VIRTUAL_TYPE,
	DEPRECATED_USE_STRUCT_CONVENTION.
	Describe gdbarch_deprecated_fp_regnum.
	Update description of gdbarch_print_insn.
	(Adding a New Target): Scrub out obsolete bits.
	(Obsolete Conditionals): Remove entire section.
2008-07-29 20:26:53 +00:00
Stan Shebs 938f4ca847 * main.c (captured_main): Remove long-unused #if 0 blocks. 2008-07-29 14:16:15 +00:00
gdbadmin 97f056de89 *** empty log message *** 2008-07-29 00:00:35 +00:00
Tom Tromey bae98fe013 * Makefile.in (just-check): Remove. Move body to...
(check): ... here.
2008-07-28 20:05:58 +00:00
Doug Evans 2fe5e3ffed * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
(linux_write_memory): Remove declaration of errno.
2008-07-28 18:28:56 +00:00
Tom Tromey 7f4b89d1b6 * annotate.h (deprecated_annotate_starting_hook): Remove.
(deprecated_annotate_stopped_hook): Remove.
	(deprecated_annotate_exited_hook): Remove.
	* Makefile.in (annotate.o): Depend on observer_h.
	* top.c (deprecated_delete_breakpoint_hook): Remove.
	(deprecated_create_breakpoint_hook): Likewise.
	(deprecated_modify_breakpoint_hook): Likewise.
	* interps.c (clear_interpreter_hooks): Update for removed hooks.
	* breakpoint.c (mention): Don't call removed hook.
	(delete_breakpoint): Likewise.
	(disable_breakpoint): Likewise.
	(do_enable_breakpoint): Likewise.
	* annotate.c: Include observer.h.
	(breakpoint_changed): Change type of argument.
	(_initialize_annotate): Register observers.
	(deprecated_annotate_starting_hook): Remove.
	(deprecated_annotate_stopped_hook): Remove.
	(deprecated_annotate_exited_hook): Remove.
	(annotate_starting): Update for hook removal.
	(annotate_stopped): Likewise.
	(annotate_exited): Likewise.
	* defs.h (deprecated_delete_breakpoint_hook): Remove.
	(deprecated_create_breakpoint_hook): Likewise.
	(deprecated_modify_breakpoint_hook): Likewise.
2008-07-28 17:53:52 +00:00
Tom Tromey 8641e68297 * main.c (captured_main): Don't use BEFORE_MAIN_LOOP_HOOK. 2008-07-28 16:29:02 +00:00
gdbadmin 17bdf94d94 *** empty log message *** 2008-07-28 00:00:34 +00:00
Daniel Jacobowitz 064ef605af * configure.ac: Check for the GNU/Linux ptrace signature.
* configure: Regenerated.
2008-07-27 21:18:50 +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
Daniel Jacobowitz e38d4e1aae * mips-linux-tdep.c (mips_linux_syscall_next_pc): New function.
(mips_linux_init_abi): Set tdep->syscall_next_pc.
	* mips-tdep.c (enum mips_fpu_type, struct gdbarch_tdep): Move to
	mips-tdep.h.
	(mips32_next_pc): Handle the syscall instruction.
	* mips-tdep.h (enum mips_fpu_type, struct gdbarch_tdep): New,
	from mips-tdep.c.  Add syscall_next_pc to gdbarch_tdep.
2008-07-27 20:52:42 +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
gdbadmin d27eff1ca4 *** empty log message *** 2008-07-27 00:00:34 +00:00
Vladimir Prus d72314c67b Kill cmd_async_ok.
* cli/cli-decode.h (CMD_ASYNC_OK, set_cmd_async_ok)
        (get_cmd_async_ok): Remove.
        * cli/cli-decode.c (set_cmd_async_ok, get_cmd_async_ok): Remove.
        * cli/cli-cmds.c (init_cli_cmds): Don't use set_cmd_async_ok.
        * infcmd.c (_initialize_infcmd): Likewise.
        * thread.c (_initialize_thread): Likewise.
2008-07-26 10:23:56 +00:00
Joseph Myers 5b68030fbd * mips-tdep.c (mips_n32n64_push_dummy_call): Handle passing
128-bit long doubles in even-odd pairs of FPRs.  Do not
	right-align float arguments for big-endian.
	(mips_n32n64_return_value): Apply return value convention for
	structs containing one or two floating-point values to soft-float
	as well as hard-float.  Handle 128-bit long doubles in such
	structs.
	(mips_o32_push_dummy_call): Only skip one integer register for a
	float argument passed in an FPR.
2008-07-26 01:19:34 +00:00
gdbadmin 848c6a24d5 *** empty log message *** 2008-07-26 00:00:33 +00:00
Tom Tromey 383f836e20 gdb:
* tui/tui-hooks.c: Include observer.h.
	(tui_event_default, tui_old_event_hooks, tui_event_hooks):
	Remove.
	(tui_bp_created_observer, tui_bp_deleted_observer,
	tui_bp_modified_observer): New globals.
	(tui_install_hooks): Use observers, not events.
	(tui_remove_hooks): Likewise.
	* mi/mi-cmd-break.c: Include observer.h, not gdb-events.h.
	(mi_breakpoint_observers_installed, mi_can_breakpoint_notify): New
	globals.
	(breakpoint_notify): Check mi_can_breakpoint_notify.
	(breakpoint_hooks): Remove.
	(mi_cmd_break_insert): Attach observers.  Don't use events.
	* tracepoint.c: Include observer.h, not gdb-events.h.
	(tracepoint_operation, trace_pass_command): Notify observer.
	* interps.c: Don't include gdb-events.h.
	(clear_interpreter_hooks): Don't call clear_gdb_event_hooks.
	* gdbarch.c: Rebuild.
	* gdbarch.sh: Emit include for observer.h, not gdb-events.h.
	(deprecated_current_gdbarch_select_hack): Notify observer.
	* breakpoint.h: Don't include gdb-events.h.
	* breakpoint.c: Don't include gdb-events.h.
	(condition_command): Notify observer.
	(commands_command): Likewise.
	(commands_from_control_command): Likewise.
	(mention, delete_breakpoint, set_ignore_count): Likewise.
	(disable_breakpoint, do_enable_breakpoint): Likewise.
	* Makefile.in (gdb_events_h): Remove.
	(breakpoint_h): Update.
	(COMMON_OBS): Remove gdb-events.o.
	(gdb-events.o): Remove.
	(breakpoint.o, gdbarch.o, interps.o, tracepoint.o, gdbtk-bp.o,
	gdbtk-hooks.o, mi-cmd-break.o, tui-hooks.o): Update.
	* gdb-events.c: Remove.
	* gdb-events.h: Remove.
	* gdb-events.sh: Remove.
gdb/doc:
	* observer.texi (GDB Observers): Document new observers:
	breakpoint_created, breakpoint_deleted, breakpoint_modified,
	tracepoint_created, tracepoint_deleted, tracepoint_modified,
	architecture_changed.
gdb/gdbtk:
	* generic/gdbtk-hooks.c: Include observer.h, not gdb-events.h.
	(gdbtk_add_hooks): Use observers, not events.
	(gdbtk_architecture_changed): Add argument, for observer.
	* generic/gdbtk-bp.c: Include observer.h.
	(gdb_set_bp): Notify observer.
	(gdb_set_bp_addr): Likewise.
2008-07-25 16:12:03 +00:00
gdbadmin e2df110677 *** empty log message *** 2008-07-25 00:00:34 +00:00
Pedro Alves 60e569b986 * remote.c (remote_threads_extra_info): Don't query the remote
server about info on the internally added main thread.
2008-07-24 15:28:42 +00:00
Aleksandar Ristovski a6a7f2a560 * nto-procfs.c (procfs_attach): Populate initial thread list.
(procfs_wait): Return new pid, built from the inferior status.
2008-07-24 13:18:58 +00:00
gdbadmin e5a0a87f7c *** empty log message *** 2008-07-24 00:00:02 +00:00
Thiago Jung Bauermann e63e4db203 * configure.ac (CONFIG_INITS): Delete long obsoleted variable.
* configure: Regenerate.
2008-07-23 17:40:48 +00:00
Aleksandar Ristovski 14ef7606b7 * nto-procfs.c (procfs_xfer_memory): Changed signature.
(procfs_resume): Workaround for dereferencing type-punned pointer
	warning.
	* nto-tdep.c (nto_parse_redirection): Change signature to be const
	correct.
	* nto-tdep.h (nto_parse_redirection): Likewise.
2008-07-23 13:36:00 +00:00
gdbadmin 16d0210785 *** empty log message *** 2008-07-23 00:00:33 +00:00
Stan Shebs cfd8ab242a Scrub remnants of IN_SOLIB_DYNSYM_RESOLVE_CODE.
* gdbarch.sh: Adjust comment to refer to
	in_solib_dynsym_resolve_code().
	* gdbarch.h, gdbarch.c: Update.
	* solib-osf.c: Ditto.
	* infrun.c: Ditto.
	(handle_inferior_event): Use in_solib_dynsym_resolve_code
	unconditionally.
	* config/mips/nm-irix5.h: Remove undef of
	IN_SOLIB_DYNSYM_RESOLVE_CODE.

	* gdbint.texinfo: Refer to target_so_ops.in_dynsym_resolve_code
	instead of IN_SOLIB_DYNSYM_RESOLVE_CODE.
2008-07-22 02:10:14 +00:00
gdbadmin 5427ade67e *** empty log message *** 2008-07-22 00:00:03 +00:00
Tom Tromey 781b42b0ba gdb
* symfile.c (reread_symbols): Don't pass argument to observer.
	* exec.c (exec_file_attach): Don't pass argument to observer.
	* ada-lang.c (ada_executable_changed_observer): Remove argument.
	* symtab.c (symtab_observer_executable_changed): Remove argument.
	* observer.sh: Handle functions with no arguments.
gdb/doc
	* observer.texi (GDB Observers): Remove obsolete comment.
	<executable_changed>: Remove argument.
2008-07-21 16:47:11 +00:00
Chris Demetriou a366c65aeb 2008-07-20 Sergei Poselenov <sposelenov@emcraft.com>
Chris Demetriou  <cgd@google.com>

        * elfread.c (elf_symfile_segments): Fix the check that each loadable
        section fits within an ELF segment to handle ELF segments that hit
        the end of the address space.
2008-07-21 05:05:23 +00:00
gdbadmin 6142f8a3fe *** empty log message *** 2008-07-21 00:00:02 +00:00
Chris Demetriou 073d253fa2 2008-07-20 Chris Demetriou <cgd@google.com>
* MAINTAINERS (Write After Approval): Add self.
2008-07-20 21:56:49 +00:00
gdbadmin 5e096c66e2 *** empty log message *** 2008-07-20 00:00:03 +00:00
gdbadmin cd12999609 *** empty log message *** 2008-07-19 00:00:33 +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
Joseph Myers 0f72fb1c9b * configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
in BFD ELF check.
	* configure: Regenerate.
2008-07-18 13:38:14 +00:00
gdbadmin 8b07fad044 *** empty log message *** 2008-07-18 00:00:03 +00:00
Paul Pluzhnikov 9bf07184c9 Fix for Linux/VDSO failure. 2008-07-17 20:57:26 +00:00
Paul Pluzhnikov 7c6467a4fb Fix for failing gdb.base/auxv.exp on Linux 2008-07-17 20:56:11 +00:00
Paul Pluzhnikov becf64774c Fix for gdb.base/corefile.exp failure on Linux 2008-07-17 19:01:44 +00:00
gdbadmin 2e51ac64ef *** empty log message *** 2008-07-17 00:00:03 +00:00
gdbadmin 7767d1c1f5 *** empty log message *** 2008-07-16 00:00:03 +00:00
Daniel Jacobowitz eb2f4a08ce Revert frame_unwind_caller_pc / frame_unwind_caller_id. 2008-07-15 23:29:24 +00:00
Andreas Schwab 680b56ce65 * valops.c (value_cast_pointers): Follow typedefs when checking
result of coercion.
2008-07-15 22:13:42 +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
Daniel Jacobowitz 7f0df27888 * block.c (block_function): Renamed to ...
(block_linkage_function): ... this.  All callers changed.
	* block.h (block_function): Renamed to ...
	(block_linkage_function): ... this.
2008-07-15 19:11:34 +00:00
Daniel Jacobowitz 54af988d1e * frame.c (frame_unwind_id): Renamed to ...
(frame_unwind_caller_id): ... this.  All callers updated.
	(frame_pc_unwind): Renamed to ...
	(frame_unwind_caller_pc): ... this.  All callers updated.
	* frame.h: Document frame_unwind_caller_WHAT functions.
	(frame_unwind_id): Renamed to ...
	(frame_unwind_caller_id): ... this.
	(frame_pc_unwind): Renamed to ...
	(frame_unwind_caller_pc): ... this.
	* hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
	* stack.c (parse_frame_specification_1): Do not rely on
	frame_unwind_id.
2008-07-15 18:58:32 +00:00
Daniel Jacobowitz ba2c6aec01 * mn10300-tdep.c (set_reg_offsets): Use get_frame_register_unsigned. 2008-07-15 18:52:17 +00:00
Daniel Jacobowitz d56907c103 * frame.c (frame_sp_unwind): Delete.
(get_frame_sp): Do not use it.
	* frame.h (frame_sp_unwind): Delete prototype.
2008-07-15 18:50:15 +00:00
Daniel Jacobowitz f92aeb88df * ia64-tdep.c (ia64_dummy_id): Use get_frame_pc. 2008-07-15 18:45:42 +00:00
Daniel Jacobowitz ad1193e7ad * dwarf2-frame.c (dwarf2_frame_cache): Update comment.
* frame.c (frame_unwind_address_in_block): Delete.
(get_frame_address_in_block): Do not use it.  Check the type
of the next frame first.
(frame_cleanup_after_sniffer): Update comment.
* frame.h (frame_unwind_address_in_block): Delete prototype.
* hppa-tdep.c (hppa_find_unwind_entry_in_block): Update comment.
2008-07-15 18:40:03 +00:00
Daniel Jacobowitz ef02daa9e6 * frame.c (frame_func_unwind): Delete.
(get_frame_func): Do not use it.
* frame.h (frame_func_unwind): Delete prototype.
* hppa-tdep.c (hppa_frame_cache): Update comment.
* rs6000-tdep.c (rs6000_frame_cache): Update comment.
2008-07-15 18:32:06 +00:00
Stan Shebs 96e32df874 * remote-sim.c (init_gdbsim_ops): Remove
TARGET_REDEFINE_DEFAULT_OPS.
2008-07-15 18:08:27 +00:00
Daniel Jacobowitz ab8650a327 * findvar.c (read_var_value): Remove unused variable. 2008-07-15 17:53:11 +00:00
Luis Machado 8c90c1370d * infrun.c (handle_inferior_event): Tag threads as stopped
before inserting breakpoints.
2008-07-15 17:25:21 +00:00
Hui Zhu 4098af0f82 * MAINTAINERS: Added myself to section Write After Approval. 2008-07-15 09:46:49 +00:00
gdbadmin 078649af63 *** empty log message *** 2008-07-15 00:00:34 +00:00
Paul Pluzhnikov 7093c834d7 Fix for PR gdb/2477 2008-07-14 18:28:57 +00:00
Pedro Alves 5651477109 * i386-dicos-tdep.c (i386_dicos_frame_align): Delete.
(i386_dicos_push_dummy_code): New.
	(i386_dicos_init_abi): Don't register i386_dicos_frame_align.
	Register i386_dicos_push_dummy_code.
2008-07-14 18:06:58 +00:00
Markus Deuling 74ed0bb414 * mips-tdep.c (fp_register_arg_p): Add gdbarch as paramter.
(mips_n32n64_push_dummy_call, mips_o64_return_value)
	(mips_eabi_push_dummy_call): Update call to fp_register_arg_p.

	(MIPS_FPU_TYPE): Add gdbarch as parameter and replace current_gdbarch.
	(fp_register_arg_p, mips_dump_tdep, show_mipsfpu_command)
	(mips_n32n64_fp_arg_chunk_p): Update caller.

	(mips_n32n64_fp_arg_chunk_p): Add gdbarch as paramter.
	(mips_n32n64_push_dummy_call): Update caller.

	(MIPS_LAST_ARG_REGNUM): Add gdbarch as parameter and replace
	current_gdbarch.
	(mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
	(mips_o32_push_dummy_call, mips_o64_push_dummy_call): Update caller.


	(MIPS_LAST_FP_ARG_REGNUM): Add gdbarch as parameter and replace
	current_gdbarch.
	(mips_eabi_push_dummy_call, mips_o32_push_dummy_call)
	(mips_o64_push_dummy_call): Update caller.

	(MIPS_EABI): Add gdbarch as parameter and replace current_gdbarch.
	(fp_register_arg_p, mips_dump_tdep): Update caller.

	(set_reg_offset): Add gdbarch as parameter and replace current_gdbarch.
	(mips16_scan_prologue, mips32_scan_prologue): Update caller.

	(reset_saved_regs): Make static.  Add gdbarch as parameter.  Replace
	current_gdbarch.
	(mips32_scan_prologue): Update caller.

	(heuristic_proc_start): Add gdbarch as parameter. Replace
	current_gdbarch.
	(mips_insn16_frame_cache, mips_insn32_frame_cache): Update caller.

	* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
	(mipsnbsd_store_inferior_registers): Use get_regcache_arch to get at
	the current architecture. Update call to getregs_supplies.
	(getregs_supplies): Add gdbarch as parameter and replace
	current_gdbarch.

	* mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use get_frame_arch to
	get at the current architecture. Update call to NBSD_MIPS_JB_OFFSET and
	NBSD_MIPS_JB_ELEMENT_SIZE.
	(NBSD_MIPS_JB_ELEMENT_SIZE, NBSD_MIPS_JB_OFFSET): Add gdbarch and
	replace current_gdbarch.

	* remote-mips.c (mips_map_regno): Add gdbarch as parameter and replace
	current_gdbarch.
	(mips_fetch_registers, mips_store_registers): Update call
	to mips_map_regno.
	(mips_load): Use get_regcache_arch to get at the current_architecture
	and replace current_gdbarch.
2008-07-14 11:25:12 +00:00
gdbadmin ac3d490a1a *** empty log message *** 2008-07-14 00:00:33 +00:00
Pedro Alves 0c50153633 * thread.c (restore_selected_frame): On fail to restore, select
the innermost frame, and don't crash when warning the user.
2008-07-13 19:25:58 +00:00
Joel Brobecker db009c8a0a * symtab.c (expand_line_sal): Fix a memory leak. 2008-07-13 16:58:20 +00:00
Jan Kratochvil b432ffe3e2 * gdb.base/randomize.exp: Catch non-Linux targets as untested. 2008-07-13 14:56:02 +00:00
Pedro Alves 0ffe501282 * utils.c (struct continuation): Define as inheriting struct
cleanup.
	(add_continuation, do_all_continuations)
	(discard_all_continuations, add_intermediate_continuation)
	(do_all_intermediate_continuations)
	(discard_all_intermediate_continuations): Adjust.
2008-07-13 11:28:31 +00:00
Vladimir Prus dbba82516a Skip varobj in running threads.
* mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's
        thread is not stopped, skip the varobj.
        * Makefile.in: Update dependencies.
2008-07-13 05:31:44 +00:00
Vladimir Prus e3d6cd5f43 Enable all MI commands while inferiour is running
* mi/mi-main.c (mi_cmd_execute): Don't check if
        inferiour is executing.
2008-07-13 04:13:50 +00:00
Vladimir Prus b10a37b10a Allow all CLI command even if target is executing.
* gdb/top.c (execute_command_1): Don't check if the inferiour
        is running.
2008-07-13 04:09:47 +00:00
Vladimir Prus ea06926780 * mi/mi-main.c (mi_cmd_execute): Remove unused variable.
Fix printing of frame, when frame is wrong.
2008-07-13 03:59:28 +00:00
gdbadmin bbabb60fd8 *** empty log message *** 2008-07-13 00:00:33 +00:00
Ulrich Weigand cdc9523a4d * spu-tdep.c (spu_frame_unwind_cache): Do not error if
backchain is unreadable.
2008-07-12 22:42:52 +00:00
Ulrich Weigand 836acd6d9a * linux-low.c (handle_extended_wait): Do not use "status"
variable uninitialized.
2008-07-12 22:22:42 +00:00
Ulrich Weigand d5b254911b * spu-linux-nat.c: Include "gdbthread.h".
(spu_child_post_startup_inferior): Register main thread.
	(spu_child_post_attach): Likewise.
	* Makefile.in (spu-linux-nat.o): Update dependencies.
2008-07-12 22:16:34 +00:00
Pedro Alves 604ead4a92 2008-07-12 Pedro Alves <pedro@codesourcery.com>
Rewrite continuations internals on top of cleanups and plug
	continuation arguments leaks.

	* defs.h (struct continuation): Make it opaque.
	(add_continuation, add_intermediate_continuation): Drop the int
	argument of the continuation hook argument.  Add
	continuation_free_args argument.
	(do_all_continuations, do_all_intermediate_continuations): Drop
	the error_p argument.

	* utils.c (add_continuation): Drop the int argument of the
	continuation hook argument.  Add continuation_free_args argument.
	Reimplement on top of cleanups.
	(do_all_continuations): Drop error argument.  Reimplement on top
	of cleanups.
	(discard_all_continuations): Reimplement on top of cleanups.
	(add_intermediate_continuation): Drop the int argument of the
	continuation hook argument.  Add continuation_free_args argument.
	Reimplement on top of cleanups.
	(do_all_intermediate_continuations): Drop error argument.
	Reimplement on top of cleanups.
	(discard_all_intermediate_continuations): Reimplement on top of
	cleanups.

	* breakpoint.c (until_break_command_continuation): Drop error
	argument.  Add xfree as continuation argument deleter.

	* inf-loop.c (inferior_event_handler): On error, discard all
	continuations.  Adjust to new do_all_intermediate_continuations
	and do_all_continuations interfaces.

	* infcmd.c (step_1_continuation): Drop error_p argument.  Adjust.
	Pass xfree as continuation argument deleter.
	(finish_command_continuation): Drop error_p argument.  Adjust.
	(finish_command_continuation_free_arg): New.
	(finish_command): Pass finish_command_continuation_free_arg as
	continuation argument deleter.  Adjust to new do_all_continuations
	interfaces.
	(attach_command_continuation): Drop error_p argument.
	(attach_command_continuation_free_args): New.
	(attach_command): Pass attach_command_continuation_free_args as
	continuation argument deleter.

	* interps.c (interp_set): Adjust to new do_all_continuations
	interfaces.

	* event-top.c (stdin_event_handler): In error, also discard the
	intermediate continuations.
2008-07-12 19:25:42 +00:00
Pedro Alves bfec99b27c Replace struct continuation_args by void* and per command structs.
* top.c (execute_command): Remove unused arg1 and arg2 locals.

	* breakpoint.c (struct until_break_command_continuation_args):
	New.
	(until_break_command_continuation): Take a void* instead of a
	continuations_arg.  Adjust.
	(until_break_command): Adjust to use struct
	until_break_command_continuation_args instead of struct
	continuation_arg.

	* infcmd.c (struct step_1_continuation_args): New.
	(step_1_continuation): Take a void* instead of a
	continuations_arg.  Adjust to use struct step_1_continuation_args.
	(step_once): Adjust to use struct step_1_continuation_args.

	(struct finish_command_continuation_args): New.
	(finish_command_continuation): Take a void* instead of a
	continuations_arg.  Adjust to use struct
	finish_command_continuation_args.
	(finish_command): Adjust to use struct
	finish_command_continuation_args.
	(struct attach_command_continuation_args): New.
	(attach_command_continuation): Take a void* instead of a
	continuations_arg.  Adjust to use struct
	attach_command_continuation_args.
	(attach_command): Adjust to use struct
	attach_command_continuation_args.

	* defs.h (struct continuation_arg): Delete.
	(struct continuation): Replace the struct continuation_arg*
	parameter of continuation_hook by a void*.  Replace "arg_list"
	member by a new "args" member with void* type.
	(add_continuation, add_intermediate_continuation): Replace struct
	continuation_arg type usages by void* usages.

	* utils.c (add_continuation, do_all_continuations)
	(add_intermediate_continuation)
	(do_all_intermediate_continuations): Replace struct
	continuation_arg type usages by void* usages.  Pass "args" instead
	of "arg_list".
2008-07-12 19:07:38 +00:00
Pedro Alves 2afb61aa0b 2008-07-12 Pedro Alves <pedro@codesourcery.com>
* infrun.c (struct thread_stepping_state): Delete sal member.
	(init_thread_stepping_state): Add local sal.  Use it instead of
	tss->sal.
	(handle_inferior_event): New local stop_pc_sal.  Use it instead of
	tss->sal.
	(step_into_function): Add local stop_func_sal.  Use it instead of
	tss->sal.
2008-07-12 18:39:10 +00:00
Vladimir Prus 77ebaa5ad3 Implement -exec-continue/-exec-interrupt --all.
* infcmd.c (continue_1): New, extracted from
        (continue_command): ...here.
        (interrupt_target_1): New, extracted from
        (interrupt_target_command): ...here.
        * inferior.h (continue_1, interrupt_target_1): New.
        * mi/mi-main.c (mi_cmd_exec_continue)
        (mi_cmd_exec_interrupt): Handle --all.
2008-07-12 17:10:59 +00:00
Vladimir Prus 1e92afda99 Implement --thread and --frame.
* gdbthread.h (find_thread_id): Declare.
        * thread.c (find_thread_id): Make non-static.
        * mi/mi-main.c (mi_cmd_execute): Switch to the right
        thread and frame, if necessary.
        * mi/mi-parse.c (mi_parse): Handle --thread and --frame.
        * mi/mi-parse.h (strcut mi_parse): New fields thread and frame.
2008-07-12 16:37:57 +00:00
Vladimir Prus d56b7306e3 * infrun.c (resume): Discard cleanups on early exit path. 2008-07-12 13:42:54 +00:00
Vladimir Prus b1a268e5b4 * infrun.c (normal_stop): For MI, report which threads
were stopped.
2008-07-12 12:41:56 +00:00
Vladimir Prus 90139f7d5a Report thread state in -thread-info output.
* thread.c (print_thread_info): Add new field "state".
2008-07-12 12:34:19 +00:00
gdbadmin 26bc3f44e8 *** empty log message *** 2008-07-12 00:00:33 +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
Pedro Alves a0d21d2808 * infrun.c (handle_inferior_event): Also ignore a
TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
2008-07-11 17:46:40 +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
Pedro Alves 65fc9b7721 * thread.c (thread_apply_command): Move making the cleanup out of
the loop.
2008-07-11 11:26:39 +00:00
Pedro Alves 4f8d22e3b4 Exited threads.
* thread.c (enum thread_state): New.
	(thread_state main_thread_running): Delete, in favor of...
	(thread_state main_thread_state): ... this.  Update throughout.
	(clear_thread_inferior_resources): New, split from free_thread.
	(free_thread): Call clear_thread_inferior_resources.
	(init_thread_list): Set main thread to stopped state.
	(add_thread_silent): Take care of PTID reuses.
	(delete_thread): If deleting inferior_ptid or a thread with
	refcount > 0, mark it as exited, but still keep it in the list.
	Only notify of thread exits, if we haven't done so yet.
	(iterate_over_threads): Make it safe to delete threads while
	iterating over them.
	(do_captured_list_thread_ids): Don't account for exited threads.
	(thread_alive): Check for the THREAD_EXITED state, and don't set
	ptid to -1 on exited threads.
	(set_running): Update to account for extra possible states.
	(is_thread_state): New.
	(is_stopped, is_exited): New.
	(is_running): Implement in terms of is_thread_state.
	(any_running): Update.
	(print_thread_info): Update.  Account for exited threads.  Don't
	warn about missed frame restoring here, its done in the cleanup.
	(switch_to_thread): Don't read from a thread that has gone.
	(restore_current_thread): In non-stop mode, do a full context
	switch.
	(restore_selected_frame): Add a frame_level argument.  Rewrite.
	(struct current_thread_cleanup): Add selected_frame_level and
	was_stopped members.
	(do_restore_current_thread_cleanup): Check if thread was stopped
	and still is, and if the target has registers, stack and memory
	before restoring the selected frame.  Don't delete the cleanup
	argument here.
	(restore_current_thread_cleanup_dtor): New.
	(make_cleanup_restore_current_thread): Remove all arguments.
	Rewrite.
	(thread_apply_all_command): Update.  Prune threads.
	(thread_apply_command): Update.
	(thread_command): Account for currently selected exited thread.
	(do_captured_thread_select): Check for a running thread.  Prune
	threads.
	(_initialize_thread): Make "info threads", "thread", "thread
	apply", and "thread apply all" appliable without a selected thread.
	* gdbthread.h (struct thread_info): Replace running_ by state_.
	Add refcount.
	(is_exited, is_stopped): Declare.
	(make_cleanup_restore_current_thread): Remove all arguments.
	* infrun.c: Include "event-top.h".
	(fetch_inferior_event): In non-stop mode, restore selected thread
	and frame after handling the event and running breakpoint
	commands.  Display GDB prompt if needed.
	(normal_stop): In non-stop mode, don't print thread switching
	notice.
	* cli/cli-decode.c (set_cmd_no_selected_thread_ok)
	(get_cmd_no_selected_thread_ok): New.
	* cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): New.
	(set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
	Declare.
	* cli/cli-cmds.c: Set "pwd", "help", "info", "show" as
	no-selected-thread ok.
	* top.c (execute_command): Check for non no-selected-thread-ok
	commands.
	* linux-nat.c (struct saved_ptids, threads_to_delete)
	(record_dead_thread, prune_lwps): Delete.
	(exit_lwp): Unconditionally delete thread.
	(linux_nat_resume): Remove prune_lwps call.
	* infcmd.c (proceed_thread_callback): Check if !is_stopped instead
	of is_running.  Adjust to make_cleanup_restore_current_thread
	interface change.
	* mi/mi-main.c (mi_cmd_execute): Only allow a few commands if the
	selected thread has exited.
	* inf-loop.c (inferior_event_handler): Don't display the prompt
	here.
	* varobj.c (c_value_of_root): Update.
	* defs.h (make_cleanup_dtor): Declare.
	* utils.c (make_cleanup_dtor): New.

	* Makefile.in (infrun.o): Depend on $(event_top_h).
2008-07-11 11:07:39 +00:00
Pedro Alves 8cae4b3f0b Add "continue -a" and "interrupt -a" options for non-stop mode.
* infcmd.c (proceed_thread_callback, do_context_switch_to): New.
	(continue_command): Add "-a" option.
	(interrupt_target_command): Add "-a" option.
	(_initialize_infcmd): Add extend help of continue and interrupt
	command to mention the new "-a" option.  Mark "continue" async ok.
2008-07-11 10:59:21 +00:00
gdbadmin e4fba69761 *** empty log message *** 2008-07-11 00:00:34 +00:00
Doug Evans bf250677af Add "set print symbol-loading on|off".
* NEWS: Document new option.
	* symfile.h (print_symbol_loading): Declare.
	* symfile.c (print_symbol_loading): New global.
	(symbol_file_add_with_addrs_or_offsets): Only print "Reading symbols
	from ..." if print_symbol_loading.
	(_initialize_symfile): Add set/show print symbol-loading.
	* solib.c (solib_read_symbols): Only print "Loaded symbols for ..."
	if print_symbol_loading.

	* doc/gdb.texinfo: Document "set print symbol-loading on|off".
2008-07-10 23:08:21 +00:00
Pedro Alves 4c28f408df Non-stop linux native.
* linux-nat.c (linux_test_for_tracefork): Block events while we're
	here.
	(get_pending_status): Implement non-stop mode.
	(linux_nat_detach): Stop threads before detaching.
	(linux_nat_resume): In non-stop mode, always resume only a single
	PTID.
	(linux_handle_extended_wait): On a clone event, in non-stop mode,
	add new lwp to GDB's thread table, and mark as running, executing
	and stopped appropriately.
	(linux_nat_filter_event): Don't assume there are other running
	threads when a thread exits.
	(linux_nat_wait): Mark the main thread as running and executing.
	In non-stop mode, don't stop all lwps.
	(linux_nat_kill): Stop lwps before killing them.
	(linux_nat_thread_alive): Use signal 0 to detect if a thread is
	alive.
	(send_sigint_callback): New.
	(linux_nat_stop): New.
	(linux_nat_add_target): Set to_stop to linux_nat_stop.

	* linux-nat.h (thread_db_attach_lwp): Declare.

	* linux-thread-db.c (thread_get_info_callback): Check for new
	threads if we have none.
	(thread_from_lwp, enable_thread_event): Set proc_handle.pid to the
	stopped lwp.  Check for new threads if we have none.
	(thread_db_attach_lwp): New.
	(thread_db_init): Set proc_handle.pid to inferior_ptid.
	(check_event): Set proc_handle.pid to the stopped lwp.
	(thread_db_find_new_threads): Set proc_handle.pid to any stopped
	lwp available, bail out if there is none.

	* linux-fork.c (linux_fork_killall): Use SIGKILL instead of
	PTRACE_KILL.
2008-07-10 22:58:37 +00:00
Jan Kratochvil 981505ef9a * gdb.base/randomize.exp: Remove dependency on tcl-8.4+. 2008-07-10 20:16:27 +00:00
Kevin Buettner a4fafde38f * rs6000-tdep.c (ppc_displaced_step_fixup): Change type of
`current_pc' from CORE_ADDR to ULONGEST.
2008-07-10 19:40:43 +00:00
Kevin Buettner 0aef6ba222 * remote-sim.c (gdbsim_cntrl_c): Pass remote_sim_ptid to
gdbsim_stop().
2008-07-10 19:34:00 +00:00
Doug Evans e0a3ce09ed fix typo in "set debug timetstamp" 2008-07-10 16:44:47 +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
gdbadmin 5c9fe2e8d9 *** empty log message *** 2008-07-10 00:00:03 +00:00
Pedro Alves f9c72d524f Adjust all targets to new target_stop interface.
* gnu-nat.c (gnu_stop): Add ptid argument.
	* go32-nat.c (go32_stop): Add ptid argument.
	(go32_create_inferior): Pass inferior_ptid to go32_stop.
	* hpux-thread.c (hpux_thread_stop): Add ptid argument.
	* monitor.c (monitor_stop): Add ptid argument.
	(monitor_open): Pass inferior_ptid to monitor_stop.
	(monitor_interrupt): Pass inferior_ptid to target_stop.
	(monitor_stop): Add ptid argument.
	* nto-procfs.c (nto_interrupt): Pass inferior_ptid to target_stop.
	(procfs_create_inferior): Add ptid argument.
	* procfs.c (procfs_stop): Add ptid argument.
	* remote-m32r-sdi.c (m32r_stop): Add ptid argument.
	* remote-sim.c (gdbsim_stop): Add ptid argument.
	* sol-thread.c (sol_thread_stop): Add ptid argument.
	* win32-nat.c (win32_stop): Add ptid argument.
2008-07-09 22:49:56 +00:00
Pedro Alves 94cc34afe2 Non-stop inferior control.
* infrun.c (resume): In non-stop mode, always resume just one
	thread.
	(proceed): Don't call prepare_to_proceed in non-stop mode.
	(fetch_inferior_event): In non-stop mode, switch context before
	handling the event.
	(error_is_running, ensure_not_running): New.
	(handle_inferior_event): In non-stop mode: Mark only the event
	thread as stopped.  Require that the target module manages adding
	threads to the thread list.  Assert that there isn't a
	deferred_step_ptid set.  Don't switch to infwait_thread_hop_state.
	(normal_stop): Only mark not-running if inferior hasn't exited.
	In non-stop mode, only mark the event thread.

	* thread.c:Include "cli/cli-decode.h".
	(print_thread_info): Don't read from a running thread.
	Output "(running)" if thread is running.
	(switch_to_thread): Don't read stop_pc if thread is executing.
	(do_restore_current_thread_cleanup): Don't write to a running
	thread.
	(thread_apply_all_command): Don't read from a running thread.  In
	non-stop mode, do a full context-switch instead of just switching
	threads.
	(thread_apply_command): In non-stop mode, do a full context-switch
	instead of just switching threads.
	(do_captured_thread_select): Likewise.  Inform user if selected
	thread is running.
	(_initialize_thread): Mark "info threads" and "thread" and
	async_ok.

	* inf-loop.c (inferior_event_handler): In non-stop mode, don't
	unregister the target from the event loop.

	* infcmd.c (continue_command, step_1, jump_command)
	(signal_command): Ensure the selected thread isn't running.
	(interrupt_target_command): In non-stop mode, interrupt only the
	selected thread.

	* inferior.h (error_is_running, ensure_not_running): Declare.

	* target.h (struct target_ops): Add ptid argument to the to_stop
	member.
	(target_stop): Add ptid_t argument.

	* target.c (update_current_target): Add ptid argument to to_stop's
	type.
	(debug_to_stop): Add ptid_t argument.
	(debug_to_rcmd): Set to_stop_ptid.

	* remote.c (remote_stop): Add ptid_t argument.
	(async_remote_interrupt): Add inferior_ptid to target_stop.
	* inf-ptrace.c (inf_ptrace_stop): Add ptid argument.

	* Makefile.in (thread.o): Depend on $(cli_decode_h).
2008-07-09 22:42:43 +00:00
Pedro Alves 59f0d5d953 Don't rely on ecs->wait_for_more.
* infrun.c (proceed): Clear the stepping state, set
	previous_inferior_ptid and clear infwait state.
	(wait_for_inferior): Don't clear the stepping state, set
	previous_inferior_ptid, or clear the infwait state here.
	(fetch_inferior_event): Don't clear the stepping state, set
	previous_inferior_ptid, or clear the infwait state here.  Don't
	condition on wait_for_more.
2008-07-09 22:36:51 +00:00
Pedro Alves 0d1e5fa71a Refactor infrun a bit.
* infrun.c (currently_stepping): Take a struct
	thread_stepping_state instead of an execution_control_state.
	(struct thread_stepping_state): New, split from
	execution_control_state.
	(gtss, tss): New globals.
	(proceed): Clear the stepping state, set previous_inferior_ptid
	and clear infwait state.
	(init_wait_for_inferior): Clear the stepping state,
	previous_inferior_ptid and infwait state.
	(waiton_ptid, infwait_state): New, split from
	execution_control_state.
	(struct execution_control_state): Members that persist through
	events moved out to either struct thred_stepping_state or made
	global.  Deleted unneeded wp, saved_inferior_ptid, tmpstatus.
	(wait_for_inferior, fetch_inferior_event): Use local
	execution_control_state.  Update to execution_control_state split.
	(init_execution_control_state): Adjust.
	(init_thread_stepping_state): New, extracted from
	init_execution_control_state.
	(context_switch): Take a ptid instead of an
	execution_control_state.
	(context_switch_to): Adjust.
	(adjust_pc_after_break): Adjust.
	(init_infwait_state): New.
	(handle_inferior_event): Adjust.
2008-07-09 22:33:16 +00:00
Pedro Alves a474d7c2a3 Per-thread commands.
* gdbthread.h: Remove unneeded forward declarations.
	Include "inferior.h".
	(struct thread_info): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi and stop_signal members.
	(save_infrun_state): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat parameters.
	(load_infrun_state): Add continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat parameters.

	* thread.c (load_infrun_state): In non-stop mode, load
	continuations, intermediate_continuations, proceed_to_finish,
	step_over_calls, stop_step, step_multi and stop_signal.
	(save_infrun_state): Store continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(save_infrun_state): Store continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(free_thread): Clear The thread's stop_bpstat.

	* inferior.h (context_switch_to): Declare.

	* infrun.c (ecss): New global.
	(context_switch): Context switch continuations,
	intermediate_continuations, proceed_to_finish, step_over_calls,
	stop_step, step_multi, stop_signal and stop_bpstat.
	(wait_for_inferior): Use global ecss.
	(async_ecss, async_ecs): Delete.
	(fetch_inferior_event): Use global ecss.
	(context_switch_to): New.

	* top.c (execute_command): In non-stop, only check if the current
	thread is running, in all-stop, check if there's any thread
	running.

	* breakpoint.c (bpstat_remove_breakpoint): New.
	(bpstat_remove_breakpoint_callback): New.
	(delete_breakpoint): Clear the stop_bpstats of all threads.

	* mi/mi-main.c (mi_cmd_execute): In non-stop, only check if the
	current thread is running, in all-stop, check if there's any
	thread running.

	* Makefile.in (gdbthread_h): Depend on $(inferior_h).
2008-07-09 22:30:46 +00:00
Pedro Alves ad52ddc6a4 Add non_stop global.
* inferior.h (non_stop): Declare.
	* infrun.c (non_stop, non_stop_1): New.
	(set_non_stop, show_non_stop): New.
	(_initialize_infrun): Add "set/show non-stop" command.
2008-07-09 22:27:13 +00:00
Pedro Alves 3a3e9ee36f Adjust fork/vfork/exec to pass ptids around.
* target.h (struct target_waitstatus): Store related_pid as a ptid.
	(inferior_has_forked, inferior_has_vforked, inferior_has_execd):
	Take a ptid_t.
	* breakpoint.h (struct breakpoint): Change forked_inferior_pid
	type to ptid.
	* breakpoint.c (print_it_typical, bpstat_check_location)
	(print_one_breakpoint_location, set_raw_breakpoint_without_location)
	(create_fork_vfork_event_catchpoint): Adjust.
	* infrun.c (fork_event): Change parent_pid and child_pid types to
	ptid.
	(follow_exec, inferior_has_forked, inferior_has_vforked)
	(inferior_has_execd): Take a ptid_t and don't trim it.
	* linux-thread-db.c (thread_db_wait): Don't trim the returned ptid.
	* linux-nat.c (linux_child_follow_fork): Adjust.
	* inf-ptrace.c (inf_ptrace_wait): Adjust.
	* inf-ttrace.c (inf_ttrace_wait): Adjust.
	* win32-nat.c (get_win32_debug_event): Don't set related_pid.
2008-07-09 22:23:05 +00:00
Pedro Alves 8ea051c51f Add "executing" property to threads.
* inferior.h (target_executing): Delete.
	* gdbthread.h (struct thread_info): Add executing_ field.
	(set_executing, is_executing): New.
	* thread.c (main_thread_executing): New.
	(init_thread_list): Clear it and also main_thread_running.
	(is_running): Return false if target has no execution.
	(any_running, is_executing, set_executing): New.

	* top.c: Include "gdbthread.h".
	(target_executing): Delete.
	(execute_command): Replace target_executing check by any_running.
	* event-top.c: Include "gdbthread.h".
	(display_gdb_prompt, command_handler): Replace target_executing by
	is_running.
	* inf-loop.c: Include "gdbthread.h".  Don't mark as not executing
	here.  Replace target_executing by is_running.
	* infrun.c (handle_inferior_event): Mark all threads as
	not-executing.
	* linux-nat.c (linux_nat_resume): Don't mark thread as executing
	here.
	* stack.c (get_selected_block): Return null if inferior is
	executing.
	* target.c (target_resume): Mark resumed ptid as executing.
	* breakpoint.c (until_break_command): Replace target_executing
	check by is_executing.
	* remote.c (remote_async_resume): Don't mark inferior as executing
	here.
	* mi/mi-interp.c (mi_cmd_interpreter_exec): Replace target_executing
	by any_running.

	* mi/mi-main.c (mi_cmd_exec_interrupt, mi_cmd_execute)
	(mi_execute_async_cli_command): Replace target_executing by
	is_running.

	* frame.c (get_current_frame): Error out if the current thread is
	executing.
	(has_stack_frames): New.
	(get_selected_frame, deprecated_safe_get_selected_frame): Check
	has_stack_frames.

	* Makefile.in (event-top.o, frame.o, inf-loop.o, top.o): Depend on
	$(gdbthread_h).
2008-07-09 22:16:15 +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 9de2bdd7d4 * remote-sim.c: Include gdbthread.h.
(remote_sim_ptid): New global.
	(gdbsim_create_inferior): Silently add the main task to GDB's
	thread list.
	(gdbsim_close, gdbsim_mourn_inferior): Silently delete the main
	task from GDB's thread list.
	(gdbsim_resume): Adjust to use remote_sim_ptid.
	(gdbsim_thread_alive, gdbsim_pid_to_str): New.
	(init_gdbsim_ops): Register gdbsim_thread_alive and
	gdbsim_pid_to_str.
	(_initialize_remote_sim): Initialize remote_sim_ptid.
	* Makefile.in (remote-sim.o): Depend on $(gdbthread_h).
2008-07-09 11:02:56 +00:00
Pedro Alves 5e0b29c16a * monitor (monitor_ptid): New global.
(monitor_open): Silently add the main task to GDB's thread list.
	(monitor_close, monitor_mourn_inferior): Silently delete the main
	task from GDB's thread list.
	(monitor_thread_alive, monitor_pid_to_str): New.
	(init_base_monitor_ops): Register monitor_thread_alive and
	monitor_pid_to_str.
	(_initialize_remote_monitors): Initialize monitor_ptid.

	* gdbthread.h (delete_thread_silent): Declare.
	* thread.c (delete_thread): Rename to ...
	(delete_thread_1): ... this.  Add "silent" parameter.  If silent,
	don't do exit notifications.
	(delete_thread, delete_thread_silent): New, as wrappers to
	delete_thread_1.
2008-07-09 10:58:41 +00:00
Pedro Alves a4a9b1c4f2 * gdb.base/fullname.exp: Restore pwd if compiling failed. 2008-07-09 10:50:52 +00:00
gdbadmin 028e0ffd37 *** empty log message *** 2008-07-09 00:00:04 +00:00
Pedro Alves b60e7edffe * breakpoint.c (update_global_location_list): Add boolean
"should_insert" argument.  Only insert locations if caller told it
	too.
	(update_global_location_list_nothrow): Add boolean "should_insert"
	argument.  Pass it to update_global_location_list.
	(insert_breakpoints, create_longjmp_breakpoint)
	(create_overlay_event_breakpoint, enable_overlay_breakpoints)
	(create_thread_event_breakpoint, create_solib_event_breakpoint)
	(create_fork_vfork_event_catchpoint, create_exec_event_catchpoint)
	(enable_watchpoints_after_interactive_call_stop)
	(set_momentary_breakpoint, create_breakpoints)
	(break_command_really, watch_command_1)
	(create_ada_exception_breakpoint, update_breakpoint_locations)
	(do_enable_breakpoint, enable_command): Pass true to
	update_global_location_list.
	(bpstat_stop_status, disable_overlay_breakpoints)
	(disable_watchpoints_before_interactive_call_start)
	(delete_breakpoint, disable_breakpoint, disable_command): Pass
	false to update_global_location_list.
	(update_breakpoints_after_exec): Don't temporarily disable
	always-inserted mode.
2008-07-08 11:09:40 +00:00
Pedro Alves 25b22b0a6f * breakpoint.c (mark_breakpoints_out): Make public.
(update_breakpoints_after_exec): Don't call mark_breakpoints_out
	here.  Update comment.
	* breakpoint.h (mark_breakpoints_out): Declare.

	* linux-nat.c (linux_handle_extended_wait): On
	TARGET_WAITKIND_EXECD, call mark_breakpoints_out.
	* inf-ttrace.c (inf_ttrace_wait): Likewise.
2008-07-08 10:59:57 +00:00
Pedro Alves cce9b6bff9 * infrun.c (follow_exec): Reset shared libraries before adding the
main exec file.
2008-07-08 10:31:16 +00:00
gdbadmin 63f22691bb *** empty log message *** 2008-07-08 00:00:33 +00:00
Pedro Alves aeba519e76 * server.c (handle_v_attach): Inhibit reporting dll changes. 2008-07-07 23:00:11 +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
Pedro Alves 42f0bc8eaf * i386-dicos-tdep.c: Include "inferior.h".
(i386_dicos_frame_align): New.
	(i386_dicos_init_abi): Register i386_dicos_frame_align.  Set call
	dummy location ON_STACK.
	* Makefile.in (i386-dicos-tdep.o): Depend on $(inferior_h).
2008-07-07 22:05:45 +00:00
Joel Brobecker b7292df399 * gstdint.h: New file. 2008-07-07 17:11:56 +00:00
Andreas Schwab 5ae4183a2a (GDB/MI Target Manipulation): Fix last change. 2008-07-07 12:05:30 +00:00
gdbadmin 0bcce8fccd *** empty log message *** 2008-07-07 00:00:33 +00:00
Vladimir Prus b56e7235bb * gdb.texinfo (GDB/MI Target Manipulation): Add
example of -target-attach.
2008-07-06 13:21:19 +00:00
gdbadmin 58b9dcea98 *** empty log message *** 2008-07-06 00:00:03 +00:00
Vladimir Prus bb599c81ca * mi/mi-interp.c (mi_on_resume): Don't try to report
resumed thread it the thread list is empty.
2008-07-05 17:57:24 +00:00
Daniel Jacobowitz ed5e946612 Add missed changelog entry. 2008-07-05 13:48:21 +00:00
gdbadmin 1fb7311a79 *** empty log message *** 2008-07-05 00:00:36 +00:00
Pierre Muller 7f6a63144c * cli/cli-decode.c (add_setshow_optional_filename_cmd): Set
completer for set to filename_completer.
	NEWS: Mention it.
2008-07-04 22:30:19 +00:00
Vladimir Prus 711eabedca Implement -target-attach.
* mi/mi-cmds.c (mi_cmds): Forward -target-attach to CLI attach.
2008-07-04 09:04:36 +00:00
gdbadmin fa4d55d059 *** empty log message *** 2008-07-04 00:00:34 +00:00
Michael Snyder db3b9a107a 2008-06-21 Hui Zhu <teawater@gmail.com>
* target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak.
2008-07-03 23:14:35 +00:00
Pedro Alves dc177b7a51 * config/i386/nm-cygwin.h (ATTACH_NO_WAIT): Delete.
* config/i386/nm-i386gnu.h (ATTACH_NO_WAIT): Delete.

	* target.h (struct target_ops): Add to_attach_no_wait member.
	(target_attach_no_wait): New.
	* target.c (update_current_target): Inherit to_attach_no_wait.

	* infcmd.c: Replace ATTACH_NO_WAIT compile time check by
	target_attach_no_wait runtime check.

	* gnu-nat.c (init_gnu_ops): Set to_attach_no_wait in gnu_ops.
	* win32-nat.c (init_win32_ops): Set to_attach_no_wait in
	win32_ops.
2008-07-03 17:38:08 +00:00
Pedro Alves caac88966e * i386-tdep.c (i386_displaced_step_fixup): Condition log printing
on debug_displaced being set.
2008-07-03 00:19:58 +00:00
gdbadmin 6ed45dfb5e *** empty log message *** 2008-07-03 00:00:35 +00:00
gdbadmin 6d55bcfd9e *** empty log message *** 2008-07-02 00:00:03 +00:00
gdbadmin 166ec5755f *** empty log message *** 2008-07-01 00:00:03 +00:00
Daniel Jacobowitz 0d254d6f30 * frame.c (get_prev_frame_1): Call frame_unwind_find_by_frame
directly instead of get_frame_id.
2008-06-30 17:59:03 +00:00
Luis Machado f74c6cad4e * rs6000-tdep.c (ppc_displaced_step_fixup): New function.
(deal_with_atomic_sequence): Update BC masks.
	(rs6000_gdbarch_init): Init displaced stepping infra-structure.
	Define BRANCH_MASK, B_INSN, BC_INSN, BXL_INSN, BP_MASK and BP_INSN.
2008-06-30 14:11:48 +00:00
Daniel Jacobowitz 395f2fc22d * cris-tdep.c (crisv32_single_step_through_delay): Get this frame's
register, not the previous frame's.
2008-06-30 14:00:38 +00:00
Luis Machado 8340a3fbbe * source.c (select_source_symtab): Make sure we skip namespace
symtabs when showing cpp source code.
2008-06-30 13:52:07 +00:00
Hans-Peter Nilsson cfefc99a49 * MAINTAINERS (Authorized committers): Fix my email address. 2008-06-30 08:38:18 +00:00
gdbadmin e2b16c3ff1 *** empty log message *** 2008-06-30 00:00:03 +00:00
Vladimir Prus 1b98914a55 * mi/mi-cmds.c (mi_cmds): Route -exec-run, -exec-until,
-target-download and -target-select via CLI, so that
	the quoting rules are the same as they were (unfortunately)
	in all prior gdb releases.
	* mi/mi-cmds.h (mi_cmd_exec_run, mi_cmd_exec_until)
	(mi_cmd_target_download, mi_cmd_target_select): Remove.
	* mi/mi-main.c (mi_cmd_exec_run, mi_cmd_exec_until)
	(mi_cmd_target_download, mi_cmd_target_select): Remove.
	(mi_cmd_execute): Set current_token even for commands
	routed via CLI.
2008-06-29 17:36:36 +00:00
gdbadmin c01f9a0ea9 *** empty log message *** 2008-06-29 00:00:02 +00:00
Ulrich Weigand 94afd7a6d3 * alphafbsd-tdep.c: Update for unwinder changes.
* alpha-linux-tdep.c: Likewise.
	* alphanbsd-tdep.c: Likewise.
	* alphaobsd-tdep.c: Likewise.
	* avr-tdep.c: Likewise.
	* cris-tdep.c: Likewise.
	* frv-linux-tdep.c: Likewise.
	* frv-tdep.c: Likewise.
	* h8300-tdep.c: Likewise.
	* hppa-linux-tdep.c: Likewise.
	* iq2000-tdep.c: Likewise.
	* m32c-tdep.c: Likewise.
	* m32r-linux-tdep.c: Likewise.
	* m32r-tdep.c: Likewise.
	* m68hc11-tdep.c: Likewise.
	* mep-tdep.c: Likewise.
	* mn10300-tdep.c: Likewise.
	* mt-tdep.c: Likewise.
	* score-tdep.c: Likewise.
	* sh64-tdep.c: Likewise.
	* sh-tdep.c: Likewise.
	* sparc64fbsd-tdep.c: Likewise.
	* sparc64nbsd-tdep.c: Likewise.
	* sparc64obsd-tdep.c: Likewise.
	* v850-tdep.c: Likewise.
	* vaxobsd-tdep.c: Likewise.
	* vax-tdep.c: Likewise.
	* xstormy16-tdep.c: Likewise.
2008-06-28 17:29:04 +00:00
Vladimir Prus e111d6c920 * mi/mi-main.c (enum captured_mi_execute_command_actions)
(captured_mi_execute_command_args): Remove.
	(captured_mi_execute_command): Cast the closure to mi_parse
	pointer, not to captured_mi_execute_command_args, and don't
	set the action field thereof.
	(mi_execute_command): Pass struct mi_parse, not
	captured_mi_execute_command_args to captured_mi_execute_command.
	(mi_execute_command): Remove (dead) code for suppressing
	printing prompt.
2008-06-28 11:53:34 +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
Vladimir Prus 20874c92f8 * breakpoint.c (moribund_locations): New.
(bpstat_stop_status): Process moribund locations.
        (update_global_location_list): Add removed
        locations to moribund_locations.
        (breakpoint_retire_moribund): New.
        * breakpoint.h (struct bp_location): New field
        events_till_retirement.
        (breakpoint_retire_moribund): Declare.
        * thread.c (thread_count): New.
        * infrun.c (handle_inferior_event): Call
        breakpoint_retire_moribund.
        * gdbthread.h (thread_count): Declare.
2008-06-28 09:42:15 +00:00
gdbadmin 2a9bd7a88c *** empty log message *** 2008-06-28 00:00:33 +00:00
Joseph Myers cd0b43b1f1 * dfp.c (decimal_convert): Call match_endianness before and after
conversion.
2008-06-27 20:15:01 +00:00
Jonathan Larmour 7c0f6dcc1a * remote.c (remote_insert_breakpoint): Ensure that if Z0
unsupported and we fall back to memory_insert_breakpoint, we
        use the unmodified requested address.
2008-06-27 18:56:34 +00:00
Joel Brobecker 01c66ae6a6 * dwarf2read.c (read_attribute_value): Issue a complaint when
adjusting size attribute values of 0xffffffff as zero.
2008-06-27 17:56:47 +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
Joseph Myers 7ccc1c74d8 * i386-tdep.c (i386_16_byte_align_p): New.
(i386_push_dummy_call): Determine stack space required for
	arguments going forwards allowing for 16-byte alignment, then push
	arguments going forwards.
2008-06-27 16:22:56 +00:00
Pedro Alves db42f21025 * remote-utils.c (prepare_resume_reply): If requested, don't
output "thread:TID" in the T stop reply.

	* server.c (disable_packet_vCont, disable_packet_Tthread)
	(disable_packet_qC, disable_packet_qfThreadInfo): New globals.
	(handle_query): If requested, disable support for qC, qfThreadInfo
	and qsThreadInfo.
	(handle_v_requests): If requested, disable support for vCont.
	(gdbserver_show_disableable): New.
	(main): Handle --disable-packet and --disable-packet=LIST.

	* server.h (disable_packet_vCont, disable_packet_Tthread)
	(disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2008-06-27 13:22:15 +00:00
Pedro Alves c0a2216eb3 * infrun.c (start_remote): Don't clear thread list here.
* monitor.c (monitor_open): Include "gdbthread.h".  Clear thread
	list here.
	* remote.c (record_currthread): Upgrade the main thread and its
	entry in the thread list if this is the first time we hear about
	threads.
	(remote_thread_alive): Consider magic_null_ptid or a ptid without
	a tid member always alive.
	(remote_find_new_threads): Don't update the main thread here.
	(remote_start_remote): Clear thread list here.  Always add the
	main thread.
	(extended_remote_attach_1): Add the main thread here.
	(extended_remote_mourn_1): Re-add the main thread here.
	(extended_remote_create_inferior_1): Add a main thread.

	* Makefile.in (monitor.o): Depend on $(gdbthread_h).
2008-06-27 11:54:21 +00:00
Pedro Alves 87b0e16e7b Fix date. 2008-06-27 11:32:17 +00:00
Pedro Alves 79d7f22901 Use ptid_t.tid to store thread ids instead of ptid_t.pid.
* remote.c (magic_null_ptid, not_sent_ptid, any_thread_ptid): New
	globals.
	(general_thread, continue_thread): Change type to ptid_t.
	(record_currthread): Take a ptid_t parameter instead of an
	integer.
	(MAGIC_NULL_PID): Delete.
	(set_thread): Take a ptid_t parameter and adjust.
	(set_general_thread, set_continue_thread): New.
	(remote_thread_alive, remote_newthread_step)
	(remote_current_thread, remote_find_new_threads)
	(remote_threads_info, remote_start_remote, remote_vcont_resume)
	(remote_resume_1, remote_wait, extended_remote_create_inferior_1)
	(threadalive_test, remote_pid_to_str)
	(remote_get_thread_local_address): Adjust.
	(_initialize_remote): Initialize magic_null_ptid, not_sent_ptid
	and any_thread_ptid.
2008-06-27 11:31:40 +00:00
gdbadmin 56a2504d54 *** empty log message *** 2008-06-27 00:00:33 +00:00
Jan Kratochvil 3ca64bd3bd * configure.ac (--enable-tui): AC_MSG_ERROR for explicit --enable-tui.
* configure: Regenerated.
2008-06-26 19:20:42 +00:00
Joel Brobecker 28e9494986 * dwarf2read.c (read_attribute_value): Treat size attribute
values of 0xffffffff as if the attribute value was zero.
2008-06-26 19:08:10 +00:00
Vladimir Prus 8a77dff322 * linux-nat.c: Add description of overall logic. 2008-06-26 17:40:23 +00:00
Daniel Jacobowitz d5af19bafb * Makefile.in (GNULIB_H): Use GNULIB_STDINT_H.
(gdb_stdint_h, gdb_stdint.h, stamp-int): Delete.  Remove
	all dependencies on $(gdb_stdint_h).
	(distclean): Do not delete gdb_stdint.h.
	* acinclude.m4: Do not use stdint.m4.
	* configure.ac: Set GNULIB_STDINT_H.  Remove tests for stdint.h,
	uintptr_t, and gdb_stdint.h.
	* defs.h: Include <stdint.h>.
	* gdb_thread_db.h: Assume stdint.h is already included.
	* breakpoint.c, findcmd.c, hppa-tdep.c, inf-ptrace.c, proc-service.c,
	rs6000-nat.c, spu-linux-nat.c, target.c, win32-nat.c: Do not
	include gdb_stdint.h.
	* configure, config.in: Regenerate.
2008-06-26 15:51:28 +00:00
Joseph Myers 00fbcec4ab * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Handle passing
decimal floating-point values in GPRs for soft-float.
	(do_ppc_sysv_return_value): Handle returning decimal
	floating-point values in GPRs for soft-float.
2008-06-26 15:38:39 +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
gdbadmin e9033f62de *** empty log message *** 2008-06-26 00:00:04 +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