Commit Graph

31345 Commits

Author SHA1 Message Date
Siddhesh Poyarekar 0953dec1c5 * eval.c (evaluate_subexp_standard): Eliminate single-use
variable LOWER.
2012-09-21 09:24:41 +00:00
Yao Qi a065d7af0e gdb/testsuite:
* gdb.mi/mi-cli.exp: Remove.
	* gdb.mi/mi2-cli.exp: Merged from mi-cli.exp.
2012-09-21 08:39:08 +00:00
Yao Qi 15544bd96e gdb/testsuite:
* gdb.mi/mi-reverse.exp: Fix the typo in expected output of
	"=record-started" notification.
2012-09-21 07:29:46 +00:00
Yao Qi 82a90ccf2a gdb/doc:
2012-09-21  Yao Qi  <yao@codesourcery.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (GDB/MI Async Records): Document notification
	'record-started' and 'record-stopped'.
	* observer.texi (GDB Observers): New observer 'record-changed'.
gdb:
2012-09-21  Yao Qi  <yao@codesourcery.com>

	* mi/mi-interp.c: Declare mi_record_changed.
	(mi_interpreter_init): Call observer_attach_record_changed.
	(mi_record_changed): New.
	* record.c (record_open): Call observer_notify_record_changed.
	(cmd_record_stop): Call observer_notify_record_changed.
	* NEWS: Mention it.

gdb/testsuite:
2012-09-21  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi-record-changed.exp: New.
	* gdb.mi/mi-reverse.exp: Adjust expected output.
2012-09-21 01:46:46 +00:00
gdbadmin b3aea08323 *** empty log message *** 2012-09-21 00:00:03 +00:00
Tom Tromey d7de8e3ce9 * NEWS: Update.
* python/python.c (finalize_python): New function.
	(_initialize_python): Make a final cleanup.
testsuite
	* gdb.python/python.exp: Test atexit.register.
2012-09-20 20:54:11 +00:00
Doug Evans 05eade73e1 * boards/dwarf4-gdb-index.exp: New file. 2012-09-20 15:21:09 +00:00
Doug Evans 1aa9953770 * gdb.base/callfuncs.exp (do_function_calls): Set unwindonsignal to on
while running the tests.
2012-09-20 14:43:48 +00:00
gdbadmin c7446506ca *** empty log message *** 2012-09-20 00:00:32 +00:00
Doug Evans 43c7c83dac * buildsym.h (param_symbols): Delete, unused.
(context_stack): Delete member "params", unused.
	* buildsym.c (push_context): Update.
	* dwarf2read.c (read_func_scope): Update.
2012-09-19 20:06:47 +00:00
Thomas Schwinge a6521d9a4b gdb/
* sh-tdep.c (sh_register_convert_to_virtual)
	(sh_register_convert_to_raw): Add a gdbarch parameter.  Update
	all callers.  Just do a memcpy if not the little-endian case.
2012-09-19 11:10:54 +00:00
Thomas Schwinge f92589cba1 gdb/
* h8300-tdep.c (h8300_gdbarch_init): Invoke
	set_gdbarch_double_format and set_gdbarch_long_double_format.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Invoke
	set_gdbarch_double_format.
	* sh-tdep.c (sh_gdbarch_init): Likewise.
2012-09-19 11:09:16 +00:00
Thomas Schwinge aa9259cc84 gdb/
* NEWS: Document the removal of SH's 'regs' command.
	* sh-tdep.c (_initialize_sh_tdep): Remove the deprecated 'regs'
	command.

gdb/doc/
	* gdb.texinfo: Document the removal of SH's 'regs' command.
2012-09-19 11:07:01 +00:00
gdbadmin 91b96a45e3 *** empty log message *** 2012-09-19 00:00:32 +00:00
Sergio Durigan Junior c1d780c2c7 gdb/ChangeLog:
2012-09-18  Sergio Durigan Junior  <sergiodj@redhat.com>

	* infcmd.c (_initialize_infcmd): Register `j' as an alias for
	`jump'.

gdb/doc/ChangeLog:
2012-09-18  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.texinfo (jump): Mention new alias `j' for `jump'.
2012-09-18 20:14:56 +00:00
Joel Brobecker 4ae24af054 wrong language used when re-setting breakpoint
The debugger sometimes fails to re-set a breakpoint as follow,
causing it to become disabled:

    (gdb) b nested_sub
    Breakpoint 1 at 0x401cec: file foo.adb, line 7.
    (gdb) b do_nothing
    Breakpoint 2 at 0x401cdc: file pck.adb, line 4.
    (gdb) run
    Starting program: /[...]/foo
    Error in re-setting breakpoint 1: Function "nested_sub" not defined.

    Breakpoint 2, pck.do_nothing () at pck.adb:4
    4             null;

This only happens on machines where the debug-file-directory is
a valid directory name.

The reason behind the error is that the linespec code that re-sets
the breakpoints uses the current_language global when iterating
over a symtab's symbols. However, the that global gets switched from
Ada to C during the startup phase, probably as a side-effect of stopping
in some system code for which debugging info is available. The fix
is to make sure that we use the correct language.

gdb/ChangeLog:

        * linespec.c (iterate_over_all_matching_symtabs): Use the correct
        language when iterating over symbols.

gdb/testsuite/ChangeLog:

        * gdb.ada/bp_reset: New testcase.
2012-09-18 16:52:19 +00:00
Yao Qi bb25a15c8f gdb/doc:
* gdb.texinfo (GDB/MI Async Records): Document new MI
	notifications '=tsv-created' and '=tsv-deleted'.
	* observer.texi (GDB Observers): New observer tsv_created and
	tsv_deleted.

gdb:

	* mi/mi-interp.c: Declare mi_tsv_created and mi_tsv_deleted.
	(mi_interpreter_init): Call observer_attach_tsv_created and
	observer_attach_tsv_deleted.
	(mi_tsv_created, mi_tsv_deleted): New.
	* tracepoint.c (delete_trace_state_variable): Call
	observer_notify_tsv_deleted.
	(trace_variable_command): Call observer_notify_tsv_created.
	(delete_trace_variable_command): Call
	observer_notify_tsv_deleted.
	(create_tsv_from_upload): Call observer_notify_tsv_created.
	* NEWS: Mention it.

gdb/testsuite:

	gdb.trace/mi-tsv-changed.exp: New.
2012-09-18 12:09:28 +00:00
Yao Qi 201b4506b3 gdb/doc:
* observer.texi (GDB Observers): New observer 'traceframe_changed'.
	* gdb.texinfo (GDB/MI Async Records): Mention new MI notification
	'=traceframe-changed'.

gdb:

	* tracepoint.c (tfind_1): Call observer_notify_traceframe_changed
	if traceframe changed.

	* mi/mi-cmds.c (mi_cmd mi_cmds): Adjust for command
	"trace-find".
	* mi/mi-interp.c: Declare 'mi_traceframe_changed'.
	(mi_interpreter_init): Hook mi_traceframe_changed to observer
	'traceframe_changed'.
	(mi_traceframe_changed): New.
	* mi/mi-main.h (struct mi_suppress_notification) <traceframe>:
	New field.

	* NEWS: Mention the new MI notification.

gdb/testsuite:

	* gdb.trace/mi-traceframe-changed.exp: New.
2012-09-18 11:33:43 +00:00
gdbadmin 6bf93ee509 *** empty log message *** 2012-09-18 00:00:32 +00:00
Mike Wrighton 42b5c53d91 Moved the Changelog entries for breakpoint.c and remote.c out of Changelog
and into gdb/Changelog.
2012-09-17 20:39:13 +00:00
Mike Wrighton 6fb8dd83d6 Correcting error in gdb/Changelog from previous commit. 2012-09-17 19:29:52 +00:00
Mike Wrighton eaeb12dba0 Updated gdb/Changelog:
* MAINTAINERS (Write After Approval): Add "Mike Wrighton".
2012-09-17 19:16:48 +00:00
Jan Kratochvil 6e3c039e9c gdb/
* common/linux-ptrace.c: Change __i386__ to __i386__ || __x86_64__.
	(linux_ptrace_test_ret_to_nx): Extend comment for x86_64.  Change
	__i386__ to __i386__ || __x86_64__. Extend code also for __x86_64__.
	Extend code also for PaX support.  Convert all gdb_assert to warning
	calls.
2012-09-17 18:27:58 +00:00
Jan Kratochvil 9a950c7c83 gdb/
Implement auto-load user conveniences suggested by Doug Evans.
	* auto-load.c: Include top.h.
	(file_is_auto_load_safe): New variable advice_printed.  Print advice.
	(_initialize_auto_load): New variable scripts_directory_help.  Mention
	GDBPY_AUTO_FILE_NAME and GDB_AUTO_FILE_NAME for set auto-load
	scripts-directory.  Document in online help one can use also files for
	set auto-load safe-path.
	* python/py-auto-load.c: (GDBPY_AUTO_FILE_NAME): Move it from here ...
	* python/python.h (GDBPY_AUTO_FILE_NAME): ... to here.
2012-09-17 18:26:06 +00:00
Mike Wrighton fe91d94c37 Adding Mike Wrighton to gdb/MAINTAINERS. 2012-09-17 14:26:29 +00:00
Siddhesh Poyarekar deec9a9d32 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused definition
of LEN.
2012-09-17 09:41:12 +00:00
Siddhesh Poyarekar 354ecfd5f7 * m2-valprint.c (m2_print_array_contents): Eliminate variable
ELTLEN and use TYPE_LENGTH directly.
	(m2_val_print): Likewise.
	* m68k-tdep.c (m68k_svr4_extract_return_value): Eliminate
	variable LEN and use TYPE_LENGTH directly.
	(m68k_svr4_store_return_value): Likewise.
	* mips-tdep.c (mips_o32_push_dummy_call): Eliminate variable
	ARGLEN and use TYPE_LENGTH directly.
	(mips_o64_push_dummy_call): Likewise.
	* s390-tdep (s390_function_arg_pass_by_reference): Eliminate
	variable LENGTH and use TYPE_LENGTH directly.
	(s390_function_arg_float): Likewise.
	(s390_function_arg_integer): Likewise.
	(s390_push_dummy_call): Likewise.
	(s390_return_value_convention): Likewise.
	* spu-tdep.c (spu_push_dummy_call): Eliminate LEN and use
	TYPE_LENGTH directly.
