Commit Graph

26770 Commits

Author SHA1 Message Date
Jan Kratochvil 3cd07d204b gdb/
* auxv.c (ld_so_xfer_auxv): Do not error on failed read of data_address.
2010-07-05 17:58:56 +00:00
Jan Kratochvil 0a1e94c73e gdb/
Fix attaching to PIEs prelinked on the disk after the process was
	started.
	* solib-svr4.c (svr4_exec_displacement): New variable arch_size.
	Verify it against bfd_get_arch_size.  Try to match arbitrary
	displacement for the phdrs comparison.

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

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

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

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

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

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

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

This patch fixes this problem the same way.

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

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

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

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

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

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

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

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

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

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

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

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

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

        * NEWS: Add entry announcing the python directory.

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

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

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

Changelog

    * gdb/defs.h (make_command_stats_cleanup): Declare.
    (set_display_time): Declare.
    (set_display_space): Declare.
    * gdb/event-top.c (command_handler): Use make_command_stats_cleanup.
    * gdb/main.c (display_time, display_space): Move definitions to utils.c.
    (captured_main): Use make_command_stats_cleanup to get start-up
    statistics.
    Use set_display_time and set_display_space for processing OPT_STATISTICS
    case.
    * gdb/maint.c (maintenance_time_display): Use set_display_time.
    (maintenance_space_display): Use set_display_space.
    * gdb/top.c (execute_command): Remove obsolete 'maint time' code.
    (command_loop): Use make_command_stats_cleanup.
    * gdb/utils.c (struct cmd_stats): Structure for storing initial time
    and space usage.
    (display_time, display_space): Move definitions here from utils.c.
    (set_display_time): New function.
    (set_display_space): New function.
    (make_command_stats_cleanup): New function.
    (report_command_stats): New auxiliary function for
    make_command_stats_cleanup.
    * gdb/testsuite/gdb.gdb/selftest.exp: Adjust expected message for
    capturing start-up runtime.
2010-06-26 06:44:47 +00:00