Commit Graph

27233 Commits

Author SHA1 Message Date
Joel Brobecker fa1bd1e4fb Add support for x86 LynxOS
This patch adds support for x86 LynxOS (tested on LynxOS 5.0).

gdb/gdbserver/ChangeLog:

        * lynx-i386-low.c: New file.
        * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2010-09-13 19:11:03 +00:00
Joel Brobecker 5ec6ebf9c9 [NEWS] Announce support for PowerPC LynxOS 5.x.
This adjusts the news entry about ppc-lynxos to add version 5.x
of the OS to the list of supported versions...

gdb/ChangeLog:

        * NEWS: Announce GDBserver support for version 5.x of ppc-lynxos.
2010-09-13 19:10:51 +00:00
Joel Brobecker 47fac8f84d [LynxOS] Remove handling of PTRACE_* values removed in Lynx5.
Some of the PTRACE_ macros/values were removed in LynxOS 5.x.
Since we have not use them so far, the chances that we will use them
one day are very small.  So I decided to delete them.

gdb/gdbserver/ChangeLog:

        * lynx-low.c (ptrace_request_to_str): Remove handling for
        request values that have been removed in LynxOS 5.x.
2010-09-13 19:10:30 +00:00
Joel Brobecker 1adfc54d0c [LynxOS] Include sys/ptrace.h instead of ptrace.h.
This is one of the changes needed in order to build gdbserver on
LynxOS 5.x.

Really interesting: On LynxOS 4.x, there is a #warning when sys/ptrace.h
is used (explaining that ptrace.h will be used instead), whereas this
file was removed from LynxOS 5.x. The contents of sys/ptrace.h on 4.x
(or at least the meat of it):

    #if defined(__GNUC__) || defined(__GNUG__)
    #if !defined(__NO_INCLUDE_WARN__)
    #warning Using <ptrace.h> instead of <sys/ptrace.h>
    #endif /* defined(__NO_INCLUDE_WARN__) */
    #endif /* defined(__GNUC__) || defined(__GNUG__) */

    #include <ptrace.h>

The fix I went for, for now, is to just include <sys/ptrace.h>
unconditionally.  I could have done some configury, but we already
have to build with -D__NO_INCLUDE_WARN__ to avoid the warnings
anyway, and that's unvoidable, due to system includes themselves
including the "wrong" header file.

Since <sys/ptrace.h> seems to be the choice that was made for LynxOS,
and since it works to include it on LynxOS 4.x, I think that's the simplest
solution.

gdb/gdbserver/ChangeLog:

        * lynx-low.c, lynx-ppc-low.c: Include <sys/ptrace.h> instead of
        <ptrace.h>
2010-09-13 19:10:19 +00:00
Tom Tromey 7d288aaabf * gdb.texinfo (GDB/MI Stack Manipulation) <-stack-list-frames>:
Document "fullname" and "from".
2010-09-13 18:27:04 +00:00
Tom Tromey 1863c96c05 * Makefile.in (HFILES_NO_SRCDIR): Add progspace.h. 2010-09-13 17:59:59 +00:00
H.J. Lu 0c5acf93f1 Set 256bit vector type name to builtin_type_vec256i.
2010-09-13  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-tdep.c (i386_ymm_type): Set type name to
	builtin_type_vec256i.
2010-09-13 17:39:48 +00:00
gdbadmin 2d646f5b6f *** empty log message *** 2010-09-13 00:00:33 +00:00
Michael Snyder 1c6272a6b3 2010-09-12 Michael Snyder <msnyder@vmware.com>
* i386-tdep.c (i386_gdbarch_init): Fix typo in comments.
2010-09-12 21:49:40 +00:00
H.J. Lu e866c49707 Fix typo in comments.
2010-09-12  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-tdep.c (i386_gdbarch_init): Fix typo in comments.
2010-09-12 18:33:17 +00:00
gdbadmin a8e9f26c52 *** empty log message *** 2010-09-12 00:00:33 +00:00
H.J. Lu 9191d39074 Remove amd64_register_name.
2010-09-11  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-tdep.c (amd64_register_name): Removed.
	(amd64_init_abi): Don't call set_gdbarch_register_name.

	* i386-tdep.c (i386_ymmh_regnum_p): Make it static.

	* i386-tdep.h (i386_ymmh_regnum_p): Removed.
2010-09-11 19:09:35 +00:00
Jan Kratochvil 8d4d924b76 gdb/
Redirect also uiout and stdtarg{,err} in execute_command_to_string.
	* cli-logging.c (struct saved_output_files) <targerr>: New.
	(set_logging_redirect, pop_output_files, handle_redirections):
	Redirect also gdb_stdtargerr.
	* defs.h (struct ui_out, make_cleanup_ui_out_redirect_pop): New
	declarations.
	* event-top.c (gdb_setup_readline, gdb_disable_readline): Redirect
	also gdb_stdtargerr.
	* top.c (execute_command_to_string): Move make_cleanup_ui_file_delete
	to the top.  Redirect also gdb_stdlog, gdb_stdtarg and gdb_stdtargerr.
	Use ui_out_redirect, register make_cleanup_ui_out_redirect_pop.
	* tui/tui-io.c (tui_setup_io): Redirect also gdb_stdtargerr.
	* utils.c (do_ui_out_redirect_pop, make_cleanup_ui_out_redirect_pop):
	New functions.

gdb/testsuite/
	* gdb.python/python.exp (set height 0, collect help from uiout)
	(verify help to uiout): New tests.
2010-09-11 16:00:27 +00:00
gdbadmin a5d1ef0671 *** empty log message *** 2010-09-11 00:00:03 +00:00
Jan Kratochvil 8e64f2a0d1 gdb/testsuite/
* gdb.base/break-interp.exp (test_ld) <istarget powerpc64-*>: Add
	is_lp64_target to check 64bit target.
2010-09-10 20:29:25 +00:00
Pierre Muller 3329c4b5af * hppa-tdep.c (unwind_command): Use host_address_to_string function
to display a host address.
	* monitor.c (monitor_read_memory): Likewise.
	* xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
2010-09-10 16:17:14 +00:00
Pierre Muller 5e8db3985c * coffread.c (struct coff_symbol): Change c_value type from `long' to
`CORE_ADDRESS' as it might contain target addresses.
2010-09-10 16:12:22 +00:00
Pierre Muller 37049e3199 * alpha-mdebug-tdep.c (find_proc_desc): Use SYMBOL_VALUE_BYTES macro
before cast to pointer to avoid warning.
2010-09-10 16:04:58 +00:00
gdbadmin 3568429d17 *** empty log message *** 2010-09-10 00:00:34 +00:00
Kevin Buettner 351a3e56c1 * v850-tdep.c (v850_gdbarch_init): Change the v850's `char'
type to be signed.
2010-09-09 23:04:46 +00:00
Jan Kratochvil 4569eed2ce gdb/testsuite/
* gdb.base/break-interp.exp (reach): Permit leading . for ppc64.
	(test_ld) <powerpc64-*>: New.