2012-09-17 08:52:18 +00:00
Yao Qi 6fc1c7733e gdb/
* cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): New.
	Update comment to add_setshow_integer_cmd.
	* cli/cli-setshow.c (do_set_command): Handle case
	'var_zuinteger_unlimited'.
	(do_show_command): Likewise.
	* cli/cli-cmds.c (init_cmds): Call add_setshow_zuinteger_unlimited_cmd
	for command 'remotetimeout'.
	* command.h (enum var_types): New zuinteger_unlimited.  Update comment
	to var_integer.
	* source.c (_initialize_source): Call add_setshow_zuinteger_unlimited_cmd
	for command 'set listsize'.

gdb/doc/
	* gdb.texinfo (List): Describe the meaning of 0 and -1 in
	'set listsize'.

gdb/testsuite/
	* gdb.base/list.exp (set_listsize): Don't set arg to "unlimited"
	when it is less than 0.
2012-09-17 08:42:14 +00:00
Siddhesh Poyarekar 6acef6cd7b * infrun.c (restore_infcall_suspend_state): Eliminate single-use
variable LEN.
2012-09-17 07:26:55 +00:00
Jan Kratochvil 1ab3b62c9d gdb/
PR 14119
	* frame.c (skip_inlined_frames): Skip also TAILCALL_FRAME frames.
	(frame_pop): Drop also TAILCALL_FRAME frames.
	* infcmd.c (finish_command): Ignore also TAILCALL_FRAME frames.

gdb/testsuite/
	PR 14119
	* gdb.arch/amd64-tailcall-ret.S: New file.
	* gdb.arch/amd64-tailcall-ret.c: New file.
	* gdb.arch/amd64-tailcall-ret.exp: New file.
	* gdb.reverse/amd64-tailcall-reverse.S: New file.
	* gdb.reverse/amd64-tailcall-reverse.c: New file.
	* gdb.reverse/amd64-tailcall-reverse.exp: New file.
2012-09-17 07:15:48 +00:00
Jan Kratochvil acf9414f48 gdb/
PR 14548
	* infrun.c (handle_inferior_event): Do not reverse-continue back to the
	function start if we are already at function start.  Both for
	reverse-next and for reverse-step into function without line number
	info.

gdb/testsuite/
	PR 14548
	* gdb.reverse/singlejmp-reverse-nodebug.S: New file.
	* gdb.reverse/singlejmp-reverse-nodebug.c: New file.
	* gdb.reverse/singlejmp-reverse.S: New file.
	* gdb.reverse/singlejmp-reverse.c: New file.
	* gdb.reverse/singlejmp-reverse.exp: New file.
2012-09-17 07:09:35 +00:00
Jan Kratochvil 193facb37d gdb/
Code cleanup - rename 'inline' depth to 'artificial' depth.
	* breakpoint.c (set_momentary_breakpoint): Rename at a caller to
	frame_id_artificial_p, extend the comment.
	* dwarf2-frame-tailcall.c (tailcall_frame_this_id): Rename at a user.
	* frame.c (fprint_frame_id): Rename at a user, change debug output
	text to "artificial=".
	(skip_inlined_frames): Rename to ...
	(skip_artificial_frames): ... here.  Extend the comment.
	(get_stack_frame_id, frame_unwind_caller_id): Rename at a caller.
	(frame_id_inlined_p): Rename to ...
	(frame_id_artificial_p): ... here.  Rename at a user.
	(frame_id_eq, frame_id_inner, frame_unwind_caller_pc)
	(frame_unwind_caller_pc_if_available, frame_unwind_caller_arch): Rename
	at a user.
	* frame.h (struct frame_id): Rename inline_depth to artificial_depth.
	Extend the comment.
	(frame_id_inlined_p): Rename to ...
	(frame_id_artificial_p): ... here.
	* inline-frame.c (inline_frame_this_id): Rename at a user.
2012-09-17 07:03:14 +00:00
gdbadmin 9386f15676 *** empty log message *** 2012-09-17 00:00:02 +00:00
Jan Kratochvil 666b578baa gdb/testsuite/
Fix compatibility with old GCC (~4.1).
	* gdb.cp/converts.cc (my_enum_var): New variable.
2012-09-16 17:30:48 +00:00
gdbadmin a82a73de34 *** empty log message *** 2012-09-16 00:00:04 +00:00
gdbadmin 428147f588 *** empty log message *** 2012-09-15 00:00:02 +00:00
Andrew Burgess 4205650181 http://sourceware.org/ml/gdb-patches/2012-09/msg00015.html
gdb/ChangeLog

        * c-typeprint.c (c_type_print_varspec_suffix): Display the size of
        vector variables using vector_size syntax rather than array
        syntax.

gdb/testsuite/ChangeLog

        * gdb.xml/tdesc-regs.exp: Update expected output for new
        vector_size syntax of vector types.
2012-09-14 21:23:45 +00:00
Siddhesh Poyarekar 84c47588d0 * valarith.c (value_concat): Replace unsafe ALLOCA with
XMALLOC/XFREE.
2012-09-14 12:46:55 +00:00
Pedro Alves f4045bcb61 2012-09-14 Pedro Alves <palves@redhat.com>
* gdb.1 (SEE ALSO): Expand pointer to GDB's Texinfo manual.
2012-09-14 12:10:23 +00:00
Yit Phang Khoo 63b4626663 Point contrib/cc-with-tweaks.sh to the build-local data-directory.
gdb/

	* contrib/cc-with-tweaks.sh (GDB): Add -data-directory
	data-directory as appropriate.
2012-09-14 08:03:34 +00:00
Siddhesh Poyarekar ddd7a8e76d * printcmd.c (ui_printf): Eliminate single-use variable
PARAM_LEN.
2012-09-14 07:00:42 +00:00
Yao Qi d649a38e15 gdb/
* valops.c (value_assign): Move observer_notify_target_changed
	below to replace reinit_frame_cache.
2012-09-14 00:54:58 +00:00
gdbadmin ddd22875dd *** empty log message *** 2012-09-14 00:00:03 +00:00
Yit Phang Khoo b9516fa158 Refactor Python "gdb" module into a proper Python package, by introducing
a new "_gdb" module for code implemented in C, and using reload/__import__
instead of exec.

gdb/

	* python/lib/gdb/__init__.py: Import * from _gdb.
	(GdbOutputFile, sys.stdout, GdbOutputErrorFile, sys.stderr,
	prompt_hook, sys.argv): Moved from finish_python_initialization.
	(pretty_printers, PYTHONDIR): Moved from _initialize_python.
	(packages, auto_load_packages): New list and function replacing
	module_dict and auto-loading code, using __file__ instead of
	gdb.PYTHONDIR and reload/__import__ instead of exec.
	(GdbSetPythonDirectory): Replacing function of the same name
	from finish_python_initialization, using reload/__import__ instead
	of exec, as well as call auto_load_packages.
	* python/py-prettyprint.c (find_pretty_printer_from_gdb): Check
	gdb_python_module and not gdb_module.
	* python/python-internal.h (gdb_python_module): Declare.
	* python/python.c (gdb_python_module): New global.
	(before_prompt_hook): Check gdb_python_module and not gdb_module.
	(_initialize_python): Rename gdb module to _gdb.
	Move gdb.PYTHONDIR and gdb.pretty_printer to lib/gdb/__init__.py.
	(finish_python_initialization): Move Python code to
	lib/gdb/__init__.py; instead, set up sys.path and import gdb into
	__main__.

gdb/testsuite/

	* gdb.python/python.exp (Test stderr location): Update module
	location of GDB-specific sys.stderr.
	(Test stdout location): Ditto for sys.stdout.
2012-09-13 21:49:32 +00:00
Jan Kratochvil 121c73f33a gdb/doc/
* gdbint.texinfo (Defining Other Architecture Features): Clarify *pcptr
	encoding for gdbarch_breakpoint_from_pc, bp_addr for
	gdbarch_push_dummy_call and bp_addr for gdbarch_push_dummy_code.
2012-09-13 17:35:35 +00:00
Pedro Alves aa0fbdd82c 2012-09-13 Pedro Alves <palves@redhat.com>
* Makefile.in (COMMON_OBS): Add registry.o.
	* registry.c: New file.
	* registry.h (struct registry_container): Declare.
	(registry_data_callback): New typedef.
	(struct registry_data, struct registry_data_registration, struct
	registry_data_registry): New type.
	(register_data_with_cleanup, registry_alloc_data)
	(registry_callback_adaptor, registry_clear_data)
	(registry_container_free_data, registry_set_data, registry_data):
	Declare.
	(DEFINE_REGISTRY): Refactor structures and functions as shims over
	the new common structures and functions.
	(DECLARE_REGISTRY): Declare struct TAG ## _data.  Use the tagged
	callback typedefs.
2012-09-13 14:35:16 +00:00
Jan Kratochvil 18dc9ad804 gdb/testsuite/
* gdb.base/valgrind-infcall.exp: Remove comment about Ubuntu.
2012-09-13 05:32:09 +00:00
gdbadmin c4cd29c1f4 *** empty log message *** 2012-09-13 00:00:33 +00:00
Keith Seitz ea3a9873f8 * gdb.cp/converts.cc (main): Comment out the pointer to boolean
conversion statement.
2012-09-12 23:29:05 +00:00
Mike Wrighton dd61ec5cb3 * gdb/remote.c (remote_insert_hw_breakpoint): Throw exception if
there is an error inserting hardware breakpoints and use the
error message from the target.

