Commit Graph

1263 Commits

Author SHA1 Message Date
Joel Brobecker a2d5da46c6 * gdbint.texinfo (Native Debugging): Remove entry for PROC_NAME_FMT.
This macro is no longer used.
2009-04-16 17:42:00 +00:00
Tom Tromey 732f6a935c gdb
* c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
	(c_printstr): Likewise.
	* charset.c: Include gdb_wait.h.
	(make_wchar_iterator): Use INTERMEDIATE_ENCODING.
	(find_charset_names): Use pexecute.  Handle libiconv's output.
	Detect errors.
	(_initialize_charset): Use xstrdup.
	* gdb_wchar.h: Check HAVE_BTOWC.  Split PHONY_ICONV and wchar
	cases.
	(INTERMEDIATE_ENCODING): New define.
	* configure, config.in: Rebuild.
	* configure.ac: Check for btowc.
gdb/doc
	* gdb.texinfo (Character Sets): Document default character set.
2009-04-15 22:20:32 +00:00
Pierre Muller 87f9adc166 * gdbint.texinfo: Change server name from sources.redhat.com to
sourceware.org throughout.
2009-04-14 18:18:41 +00:00
Joel Brobecker 2c88c651a4 * gdb.texinfo (Set Breaks): Rewrite a paragraph to avoid a warning
about a missing dot or coma after @xref.
2009-04-09 20:11:57 +00:00
Joel Brobecker 4f5376b2eb * gdb.texinfo (Backtrace): Add a parameter in frame 1 of the first
example, and add a small explanation about it.
        (Print Settings): Change the documentation of the "set print
        frame-arguments" to reflect the fact that the default is now "scalars".
2009-04-02 15:56:08 +00:00
Joel Brobecker a0381d3a18 * gdb.texinfo (Print Settings): Add kindex for command "set
print frame-arguments".
2009-04-02 15:54:50 +00:00
Joel Brobecker 45ac276db3 * gdb.texinfo (Ada Tasks): Add documentation about task-specific
breakpoints.
        (Set Breaks): Add reference to thread-specific and task-specific
        breakpoints.
2009-03-31 16:51:02 +00:00
Joel Brobecker 32cd1edcd2 * gdb.texinfo (Ada Tasks): Remove the documentation about
the "Running" state, as this state has been eliminated.
        Now all runnable tasks are shown as "Runnable".