2010-09-09 20:00:49 +00:00
Ulrich Weigand 6afafb5482 * dwarf2read.c (fixup_partial_die): Do not set dummy name for
anonymous class partial DIEs.
2010-09-09 16:42:39 +00:00
Nathan Sidwell c2a66c29c9 * configure.ac: Add --enable-inprocess-agent option.
* configure: Rebuilt.
2010-09-09 13:16:38 +00:00
gdbadmin 3d5229c58f *** empty log message *** 2010-09-09 00:00:33 +00:00
Daniel Jacobowitz 5e1617b13f * gdb.cp/templates.exp (test_template_args): Allow "struct". 2010-09-08 23:41:40 +00:00
Daniel Jacobowitz 60430eff89 * dwarf2read.c (dwarf2_compute_name): Check that the first
argument is a pointer.
2010-09-08 23:34:11 +00:00
Daniel Jacobowitz f1078f667a * dwarf2read.c (read_func_scope, read_structure_type)
(read_common_block): Check for a NULL return from new_symbol.
2010-09-08 23:14:52 +00:00
Jan Kratochvil 824308520b gdb/
* dwarf2read.c (dwarf2_read_index): Return on no SEC_HAS_CONTENTS.
2010-09-08 19:49:28 +00:00
Daniel Jacobowitz c767944bf2 gdb/
* dwarf2read.c (read_structure_type): Move processing of
	fields and member functions from here...
	(process_structure_scope): ... to here.

	gdb/testsuite/
	* gdb.cp/templates.cc (Empty, FunctionArg): New classes.
	(FunctionArg::method): New function.
	(empty, arg): New variables.
	(main): Call arg.method.
	* gdb.cp/templates.exp (test_template_args): New function.
	(do_tests): Call it.
2010-09-08 19:09:43 +00:00
Daniel Jacobowitz 561d38252c * gnu-v3-abi.c (gnuv3_print_method_ptr): Do not use
the domain type.
	(gnuv3_make_method_ptr): Likewise.
2010-09-08 18:53:34 +00:00
Tom Tromey 9bd89d67b6 * breakpoint.c (create_breakpoint): Add missing _(). 2010-09-08 18:05:42 +00:00
Doug Evans 1d040b0d09 * dwarf2-frame.h (dwarf2_frame_build_info): Delete, unused. 2010-09-08 17:52:50 +00:00
Ulrich Weigand 27d3a3fc59 * gdb.threads/threxit-hop-specific.exp: Use "continue" instead
of "next" to proceed over pthread_exit call.
2010-09-08 17:49:54 +00:00
Ulrich Weigand 55b7ce7f0a * gdb.base/maint.exp: Avoid wildcards against potentially very long
"maint print statistics" output to prevent expect timeouts.
2010-09-08 17:22:26 +00:00
Tom Tromey 774b6a14e0 Revert:
2010-09-01  Tom Tromey  <tromey@redhat.com>
	* dwarf2read.c, gdbtypes.c, psymtab.c, symfile.h, symtab.c,
	symtab.h: Revert earlier change.
2010-09-08 17:17:42 +00:00
gdbadmin 2ba6fc7f56 *** empty log message *** 2010-09-08 00:00:33 +00:00
Sami Wagiaalla fc95672973 Fix custom bcache hash regression.
2010-09-09  Sami Wagiaalla  <swagiaal@redhat.com>

	* psymtab.c (add_psymbol_to_bcache): Initialize
	obj_section.
	memset psymbol.ginfo.value to 0.
2010-09-07 15:00:00 +00:00
gdbadmin 23a12aacb2 *** empty log message *** 2010-09-07 00:00:34 +00:00
Jan Kratochvil 809df4465f gdb/testsuite/
* gdb.base/printcmds.exp (test_float_accepted): Import gdb_prompt.
	Move here, negate and extend by XFAIL the "p 0x1.1" test from ...
	(test_float_rejected): ... here.
	* gdb.java/jv-print.exp (test_float_accepted): Import gdb_prompt.
	Move here, negate and extend by XFAIL the "p 0x1.1" test from ...
	(test_float_rejected): ... here.
	* gdb.objc/print.exp (test_float_accepted): Import gdb_prompt.
	Move here, negate and extend by XFAIL the "p 0x1.1" test from ...
	(test_float_rejected): ... here.
	* gdb.pascal/print.exp (test_float_accepted): Import gdb_prompt.
	Move here, negate and extend by XFAIL the "p 0x1.1" test from ...
	(test_float_rejected): ... here.
2010-09-06 15:48:34 +00:00
Yao Qi 32fcada322 2010-09-06 Yao Qi <yao@codesourcery.com>
* linux-low.c (linux_kill): Remove unused variable.
	(linux_stabilize_threads): Likewise.
	* server.c (start_inferior): Likewise.
	(queue_stop_reply_callback): Likewise.
	* tracepoint.c (do_action_at_tracepoint): Likewise.
2010-09-06 15:15:50 +00:00
Yao Qi 0cccb68320 2010-09-06 Yao Qi <yao@codesourcery.com>
* linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
	on return.
2010-09-06 15:10:15 +00:00
Pedro Alves 48f9886d47 * infrun.c (resume): Extend comment on ignoring single-step
requests on vfork parents waiting for a vfork-done.
2010-09-06 14:22:07 +00:00
Jan Kratochvil 423ec54cd3 gdb/
* corelow.c (core_open): Use target_signal_from_host if CORE_GDBARCH
	is NULL.
	* fork-child.c (startup_inferior) <resume_signal>: Use enum
	target_signal type.
	* linux-nat.c (linux_nat_resume): Use target_signal_to_host before
	calling strsignal.  Use enum target_signal type for saved_signo.
	(linux_handle_extended_wait) <signo>: Use enum target_signal type.
	(linux_nat_wait_1): Use enum target_signal type for signo.  Use
	target_signal_to_host before calling strsignal.
	* remote-m32r-sdi.c (m32r_wait, m32r_detach): Replace 0 by
	TARGET_SIGNAL_0.

gdb/gdbserver/
	* target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2010-09-06 13:59:03 +00:00
Jan Kratochvil a6eb9bc860 gdb/
* common/signals.c (ANY): Remove.
	(SET): No longer use ANY.

include/gdb/
	* signals.def: Replace all ANY uses by SET with specific numbers.
	* signals.h (ANY): Remove.
2010-09-06 13:34:03 +00:00
Yao Qi 74609e7188 2010-09-06 Yao Qi <yao@codesourcery.com>
* infrunc(resume): When inferior is waiting_for_vfork_done,
	clear step and don't use displaced stepping.
2010-09-06 13:10:28 +00:00
Pedro Alves 12ac6819b6 * Makefile.in (install-only): Replace $IPA_DEPFILES with
"$(IPA_DEPFILES)".
2010-09-06 10:43:58 +00:00
gdbadmin 1ac5187e94 *** empty log message *** 2010-09-06 00:00:03 +00:00
gdbadmin f40ca12f45 *** empty log message *** 2010-09-05 00:00:33 +00:00
Daniel Jacobowitz 8464be7681 * breakpoint.c (can_use_hardware_watchpoint): Handle the first
value specially.

	testsuite/
	* gdb.base/watchpoint.exp: Call test_inaccessible_watchpoint
	before disabling hardware watchpoints.
	(test_inaccessible_watchpoint): Check that hardware watchpoints
	are used.  Test for watchpoints on a constant address.
