Commit Graph

23620 Commits

Author SHA1 Message Date
Joel Brobecker 77f120bfd7 * configure.ac: On alpha-osf, error out if enable_tui is set to
"yes", and set enable_tui to "no" if previously set to "auto".
          Check for waddstr only if TUI support was requested. Move the
          part of the configure script that updates various Makefile
          variables up, together with the check for waddstr.
          * configure: Regenerate.
2008-10-22 20:22:01 +00:00
Joel Brobecker 4af8819895 * gdbtypes.c (copy_type): New function.
* gdbtypes.h (copy_type): Add declaration.
        * ada-lang.c (ada_to_fixed_type_1): If there is a parallel XVZ
        variable, then use it.
2008-10-22 20:11:56 +00:00
Joel Brobecker 20924a554d * gdb.texinfo (Ada Tasks, Ada Tasks and Core Files): New nodes.
(Patching): Replace incorrect usage of @samp by @kbd.
2008-10-22 19:48:31 +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
Joel Brobecker 0ef643c89c * target.h (struct target_ops): Add new field to_get_ada_task_ptid.
(target_get_ada_task_ptid): New macro.
        * target.c (default_get_ada_task_ptid): New function.
        (update_current_target): Inherit field default_get_ada_task_ptid.
        (update_current_target): Make default_get_ada_task_ptid the default
        value for field to_get_ada_task_ptid.
        * ada-lang.h (struct task_control_block): Delete. Never used.
        (struct task_ptid, task_ptid_t, struct task_entry, task_list):
        Likewise.
        (struct ada_task_info): New.
        (ada_task_is_alive, ada_find_printable_frame)
        (ada_task_list_iterator_ftype, iterate_over_live_ada_tasks): Add
        declarations.
        (ada_build_task_list): Update prototype.
        (init_task_list, ada_is_exception_breakpoint): Remove prototypes.
        * ada-lang.c (ada_find_printable_frame): Make non-static.
        * ada-tasks.c: New file.
        * Makefile.in (SFILES): Add ada-tasks.c.
        (COMMON_OBS): Add ada-tasks.o.
        * linux-thread-db.c (thread_db_find_thread_from_tid)
        (thread_db_get_ada_task_ptid): New functions.
        (init_thread_db_ops): Set thread_db_ops.to_get_ada_task_ptid.
2008-10-22 19:45:05 +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
gdbadmin 6c39d39b73 *** empty log message *** 2008-10-22 00:00:03 +00:00
Doug Evans 66b6e1dd14 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
(READLINE_DIR,READLINE_DEP): Delete.
	(INTERNAL_CFLAGS): Update.
	(LINTFLAGS): Update.
2008-10-21 21:22:53 +00:00
Jan Kratochvil 5bc60cfb35 * mips-tdep.c (mips_n32n64_fp_arg_chunk_p): Update TYPE_FIELD_STATIC
removed before.
2008-10-21 19:34:44 +00:00
gdbadmin 1631ca86c3 *** empty log message *** 2008-10-21 00:00:33 +00:00
Joel Brobecker 7f99b1909e * NEWS: Add entry mentioning thread-support on Tru64 2008-10-20 16:18:59 +00:00
Joel Brobecker 7a052092c3 * dec-thread.c: New file.
* config/alpha/alpha-osf3.mh (NATDEPFILES): Add dec-thread.o.
        (NAT_CLIBS): Define.
2008-10-20 15:48:17 +00:00
Hui Zhu 40e12b06fe 2008-10-19 Hui Zhu <teawater@gmail.com>
* infrun.c (handle_inferior_event): Set "stop_pc" when
	TARGET_WAITKIND_NO_HISTORY.
2008-10-20 02:56:39 +00:00
gdbadmin 7204a45185 *** empty log message *** 2008-10-20 00:00:34 +00:00
Pedro Alves f9176c46a1 * python/python-value.c (value_object_methods)
(value_object_as_number, value_object_as_mapping): Move to bottom
	of file.
	(valpy_dealloc, valpy_new, valpy_length, valpy_getitem)
	(valpy_setitem, valpy_str, valpy_add, valpy_subtract)
	(valpy_multiply, valpy_divide, valpy_remainder, valpy_power)
	(valpy_negative, valpy_positive, valpy_absolute, valpy_nonzero)
	(valpy_richcompare, valpy_dereference): Don't forward-declare.
	(valpy_length) [HAVE_LIBPYTHON2_4]: Change return type to `int'.
2008-10-19 20:25:00 +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
gdbadmin 23ac5f767b *** empty log message *** 2008-10-19 00:00:05 +00:00
Pedro Alves 4058b83970 * infrun.c (adjust_pc_after_break): Do nothing if executing in
reverse.
2008-10-18 03:24:34 +00:00
Michael Snyder b4f899bb85 Line break 2008-10-18 01:12:49 +00:00
gdbadmin dc2a6b301c *** empty log message *** 2008-10-18 00:00:02 +00:00
Pedro Alves f42429a63f * infcmd.c (GO_USAGE): Delete.
(go_command): Adjust.
2008-10-17 23:39:32 +00:00
Michael Snyder bacec72f1d 2008-10-17 Michael Snyder <msnyder@vmware.com>
* gdb.texinfo: Add documentation for reverse execution.
2008-10-17 19:44:17 +00:00
Michael Snyder b2175913c5 2008-10-17 Michael Snyder <msnyder@vmware.com>
Target interface for reverse debugging.
	* target.h (enum target_waitkind):
	Add new wait event, TARGET_WAITKIND_NO_HISTORY.
	(struct target_ops): New method to_can_execute_reverse.
	(target_can_execute_reverse): New macro.
	* target.c (update_current_target): Inherit to_can_execute_reverse.

	Remote interface for reverse debugging.
	* remote.c (remote_can_execute_reverse): New target method.
	(remote_resume): Check for reverse exec direction, and send
	appropriate command to target.
	(remote_wait_as): Check target response for NO_HISTORY status.
	Also check for empty reply (target doesn't understand "bs" or "bc).
	(remote_vcont_resume): Jump out if attempting reverse execution.

	Event handling interface for reverse debugging.
	* infrun.c (execution_direction): New state variable.
	(enum inferior_stop_reason): Add NO_HISTORY reason.
	(handle_inferior_event): Handle TARGET_WAITKIND_NO_HISTORY.
	Handle stepping over a function call in reverse.
	Handle stepping thru a line range in reverse.
	Handle setting a step-resume breakpoint in reverse.
	Handle stepping into a function in reverse.
	Handle stepping between line ranges in reverse.
	(print_stop_reason): Print reason for NO_HISTORY.
	(step_into_function): Rename to handle_step_into_function.
	(handle_step_into_function_backward): New function.
	(set_exec_direction_func, show_exec_direction_func): New funcs.
	(proceed): No need to singlestep over a breakpoint
	when resuming in reverse.

	* inferior.h (enum exec_direction_kind): New enum.
	(execution_direction): Export new execution state variable.

	* breakpoint.c (make_breakpoint_silent): New function.
	* breakpoint.h (make_breakpoint_silent): Export.
	* infcmd.c (finish_command): Check for reverse exec direction.
	(finish_backward): New function, handle finish cmd in reverse.

	User interface for reverse execution.
	* Makefile.in (reverse.c): New file.
	* reverse.c: New file.  User interface for reverse execution.
2008-10-17 19:43:47 +00:00
Pedro Alves 153ccabd86 * remote.c (record_currthread): Add inferior before child threads.
(remote_threads_info): Check for exited threads.  Mention
	notification order.
2008-10-17 01:08:08 +00:00
gdbadmin 8215a0031e *** empty log message *** 2008-10-17 00:00:34 +00:00
Thiago Jung Bauermann bd4f7d6822 Mention Eli in the changelog entry for Python values. 2008-10-16 17:59:36 +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
Joel Brobecker ce78b96d4f * breakpoint.h (enum bptype): New enum bp_catchpoint.
Delete bp_catch_fork and bp_catch_vfork.
        (struct breakpoint_ops): Add new methods "insert", "remove"
        and "breakpoint_hit".
        * breakpoint.c (create_fork_vfork_event_catchpoint)
        (create_fork_event_catchpoint, create_vfork_event_catchpoint): Remove.
        (insert_catchpoint): Remove handling of bp_catch_fork and
        bp_catch_vfork catchpoints, and handle them as bp_catchpoint
        catchpoints instead.
        (insert_bp_location, update_breakpoints_after_exec)
        (remove_breakpoint, bpstat_check_location, bpstat_what)
        (allocate_bp_location): Likewise.
        (print_it_typical, print_one_breakpoint_location, mention): Remove
        handling of bp_catch_fork and bp_catch_vfork breakpoints.
        (ep_is_catchpoint, user_settable_breakpoint)
        (breakpoint_address_is_meaningful, adjust_breakpoint_address)
        (breakpoint_re_set_one, disable_command, enable_command):
        Remove use of bp_catch_fork and bp_catch_vfork.  Add handling of
        bp_catchpoint breakpoints.
        (insert_catch_fork, remove_catch_fork, breakpoint_hit_catch_fork)
        (print_it_catch_fork, print_one_catch_fork, print_mention_catch_fork):
        New functions.
        (catch_fork_breakpoint_ops): New static constant.
        (insert_catch_vfork, remove_catch_vfork, breakpoint_hit_catch_vfork)
        (print_it_catch_vfork, print_one_catch_vfork)
        (print_mention_catch_vfork): New functions.
        (catch_vfork_breakpoint_ops): New static constant.
        (create_catchpoint, create_fork_vfork_event_catchpoint): New functions.
        (catch_fork_command_1): Use create_fork_vfork_event_catchpoint
        to create the fork and vfork catchpoints.
        (gnu_v3_exception_catchpoint_ops): Set new breakpoint_ops fields.
        * ada-lang.c (catch_exception_breakpoint_ops): Set new breakpoint_ops
        fields.
        (catch_exception_unhandled_breakpoint_ops): Likewise.
        (catch_assert_breakpoint_ops): Likewise.
2008-10-16 16:25:04 +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 7843261ba1 Add gdb/python/python-value.c, which I forgot to do in my previous commit. 2008-10-16 14:46:20 +00:00
Pedro Alves 3c9c4b83df * remote.c (set_general_process): New.
(remote_check_symbols): Use it.
2008-10-16 14:39:54 +00:00
Pedro Alves 5c952c9bcb * remote.c (push_remote_target): Delete.
* target.h (push_remote_target): Delete declaration.
2008-10-16 14:03:18 +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
gdbadmin f19edabdfc *** empty log message *** 2008-10-16 00:00:03 +00:00
Pedro Alves ce5ce7eded * remote.c (remote_close): Unregister remote_desc from the event
loop.  Always restore the SIGINT handler.  Discard all inferiors
	here.
	(remote_detach_1, remote_disconnect): Don't unregister the file
	descriptor from the event loop here.
	(interrupt_query, readchar, getpkt_sane): Pop the target instead
	of morning the current inferior.
	(remote_kill): Don't unregister the file descriptor from the event
	loop here.
	(remote_mourn_1): Don't discard inferiors here.
2008-10-15 21:39:53 +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
gdbadmin 180e3ebfbc *** empty log message *** 2008-10-15 00:00:03 +00:00
Pedro Alves ad53cd7154 * infrun.c (displaced_step_prepare): Switch thread temporarily
while we're here.
	(displaced_step_fixup): Make sure target_resume sees ptid as
	inferior_ptid.  Add debug output.
2008-10-14 23:39:29 +00:00
Pedro Alves 63c715c603 Remove dead code.
* breakpoint.c (show_breakpoint_hit_counts): Delete.
	(print_one_breakpoint_location): Adjust.
	(breakpoint_clear_ignore_counts): Delete.
	* breakpoint.h (breakpoint_clear_ignore_counts): Remove
	declaration.
	* target.c (generic_mourn_inferior): Don't clear ignore
	counts (never reached).
2008-10-14 20:49:02 +00:00
gdbadmin 0a8b3393b0 *** empty log message *** 2008-10-14 00:00:33 +00:00
gdbadmin 343a5ba857 *** empty log message *** 2008-10-13 00:00:03 +00:00
gdbadmin 3ddab52ccc *** empty log message *** 2008-10-12 00:00:03 +00:00
gdbadmin 88fad9bb61 *** empty log message *** 2008-10-11 00:00:03 +00:00
Doug Evans c764a87698 * dwarf2read.c (comp_unit_head): Use unsigned int consistently
for dwarf section offsets and sizes.
	(dwarf2_cu): Ditto.
	(dwarf2_per_cu_data): Ditto.
	(create_all_comp_units): Change offset to unsigned int.
	(load_full_comp_unit,find_partial_die_in_comp_unit,find_partial_die,
	dwarf2_find_containing_comp_unit,dwarf2_find_comp_unit): Ditto.

	* dwarf2read.c (read_initial_length): Delete cu_header arg.
	All callers updated.
	(read_checked_initial_length_and_offset): New function.
	(read_offset_1): New function.
	(read_offset): Call it.
	(dwarf_decode_line_header): Call read_checked_initial_length_and_offset
	instead of read_initial_length.  Call read_offset_1 instead of
	read_offset.

	* dwarf2read.c (dwarf2_get_ref_die_offset): Remove unused arg `cu'.
	All callers updated.

	* dwarf2read.c (dwarf_attr_name): Unconditionally support all
	DW_AT_MIPS_* except DW_AT_MIPS_fde which collides with
	DW_AT_HP_block_index.