* gdb/breakpoint.c (insert_bp_location, insert_breakpoint_locations):
Catch this exception and print the error message contained within. Do not
print the default hardware error breakpoint message in this case.
2012-09-12 20:01:10 +00:00
Doug Evans a1b64ce14e * dwarf2read.c (dwarf2_read_addr_index): Fix handling the case where
cu == NULL.
2012-09-12 18:57:40 +00:00
Doug Evans 5941debbf2 * gdb.base/help.exp: Remove testing of individual command help text,
too much of a maintenance burden.  Instead, test the functionality
	of "help" itself.
2012-09-12 18:55:49 +00:00
gdbadmin a67fa328ad *** empty log message *** 2012-09-12 00:00:33 +00:00
Doug Evans 83a788b8b1 * dwarf2read.c (dw2_do_expand_symtabs_matching): Don't examine
.gdb_index symbol attributes if there are none.
2012-09-11 22:42:22 +00:00
Doug Evans 3a0ed5d779 * gdb.cp/mb-inline.exp: Do "info break" after setting multi-location
breakpoint.
2012-09-11 21:37:04 +00:00
Joel Brobecker d9eaeb59a4 Name of symbol missing when printing global variable's address
The build_address_symbolic funnction filters out data symbols if
their size is set to zero.  But the problem is that the COFF symbol
table (for instance) does not provide any size information, leaving
the size to its default value of zero, thus always triggering
the filter.

This shows up when trying to print the address of a global variable
when debugging a Windows executable, for instance.

gdb/ChangeLog:

        * symtab.h (struct minimal_symbol) [has_size]: New field.
        (MSYMBOL_SIZE): Adjust to forbid macro from being used as lvalue.
        (SET_MSYMBOL_SIZE, MSYMBOL_HAS_SIZE): New macros.
        * printcmd.c (build_address_symbolic): Only filter out zero-sized
        minimal symbols if the symbol's size is actually known.
        * minsyms.c (prim_record_minimal_symbol_full): Adjust setting
        of msymbol's size field.  Add comment.
        * elfread.c (elf_symtab_read, elf_rel_plt_read): Use
        SET_MSYMBOL_SIZE to set the minimal symbol size.
2012-09-11 21:26:16 +00:00
Joel Brobecker a83e9154c2 install_minimal_symbols: use memset instead of setting each field.
gdb/ChangeLog:

        * minsyms.c (install_minimal_symbols): Use memset to fill entire
        minimal_symbol struct object, rather than setting some of its
        fields one by one.
2012-09-11 21:26:04 +00:00
Doug Evans cfc35e0232 * gdb.dwarf2/fission-base.S: Include gdb.dwarf2/ in dwo_name.
* gdb.dwarf2/fission-reread.S: Ditto.
	* gdb.dwarf2/fission-base.exp: Remove setting of debug-file-directory.
	* gdb.dwarf2/fission-reread.exp: Ditto.
2012-09-11 16:42:09 +00:00
Andrew Burgess 350b1b266b http://sourceware.org/ml/gdb-patches/2012-09/msg00013.html
gdb/ChangeLog:
        * c-typeprint.c (c_type_print_varspec_prefix): Pass through the
        passed_a_ptr flag when displaying typedef types.


gdb/testsuite/ChangeLog:
        * gdb.base/ptype.exp: Test ptype on a pointer to a typedef.
2012-09-11 09:03:08 +00:00
gdbadmin fbc8ccad52 *** empty log message *** 2012-09-11 00:00:32 +00:00
Joel Brobecker 2fa15f237d crash printing optimized out variant type
Assuming the following declarations:

   type Discriminants_Record (A : Integer; B : Boolean) is record
      C : Float;
   end record;
   Z : Discriminants_Record := (A => 1, B => False, C => 2.0);

If variable Z is not used, and the compiler optimizes it out,
GDB would crash as follow:

    (gdb) print Z
    /[...]/gdb/valops.c:1121: internal-error: Unexpected lazy value type.

This is because the ada-lang module forgot to set the optimized_out
flag in the value returned by ada_evaluate_subexp during the value's
"fixing" process.  Later on, when trying to print the resulting value,
GDB finds that the value is still lazily allocated, and thus tries to
fetch it. But this is not allowed for not_lval values, hence the internal
error.

gdb/ChangeLog:

        * ada-lang.c (coerce_unspec_val_to_type): Make sure that
        the optimized_out flag is preserved.

gdb/testsuite/ChangeLog:

        * gdb.ada/optim_drec: New testcase.
2012-09-10 22:18:24 +00:00
Anthony Green 5152ff9039 Fix function prologue analyzer for moxie. 2012-09-10 21:16:43 +00:00
Doug Evans 09be558e10 * boards/fission.exp: Explicitly mark "board" as not remote. 2012-09-10 17:48:11 +00:00
Keith Seitz 5b4f6e25c3 PR gdb/13483
* gdbtypes.h (BOOL_PTR_CONVERSION_BADNESS): Rename to ...
	(BOOL_CONVERSION_BADNESS): ... this.
	* gdbtypes.c (BOOL_PTR_CONVERSION_BADNESS): Likewise.
	(rank_one_type): Allow all boolean conversions
	permitted by the standard.

	* gdb.cp/converts.cc (A::A): Add ctor.
	(A::member_): Add member.
	(enum my_enum): New enumeration.
	(main): Add calls to foo1_7 with various
	permitted arguments.
	* gdb.cp/converts.exp: Add tests for boolean
	conversions permitted by the standard.
2012-09-10 17:12:53 +00:00
gdbadmin 46bdd3117a *** empty log message *** 2012-09-10 00:00:03 +00:00
gdbadmin b7099d964f *** empty log message *** 2012-09-09 00:00:33 +00:00
Yit Phang Khoo b4ca5ed946 2012-09-08 Khoo Yit Phang <khooyp@cs.umd.edu>
Replace -nw option with $INTERNAL_GDBFLAGS in "xgdb" tests to
	avoid spurious results due to ~/.gdbinit.
	* gdb.gdb/complaint.exp (setup_test): Replace -nw option with
	$INTERNAL_GDBFLAGS in run command.
	* gdb.gdb/observer.exp (setup_test): Ditto.
	* gdb.gdb/selftest.exp (test_with_self): Ditto.
	* gdb.gdb/xfullpath.exp (setup_test): Ditto.
2012-09-08 05:29:21 +00:00
gdbadmin 6c184df7bb *** empty log message *** 2012-09-08 00:00:03 +00:00
gdbadmin 610b99881a *** empty log message *** 2012-09-07 00:00:33 +00:00
Doug Evans 1491095679 * boards/fission.exp: New file. 2012-09-06 20:39:48 +00:00
Tom Tromey f10704261b * python/py-newobjfileevent.c (create_new_objfile_event_object):
Don't decref py_objfile.
2012-09-06 20:14:13 +00:00
Doug Evans db90b9d320 (test_subscript_regression): Remove no longer necessary globals,
from previous patch.
2012-09-06 17:57:41 +00:00
Doug Evans d54b30bb5d * gdb.python/py-value.exp: Use clean_restart. 2012-09-06 17:52:38 +00:00
gdbadmin 7cb3ff4c19 *** empty log message *** 2012-09-06 00:00:03 +00:00
Doug Evans 91b253e153 * gdb.base/info-macros.c: Fix whitespace. 2012-09-05 18:20:53 +00:00
gdbadmin 8109897381 *** empty log message *** 2012-09-05 00:00:03 +00:00
Hans-Peter Nilsson 07c04788ea * linux-crisv32-low.c: Fix compile errors. 2012-09-04 23:54:41 +00:00
Yao Qi 918d227b01 gdb/gdbserver/
* tracepoint.c (cmd_qtsv): Adjust debug message.
	Don't check CUR_TPOINT.
2012-09-04 01:47:49 +00:00
gdbadmin 916abb21de *** empty log message *** 2012-09-04 00:00:02 +00:00
gdbadmin 98c4139e84 *** empty log message *** 2012-09-03 00:00:03 +00:00
Yit Phang Khoo a8db421230 2012-09-02 Khoo Yit Phang <khooyp@cs.umd.edu>
Do not enable -lmcheck by default when Python is enabled with
	threading support.
	* configure.ac: (python_has_threads) New variable, by testing
	if WITH_THREAD is defined in Python.h.
	Move --enable-lmcheck after --with-python.
	Do not enable -lmcheck by default if python_has_threads=yes.
	Warn if --enable-lmcheck and python_has_threads=yes.
	* configure: Regenerate.
2012-09-02 22:57:43 +00:00
gdbadmin 76d4b318d5 *** empty log message *** 2012-09-02 00:00:32 +00:00
Yit Phang Khoo fda395cfae 2012-08-30 Khoo Yit Phang <khooyp@cs.umd.edu>
* MAINTAINERS (Write After Approval): Add "Khoo Yit Phang".
2012-09-01 03:14:15 +00:00
gdbadmin f25b8a5e71 *** empty log message *** 2012-09-01 00:00:33 +00:00
Yao Qi 648beb2ba9 gdb/
* mi/mi-cmds.c (mi_cmds): New macros DEF_MI_CMD_CLI
	DEF_MI_CMD_MI DEF_MI_CMD_CLI_1 and DEF_MI_CMD_CLI_1.
	Update some commands.
	* mi/mi-cmds.h (struct mi_cmd) <suppress_notification>: New field.
	* mi/mi-main.c (mi_cmd_execute): Set '*parse->cmd->suppress_notification'
	to 1.