2010-09-04 15:30:09 +00:00
Jan Kratochvil 33d62d6487 gdb/
Code cleanup - split print_stop_reason.
	* infrun.c (enum inferior_stop_reason): Remove.
	(print_stop_reason): Remove by splitting into ...
	(print_exited_reason, print_signal_exited_reason)
	(print_no_history_reason, print_signal_received_reason)
	(print_end_stepping_range_reason): ... these new functions.  Update
	the preceding comment.
	(handle_inferior_event): Change the calls to print_exited_reason,
	print_signal_exited_reason, print_no_history_reason,
	print_signal_received_reason, print_end_stepping_range_reason.
	(handle_step_into_function, handle_step_into_function_backward):
	Change the calls to print_end_stepping_range_reason.
2010-09-04 14:27:46 +00:00
gdbadmin 4ab0ad8083 *** empty log message *** 2010-09-04 00:00:33 +00:00
Jan Kratochvil 14dba4b472 gdb/
* breakpoint.c (save_breakpoints): Use RETURN_MASK_ALL.
	* cli-out.c: Include vec.h.
	(cli_field_fmt, cli_spaces, cli_text, cli_message, cli_flush): New
	variable stream, initialize it, use it.
	(cli_redirect): New function comment.  Replace the stream and
	original_stream fields by the new streams field.  Remove the
	original_stream != NULL conditional, assert error on NULL instead.
	(out_field_fmt, field_separator): New variable stream, initialize it, use it.
	(cli_out_data_ctor): Assert non-NULL stream.  Replace the stream and
	original_stream fields by the new streams field.
	(cli_out_set_stream): Replace the stream field by the new streams
	field.
	* cli-out.h: Include vec.h.
	(ui_filep): New typedef, call DEF_VEC_P for it.
	(struct cli_ui_out_data): Replace the stream and original_stream
	fields by the new streams field.
	* cli/cli-logging.c (set_logging_redirect): Call ui_out_redirect with
	NULL first.  Extend the comment.
	(handle_redirections): Call ui_out_redirect with output.
	* python/py-breakpoint.c (bppy_get_commands): Move ui_out_redirect
	calls outside of the TRY_CATCH block.

gdb/testsuite/
	* gdb.base/ui-redirect.exp: New file.
2010-09-03 15:42:04 +00:00
gdbadmin b04bc5d4a7 GDB 7.2 released. 2010-09-03 01:29:09 +00:00
gdbadmin 9724bc6c3b *** empty log message *** 2010-09-03 00:00:03 +00:00
Joel Brobecker 080db4e0b0 Back out the change introducing the "record pic" feature.
gdb/ChangeLog:

	Back out the following change:
	| 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-09-02 22:52:06 +00:00
Jan Kratochvil ba7208835a Fix ChangeLog entries cli-logging.c -> cli/cli-logging.c . 2010-09-02 18:40:12 +00:00
Daniel Jacobowitz 0a4f61e3e4 * config.in, configure: Regenerated.
* configure.ac: Check for waitpid.
	* ser-pipe.c (pipe_close): Wait for the program to exit.
2010-09-02 17:12:38 +00:00
Jan Kratochvil 58b61394cf gdb/
* cli-logging.c: Include gdb_assert.h.
	(set_logging_overwrite): New function.
	(logging_redirect): New comment.
	(logging_no_redirect_file, set_logging_redirect)
	(pop_output_files) <logging_no_redirect_file>: New.
	(handle_redirections) <!logging_redirect>: New variable
	no_redirect_file.  Remove file autoclose for tee_file_new.  No longer
	discard cleanup for the close of former OUTPUT.  Set
	LOGGING_NO_REDIRECT_FILE.
	(handle_redirections) <logging_redirect>: gdb_assert
	LOGGING_NO_REDIRECT_FILE.
	(show_logging_command) <logging_redirect handling>: Adjust messages
	for SAVED_FILENAME not NULL.
	(_initialize_cli_logging): Install set_logging_overwrite and
	set_logging_redirect.
2010-09-02 15:42:03 +00:00
Joel Brobecker 3f3540e14f Add test for -file-list-exec-source-files
gdb/testsuite/ChangeLog:

        * gdb.dwarf/dw2-filename.S, gdb.dwarf/dw2-filename.exp: New files.
2010-09-02 15:19:57 +00:00
Jan Kratochvil 706774f2ca gdb/
* iq2000-tdep.c (iq2000_scan_prologue): Initialize SAL.END.
2010-09-02 14:00:21 +00:00
Jan Kratochvil 9a35ccf756 gdb/
* Makefile.in (GDB_WARN_CFLAGS_NO_FORMAT): Convert it to the no- form.
	(monitor.o): Replace $(INTERNAL_WARN_CFLAGS) by $(INTERNAL_CFLAGS) and
	add $(GDB_WARN_CFLAGS_NO_FORMAT).
	(printcmd.o): Replace $(INTERNAL_CFLAGS_BASE) by $(INTERNAL_CFLAGS).
2010-09-02 13:58:06 +00:00
Yao Qi ba9b2ec30d 2010-09-02 Yao Qi <yao@codesourcery.com>
* linux-nat.c (status_to_str): Use WTERMSIG to extract the signal
        number from a WIFSIGNALED status.
2010-09-02 01:19:32 +00:00
gdbadmin d3412a50dd *** empty log message *** 2010-09-02 00:00:33 +00:00
Tom Tromey faf68db746 * symtab.h (lookup_type_symbol): Declare.
* symtab.c (lookup_symbol_in_language_full): Rename from
	lookup_symbol_in_language.  Add 'for_type' argument.
	(lookup_symbol_in_language): New function.
	(lookup_type_symbol): Likewise.
	(lookup_symbol_aux): Add 'for_type' argument.
	(match_symbol_aux): New function.
	(lookup_symbol_aux_symtabs): Use expand_one_symtab_matching.
	(match_transparent_type): New function.
	(basic_lookup_transparent_type): Use expand_one_symtab_matching.
	* symfile.h (struct quick_symbol_functions)
	<pre_expand_symtabs_matching>: Remove.
	<expand_one_symtab_matching>: New field.
	* psymtab.c (expand_one_symtab_matching_psymtabs): New function.
	(pre_expand_symtabs_matching_psymtabs): Remove.
	(psym_functions): Update.
	* gdbtypes.c (lookup_typename): Use lookup_type_symbol.
	* dwarf2read.c (dw2_lookup_symbol): Update comment.
	(dw2_pre_expand_symtabs_matching): Remove.
	(dw2_expand_one_symtab_matching): New function.
	(dwarf2_gdb_index_functions): Update.
2010-09-01 21:50:26 +00:00
Joel Brobecker 248c9dbc16 [NEWS] powerpc-lynxos gdbserver support
This adds an entry in the NEWS file announcing the GDBserver support
on powerpc-lynxos.

gdb/ChangeLog:

        * NEWS: Add entry announcing GDBserver support on powerpc-lynxos.
2010-09-01 20:47:02 +00:00
Marc Khouzam f75d858b7c * mi/mi-main.c (mi_cmd_list_target_features): Add `reverse'
as a feature reported by -list-target-features.

       * gdb.texinfo (GDB/MI Miscellaneous Commands): Document new
       feature `reverse' output by -list-target-features.
2010-09-01 19:03:54 +00:00
Joel Brobecker 8ed54b31b3 gdbserver support for powerpc-lynxos (4.x)
This patch adds support for powerpc-lynxos.