2008-10-10 16:15:42 +00:00
Pedro Alves 5fe0451782 * remote.c (remote_start_remote): Always tell the stub if we're in
extended-remote.
2008-10-10 14:46:31 +00:00
Pedro Alves 9b710a4294 * server.c (handle_v_run): If GDB didn't specify an argv, use the
whole argv from the last run, not just argv[0].
2008-10-10 14:06:05 +00:00
gdbadmin ff5b71187b *** empty log message *** 2008-10-10 00:00:02 +00:00
Pedro Alves c8e38a496b * remote.c (remote_wait): Rename to...
(remote_wait_as): ... this.  Don't loop here.  If the remote
	didn't stop, return TARGET_WAITKIND_IGNORE.
	(remote_wait): New, reimplemented on top of remote_wait_as.
2008-10-09 18:45:44 +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
Thomas Schwinge d11d9deb00 2008-10-09 Thomas Schwinge <tschwinge@gnu.org>
* Makefile.in (gnu-nat.o): Revert the 2008-09-10 change, as the problem
	is fixed upstream.
2008-10-09 16:06:22 +00:00
Thomas Schwinge 2024980829 2008-10-09 Thomas Schwinge <tschwinge@gnu.org>
* reply_mig_hack.awk: Use the `BAD_TYPECHECK' macro.
2008-10-09 16:04:18 +00:00
Thomas Schwinge 9ca12bbf86 2008-10-09 Thomas Schwinge <tschwinge@gnu.org>
* MAINTAINERS (Write After Approval): Add myself.
2008-10-09 15:53:26 +00:00
Pedro Alves 0b62613e31 2008-10-09 Pedro Alves <pedro@codesourcery.com>
Make it compile without warnings.

	* procfs.c (create_procinfo): Initialize `parent'.
	(dead_procinfo): Pass a constant string as format to error.
	(procfs_address_to_host_pointer): Add cast to gdb_type *.
	(procfs_find_LDT_entry): Adjust format string to long int
	ptid.tid.
	(procfs_xfer_partial): Adjust prototype.  Add gdb_byte* cast.
	(procfs_xfer_memory): Adjust prototype.
	(info_mappings_callback, info_proc_mappings): Adjust to not pass a
	variable as printf_filtered format.
	(procfs_make_note_section): Change type of auxv local to gdb_byte.
	* Makefile.in: Remove special rule.
2008-10-09 13:49:13 +00:00
Pedro Alves c8d104ad69 * remote.c (remote_open_1): Move acknowledging any pending ack,
querying supported features, activating noack mode, finding the
	target description, enabling extended remote, and checking remote
	symbols from here ...
	(remote_start_remote): ... to here.
	(remote_open_1): Don't pop the target if it is already gone.
	* target.c (unpush_target): Check for the dummy target.
2008-10-09 03:24:51 +00:00
Pedro Alves efdb2a86e4 * ser-mingw.c: Include "command.h".
(pipe_windows_open): Declare locals at the beginning of the scope.
2008-10-09 01:14:26 +00:00
gdbadmin b0415f549c *** empty log message *** 2008-10-09 00:00:34 +00:00
Pedro Alves e24a49d86d * remote.c (struct remote_state) <waiting_for_stop_reply>: New
field.
	(remote_open_1): Clear waiting_for_stop_reply.
	(remote_resume): Set waiting_for_stop_reply.
	(remote_wait): Clear or set waiting_for_stop_reply accordingly.
	(putpkt_binary): If we're in async mode and waiting for a stop
	reply, bail out with an error.
	(extended_remote_mourn_1): Clear waiting_for_stop_reply.