2009-03-31 16:33:37 +00:00
Stan Shebs 1042e4c058 2009-03-30 Stan Shebs <stan@codesourcery.com>
Make tracepoints into a type of breakpoint.
	* breakpoint.h (enum bptype): Add bp_tracepoint.
	(struct breakpoint): Add fields step_count, pass_count, actions.
	(get_tracepoint, get_tracepoint_by_number): Declare.
	(all_tracepoints): Declare.
	* breakpoint.c: Include tracepoint.h, readline.h.
	(ALL_TRACEPOINTS): Move here from tracepoint.c.
	(tracepoint_count): Ditto.
	(should_be_inserted): GDB does not insert tracepoints itself.
	(print_it_typical): Add tracepoint case.
	(bpstat_what): Ditto.
	(print_one_breakpoint_location): Ditto, and add printing for
	pass count, step count, and action list.
	(user_settable_breakpoint): Add tracepoint case.
	(allocate_bp_location): Ditto.
	(set_breakpoint_location_function): Ditto.
	(disable_breakpoints_in_shlibs): Ditto.
	(mention): Ditto.
	(break_command_really): Add argument traceflag, use to choose
	basic breakpoint type.
	(break_command_1): Pass extra argument.
	(set_breakpoint, handle_gnu_v3_exceptions): Ditto.
	(breakpoint_re_set_one): Add tracepoint case.
	(disable_command, enable_command): Ditto.
	(set_tracepoint_count): Move here from tracepoint.c.
	(trace_command): Move here from tracepoint.c and use
	break_command_really.
	(tracepoints_info): Move here from tracepoint.c and call
	breakpoints_info.
	(enable_trace_command): Move here from tracepoint.c and call
	enable_command.
	(disable_trace_command): Move here from tracepoint.c and call
	disable_command.
	(delete_trace_command): Move here from tracepoint.c and call
	delete_breakpoint.
	(trace_pass_command): Move here from tracepoint.c.
	(get_tracepoint_by_number): Ditto.
	(tracepoint_save_command): Ditto.
	(get_tracepoint): New function.
	(all_tracepoints): New function.
	(_initialize_breakpoint): Move tracepoint init from tracepoint.c,
	deprecate "enable trace" and "disable trace" commands.
	* tracepoint.h (struct tracepoint): Remove.
	(tracepoint_chain): Remove decl.
	(deprecated_create_tracepoint_hook): Remove decl.
	(deprecated_delete_tracepoint_hook): Remove decl.
	(deprecated_modify_tracepoint_hook): Remove decl.
	(ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
	(free_actions): Update signature.
	(validate_actionline): Update signature.
	(end_actions_pseudocommand): Declare.
	(while_stepping_pseudocommand): Declare.
	* tracepoint.c: Include breakpoint.h.
	(tracepoint_chain, tracepoint_count): Remove.
	(free_actions, make_cleanup_free_actions): Update signature.
	(trace_command, set_raw_tracepoint): Remove.
	(trace_mention): Remove.
	(tracepoints_info): Remove.
	(tracepoint_operation, map_args_over_tracepoints): Remove.
	(get_tracepoint_by_number): Remove.
	(enable_trace_command, disable_trace_command): Remove.
	(delete_trace_command, trace_pass_command): Remove.
	(trace_actions_command, read_actions): Update signature.
	(validate_actionline): Update signature, use bp loc.
	(encode_actions): Ditto.
	(download_tracepoint): New function, body of trace_start_command.
	(trace_start_command): Call it, use all_tracepoints.
	(tracepoint_save_command): Remove.
	(tracepoint_dump_command): Use get_tracepoint.
	(end_actions_pseudocommand): Make globally visible.
	(while_stepping_pseudocommand): Ditto.
	(_initialize_tracepoint): Move command definitions to breakpoint.c.

	doc/
	* gdb.texinfo (Tracepoints): Describe tracepoints as a
	special case of breakpoints.
	(Enable and Disable Tracepoints): Mention deprecation.
	(Listing Tracepoints): Update description and example.

	testsuite/
	* gdb.trace/actions.exp: Update to match new info trace format.
	* gdb.trace/deltrace.exp: Ditto.
	* gdb.trace/infotrace.exp: Ditto.
	* gdb.trace/passcount.exp: Ditto.
	* gdb.trace/save-trace.exp: Ditto.
	* gdb.trace/while-stepping.exp: Ditto.
	* gdb.trace/tracecmd.exp: Ditto, plus don't allow pending option.

	gdbtk/
	* generic/gdbtk-bp.c (gdb_actions_command): Update to handle
	tracepoints as breakpoints.
	(gdb_get_tracepoint_info): Ditto, plus use get_tracepoint and
	breakpoint locations.
	(tracepoint_exists): Ditto, plus use all_tracepoints.
2009-03-31 05:08:37 +00:00
Thiago Jung Bauermann f8f6f20b6e gdb/
Expose frames to Python.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
	(SUBDIR_PYTHON_SRCS): Add python-frame.c.
	(python-frame.o): New target.
	* python/python-frame.c: New file.
	* python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
	gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
	gdbpy_initialize_frames): New prototypes.
	* python/python.c (_initialize_python): Call gdbpy_initialize_frames.
	(GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
	entries.
	* stack.c (find_frame_funname): New function, factored out of
	print_frame.
	(print_frame): Call find_frame_funname.
	* stack.h (find_frame_funname): Add prototype.

gdb/doc/
	* gdb.texinfo (Frames in Python): New node.
	(Python API): Update.

gdb/testsuite/
	* gdb.python/python-frame.c: New file.
	* gdb.python/python-frame.exp: New file.
2009-03-30 19:54:33 +00:00
Thiago Jung Bauermann c0c6f77785 gdb/
Change gdb.Value.address from a method to an attribute.
	* python/python-value.c (value_object): Add `address' element.
	(valpy_dealloc): Decrement reference to self->address if set.
	(valpy_new): Initialize val_obj->address.
	(valpy_address): Rename to ...
	(valpy_get_address): ... this.  Change signature from method to
	attribute.  Update self->address if not set.
	(value_to_value_object): Initialize val_obj->address.
	(value_object_getset): Add `address' element.
	(value_object_methods): Remove `address' element.

gdb/testsuite/
	* gdb.python/python-value.exp: Add tests for the address
	attribute.

gdb/doc/
	* gdb.texinfo (Values From Inferior): Change gdb.Value.address
	from a method to an attribute.
2009-03-29 21:11:11 +00:00
Thiago Jung Bauermann def2b0009c gdb/
Add gdb.Value.is_optimized_out attribute.
	* python/python-value.c (valpy_get_is_optimized_out): New
	function.
	(value_object_getset): New variable.
	(value_object_type): Initialize tp_getset element.

gdb/doc/
	* gdb.texinfo (Values From Inferior): Document is_optimized_out
	attribute.

gdb/testsuite/
	* gdb.python/python-value.exp (test_value_in_inferior): Test
	gdb.Value.is_optimized_out attribute.
2009-03-26 20:58:11 +00:00
Pedro Alves a07daef34e gdb/
* infrun.c (infrun_thread_thread_exit): New.
	(_initialize_infrun): Attach it to the thread_exit observer.
	* thread.c (delete_thread_1): Always call the observer, passing it
	the silent flag.
	* mi/mi-interp.c (mi_thread_exit): Add "silent" parameter.  If
	SILENT, return immediately.

gdb/doc/
	* observer.texi (thread_exit): Add "silent" parameter.
2009-03-25 21:53:11 +00:00
Pedro Alves f3b1572e1a gdb/
* mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
	to the about_to_proceed observer notification.
	(mi_about_to_proceed): New.
	(mi_on_resume): Only output ^running and the prompt here if the
	target was proceeded.
	* breakpoint.c (breakpoint_proceeded): New static.
	(breakpoint_about_to_proceed): New.
	(_initialize_breakpoints): Attach breakpoint_about_to_proceed to
	the about_to_proceed observer notification.
	* inferior.h (breakpoint_proceeded): Delete declaration.
	* infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
	Notify the about_to_proceed observers.
	(struct inferior_status): Delete breakpoint_proceeded member.
	(save_inferior_status): Don't save it.
	(restore_inferior_status): Don't restore it.
	* mi-main.h (mi_proceeded): Declare.
	* mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
	a command.

gdb/doc/

	* observer.texi (about_to_proceed): New.
2009-03-22 18:06:07 +00:00
Eli Zaretskii 1db612985f From Jeremy Bennett <jeremy.bennett@embecosm.com>:
* stack_frame.eps: Version of image for TeX DVI output.
2009-03-21 14:35:04 +00:00
Eli Zaretskii 587afa3811 From Jeremy Bennett <jeremy.bennett@embecosm.com>:
* gdbint.texinfo (everywhere): Use braces {} in @deftypeXX type
	field throughout to handle types with spaces in them.  Fix typos
	found by aspell.
	(Summary, Requirements, Contributors): New first chapter,
	"Summary" added, old Requirements section moved there, and new
	section, "Contributors" added.
	(Initializing a New Architecture, Register Representation)
	(Frame Interpretation, Inferior Call Setup, Adding a New Target)
	(Porting gdb): These sections extended and updated.
	(Compiler Characteristics): This section (empty) deleted.
	(Defining Other Architecture Features): This section renamed and
	duplicate material removed from (formerly "Target Conditionals").
	Use braces {} in @deftypeXX type field throughout to handle types
	with spaces in them. Typos found by aspell fixed.

	* stack_frame.svg: New file, source of image for gdbint.texinfo.
	* stack_frame.pdf: Version of image for PDF output.
	* stack_frame.png: Version of image for HTML output and for Emacs.
	* stack_frame.txt: Version of image for Info output.
2009-03-21 10:24:35 +00:00
Eli Zaretskii 10af6951e8 * gdb.texinfo (Character Sets): Fix last change. 2009-03-21 08:33:14 +00:00
Thiago Jung Bauermann cc924cad91 gdb/
2009-03-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Jim Blandy  <jimb@red-bean.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Tom Tromey  <tromey@redhat.com>

	Miscellaneous fixes to the Python code.
	* python/python-cmd.c (cmdpy_init): Accept keyword
	arguments.
	* python/python-value.c (valpy_string): Accept keyword
	arguments.
	(valpy_binop): Use `break' to exit from the TRY_CATCH block.
	Do not call value_to_value_object on NULL RES_VAL.
	(value_object_methods): Change `string' entry to also accept
	keyword arguments.
	(convert_value_from_python): Return a copy of the value if obj is
	a gdb.Value object.
	(value_object_methods): Mark the `string' method as accepting
	keywords, and show method "prototype" in the doc string.
	* python/python.c (get_parameter): Don't return inside a
	TRY_CATCH.

gdb/doc/
2009-03-21  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.texinfo (Values From Inferior): Fix optional arguments
	markup.
	(Commands In Python): Adjust argument names of gdb.Command.__init__
	to what the function accepts as keywords.

gdb/testsuite/
2009-03-21  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-cmd.exp: Add tests for keyword arguments.
	* gdb.python/python-function.exp: Add test for function returning
	a GDB value.
2009-03-21 03:13:02 +00:00
Thiago Jung Bauermann bc3b79fd1a gdb/
2009-03-05  Tom Tromey  <tromey@redhat.com>

	Add support for convenience functions in Python.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
	(SUBDIR_PYTHON_SRCS): Add python-function.c.
	(python-function.o): New target.
	* eval.c: Include "python/python.h" and <ctype.h>.
	(evaluate_subexp_standard): Handle values of type
	TYPE_CODE_INTERNAL_FUNCTION.
	* gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
	* parse.c (write_exp_string): Remove duplicate word in comment.
	* python/python-function.c: New file.
	* python/python-internal.h (gdbpy_initialize_functions): Add
	prototype.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_functions.
	* valprint.c (value_check_printable): Handle values of type
	TYPE_CODE_INTERNAL_FUNCTION.
	* value.c: Include "cli/cli-decode.h".
	(internal_function): New struct.
	(functionlist, internal_fn_type): New static variables.
	(lookup_only_internalvar,
	lookup_internalvar): Add const qualifier to name argument.
	(create_internalvar): Likewise.  Initialize new field.
	(set_internal_var): Fix typo in comment.  Don't allow assignment
	to canonical variable.
	(value_create_internal_function, value_internal_function_name,
	call_internal_function, function_command, function_destroyer,
	add_internal_function): New functions.
	(_initialize_values): Create `function' placeholder command.
	Initialize internal_fn_type.
	* value.h (lookup_only_internalvar, create_internalvar,
	lookup_internalvar): Add const qualifier to name argument.
	(internal_function_fn, add_internal_function, call_internal_function,
	value_internal_function_name): Add prototypes.
	(struct internalvar) <canonical>: New field.

gdb/doc/
2008-03-05  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Convenience Vars): Document convenience functions.
	(Functions In Python): New node.
	(Python API): Update.

gdb/testsuite/
2009-03-05  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-function.exp: New file.
2009-03-21 03:03:56 +00:00
Tom Tromey 6c7a06a3fa gdb:
2009-03-19  Tom Tromey  <tromey@redhat.com>
	    Julian Brown  <julian@codesourcery.com>

	PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
	PR i18n/9401, PR exp/9613:
	* NEWS: Update
	* value.h (value_typed_string): Declare.
	(val_print_string): Update.
	* valprint.h (print_char_chars): Update.
	* valprint.c (print_char_chars): Add type argument.  Update.
	(val_print_string): Likewise.
	* valops.c (value_typed_string): New function.
	* utils.c (host_char_to_target): New function.
	(parse_escape): Use host_char_to_target, host_hex_value.  Update.
	Remove '^' case.
	(no_control_char_error): Remove.
	* typeprint.c (print_type_scalar): Update.
	* scm-valprint.c (scm_scmval_print): Update.
	* scm-lang.h (scm_printchar, scm_printstr): Update.
	* scm-lang.c (scm_printchar): Add type argument.
	(scm_printstr): Likewise.
	* printcmd.c (print_formatted): Update.
	(print_scalar_formatted): Update.
	(printf_command) <wide_string_arg, wide_char_arg>: New constants.
	Handle '%lc' and '%ls'.
	* parser-defs.h (struct typed_stoken): New type.
	(struct stoken_vector): Likewise.
	(write_exp_string_vector): Declare.
	* parse.c (write_exp_string_vector): New function.
	* p-valprint.c (pascal_val_print): Update.
	* p-lang.h (is_pascal_string_type, pascal_printchar,
	pascal_printstr): Update.
	* p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
	Add 'char_type' argument.
	(pascal_emit_char): Add type argument.
	(pascal_printchar): Likewise.
	(pascal_printstr): Likewise.
	* objc-lang.c (objc_emit_char): Add type argument.
	(objc_printchar): Likewise.
	(objc_printstr): Likewise.
	* macroexp.c (get_character_constant): Handle unicode characters.
	Use c_parse_escape.
	(get_string_literal): Handle unicode strings.  Use
	c_parse_escape.
	* m2-valprint.c (print_unpacked_pointer): Update.
	(m2_print_array_contents): Update.
	(m2_val_print): Update.
	* m2-lang.c (m2_emit_char): Add type argument.
	(m2_printchar): Likewise.
	(m2_printstr): Likewise.
	* language.h (struct language_defn) <la_printchar>: Add type
	argument.
	<la_printstr, la_emitchar>: Likewise.
	(LA_PRINT_CHAR): Likewise.
	(LA_PRINT_STRING): Likewise.
	(LA_EMIT_CHAR): Likewise.
	* language.c (unk_lang_emit_char): Add type argument.
	(unk_lang_printchar): Likewise.
	(unk_lang_printstr): Likewise.
	* jv-valprint.c (java_val_print): Update.
	* jv-lang.c (java_emit_char): Add type argument.
	* f-valprint.c (f_val_print): Update.
	* f-lang.c (f_emit_char): Add type argument.
	(f_printchar): Likewise.
	(f_printstr): Likewise.
	* expprint.c (print_subexp_standard): Update.
	* charset.h (target_wide_charset): Declare.
	(c_target_char_has_backslash_escape, c_parse_backslash,
	host_char_print_literally, host_char_to_target,
	target_char_to_host, target_char_to_control_char): Remove.
	(enum transliterations): New type.
	(convert_between_encodings): Declare.
	(HOST_ESCAPE_CHAR): New define.
	(host_letter_to_control_character, host_hex_value): Declare.
	(enum wchar_iterate_result): New enum.
	(struct wchar_iterator): Declare.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): Declare.
	* charset-list.h: New file.
	* c-valprint.c (textual_name): New function.
	(textual_element_type): Handle wide character types.
	(c_val_print): Pass original type to textual_element_type.  Handle
	wide character types.
	(c_value_print): Use textual_element_type.  Pass original type of
	value to val_print.
	* c-lang.h (enum c_string_type): New type.
	(c_printchar, c_printstr): Update.
	* c-lang.c (classify_type): New function.
	(print_wchar): Likewise.
	(c_emit_char): Add type argument.  Handle wide characters.
	(c_printchar): Likewise.
	(c_printstr): Add type argument.  Handle wide and multibyte
	character sets.
	(convert_ucn): New function.
	(emit_numeric_character): Likewise.
	(convert_octal): Likewise.
	(convert_hex): Likewise.
	(ADVANCE): New macro.
	(convert_escape): New function.
	(parse_one_string): Likewise.
	(evaluate_subexp_c): Likewise.
	(exp_descriptor_c): New global.
	(c_language_defn): Use exp_descriptor_c.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	(charset_for_string_type): New function.
	* c-exp.y (%union): Add 'svec' and 'tsval'.
	(CHAR): New token.
	(exp): Add CHAR production.
	(string_exp): Rewrite.
	(exp) <string_exp>: Rewrite.
	(tempbuf): Now global.
	(tempbuf_init): New global.
	(parse_string_or_char): New function.
	(yylex) <tempbuf>: Now global.
	<tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
	Remove.
	Handle 'u', 'U', and 'L' prefixes.  Call parse_string_or_char.
	(c_parse_escape): New function.
	* auxv.c (fprint_target_auxv): Update.
	* ada-valprint.c (ada_emit_char): Add type argument.
	(ada_printchar): Likewise.
	(ada_print_scalar): Update.
	(printstr): Add type argument.  Update calls to ada_emit_char.
	(ada_printstr): Add type argument.
	(ada_val_print_array): Update.
	(ada_val_print_1): Likewise.
	* ada-lang.c (emit_char): Add type argument.
	* ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
	type arguments.
	* gdb_locale.h: Include langinfo.h.
	* charset.c (_initialize_charset): Set default host charset from
	the locale.  Don't register charsets.  Add target-wide-charset
	commands.  Call find_charset_names.
	(struct charset, struct translation): Remove.
	(GDB_DEFAULT_HOST_CHARSET): Remove.
	(GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
	(target_wide_charset_name): New global.
	(show_host_charset_name): Handle "auto".
	(show_target_wide_charset_name): New function.
	(host_charset_enum, target_charset_enum): Remove.
	(charset_enum): New global.
	(all_charsets, register_charset, lookup_charset, all_translations,
	register_translation, lookup_translation): Remove.
	(simple_charset, ascii_print_literally, ascii_to_control): Remove.
	(iso_8859_print_literally, iso_8859_to_control,
	iso_8859_family_charset): Remove.
	(ebcdic_print_literally, ebcdic_to_control,
	ebcdic_family_charset): Remove.
	(struct cached_iconv, check_iconv_cache, cached_iconv_convert,
	register_iconv_charsets): Remove.
	(target_wide_charset_be_name, target_wide_charset_le_name): New
	globals.
	(identity_either_char_to_other): Remove.
	(set_be_le_names, validate): New functions.
	(backslashable, backslashed, represented): Remove.
	(default_c_target_char_has_backslash_escape): Remove.
	(default_c_parse_backslash, iconv_convert): Remove.
	(ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
	ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
	iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
	ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
	ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
	ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
	(table_convert_char, table_translation, simple_table_translation):
	Remove.
	(current_host_charset, current_target_charset,
	c_target_char_has_backslash_escape_func,
	c_target_char_has_backslash_escape_baton): Remove.
	(c_parse_backslash_func, c_parse_backslash_baton): Remove.
	(host_char_to_target_func, host_char_to_target_baton): Remove.
	(target_char_to_host_func, target_char_to_host_baton): Remove.
	(cached_iconv_host_to_target, cached_iconv_target_to_host):
	Remove.
	(lookup_charset_or_error, check_valid_host_charset): Remove.
	(set_host_and_target_charsets): Remove.
	(set_host_charset, set_target_charset): Remove.
	(set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
	(set_target_wide_charset_sfunc): New function.
	(show_charset): Print target wide character set.
	(host_charset, target_charset): Rewrite.
	(target_wide_charset): New function.
	(c_target_char_has_backslash_escape): Remove.
	(c_parse_backslash): Remove.
	(host_letter_to_control_character): New function.
	(host_char_print_literally): Remove.
	(host_hex_value): New function.
	(target_char_to_control_char): Remove.
	(cleanup_iconv): New function.
	(convert_between_encodings): New function.
	(target_char_to_host): Remove.
	(struct wchar_iterator): Define.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): New functions.
	(do_cleanup_iterator): New function.
	(char_ptr): New typedef.
	(charsets): New global.
	(add_one, find_charset_names): New functions.
	(default_charset_names): New global.
	(auto_host_charset_name): Likewise.
	* aclocal.m4, config.in, configure: Rebuild.
	* configure.ac: Call AM_LANGINFO_CODESET.
	(GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
	(AM_ICONV): Invoke earlier.
	* acinclude.m4: Include codeset.m4.  Subst LIBICONV_INCLUDE and
	LIBICONV_LIBDIR.  Check for libiconv in build tree.
	* Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
	(INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
	(INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
	* gdb_obstack.h (obstack_grow_wstr): New define.
        * gdb_wchar.h: New file.
        * defs.h: Include it.
gdb/testsuite:
	* gdb.base/store.exp: Update for change to escape output.
	* gdb.base/callfuncs.exp (fetch_all_registers): Update for change
	to escape output.
	* gdb.base/pointers.exp: Update for change to escape output.
	* gdb.base/long_long.exp (gdb_test_long_long): Update for change
	to escape output.
	* gdb.base/constvars.exp (do_constvar_tests): Update for change to
	escape output.
	* gdb.base/call-rt-st.exp (print_struct_call): Update for change
	to escape output.
	* gdb.cp/ref-types.exp (gdb_start_again): Update for change to
	escape output.
	* gdb.base/setvar.exp: Update for change to escape output.
	* lib/gdb.exp (default_gdb_start): Set LC_CTYPE to C.
	* gdb.base/printcmds.exp (test_print_all_chars): Update for change
	to escape output.
	(test_print_string_constants): Likewise.
	* gdb.base/charset.exp (valid_host_charset): Check size of
	wchar_t.  Handle UCS-2 and UCS-4.  Add tests for wide and unicode
	cases.  Handle "auto"-related output.
	* gdb.base/charset.c (char16_t, char32_t): New typedefs.
	(uvar, Uvar): New globals.
gdb/doc:
	* gdb.texinfo (Character Sets): Remove obsolete text.  Document
	set target-wide-charset.
	(Requirements): Mention iconv.
2009-03-20 23:04:40 +00:00
Hui Zhu b646ddd43a * gdb.texinfo: Change the introduce of "disassemble-next-line". 2009-03-17 06:01:10 +00:00
Hui Zhu 91440f573c * gdb.texinfo: Add documentation for disassemble-next-line. 2009-03-17 05:14:01 +00:00
Thiago Jung Bauermann 8fd4122798 * gdb.texinfo (Commands In Python): Remove tindex entries. 2009-03-16 03:34:45 +00:00
Jan Kratochvil 61ff14c69a gdb/
* stack.c (return_command <retval_exp>): New variables retval_expr
	and old_chain.  Inline parse_and_eval to initialize retval_expr.  Check
	RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
	if RETURN_TYPE is NULL.

gdb/doc/
	* gdb.texinfo (Returning): New description for missing debug info.

gdb/testsuite/
	* gdb.base/return-nodebug.exp, gdb.base/return-nodebug.c: New.
2009-03-15 09:19:40 +00:00
Pedro Alves 0b16c5cfaf 2009-03-14 Pedro Alves <pedro@codesourcery.com>
gdb/
	* remote.c (PACKET_qAttached): New.
	(remote_query_attached): New.
	(remote_add_inferior): Add new `attached' argument.  Handle it.
	(remote_notice_new_inferior, remote_start_remote): Adjust to pass
	-1 to remote_add_inferior in new parameter.
	(extended_remote_attach_1): Adjust to pass 1 to
	remote_add_inferior in the new parameter.
	(extended_remote_create_inferior_1): Adjust to pass 0 to
	remote_add_inferior in the new parameter.
	(_initialize_remote): Add "set/show remote query-attached-packet"
	commands.

2009-03-14  Pedro Alves  <pedro@codesourcery.com>

	gdb/gdbserver/
	* server.c (handle_query): Handle "qAttached".

2009-03-14  Pedro Alves  <pedro@codesourcery.com>

	gdb/doc/
	* gdb.texinfo (Remote Configuration): Document query-attached.
        (General Query Packets): Document qAttached.
2009-03-14 01:38:08 +00:00
Pedro Alves 32fc0df94f * gdb.texinfo (Background Execution): Better describe the set
target-async command.
	(Maintenance Commands): Delete description of the `maint set/show
	linux-async' and `maint set/show remote-async' commands.
2009-03-05 23:11:11 +00:00
Vladimir Prus 134eb42cf4 * gdb.texinfo (GDB/MI Async Records): Add double-spaces
between sentences.
2009-02-18 19:45:45 +00:00
Vladimir Prus c86cf02930 * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
(mi_interpreter_init): Register the above.
	* solib.c (clear_solib): Notify solib unload.
	* breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
	disable breakpoints on a.out targets.
2009-02-18 07:28:34 +00:00
Vladimir Prus 3ea85240b3 * observer.c (observer_test_first_notification_function)
(observer_test_second_notification_function)
	(observer_test_third_notification_function): Adjust prototype.
2009-02-17 19:52:27 +00:00
Vladimir Prus 1d33d6baa4 Include frame information for *stopped due to CLI commands.
* ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
        * infcmd.c (finish_command_continuation): Pass '1' for
        'print_frame' parameter to the observer.
        * infrun.c (normal_stop): Don't print mi-specific information
        here. Pass 'stop_print_frame' to the 'print_frame' parameter
        of the observer.
        * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
        If we need to print frame, and current uiout is not the MI one,
        print frame again.
2009-02-14 15:24:44 +00:00
Eli Zaretskii d721c93393 *** empty log message *** 2009-02-07 10:02:27 +00:00
Pedro Alves 4aa995e123 2009-02-06 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
	* infrun.c (siginfo_value_read, siginfo_value_write): New.
	(siginfo_value_funcs): New.
	(siginfo_make_value): New.
	(_initialize_infrun): Create the $_siginfo convenience variable.
	* gdbtypes.h (append_composite_type_field_aligned): Declare.
	* gdbtypes.c (append_composite_type_field): Rename to...
	(append_composite_type_field_aligned): ... this.  Add ALIGNMENT
	argument.  Handle it.
	(append_composite_type_field): Rewrite on top of
	append_composite_type_field_aligned.
	* value.h (internalvar_make_value): New typedef.
	(struct internalvar) <make_value>: New field.
	(create_internalvar_type_lazy): Declare.
	* value.c (create_internalvar): Clear make_value.
	(create_internalvar_type_lazy): New.
	(value_of_internalvar): If make_value is set use it.
	(preserve_values): Skip internal variables that don't have a
	value.
	* gdbarch.sh (get_siginfo_type): New.
	* gdbarch.h, gdbarch.c: Regenerate.

	* linux-tdep.h, linux-tdep.c: New.
	* amd64-linux-tdep.c: Include "linux-tdep.h".
	(amd64_linux_init_abi): Register linux_get_siginfo_type and
	linux_get_siginfo_mapper.
	* i386-linux-tdep.c: Include "linux-tdep.h".
	(i386_linux_init_abi): Register linux_get_siginfo_type and
	linux_get_siginfo_mapper.
	* arm-linux-tdep.c: Include "linux-tdep.h".
	(i386_linux_init_abi): Register linux_get_siginfo_type and
	linux_get_siginfo_mapper.

	* linux-nat.c (linux_xfer_siginfo): New.
	(linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
	* remote.c (PACKET_qXfer_siginfo_read)
	(PACKET_qXfer_siginfo_write): New.
	(feature remote_protocol_features): Add "qXfer:siginfo:read" and
	"qXfer:siginfo:write" features.
	(remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
	(_initialize_remote): Add "set/show remote read-siginfo-object"
	and "set/show remote write-siginfo-object" commands.

	* Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
	(HFILES_NO_SRCDIR): Add linux-tdep.h.
	(ALLDEPFILES): Add linux-tdep.c.

	* configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
	(i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
	gdb_target_obs.

2009-02-06  Pedro Alves  <pedro@codesourcery.com>

	gdb/gdbserver/
	* server.c (handle_query): Report qXfer:siginfo:read and
	qXfer:siginfo:write as supported and handle them.
	* target.h (struct target_ops) <qxfer_siginfo>: New field.
	* linux-low.c (linux_xfer_siginfo): New.
	(linux_target_ops): Set it.

2009-02-06  Pedro Alves  <pedro@codesourcery.com>

	gdb/doc/
	* gdb.texinfo (Signals): Document $_siginfo.
	(Convenience Variables): Mention $_siginfo.
	(Remote Configuration): Document qXfer:siginfo:read,
	qXfer:siginfo:write packets, and the read-siginfo-object,
	write-siginfo-object commands.

2009-02-06  Pedro Alves  <pedro@codesourcery.com>

	gdb/testsuite/
	* gdb.base/siginfo-obj.c, gdb.base/siginfo-obj.exp: New.
2009-02-06 22:59:01 +00:00
Pedro Alves 5f5233d48e gdb/
2009-02-06  Jim Blandy  <jimb@codesourcery.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>
	    Vladimir Prus  <vladimir@codesourcery.com>
	    Pedro Alves  <pedro@codesourcery.com>

	* defs.h (enum lval_type): New value: lval_computed.
	* value.h (struct lval_funcs): New type.
	(allocate_computed_value, value_computed_funcs)
	(value_computed_closure): New declarations.
	* value.c (struct value): Add a structure to the location union
	for computed lvalues, containing 'funcs' and 'closure' members.
	(allocate_computed_value, value_computed_funcs)
	(value_computed_closure): New functions.
	(value_free): For computed lvalues, call the closure's
	'free_closure' function before freeing the value itself.
	(value_copy): If we're copying an lval_computed value, call the
	closure's 'copy_closure' function.
	(set_value_component_location): If the original value is a
	computed lvalue, then call the closure's 'copy_closure' function.
	(value_of_internalvar): If an internal variable's value is a
	computed lvalue, make retrieving its value produce an equivalent
	computed lvalue.
	* valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
	their read function.
	(value_assign): Assign to computed lvalues by calling their write
	function.

gdb/doc/
2009-02-06  Pedro Alves  <pedro@codesourcery.com>

	* gdbint.texinfo (Values): New chapter.
2009-02-06 22:50:52 +00:00
Thiago Jung Bauermann d8906c6f0e gdb/
2009-02-06  Tom Tromey  <tromey@redhat.com>

	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
	(SUBDIR_PYTHON_SRCS): Add python-cmd.c.
	(python-cmd.o): New target.
	* cli/cli-decode.c (set_cmd_completer): Add self parameter to
	completer prototype.
	(add_cmd): Initialize destroyer member of cmd_list_element. Use
	make_symbol_completion_list_fn as completer.
	(delete_cmd): Call destroyer if one is set.
	* cli/cli-decode.h (cmd_list_element): Add cmd parameter to
	completer member.  Add destroyer member.
	(set_cmd_completer): Add self parameter to
	completer prototype.
	* command.h (set_cmd_completer): Add cmd parameter to
	completer prototype.
	* completer.c (noop_completer, filename_completer,
	location_completer, expression_completer, command_completer): Adapt
	to new completer prototype.
	(complete_line_internal): Pass new parameter to completer function.
	* completer.h (noop_completer, filename_completer,
	location_completer, expression_completer, command_completer): Adapt
	prototypes to new completer prototype.
	* interps.c (interpreter_completer): Adapt to new completer
	prototype.
	* python/python-cmd.c: New file.
	* python/python-internal.h (gdbpy_initialize_commands): Add
	prototype.
	(gdbpy_doc_cst): Add forward declaration.
	* python/python.c (gdbpy_doc_cst): Declare.
	(_initialize_python): Call gdbpy_initialize_commands.  Initialize
	gdbpy_doc_cst.
	* symtab.c (make_symbol_completion_list_fn): New function.
	* symtab.h (make_symbol_completion_list_fn): Add prototype.

gdb/doc/
2009-02-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Python API): Add entry for Commands In Python.
	(Commands In Python): New node.

gdb/testsuite/
2009-02-06  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-cmd.exp: New file.
2009-02-06 21:33:59 +00:00
Thiago Jung Bauermann b6cb8e7dea gdb/
2009-02-05  Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Tom Tromey  <tromey@redhat.com>

	* python/python-utils.c (target_string_to_unicode): New function.
	* python/python-internal.h (target_string_to_unicode): New prototype.
	* python/python-value.c (valpy_string): New function.
	(value_object_methods): Add `string' entry.

gdb/doc/
2009-02-05  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Values From Inferior): Document Value.string.
2009-02-05 21:16:09 +00:00
Thiago Jung Bauermann 12453b93bd gdb/
2009-02-05  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* python/python.c (GdbMethods): Move to bottom of file.
	(get_parameter, execute_gdb_command, gdbpy_write,
	gdbpy_flush): Remove forward declarations.
	(eval_python_from_control_command): Fix error checking of function
	PyRun_SimpleString.  Fix error string.
	(python_command): Likewise.
	(execute_gdb_command): Added from_tty argument.

gdb/doc/
2009-02-05  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Basic Python): Document execute's from_tty
	argument.
2009-02-05 16:40:34 +00:00
Thiago Jung Bauermann 08c637dee2 gdb/
2009-02-04  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Phil Muldoon  <pmuldoon@redhat.com>

	* python/python-internal.h (gdbpy_get_value_from_history): Rename
	prototype to gdbpy_history.
	(gdbpy_is_string): Declare.
	(python_string_to_host_string): Declare.
	* python/python-utils.c (gdbpy_is_string): New function.
	(unicode_to_encoded_string): New function.
	(unicode_to_target_string): Use it.
	(python_string_to_host_string): New function.
	* python/python-value.c (valpy_address): New function.
	(convert_value_from_python): Use gdbpy_is_string.  Change to throw
	Python exception instead of a GDB exception on error.  Properly check
	Python booleans.
	(valpy_getitem): Convert field name to host string.  Handle array
	accesses.  Adapt to new behaviour of convert_value_from_python.
	(valpy_new): Adapt to new behaviour of convert_value_from_python.
	(enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
	VALPY_BITXOR, VALPY_BITOR>: New constants.
	(valpy_binop): Update.  Adapt to new behaviour of
	convert_value_from_python.
	(valpy_invert): New function.
	(valpy_lsh): Likewise.
	(valpy_rsh): Likewise.
	(valpy_and): Likewise.
	(valpy_or): Likewise.
	(valpy_xor): Likewise.
	(valpy_richcompare): Call convert_value_from_python instead of doing
	conversions itself.
	(is_intlike, valpy_int, valpy_long, valpy_float): New functions.
	(gdbpy_get_value_from_history): Rename
	function to gdbpy_history.
	(gdbpy_initialize_values): Don't set tp_new.
	(value_object_type): Add valpy_new.
	(value_object_methods): Add `address' entry.
	(value_object_as_number): Update for new methods.
	* python/python.c (GdbMethods): Rename entry from
	`get_value_from_history' to `history'.

gdb/doc/
2009-02-04  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Basic Python): Document gdb.history.

gdb/testsuite/
2009-02-04  Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.python/python-value.exp: Use `gdb.history' instead of
	`gdb.value_from_history'.
	(test_value_numeric_ops): Add test for conversion of enum constant.
	* gdb.python/python-value.c (enum e): New type.
	(evalue): New global.
	(main): Use argv.
2009-02-04 21:55:40 +00:00
Vladimir Prus 592375cda9 PR 8145.
* thread.c (do_captured_list_thread_ids): Report the current
	thread id.
2009-01-30 18:43:05 +00:00
Vladimir Prus 41447f92e2 * breakpoint.c (create_breakpoint, create_breakpoints)
(break_command_really, set_breakpoint): New parameter enabled.
	(create_breakpoint, break_command_really): Make breakpoint
	disabled if so requested.
	* breakpoint.h (set_breakpoint): New parameter enabled.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
2009-01-30 18:28:01 +00:00
Jerome Guitton 098b41a654 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
Jerome Guitton  <guitton@adacore.com>

	* gdb.texinfo (Startup): Document --with-system-gdbinit.
	(System-wide configuration): New section.
2009-01-28 15:04:30 +00:00
Pedro Alves 3c16cced40 gdb/
Add "maint set|show internal-error|internal-warning quit|corefile
	ask|yes|no" commands.

	PR gdb/7580:
	* utils.c (internal_problem_ask, internal_problem_yes)
	(internal_problem_no, internal_problem_modes): New.
	(struct internal_problem): Remove FIXME.  Make should_quit and
	should_dump_core types to char *.
	(internal_vproblem, internal_error_problem)
	(internal_warning_problem): Adjust.
	(set_internal_problem_cmd, show_internal_problem_cmd): New dummy
	functions.
	(add_internal_problem_command): New.
	(_initialize_utils): New.

gdb/doc/
	PR gdb/7580:
	* gdb.texinfo (Maintenance Commands): Document "maint set|show
	internal-error|internal-warning quit|corefile ask|yes|no".
2009-01-26 16:24:27 +00:00
Pedro Alves 62709adfbe gdb/gdbserver/
* server.c (gdbserver_usage): Mention --remote-debug.
	(main): Accept '--remote-debug' switch.

gdb/doc/
	* gdb.texinfo (Using the `gdbserver' Program): Document
	--remote-debug.
2009-01-26 16:16:48 +00:00
Doug Evans 7ce58dd2f4 * gdb.texinfo: Add nexti to list of commands that support
background execution.
2009-01-23 21:43:56 +00:00
Daniel Jacobowitz adb483feb8 * NEWS: Document "define" for prefixed commands.
* cli/cli-cmds.c (show_user): Update calls to show_user_1.  Call
	show_user_1 for prefix commands.
	* cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
	* cli/cli-script.c (validate_comname): Rewrite to handle prefix
	commands.  Return the containing command list.
	(define_command, document_command): Update to handle prefix commands.
	(show_user_1): Add prefix and name arguments.  Handle prefix
	commands.
	* cli/cli-script.h (show_user_1): Update prototype.

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

	testsuite/
	* gdb.base/define.exp: Test defining and hooking prefix commands.
	* gdb.python/python.exp: Update test for "show user" output.
2009-01-14 20:40:09 +00:00
Joseph Myers a67ec3f4ff 2009-01-14 Joseph Myers <joseph@codesourcery.com>
Carlos O'Donell  <carlos@codesourcery.com>

	Fixes for makeinfo --html.

	* annotate.texinfo: Use @copying and @insertcopying.  Use
	@ifnottex in place of @ifinfo.
	* gdb.texinfo: Use @copying and @insertcopying.  Use @ifnottex in
	place of @ifinfo.  Use @ifnotinfo for one index entry.
	* gdbint.texinfo: Use @copying and @insertcopying.  Use @ifnottex
	in place of @ifinfo.
	* stabs.texinfo: Use @copying and @insertcopying.  Use @ifnottex
	in place of @ifinfo.  Include contents at start unconditionally.
2009-01-14 11:47:07 +00:00
Pedro Alves 84fcdf9568 * gdb.texinfo (General Query Packets): Remove @var{} around the
"spu" literal string.
2009-01-13 19:05:53 +00:00
Pedro Alves fa3a767ffc gdb/
2009-01-07  Pedro Alves  <pedro@codesourcery.com>

	Delete ONE_PROCESS_WRITETEXT leftovers.

	* breakpoint.c (insert_bp_location): Delete process_warning
	argument.  Adjust.
	(insert_breakpoint_locations): Adjust.
	(reattach_breakpoints): Adjust.
	* infrun.c (normal_stop): Drop "It might be running in another
	process" notice.

gdb/doc/
2009-01-07  Pedro Alves  <pedro@codesourcery.com>

	* gdb.texinfo (Error in Breakpoints): Delete mention of "The same
	program may be running in another process" errors.
	* gdbint.texinfo (Native Conditionals): Delete
	ONE_PROCESS_WRITETEXT description.
2009-01-07 21:42:50 +00:00
Joel Brobecker 9cb011d3af * gdbint.texinfo (Start of New Year Procedure): Add the "coding"
emacs local variable to be placed at the end of the ChangeLog.
        Add server.c and gdbreplay.c to the list of files where the
        copyright year needs to be updated.
2009-01-07 04:42:45 +00:00
Sandra Loosemore 84603566b7 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
gdb/
	* ser-tcp.c: Adjust includes.
	(tcp_set_cmdlist, tcp_show_cmdlist): Declare.
	(tcp_auto_retry, tcp_retry_limit): Declare.
	(TIMEOUT): Remove, in favor of tcp_retry_limit.
	(POLL_INTERVAL): Increase to 5, in favor of backoff logic.
	(wait_for_connect): New function.
	(net_open): Use it.  Add auto-retry logic.
	(set_tcp_cmd, show_tcp_cmd): New functions.
	(_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
	and "set/show tcp connect-timeout" commands.
	* NEWS: Document new commands.

	gdb/doc/
	* gdb.texinfo (Remote Configuration): Document new
	"set/show tcp auto-retry" and "set/show tcp connect-timeout"
	commands.
2009-01-06 17:07:08 +00:00
Pedro Alves a53f55d8dc * gdbint.texinfo (gdbarch_cannot_fetch_register): Don't mention
FETCH_INFERIOR_REGISTERS.
	(Native Conditionals): Remove obsolete CHILD_PREPARE_TO_STORE,
	FETCH_INFERIOR_REGISTERS descriptions.  Remove
	gdbarch_get_longjmp_target descrition, since already described in
	Target Conditionals.  Move gdbarch_fp0_regnum description to ...
	(Target Conditionals): ... here.
2008-12-28 23:35:52 +00:00
Joel Brobecker 077e0a5242 * gdb.texinfo (Omissions from Ada): Add missing GDB prompt in
examples.
        (Additions to Ada): Likewise. Add the missing opening and closing
        parenthesis of the GDB prompt in one of the examples.
2008-12-16 06:14:00 +00:00
Joel Brobecker 023eb17ca2 * gdb.texinfo (Omissions from Ada): Remove incorrect documentation
about the result of 'Address not being of type System.Address.
        This problem has been fixed a while ago.
2008-12-14 18:30:25 +00:00
Vladimir Prus c3b108f782 MI non-stop and multiprocess docs.
* gdb.texinfo (GDB/MI): New section 'GDB/MI General Design'
        (GDB/MI Output Records): New section 'GDB/MI Frame Information'
        Adjust documentation for *stopped, document =thread-created,
        =thread-exited, =thread-group-created and =thread-group-exited.
        (GDB/MI Thread Commands): Document the 'state' field in
        -thread-info output.
        (GDB/MI Program Execution): Mention --all and --thread-group
        options.
        (GDB/MI Variable Objects): Describe floating and fixed variable
        objects.
        (GDB/MI Miscellaneous Commands): Document -list-thread-groups.
2008-12-02 08:01:15 +00:00
Vladimir Prus 07e059b5a9 Implement -list-thread-groups --available
* Makefile.in (XMLFILES): Add osdata.dtd.
        (SFILES): Add osdata.c.
        (COMMON_OBS): Add osdata.o.
        * linux-nat.c: Include pwd.h, sys/types.h, gdb_dirent.h and xml-support.h.
        (linux_nat_xfer_osdata): New function.
        (linux_xfer_partial): Handle TARGET_OBJECT_OSDATA.
        * osdata.c: New file.
        * osdata.h: New file.
        * remote.c (PACKET_qXfer_osdata): New packet enum.
        (remote_protocol_features): Add "qXfer:osdata:read".
        (remote_read_qxfer): Handle TARGET_OBJECT_OSDATA.
        (extended_remote_can_run): New.
        (init_extended_remote_ops): Set to_can_run to
        extended_remote_can_run.
        (_initialize_remote): Add packet config command for
        "qXfer:osdata:read".
        * xml-support.c (obstack_xml_printf): New function.
        * xml-support.h (obstack_xml_printf): Declare.
        * target.c (target_get_osdata): New function.
        * target.h (enum target_object): Add TARGET_OBJECT_OSDATA.
        (target_os_data): Declare.
        * features/osdata.dtd: New file.
        * mi/mi-main.c (mi_list_thread_groups): Handle the --available
        option.
2008-12-02 07:57:38 +00:00
Tristan Gingold a80b95ba67 gdb:
2008-11-27  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add entry for new native configuration: Darwin.
	* configure.host: Add Darwin host.
	* configure.tgt: Add Darwin target.
	* defs.h (enum gdb_osabi): Add GDB_OSABI_DARWIN.
	* osabi.c (gdb_osabi_names): Add name for Darwin abi.
	* i386-darwin-nat.c: New file.
	* i386-darwin-tdep.c: New file.
	* machoread.c: New file.
	* darwin-nat-info.c: New file.
	* darwin-nat.c: New file.
	* darwin-nat.h: New file.
	* darwin.defs: New file.
	* config/i386/darwin.mh: New file.

gdb/doc:
2008-11-27  Tristan Gingold  <gingold@adacore.com>

	* gdb.texinfo (Darwin): Document Darwin specific features.
2008-11-27 09:23:01 +00:00
Jan Kratochvil a655d42411 * gdbint.texinfo (Target Conditionals): Extend the
gdbarch_breakpoint_from_pc description.
2008-11-26 05:26:40 +00:00
Vladimir Prus 249e11281f * gdb.texinfo (M68K Features): Fix typo. 2008-11-22 12:14:33 +00:00
Paul Pluzhnikov c14c28ba11 2008-11-18 Paul Pluzhnikov <ppluzhnikov@google.com>
* objfiles.h: New MULTI_OBJFILE_P macro.
	* printcmd.c (sym_info): Print object name.
	* maint.c (maintenance_translate_address): Likewise.
2008-11-18 21:31:27 +00:00
Joel Brobecker 394a666683 * gdb.texinfo (Set Catchpoints): Remove the documentation of
commands "catch load" and "catch unload".
2008-11-18 20:43:12 +00:00
Vladimir Prus 66bb093b5f Implement =thread-selected notification.
* mi/mi-common.h (struct mi_interp): New, moved from ...
        * mi/mi-interp.c: ...here.
        * mi/mi-main.c (mi_execute_command): If the thread changed
        as result of command, report that.
2008-11-17 16:43:34 +00:00
Vladimir Prus 4a92f99bc7 Notification for attach/detach.
* inferior.c: Call the process observers.
        * mi/mi-interp.c (mi_new_inferior, mi_inferior_exit): New.
        (mi_interpreter_init): Register the above.
2008-11-17 12:28:05 +00:00
Pedro Alves f0323ca003 gdb/
* Makefile.in (INSTALLED_LIBS, CLIBS): Remove reference to
	$(TM_CLIBS).
	(CDEPS): Remove reference to $(TM_CDEPS).

gdb/doc/
	* gdbint.texinfo (Adding a New Target): Don't mention TDEPFILES,
	.mt files, TM_CLIBS or TM_CDEPS.
	(x86 Watchpoints): Don't mention TDEPFILES.
2008-10-27 11:37:40 +00:00
Sandra Loosemore 8b23ecc445 2008-10-24 Sandra Loosemore <sandra@codesourcery.com>
gdb/doc
	* gdb.texinfo (Remote Protocol): Add new nodes to menu.
	(Overview): Mention notifications and non-stop mode behavior.
	(Packets): Update documentation of ?, vAttach, vCont, and vRun
	with non-stop mode behavior.  Add vStopped description.
	(Stop Reply Packets):  Update list of packets that return
	stop replies.  Mention non-stop behavior.
	(General Query Packets): Document QNonStop packet and associated
	qSupported query response.
	(Interrupts): Clarify multi-threaded behavior.  Mention non-stop
	behavior.
	(Notification Packets): New section.
	(Remote Non-Stop): New section.
	(File-I/O Overview): Mention non-stop behavior.
2008-10-24 21:04:22 +00:00
Hui Zhu fff0886884 2008-10-24 Hui Zhu <teawater@gmail.com>
Pedro Alves  <pedro@codesourcery.com>

	* infrun.c (can_use_displaced_stepping): Change type to
	const char pointer.
	(can_use_displaced_stepping_auto): New string.
	(can_use_displaced_stepping_on): New string.
	(can_use_displaced_stepping_off): New string.
	(can_use_displaced_stepping_enum): New array.
	(show_can_use_displaced_stepping): In auto mode, also show
	the current effect of the option.
	(use_displaced_stepping): Return non-zero if displaced
	stepping is auto, and can be used with GDBARCH, and in
	non-stop mode.  Return non-zero if displaced stepping is on,
	and can be used with GDBARCH.  Return zero otherwise.
	(_initialize_infrun): Make the "set displaced-stepping"
	command an enum command.  Change its class to class_run.
	Place it in the top level set list.  Extend help to describe
	the auto mode.

2008-10-24  Hui Zhu  <teawater@gmail.com>
	    Pedro Alves  <pedro@codesourcery.com>

	* gdb.texinfo (displaced-stepping): Describe the auto mode
	setting, and say it's the default.  This is now a mainstream
	setting instead of a maintenance setting.
2008-10-24 02:31:41 +00:00
Pedro Alves 252fbfc86a gdb/
2008-10-23  Pedro Alves  <pedro@codesourcery.com>

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

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

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

	* observer.texi (thread_stop_requested): New.

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

	* lib/mi-support.exp (mi_expect_interrupt): Expect signal 0
	instead of SIGINT.
2008-10-23 23:11:21 +00:00
Joel Brobecker 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
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
Thiago Jung Bauermann bd4f7d6822 Mention Eli in the changelog entry for Python values. 2008-10-16 17:59:36 +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
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
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 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
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
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 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
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
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
Michael Snyder 8775bb90eb 2008-09-03 Angela Marie Thomas <angela@releasedominatrix.com>
* ser-tcp.c (ser_tcp_send_break): New function.
	(_initialize_ser_tcp): Use ser_tcp_send_break.
	* ser-tcp.h (ser_tcp_send_break): New prototype.

2008-09-03  Angela Marie Thomas <angela@releasedominatrix.com>

	* gdb.texinfo (Interrupts): Mention TCP interface for
	sending BREAK.
2008-09-03 23:54:19 +00:00
Ulrich Weigand f1838a9841 ChangeLog:
* remote.h (remote_filename_p, remote_bfd_open): Add prototypes.
	* remote.c (remote_bfd_iovec_open, remote_bfd_iovec_close,
	remote_bfd_iovec_pread, remote_bfd_iovec_stat, remote_filename_p,
	remote_bfd_open): New functions.
	(remote_hostio_send_command): Fail safely if remote connection
	is not set up.

	* solist.h (solib_open): Remove prototype.
	(solib_bfd_open): Add prototype.
	* solib.c: Include "remote.h".
	(solib_open): Remove, replace by ...
	(solib_bfd_open): ... this new function.  Handle remote BFDs.
	(solib_map_sections): Replace solib_open by solib_bfd_open.
	* solib-frv.c: Include "exceptions.h".
	(enable_break2): Replace solib_open by solib_bfd_open.
	* solib-svr4.c: Include "exceptions.h".
	(enable_break): Replace solib_open by solib_bfd_open.

	* symfile.c: Include "remote.h".
	(build_id_verify): Handle remote BFDs.
	(separate_debug_file_exists): Use BFD to access file.  Handle
	remote BFDs.
	(symfile_bfd_open): Handle remote BFDs.
	(reread_symbols): Handle remote BFDs.

	* NEWS: Mention "remote:" argument prefix to "set sysroot".

doc/ChangeLog:

	* gdb.texinfo (Commands to Specify Files): Document "remote:"
	argument prefix to "set sysroot".
2008-08-26 17:30:35 +00:00
Paul N. Hilfinger 158c766541 Amplify last NEWS entry about boolean types in Ada, and add
corresponding description of treatment of True and false to gdb.texinfo.
2008-08-21 09:05:32 +00:00
Vladimir Prus 30e026bbf0 * gdb.textinfo (GDB/MI Miscellaneous Commands): Use @table
for possible features of -list-features.
2008-08-20 04:57:32 +00:00
Vladimir Prus c6ebd6cf99 * target.c (target_async_permitted, target_async_permitted_1)
(set_maintenance_target_async_permitted)
        (show_maintenance_target_async_permitted): New.
        (initialize_targets): Register 'set target-async'.
        * target.h (target_async_permitted): Declare.
        * linux-nat.c (linux_nat_async_enabled)
        (linux_nat_async_permitted, set_maintenance_linux_async_permitted)
        (show_maintenance_linux_async_permitted): Remove.
        (sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
        (get_pending_events, linux_nat_async): Use target_async_permitted.
        (linux_nat_set_async_mode): Remove, moving the only used bits
        into...
        (linux_nat_setup_async): This.
        (_initialize_linux_nat): Do not register 'maint set linux-async'.
        Use linux_nat_setup_async.
        * remote.c (remote_async_permitted, remote_async_permitted_set)
        (set_maintenance_remote_async_permitted)
        (show_maintenance_remote_async_permitted): Remove.
        (remote_open_1, remote_terminal_inferior, remote_can_async_p)
        (remote_is_async_p): Use target_async_permitted.
        (_initialize_remote): Don't register 'main set remote-async'.
        * mi/mi-cmds.c (mi_cmds): Register -list-target-features.
        * mi/mi-cmds.h (mi_cmd_list_target_features): New.
        * mi/mi-main.c (mi_cmd_list_target_features): New.
2008-08-19 13:05:02 +00:00
Vladimir Prus aeac0ff9c2 * doc/gdb.texinfo (PowerPC): Fix typo.
(PowerPC features): Fix typo.
2008-08-19 12:31:35 +00:00
Pedro Alves 5231c1fd73 2008-08-18 Pedro Alves <pedro@codesourcery.com>
gdb/doc/
	* observer.texi (thread_ptid_changed): New.

	gdb/
	* gdbthread.h (thread_change_ptid): Declare.
	* infrun.c (infrun_thread_ptid_changed): New.
	(_initialize_infrun): Attach infrun_thread_ptid_changed to the
	thread_ptid_changed observer.
	* regcache.c (regcache_thread_ptid_changed): New.
	(_initialize_regcache): Attach regcache_thread_ptid_changed to the
	thread_ptid_changed observer.
	* thread.c (thread_change_ptid): New.
2008-08-18 22:35:17 +00:00
Luis Machado 677c5bb1ab * doc/gdb.texinfo (PowerPC): Mention Extended FPR's for POWER7.
(PowerPC features): Mention feature set for VSX registers.

	* gdbserver/Makefile.in: Add required vsx dependencies.

	* gdbserver/linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
	Declare init_registers_powerpc_vsx32l.
	Declare init_registers_powerpc_vsx64l.
	Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
	(ppc_arch_setup): Check for VSX in hwcap.
	(ppc_fill_vsxregset): New function.
	(ppc_store_vsxregset): New function.
	Add new VSX entry in regset_info target_regsets.

	* gdbserver/configure.srv: Add new VSX dependencies.
2008-08-18 15:46:08 +00:00
Joel Brobecker f3a2dd1a1d * gdb.texinfo (Ada Mode Intro): Improve the documentation regarding
the direct visibility of all names in user-written packages.
2008-08-14 02:34:08 +00:00
Pedro Alves 33e5cbd66d gdb/
* breakpoint.c (always_inserted_auto, always_inserted_on)
	(always_inserted_off, always_inserted_enums): New.
	(always_inserted_mode): Change type to char* and point to
	always_inserted_auto.
	(show_always_inserted_mode): In auto mode, also show the current
	effect of the option.
	(breakpoints_always_inserted_mode): Adjust for the new auto mode.
	(_initialize_breakpoint): Make the "set breakpoints
	always-inserted" command an enum command.  Extend help to describe
	the auto mode.

gdb/doc/
	* gdb.texinfo (breakpoint always-inserted) Describe the auto mode
	setting, and make it the default.
	(Non-Stop Mode): Remove "set breakpoints always-inserted 1" from
	non-stop script example.
2008-08-13 13:58:45 +00:00
Thiago Jung Bauermann d0384fc43f * gdbint.texinfo (Raw and Virtual Register Representations): Fix
reference to the "Using Different Register and Memory Data
	Representation" section.
2008-08-12 20:12:04 +00:00
Sandra Loosemore a6f3e723d3 gdb/doc/
2008-08-12  Sandra Loosemore  <sandra@codesourcery.com>

	* gdb.texinfo (Remote Configuration): Document set remote noack-packet.
	(Remote Protocol): Add Packet Acknowledgment to menu.
	(Overview): Mention +/- can be disabled, and point to new section
	where this is discussed in detail.
	(General Query Packets): Document QStartNoAckMode packet, and
	corresponding qSupported reply.
	(Packet Acknowledgment): New section.

gdb/
2008-08-12  Pedro Alves  <pedro@codesourcery.com>

	Add no-ack mode to the remote protocol --- optionally stop ACKing
	packets and responses when we have a reliable communication
	medium.

	Based on Apple's GDB, by Jason Molenda <jmolenda@apple.com>

	* remote.c (struct remote_state): Add noack_mode field.
	(PACKET_QStartNoAckMode): New.
	(remote_start_remote): Don't any outstanding packet here.
	(remote_open_1): Clear noack_mode.  Ack any outstanding packet
	here.  Activate noack mode if requested.
	(remote_protocol_features): Add QStartNoAckMode.
	(remote_open_1):
	(putpkt_binary): Don't send ack in noack mode.
	(read_frame): Don't recompute the checksum in noack mode.
	(getpkt_sane): Skip sending ack if in noack mode.
	(_initialize_remote): Add set/show remote noack mode.
	* NEWS:  Note the new features.

gdb/gdbserver/
2008-08-12  Pedro Alves  <pedro@codesourcery.com>

	* remote-utils.c (noack_mode, transport_is_reliable): New globals.
	(remote_open): Set or clear transport_is_reliable.
	(putpkt_binary): Don't expect acks in noack mode.
	(getpkt): Don't send ack/nac in noack mode.
	* server.c (handle_general_set): Handle QStartNoAckMode.
	(handle_query): If connected by tcp pass QStartNoAckMode+ in
	qSupported.
	(main): Reset noack_mode on every connection.
	* server.h (noack_mode): Declare.
2008-08-12 15:18:31 +00:00
Sandra Loosemore 0606b73b11 2008-08-11 Sandra Loosemore <sandra@codesourcery.com>
Pedro Alves  <pedro@codesourcery.com>

	gdb/doc
	* gdb.texinfo (Threads): Move paragraph about automatic thread
	selection to All-Stop Mode subsection.
	(Thread Stops): Reorganize existing material into subsections.
	Add introductory blurb and menu.
	(Non-Stop Mode): New subsection.
	(Background Execution): New subsection.
	(Maintenance Commands): Add cross-references from async mode
	commands to the new Background Execution section.
2008-08-12 01:00:49 +00:00
Thiago Jung Bauermann d57a3c85f6 Initial python support.
gdb/
2008-08-06  Vladimir Prus  <vladimir@codesourcery.com>
	    Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Doug Evans  <dje@google.com>

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

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

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

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

	* gdb.python/python.exp: New file.
2008-08-06 19:41:33 +00:00
Stan Shebs 6d76a53df9 * coffread.c (coff_symtab_read): Remove FUNCTION_EPILOGUE_SIZE.
* gdbint.texinfo: Remove FUNCTION_EPILOGUE_SIZE.
2008-08-01 01:09:00 +00:00
Stan Shebs 1f70da6a3a * gdbint.texinfo: General round of cleanup and minor
clarifications.
	(Breakpoint Handling): Remove mention of BREAKPOINT macro.
	(Longjmp Support): Update description to reflect how it is done
	for targets without using native header.
	(Symbol Handling): Add a little more general explanation.
	(COFF, ELF): Mention stabs encapsulation.
	(DWARF 3): New section.
	(Adding a New Host): Scrub out some obsolete bits.
	(Generic Host Support Files): Mention ser-pipe.c, ser-mingw.c.
	(Host Conditionals): Remove descriptions of NO_STD_REGS,
	HAVE_MMAP, HAVE_TERMIO, INT_MAX etc, LONGEST, HAVE_LONG_DOUBLE,
	PRINTF_HAS_LONG_DOUBLE, SCANF_HAS_LONG_DOUBLE, L_SET, SEEK_CUR,
	SEEK_SET, STOP_SIGNAL, USG.
	(Raw and Virtual Register Representations): Ditto for
	DEPRECATED_REGISTER_RAW_SIZE, DEPRECATED_REGISTER_VIRTUAL_SIZE,
	DEPRECATED_REGISTER_VIRTUAL_TYPE, REGISTER_CONVERT_TO_TYPE.
	(Target Conditionals): Ditto for DEPRECATED_FP_REGNUM,
	DEPRECATED_FRAMELESS_FUNCTION_INVOCATION, DEPRECATED_FRAME_CHAIN,
	DEPRECATED_FRAME_CHAIN_VALID, DEPRECATED_FRAME_INIT_SAVED_REGS,
	DEPRECATED_FRAME_SAVED_PC, DEPRECATED_FUNCTION_START_OFFSET,
	DEPRECATED_REGISTER_VIRTUAL_SIZE,
	DEPRECATED_REGISTER_VIRTUAL_TYPE,
	DEPRECATED_USE_STRUCT_CONVENTION.
	Describe gdbarch_deprecated_fp_regnum.
	Update description of gdbarch_print_insn.
	(Adding a New Target): Scrub out obsolete bits.
	(Obsolete Conditionals): Remove entire section.
2008-07-29 20:26:53 +00:00
Tom Tromey 383f836e20 gdb:
* tui/tui-hooks.c: Include observer.h.
	(tui_event_default, tui_old_event_hooks, tui_event_hooks):
	Remove.
	(tui_bp_created_observer, tui_bp_deleted_observer,
	tui_bp_modified_observer): New globals.
	(tui_install_hooks): Use observers, not events.
	(tui_remove_hooks): Likewise.
	* mi/mi-cmd-break.c: Include observer.h, not gdb-events.h.
	(mi_breakpoint_observers_installed, mi_can_breakpoint_notify): New
	globals.
	(breakpoint_notify): Check mi_can_breakpoint_notify.
	(breakpoint_hooks): Remove.
	(mi_cmd_break_insert): Attach observers.  Don't use events.
	* tracepoint.c: Include observer.h, not gdb-events.h.
	(tracepoint_operation, trace_pass_command): Notify observer.
	* interps.c: Don't include gdb-events.h.
	(clear_interpreter_hooks): Don't call clear_gdb_event_hooks.
	* gdbarch.c: Rebuild.
	* gdbarch.sh: Emit include for observer.h, not gdb-events.h.
	(deprecated_current_gdbarch_select_hack): Notify observer.
	* breakpoint.h: Don't include gdb-events.h.
	* breakpoint.c: Don't include gdb-events.h.
	(condition_command): Notify observer.
	(commands_command): Likewise.
	(commands_from_control_command): Likewise.
	(mention, delete_breakpoint, set_ignore_count): Likewise.
	(disable_breakpoint, do_enable_breakpoint): Likewise.
	* Makefile.in (gdb_events_h): Remove.
	(breakpoint_h): Update.
	(COMMON_OBS): Remove gdb-events.o.
	(gdb-events.o): Remove.
	(breakpoint.o, gdbarch.o, interps.o, tracepoint.o, gdbtk-bp.o,
	gdbtk-hooks.o, mi-cmd-break.o, tui-hooks.o): Update.
	* gdb-events.c: Remove.
	* gdb-events.h: Remove.
	* gdb-events.sh: Remove.
gdb/doc:
	* observer.texi (GDB Observers): Document new observers:
	breakpoint_created, breakpoint_deleted, breakpoint_modified,
	tracepoint_created, tracepoint_deleted, tracepoint_modified,
	architecture_changed.
gdb/gdbtk:
	* generic/gdbtk-hooks.c: Include observer.h, not gdb-events.h.
	(gdbtk_add_hooks): Use observers, not events.
	(gdbtk_architecture_changed): Add argument, for observer.
	* generic/gdbtk-bp.c: Include observer.h.
	(gdb_set_bp): Notify observer.
	(gdb_set_bp_addr): Likewise.
2008-07-25 16:12:03 +00:00
Stan Shebs cfd8ab242a Scrub remnants of IN_SOLIB_DYNSYM_RESOLVE_CODE.
* gdbarch.sh: Adjust comment to refer to
	in_solib_dynsym_resolve_code().
	* gdbarch.h, gdbarch.c: Update.
	* solib-osf.c: Ditto.
	* infrun.c: Ditto.
	(handle_inferior_event): Use in_solib_dynsym_resolve_code
	unconditionally.
	* config/mips/nm-irix5.h: Remove undef of
	IN_SOLIB_DYNSYM_RESOLVE_CODE.

	* gdbint.texinfo: Refer to target_so_ops.in_dynsym_resolve_code
	instead of IN_SOLIB_DYNSYM_RESOLVE_CODE.
2008-07-22 02:10:14 +00:00
Tom Tromey 781b42b0ba gdb
* symfile.c (reread_symbols): Don't pass argument to observer.
	* exec.c (exec_file_attach): Don't pass argument to observer.
	* ada-lang.c (ada_executable_changed_observer): Remove argument.
	* symtab.c (symtab_observer_executable_changed): Remove argument.
	* observer.sh: Handle functions with no arguments.
gdb/doc
	* observer.texi (GDB Observers): Remove obsolete comment.
	<executable_changed>: Remove argument.
2008-07-21 16:47:11 +00:00
Tom Tromey d7d9f01ea1 gdb
PR gdb/855:
	* NEWS: Add entry for macro commands.
	* Makefile.in (macrocmd.o): Add gdb_string.h.
	* macroscope.h (user_macro_scope): Declare.
	(default_macro_scope): Update documentation.
	(macro_user_macros): Declare.
	* c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
	Use user_macro_scope.
	(null_macro_lookup): Remove.
	* macrotab.h (macro_callback_fn): Declare.
	(macro_for_each): Likewise.
	(macro_allow_redefinitions): Likewise.
	* macrotab.c (foreach_macro): New function
	(macro_for_each): Likewise.
	(struct macro_table) <redef_ok>: New field.
	(macro_allow_redefinitions): New function.
	(new_macro_table): Update.
	(macro_define_function): Likewise.
	(macro_define_object): Likewise.
	* macroscope.c (user_macro_scope): New function.
	(default_macro_scope): Use it.
	(macro_user_macros): New global.
	(standard_macro_lookup): Look in macro_user_macros.
	(_initialize_macroscope): New function.
	* macroexp.h (macro_is_whitespace, macro_is_digit,
	macro_is_identifier_nondigit): Declare.
	* macroexp.c (macro_is_whitespace): Rename.  No longer static.
	(macro_is_digit): Likewise.
	(macro_is_identifier_nondigit): Likewise.
	(get_identifier): Update.
	(get_pp_number): Likewise.
	(get_token): Likewise.
	* macrocmd.c (skip_ws): New function.
	(extract_identifier): Likewise.
	(free_macro_definition_ptr): Likewise.
	(user_macros): Remove.
	(macro_define_command): Implement.
	(_initialize_macrocmd): Update.
	(macro_undef_command): Implement.
	(print_one_macro): New function.
	(macro_list_command): Implement.
gdb/doc
	* gdb.texinfo (Macros): Update.  Use @code rather than @command.
gdb/testsuite
	* gdb.base/macscp.exp: Add macro tests.
2008-07-18 20:55:33 +00:00
Doug Evans bf250677af Add "set print symbol-loading on|off".
* NEWS: Document new option.
	* symfile.h (print_symbol_loading): Declare.
	* symfile.c (print_symbol_loading): New global.
	(symbol_file_add_with_addrs_or_offsets): Only print "Reading symbols
	from ..." if print_symbol_loading.
	(_initialize_symfile): Add set/show print symbol-loading.
	* solib.c (solib_read_symbols): Only print "Loaded symbols for ..."
	if print_symbol_loading.

	* doc/gdb.texinfo: Document "set print symbol-loading on|off".
2008-07-10 23:08:21 +00:00
Jan Kratochvil 10568435e1 gdb/
* NEWS (New commands): Mention "set disable-randomization".
	* configure.ac: Add check for HAVE_PERSONALITY and
	HAVE_DECL_ADDR_NO_RANDOMIZE.
	* configure, config.in: Regenerate.
	* linux-nat.c [HAVE_PERSONALITY]: New include <sys/personality.h>.
	[HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
	ADDR_NO_RANDOMIZE.
	(disable_randomization, show_disable_randomization)
	(set_disable_randomization): New.
	(linux_nat_create_inferior) [HAVE_PERSONALITY]: New variables
	PERSONALITY_ORIG and PERSONALITY_SET.  Disable randomization upon the
	variable DISABLE_RANDOMIZATION.
	(_initialize_linux_nat): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
	DISABLE_RANDOMIZATION.

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

gdb/testsuite/
	* gdb.base/randomize.exp, gdb.base/randomize.c: New files.
2008-07-10 09:31:00 +00:00