gdbserver/ChangeLog:

        * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
        gdbserver/lynx-ppc-low.c: New files.
        * Makefile.in (lynx_low_h): New variable.
        (lynx-low.o, lynx-ppc-low.o): New rules.
        * configure.ac: On LynxOS, link with -lnetinet.
        * configure.srv: Add handling of powerpc-*-lynxos* targets.
        * configure: regenerate.
2010-09-01 18:57:12 +00:00
Joel Brobecker bb0116a433 Import vsnprintf from libiberty if not available.
vasprintf and vsnprintf are not available on LynxOS, at least not on
version 4.0.0.  This patch updates the configury to import them from
libiberty if not available out of the box.

gdbserver/
        * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
        * configure.ac: Add check for vasprintf and vsnprintf.
        * configure, config.in: Regenerate.
        * server.h (vasprintf, vsnprintf): Add conditional declarations.
2010-09-01 18:56:45 +00:00
Joel Brobecker 0482b03b6a Generate regformats/rs6000/powerpc-32.dat
I will need this description for the ppc-lynxos debugger where, AFAICT,
we only have access to the core GP and FP registers.  So this adds
powerpc-32 to the list of targets for which a .dat file needs  to be
generated.

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

        * features/Makefile (WHICH): Add rs6000/powerpc-32.
        (powerpc-32.o, powerpc-32.c): New rules.
        (clean): Also remove powerpc-32.c.
        * regformats/rs6000/powerpc-32.dat: Generate.
2010-09-01 18:56:35 +00:00
gdbadmin a778ab81e8 [gdbserver] Move malloc.h include to server.h.
This patch moves all includes of malloc.h, which were introduced
purely to get access to alloca's declaration, to server.h, next
to the include of alloca.h.

There is one exception: gdbreplay.c, which does not include server.h.
In this case, the include of alloca.h was simply moved up a bit, next
to the include of malloc.h.

gdb/gdbserver/ChangeLog:

        * gdbreplay.c: Move include of alloca.h up, next to include of
        malloc.h.
        * server.h: Add include of malloc.h.
        * mem-break.c: Remove include of malloc.h.
        * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2010-09-01 17:29:32 +00:00
gdbadmin 8b034a19a7 Put ChangeLog entries in the right ChangeLog file. 2010-09-01 17:27:51 +00:00
gdbadmin eff1410f2b Compile memmem.o without -Werror.
This reproduces the same approach as in GDB to allow us to build
specific files without -Werror.

gdb/gdbserver/ChangeLog:

        * Makefile.in (INTERNAL_CFLAGS_BASE): New variable. Extracted
        from INTERNAL_CFLAGS.
        (INTERNAL_WARN_CFLAGS): New variable.
        (INTERNAL_CFLAGS): Adjust, using INTERNAL_WARN_CFLAGS.
2010-09-01 01:56:04 +00:00
gdbadmin 6cebaf6e1a use xsnprintf instead of snprintf.
snprintf is not available on LynxOS, so I changed the calls to snprintf
to calls to xsnprintf, which should be strictly equivalent.

gdb/gdbserver/ChangeLog:

        * utils.c (xsnprintf): Make non-static.
        * server.h: Add xsnprintf declaration.
        * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
        replace calls to snprintf by calls to xsnprintf throughout.
2010-09-01 01:53:43 +00:00
gdbadmin a1723c35ac include alloca.h if available.
On LynxOS, alloca is defined in allocal.h.  This fixes one warning that
occurs when building GDBserver for LynxOS.

gdb/gdbserver/ChangeLog:

        * configure.ac: Add configure check for alloca.
        * configure, config.in: Regenerate.
        * server.h: Include alloca.h if it exists.
        * gdbreplay.c: Include alloca.h if it exists.
2010-09-01 01:51:07 +00:00
gdbadmin 86c80b5af0 *** empty log message *** 2010-09-01 00:00:34 +00:00
Sami Wagiaalla 710e1a31c4 Create and use a specialized bcache type for psymbols
2010-08-31  Sami Wagiaalla  <swagiaal@redhat.com>

	* symfile.c (reread_symbols): Use psymbol_bcache_free, and
	psymbol_bcache_init.
	* psymtab.h (psymbol_bcache_init): New function prototype.
	(psymbol_bcache_free): New function prototype.
	(psymbol_bcache_get_bcache): New function prototype.
	* psymtab.c (psymbol_bcache_init): New function.
	(psymbol_bcache_free): New function.
	(psymbol_bcache_full): New function.
	(psymbol_bcache_get_bcache): New function.
	(add_psymbol_to_bcache): use psymbol_bcache_full.
	* objfiles.h (psymbol_cache): Change type of psymbol_cache to
	psymbol_bcache.
	* symmisc.c (print_symbol_bcache_statistics): Updated.
	(print_objfile_statistics): Updated.
	* objfiles.c (allocate_objfile): Use psymbol_bcache_init to initialize
	psymbol_cache.
	(free_objfile): Use psymbol_bcache_free.
2010-08-31 20:10:42 +00:00
Tom Tromey 6438229074 PR c++/11961:
* dwarf2read.c (new_symbol_full) <DW_TAG_template_type_param>:
	Don't set TYPE_NAME on the type.
2010-08-31 20:03:20 +00:00
Michael Snyder 8bbed40521 2010-08-31 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* infrun.c (set_exec_direction_func): Error out if target does not
	support reverse execution.