2008-10-08 19:16:31 +00:00
Pedro Alves 3084dd775a * remote.c (remote_get_thread_info): If the remote doesn't support
the query, bail out.
2008-10-08 15:00:29 +00:00
Jan Kratochvil d6a843b594 Convert static_kind into loc_kind enum.
* gdbtypes.h (enum field_loc_kind): New.
	(union field_location): New field dwarf_block.
	(struct field): Rename static_kind as loc_kind.
	(FIELD_STATIC_KIND): Rename to ...
	(FIELD_LOC_KIND): ... here.
	(TYPE_FIELD_STATIC_KIND): Rename to ...
	(TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
	(TYPE_FIELD_STATIC_HAS_ADDR): Remove.
	(TYPE_FIELD_STATIC): Remove.
	(TYPE_FIELD_BITPOS): Reformat.
	(SET_FIELD_BITPOS): New.
	(FIELD_PHYSADDR): Rename to ...
	(FIELD_STATIC_PHYSADDR): ... here.
	(TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
	(SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
	(FIELD_PHYSNAME): Rename to ...
	(FIELD_STATIC_PHYSNAME): ... here.
	(TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
	(SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
	(FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
	(field_is_static): New declaration.
	* gdbtypes.c (field_is_static): New function.
	(copy_type_recursive): Update throughout.
	* amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
	eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
	p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
2008-10-08 12:49:13 +00:00
gdbadmin a90e4d49cb *** empty log message *** 2008-10-08 00:00:33 +00:00
Pedro Alves c289427b7d * gnu-nat.h: Rename `current_inferior' to `gnu_current_inf' to
avoid a name collision.
	* gnu-nat.c: Likewise.
	* i386gnu-nat.c: Likewise.
2008-10-07 18:42:42 +00:00
Joel Brobecker 9124fe4822 * gdb.ada/ref_tick_size.exp: New testcase. 2008-10-07 14:10:31 +00:00
Joel Brobecker 8c1c099fc4 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_SIZE]: Add handling
of arguments that are references.
2008-10-07 14:07:10 +00:00
gdbadmin 06fa9cecf1 *** empty log message *** 2008-10-07 00:00:03 +00:00
Doug Evans d97bc12be0 * dwarf2read.c (dwarf2_die_debug): New static global.
(dump_die_shallow): Renamed from dump_die, New args f, indent.
	Print to specified file, indented by the specified amount.
	(dump_die_for_error): New fn.  Point all existing callers of
	dump_die here.
	(dump_die_die_1,dump_die): New fns, replaces ...
	(dump_die_list): ... deleted.
	(read_die_and_children_1): Old contents of read_die_and_children
	moved here.
	(read_die_and_children): Rewrite.
	(read_die_and_siblings): Call read_die_and_children_1 instead of
	read_die_and_children.
	(_initialize_dwarf2_read): New option "debug dwarf2-die".
	* gdbinit.in (pdie): New macro.

	* doc/gdb.texinfo (set debug dwarf2-die): Document it.
2008-10-06 22:23:18 +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
Doug Evans 8a498d38be * symmisc.c (maintenance_info_symtabs): Watch for ^c.
(maintenance_info_psymtabs): Ditto.
2008-10-06 21:07:48 +00:00
gdbadmin e2232c63f4 *** empty log message *** 2008-10-06 00:00:33 +00:00
Michael Snyder 360551e43d Fix email address 2008-10-05 20:01:14 +00:00
Michael Snyder 8002d778c3 2008-10-05 Michael Snyder <msnyder@promb-2s-dhcp59.eng.vmware.com>
* infrun.c (handle_inferior_event): Fix typo in comment.
2008-10-05 19:52:11 +00:00
gdbadmin 44b8c39ae9 *** empty log message *** 2008-10-05 00:00:03 +00:00
Vladimir Prus c1828f258e * mi/mi-interp.c (mi_on_resume): Flush raw_stdout. 2008-10-04 14:58:54 +00:00
gdbadmin 2605c5df34 *** empty log message *** 2008-10-04 00:00:33 +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
Paul Pluzhnikov 5ef737906e 2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/2384:
	* gdbtypes.c (get_vptr_fieldno): baseclass and basetype may have
	different lifetimes.
2008-10-03 22:00:46 +00:00
Joel Brobecker 352efb280d Fix the date in the last entry. 2008-10-03 16:42:48 +00:00
Joel Brobecker a7125ea9bc * solib-osf.c: Include "solib.h". 2008-10-03 16:38:01 +00:00
Paul Pluzhnikov d1a4106143 2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
* utils.c, defs.h (gdb_buildargv): New fn. Wrap buildargv
	and check for out-of-memory condition.
	* exec.c (exec_file_command): Call it.
	* infrun.c (handle_command, xdb_handle_command): Likewise.
	* interps.c (interpreter_exec_cmd): Likewise.
	* linux-nat.c (linux_nat_info_proc_cmd): Likewise.
	* procfs.c (info_proc_cmd): Likewise.
	* remote-mips.c (common_open): Likewise.
	* remote-sim.c (gdbsim_kill, gdbsim_create_inferior)
	(gdbsim_open): Likewise.
	* remote.c (extended_remote_run, remote_put_command)
	(remote_get_command, remote_delete_command): Likewise.
	* ser-mingw.c (pipe_windows_open): Likesise.
	* source.c (add_path, show_substitute_path_command)
	(unset_substitute_path_command, set_substitute_path_command):
	Likewise.
	* stack.c (backtrace_command): Likewise.
	* symfile.c (symbol_file_command, generic_load)
	(add_symbol_file_command): Likesise.
	* symmisc.c (maintenance_print_symbols, maintenance_print_psymbols)
	(maintenance_print_msymbols): Likewise.
2008-10-03 16:36:10 +00:00
gdbadmin 81ab4297b7 *** empty log message *** 2008-10-03 00:00:34 +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 40debb5a97 * Makefile.in (HFILES_NO_SRCDIR): Remove gdb-events.h, gstdint.h. 2008-10-02 17:39:08 +00:00
Daniel Jacobowitz db5f024ecc * mips-linux-tdep.c (mips_linux_in_dynsym_resolve_code): Update
comments.
	(mips_linux_skip_resolver): Also use glibc_skip_solib_resolver.
	(mips_linux_init_abi): Do not override skip_trampoline_code.
	* configure.tgt (mips*-*-linux*): Add glibc-tdep.o.
	* mips-tdep.c (mips32_scan_prologue): Stop scanning at branches.
	(mips_stub_frame_sniffer): Use the stub frame sniffer for PIC stubs.
	(mips_skip_mips16_trampoline_code): Rename from
	mips_skip_trampoline_code.
	(mips_skip_pic_trampoline_code, mips_skip_trampoline_code): New.
	* infrun.c (handle_inferior_event): Do not pass zero to
	in_solib_dynsym_resolve_code.
2008-10-02 15:48:06 +00:00
Pierre Muller 9f9d052e60 * win32-nat.c (do_initial_win32_stuff): Set inferior_ptid. 2008-10-02 14:20:07 +00:00
gdbadmin 6b240e9371 *** empty log message *** 2008-10-02 00:00:33 +00:00
Tom Tromey bd2e94cec8 * symtab.c (search_symbols): Update.
* symtab.h (domain_enum_tag) <METHODS_DOMAIN>: Remove.
2008-10-01 17:25:22 +00:00
Tom Tromey 8b41ec6501 * symfile.c (syms_from_objfile): Update.
(reread_symbols): Update.
	* objfiles.h (OBJF_SYMS): Remove.
	(OBJF_REORDERED): Renumber.
	(OBJF_SHARED): Likewise.
	(OBJF_READNOW): Likewise.
	(OBJF_USERLOADED): Likewise.
2008-10-01 17:21:06 +00:00
Tom Tromey 712f90be02 * symtab.c (find_pc_sect_psymtab): Use MSYMBOL_TYPE.
(find_pc_sect_symtab): Likewise.
	* symmisc.c (dump_msymbols): Use MSYMBOL_TYPE.
	* solib-som.c (som_solib_desire_dynamic_linker_symbols): Use
	MSYMBOL_TYPE, not SYMBOL_TYPE.
	* parse.c (write_exp_msymbol): Use MSYMBOL_TYPE.
	* objc-lang.c (find_methods): Use MSYMBOL_TYPE.
	* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Use
	MSYMBOL_TYPE.
	* m2-exp.y (yylex): Use SYMBOL_CLASS.
2008-10-01 16:56:52 +00:00
Joel Brobecker 87f67dbac2 * gdb.texinfo (catch) [exception]: Document how to insert
a breakpoint on user-defined exceptions when the exception
        name is identical to one of the language-defined ones.
2008-10-01 16:44:47 +00:00
Tom Tromey b887350fc5 * xcoffread.c (RECORD_MINIMAL_SYMBOL): Update.
(scan_xcoff_symtab): Update.
	* mdebugread.c (record_minimal_symbol): Update.
	(parse_partial_symbols): Update.
	* elfread.c (record_minimal_symbol): Update.
	* dbxread.c (record_minimal_symbol): Update.
	* coffread.c (record_minimal_symbol): Update.
	* sh64-tdep.c (MSYMBOL_IS_SPECIAL): Redefine.
	(sh64_elf_make_msymbol_special): Update.
	* mips-tdep.c (mips_elf_make_msymbol_special): Use
	MSYMBOL_TARGET_FLAG_1.
	(mips_elf_make_msymbol_special): Likewise.
	(msymbol_is_special): Likewise.
	* minsyms.c (prim_record_minimal_symbol_and_info): Update.
	(install_minimal_symbols): Likewise.
	(prim_record_minimal_symbol): Update.
	(prim_record_minimal_symbol_and_info): Remove 'info' argument.
	* m68hc11-tdep.c (MSYMBOL_SET_RTC): Redefine.
	(MSYMBOL_SET_RTI): Redefine.
	(MSYMBOL_IS_RTC): Redefine.
	(MSYMBOL_IS_RTI): Redefine.
	* arm-tdep.c (MSYMBOL_SET_SPECIAL): Redefine.
	(MSYMBOL_IS_SPECIAL): Redefine.
	* symtab.h (struct minimal_symbol) <info>: Remove.
	<target_flag_1, target_flag_2>: New fields.
	(MSYMBOL_INFO): Remove.
	(MSYMBOL_TARGET_FLAG_1): New macro.
	(MSYMBOL_TARGET_FLAG_2): Likewise.
	(prim_record_minimal_symbol_and_info): Update.
2008-10-01 16:41:27 +00:00
Joel Brobecker d35e579508 * ada-lang.c (is_digits_suffix): Delete unused function. 2008-10-01 02:23:18 +00:00
gdbadmin e846c30a01 *** empty log message *** 2008-10-01 00:00:34 +00:00
Joel Brobecker d37209fddb * ada-lang.c (ada_modulus): Correct to avoid sign problem with
moduli >= 2**31.
2008-09-30 21:53:32 +00:00
Joel Brobecker b1f33ddde1 * ada-lang.c (ada_lookup_struct_elt_type): Handle case of a "naked"
variant branch.
        (empty_record): Use INIT_CPLUS_SPECIFIC, since this field is not
        supposed to be null.  Fixes debugger segfaults.
        (is_unchecked_variant): New function.
        (to_fixed_variant_branch_type): Modify to leave unchecked unions
        untouched.
        (ada_template_to_fixed_record_type_1): Fix comment.
2008-09-30 21:36:21 +00:00
Joel Brobecker 3d0b0fa396 * ada-lang.c (standard_exc): New static constant.
(ada_exception_catchpoint_cond_string): Add special handling
        for the predefined exceptions.
2008-09-30 20:42:21 +00:00
Joel Brobecker cdc7bb92c7 * ada-lang.c (ADA_RETAIN_DOTS): Delete this dead macro. Update
the code accordingly.
2008-09-30 20:14:13 +00:00
Joel Brobecker 6b0d7253af * ada-lang.c (ada_evaluate_subexp) [UNOP_IND]: Remove strange
treatment of expect_type. Return the correct type when dereferencing
        an integer.
2008-09-30 18:46:37 +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
Joel Brobecker b084d49989 * dwarf2read.c (dwarf2_get_subprogram_pc_bounds): New function.
(get_scope_pc_bounds): Use it.
2008-09-30 16:57:37 +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
gdbadmin 2254aa74ee *** empty log message *** 2008-09-30 00:00:32 +00:00
gdbadmin d6026485e1 *** empty log message *** 2008-09-29 00:00:32 +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
gdbadmin 6593d811a0 *** empty log message *** 2008-09-28 00:00:33 +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
Tom Tromey 5c6ce71d76 gdb
* scm-lang.c (scm_language_defn): Update.
	* p-typeprint.c (pascal_print_typedef): New function.
	* p-lang.h: (pascal_print_typedef): Declare.
	* p-lang.c (pascal_language_defn): Update.
	* objc-lang.c (objc_language_defn): Update.
	* m2-typeprint.c (m2_print_typedef): New function.
	* m2-lang.h (m2_print_typedef): Declare.
	* m2-lang.c (m2_language_defn): Update.
	* language.h (_LANG_c, _LANG_m2, _LANG_fortran, _LANG_pascal):
	Remove.
	(struct language_defn) <la_print_typedef>: New field.
	(default_print_typedef): Declare.
	(LA_PRINT_TYPEDEF): New define.
	* language.c (unknown_language_defn): Update.
	(auto_language_defn): Update.
	(local_language_defn): Update.
	* jv-lang.c (java_language_defn): Update.
	* f-lang.c (f_language_defn): Update.
	* c-typeprint.c (c_print_typedef): New function.
	* c-lang.h (c_print_typedef): Declare.
	* c-lang.c (c_language_defn): Update.
	(cplus_language_defn): Update.
	(asm_language_defn): Update.
	(minimal_language_defn): Update.
	* ada-lang.c (ada_language_defn): Update.
	* typeprint.c (default_print_typedef): New function.
gdb/doc
	* gdbint.texinfo (Language Support): Remove text about omitting
	support for a language.
2008-09-27 21:29:30 +00:00
Tom Tromey 09be204ecc * jv-exp.y (insert_exp): Define using ISO syntax.
(copy_exp): Likewise.
	(push_expression_name): Likewise.
	(push_fieldnames): Likewise.
	(java_type_from_name): Likewise.
	(yyerror): Likewise.
	(yylex): Likewise.
	(parse_number): Likewise.
2008-09-27 17:03:16 +00:00
gdbadmin fadaeb9526 *** empty log message *** 2008-09-27 00:00:03 +00:00
Joel Brobecker 3cd9d1646b * MAINTAINERS (GLOBAL MAINTAINERS): Add Pedro Alves. 2008-09-26 18:38:40 +00:00
gdbadmin 181b26eaf1 *** empty log message *** 2008-09-26 00:00:34 +00:00
Joel Brobecker e316861586 * stack.c (print_frame_args): Fix typos in comments. 2008-09-25 16:04:11 +00:00
Thiago Jung Bauermann 8b8655b3f7 2008-09-25 Sérgio Durigan Júnior <sergiodj@linux.vnet.ibm.com>
* linux-nat.c (get_pending_status): Fix argument to WIFSTOPPED.
2008-09-25 14:13:44 +00:00
gdbadmin b02c1afc66 *** empty log message *** 2008-09-25 00:00:03 +00:00
Vladimir Prus 6fbd21a1ce * remote-sim.c (gdbsim_create_inferior): Fix missing parenthesis. 2008-09-24 16:37:24 +00:00
Andreas Schwab 68e007ca21 * frame.c (get_frame_register_bytes): Avoid excessive function calls. 2008-09-24 12:59:49 +00:00
Andreas Schwab 45ef8ce0c5 * frame.c (get_frame_register_bytes): Take pseudo registers into
account.
2008-09-24 12:17:20 +00:00
gdbadmin abf52ff4e8 *** empty log message *** 2008-09-24 00:00:03 +00:00
Doug Evans 07128da01c * dcache.c (state_chars): New static global.
(ENTRY_INVALID,ENTRY_VALID): Renamed from ENTRY_BAD,ENTRY_OK.
	All uses updated.
	(dcache_info): Print cache state as mnemonically useful letters instead
	of magic numbers.
	* doc/gdb.texinfo (info dcache): Update.
2008-09-23 18:35:32 +00:00
Doug Evans 9cbfa09e9e * dwarf2read.c (comp_unit_head): Reorganize for better packing. 2008-09-23 17:36:51 +00:00
gdbadmin a94b8ea079 *** empty log message *** 2008-09-23 00:00:03 +00:00
Tom Tromey d4c0a7a09f * symfile.c (symbol_file_add_with_addrs_or_offsets): Don't use
printf_filtered.
2008-09-22 18:18:07 +00:00
Sandra Loosemore b90a069ad9 2008-09-22 Sandra Loosemore <sandra@codesourcery.com>
gdb/doc
	* gdb.texinfo (Packets): Add info on thread-id syntax and
	multiprocess extensions.
	<D>: Document multiprocess form of packet.
	<H>: Use thread-id syntax.
	<T>: Likewise.
	<vCont>: Likewise.  Note this is required for multiprocess.
	<vKill>: New packet.
	(Stop Reply Packets) <T>: Use thread-id syntax.
	<W>: Document multiprocess form of reply.
	<X>: Likewise.
	(General Query Packets) <qC>: Use thread-id syntax.
	<qfThreadInfo>: Likewise.
	<qGetTLSAddr>: Likewise.
	<qP>: Likewise.
	<qSupported>: Add "multiprocess" feature.
	<qThreadExtraInfo>: Use thread-id syntax.
2008-09-22 16:31:01 +00:00
Pedro Alves 6ca15a4b21 * infrun.c (follow_exec): Don't do a generic mourn. Instead
inline the required bits.
	* breakpoint.h (enum inf_context): Add inf_execd.
2008-09-22 15:26:53 +00:00
Pedro Alves 795e548fb8 * infrun.c (handle_inferior_event): In the follow exec case,
context-switch before doing anything else.
2008-09-22 15:25:54 +00:00
Pedro Alves 54a012c9c7 * top.c (any_thread_of, kill_or_detach): New functions.
(quit_target): Iterate over all inferiors, killing or detaching
	accordingly.
2008-09-22 15:24:51 +00:00
Pedro Alves 181e7f9393 Remove the attach_flag global, and make it per-inferior.
* inferior.h (attach_flag): Delete.
	(inferior_process): Declare.
	* solib.c (update_solib_list): Adjust.
	* gnu-nat.c (gnu_create_inferior, gnu_attach): Adjust.
	* inf-ptrace.c (inf_ptrace_detach): Adjust.
	(inf_ptrace_files_info): Get it from the current inferior.
	* inf-ttrace.c (inf_ttrace_attach): Adjust.
	(inf_ttrace_files_info): Get it from the current
	inferior.
	* inflow.c (terminal_inferior, terminal_ours_1, set_sigint_trap)
	(clear_sigint_trap): Get it from the current process.
	* remote.c (extended_remote_attach_1)
	(extended_remote_create_inferior_1): Adjust.
	* top.c (quit_confirm, quit_target): Get it from the current inferior.
	* procfs.c (do_detach): Adjust.
	(procfs_wait): Get it from the event inferior.
	(procfs_files_info): Get it from the current inferior.
	* nto-procfs.c (procfs_files_info): Likewise.
	(procfs_attach): Adjust.  Set the attach_flag here.
	(do_attach): Don't set it here.
	(procfs_detach): Don't clear it.
	(procfs_mourn_inferior): Don't clear it.
	* solib-osf.c (osf_solib_create_inferior_hook): Adjust.
	* target.c (attach_flag): Delete.
	(generic_mourn_inferior): Don't clear it.
	* win32-nat.c (get_win32_debug_event): Get it from the event
	process.
	(do_initial_win32_stuff): Add attaching argument.  Set attach_flag
	in the inferior accordingly.
	(win32_attach): Don't set the attach_flag here.  Pass 1 to
	do_intial_win32_stuff.
	(win32_files_info): Get it from the current inferior.
	(win32_create_inferior): Dont clear attach_flag here.  Pass 0 to
	do_intial_win32_stuff.
2008-09-22 15:21:30 +00:00
Pedro Alves d6b48e9c8b Make the stop_soon global be per-inferior instead.
* infcmd.c (attach_command_post_wait): Adjust.
	(attach_command): Likewise.

	* inferior.h (stop_soon): Delete.
	(struct inferior): Add stop_soon member.

	* infrun.c (stop_soon): Delete.
	(clear_proceed_status, start_remote)
	(fetch_inferior_event, handle_inferior_event): Adjust.
	(signal_stop_state): Don't check stop_soon here.  Check in callers
	instead.
	(save_inferior_status, restore_inferior_status): Adjust.

	* linux-nat.c (linux_nat_resume, linux_nat_wait): Always pass
	signals to common code if starting up the inferior.

	* inferior.h (struct inferior_info): Added stop_soon member.
	* inferior.c (add_inferior) Clear stop_soon.

	* mips-tdep.c (heuristic_proc_start): Adjust.
	* nto-procfs.c (procfs_create_inferior): Adjust.
	* solib-irix.c (irix_solib_create_inferior_hook): Adjust.
	* solib-osf.c (osf_solib_create_inferior_hook): Adjust.
	* solib-sunos.c (sunos_solib_create_inferior_hook): Adjust.
	* solib-svr4.c (svr4_solib_create_inferior_hook): Adjust.

	* win32-nat.c (do_initial_win32_stuff): Adjust.

	* alpha-tdep.c (alpha_heuristic_proc_start): Adjust.
2008-09-22 15:20:08 +00:00
Pedro Alves 82f7388440 Implement remote multi-process extensions.
* remote.c (struct remote_state): Add extended and
	multi_process_aware fields.
	(remote_multi_process_p): New.
	(PACKET_vKill): New.
	(record_currthread): Use thread_change_ptid.  Notice new
	inferiors.
	(set_thread, remote_thread_alive): Use write_ptid.
	(write_ptid, read_ptid): New.
	(remote_current_thread, remote_threads_extra_info): Use them.
	(remote_threads_info): Likewise.  Detect new inferiors.
	(remote_start_remote): Add inferior to inferior list.
	(remote_multi_process_feature): New.
	(remote_protocol_features): Add "multiprocess" feature.
	(remote_query_supported): Pass "multiprocess+" as supported
	features.
	(remote_open_1): Clear multi_process_aware.  Set extended
	accordingly.
	(remote_detach_1): Detach current process.  Use extended packet
	format for extended-remote multi-process.  Detach process from the
	inferior list.  Only mourn after printing output.
	(extended_remote_attach_1): Add process to the inferior list.
	(remote_vcont_resume): Use write_ptid to pass the thread ids.
	(remote_wait): Use read_ptid.  Implement the extended
	multi-process extension format of the 'W' and 'X' reply packets.
	Remove exited inferiors from inferior list.
	(remote_xfer_memory): Set general thread.
	(remote_vkill): New.
	(extended_remote_kill): New.
	(remote_mourn_1): Discard all inferiors.
	(select_new_thread_callback): New.
	(extended_remote_mourn_1): If there are more processes to debug,
	switch to a thread in another process, and don't pop the target.
	(extended_remote_create_inferior_1): Add the new process to the
	inferior list.
	(remote_stopped_by_watchpoint): Indenting.
	(remote_xfer_partial): Set the general thread.
	(remote_pid_to_str): If the remote is multi-process aware, print
	the process id as well as the thread id.
	(remote_get_thread_local_address): Use write_ptid.
	(init_extended_remote_ops): Register extended_remote_kill.
	(_initialize_remote): Register new packets.  Change
	magic_null_ptid's, not_sent_ptid's and any_thread_ptid's pid
	member to 42000.

	* thread.c (thread_change_ptid): Also account for the inferior pid
	changing.

	* inferior.h (discard_all_inferiors): Declare.
	* inferior.c (discard_all_inferiors): New.
2008-09-22 15:18:30 +00:00
Pedro Alves 7f9f62ba18 * gnu-nat.c (gnu_attach): Add process to inferiors table.
(gnu_detach): Remove it.
	* go32-nat.c (go32_create_inferior): Add process to gdb's inferior
	table.
	* inf-ptrace.c (inf_ptrace_follow_fork): Delete and add inferiors
	to inferior table accordingly.
	(inf_ptrace_attach): Add new process to inferior table.
	(inf_ptrace_detach): Remove it.
	* inf-ttrace.c (inf_ttrace_follow_fork): Delete and add inferiors
	to inferior table accordingly.
	(inf_ttrace_attach): Add process to inferior table.
	(inf_ttrace_detach): Remove it.
	* linux-fork.c (init_fork_list): Delete any left over inferior.
	(linux_fork_mourn_inferior, detach_fork_command): Also delete
	processes from inferior list.
	* monitor.c (monitor_open): Add process to inferior list.
	(monitor_close): Remove it.
	* nto-procfs.c (procfs_attach): Add process to inferior list.
	Find threads after pushing the target.
	(procfs_detach): Remove process from inferior list.
	(procfs_create_inferior): Add process to inferior list.
	* procfs.c (procfs_detach): Remove process from inferior list.
	(do_attach): Add process to inferior list.
	* remote-sim.c (sim_create_inferior): Add process to inferior list.
	(gdbsim_close): Remove it.
	* target.c (generic_mourn_inferior): If inferior_ptid is not
	null_ptid, remove the corresponding inferior from inferior list.
	* win32-nat.c (do_initial_win32_stuff): Add process to inferior list.
	(win32_detach): Remove it.
	* linux-nat.c (linux_child_follow_fork): Delete and add inferiors
	to inferior list accordingly.
	* fork-child.c (fork_inferior): Add process to inferior list.
	* corelow.c (CORELOW_PID): Define.
	(core_close): Remove core from inferior list.
	(core_open): Add it.
2008-09-22 15:16:51 +00:00
Pedro Alves b77209e000 gdb/
* inferior.h: Forward declare struct ui_out.
	Forward declare struct private_inferior.
	(struct inferior): New.
	(init_inferior_list, add_inferior, add_inferior_silent)
	(delete_inferior, delete_inferior_silent, detach_inferior)
	(gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
	(valid_inferior_id, find_inferior_pid): New functions.
	(inferior_callback_func): New typedef.
	(iterate_over_inferiors, print_inferior, have_inferiors)
	(current_inferior): New functions.
	* inferior.c: New file.

	* Makefile.in (SFILES): Add inferior.c.
	(COMMON_OBS): Add inferior.o.

gdb/doc/
	* gdb.texinfo (Inferiors): New section.
2008-09-22 15:12:19 +00:00
Jonathan Larmour d8c3d48d73 * arm-tdep.c (arm_skip_prologue): Call skip_prologue_using_sal
instead of determining symbol and line info directly.
	* MAINTAINERS: Update my email address.
2008-09-22 15:03:06 +00:00
Jonathan Larmour a89fea3ce2 * arm-tdep.c (arm_skip_prologue): Call skip_prologue_using_sal
instead of determining symbol and line info directly.
2008-09-22 15:02:54 +00:00
Jonathan Larmour 8c034f278c Update my email address. 2008-09-22 15:02:04 +00:00
Daniel Jacobowitz d54be744b7 * symtab.c (skip_prologue_using_sal): Treat two consecutive lines
at the same address as a prologue marker.  Do not skip an entire
	function.
2008-09-22 14:56:17 +00:00
Andrew Stubbs 26fae1d6e3 2008-09-22 Andrew Stubbs <ams@codesourcery.com>
* frame.c (get_frame_register_bytes): Comment improvments.
2008-09-22 13:36:29 +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
gdbadmin 29d1e62037 *** empty log message *** 2008-09-22 00:00:33 +00:00
gdbadmin edffdb50a1 *** empty log message *** 2008-09-21 00:00:32 +00:00
gdbadmin 623336c2c6 *** empty log message *** 2008-09-20 00:00:02 +00:00
Andrew Stubbs 14fc49fb15 2008-09-19 Andrew Stubbs <ams@codesourcery.com>
* MAINTAINERS: Update my email address.
2008-09-19 18:33:10 +00:00
Andrew Stubbs 3f27f2a479 2008-09-19 Andrew Stubbs <ams@codesourcery.com>
* frame.c (get_frame_register_bytes): Detect bad debug info.
2008-09-19 18:12:17 +00:00
gdbadmin de3f5d30e4 *** empty log message *** 2008-09-19 00:00:03 +00:00
gdbadmin 2dd2b8ce2d *** empty log message *** 2008-09-18 00:00:02 +00:00
Jan Kratochvil 88ed393a46 Fix a crash on uninitialized ECS->EVENT_THREAD for a newly found thread.
* infrun.c (wait_for_inferior): Move this ECS->EVENT_THREAD
	initialization ...
	(fetch_inferior_event): ... and this ECS->EVENT_THREAD initialization
	...
	(handle_inferior_event): ... here after the add_thread call together
	with the local adjust_pc_after_break and reinit_frame_cache calls.
2008-09-17 21:48:49 +00:00
gdbadmin 2613387ed2 *** empty log message *** 2008-09-17 00:00:03 +00:00
David Daney d832cb68fb * breakpoint.c (bpstat_stop_status): Clear breakpoint_at for
all hardware bpstats.
2008-09-16 18:55:01 +00:00
Joel Brobecker b1e40a6f91 * gstdint.h: Delete. 2008-09-16 18:21:33 +00:00
gdbadmin b7f9e084d2 *** empty log message *** 2008-09-16 00:00:36 +00:00
Mark Kettenis 50a834af8a * infcall.c (generic_push_dummy_code): Remove.
(push_dummy_code): Unconditionally call gdbarch_push_dummy_code.
2008-09-15 20:14:04 +00:00
Doug Evans 9d25dd43e8 * dwarf2read.c (struct abbrev_info): Make members name, form 16 bits.
(struct attribute): Ditto.
2008-09-15 15:32:01 +00:00
Dave Anglin 326e541f5e * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Record
HPPA_IPSW_REGNUM and HPPA_SAR_REGNUM values.
2008-09-15 02:19:47 +00:00
Dave Anglin 85c83e9940 * hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum): Remove surrounding
"#if 0" "#endif".  Fix mapping of DWARF DBX registers to GDB registers.
	Correct arguments and improve comments.
	(hppa_linux_init_abi): Call set_gdbarch_dwarf2_reg_to_regnum.  Delete
	disabled code.
	* hppa-tdep.c (hppa64_dwarf_reg_to_regnum): Fix check for floating
	point DBX register, change error to warning, and improve comments.
2008-09-15 01:56:31 +00:00
Doug Evans 76815b175e * dwarf2read.c (struct die_info): Make members tag, num_attrs 16 bits. 2008-09-15 01:22:02 +00:00
gdbadmin 8ee9f668e8 *** empty log message *** 2008-09-15 00:00:33 +00:00
Dave Anglin 51e753cf3a * hppa-linux-tdep.c (hppa_linux_supply_fpregset): Correct iteration. 2008-09-14 14:08:42 +00:00
Joel Brobecker 06e476f547 * defs.h (GCC_GENERATED_STDINT_H): Define. 2008-09-14 06:37:18 +00:00
gdbadmin 353ee11d75 *** empty log message *** 2008-09-14 00:00:32 +00:00
Tom Tromey 6c761d9c9c * varobj.c (varobj_set_display_format): Use xfree.
* tracepoint.c (stringify_collection_list): Use xfree.
	* remote-fileio.c (remote_fileio_reset): Use xfree.
	* mipsread.c (read_alphacoff_dynamic_symtab): Use xfree.
	* dfp.c (decimal_from_floating): Use xfree, xstrprintf.  Don't use
	asprintf.
	* cp-support.c (mangled_name_to_comp): Use xfree.
2008-09-13 23:37:05 +00:00
Joel Brobecker 339c13b662 * ada-lang.c (remove_extra_symbols): Remove stub symbols if
the associated complete symbol is also in the list.
        (ada_add_local_symbols, ada_add_non_local_symbols): New functions,
        extracted out from ada_lookup_symbol_list.
        (ada_lookup_symbol_list): Use them.  Remove the search through
        the minimal symbols.
2008-09-13 22:27:00 +00:00
Joel Brobecker bc30ff585c * dwarf2read.c (add_partial_subprogram): New procedure.
(scan_partial_symbols): Use it.
        (load_partial_dies): Read in children of subprogram and lexical
        blocks for Ada compilation units.
2008-09-13 22:19:51 +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
Tom Tromey bb01da776d * symfile.c (build_id_verify): Free 'found'.
(find_separate_debug_file): Use xfree, not free.
2008-09-13 17:28:56 +00:00
gdbadmin 126db58b14 *** empty log message *** 2008-09-13 00:00:33 +00:00
Doug Evans 00630ca836 * corefile.c (write_memory): Remove unnecessary copying. 2008-09-12 20:40:57 +00:00
Doug Evans 5d6fa95086 * sol-thread.c (_initialize_sol_thread): Add FIXME regarding
order of _initialize_* fns.
2008-09-12 20:10:57 +00:00
Doug Evans d00adf3917 * dwarf2read.c (comp_unit_head): Rename first_die_ptr to
first_die_offset.  All uses updated.
	Delete unused members cu_head_ptr, next.
	Move members base_known, base_address to ...
	(dwarf2_cu) ... here.  All uses updated.
2008-09-12 20:06:25 +00:00
Pedro Alves 3d0bb823b0 gdb/
* Makefile.in (generated_files): Add $(NAT_GENERATED_FILES).
	* config/i386/i386gnu.mh (NAT_GENERATED_FILES): New.

gdb/doc/
	* gdbint.texinfo (Native Debugging): Mention NAT_GENERATED_FILES.
2008-09-12 10:39:03 +00:00
gdbadmin 2d398244fb *** empty log message *** 2008-09-12 00:00:02 +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
Ulrich Weigand 3c35e65b00 * fork-child.c (startup_inferior): Use target_wait and target_resume
directly instead of calling wait_for_inferior / resume.

	* infcmd.c (kill_if_already_running): Do not call no_shared_libraries
	or init_wait_for_inferior.
	(run_command_1): Call init_wait_for_inferior.
2008-09-11 16:09:33 +00:00
Ulrich Weigand 180b9a0ebe Add missing ChangeLog entry. 2008-09-11 14:34:38 +00:00
Ulrich Weigand 4cca3ac9ed * gdbtypes.h (builtin_type_void_data_ptr, builtin_type_void_func_ptr,
builtin_type_CORE_ADDR, builtin_type_char, builtin_type_short,
	builtin_type_int, builtin_type_long, builtin_type_signed_char,
	builtin_type_unsigned_char, builtin_type_unsigned_short,
	builtin_type_unsigned_int, builtin_type_unsigned_long,
	builtin_type_float, builtin_type_double, builtin_type_long_double,
	builtin_type_complex, builtin_type_double_complex, builtin_type_string,
	builtin_type_bool, builtin_type_long_long,
	builtin_type_unsigned_long_long): Remove macros.

	(builtin_type_f_character, builtin_type_f_integer,
	builtin_type_f_integer_s2, builtin_type_f_logical,
	builtin_type_f_logical_s1, builtin_type_f_logical_s2,
	builtin_type_f_real, builtin_type_f_real_s8, builtin_type_f_real_s16,
	builtin_type_f_complex_s8, builtin_type_f_complex_s16,
	builtin_type_f_complex_s32): Likewise.

	(builtin_type_m2_char, builtin_type_m2_int, builtin_type_m2_card,
	builtin_type_m2_real, builtin_type_m2_bool): Likewise.

	(struct builtin_f_type, builtin_f_type): Move to f-lang.h.
	(struct builtin_m2_type, builtin_m2_type): Move to m2-lang.h.

	* f-lang.h (struct builtin_f_type, builtin_f_type): Move here.
	* m2-lang.h (struct builtin_m2_type, builtin_m2_type): Move here.
2008-09-11 14:31:43 +00:00
Ulrich Weigand b6da22b0d1 * solib-svr4.c (LM_ADDR_FROM_LINK_MAP): Use builtin types of
target_gdbarch instead of builtin_type_void_data_ptr.
	(LM_DYNAMIC_FROM_LINK_MAP, LM_NEXT, LM_NAME,
	IGNORE_FIRST_LINK_MAP_ENTRY, scan_dyntag, elf_locate_base,
	solib_svr4_r_map, solib_svr4_r_brk, solib_svr4_r_ldsomap,
	open_symbol_file_object): Likewise.
	* nto-tdep.c (LM_ADDR): Likewise.
2008-09-11 14:31:00 +00:00
Ulrich Weigand ff7da46876 * bsd-uthread.c (bsd_uthread_read_memory_address): New function.
(bsd_uthread_fetch_registers, bsd_uthread_store_registers,
	bsd_uthread_wait, bsd_uthread_find_new_threads): Use it.
2008-09-11 14:30:24 +00:00
Ulrich Weigand 4e906f53ab * procfs.c (procfs_address_to_host_pointer): Use target_gdbarch
and its associated types to perform pointer conversion.
	(procfs_can_use_hw_breakpoint): Likewise.
	(procfs_auxv_parse): Remove unused variable.
2008-09-11 14:29:53 +00:00
Ulrich Weigand ffe5a37e17 * auxv.c (default_auxv_parse): Use gdbarch_ptr_bit (target_gdbarch)
instead of builtin_type_void_data_ptr.
	* target.c (default_region_ok_for_hw_watchpoint): Likewise.
2008-09-11 14:29:21 +00:00
Ulrich Weigand b806fb9a9b * expprint.c (print_subexp_standard): Compare against builtin type
associated with exp->gdbarch instead of builtin_type_char.

	* f-valprint.c (f_val_print): Use extract_unsigned_integer to
	extract values of arbitrary logical type.  Handle arbitrary
	complex types.

	* printcmd.c (float_type_from_length): New function.
	(print_scalar_formatted, printf_command): Use it.
2008-09-11 14:28:47 +00:00
Ulrich Weigand 3e3b026fee * valops.c: Include "objfiles.h" and "symtab.h".
(find_function_in_inferior): New argument OBJF_P.  Use it to return
	objfile where function is defined.  Use per-objfile arch types
	instead of builtin_type_ to define default return type.

	* linux-fork.c (checkpoint_command): Update calls.  Use per-objfile
	architecture to define inferior call argument types.
	* gcore.c (derive_heap_segment): Likewise.
	* objc-lang.c (value_nsstring): Likewise.
	* scm-lang.c (scm_lookup_name): Likewise.
	* scm-valprint.c (scm_inferior_print): Likewise.
	* valops.c (value_allocate_space_in_inferior): Likewise.

	* eval.c (evaluate_subexp_standard): Update calls.
	* objc-lang.c (lookup_objc_class, print_object_command): Likewise.

	* linux-fork.c: Include "objfiles.h".
	* scm-lang.c: Include "objfiles.h".
	* scm-valprint.c: Include "objfiles.h".
2008-09-11 14:27:34 +00:00
Ulrich Weigand f8dcfc0aff ChangeLog:
* gdbarch.sh (name_of_malloc): Remove.
	* gdbarch.c, gdbarch.h: Re-generate.
	* valops.c (value_allocate_space_in_inferior): Do not call
	gdbarch_name_of_malloc.

doc/ChangeLog:

	* gdbint.texinfo (Target Conditionals): Remove documentation
	for gdbarch_name_of_malloc.
2008-09-11 14:27:00 +00:00
Ulrich Weigand c56324e001 * valarith.c (value_x_unop): Use builtin_type_int8 as type for
UNOP_POSTINCREMENT/UNOP_POSTDECREMENT constant 0 argument.
	(value_bit_index): Use extract_unsigned_integer
	instead of unpack_long to read single byte.
2008-09-11 14:25:49 +00:00
Ulrich Weigand 7788af6d30 * infcall.c (value_arg_coerce): Add GDBARCH parameter. Use its
associates types instead of builtin_type_ macros.
	(find_function_addr): Leave output VALUE_TYPE NULL if unknown.
	(call_function_by_hand): Use per-architecture "int" type as
	fall-back if find_function_addr returns NULL VALUE_TYPE.
	Update call to value_arg_coerce.
2008-09-11 14:25:04 +00:00
Ulrich Weigand ad4820ab42 * cp-abi.h (cplus_method_ptr_size): Add TO_TYPE parameter.
(cplus_make_method_ptr): Add TYPE parameter.
	* cp-abi.c (cplus_method_ptr_size): Add TO_TYPE parameter.  Pass it
	on to current_cp_abi.method_ptr_size callback.
	(cplus_make_method_ptr): Add TYPE parameter.  Pass it on to
	current_cp_abi.make_method_ptr callback.

	* gdbtypes.c (lookup_methodptr_type): Pass target type
	argument to cplus_method_ptr_size.
	* valops.c (value_cast): Pass type argument to cplus_make_method_ptr.
	(value_struct_elt_for_reference): Likewise.

	* gnu-v3-abi.c (get_class_arch): New function.
	(vtable_address_point_offset): Add GDBARCH parameter.  Use it
	instead of current_gdbarch.  Update all callers.
	(gnuv3_get_vtable): Likewise.
	(gnuv3_get_virtual_fn): Likewise.
	(gnuv3_decode_method_ptr): Likewise.
	(gnuv3_rtti_type): Call get_class_arch to determine architecture.
	Use it instead of current_gdbarch.
	(gnuv3_virtual_fn_field): Likewise.
	(gnuv3_baseclass_offset): Likewise.
	(gnuv3_print_method_ptr): Likewise.
	(gnuv3_method_ptr_to_value): Likewise.
	(gnuv3_method_ptr_size): Add TYPE parameter.  Use it to determine
	class architecture.  Use architecture types instead of builtin types.
	(gnuv3_make_method_ptr): Likewise.

	* cp-valprint.c (cp_print_class_member): Expect pointer type
	instead of class type.  Use its length when extracting value.
	* c-valprint.c (c_val_print): Update call to cp_print_class_member.
2008-09-11 14:24:28 +00:00
Ulrich Weigand 5ed92fa89a * stack.c (return_command): Use frame architecture to determine
default integer return type.

	* f-valprint.c (f77_get_dynamic_lowerbound): Use frame architecture
	to determine pointer types.
	(f77_get_dynamic_upperbound): Likewise.

	* objc-lang.c (OBJC_FETCH_POINTER_ARGUMENT): Remove.
	(resolve_msgsend): Use architecture of current frame to determine
	pointer types.  Inline OBJC_FETCH_POINTER_ARGUMENT.
	(resolve_msgsend_stret, resolve_msgsend_super,
	resolve_msgsend_super_stret): Likewise.
2008-09-11 14:23:51 +00:00
Ulrich Weigand 0dfff4cba7 * alpha-tdep.c (alpha_register_type): Use builtin_type (gdbarch)
instead of builtin_type_ macros.
	* amd64-tdep.c (amd64_register_type): Likewise.
	(amd64_get_longjmp_target): Likewise.
	* arm-tdep.c (arm_register_type): Likewise.
	* avr-tdep.c (avr_register_type): Likewise.
	* cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
	* frv-tdep.c (frv_register_type): Likewise.
	* h8300-tdep.c (h8300_register_type): Likewise.
	* hppa-tdep.c (hppa32_convert_from_func_ptr_addr,
	hppa_skip_trampoline_code): Likewise.
	* i386-tdep.c (i386_register_type): Likewise.
	(i386_unwind_pc, i386_sse_type): Likewise.
	* ia64-tdep.c (ia64_register_type): Likewise.
	* m32r-tdep.c (m32r_register_type): Likewise.
	* m68k-tdep.c (m68k_register_type, m68k_unwind_pc): Likewise.
	* m88k-tdep.c (m88k_register_type): Likewise.
	* mep-tdep.c (mep_register_type): Likewise.
	* mips-tdep.c (mips_pseudo_register_type): Likewise.
	* mn10300-tdep.c (mn10300_register_type): Likewise.
	* mt-tdep.c (mt_copro_register_type): Likewise.
	* rs6000-tdep.c (rs6000_builtin_type_vec64): Likewise.
	(rs6000_convert_register_p, rs6000_register_to_value,
	rs6000_value_to_register): Likewise.
	* s390-tdep.c (s390_register_type): Likewise.
	* sh64-tdep.c (sh64_register_type): Likewise.
	(sh64_build_float_register_type, sh64_do_fp_register): Likewise.
	* sh-tdep.c (sh_sh2a_register_type, sh_sh3e_register_type,
	sh_sh4_build_float_register_type, sh_sh4_register_type,
	sh_default_register_type): Likewise.
	* sparc64-tdep.c (sparc64_register_type): Likewise.
	* sparc-tdep.c (sparc32_register_type): Likewise.
	* spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
	* v850-tdep.c (v850_register_type): Likewise.
	* vax-tdep.c (vax_register_type): Likewise.
	* xtensa-tdep.c (xtensa_register_type, xtensa_unwind_pc,
	xtensa_push_dummy_call): Likewise.

	* std-regs.c (value_of_builtin_frame_fp_reg,
	value_of_builtin_frame_pc_reg): Likewise.
	* target-descriptions.c (tdesc_register_type): Likewise.
2008-09-11 14:23:15 +00:00
Ulrich Weigand 6d84d3d833 * ada-lang.c (ada_coerce_to_simple_array_type): Use builtin_type_int32
instead of builtin_type_int as default unspecified integral type.
	(ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
	assign_component, to_fixed_range_type): Likewise.
	* ada-typeprint.c (print_range, print_range_bound,
	print_range_type_named): Likewise.
	* ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
	* eval.c (evaluate_subexp_standard): Likewise.
	* gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
	* gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
	build_gdb_vtable_type): Likewise.
	* jv-lang.c (java_array_type): Likewise.
	* m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
	* m2-valprint.c (m2_print_long_set): Likewise.
	* parse.c (follow_types): Likewise.
	* p-typeprint.c (pascal_type_print_base): Likewise.
	* valops.c (value_one, value_array, value_string,
	value_bitstring): Likewise.
	* value.c (allocate_repeat_value, value_from_string): Likewise.
	* varobj.c (c_describe_child): Likewise.
	* mt-tdep.c (mt_register_type): Likewise.
	* sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
	* sh64-tdep.c (sh64_build_float_register_type): Likewise.
2008-09-11 14:22:33 +00:00
Ulrich Weigand 8b9b9e1a3a * defs.h (struct gdbarch): Add forward declaration.
(set_next_address): Add GDBARCH argument.
	* printcmd.c (set_next_address): Use it to find pointer type.
	* breakpoint.c (breakpoint_1): Update call.
	* source.c (line_info): Likewise.
	* findcmd.c (find_command): Use current_gdbarch to find pointer type.

	* breakpoint.c (set_breakpoint_count): Use platform-neutral
	types for internal variable values.
	* infrun.c (handle_inferior_event): Likewise.
	* source.c (forward_search_command, reverse_search_command): Likewise.
	* tracepoint.c (set_tracepoint_count, set_traceframe_num,
	set_tracepoint_num, set_traceframe_context): Likewise.
2008-09-11 14:21:49 +00:00
Ulrich Weigand b769d911fd * gdbtypes.h (struct builtin_type): Remove builtin_true_char
and builtin_true_unsigned_char.
	(builtin_type_true_char): Remove macro, add extern declaration.
	(builtin_type_true_unsigned_char): Add extern declaration.
	* gdbtypes.c (builtin_type_true_char): New global variable.
	(builtin_type_true_unsigned_char): Likewise.
	(_initialize_gdbtypes): Initialize them.
	(gdbtypes_post_init): Do not initialize builtin_true_char
	and builtin_true_unsigned_char members of struct builtin_type.

	* printcmd.c (print_scalar_formatted): Do not use builtin_type;
	use builtin_type_true_unsigned_char instead.

	* ada-valprint.c (ada_val_print_1): Use builtin_type_true_char
	instead of builtin_type_char for internal string.
2008-09-11 14:21:21 +00:00
Ulrich Weigand fde6c81990 * gdbtypes.h (builtin_type_void): Remove macro, add declaration.
(builtin_type_f_void): Remove macro.
	* gdbtypes.c (builtin_type_void): New global variable.
	(_initialize_gdbtypes): Initialize it.

	* gnu-v3-abi.c (build_gdb_vtable_type): Do not call
	lookup_pointer_type or lookup_function_type on builtin_type_void.
	* printcmd.c (set_next_address): Likewise.
	* objc-lang.c (value_nsstring): Likewise.
	* mt-tdep.c (mt_copro_register_type): Likewise.
	* xtensa-tdep.c (xtensa_register_type): Likewise.

	* symfile.c (syms_from_objfile): Remove special handling
	of builtin_type_void and builtin_type_char.
2008-09-11 14:20:50 +00:00
Ulrich Weigand d4dbb9c7d4 * eval.c (evaluate_subexp_standard): Use exp->gdbarch types instead
of builtin_type_ macros when handling OP_OBJC_ operations.
	* objc-lang.c (print_object_command): Likewise.
2008-09-11 14:20:15 +00:00
Ulrich Weigand 8ca1c40ee1 * ada-valprint.c: Include "objfiles.h".
(ada_val_print_1): Use the gdbarch associated with the objfile whether
	a System.Address type is defined to retrieve the proper pointer type
	to use to print it.
2008-09-11 14:19:44 +00:00
Ulrich Weigand 3cb382c9d3 * ada-lang.c (value_pos_atr): Add TYPE argument. Use it as
result type instead of builtin_type_int.
	(value_subscript_packed): Use pos_atr instead of value_pos_atr.
	(ada_value_subscript): Update call to value_pos_atr.
	(ada_value_ptr_subscript): Likewise.
	(ada_evaluate_subexp): Likewise.
2008-09-11 14:19:09 +00:00
Ulrich Weigand a53b7a21e5 * ada-lang.c (cast_to_fixed): Do not cast to builtin_type_double.
(cast_from_fixed_to_double): Rename to ...
	(cast_from_fixed): ... this.  Add TYPE parameter.  Use it instead
	of builtin_type_double.
	(ada_value_cast): Use cast_from_fixed instead of casting result
	of cast_from_fixed_to_double.
	(ada_evaluate_subexp): Update calls to cast_from_fixed_to_double.
2008-09-11 14:18:34 +00:00
Ulrich Weigand 22fe0fbb30 * valops.c (value_ind): No longer allow dereferencing an
integer type.
	* eval.c (evaluate_subexp_standard): Handle deferencing an
	integer type here.
	* ada-lang.c (ada_evaluate_subexp): Likewise.
2008-09-11 14:17:58 +00:00
Ulrich Weigand d8631d213f * ada-valprint.c (ada_val_print_1): When implicitly dereferencing
a reference type, pass the reference type directly to unpack_pointer.
	* c-valprint.c (c_val_print): Likewise.
	* f-valprint.c (f_val_print): Likewise.
	* m2-valprint.c (print_variable_at_address, m2_val_print): Likewise.
	* p-valprint.c (pascal_val_print): Likewise.
2008-09-11 14:17:24 +00:00
Ulrich Weigand cb18ec4997 * eval.c (evaluate_subexp_standard): Use builtin_type_int8
to construct the EVAL_SKIP dummy return value.
	* ada-lang.c (ada_evaluate_subexp): Likewise.
	* jv-lang.c (evaluate_subexp_java): Likewise.
	* m2-lang.c (evaluate_subexp_modula2): Likewise.
	* scm-lang.c (evaluate_exp): Likewise.
2008-09-11 14:16:51 +00:00
Ulrich Weigand 0ab7ba45fa * value.h (coerce_enum, coerce_number): Remove prototypes.
* value.c (coerce_enum, coerce_number): Remove.
	* valarith.c (value_x_binop): Do not call coerce_enum.
	(value_x_unop): Likewise.
	(value_logical_not): Call coerce_array instead of coerce_number.
2008-09-11 14:16:14 +00:00
Ulrich Weigand f7c79c4197 * ax-gdb.c: Include "language.h".
(gen_frame_args_address): Add GDBARCH parameter; use it
	instead of current_gdbarch.
	(gen_frame_locals_address): Likewise.
	(gen_var_ref): Add GDBARCH parameter.  Update calls to
	gen_frame_args_address and gen_frame_locals_address.  Use
	pointer type from gdbarch.
	(gen_usual_unary): Add EXP parameter.  Use integer type
	from exp->gdbarch.
	(gen_usual_arithmetic): Likewise.
	(gen_integral_promotions): Likewise.
	(gen_add, gen_sub): Remove.
	(gen_ptradd, gen_ptrsub, gen_ptrdiff): New functions.
	(gen_logical_not): Use passed-in boolean result type
	instead of builtin_type_int.
	(gen_complement): Do not call gen_usual_unary or
	gen_integral_promotions.
	(gen_struct_ref): Call require_rvalue instead of gen_usual_unary.
	(gen_repeat): Add EXP parameter.  Update call to gen_expr.
	Use builtin_type_int32 as internal range type.
	(gen_sizeof): Add EXP and SIZE_TYPE parameters.  Use SIZE_TYPE
	as result type.  Update call to gen_expr.
	(gen_expr): Add EXP parameter.  Update calls to gen_expr,
	gen_repeat, gen_var_ref, gen_usual_unary, gen_usual_arithmetic,
	and gen_integral_promotions.  Call gen_ptradd, gen_ptrsub,
	gen_ptrdiff, or gen_binop instead of gen_add or gen_sub.
	Use exp->gdbarch instead of current_gdbarch.
	Call language_bool_type to determine result type of UNOP_LOGICAL_NOT.
2008-09-11 14:15:39 +00:00
Ulrich Weigand f44316fa94 * eval.c (evaluate_subexp_standard): Add calls to binop_promote
and unop_promote before calling value_binop et. al.
	* ada-lang.c (ada_evaluate_subexp): Add calls to binop_promote
	and unop_promote before calling value_binop et. al.

	* valarith.c (value_binop): Do not call binop_promote or unop_promote.
	(value_pos): Do not call unop_promote.
	(value_neg, value_complement): Likewise.
2008-09-11 14:15:01 +00:00
Ulrich Weigand 4066e64672 * value.h (unop_promote, binop_promote): Add prototypes.
* eval.c (unop_promote, binop_promote): New functions.
	* valarith.c (unop_result_type, binop_result_type): Remove.
	(value_binop): Call binop_promote or unop_promote.
	Inline remaining parts of binop_result_type.  Remove special
	code to truncate integer values for unsigned operations.
	(value_pos): Call unop_promote.  Inline remaining parts of
	unop_result_type.
	(value_neg, value_complement): Likewise.
2008-09-11 14:14:20 +00:00