2012-08-31 08:41:57 +00:00
Yao Qi ef07a9f766 gdb/
* mi/mi-cmds.c (mi_cmds): Add 'static'.
2012-08-31 08:30:38 +00:00
gdbadmin b1d8c8669b *** empty log message *** 2012-08-31 00:00:02 +00:00
Yit Phang Khoo 842d03030f Add "Khoo Yit Phang" to gdb/MAINTAINERS. 2012-08-30 18:59:53 +00:00
gdbadmin 37580ec21c *** empty log message *** 2012-08-30 00:00:33 +00:00
Doug Evans 8efd8e789a * main.c (print_gdb_help): Remove reference to
--use-deprecated-index-sections.
2012-08-29 19:17:16 +00:00
gdbadmin 92fae9b9c3 *** empty log message *** 2012-08-29 00:00:34 +00:00
Yao Qi 18c1b81abe gdb/gdbserver/
* ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
	* server.h: Include 'libiberty.h' and 'ansidecl.h'.
	(ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
	Remove declarations of xmalloc, xreallloc, xstrdup and
	freeargv.
	* Makefile.in (libiberty_h): New.
	(server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
	(linux-bfin-low.o): Append dependency 'libiberty.h'.
2012-08-28 16:53:30 +00:00
Yao Qi 883b9c6c98 gdb/
* cli/cli-cmds.c (max_user_call_depth): Add 'unsigned'.
	(init_cmds): Call add_setshow_uinteger_cmd for command
	'max-user-call-depth'.
	* cli/cli-script.c (execute_user_command): Add 'unsigned' to the
	declaration of 'max_user_call_depth'.
	* frame.c (backtrace_limit): Add 'unsigned'.
	(_initialize_frame): Call add_setshow_uinteger_cmd for command
	'limit'.
	* remote.c (remoteaddresssize): Add 'unsigned'.
	(remote_address_masked): Change local var 'address_size' to
	'unsigned'.
	(_initialize_remote): Call add_setshow_uinteger_cmd for
	'remoteaddresssize'.
	* top.c (history_size): Add 'unsigned'.
	(show_commands): Change local variables to 'unsigned'.
	(set_history_size_command): Don't check history_size is negative.
	Adjust the condition to call unstifle_history and set history_size
	to UNIT_MAX.
2012-08-28 14:08:42 +00:00
Pedro Alves 1292279a4e 2012-08-28 Pedro Alves <palves@redhat.com>
PR gdb/14428

	gdb/
	* infcmd.c (default_print_one_register_info): New, factored out
	from default_print_registers_info.
	(default_print_registers_info): Use it.  Mark value unavailable if
	necessary.
	(registers_info): Print user registers with
	default_print_one_register_info.

	gdb/testsuite/
	* gdb.base/pc-fp.exp: Adjust expected output of 'info registers pc fp'.
2012-08-28 09:05:35 +00:00
gdbadmin 6b3dde2885 *** empty log message *** 2012-08-28 00:00:02 +00:00
H.J. Lu f629cd7572 Check if TUI_SRC_WIN is not NULL before referencing it
PR tui/14486
	* tui/tui-source.c (tui_source_is_displayed): Check if TUI_SRC_WIN
	is not NULL before referencing it.
2012-08-27 17:00:42 +00:00
Jan Kratochvil 1c8cdcb14f gdb/
* breakpoint.c (parse_breakpoint_sals) <(*address) == NULL>: New
	variable pc.  Call find_pc_line instead of find_pc_overlay, restore
	original PC for it.

gdb/testsuite/
	* gdb.base/break-caller-line.c: New file.
	* gdb.base/break-caller-line.exp: New file.
2012-08-27 16:55:39 +00:00
Jan Kratochvil e968779960 gdb/
* auto-load.c (auto_load_objfile_script): Rename to ...
	(auto_load_objfile_script_1): ... here, change variable realname to
	parameter realname, document it, add return value, add variable retval.
	(auto_load_objfile_script): New function.

gdb/doc/
	* gdb.texinfo (objfile-gdb.py file): New paragraph for .exe stripping.
2012-08-27 16:50:54 +00:00
Jan Kratochvil 7afa16426a gdb/
* cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not
	followed by a whitespace.
2012-08-27 16:47:15 +00:00
Jan Kratochvil 28e66c70aa ChangeLog fix:
PR gdb/14494.
	* dwarf2read.c (dwarf2_locate_sections): Move variable aflag here.
	Move the SEC_HAS_CONTENTS check here - for any NAMES use.
	(dwarf2_locate_sections) <eh_frame>: Move the variable and check from
	here.
2012-08-27 16:43:26 +00:00
Jan Kratochvil dc7650b823 gdb/
* dwarf2read.c (dwarf2_locate_sections): Move variable aflag here.
	Move the SEC_HAS_CONTENTS check here - for any NAMES use.
	(dwarf2_locate_sections) <eh_frame>: Move the variable and check from
	here.
2012-08-27 16:37:45 +00:00
Jan Kratochvil 1e8e8b5114 gdb/testsuite/
* gdb.ada/rdv_wait.exp (set debug-file-directory): New command.
	* gdb.arch/i386-cfi-notcurrent.S: New file.
	* gdb.arch/i386-cfi-notcurrent.exp: New file.
2012-08-27 16:34:35 +00:00
Pedro Alves 1591a1e852 2012-08-27 Wei-cheng Wang <cole945@gmail.com>
* memattr.c (create_mem_region): Fix memory region overlapping
	checking.

2012-08-27  Wei-cheng Wang  <cole945@gmail.com>
	    Yao Qi <yao@codesourcery.com>
	    Pedro Alves <palves@redhat.com>

	* gdb.base/memattr.exp (delete_memory, region_pass, region_fail):
	New procedures.
	(top level): Add overlap checking tests.
2012-08-27 08:58:01 +00:00
gdbadmin 3baafeb861 *** empty log message *** 2012-08-27 00:00:03 +00:00
gdbadmin 7ac88bf469 *** empty log message *** 2012-08-26 00:00:33 +00:00
gdbadmin 13d275de52 *** empty log message *** 2012-08-25 00:00:33 +00:00
Tom Tromey 4442ada7ba * lib/gdb.exp (skip_unwinder_tests): Don't leave 'ok' set if
gdb_test_multiple fails for other reasons.
2012-08-24 15:26:23 +00:00
Yit Phang Khoo 3b5e4d350d Move misplaced entries from gdb/ChangeLog to gdb/doc/ChangeLog.
2012-08-23  Khoo Yit Phang <khooyp@cs.umd.edu>

	Document how to return from "python-interactive" to GDB.
	* gdb.texinfo (Python Commands): Update documentation.

2012-08-22  Khoo Yit Phang <khooyp@cs.umd.edu>

	Add a new "python-interactive" command that starts a standard
	Python interactive prompt with "pi" as alias, and add "py" as
	an alias to "python".
	* gdb.texinfo (Python Commands): Document the new commands.
2012-08-24 15:23:59 +00:00
Siddhesh Poyarekar ecfb0d68c5 * h8300-tdep.c (h8300_push_dummy_call): Replace unsafe alloca
with xmalloc/cleanup.
        * mt-tdep.c (mt_push_dummy_call): Likewise.
        * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
        * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
2012-08-24 03:57:22 +00:00
Yao Qi e7d50cc9e6 gdb/testsuite/
* lib/gdb.exp (skip_unwinder_tests): Remove pass.
2012-08-24 03:19:58 +00:00
Yao Qi 8c56c1b90e gdb/
* jv-exp.y (push_expression_name): Add "." at the end of error
	message.
2012-08-24 03:17:13 +00:00
gdbadmin de132db8f6 *** empty log message *** 2012-08-24 00:00:33 +00:00
Yit Phang Khoo e3480f4aa1 Document how to return from "python-interactive" to GDB.
* doc/gdb.texinfo (Python Commands): Update documentation.
	* python/python.c (_initialize_python): Update documentation.
2012-08-23 18:55:25 +00:00
Pedro Alves dfbd5e7bbb 2012-08-23 Pedro Alves <palves@redhat.com>
gdb/
	* infrun.c (_initialize_infrun) <handle command help text>:
	Mention that multiple signals are supported.

	gdb/testsuite/
	* gdb.base/help.exp: Adjust to "handle" help text change.
2012-08-23 16:59:14 +00:00
Pedro Alves 2edda2ffe8 2012-08-23 Pedro Alves <palves@redhat.com>
* infcmd.c (_initialize_infcmd) <signal command>: Fix typo in help
	string.
2012-08-23 16:44:24 +00:00
Yao Qi 8d735b87dd gdb/
* tracepoint.c (disconnect_tracing): Call set_tracepoint_num.
	(tfind_1): Don't call registers_changed, set_traceframe_num,
	and clear_traceframe_info.
	Call set_current_traceframe.
	(set_current_traceframe): call set_traceframe_num.

gdb/testsuite:

	* gdb.trace/disconnected-tracing.c (start, end): New.
	(main): Call start and end.
	* gdb.trace/disconnected-tracing.exp (disconnected_tracing): Move
	existing tests into this proc.
	(disconnected_tfind): New.
2012-08-23 16:11:10 +00:00
Yao Qi 61b1d75968 gdb/testsuite/
* boards/native-gdbserver.exp (${board}_upload): New.
	* boards/native-stdio-gdbserver.exp (${board}_upload): New.
	* gdb.trace/tfile.exp: Don't check 'gdb,nofileio'.
	Execute tfile on remote target.
	Copy trace file from target to host.
2012-08-23 14:01:42 +00:00
Yao Qi dc82f37bb7 gdb/gdbserver/
* server.h: Remove declaration of 'xsnprintf'.
2012-08-23 01:41:05 +00:00
gdbadmin c5d3192683 *** empty log message *** 2012-08-23 00:00:02 +00:00
Sergio Durigan Junior c5d9b215bd 2012-08-22 Sergio Durigan Junior <sergiodj@redhat.com>
* remote-sim.c (_initialize_remote_sim): Pass NULL argument to
	`register_inferior_data_with_cleanup', fixing regression on PowerPC64.
2012-08-22 21:31:17 +00:00
Yit Phang Khoo 037bbc8eea Enable readline in Python in a GDB-specific way and block the
standard Python readline module to prevent conflicts with GDB.
	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-gdb-readline.o.
	(SUBDIR_PYTHON_SRCS): Add python/py-gdb-readline.c.
	(py-gdb-readline.o): Add rule to compile python/py-gdb-readline.c.
	* python/py-gdb-readline.c: New file.
	* python/python-internal.h (gdbpy_initialize_gdb_readline): New
	prototype.
	* python/python.c (_initialize_python): Call
	gdbpy_initialize_gdb_readline.
2012-08-22 21:04:55 +00:00
Keith Seitz 406b1477f5 * defs.h: Include build-gnulib/config.h
* server.h: Include build-gnulib-gbserver/config.h.
	* gdbreplay.c: Likewise.
2012-08-22 20:04:05 +00:00
Joseph Myers 6ca1b14767 * arm-tdep.c (thumb_get_next_pc_raw): Mask off low bits for bx pc
and blx pc.

testsuite:
	* gdb.arch/thumb-bx-pc.S: New file.
	* gdb.arch/thumb-bx-pc.exp: New file.
2012-08-22 19:47:58 +00:00
Yit Phang Khoo 8315665ec1 Add a new "python-interactive" command that starts a standard
Python interactive prompt with "pi" as alias, and add "py" as
	an alias to "python".
	* NEWS: Mention the new commands.
	* doc/gdb.texinfo (Python Commands): Document the new
	commands.
	* python/python.c (eval_python_command): New function.
	(python_interactive_command): For "python-interactive" with
	arguments, call eval_python_command.  For "python-interactive"
	without arguments, call PyRun_InteractiveLoop.
	(_initialize_python): Add "python-interactive" command with
	"pi" as alias, and add "py" as an alias to "python".
2012-08-22 19:15:15 +00:00
Tom Tromey 522002f96c * defs.h (quit_flag): Don't declare.
(clear_quit_flag, check_quit_flag, set_quit_flag): Declare.
	(QUIT): Use new functions.
	* event-top.c (command_handler): Use clear_quit_flag.
	(handle_sigint): Use set_quit_flag.
	(async_request_quit): Use check_quit_flag.  Don't check
	immediate_quit.
	* exceptions.c (throw_exception): Use clear_quit_flag.
	* main.c (captured_main): Use clear_quit_flag.
	* python/python.c (clear_quit_flag, set_quit_flag)
	(check_quit_flag): New functions.
	* remote-sim.c (gdb_os_poll_quit): Use check_quit_flag,
	clear_quit_flag.
	* remote.c (remote_wait_as): Use check_quit_flag,
	clear_quit_flag.
	(remote_start_remote): Call QUIT.
	* symfile.c (load_progress): Use check_quit_flag.
	* top.c (command_loop): Use clear_quit_flag.
	(command_line_input): Call QUIT.
	* utils.c (quit_flag): Conditionally define.
	(clear_quit_flag, check_quit_flag, set_quit_flag): New
	functions.
	(prompt_for_continue): Call QUIT.  Use quit, not
	async_request_quit.
	* remote-mips.c (mips_expect_timeout): Call QUIT.
	* monitor.c (monitor_expect): Call QUIT.
2012-08-22 17:48:55 +00:00
Tom Tromey b583003e10 * event-top.c (sigwinch_token, handle_sigwinch): Remove.
(async_init_signals): Update.
	* utils.c (init_page_info): Don't use SIGWINCH_HANDLER.
	(SIGWINCH_HANDLER_BODY): Remove.
gdb/doc
	* gdbint.texinfo (Host Definition): Remove documentation for
	SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY.
2012-08-22 17:31:45 +00:00
Tom Tromey e1507e953e * jit.c (jit_object_close_impl): Don't malloc the objfile
name.
	* objfiles.c (allocate_objfile): Don't malloc the objfile
	name.
	(free_objfile): Don't free the objfile name.
	* objfiles.h (struct objfile) <name>: Update comment.
	* symfile.c (reread_symbols): Fix reference counting.  Don't
	malloc objfile name.
2012-08-22 16:44:45 +00:00
Tom Tromey 1c00ec6b06 * windows-nat.c (windows_make_so): Use gdb_bfd_open.
* symfile.c (bfd_open_maybe_remote): Use gdb_bfd_open.
	(symfile_bfd_open): Likewise.
	(generic_load): Likewise.
	* solib.c (solib_bfd_fopen): Use gdb_bfd_open.
	* solib-pa64.c (pa64_solib_create_inferior_hook): Use
	gdb_bfd_open.
	* solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init):
	Use gdb_bfd_open.
	* rs6000-nat.c (add_vmap): Use gdb_bfd_open.
	* remote-mips.c (mips_load_srec): Use gdb_bfd_open.
	(pmon_load_fast): Likewise.
	* remote-m32r-sdi.c (m32r_load): Use gdb_bfd_open.
	* procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_open.
	* machoread.c (macho_symfile_read_all_oso): Use gdb_bfd_open.
	(macho_check_dsym): Likewise.
	* m32r-rom.c (m32r_load): Use gdb_bfd_open.
	(m32r_upload_command): Likewise.
	* gdb_bfd.h (gdb_bfd_cache): Declare.
	* gdb_bfd.c (struct gdb_bfd_data): New.
	(gdb_bfd_cache): New global.
	(struct gdb_bfd_cache_search): New.
	(hash_bfd): New function.
	(eq_bfd): Likewise.
	(gdb_bfd_open): Likewise.
	(gdb_bfd_ref): Allocate a gdb_bfd_data and attach to the BFD.
	(gdb_bfd_unref): Remove closed BFD from cache.  Update for
	gdb_bfd_data.
	* exec.c (exec_file_attach): Use gdb_bfd_open.
	* dsrec.c (load_srec): Use gdb_bfd_open.
2012-08-22 16:24:39 +00:00
Tom Tromey 6532ff3697 * dwarf2read.c (macro_start_file): Update.
* objfiles.c (get_objfile_bfd_data): Initialize macro_cache.
	(free_objfile_per_bfd_storage): Destroy macro_cache.
	(allocate_objfile, free_objfile): Update.
	* objfiles.h (struct objfile_per_bfd_storage) <macro_cache>:
	New field.
	(struct objfile) <macro_cache>: Remove.
	* symfile.c (reread_symbols): Update.
	* symmisc.c (print_symbol_bcache_statistics): Update.
	(print_objfile_statistics): Update.
2012-08-22 16:12:50 +00:00
Tom Tromey 706e37059f * elfread.c (elf_symtab_read): Update.
* objfiles.c (objfiles_bfd_data): New global.
	(get_objfile_bfd_data, free_objfile_per_bfd_storage)
	(objfile_bfd_data_free, set_objfile_per_bfd): New functions.
	(allocate_objfile, free_objfile): Update.
	(_initialize_objfiles): Initialize objfiles_bfd_data.
	* objfiles.h (struct objfile_per_bfd_storage): New.
	(struct objfile) <per_bfd>: New field.
	<filename_cache>: Remove.
	(set_objfile_per_bfd): Declare.
	* symfile.c (reread_symbols): Update.  Call
	set_objfile_per_bfd.
	(allocate_symtab): Update.
	* symmisc.c (print_symbol_bcache_statistics): Update.
	(print_objfile_statistics): Print the size of the BFD obstack.
gdb/testsuite
	* gdb.base/maint.exp: Update.
2012-08-22 16:01:09 +00:00
Tom Tromey e992eda4f6 * gdb_bfd.h: Include registry.h. Use DECLARE_REGISTRY.
* gdb_bfd.c: Use DEFINE_REGISTRY.
	(struct gdb_bfd_data): Add REGISTRY_FIELDS.
	(gdb_bfd_ref): Call bfd_alloc_data.
	(gdb_bfd_unref): Call bfd_free_data.
2012-08-22 15:50:38 +00:00
Tom Tromey 6b81941e35 * registry.h (struct registry_fields): New.
(REGISTRY_FIELDS): Redefine.
	(REGISTRY_ACCESS_FIELD): New macro.
	(DEFINE_REGISTRY): Add ACCESS argument.  Update defined
	functions.
2012-08-22 15:31:12 +00:00
Tom Tromey 8e260fc026 * auto-load.c (_initialize_auto_load): Update.
* solib-svr4.c (_initialize_svr4_solib): Update
	* solib-dsbt.c (_initialize_dsbt_solib): Update.
	* solib-darwin.c (_initialize_darwin_solib): Update.
	* registry.h: New file.
	* python/py-progspace.c (gdbpy_initialize_pspace): Update.
	* python/py-inferior.c (gdbpy_initialize_inferior): Update.
	* progspace.h: Include registry.h.  Use DECLARE_REGISTRY.
	(register_program_space_data_with_cleanup)
	(register_program_space_data, program_space_alloc_data)
	(clear_program_space_data, set_program_space_data)
	(program_space_data): Don't declare.
	* progspace.c: Use DEFINE_REGISTRY.
	(struct program_space_data, struct
	program_space_data_registration, struct
	program_space_data_registry, program_space_data_registry)
	(register_program_space_data_with_cleanup)
	(register_program_space_data, program_space_alloc_data)
	(program_space_free_data, clear_program_space_data)
	(set_program_space_data, program_space_data): Remove.
	* objfiles.h: Include registry.h.  Use DECLARE_REGISTRY.
	(struct objfile) <data, num_data>: Replace with REGISTRY_FIELDS.
	(register_objfile_data_with_cleanup, register_objfile_data)
	(clear_objfile_data, set_objfile_data, objfile_data): Don't
	declare.
	* objfiles.c: Use DEFINE_REGISTRY.
	(struct objfile_data, struct objfile_data_registration, struct
	objfile_data_registry, objfile_data_registry)
	(register_objfile_data_with_cleanup, register_objfile_data)
	(objfile_alloc_data, objfile_free_data, clear_objfile_data)
	(set_objfile_data, objfile_data): Remove.
	(_initialize_objfiles): Update.
	* jit.c (_initialize_jit): Update.
	* inflow.c (_initialize_inflow): Update.
	* inferior.h: Include registry.h.  Use DECLARE_REGISTRY.
	(struct inferior) <data, num_data>: Replace with REGISTRY_FIELDS.
	(register_inferior_data_with_cleanup, register_inferior_data)
	(clear_inferior_data, set_inferior_data, inferior_data): Don't
	declare.
	* inferior.c: Use DEFINE_REGISTRY.
	(struct inferior_data, struct inferior_data_registration, struct
	inferior_data_registry, inferior_data_registry)
	(register_inferior_data_with_cleanup, register_inferior_data)
	(inferior_alloc_data, inferior_free_data  clear_inferior_data)
	(set_inferior_data, inferior_data): Remove.
	* auxv.c (_initialize_auxv): Update.
	* ada-lang.c (_initialize_ada_language): Update.
	* breakpoint.c (_initialize_breakpoint): Update.
	* i386-nat.c (i386_use_watchpoints): Update.
2012-08-22 15:17:21 +00:00
Tom Tromey ed9eebafbc * exec.c (exec_close, exec_file_attach): Update.
(add_to_section_table): Initialize 'key' field.
	(add_target_sections, remove_target_sections): Add 'key' argument.
	* exec.h (add_target_sections, remove_target_sections): Add
	'key' argument.
	* solib.c (solib_map_sections, update_solib_list, clear_solib)
	(reload_shared_libraries_1): Update.
	* target.h (struct target_section) <key>: New field.
2012-08-22 15:01:50 +00:00
Tom Tromey b4893d4828 * lib/gdb.exp (skip_unwinder_tests): New proc.
* gdb.cp/nextoverthrow.exp: Use skip_unwinder_tests.
	* gdb.java/jnpe.exp: Use skip_unwinder_tests.
2012-08-22 14:27:49 +00:00
Tom Tromey 2f2e97fabc * cli/cli-cmds.c (filter_sals): Handle nelts == 0 case. 2012-08-22 14:24:05 +00:00
gdbadmin f3523bc0fc *** empty log message *** 2012-08-22 00:00:34 +00:00
Tom Tromey 45b7da814b * gdb.hp/gdb.aCC/exception.exp: Remove. 2012-08-21 19:36:47 +00:00
Pierre Muller b3dbbd6f40 * symfile.c (allocate_symtab): Use host_address_to_string
function instead of cast of pointer to long which is not
	compatible with x86_64-w64-mingw32 build.
2012-08-21 15:43:46 +00:00
gdbadmin 3c65f4f9ff *** empty log message *** 2012-08-21 00:00:32 +00:00
gdbadmin 10ca2ade2f *** empty log message *** 2012-08-20 00:00:03 +00:00
Andrew Pinski f94363d720 2012-08-19 Andrew Pinski <apinski@cavium.com>
* mips-tdep.c (is_octeon): New function.
	(is_octeon_bbit_op): New function.
	(mips32_next_pc): Handle Octeon's bbit instructions.
	(mips32_instruction_has_delay_slot): Likewise.

012-08-19  Andrew Pinski  <apinski@cavium.com>

        * gdb.arch/mips-octeon-bbit.c: New file.
        * gdb.arch/mips-octeon-bbit.exp: New Test.
2012-08-19 22:22:49 +00:00
Andrew Pinski 78a59c2fea 2012-08-19 Andrew Pinski <apinski@cavium.com>
* mips-tdep.c (mips32_next_pc): Fix line spacing of the comment
	before the function.
2012-08-19 22:21:21 +00:00
Andrew Pinski 4f5bcb5090 2012-08-19 Andrew Pinski <apinski@cavium.com>
* mips-tdep.c (mips32_next_pc): Consolidate calls to itype_op.
2012-08-19 22:20:29 +00:00
Keith Seitz e5afdbd7a0 PR c++/14365
* c-typeprint.c (c_type_print_varspec_prefix): Pass
	-1 for SHOW to c_type_print_base for METHODPTR and MEMBERPTR.

	* gdb.dwarf2/dw2-anon-mptr.exp: New file.
	* gdb.dwarf2/dw2-anon-mptr.S: New file.
2012-08-19 19:37:51 +00:00
gdbadmin ac48ea5691 *** empty log message *** 2012-08-19 00:00:03 +00:00
Eli Zaretskii 13c9750ebf Fix a typo that prevented "make TAGS" from working.
gdb/Makefile.in (HFILES_NO_SRCDIR): Fix a typo: golang.h -> go-lang.h.
 The typo broke "make TAGS".
2012-08-18 11:00:37 +00:00
Jan Kratochvil c29e8b6460 gdb/testsuite/
* gdb.base/solib-corrupted.exp (make solibs looping): Replace
	verbose -log by more specific untested call.
2012-08-18 07:02:09 +00:00
Yao Qi 15a7e7bcb1 gdb/testsuite/
* gdb.trace/tfind.exp: Move tests on various command help before
	checking target supports trace.
	Fix the expected output of 'help tfind end'.
2012-08-18 01:00:19 +00:00
gdbadmin 91742a8b5d *** empty log message *** 2012-08-18 00:00:03 +00:00
gdbadmin db7618108f GDB 7.5 released. 2012-08-17 18:41:46 +00:00
Keith Seitz a451cb65e3 PR c++/13356
* gdbtypes.c (strict_type_checking): New variable.
	(show_strict_type_checking): New function.
	(rank_one_type): Return NS_POINTER_INTEGER_CONVERSION_BADNESS
	if strict type checking is disabled.
	(_initialize_gdbtypes): Add "check type" subcommand.
	* gdbtypes.h (NS_INTEGER_POINTER_CONVERSION_BADNESS): New struct.

	PR c++/13356
	* gdb.base/default.exp: Update all "check type" tests.
	* gdb.base/help.exp: Likewise.
	* gdb.base/setshow.exp: Likewise.
	* gdb.cp/converts.cc (foo1_type_check): New function.
	(foo2_type_check): New function.
	(foo3_type_check): New function.
	(main): Call new functions.
	* converts.exp: Add tests for integer-to-pointer conversions
	with/without strict type-checking.

	PR c++/13356
	* gdb.texinfo (Type and Range Checking): Remove warning.
	Remove spurious commas.
	Update text and examples for re-implementation of set/show
	check type.
	(C and C++ Type and Range Checks): Likewise.

	* language.h (type_mode): Remove.
	(type_check): Remove.
	(struct language_defn): Remove la_type_check.
	(STRICT_TYPE): Remove unused macro.
	(type_error): Remove.
	* language.c (set_type_range_case): Renamed to ...
	(set_range_case): ... this.  Update all callers.
	Remove type_mode/type_check.
	(type_mode): Remove.
	(type_check): Remove.
	(show_type_command): Remove.
	(set_type_command): Remove.
	(language_info): Remove type checking output.
	(type_error): Remove unused function.
	(range_error): Update comment.
	(unknown_language_defn): Remove la_type_check.
	(auto_language_defn): Likewise.
	(local_language_defn): Likewise.
	(_initialize_language): Remove "check type" subcommand.
	* ada-lang.c (ada_language_defn): Remove la_type_check.
	* c-lang.c (c_language_defn): Likewise.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	* d-lang.c (d_language_defn): Likewise.
	* f-lang.c (f_language_defn): Likewise.
	* go-lang.c (go_language_defn): Likewise.
	* jv-lang.c (java_language_defn): Likewise.
	* m2-lang.c (m2_language_defn): Likewise.
	* objc-lang.c (objc_language_defn): Likewise.
	* opencl-lang.c (opencl_language_defn): Likewise.
	* p-lang.c (pascal_language_defn): Likewise.
2012-08-17 17:37:03 +00:00
Mike Frysinger dbf6a605ee gdb: fix test failures after updating usage strings 2012-08-17 03:06:11 +00:00
gdbadmin f75182c822 *** empty log message *** 2012-08-17 00:00:33 +00:00
Joel Brobecker 973e3cf70d fix internal_error during fork event handling.
When running on ia64-hpux a program that calls fork, GDB currently
reports the following internal error:

    internal-error: Can't determine the current address space of thread process 1882

Here is what happens:
  1. GDB receives a "fork" event;
  2. handle_inferior_event calls detach_breakpoints for the child process;
  3. detach_breakpoints calls ia64's gdbarch remove_breakpoint hook,
     which needs to read an entire instruction slot in order to remove
     a breakpoint instruction from memory;
  4. To read inferior memory, the ia64-hpux code needs to know where
     that memory is located relative to the bsp..bspstore area,
     and thus needs to read the value of those registers;
  5. To get the value of those registers, ia64_hpux_xfer_memory current
     uses the current regcache.

The problem is that at the time we are trying to remove the breakpoints
from the child, the child process is not part of the list of inferiors
really known to GDB (it has not been added to inferior_list), so trying
to create a regcache for it triggers an internal error when creating
address space for the regcache (as the address space is ultimately
fetched from the inferior).

To work around this limitation, ia64_hpux_xfer_memory has been modified
to detect the fact the current inferior is not in our inferior list,
and to go, in that case, straight to the source to fetch the registers
it needs.

gdb/ChangeLog:

        * ia64-hpux-nat.c (ia64_hpux_get_register_from_save_state_t):
        New function.
        (ia64_hpux_xfer_memory): Check if inferior_ptid is known before
        using the regache.  Use ia64_hpux_get_register_from_save_state_t
        to access the bsp and bspstore registers if not.
2012-08-16 23:55:02 +00:00
Joel Brobecker d80ee84fe2 Change detach_breakpoints to take a ptid instead of a pid
Before this change, detach_breakpoints would take a pid, and then
set inferior_ptid to a ptid that it constructs using pid_to_ptid (pid).
Unfortunately, this ptid is not necessarily valid.  Consider for
instance the case of ia64-hpux, where ttrace refuses a register-read
operation if the LWP is not provided.

This problems shows up when GDB is trying to handle fork events.
Assuming GDB is configured to follow the parent, GDB will try to
detach from the child. But before doing so, it needs to remove
all breakpoints inside that child.  On ia64, this involves reading
inferior (the child's) memory. And on ia64-hpux, reading memory
requires us to read the bsp and bspstore registers, in order to
determine where that memory is relative to the value of those
registers, and thus to determine which ttrace operation to use in
order to fetch that memory (see ia64_hpux_xfer_memory).

This patch therefore changes detach_breakpoints to take a ptid instead
of a pid, and then updates all callers.

One of the consequences of this patch is that it trips an assert
on GNU/Linux targets.  But this assert appears to have not actual
purpose, and is thus removed.

gdb/ChangeLog:

        * breakpoint.h (detach_breakpoints): pid parameter is now a ptid.
        * breakpoint.c (detach_breakpoints): Change pid parameter into
        a ptid.  Adjust code accordingly.
        * infrun.c (handle_inferior_event): Delete variable child_pid.
        Update call to detach_breakpoints to pass the child ptid for
        fork events.
        * linux-nat.c (linux_nat_iterate_watchpoint_lwps): Remove
        assert that inferior_ptid's lwp is zero.
        (linux_handle_extended_wait): Update call to detach_breakpoints.
        * inf-ttrace.c (inf_ttrace_follow_fork): Update call to
        detach_breakpoints.
2012-08-16 23:54:50 +00:00
Joel Brobecker 2dcc608618 inf_ttrace_follow_fork: detach_breakpoints called twice for child.
When debugging a program that forks with follow-fork set to follow
the parent, we end up calling detach_breakpoints for the child twice.
On ia64-hpux, this leads to a warning when trying to remove the
breakpoints the second time around, because the ia64 code detects
that the address does not point to a breakpoint instruction.

gdb/ChangeLog:

        * inf-ttrace.c (inf_ttrace_follow_fork): When following the
        parent, only call detach_breakpoints if tts.tts_event ==
        TTEVT_VFORK.
2012-08-16 23:54:37 +00:00
Joel Brobecker 0c92d8c1c3 DWARF frame unwinder executes one too many rows
The problem is trying to unwind from a function where %ebp is NOT
used as the frame pointer, and the size of the frame changes over
the lifetime of that function.

For instance, trying to unwind past the GNAT runtime function
called system.tasking.rendezvous.timed_selective_wait on x86-linux,
one can get:

    (gdb) bt
    [...]
    #3  0x0805364b in system.tasking.rendezvous.timed_selective_wait ()
    #4  0xb7fe5068 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Looking at the CFI, we find the following initial instructions...

>   DW_CFA_def_cfa: %esp+4 (r4 ofs 4)
>   DW_CFA_offset: %eip at cfa-4  (r8 = %eip)

... and the associated FDE:

> 00001be4 00000054 00001be8 FDE cie=00000000 pc=08053310..08053951
[...]
>   DW_CFA_advance_loc: 8 to 080534ad
>   DW_CFA_def_cfa_offset: 112
>   DW_CFA_advance_loc2: 414 to 0805364b
>   DW_CFA_def_cfa_offset: 108
[...]

The problem is that the DWARF frame unwinder executed the FDE until
the row for PC == 0x0805364b. But in reality, our program hasn't
executed the instruction at that address yet (it is the return address).
So GDB executed a little too much of the FDE, giving us the wrong
offset for the frame base, and thus the wrong address where %eip
got saved.

This patch fixes the problem by using a more correct PC as the bound
for executing the FDE.

gdb/ChangeLog:

        * dwarf2-frame.c (dwarf2_frame_cache): Use
        get_frame_address_in_block instead of get_frame_pc as
        the bound for executing the frame's FDE.

gdb/testsuite/ChangeLog:

        * gdb.ada/rdv_wait: New testcase.
2012-08-16 15:45:46 +00:00
Yao Qi 6b1755ce16 gdb/
* gdbtypes.h (enum type_code): Define TYPE_CODE_BITSTRING -1.
	* arm-tdep.c (arm_type_align): Remove code handling TYPE_CODE_BITSTRING.
	* c-typeprint.c (c_type_print_varspec_prefix): Likewise.
	(c_type_print_varspec_suffix): Likewise.
	* eval.c (evaluate_subexp_standard): Likewise.
	* f-typeprint.c (f_type_print_varspec_prefix): Likewise.
	(f_type_print_varspec_suffix): Likewise.
	* gdbtypes.c (is_scalar_type): Likewise.
	(recursive_dump_type): Likewise.
	* infcall.c (value_arg_coerce): Likewise.
	* m2-valprint.c (m2_val_print): Likewise.
	* p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
	(pascal_type_print_varspec_suffix): Likewise.
	(pascal_type_print_base): Likewise.
	* p-valprint.c (pascal_val_print): Likewise.
	(pascal_val_print): Likewise.
	* valops.c (value_slice): Likewise.
	* valprint.c (scalar_type_p): Likewise.
	* valarith.c (value_bitstring_subscript): Remove.
	(value_concat): Remove code handling TYPE_CODE_BITSTRING.
	Remove comment on TYPE_CODE_BITSTRING.

	* stabsread.c (read_type): Don't set TYPE_CODE (type) to
	TYPE_CODE_BITSTRING.

	* python/py-type.c (pyty_codes): Move ENTRY (TYPE_CODE_BITSTRING) to
	slot 0.

gdb/doc:
	* gdb.texinfo (Types In Python): Mention gdb.TYPE_CODE_BITSTRING
	is deprecated.
2012-08-16 07:36:28 +00:00
Yao Qi 8acc406562 gdb/
* tracepoint.c (trace_find_none_command): Remove.
	(_initialize_tracepoint): Call add_alias_cmd for "tfind none".
2012-08-16 07:26:16 +00:00
Yao Qi 8128fd8ef7 gdb/
* remote.c (handle_notification): Remove parameter 'length'.
	(putpkt_binary, getpkt_or_notif_sane_1): Caller update.
2012-08-16 07:21:59 +00:00
gdbadmin 4f5e1ddd97 *** empty log message *** 2012-08-16 00:00:33 +00:00
Keith Seitz 2873700ec5 * gdbtypes.c (opaque_type_resolution): Make static.
Add missing comment.
	(overload_debug): Add missing comment.
	(show_opaque_type_resolution): Likewise.
	(show_overload_debug): Likewise.
	(print_bit_vector): Remove unnecessary forward declaration.
	(print_arg_types): Likewise.
	(dump_fn_fieldlists): Likewise.
	(print_cplus_stuff): Likewise.
2012-08-15 23:43:14 +00:00
Keith Seitz 1c9f2ed2b3 Forgotten commit from 2012-07-30. 2012-08-15 23:25:08 +00:00
Tom Tromey b82d08cd05 * gdb_bfd.c (struct gdb_bfd_data) <archive_bfd>: New field.
(gdb_bfd_ref): Initialize new field.
	(gdb_bfd_unref): Unref the archive BFD.
	(gdb_bfd_openr_next_archived_file): Acquire a reference to the
	parent archive.
2012-08-15 14:33:40 +00:00
Tom Tromey db6573d664 PR python/14387:
* python/py-bpevent.c (create_breakpoint_event_object): Update
	comment.
	* python/py-event.c (evpy_add_attribute): Update comment.
	* python/py-exitedevent.c (create_exited_event_object): Fix
	reference counting and error handling.
	* python/py-newobjfileevent.c (create_new_objfile_event_object):
	Fix reference counting.
	* python/py-signalevent.c (create_signal_event_object): Fix
	reference counting and error handling.
	* python/py-stopevent.c (emit_stop_event): Fix reference
	counting.
	* python/py-threadevent.c (get_event_thread): Return a
	borrowed reference.
	* python/py-type.c (convert_field): Fix reference counting.
2012-08-15 14:22:02 +00:00
Tom Tromey a036ba48ef * dwarf2read.c (dwarf_decode_macro_bytes)
<DW_MACRO_GNU_transparent_include>: Use pointer to included data
	as hash key.
2012-08-15 14:18:18 +00:00
Mike Frysinger 486c773953 gdb: improve usage strings
This adds Usage strings to a bunch of commands, tweaks the grammar in a
few, and improves the help text for the handle command.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-08-15 01:59:42 +00:00
gdbadmin f4c34ced22 *** empty log message *** 2012-08-15 00:00:04 +00:00
Doug Evans 70b099cf5a * gdbtypes.c (struct extra): Delete, unused. 2012-08-14 19:35:47 +00:00
Doug Evans 5212577a88 * gdbtypes.c: Whitespace cleanup.
(address_space_name_to_int): Remove "extern" from definition.
	(_initialize_gdbtypes): Declare with initialize_file_ftype.
2012-08-14 19:28:16 +00:00
Doug Evans 4cf93a03ff * gdbtypes.c (make_pointer_type): Remove redundant setting of
TYPE_POINTER_TYPE (type).
2012-08-14 19:03:47 +00:00
Jan Kratochvil e56f7f42e4 gdb/testsuite/
* gdb.base/attach-twice.exp: Remove excessive ps exec.
2012-08-14 18:47:37 +00:00
Gary Benson 3756ef7e35 2012-08-14 Gary Benson <gbenson@redhat.com>
* solib-svr4.c (svr4_free_library_list): Use free_so.
2012-08-14 16:16:04 +00:00
gdbadmin d6a935eb69 *** empty log message *** 2012-08-14 00:00:33 +00:00
Doug Evans e202d6e802 * gdb.base/help.exp: Update expected output. 2012-08-13 21:14:48 +00:00
Mike Frysinger 40d72643d3 gdb: ignore generated go-exp.c 2012-08-13 15:44:00 +00:00
Doug Evans f47f77df4e * value.c (show_convenience): Tweak comment.
(_initialize_values): Mention convenience functions in the help text
	for "show convenience".

	doc/
	* gdb.texinfo (Convenience Vars): Update text for "show convenience"
	to include functions.

	testsuite/
	* gdb.base/default.exp: Update expected output of "show convenience".
2012-08-13 14:31:00 +00:00
Yao Qi 7507c54a53 gdb/
* std-operator.def: Remove TERNOP_SLICE_COUNT.
	* breakpoint.c (watchpoint_exp_is_const): Remove handling to
	TERNOP_SLICE_COUNT.
	* eval.c (evaluate_subexp_standard): Likewise.
	* expprint.c (print_subexp_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.
2012-08-13 01:02:07 +00:00
Yao Qi 5cad973621 gdb/
* std-operator.def: Remove OP_BITSTRING.
	* breakpoint.c (watchpoint_exp_is_const): Update.
	* eval.c (evaluate_subexp_standard): Remove handling to
	OP_BITSTRING.
	* expprint.c (print_subexp_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.
	* valops.c (value_bitstring): Remove.
	* value.h: Remove the declaration of 'value_bitstring'.
2012-08-13 00:54:04 +00:00
gdbadmin a79febba13 *** empty log message *** 2012-08-13 00:00:03 +00:00
gdbadmin 2fec20e227 *** empty log message *** 2012-08-12 00:00:32 +00:00
Sergio Durigan Junior bad7670a0e 2012-08-10 Sergio Durigan Junior <sergiodj@redhat.com>
* linespec.c (find_methods): Remove unused variables `i1' and
	`name_len'.
	(decode_line_full): Likewise for `arg_start'.
2012-08-11 00:20:18 +00:00
Sergio Durigan Junior d9dce7face 2012-08-10 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb_bfd.c (gdb_bfd_unref): Remove unused variable `slot'.
	(zlib_decompress_section): Likewise for `section_data'.
	(gdb_bfd_map_section): Likewise for `buf' and `retbuf'.
2012-08-11 00:05:55 +00:00
gdbadmin a548ec93e5 *** empty log message *** 2012-08-11 00:00:33 +00:00
Doug Evans a72c32530e Add $_memeq, $_regex, $_streq, $_strlen convenience functions.
* NEWS: Document them.
	* data-directory/Makefile.in (PYTHON_FILES): Add function/__init__.py,
	function/strfns.py.
	* python/py-type.c (typy_array_1): New function.
	(typy_array): Call it.
	(typy_vector): New function.
	(type_object_methods): Add "vector".
	* python/lib/gdb/function/__init__.py: New file.
	* python/lib/gdb/function/strfns.py: New file.

	doc/
	* gdb.texinfo (Convenience Funs): New node.
	(Types In Python): Document Type.vector.

	testsuite/
	* gdb.python/py-strfns.c: New file.
	* gdb.python/py-strfns.exp: New file.
	* gdb.python/py-type.exp (test_fields): Add vector tests.
2012-08-10 20:26:00 +00:00
Siddhesh Poyarekar 200bc880f4 * python/py-type.c (convert_field): Use gdb_py_long_from_longest
for TYPE_FIELD_BITPOS.
	(typy_get_sizeof): Likewise for TYPE_LENGTH.
2012-08-10 18:55:18 +00:00
Mike Frysinger de0bea007c gdb: add completion handler for "handle" and "signal"
The command line completion has spoiled me.  Thus the lack of completion with
the "handle" command annoys me.  Patch!

This does a few things:
 - adds a VEC_merge helper
 - adds a generic signal completer
 - adds a completion handler for the "handle" command
 - sets the completion handler for the "signal" command

URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10436
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-08-10 05:03:13 +00:00
gdbadmin 8bd0dbe0fc *** empty log message *** 2012-08-10 00:00:03 +00:00
Yao Qi 5b9afe8a35 gdb/
* cli/cli-decode.c (set_cmd_prefix): New.
	(lookup_cmd_for_prefixlist): New.
	(add_prefix_cmd): Call set_cmd_prefix and update field 'prefix'
	of each cmd_list_element in *prefixlist.
	(add_setshow_cmd_full): set_cmd_prefix.
	(add_alias_cmd): Likewise.
	* cli/cli-decode.h (struct cmd_list_element) <prefix>: New field.
	Declare 'auto_boolean_enums'.
	* cli/cli-setshow.c: Include "observer.h".
	(notify_command_param_changed_p): New.
	(add_setshow_auto_boolean_cmd): Move auto_boolean_enums out.
	Remove 'static'.
	(do_setshow_command): Split it to ...
	(do_set_command, do_show_command): ... them.  New.
	(do_set_command): Call observer_notify_command_param_changed if
	notify_command_param_changed_p returns true.
	(cmd_show_list): Caller update.
	* auto-load.c (set_auto_load_cmd): Likewise.
	* remote.c (show_remote_cmd): Likewise.
	* cli/cli-setshow.h: Update declarations.
	* top.c (execute_command): Call do_set_command and do_show_command.

	* NEWS: Mention new MI notification.
	* mi/mi-interp.c: Declare mi_command_param_changed.
	(mi_interpreter_init): Attach mi_command_param_changed to
	observer command_param_changed.
	(mi_command_param_changed): New.
	Remove mi_suppress_breakpoint_notifications.
	Define global variable mi_suppress_notification.
	(mi_breakpoint_created): Update.
	(mi_breakpoint_deleted): Likewise.
	(mi_breakpoint_modified): Likewise.
	* mi/mi-main.c (mi_cmd_execute): Likewise.  Check command
	'gdb-set' and set mi_suppress_notification.
	* mi/mi-main.h: (mi_suppress_notification): New struct.

gdb/doc/

	* observer.texi: New observer command_param_changed.
	* gdb.texinfo (GDB/MI Async Records): Doc for '=cmd-param-changed'.

gdb/testsuite/

	* gdb.mi/mi-cmd-param-changed.exp: New.
	* gdb.mi/mi-cli.exp: Update for MI notification "=cmd-param-changed".
	* gdb.mi/mi-var-rtti.exp, gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-prompt.exp: Likewise.
2012-08-09 12:53:46 +00:00
Jan Kratochvil 1969df8919 gdb/
* fbsd-nat.h (fbsd_find_memory_regions): Use find_memory_region_ftype.
2012-08-09 09:24:23 +00:00
Yao Qi 8bfd80dbad gdb/
* cli/cli-cmds.c (enablebreaklist): Move it to breakpoint.c.
	(skiplist): Move it to skip.c.
	(init_cmd_lists): Remove code setting enablebreaklist and
	skiplist to NULL.
	* breakpoint.c (enablebreaklist): Moved from cli/cli-cmds.c.
	* cli/cli-cmds.h: Remove declaration of enablebreaklist and
	skiplist.
	* gdbcmd.h: Likewise.
	* skip.c (_initialize_step_skip): Move 'skiplist' from
	cli/cli-cmds.c.
2012-08-09 06:48:22 +00:00
Yao Qi 28578e6b11 gdb/
* cli/cli-dump.c: Add 'static' to some cmd_list_element variables.
	* gnu-nat.c, symfile.c: Likewise.
2012-08-09 06:26:25 +00:00
gdbadmin b138ebc10e *** empty log message *** 2012-08-09 00:00:03 +00:00
Doug Evans 260c0b2ad4 * utils.c (prompt_for_continue_wait_time): New static global.
(make_command_stats_cleanup): Initialize it.
	(report_command_stats): Subtract time waiting for user.
	(prompt_for_continue): Track time waiting for user.
	(defaulted_query): Track time waiting for user.
2012-08-08 21:55:01 +00:00
Doug Evans 4f485ebc90 * eval.c (evaluate_subexp_standard): Fix thinko in handling
UNOP_MEMVAL_TYPE.
	* expprint.c (print_subexp_standard, case OP_TYPE): New.
	(print_subexp_standard, case UNOP_CAST_TYPE): Don't increment pos.
	(print_subexp_standard, case UNOP_DYNAMIC_CAST): Ditto.
	(print_subexp_standard, case UNOP_REINTERPRET_CAST): Ditto.
	(print_subexp_standard, case UNOP_MEMVAL_TYPE): Ditto.
	(dump_subexp_body_standard, case UNOP_DYNAMIC_CAST): Don't increment
	elt.
	(dump_subexp_body_standard, case UNOP_REINTERPRET_CAST): Ditto.
	(dump_subexp_body_standard, case UNOP_CAST_TYPE): Ditto.
	(dump_subexp_body_standard, case UNOP_MEMVAL_TYPE): Ditto.
	(dump_prefix_expression): Handle OP_TYPE.

	testsuite/
	* gdb.base/debug-expr.c: New file.
	* gdb.base/debug-expr.exp: New file.
	* gdb.base/exprs.exp: Test {type} casts.
	* gdb.cp/debug-expr.exp: New file.
2012-08-08 21:17:04 +00:00
Keith Seitz 2acf2b3959 * breakpoint.c (parse_breakpoint_sals): Remove unused variable
addr_start.
2012-08-08 20:39:34 +00:00
Doug Evans e6712ff1b5 * gdb_string.h: Moved to ...
* common/gdb_string.h: ... here.
	* common/vec.h: Remove #ifndef GDBSERVER conditional inclusion of
	gdb_string.h and gdb_assert.h.

	gdbserver/
	* configure.ac: Add check for strstr.
	* config.in: Regenerate.
	* configure: Regenerate.

	* linux-thread-db.c: #include "gdb_vecs.h".
	(try_thread_db_load_from_pdir_1): New arg "subdir".  All callers
	updated.
	(try_thread_db_load_from_pdir): New arg "subdir".  All callers updated.
	(thread_db_load_search): Use a vector to iterate over path elements.
	Handle text appearing after "$pdir".

	gdbserver/
	* Makefile.in (SFILES): Add gdb_vecs.c.
	(OBS): Add gdb_vecs.o.
	(gdb_vecs_h, host_defs_h): New variables.
	(thread-db.o): Add $(gdb_vecs_h) dependency.
	(gdb_vecs.o): New rule.
	* thread-db.c: #include "gdb_vecs.h".
	(thread_db_load_search): Use a vector to iterate over path elements.
	Handle text appearing after "$pdir".
2012-08-08 19:48:19 +00:00
Yao Qi ab854e5451 gdb/
* tic6x-tdep.c (tic6x_register_to_value): Remove.
	(tic6x_value_to_register): Likewise.
	(tic6x_gdbarch_init): Don't call set_gdbarch_register_to_value
	and set_gdbarch_value_to_register.
2012-08-08 05:47:57 +00:00
gdbadmin 684147fad0 *** empty log message *** 2012-08-08 00:00:32 +00:00