2010-08-31 19:31:00 +00:00
Doug Evans 0f254bb76b * gdb.dwarf2/dw4-sig-types.exp: Use .x for executable name. 2010-08-31 18:40:10 +00:00
Jan Kratochvil 06253dd31f gdb/
Make linux_get_siginfo_type `type *' unique.
	* linux-tdep.c (linux_gdbarch_data_handle, struct linux_gdbarch_data)
	(init_linux_gdbarch_data, get_linux_gdbarch_data): New.
	(linux_get_siginfo_type): New variable linux_gdbarch_data.  Initialize
	it.  Use linux_gdbarch_data->siginfo_type as a persistent storage.
	(_initialize_linux_tdep): New.
2010-08-31 18:11:48 +00:00
Jan Kratochvil b8edc417a7 gdb/
Code cleanup.
	* defs.h (find_memory_region_ftype): New typedef.
	(exec_set_find_memory_regions): Use it.
	* exec.c (exec_set_find_memory_regions): Use find_memory_region_ftype.
	* fbsd-nat.c (fbsd_find_memory_regions): Likewise.
	* gcore.c (objfile_find_memory_regions): Likewise.
	* gnu-nat.c (gnu_find_memory_regions): Likewise.
	* linux-nat.c (linux_nat_find_memory_regions): Likewise.
	* procfs.c (iterate_over_mappings_cb_ftype): Remove.
	(iterate_over_mappings): Rename iterate_over_mappings_cb_ftype to
	find_memory_region_ftype.
	(insert_dbx_link_bpt_in_region): Likewise.
	(iterate_over_mappings): Likewise.  Drop the comment part about the
	function prototype.
	(find_memory_regions_callback): Use find_memory_region_ftype.
	(proc_find_memory_regions): Likewise.
	(info_mappings_callback): Rename iterate_over_mappings_cb_ftype to
	find_memory_region_ftype.
	* target.c (dummy_find_memory_regions): Use find_memory_region_ftype.
	* target.h (struct target_ops) <to_find_memory_regions>: Likewise.
2010-08-31 18:08:43 +00:00
Sami Wagiaalla cbd7053759 Enable custom bcache hash function.
2010-08-25  Sami Wagiaalla  <swagiaal@redhat.com>

	* psymtab.c (add_psymbol_to_bcache): Remove 'static' from
	'static partial_symbol psymbol'.
	(psymbol_hash): New function.
	(psymbol_compare): New function.
	* bcache.c (hash_continue): New.
	(hash): Use hash_continue.
	* bcache.c: Add hash_function and compare_function
	pointers to bcache struct.
	(bcache_full): Use bcache->hash_function, and
	bcache->compare_function.
	(bcache_compare): New function.
	(bcache_xmalloc): Take hash_function and
	compare_function arguments and initialize the
	bcach's pointers.
	Updated comment.
	* objfiles.c (allocate_objfile): Updated.
	* symfile.c (reread_symbols): Updated.
	* python/py-type.c (typy_richcompare): Updated.
2010-08-31 17:26:08 +00:00
H.J. Lu 83b9503b40 Remove an extra "@item".
2010-08-31  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.texinfo (i386 Features): Remove an extra "@item".
2010-08-31 14:45:41 +00:00
gdbadmin 447394e370 *** empty log message *** 2010-08-31 00:00:34 +00:00
Tom Tromey 03f17ccfe1 gdb
2010-08-30  Andre Poenitz  <andre.poenitz@nokia.com>
	    Tom Tromey  <tromey@redhat.com>

	PR python/11792:
	* python/py-value.c (valpy_get_dynamic_type): New function.
	(value_object_getset): Add "dynamic_type".
	(valpy_get_type): Fail on error.
gdb/doc
	PR python/11792:
	* gdb.texinfo (Values From Inferior): Document dynamic_type.
gdb/testsuite
	PR python/11792:
	* gdb.python/py-value.exp (test_subscript_regression): Add
	dynamic_type test.
2010-08-30 20:28:31 +00:00
Daniel Jacobowitz 640617ad17 * gdb.cp/cpexprs.exp (test_breakpoint): Continue to test_function
instead of running to main.  Do not test the main function.
	* gdb/testsuite/gdb.cp/cpexprs.cc (main): Rename to test_function.
	Add new main.
2010-08-30 17:38:10 +00:00
Yao Qi 25b41d01ea 2010-08-30 Yao Qi <yao@codesourcery.com>
* arm-linux-tdep.c (arm_linux_sigreturn_return_addr): New.
	(arm_linux_syscall_next_pc): New.
	(arm_linux_copy_svc): Use arm_linux_sigreturn_return_addr instead.
	(arm_linux_init_abi): Initialize syscall_next_pc.
	* arm-tdep.c (thumb_get_next_pc_raw):  Get next pc of SWI in Thumb mode.
	(arm_get_next_pc_raw): Get next pc of SWI in ARM mode.
	* arm-tdep.h (struct gdbarch_tdep): Add a function pointer syscall_next_pc.
	Declare arm_frame_is_thumb.
2010-08-30 15:26:28 +00:00
Jan Kratochvil 5760d0ab88 gdb/
Code cleanup.
	* breakpoint.c (bpstat_alloc): Remove unused prototype.
	(bpstat_alloc): Change parameters cbs to bs_link_pointer.  Adjust the
	code.
	(bpstat_stop_status): Change root_bs into bs_head and bs_link.  Adjust
	calls of bpstat_alloc.  Remove explicit bs chain termination.
2010-08-30 09:49:12 +00:00
gdbadmin 48cb5944c5 *** empty log message *** 2010-08-30 00:00:34 +00:00
gdbadmin c832319536 *** empty log message *** 2010-08-29 00:00:03 +00:00
Pedro Alves 1a98136022 * linux-low.c (__SIGRTMIN): Define if not already defined.
(linux_create_inferior): Check for __ANDROID__ rather than
	__SIGRTMIN.
	(enqueue_one_deferred_signal): Don't requeue non-RT signals that
	are already deferred.
	(linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
	(linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
	stopped and already has a pending signal to report.
	(proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
	a pending signal to report or is moving out of a jump pad.
	(linux_init_signals): Check for __ANDROID__ rather than
	__SIGRTMIN.
2010-08-28 14:51:29 +00:00
Pedro Alves b4d51a55f9 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
debug_threads check.  Avoid a linear search when not doing debug
	output.
2010-08-28 14:03:27 +00:00
Jan Kratochvil 46a9699269 gdb/
Code cleanup.
	* linux-nat.c (pull_pid_from_list): Rename status to statusp.
	(my_waitpid): Likewise.
2010-08-28 08:38:25 +00:00
gdbadmin 36d359192c *** empty log message *** 2010-08-28 00:00:03 +00:00
Doug Evans 36374493cd * dwarf2read.c (dw2_require_line_header): Read from .debug_types
as appropriate.
2010-08-27 23:09:58 +00:00
Tom Tromey 8b93c54cd7 * dwarf2read.c (dwarf2_attach_fields_to_type): Don't set
TYPE_FIELD_IGNORE_BITS.
2010-08-27 21:03:39 +00:00
Doug Evans 16be1145cb * dwarf2read.c (dwarf2_per_objfile_free): Reorganize buffers to match
the order they're defined in.  munmap .debug_types buffer.
2010-08-27 16:37:03 +00:00
Pedro Alves ec48365dd8 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
(struct gdb_event) <fd>: Change type to gdb_fildes_t.
	(struct file_handler) <fd>: Change type to gdb_fildes_t.
	(process_event): Change local fd's type to gdb_fildes_t.
	(create_file_handler): Adjust prototype.
	(delete_file_handler): Adjust prototype.
	(handle_file_event): Adjust prototype.  Use pfildes.
	(create_file_event): Adjsut prototype.
	* remote-utils.c (remote_desc, listen_desc): Change type to
	gdb_fildes_t.
	* server.h: New gdb_fildes_t typedef.
	[USE_WIN32API]: Include winsock2.h.
	(delete_file_handler, add_file_handler): Adjust prototypes.
	(pfildes): Declare.
	* utils.c (pfildes): New.
2010-08-27 16:02:49 +00:00
Pedro Alves 889bf7c5fa Fix whitespace, tabs/spaces. 2010-08-27 12:02:20 +00:00
Pedro Alves 854d88f03d * configure.ac (build_warnings): Add -Wno-char-subscripts.
* configure: Regenerate.
2010-08-27 10:20:07 +00:00
Pedro Alves 0146f85bf7 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
(linux_done_accessing_memory): ... this.
	(linux_target_ops): Adjust.
	* linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
	* nto-low.c (nto_target_ops): Adjust comment.
	* server.c (gdb_read_memory, gdb_write_memory): Adjust.
	* spu-low.c (spu_target_ops): Adjust comment.
	* target.h (target_ops): Rename unprepare_to_access_memory field
	to done_accessing_memory.
	(unprepare_to_access_memory): Rename to ...
	(done_accessing_memory): ... this.
2010-08-27 00:16:48 +00:00
gdbadmin 7854e87132 *** empty log message *** 2010-08-27 00:00:02 +00:00
Doug Evans e254ef6a5f * dwarf2read.c (dw2_require_full_path): Rename parameter cu to per_cu.
(dw2_forget_cached_source_info): Rename local cu to per_cu.
	(dw2_lookup_symtab, dw2_do_expand_symtabs_matching): Ditto.
	(dw2_print_stats, dw2_expand_all_symtabs): Ditto.
	(dw2_expand_symtabs_with_filename, dw2_find_symbol_file): Ditto.
	(dw2_find_symbol_file, dw2_expand_symtabs_matching): Ditto.
	(dw2_map_symbol_filenames, dwarf2_initialize_objfile): Ditto.
	(dwarf2_free_objfile, write_one_signatured_type): Ditto.
	(write_psymtabs_to_index): Ditto.
2010-08-26 23:36:53 +00:00
Pedro Alves 90d74c301f * linux-low.c (linux_prepare_to_access_memory): New.
(linux_unprepare_to_access_memory): New.
	(linux_target_ops): Install them.
	* server.c (read_memory): Rename to ...
	(gdb_read_memory): ... this.  Use
	prepare_to_access_memory/prepare_to_access_memory.
	(write_memory): Rename to ...
	(gdb_write_memory): ... this.  Use
	prepare_to_access_memory/prepare_to_access_memory.
	(handle_search_memory_1): Adjust.
	(process_serial_event): Adjust.
	* target.h (struct target_ops): New fields
	prepare_to_access_memory and unprepare_to_access_memory.
	(prepare_to_access_memory, unprepare_to_access_memory): New.
	* linux-x86-low.c (x86_insert_point, x86_remove_point): Use
	prepare_to_access_memory/prepare_to_access_memory.
	* nto-low.c (nto_target_ops): Adjust.
	* spu-low.c (spu_target_ops): Adjust.
	* win32-low.c (win32_target_ops): Adjust.
2010-08-26 23:17:22 +00:00
Pedro Alves ae53ffa4b6 * NEWS: Mention libthread_db debugging with core files. 2010-08-26 19:47:23 +00:00
Pedro Alves fd4679698a * Makefile.in (WARN_CFLAGS): Get it from configure.
(WERROR_CFLAGS): New.
	(INTERNAL_CFLAGS): Add WERROR_CFLAGS.
	* configure.ac: Introduce --enable-werror, which adds -Werror to
	the compiler command line.  Enabled by default.  Disable with
	--disable-werror.  Add -Wdeclaration-after-statement
	Wpointer-arith and -Wformat-nonliteral to warning flags.
	* configure: Regenerate.
2010-08-26 18:36:28 +00:00
Pedro Alves d4596a3d79 * Makefile.in (WARN_CFLAGS): Get it from configure.
(WERROR_CFLAGS): New.
	(INTERNAL_CFLAGS): Add WERROR_CFLAGS.
	* configure.ac: Introduce --enable-werror, which adds -Werror to
	the compiler command line.  Enabled by default.  Disable with
	--disable-werror.  Add -Wdeclaration-after-statement
	Wpointer-arith and -Wformat-nonliteral to warning flags.
        * configure: Regenerate.
2010-08-26 18:03:02 +00:00
Doug Evans c6da4ceffb * dwarf2read.c (dwarf2_build_include_psymtabs): Remove unnecessary
forward decl.  Pass pst->dirname to dwarf_decode_lines.
	(psymtab_include_file_name): New function.
	(dwarf_decode_lines): Call it.  Update comments.
2010-08-26 16:47:55 +00:00
Pedro Alves 331e2f5f98 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h. 2010-08-26 16:47:05 +00:00
Pedro Alves e581f2b4a7 * gdbreplay.c (remote_error): New.
(gdbchar): New.
	(expect): Use gdbchar.  Check for error reading from GDB.
	Clarify sync error output.
	(play): Check for errors writing to GDB.
	* linux-low.c (sigchld_handler): Really ignore `write' errors.
	* remote-utils.c (getpkt): Check for errors writing to the remote
	descriptor.
2010-08-26 16:24:41 +00:00
Pedro Alves 2ed91d1b8b * gdb.mi/mi-nsmoribund.exp: Revert back to send_gdb/gdb_expect in
one test.
2010-08-26 14:53:45 +00:00
gdbadmin 5a714bba1c *** empty log message *** 2010-08-26 00:00:03 +00:00
Pedro Alves cd02d79dc8 * dwarf2read.c (inherit_abstract_dies): Handle origin die's
compilation unit being different from target die's.
2010-08-25 18:20:07 +00:00
Pedro Alves 3c11dd799b * linux-low.c (linux_wait_1): Move non-debugging code out of
`debug_threads' control.
2010-08-25 16:49:04 +00:00
Pedro Alves d20a8ad9c0 * linux-low.c (linux_wait_1): Don't set last_status here.
* server.c (push_event, queue_stop_reply_callback): Assert we're
	not pushing a TARGET_WAITKIND_IGNORE event.
	(start_inferior, start_inferior, attach_inferior, handle_v_cont)
	(myresume, handle_target_event): Set the thread's last_resume_kind
	and last_status from the target returned status.
2010-08-25 16:27:05 +00:00
Pedro Alves 964e4306f8 PR threads/10729
* linux-x86-low.c (update_debug_registers_callback): New.
	(i386_dr_low_set_addr): Use it.
	(i386_dr_low_get_addr): New.
	(i386_dr_low_set_control): Use update_debug_registers_callback.
	(i386_dr_low_get_control): New.
	(i386_dr_low_get_status): Adjust.
	* linux-low.c (linux_stop_lwp): New.
	* linux-low.h (linux_stop_lwp): Declare.

	* i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
	argument instead of a i386_debug_reg_state.
	(I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
	a i386_debug_reg_state.
	(i386_insert_aligned_watchpoint): Adjust.
	(i386_remove_aligned_watchpoint): Adjust.
	(i386_low_stopped_data_address): Read the debug registers from the
	inferior instead of from the mirrors.
	* i386-low.h (struct i386_debug_reg_state): Extend comment.
	(i386_dr_low_get_addr): Declare.
	(i386_dr_low_get_control): Declare.
	(i386_dr_low_get_status): Change prototype.

	* win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
	(i386_dr_low_get_addr): New.
	(i386_dr_low_get_control): New.
	(i386_dr_low_get_status): Adjust prototype.  Return
	dr_status_mirror.
	(i386_initial_stuff): Clear dr_status_mirror and
	dr_control_mirror.
	(i386_get_thread_context): Adjust.
	(i386_set_thread_context): Adjust.
	(i386_thread_added): Adjust.
2010-08-25 14:40:21 +00:00
Doug Evans 673bfd454b PR symtab/11942
* dwarf2read.c (dwarf2_per_objfile): New members debug_info_type_hash,
	debug_types_type_hash.
	(dwarf2_cu, dwarf2_per_cu_data): Delete member type_hash.
	All uses updated.
	(lookup_die_type): Renamed from tag_type_to_tag.  First look in
	appropriate type_hash table.  All callers updated.
	(allocate_signatured_type_table): Renamed from
	allocate_signatured_type_hash_table.  All callers updated.
	(create_signatured_type_table_from_index): Renamed from
	create_signatured_type_hash_from_index.  All callers updated.
	(read_die_type): Add comment.  Move actual reading to ...
	(read_die_type_1): ... here.  New function.
	(follow_die_ref_or_sig): Tweak comment.
	(set_die_type): Rewrite to use appropriate choice of
	debug_info_type_hash or debug_types_type_hash.
	(get_die_type_at_offset): New function.
	(get_die_type): Call it.

	testsuite/
	PR symtab/11942
	* gdb.dwarf2/dw4-sig-types.cc: New file.
	* gdb.dwarf2/dw4-sig-types.h: New file.
	* gdb.dwarf2/dw4-sig-types-b.cc: New file.
	* gdb.dwarf2/dw4-sig-types.exp: New file.
2010-08-25 00:09:14 +00:00
gdbadmin 1e30cf0714 *** empty log message *** 2010-08-25 00:00:34 +00:00
Pedro Alves 5f21a75bc5 * linux-low.h (linux_thread_area): Delete declaration. 2010-08-24 20:13:15 +00:00
Jan Kratochvil e8fd65ef54 gdb/
* python/py-type.c (typy_richcompare): Initialize worklist.
2010-08-24 17:24:28 +00:00
Daniel Jacobowitz 9779414d4e * arm-tdep.c: Include features/arm-with-m.c.
(arm_psr_thumb_bit): New.  Update all uses of CPSR_T to
	call this function.
	(arm_pc_is_thumb): Add a gdbarch argument.  Update all callers.
	Check is_m after force-mode.
	(arm_gdbarch_init): Check the binary before the target description.
	Add check for M profile attribute.  If we have an M-profile device,
	but no target register description, use arm-with-m.  Recognize the
	new org.gnu.gdb.arm.m-profile feature and its xpsr register.
	(_initialize_arm_tdep): Call initialize_tdesc_arm_with_m.
	* arm-tdep.h (XPSR_T): Define.
	(struct gdbarch_tdep): Add is_m member.
	* features/arm-m-profile.xml, features/arm-with-m.c,
	features/arm-with-m.xml: New files.

	doc/
	* gdb.texinfo (ARM Features): Document
	org.gnu.gdb.arm.m-profile.
2010-08-24 15:56:15 +00:00
gdbadmin 2346564d95 *** empty log message *** 2010-08-24 00:00:03 +00:00
Doug Evans e71ec85366 * dwarf2read.c (set_die_type): Fix typo in comment. 2010-08-23 21:49:26 +00:00
Doug Evans 9dc481d3a7 * dwarf2read.c (read_structure_type): Add comment.
(read_enumeration_type): Add comment.
	(process_enumeration_scope): Move definition of some locals
	closer to their use.
	(read_namespace_type): Add comment.
2010-08-23 21:44:39 +00:00
Tom Tromey f9ffd4bb11 gdb
PR python/11145:
	* python/py-value.c: Include expression.h.
	(valpy_do_cast): New function.
	(valpy_cast): Use it.
	(valpy_dynamic_cast): New function.
	(valpy_reinterpret_cast): Likewise.
	(value_object_methods): Add dynamic_cast, reinterpret_cast.
gdb/doc
	PR python/11145:
	* gdb.texinfo (Values From Inferior): Document dynamic_cast and
	reinterpret_cast methods.
gdb/testsuite
	PR python/11145:
	* gdb.python/py-value.c (Base, Derived): New types.
	(base): New global.
	* gdb.python/py-value.exp (test_subscript_regression): Add
	dynamic_cast test.
2010-08-23 20:29:19 +00:00
Tom Tromey 96f73ba54f PR python/11391:
* python/py-value.c (valpy_nonzero): Don't throw error for other
	Value types.
2010-08-23 20:27:49 +00:00
Tom Tromey d839c8a4e8 gdb
PR python/10676:
	* python/py-type.c: Include bcache.h, vec.h.
	(struct type_equality_entry): New.
	(compare_strings): New function.
	(check_types_equal): Likewise.
	(check_types_worklist): Likewise.
	(typy_richcompare): Likewise.
	(type_object_type): Set tp_richcompare field.
gdb/testsuite
	PR python/10676:
	* gdb.python/py-type.exp (test_fields): Add tests for type
	equality.
2010-08-23 20:26:10 +00:00
Tom Tromey 05d0e1e74e PR python/10953:
* python/py-type.c (typy_fields): Call check_typedef.
	(typy_template_argument): Add TRY_CATCH.
2010-08-23 20:23:55 +00:00
Tom Tromey 702c271136 gdb
PR python/11915:
	* python/py-type.c (typy_array): New function.
	(type_object_methods): Add "array".
gdb/doc
	PR python/11915:
	* gdb.texinfo (Types In Python): Document array method.
gdb/testsuite
	PR python/11915:
	* gdb.python/py-type.exp (test_fields): Add tests for array.
2010-08-23 20:21:28 +00:00
Keith Seitz 832bafd331 * gdb.dwarf2/dw2-double-set-die-type.S: DIE 0x51f does not
have any children. Create a new abbrev for it.
	Add missing terminal sequence to .debug_abbrev.
2010-08-23 19:12:53 +00:00
gdbadmin 06241966e8 *** empty log message *** 2010-08-23 00:00:04 +00:00
gdbadmin 14d8bca30e *** empty log message *** 2010-08-22 00:00:33 +00:00
gdbadmin cdc45e8720 *** empty log message *** 2010-08-21 00:00:02 +00:00
Pedro Alves 4a5321319d * python/python.c: Include "serial.h".
(gdbpy_event_fds): Change type to `struct serial *' a array from
	int array.
	(gdbpy_run_events): Change parameters.  Use serial_readchar in
	place of read.
	(gdbpy_post_event): Use serial_write in place of write.
	(gdbpy_initialize_events): Use serial_pipe instead of pipe, and
	serial_async in place of add_file_handler.
2010-08-20 18:52:11 +00:00
Pedro Alves 58f07bae95 * serial.h (gdb_pipe, serial_pipe): Declare.
* serial.c (serial_interface_lookup): Take a const char pointer.
	(serial_fdopen): Rename to ...
	(serial_fdopen_ops): ... this.  Add an OPS parameter and use it.
	Call the OPS' fdopen function if there is one.
	(serial_fdopen): Rewrite as wrapper to serial_fdopen_ops.
	(serial_pipe): New.
	(struct serial_ops) <fdopen>: New field.

	* ser-mingw.c (free_pipe_state):
	(free_pipe_state): Close output on non-pex pipes.
	(pipe_windows_fdopen): New.
	(gdb_pipe): New.
	(_initialize_ser_windows): Register pipe_windows_fdopen.
	* ser-go32.c (gdb_pipe): New.
	* ser-pipe.c (pipe_close): Close file descriptor even if there's
	no state pointer.
	(pipe_ops): Delete.
	(gdb_pipe): New.
2010-08-20 18:49:20 +00:00
Keith Seitz 3da10d80f8 PR symtab/11465:
* dwarf2read.c (struct delayed_method_info): New struct.
	(struct dwarf2_cu): Add vector method_list.
	(scan_partial_symbols): Count methods for union, class, structure,
	and interface types.
	(add_to_method_list): New function.
	(free_delayed_list): New function.
	(compute_delayed_physnames): New function.
	(process_full_comp_unit): Make a cleanup for the CU's delayed
	physname list, compute the delayed physnames, and free the
	the list.
	(dwarf2_add_member_fn): For C++ and Java, delay the computation
	of the physname until after the CU is read.

	* dwarf2read.c (read_structure_type): Check if the current
	DIE's type was already completed after dwarf2_full_name
	was called.
2010-08-20 17:16:44 +00:00
Keith Seitz c37bf52837 PR symtab/11465:
* gdb.dwarf2/pr11465.exp: New test.
	* gdb.dwarf2/pr11465.S: New file.
	* gdb.dwarf2/dw2-double-set-die-type.S: New file.
	* gdb.dwarf2/dw2-double-set-die-type.exp: New test.
2010-08-20 17:16:15 +00:00
gdbadmin bcf8e47894 *** empty log message *** 2010-08-20 00:00:03 +00:00
Stan Shebs ca11e89981 * NEWS: Mention some additional changes. 2010-08-19 23:43:31 +00:00
Tom Tromey 4d2dc20ae3 * Makefile.in (install-python): Add DESTDIR. 2010-08-19 18:40:46 +00:00
Thiago Jung Bauermann 4572cbac3f * gdb.arch/vsx-regs.exp: Remove wrong comment about testing AltiVec
registers.  Update data sets with the new v2_double element in the
	VSX register union.  Add vector_register3_vr data set for the AltiVec
	registers.  Use gdb_test_no_output instead of send_gdb.
2010-08-19 17:52:49 +00:00
Pedro Alves e7fbb131d4 * gdb.python/py-shared.exp: New file, factored out from
python.exp.
	* gdb.python/py-shared.c: New file.
	* gdb.python/py-shared-sl.c: New file.
	* gdb.python/python-1.c: New file.
	* gdb.python/python-sl.c: Delete.
	* gdb.python/python.c: Mention python-1.c.
	* gdb.python/python.exp: Move shared library tests to
	py-shared.exp.
	* gdb.python/Makefile.in (EXECUTABLES): Add py-shared and python.
	(MISCELLANEOUS): New.
	(clean mostlyclean): Also remove $MISCELLANEOUS.
2010-08-19 17:00:58 +00:00
Doug Evans d30f5e1f70 PR exp/11926
* parser-defs.h (parse_float, parse_c_float): Declare.
	* parse.c (parse_float, parse_c_float): New function.
	* c-exp.y (parse_number): Call parse_c_float.
	* objc-exp.y (parse_number): Ditto.
	* p-exp.y (parse_number): Ditto.  Use ANSI/ISO-style definition.
	* jv-exp.y (parse_number): Call parse_float, fix suffix handling.

	testsuite/
	* gdb.base/printcmds.exp (test_float_accepted): New function.
	Move existing float tests there.  Add tests for floats with suffixes.
	(test_float_rejected): New function.
	* gdb.java/jv-print.exp (test_float_accepted): New function.
	(test_float_rejected): New function.
	* gdb.objc/print.exp: New file.
	* gdb.pascal/print.exp: New file.
	* lib/objc.exp: New file.
2010-08-19 13:33:15 +00:00
Joel Brobecker 2837d59e6b Fix regression in -file-list-exec-source-files command.
See http://sourceware.org/ml/gdb/2010-07/msg00118.html for
a description of the problem. Namely, the file and fullname
fields are inverted in the output of the -file-list-exec-source-files
GDB/MI command:

    (gdb) interpreter-exec mi -file-list-exec-source-files
    ^done,files=[{file="/takamaka.a/brobecke/ex/list-exec-source-files/foo.c",fullname="foo.c"},{file="/takamaka.a/brobecke/ex/list-exec-source-files/foo.c",fullname="foo.c"},{file="",fullname="init.c"},{file="",fullname="../sysdeps/x86_64/elf/start.S"},{file="",fullname="../sysdeps/x86_64/elf/start.S"}]

It turns out to be a silly thinko: The map_symbol_filenames function
calls the psymtab version of map_symbol_filenames routine, and this
version called the callback function with filename and fullname
in the wrong order (fullname/filename instead of filename/fullname).

The routine description in symfile.h confirst that expected order for
the FUN callback parameters:

    /* Call a callback for every file defined in OBJFILE.  FUN is the
       callback.  It is passed the file's name, the file's full name,
       and the DATA passed to this function.  */
    void (*map_symbol_filenames) (struct objfile *objfile,
                                  void (*fun) (const char *, const char *,
                                               void *),
                                  void *data);

Fixing this error uncovered another location where the arguments
were reversed: maybe_add_partial_symtab_filename.  Once the first
error was fixed, the debugger would crash while attempting to do
completion, because it was given a NULL fullname instead of the
non-NULL filename.

gdb/ChangeLog:

        * psymtab.c (map_symbol_filenames_psymtab): Call FUN with
        the arguments in the correct order.
        * symtab.c (maybe_add_partial_symtab_filename): Declare
        the arguments in the correct order.
2010-08-19 09:04:13 +00:00
Jan Kratochvil 35633fef92 gdb/
* varobj.c (varobj_create): Replace variable old_fi with old_id,
	initialize it by null_frame_id, wrap its usage by get_frame_id,
	frame_id_p and frame_find_by_id.
2010-08-19 07:34:27 +00:00
Pierre Muller 7b3fd85942 * gdb.base/default.exp (info set): Avoid full buffer error and force
reading up to final gdb prompt.
	(show): Likewise.
2010-08-19 07:05:56 +00:00
gdbadmin 561ff6a444 *** empty log message *** 2010-08-19 00:00:35 +00:00
Tom Tromey 94f7449c81 PR python/11900:
* configure: Rebuild.
	* configure.ac: Add install-python to CONFIG_INSTALL.
	* Makefile.in (install-python): New.
2010-08-18 22:57:46 +00:00
Doug Evans f3574227a8 * gdb_assert.h (gdb_assert_not_reached): New macro.
(gdb_assert_fail): Fix typo in comment.
	* avr-tdep.c (avr_return_value): Use gdb_assert_not_reached instead of
	gdb_assert (0).
	* darwin-nat.c (darwin_check_new_threads): Ditto.
	* dwarf2read.c (dwarf2_get_section_info): Ditto.
	(munmap_section_buffer): Ditto.
	* m32c-tdep.c (make_types): Ditto.
	(m32c_decode_srcdest4, m32c_decode_sd23, m32c_frame_base): Ditto.
	* macroexp.c (get_character_constant): Ditto.
	(get_string_literal): Ditto.
	* mep-tdep.c (mep_pseudo_cr_size): Ditto.
	(mep_pseudo_cr_index, mep_register_type): Ditto.
	(mep_pseudo_register_read, mep_pseudo_register_write): Ditto.
	(mep_get_insn, mep_analyze_prologue): Ditto.
	* objfiles.c (qsort_cmp): Ditto.
	* prologue-value.c (pv_is_identical): Ditto.
	* record.c (record_get_loc): Ditto.
	* value.c (value_static_field): Ditto.
	* xtensa-tdep.c (call0_track_op): Ditto.
2010-08-18 19:13:33 +00:00
Tom Tromey c92817ce8d gdb
PR symtab/11919:
	* gdbtypes.c (lookup_struct_elt_type): Clean up error emission.
	* parse.c (parse_field_expression): Use RETURN_MASK_ERROR.  Move
	name-copying lower.  Document exception behavior.
	* completer.c (expression_completer): Catch exceptions from
	parse_field_expression.
gdb/testsuite
	PR symtab/11919:
	* gdb.base/completion.exp: Add test.
2010-08-18 19:02:34 +00:00