Commit Graph

27879 Commits

Author SHA1 Message Date
gdbadmin 7d71f58245 *** empty log message *** 2011-01-27 00:00:05 +00:00
Kevin Buettner cdefc55df3 * remote-mips.c: Add internationalization mark ups. Remove
trailing \n from already marked up strings.
2011-01-26 23:13:22 +00:00
Tom Tromey a81766d88f gdb
* python/py-prettyprint.c (print_string_repr): Clear
	'addressprint' option when calling val_print_string.
	(print_children): Handle Val_pretty_default.  Clear 'addressprint'
	option when calling val_print_string.
gdb/testsuite
	* gdb.python/py-prettyprint.exp (run_lang_tests): Ensure no blank
	space before string output.  Add test for "set print pretty off"
	case.
2011-01-26 20:58:49 +00:00
Tom Tromey 74aedc4602 * python/python.c (gdbpy_solib_name): Use gdb_py_longest and
GDB_PY_LL_ARG.
	* python/python-internal.h (GDB_PY_LL_ARG, GDB_PY_LLU_ARG): New
	macros.
	(gdb_py_longest, gdb_py_ulongest): New typedefs.
	(gdb_py_long_from_longest, gdb_py_long_from_ulongest)
	(gdb_py_long_as_ulongest): New defines.
	(gdb_py_object_from_longest, gdb_py_object_from_ulongest)
	(gdb_py_int_as_long): Declare.
	* python/py-value.c (valpy_lazy_string): Use gdb_py_longest,
	GDB_PY_LL_ARG, gdb_py_object_from_longest.
	(valpy_long): Add comment.
	* python/py-utils.c (get_addr_from_python): Use
	gdb_py_long_as_ulongest.  Handle overflow properly.
	(gdb_py_object_from_longest): New function.
	(gdb_py_object_from_ulongest): Likewise.
	(gdb_py_int_as_long): Likewise.
	* python/py-type.c (typy_array): Use gdb_py_int_as_long.
	* python/py-symtab.c (salpy_get_pc): Use
	gdb_py_long_from_ulongest.
	(salpy_get_line): Use PyInt_FromLong.
	* python/py-param.c (set_parameter_value): Use
	gdb_py_int_as_long.
	* python/py-lazy-string.c (stpy_get_address): Use
	gdb_py_long_from_ulongest.
	* python/py-frame.c (frapy_pc): Use gdb_py_long_from_ulongest.
	* python/py-cmd.c (cmdpy_completer): Use gdb_py_int_as_long.
	* python/py-breakpoint.c (bppy_set_thread): Use
	gdb_py_int_as_long.
	(bppy_set_task): Likewise.
	(bppy_set_ignore_count): Likewise.
	(bppy_set_hit_count): Likewise.
	* python/py-block.c (blpy_get_start): Use
	gdb_py_object_from_ulongest.
	(blpy_get_end): Likewise.
	(gdbpy_block_for_pc): Use gdb_py_ulongest and GDB_PY_LLU_ARG.
2011-01-26 20:53:45 +00:00
Thiago Jung Bauermann e4f6d2ecc4 2011-01-25 Mathieu Lacage <mathieu.lacage@inria.fr>
PR/symtab 11766:
	* gdb/objfiles.h (struct objfile) <addr_low>: New field.
	* gdb/solib.c (solib_read_symbols): Check for addr_low in
	equality test for objfile, initialize addr_low if needed.
2011-01-26 01:55:19 +00:00
gdbadmin f829b0eccc *** empty log message *** 2011-01-26 00:00:02 +00:00
Pedro Alves b30aa27843 * tui/tui-regs.c (tui_register_format): Remove dead code. 2011-01-25 18:18:15 +00:00
Pedro Alves ab2188aa2a * printcmd.c (print_formatted): Use val_print_scalar_formatted
instead of print_scalar_formatted.
	(print_scalar_formatted): Don't handle 's' format strings here,
	and add an assertion that we never see such format here.
	* valprint.h (val_print_scalar_formatted): Declare.
	* valprint.c (val_print_scalar_formatted): New.
	* c-valprint.c (c_val_print): Use val_print_scalar_formatted
	instead of print_scalar_formatted.
	* jv-valprint.c (java_val_print): Ditto.
	* p-valprint.c (pascal_val_print): Ditto.
	* ada-valprint.c (ada_val_print_1): Ditto.
	* f-valprint.c (f_val_print): Ditto.
	* infcmd.c (registers_info): Ditto.
	* m2-valprint.c (m2_val_print): Ditto.
2011-01-25 17:59:00 +00:00
Pedro Alves 66d61a4cab * m2-valprint.c (print_unbounded_array): Pass
value_contents_for_printing rather than value_contents, to
	m2_print_array_contents.  Also pass in the value.
2011-01-25 17:43:29 +00:00
Jan Kratochvil 831adc1f7d gdb/
* dwarf2read.c (dwarf2_read_index, write_psymtabs_to_index)
	(save_gdb_index_command): Switch to .gdb_index version 4.
2011-01-25 17:25:12 +00:00
Pedro Alves 2062226976 * mi/mi-main.c (get_register): Use get_frame_register_value rather
than frame_register, and always pass a valid value to val_print.
2011-01-25 17:00:27 +00:00
Pedro Alves 585fdaa106 Centralize printing "<optimized out>".
gdb/
	* valprint.h (val_print_optimized_out): Declare.
	* cp-valprint.c (cp_print_value_fields): Use
	val_print_optimized_out.
	* jv-valprint.c (java_print_value_fields): Ditto.
	* p-valprint.c (pascal_object_print_value_fields): Ditto.
	* printcmd.c (print_formatted): Ditto.
	* valprint.c (valprint_check_validity): Ditto.
	(value_check_printable): Ditto.
	(val_print_optimized_out): New.

	gdb/doc/
	* gdb.texinfo: s/value optimized out/optimized out/g

	gdb/testsuite/
	* gdb.base/frame-args.exp: Adjust.
	* gdb.dwarf2/dw2-noloc.exp: Adjust.
	* gdb.dwarf2/dw2-inline-param.exp: Adjust.
	* gdb.dwarf2/pieces.exp: Adjust.
	* gdb.opt/clobbered-registers-O2.exp: Adjust.
	* gdb.opt/inline-locals.exp: Adjust.
	* gdb.threads/fork-child-threads.exp: Adjust.
2011-01-25 16:26:23 +00:00
Ken Werner d468832aa5 gdb/testsuite/ChangeLog
2011-01-25  Ken Werner  <ken.werner@de.ibm.com>

        * gdb.opencl/convs_casts.cl: Move program scope variables into the
        OpenCL kernel function. Add a comment as marker. Add address space
        qualifiers for the remaining program scope variables.
        * gdb.opencl/datatypes.cl: Likewise.
        * gdb.opencl/operators.cl: Likewise.
        * gdb.opencl/vec_comps.cl: Likewise.
        * gdb.opencl/convs_casts.exp: Replace gdb_test_multiple by gdb_test.
        Add breakpoint at the marker comment.
        * gdb.opencl/datatypes.exp: Likewise.
        * gdb.opencl/operators.exp: Likewise.
        * gdb.opencl/vec_comps.exp: Likewise.
2011-01-25 16:10:28 +00:00
Pedro Alves 29ec526351 gdb/
* infcmd.c (default_print_registers_info): Allocate values so to
	never pass a NULL value to val_print.
2011-01-25 15:47:58 +00:00
Pedro Alves de4127a3b2 * cp-valprint.c (cp_print_value): Treat the 'skip' local as
boolean.  Make sure to always pass a value that matches the
	contents buffer to callees.  Preserve `address' for following
	iterations.
	* value.c (value_contents_for_printing_const): New.
	(value_address): Constify value argument.
	* value.h (value_contents_for_printing_const): Declare.
	(value_address): Constify value argument.
2011-01-25 15:18:36 +00:00
Pedro Alves ee99023e12 * regcache.c (struct regcache_descr): Rename
sizeof_raw_register_valid_p field to sizeof_raw_register_status,
	and sizeof_cooked_register_valid_p to
	sizeof_cooked_register_status.
	(init_regcache_descr): Adjust.
	(struct regcache): Rename register_valid_p field to
	register_status.
	(regcache_xmalloc_1, regcache_xfree, regcache_save)
	(do_cooked_read): Adjust.
	(regcache_valid_p): Rename to ...
	(regcache_register_status): ... this.  Adjust.
	(regcache_invalidate): Adjust.
	(regcache_raw_read, regcache_cooked_read, regcache_raw_write):
	Adjust.
	(regcache_raw_supply): Adjust.  If buf i NULL, mark the register
	as unavailable, not valid.
	(regcache_dump): Adjust.
	* regcache.h (enum register_status): New.
	(regcache_register_status): Declare.
	(regcache_invalidate): Delete declaration.
	* corelow.c (get_core_registers): Adjust.
	* tracepoint.c (tfile_fetch_registers): Adjust.
	* trad-frame.c (REG_VALUE): Rename to ...
	(TF_REG_VALUE): ... this.
	(REG_UNKNOWN): Rename to ...
	(TF_REG_UNKNOWN): ... this.
	(trad_frame_set_value, trad_frame_set_unknown): Adjust.
	* mi/mi-main.c (register_changed_p): Adjust.
2011-01-25 12:47:25 +00:00
Pedro Alves 99e42fd82a * regcache.c (struct regcache_descr): Remove outdated comment.
(init_regcache_descr): Remove sizeof_raw_register_valid_p
	overallocate hack.
	(regcache_xmalloc): Rename to ...
	(regcache_xmalloc_1): ... this.  Add `readonly_p' parameter.
	Allocate the regcache type accordingly.
	(regcache_xmalloc): New as wrapper around regcache_xmalloc_1.
	(regcache_xfree): Asser the source is also readonly.  Copy sizeof
	cooked registers, not raw.
	(regcache_dup_no_passthrough): Delete.
	(get_thread_arch_regcache): Use regcache_xmalloc_1.
	* h8300-tdep.c (h8300_push_dummy_call): Tweak comment to not
	mention obsolete write_register_bytes.
	* regcache.h (regcache_dup_no_passthrough): Delete declaration.
2011-01-25 12:13:20 +00:00
Pedro Alves f7605bc29f Stop remote_read_bytes from handling partial reads itself.
* remote-fileio.c: Include target.h.
	(remote_fileio_write_bytes): Delete.
	(remote_fileio_func_open, remote_fileio_func_write)
	(remote_fileio_func_rename, remote_fileio_func_unlink): Use
	target_read_memory.
	(remote_fileio_func_stat): Use target_read_memory and
	target_write_memory.
	(remote_fileio_func_gettimeofday): Use target_write_memory.
	(remote_fileio_func_system): Use target_read_memory.
	* remote.c (remote_write_bytes): Make it static.
	(remote_read_bytes): Don't handle partial reads here.
	* remote.h (remote_read_bytes): Delete declaration.
2011-01-25 11:54:00 +00:00
Pedro Alves d08aafeffe 2011-01-25 Pedro Alves <pedro@codesourcery.com>
* server.h (decode_xfer_write): Change prototype.
	* remote-utils.c (decode_xfer_write): Remove `annex' parameter,
	and don't extract the annex here.
	* server.c (decode_xfer_read): Remove `annex' parameter,
	and don't extract the annex here.
	(decode_xfer): New.
	(struct qxfer): New.
	(handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
	(handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
	(handle_qxfer_statictrace): New functions, abstracted out from
	handle_query, and made to use the struct qxfer interface.
	(handle_threads_qxfer_proper): Rename to ...
	(handle_qxfer_threads_proper): ... this.
	(handle_threads_qxfer): Rename to ...
	(handle_qxfer_threads): ... this.  Adjust.
	(qxfer_packets): New array.
	(handle_qxfer): New function.
	(handle_query): Use handle_qxfer.
2011-01-25 10:09:19 +00:00
Pedro Alves efc0eabd60 Simplify XML parsing a bit.
* xml-support.h (gdb_xml_parse_quick): Declare.
	* xml-support.c (gdb_xml_create_parser_and_cleanup_1): Renamed
	from gdb_xml_create_parser_and_cleanup, and added `old_chain'
	parameter.
	(gdb_xml_create_parser_and_cleanup): Reimplement on top of
	gdb_xml_create_parser_and_cleanup_1.
	(gdb_xml_parse_quick): New.
	* memory-map.c (parse_memory_map): Use gdb_xml_parse_quick.
	* osdata.c (osdata_parse): Ditto.
	* remote.c (remote_threads_info): Ditto.
	* solib-target.c (solib_target_parse_libraries): Ditto.
	* xml-syscall.c (syscall_parse_xml): Ditto.
	* xml-tdesc.c (tdesc_parse_xml): Ditto.
2011-01-25 09:49:59 +00:00
gdbadmin 9ad64e945d *** empty log message *** 2011-01-25 00:00:32 +00:00
Kevin Buettner 314d366acd * configure.tgt (mips*-*-elf): New; just like mips*-*-*, but
with remote-mips.o added to gdb_target_obs.
	* Makefile.in (ALL_TARGET_OBS): Add remote-mips.o.
2011-01-24 21:34:19 +00:00
Pedro Alves a491d753e8 * ada-valprint.c (val_print_packed_array_elements): Pass the
correct struct value to val_print.
	(ada_val_print_1): Ditto.
2011-01-24 21:28:12 +00:00
Pedro Alves 490f124f09 2011-01-24 Pedro Alves <pedro@codesourcery.com>
Don't lose embedded_offset in printing routines throughout.

	gdb/
	* valprint.h (val_print_array_elements): Change prototype.
	* valprint.c (val_print_array_elements): Add `embedded_offset'
	parameter, and adjust to pass it down to val_print, while passing
	`valaddr' or `address' unmodified.  Take embedded_offset into
	account when checking repetitions.
	* c-valprint.c (c_val_print): Pass embedded_offset to
	val_print_array_elements instead of adjusting `valaddr' and
	`address'.
	* m2-valprint.c (m2_print_array_contents, m2_val_print): Pass
	embedded_offset to val_print_array_elements instead of adjusting
	`valaddr'.
	* p-lang.h (pascal_object_print_value_fields): Adjust prototype.
	* p-valprint.c (pascal_val_print): Pass embedded_offset to
	val_print_array_elements and pascal_object_print_value_fields
	instead of adjusting `valaddr'.
	(pascal_object_print_value_fields): Add `offset' parameter, and
	adjust to use it.
	(pascal_object_print_value): Add `offset' parameter, and adjust to
	use it.
	(pascal_object_print_static_field): Use
	value_contents_for_printing/value_embedded_offset, rather than
	value_contents.
	* ada-valprint.c (val_print_packed_array_elements): Add `offset'
	parameter, and adjust to use it.  Use
	value_contents_for_printing/value_embedded_offset, rather than
	value_contents.
	(ada_val_print): Rename `valaddr0' parameter to `valaddr'.
	(ada_val_print_array): Add `offset' parameter, and adjust to use
	it.
	(ada_val_print_1): Rename `valaddr0' parameter to `valaddr', and
	`embedded_offset' to `offset'.  Don't re-adjust `valaddr'.
	Instead work with offsets.  Use
	value_contents_for_printing/value_embedded_offset, rather than
	value_contents.  Change `defer_val_int' local type to CORE_ADDR,
	and use value_from_pointer to extract a target pointer, rather
	than value_from_longest.
	(print_variant_part): Add `offset' parameter.  Replace
	`outer_valaddr' parameter by a new `outer_offset' parameter.
	Don't re-adjust `valaddr'.  Instead pass down adjusted offsets.
	(ada_value_print): Use
	value_contents_for_printing/value_embedded_offset, rather than
	value_contents.
	(print_record): Add `offset' parameter, and adjust to pass it
	down.
	(print_field_values): Add `offset' parameter.  Replace
	`outer_valaddr' parameter by a new `outer_offset' parameter.
	Don't re-adjust `valaddr'.  Instead pass down adjusted offsets.
	Use value_contents_for_printing/value_embedded_offset, rather than
	value_contents.
	* d-valprint.c (dynamic_array_type): Use
	value_contents_for_printing/value_embedded_offset, rather than
	value_contents.
	* jv-valprint.c (java_print_value_fields): Add `offset' parameter.
	Don't re-adjust `valaddr'.  Instead pass down adjusted offsets.
	(java_print_value_fields): Take `offset' into account.  Don't
	re-adjust `valaddr'.  Instead pass down adjusted offsets.
	(java_val_print): Take `embedded_offset' into account.  Pass it to
	java_print_value_fields.
	* f-valprint.c (f77_print_array_1): Add `embedded_offset'
	parameter.  Don't re-adjust `valaddr' or `address'.  Instead pass
	down adjusted offsets.
	(f77_print_array): Add `embedded_offset' parameter.  Pass it down.
	(f_val_print): Take `embedded_offset' into account.

	gdb/testsuite/
	* gdb.base/printcmds.c (some_struct): New struct and instance.
	* gdb.base/printcmds.exp (test_print_repeats_embedded_array): New
	procedure.
	<global scope>: Call it.
2011-01-24 18:54:17 +00:00
gdbadmin 23b1e6e450 *** empty log message *** 2011-01-24 00:00:03 +00:00
gdbadmin af1e3ccbec *** empty log message *** 2011-01-23 00:00:02 +00:00
gdbadmin bb38e8717f *** empty log message *** 2011-01-22 00:00:02 +00:00
Joel Brobecker 7bfc943420 move handing of "set interactive-mode" to gdb_has_a_terminal
The real purpose of this setting is really to override what the debugger
would otherwise guess from checking the stdin settings.  So it seems
more natural to see this setting being handled inside gdb_has_a_terminal
rather than input_is_terminal (which checks for other things, such as
whether the input is stdin, for instance).

This patch also adjust the command help and the associated section in
the GDB Manual to be a little clearer about that.

gdb/ChangeLog:

        * inflow.c: Include "gdbcmd.h".
        (interactive_mode): New static global, moved here from top.c.
        (show_interactive_mode): New function, moved here from top.c.
        use gdb_has_a_terminal instead of input_from_terminal_p to
        determine the current mode.
        (gdb_has_a_terminal): Add handling of the "iteractive-mode"
        setting.
        (_initialize_inflow): Add the "set/show interactive-mode"
        commands.  Moved here from top.c, after having adjusted slightly
        the help text.
        * top.c (interactive_mode, show_interactive_mode): Delete, moved
        to inflow.c.
        (input_from_terminal_p): Remove handling of "interactive-mode"
        setting, moved to infow.c.
        (init_main): Remove creation of the "set/show interactive-mode"
        commands, moved to inflow.c.

gdb/doc/ChangeLog:

        * gdb.texinfo (Other Misc Settings): Rework part of the
        documentation of the "set interactive mode" command.
2011-01-21 18:56:43 +00:00
Ken Werner 6da78614a3 gdb/testsuite/ChangeLog
2011-01-21  Ken Werner  <ken.werner@de.ibm.com>

        * lib/opencl.exp (skip_opencl_tests): Add missing compile_flags
        argument to the gdb_compile_opencl_hostapp call.
2011-01-21 14:05:51 +00:00
gdbadmin 995ac3ff08 *** empty log message *** 2011-01-21 00:00:33 +00:00
gdbadmin 2f1b715f20 *** empty log message *** 2011-01-20 00:00:32 +00:00
Joel Brobecker 446036530e [NEWS/ia64-hpux] Add entry for native ia64-hpux support
gdb/ChangeLog:

        * NEWS: Add entry for native ia64-hpux support.
2011-01-19 20:41:11 +00:00
Yao Qi ec64c9aa23 2011-01-19 Yao Qi <yao@codesourcery.com>
* lib/dwarf.exp (dwarf2_support): Change supported targets to a
	positve list.
2011-01-19 20:38:41 +00:00
Yao Qi 810cfdbbaf 2011-01-19 Yao Qi <yao@codesourcery.com>
* gdb.asm/asm-source.exp: Replace ARM target triplet with a
	canonical form.
	Remove "xscale-*-*"
	* gdb.xml/tdesc-regs.exp: Likewise.
	* gdb.python/py-section-script.exp: Replace ARM target triplet
	with canonical form.
	Match arm*-*-symbianelf*.
	* gdb.base/dup-sect.exp: Likewise.
	* lib/dwarf.exp: New.
	* gdb.dwarf2/callframecfa.exp: Check dwarf2 support by routine
	dwarf2_support.
	* gdb.dwarf2/dup-psym.exp: Likewise.
	* gdb.dwarf2/dw2-ada-ffffffff.exp: Likewise.
	* gdb.dwarf2/dw2-anonymous-func.exp: Likewise.
	* gdb.dwarf2/dw2-bad-parameter-type.exp: Likewise.
	* gdb.dwarf2/dw2-basic.exp: Likewise.
	* gdb.dwarf2/dw2-compressed.exp: Likewise.
	* gdb.dwarf2/dw2-const.exp: Likewise.
	* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Likewise.
	* gdb.dwarf2/dw2-cu-size.exp: Likewise.
	* gdb.dwarf2/dw2-double-set-die-type.exp: Likewise.
	* gdb.dwarf2/dw2-empty-namespace.exp: Likewise.
	* gdb.dwarf2/dw2-filename.exp: Likewise.
	* gdb.dwarf2/dw2-inheritance.exp: Likewise.
	* gdb.dwarf2/dw2-inline-param.exp: Likewise.
	* gdb.dwarf2/dw2-intercu.exp: Likewise.
	* gdb.dwarf2/dw2-intermix.exp: Likewise.
	* gdb.dwarf2/dw2-modula2-self-type.exp: Likewise.
	* gdb.dwarf2/dw2-noloc.exp: Likewise.
	* gdb.dwarf2/dw2-op-call.exp: Likewise.
	* gdb.dwarf2/dw2-producer.exp: Likewise.
	* gdb.dwarf2/dw2-ranges.exp: Likewise.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Likewise.
	* gdb.dwarf2/dw2-stack-boundary.exp: Likewise.
	* gdb.dwarf2/dw2-strp.exp: Likewise.
	* gdb.dwarf2/dw2-unresolved.exp: Likewise.
	* gdb.dwarf2/implptr.exp: Likewise.
	* gdb.dwarf2/mac-fileno.exp: Likewise.
	* gdb.dwarf2/member-ptr-forwardref.exp: Likewise.
	* gdb.dwarf2/pieces.exp: Likewise.
	* gdb.dwarf2/pr11465.exp: Likewise.
	* gdb.dwarf2/valop.exp: Likewise.
	* gdb.dwarf2/watch-notconst.exp: Likewise.
	* gdb.mi/dw2-ref-missing-frame.exp: Likewise.
2011-01-19 20:26:10 +00:00
Tom Tromey 4694da0147 gdb
PR mi/8618:
	* thread.c (free_thread): Free 'name'.
	(print_thread_info): Emit thread name.  Change CLI output.
	(thread_name_command): New function.
	(do_captured_thread_select): Emit newline.
	(_initialize_thread): Register 'thread name' command.
	* target.h (struct target_ops) <to_thread_name>: New field.
	(target_thread_name): New macro.
	* target.c (update_current_target): Handle to_thread_name.
	* python/py-infthread.c (thpy_get_name): New function.
	(thpy_set_name): Likewise.
	(thread_object_getset): Add "name".
	* linux-nat.c (linux_nat_thread_name): New function.
	(linux_nat_add_target): Set to_thread_name.
	* gdbthread.h (struct thread_info) <name>: New field.
gdb/doc
	* gdb.texinfo (Threads): Document thread name output and `thread
	name' command.
	(Threads In Python): Document Thread.name attribute.
	(GDB/MI Thread Commands): Document thread attributes.
gdb/testsuite
	* gdb.python/py-infthread.exp: Add thread tests.
2011-01-19 17:21:39 +00:00
gdbadmin c25658875f *** empty log message *** 2011-01-19 00:00:02 +00:00
Joel Brobecker 10d4437041 fix printing of Ada wide characters on ppc-aix
Same problem as before: We were downcasting the character value from
int to unsigned char, which caused an overflow.  The reason why we did
not see this problem before is probably related to the fact that
we're using stabs on AIX and thus characters types are defined as
a TYPE_CODE_INT (or TYPE_CODE_RANGE?).

gdb/ChangeLog:

        * ada-valprint.c (ada_print_scalar): Remove unsigned char downcast.
        (ada_val_print_1): Likewise.
2011-01-18 16:38:59 +00:00
Joel Brobecker e3acb1155b [powerpc] breakpoint inserted past function end
On powerpc, the prologue scanner reads instruction after instruction,
and just skips instructions that do not affect a frame.  This means
that it does not stop if if finds and unexpected instruction (which
could possibly happen with optimization, I presume). To avoid scanning
too many instructions, it tries to establish an upper limit.

The upper limit is first computed using the debugging (line) info,
but if that fails, it falls back on an arbitrary 100 bytes (or 25
instructions).  The problem is that, if the function is shorter than
those 25 instructions, we run the risk of skipping the entire function
and returning a PC that's outside our function.

In the event where we can find a symbol for a given PC (and therefore
can determine function start and end addresses), but cannot find an
upper limit using skip_prologue_using_sal, then we can at least limit
make sure that the 25 instructions do not put us beyour our function.
If it does, then further reduce the upper-limit to the end of the function.

gdb/ChangeLog:

        * rs6000-tdep.c (rs6000_skip_prologue): Make sure that the prologue
        upper limit address is not greater than the function end address
        when the upper limit could not be computed using the debugging
        info.
2011-01-18 16:18:26 +00:00
gdbadmin 849afc8b63 *** empty log message *** 2011-01-18 00:00:03 +00:00
Tom Tromey dc92e16124 * cli/cli-cmds.c (apropos_command): Free the compiled regex. Use
get_regcomp_error.
	* utils.c: Include gdb_regex.h.
	(do_regfree_cleanup): New function.
	(make_regfree_cleanup): Likewise.
	(get_regcomp_error): Likewise.
	* gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Declare.
2011-01-17 16:50:42 +00:00
Tom Tromey f55af66d6e * cli/cli-cmds.c (apropos_command): Fix formatting. Don't call
re_compile_fastmap.
2011-01-17 16:20:56 +00:00
Pierre Muller a5a44b5381 * p-exp.y (intvar): New static variable, used to set CURRENT_TYPE
for internal variables.
	(last_was_structop): New static variable.
	(COMPLETE): New token.
	(field_exp): New rule to group all '.' suffix handling.
	Add mark_struct_expression calls when approriate to be able
	to correctly find fields for completion.
	(yylex): Adapt to handle field completion and set INTVAR when
	required.
2011-01-17 10:34:51 +00:00
gdbadmin e870b9ca1b *** empty log message *** 2011-01-17 00:00:33 +00:00
gdbadmin f9a63d49c7 *** empty log message *** 2011-01-16 00:00:33 +00:00
gdbadmin e8d8a7b622 *** empty log message *** 2011-01-15 00:00:03 +00:00
Yao Qi 2c291032cc 2011-01-14 Yao Qi <yao@codesourcery.com>
* arm-tdep.c (arm_register_reggroup_p): FPS register is in
	save_reggroup, restore_reggroup and all_reggroup.
2011-01-14 20:37:13 +00:00
Joel Brobecker b075872c94 new testcase printing wchar_t characters and strings
gdb/testsuite/ChangeLog:

        * gdb.base/wchar.c, gdb.base/wchar.exp: New testcases.
2011-01-14 19:33:37 +00:00
Joel Brobecker 2c3e6e2466 new testcase for Ada Wide Wide Characters and Strings
gdb/testsuite/ChangeLog:

        * gdb.ada/widewide: New testcase.
2011-01-14 19:33:19 +00:00
Joel Brobecker 447b483c37 Fix printing of Wide_Character & Wide_Wide_Character entities.
Wide_Characters and Wide_Wide_Characters are incorrectly printed.
Consider for instance:

    Medium : Wide_Character := Wide_Character'Val(16#dead#);

Trying to print the value of this variable yields:

    (gdb) p medium
    $1 = 57005 '["ad"]'

The integer value is correct (57005 = 0xdead), but the character
representation is not, it should be:

    $1 = 57005 '["dead"]'

Same for Wide_Wide_Characters.

There were two issues:
   (a) The first issue was in ada-valprint, where we were assuming
       that character types were 1 byte long;
   (b) The second problem was in c-valprint, where we were down-casting
       the integer value of the character to type `unsigned char',
       causing use to lose all but the lowest byte.

gdb/ChangeLog:

        * ada-valprint. (ada_printchar): Use the correct type length
        in call to ada_emit_char.
        * c-valprint.c (c_val_print): Remove cast in call to LA_PRINT_CHAR.
2011-01-14 19:32:56 +00:00
Pierre Muller 7b64a93b03 * solib-som.h (hpux_major_release): Declare variable here.
* solib-som.c:  Remove <sys/utsname.h> header.
	(DEFAULT_HPUX_MAJOR_RELEASE): New macro.
	(hpux_major_release): Make global, change default value to
	DEFAULT_HPUX_MAJOR_RELEASE.
	(get_hpux_major_release): Simply return HPUX_MAJOR_RELEASE.
	* hppa-hpux-nat.c: Add <sys/utsname.h> include.
	Add "solib-som.h" header.
	(set_hpux_major_release): New function.
	(_initialize_hppa_hpux_nat): Call set_hpux_major_release.
2011-01-14 18:39:31 +00:00
Mike Frysinger 4e18c05334 gdb: extend Linux osabi match
The current osabi default matching misses all *-uclinux tuples.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-14 18:16:34 +00:00
Joel Brobecker a9df6b2252 fix ARI warnings introduced by ia64-hpux patches
gdb/ChangeLog:

        * ia64-hpux-nat.c (ia64_hpux_fetch_register): Remove trailing
        new-line at end of warning message.
        (ia64_hpux_store_register): Remove trailing new-line at end of
        error message.
        * ia64-hpux-tdep.c: Rephrase comment.
        * solib-ia64-hpux.c (struct dld_info): Change type of field
        dld_flags from "long long" to ULONGEST.
2011-01-14 13:53:02 +00:00
Pedro Alves ecb956dd69 * target.h (deprecated_child_ops): Delete declaration.
* target.c (deprecated_child_ops): Delete definition.
2011-01-14 13:47:15 +00:00
Pedro Alves 715f468029 gdb/
* Makefile.in (hpux-thread.o): Delete rule.
	* configure.ac: Don't check for HPUX DCE threads support.
	* configure, config.in: Regenerate.
	* hppa-hpux-nat.c (child_suppress_run): Delete.
	(hppa_hpux_child_can_run): Delete.
	(_initialize_hppa_hpux_nat): Don't override to_can_run.
	* hpux-thread.c: Delete.
2011-01-14 13:43:16 +00:00
Pedro Alves 76adfcaec1 * Makefile.in (hpux-thread.o): Delete rule.
* configure.ac: Don't check for HPUX DCE threads support.
	* configure, config.in: Regenerate.
	* hppa-hpux-nat.c (child_suppress_run): Delete.
	(hppa_hpux_child_can_run): Delete.
	(_initialize_hppa_hpux_nat): Don't override to_can_run.
	* hpux-thread.c: Delete.
2011-01-14 13:38:24 +00:00
gdbadmin a98d25b37c *** empty log message *** 2011-01-14 00:00:03 +00:00
Joel Brobecker 042e866ed2 delete hpux_pid_to_str (unused)
This function is unused, and the default formatting routine does
just fine, I think.   On pa-hpux:

        [New process 12565, lwp 2513]
        [New process 12565, lwp 2514]

So this patch deletes it.

gdb/ChangeLog:

        * hpux-thread.c (hpux_pid_to_str): Delete.
2011-01-13 23:55:34 +00:00
Joel Brobecker 4ffa5a3392 [Ada] Fix printing of Wide_Wide_Strings
This fixes the printing of Wide_Wide_String objects.  For instance,
consider:

    My_WWS : Wide_Wide_String := " helo";

Before this patch is applied, GDB prints:

    (gdb) print my_wws
    $1 = " ["00"]h["00"]e"

gdb/ChangeLog:

        * ada-valprint.c (ada_emit_char): Remove strange code.
        Check that c is <= UCHAR_MAX before passing it to isascii.
        (char_at): Do not assume that TYPE_LEN is either 1 or 2.
2011-01-13 23:01:22 +00:00
Joel Brobecker de8fa76c44 problem sourcing GDB script in interactive-mode on
When interactive-mode is not auto, GDB always uses that setting to
determine whether to act as if the input stream is a terminal or not.
However, this setting should only be honored if the input stream is
the standard input stream.  Otherwise, we run into trouble while
source-ing a GDB script, as shown below (on x86_64-linux):

        % cat script
        print 1
        print 2
        % gdb  -q
        (gdb) set interactive-mode on
        (gdb) source script
        (gdb) print 3
        $1 = 3

The lack of output and the fact that the "print 3" command returned
a value saved in $1 (as opposed to $3) indicates that the script was
not even evaluated at all.

gdb/ChangeLog:

        * top.c (input_from_terminal_p): Restrict the use of interactive_mode
        to the case where instream is stdin.

gdb/testsuite/ChangeLog:

        * gdb.base/interact.exp: New testcase.
2011-01-13 23:01:10 +00:00
Joel Brobecker c4de7027e3 [ia64-hpux] inferior function call support
We have two stacks to deal with on ia64, when making a function call.
The first is the usual stack frame, and the second is the register
stack frame.  On ia64-linux, the register frame is setup by adjusting
the BSP register.  Unfortunately for us, the HP-UX kernel does not allow
the debugger to change the value of the BSP.

To work around that limitation, the method I am using here is to push
some assembly code on the stack. This assembly code contains, among
other things, a call to the alloc insn, which sets up our frame for us.
An extensive comment in ia64-hpux-tdep.c explains the entire procedure.

Despite this approach, most of the code in ia64-tdep.c which sets up
the function call is still applicable - and only a few things need
to be done differently:  For instance, instead of changing the BSP,
we do nothing.  We store the parameters at a different location, etc.
So this patch also adjusts the inf-call code in ia64-tdep.c to make it
a little more extensible: I create a new ia64_infcall_ops structure
which allows an ABI to define how the few things that need to be
differentiated.

Another element that turned out to be necessary but is more of a detail
is that the computation of the linkage pointer needs to be handled
specially for symbols inside shared libraries.  This is especially
visible when calling malloc, which happens everytime memory needs to
be allocated in inferior memory...  The special treatment included
again the necessity to use some routines only available on the host.
So another target object TARGET_OBJECT_HPUX_SOLIB_GOT was created for
that purpose.

gdb/ChangeLog:

        * ia64-tdep.h (struct regcache): Forward declare.
        (struct ia64_infcall_ops): New struct type.
        (struct gdbarch_tdep): New fields "find_global_pointer_from_solib"
        and "infcall_ops".
        * ia64-tdep.c (ia64_find_global_pointer_from_dynamic_section):
        Renames ia64_find_global_pointer.
        (ia64_find_global_pointer, ia64_allocate_new_rse_frame)
        (ia64_store_argument_in_slot, ia64_set_function_addr: New function.
        (ia64_push_dummy_call): Adjust to use the new tdep ia64_infocall_ops
        methods.
        (ia64_infcall_ops): New static global constant.
        (ia64_gdbarch_init): Set tdep->infcall_ops.
        * ia64-hpux-nat.c (ia64_hpux_xfer_solib_got): New function.
        (ia64_hpux_xfer_partial): Add TARGET_OBJECT_HPUX_SOLIB_GOT handing.
        * ia64-hpux-tdep.c: Include "regcache.h", "gdbcore.h" and "inferior.h".
        (ia64_hpux_dummy_code): New static global constant.
        (ia64_hpux_push_dummy_code, ia64_hpux_allocate_new_rse_frame)
        (ia64_hpux_store_argument_in_slot, ia64_hpux_set_function_addr)
        (ia64_hpux_dummy_id, ia64_hpux_find_global_pointer_from_solib):
        New function.
        (ia64_hpux_infcall_ops): New static global constant.
        (ia64_hpux_init_abi): Install gdbarch and tdep methods needed
        for inferior function calls to work properly on ia64-hpux.
2011-01-13 16:24:42 +00:00
Joel Brobecker 77ca787b12 [ia64-hpux] unwinding bsp value from system call
This fixes unwinding from a thread that is stopped inside a system call.
This can be seen when switching to a thread that is stopped doing a
pthread_cond_wait, for instance...

The comments inside the code should explain what is happening in our
case (the HP-UX exception in the case of system calls): Under certain
circumstances (program stopped inside syscall), the offset to apply to
the current BSP in order to compute the previous BSP is not the usual
CFM & 0x7f.

We parts in this patch:

  1. Figuring out that we are stopped inside a syscal: This requires
     a TT_LWP_RUREGS ttrace call, which is not directly possible from
     ia64-tdep.c.  So use defined a new TARGET_OBJECT_HPUX_UREGS object
     to request it from the -nat side.

  2. Add a gdbarch_tdep method that allows us to change the default
     behavior on ia64-hpux, permitting us to have a different "size of
     register frame" in that one particular case.

gdb/ChangeLog:

        * target.h (enum target_object): Add TARGET_OBJECT_HPUX_UREGS.
        * ia64-tdep.h (struct frame_info): forward declaration.
        (struct gdbarch_tdep): Add field size_of_register_frame.
        * ia64-tdep.c (ia64_access_reg): Use tdep->size_of_register_frame
        to determine the size of the register frame.
        (ia64_size_of_register_frame): New function.
        (ia64_gdbarch_init): Set tdep->size_of_register_frame.
        * ia64-hpux-tdep.c: Include "target.h" and "frame.h".
        (IA64_HPUX_UREG_REASON): New macro.
        (ia64_hpux_stopped_in_syscall, ia64_hpux_size_of_register_frame):
        New functions.
        (ia64_hpux_init_abi): Set tdep->size_of_register_frame.
        * ia64-hpux-nat.c (ia64_hpux_xfer_uregs): New function.
        (ia64_hpux_xfer_partial): Add handling of TARGET_OBJECT_HPUX_UREGS
        objects.
2011-01-13 16:24:27 +00:00
Joel Brobecker 92c9a4639b port GDB to ia64-hpux (native).
ChangeLog:

        * configure.ac: Remove readline, mmalloc, and gdb from noconfigdirs
        for ia64-hpux.
        * configure: Regenerate.

gdb/ChangeLog:

        * config/ia64/hpux.mh, ia64-hpux-nat.c, ia64-hpux-tdep.c,
        ia64-hpux-tdep.h, solib-ia64-hpux.c, solib-ia64-hpux.h: New files.

        * configure.host: Add handling for ia64-hpux hosts.  Add associated
        floatformats.
        * configure.tgt: Add handling for ia64-hpux targets.
        * Makefile.in (ALL_64_TARGET_OBS): Add ia64-hpux-tdep.o.
        (HFILES_NO_SRCDIR): Add ia64-hpux-tdep.h.
        (ALLDEPFILES): Add ia64-hpux-nat.c ia64-hpux-tdep.c.
2011-01-13 16:24:13 +00:00
Joel Brobecker f688d93f0b [hpux/ttrace] Determine attached process LWP immediately after attaching.
When attaching to a process, the ttrace interface was creating a ptid
with a null LWP, because it did not have it yet.  This LWP was then
set as soon as we received our first event from our inferior, during
our first wait.  Similarly, the allocation of the thread private info
was also defered.

This works on PA/HP-UX, because we immediately perform a wait to pop
the event triggered by the attach.  We can use that event to extract
the thread's LWP.  But this does not work for IA64/HP-UX, because
the attach no longer triggers an event, and thus a wait should NOT
be performed (such a wait would simply block indefinitely).

It is actually possible, however, to determine the thread's LWP.
This change therefore adjusts the attach code to create a thread with
the correct LWP set, as well as with its private info allocated.
Same thing for all the other threads.

gdb/ChangeLog:

        [ttrace] Compute thread list immediately after attach.
        * inf_ttrace_attach (inf_ttrace_create_threads_after_attach):
        New subprogram.
        (inf_ttrace_attach): Use it.
2011-01-13 16:23:33 +00:00
Joel Brobecker 1b89e62fe3 [libunwind-frame] handle functions with no minimal symbol/debug info.
This is something that I am seeing on ia64-hpux while trying to
backtrace from a thread that's doing a wait:

    (gdb) task 2
    [Switching to task 2]
    0x9fffffffef52f590 in __ksleep () from /[...]/libc.so.1
    (gdb) bt
    #0  0x9fffffffef52f590 in __ksleep () from /[...]/libc.so.1
    #1  0x9fffffffef73c870 in __sleep_1x1 () from /[...]/libpthread.so.1
    #2  0x9fffffffef738fe0 in __mxn_sleep () from /[...]/libpthread.so.1
    #3  0x9fffffffef675e90 in ?? () from /[...]/libpthread.so.1

The backtrace is incomplete and stops at frame #3, but there are in fact
a few more frames.

The reason why we stopped the backtrace is related to the fact that
we were not able to determine the start address of the function
corresponding to the frame PC.  This is visible at the user level
thanks to the "??" that GDB displayed for frame 3.

We have the following code in libunwind-frame.c:libunwind_frame_cache
which explicitly returns a NULL cache when we couldn't determine the
frame's function address, immediately triggering an end-of-stack
frame_id, thus terminating the backtrace:

   /* We can assume we are unwinding a normal frame.  Even if this is
      for a signal trampoline, ia64 signal "trampolines" use a normal
      subroutine call to start the signal handler.  */
   cache->func_addr = get_frame_func (this_frame);
   if (cache->func_addr == 0
       && get_next_frame (this_frame)
       && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME)
     return NULL;

As explained in the comment, I think we can still go on, and use
the unwind record to do the debugging.  This change imlements this
change, and allows us to get the full backtrace.

gdb/ChangeLog:

        * libunwind-frame.c (libunwind_frame_cache): Do not return NULL
        if we could not determine the frame's function address.  Instead,
        use the frame's PC, and then continue.
2011-01-13 16:23:22 +00:00
Joel Brobecker 3e5e6e2ab5 Make sure __LITTLE_ENDIAN/__BIG_ENDIAN are defined in libunwind-frame.c
These macros do not seem to exist on ia64-hpux.

gdb/ChangeLog:

        * libunwind-frame.c (__LITTLE_ENDIAN, __BIG_ENDIAN): Define if
        not already defined.
2011-01-13 16:23:11 +00:00
Joel Brobecker 825d6d8a69 [ia64] small integral parameters and return values
This patch fixes a small problem on ia64-hpux when calling functions
whose parameter are small integral values (less than 8 bytes).  In
that case, the parameter value was stored on the wrong side of the
register.  Same problem for return values.

With this patch, the results for gdb.base/callfuncs.exp improve from

        # of expected passes            41
        # of unexpected failures        78

To:

        # of expected passes            95
        # of unexpected failures        24

gdb/ChangeLog:

        * ia64-tdep.c (ia64_struct_type_p): New function.
        (ia64_extract_return_value): Handle integral values that are
        less than 8 bytes long.
        (ia64_push_dummy_call): Likewise.
2011-01-13 16:23:00 +00:00
Joel Brobecker 7458e66756 [ia64] Add a big-endian version of the ia64-ext floatformat
ia64-tdep.c defines a floatformats_ia64_ext that should contain
both the little-endian and the big-endian version of the float
format used in the ia64 registers (an 82bit float format).
Right now, both entries point to the same little-endian definition.

A big-endian definition is now necessary for the ia64-hpux port.

gdb/ChangeLog:

        * ia64-tdep.c (floatformat_ia64_ext_little): Renames
        floatformat_ia64_ext.
        (floatformat_ia64_ext_big): New static const.
        (floatformats_ia64_ext): Set first entry to &floatformat_ia64_ext_big.
2011-01-13 16:22:48 +00:00
gdbadmin 15b8ba7693 *** empty log message *** 2011-01-13 00:00:03 +00:00
Tom Tromey 1b05df007b gdb
* mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Fix error
	messages.
	* mi/mi-main.c (mi_cmd_thread_select): Fix error messages.
	(mi_cmd_thread_list_ids): Likewise.
	(mi_cmd_data_list_changed_registers): Likewise.
	(mi_cmd_data_list_register_values): Likewise.
	(mi_cmd_data_write_register_values): Likewise.
	(mi_cmd_data_evaluate_expression): Likewise.
	(mi_cmd_data_read_memory): Likewise.
	(mi_cmd_data_read_memory_bytes): Likewise.
	(mi_cmd_data_write_memory): Likewise.
	(mi_cmd_enable_timings): Likewise.
	* mi/mi-interp.c (mi_cmd_interpreter_exec): Fix error messages.
	* mi/mi-cmd-var.c (mi_cmd_var_create): Fix error messages.
	(mi_cmd_var_delete): Likewise.
	(mi_cmd_var_set_format): Likewise.
	(mi_cmd_var_show_format): Likewise.
	(mi_cmd_var_info_num_children): Likewise.
	(mi_cmd_var_list_children): Likewise.
	(mi_cmd_var_info_type): Likewise.
	(mi_cmd_var_info_expression): Likewise.
	(mi_cmd_var_show_attributes): Likewise.
	(mi_cmd_var_assign): Likewise.
	(mi_cmd_var_update): Likewise.
	(mi_cmd_enable_pretty_printing): Likewise.
	(mi_cmd_var_set_update_range): Likewise.
	* mi/mi-cmd-target.c (mi_cmd_target_file_get): Fix error
	messages.
	(mi_cmd_target_file_put): Likewise.
	(mi_cmd_target_file_delete): Likewise.
	* mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Fix error
	messages.
	(mi_cmd_stack_info_depth): Likewise.
	(mi_cmd_stack_list_locals): Likewise.
	(mi_cmd_stack_list_args): Likewise.
	(mi_cmd_stack_select_frame): Likewise.
	(mi_cmd_stack_select_frame): Likewise.
	(mi_cmd_stack_info_frame): Likewise.
	* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Fix error
	messages.
	(mi_cmd_file_list_exec_source_files): Likewise.
	* mi/mi-cmd-env.c (mi_cmd_env_pwd): Fix error messages.
	(mi_cmd_env_cd): Likewise.
	(mi_cmd_env_path): Likewise.
	(mi_cmd_env_dir): Likewise.
	(mi_cmd_inferior_tty_show): Likewise.
	* mi/mi-cmd-disas.c (mi_cmd_disassemble): Fix error messages.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Fix error messages.
	(mi_cmd_break_watch): Likewise.
gdb/testsuite
	* gdb.mi/gdb2549.exp: Update for error message changes.
	* gdb.mi/mi-cli.exp: Likewise.
	* gdb.mi/mi-disassemble.exp: Likewise.
	* gdb.mi/mi-pthreads.exp: Likewise.
	* gdb.mi/mi-regs.exp: Likewise.
	* gdb.mi/mi-stack.exp: Likewise.
	* gdb.mi/mi-var-block.exp: Likewise.
	* gdb.mi/mi-var-cmd.exp: Likewise.
	* gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-disassemble.exp: Likewise.
	* gdb.mi/mi2-pthreads.exp: Likewise.
	* gdb.mi/mi2-regs.exp: Likewise.
	* gdb.mi/mi2-stack.exp: Likewise.
	* gdb.mi/mi2-var-block.exp: Likewise.
	* gdb.mi/mi2-var-cmd.exp: Likewise.
2011-01-12 21:09:39 +00:00
Thiago Jung Bauermann ad422571bd 2011-01-12 Thiago Jung Bauermann <bauerman@br.ibm.com>
* ppc-linux-nat.c (booke_cmp_hw_point): Fix whitespace.
	(ppc_linux_insert_hw_breakpoint): Likewise.
	(ppc_linux_remove_hw_breakpoint): Likewise.
	(ppc_linux_insert_watchpoint): Likewise.
2011-01-12 20:09:53 +00:00
Jan Kratochvil c2ff108bbd gdb/
PR fortran/11104 and DWARF unbound arrays detection.
	* dwarf2read.c (read_subrange_type): Set zero length on unspecified
	upper bound.  Set TYPE_HIGH_BOUND_UNDEFINED if not language_ada on
	unspecified upper bound.
	* eval.c (evaluate_subexp_standard) <multi_f77_subscript>: Remove
	variables array_size_array, tmp_type and offset_item.  New variable
	array.  Remove call to f77_get_upperbound.  New variables array_type
	and index.  Call value_subscripted_rvalue for each dimenasion.  Remove
	the final call to deprecated_set_value_type.

gdb/testsuite/
	PR fortran/11104 and DWARF unbound arrays detection.
	* gdb.fortran/multi-dim.exp: New file.
	* gdb.fortran/multi-dim.f90: New file.
2011-01-12 16:16:24 +00:00
Jan Kratochvil 41e8491fdf gdb/
Make value allocations more lazy.
	* ada-lang.c (coerce_unspec_val_to_type): Use allocate_value_lazy
	instead of allocate_value and set_value_lazy when possible.
	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use allocate_value_lazy
	instead of allocate_value and set_value_lazy.
	* findvar.c (value_of_register_lazy): Likewise.
	(read_var_value): Remove V preallocation, call just check_typedef in
	advance.  Move allocate_value to LOC_CONST, LOC_LABEL,
	LOC_CONST_BYTES.  Use allocate_value_lazy in LOC_STATIC, LOC_ARG,
	LOC_REF_ARG, LOC_LOCAL, LOC_BLOCK.  Set ADDR instead of
	set_value_address and break in LOC_BLOCK.  Use allocate_value_lazy and
	remove lval_memory set in LOC_REGPARM_ADDR.  Use allocate_value_lazy
	in LOC_UNRESOLVED and LOC_OPTIMIZED_OUT.  Add setting lval_memory at
	the end, remove set_value_lazy there.
	* valarith.c (value_subscripted_rvalue): Use allocate_value_lazy
	instead of allocate_value and set_value_lazy when possible.
	* valops.c (value_fetch_lazy): Do nop for value_optimized_out VAL.
	* value.c (allocate_computed_value): Use allocate_value_lazy instead
	of allocate_value and set_value_lazy.
	(value_from_contents_and_address): Use allocate_value_lazy instead of
	allocate_value and set_value_lazy when possible.
2011-01-12 16:10:05 +00:00
Andrew Burgess b716877b54 http://sourceware.org/ml/gdb-patches/2010-12/msg00299.html
gdb/
        * disasm.c (dump_insns): Support dumping opcodes for MI.
        * mi/mi-cmd-disas.c (mi_cmd_disassemble): Allow mode to control
        dumping of instruction opcodes.

gdb/doc/
        * gdb.texinfo (GDB/MI Data Manipulation): Update to reflect
        changes in mi/mi-cmd-disas.c

gdb/testsuite/
        * gdb.mi/mi-disassemble.exp, gdb.mi/mi2-disassemble.exp: Update
        expected output to reflect changes in gdb/mi/mi-cmd-disas.c and
        add new tests for opcode dumping.
2011-01-12 15:02:12 +00:00
Tom Tromey 13fd8b81f0 * gdb.texinfo (Threads): Remove duplicate text. Update examples.
Fix "thread apply" text.
2011-01-12 14:30:45 +00:00
Joel Brobecker d5ae309f06 Detect GNU/kFreeBSD and set `gdb_osabi' appropiately
2011-01-09  Robert Millan  <rmh@gnu.org>

        * configure.tgt: Detect GNU/kFreeBSD and set `gdb_osabi'
        appropiately.
2011-01-12 10:48:14 +00:00
Tom Tromey d5374a5655 Revert erroneous commit 2011-01-12 02:51:38 +00:00
Tom Tromey 988713056b * thread.c (do_captured_thread_select): Emit newline before
printing frame.
2011-01-12 02:44:48 +00:00
Michael Snyder 581e13c188 2011-01-11 Michael Snyder <msnyder@vmware.com>
* ui-file.c: Comment cleanup, mostly periods and spaces.
	* ui-file.h: Ditto.
	* ui-out.c: Ditto.
	* ui-out.h: Ditto.
	* utils.c: Ditto.
	* v850-tdep.c: Ditto.
	* valarith.c: Ditto.
	* valops.c: Ditto.
	* valprint.c: Ditto.
	* valprint.h: Ditto.
	* value.c: Ditto.
	* value.h: Ditto.
	* varobj.c: Ditto.
	* varobj.h: Ditto.
	* vax-tdep.c: Ditto.
	* vec.c: Ditto.
	* vec.h: Ditto.
	* version.h: Ditto.
	* windows-nat.c: Ditto.
	* windows-tdep.c: Ditto.
	* xcoffread.c: Ditto.
	* xcoffsolib.c: Ditto.
	* xml-support.c: Ditto.
	* xstormy16-tdep.c: Ditto.
	* xtensa-tdep.c: Ditto.
	* xtensa-tdep.h: Ditto.
2011-01-12 01:23:29 +00:00
gdbadmin d2a0f03272 *** empty log message *** 2011-01-12 00:00:02 +00:00
Michael Snyder c378eb4eaa 2011-01-11 Michael Snyder <msnyder@vmware.com>
* s390-tdep.c: Comment cleanup, mostly periods and spaces.
	* score-tdep.c: Ditto.
	* score-tdep.h: Ditto.
	* ser-base.c: Ditto.
	* ser-go32.c: Ditto.
	* serial.c: Ditto.
	* serial.h: Ditto.
	* ser-mingw.c: Ditto.
	* ser-pipe.c: Ditto.
	* ser-tcp.c: Ditto.
	* ser-unix.c: Ditto.
	* sh64-tdep.c: Ditto.
	* shnbsd-nat.c: Ditto.
	* sh-tdep.c: Ditto.
	* sh-tdep.h: Ditto.
	* solib.c: Ditto.
	* solib-darwin.c: Ditto.
	* solib-frv.c: Ditto.
	* solib.h: Ditto.
	* solib-irix.c: Ditto.
	* solib-osf.c: Ditto.
	* solib-pa64.c: Ditto.
	* solib-som.c: Ditto.
	* solib-spu.c: Ditto.
	* solib-sunos.c: Ditto.
	* solib-svr4.c: Ditto.
	* solist.h: Ditto.
	* sol-thread.c: Ditto.
	* somread.c: Ditto.
	* source.c: Ditto.
	* source.h: Ditto.
	* sparc64-linux-tdep.c: Ditto.
	* sparc64-tdep.c: Ditto.
	* sparc-linux-nat.c: Ditto.
	* sparc-linux-tdep.c: Ditto.
	* sparc-sol2-nat.c: Ditto.
	* sparc-sol2-tdep.c: Ditto.
	* sparc-tdep.c: Ditto.
	* sparc-tdep.h: Ditto.
	* spu-tdep.c: Ditto.
	* stabsread.c: Ditto.
	* stabsread.h: Ditto.
	* stack.c: Ditto.
	* symfile.c: Ditto.
	* symfile.h: Ditto.
	* symmisc.c: Ditto.
	* symtab.c: Ditto.
	* symtab.h: Ditto.
	* target.c: Ditto.
	* target-descriptions.c: Ditto.
	* target-descriptions.h: Ditto.
	* target.h: Ditto.
	* target-memory.c: Ditto.
	* terminal.h: Ditto.
	* thread.c: Ditto.
	* top.c: Ditto.
	* tracepoint.c: Ditto.
	* tracepoint.h: Ditto.
	* trad-frame.h: Ditto.
	* typeprint.c: Ditto.
2011-01-11 21:53:25 +00:00
Tom Tromey 6c162d5eb6 * gdb.python/py-infthread.exp: Load gdb-python.exp. 2011-01-11 21:22:35 +00:00
Thiago Jung Bauermann 90e4670fe7 2011-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
* breakpoint.c (resources_needed_watchpoint): Fix indentation.
	* gdbtypes.c (is_scalar_type_recursive): Fix formatting.
2011-01-11 19:39:35 +00:00
Thiago Jung Bauermann e09342b536 2011-01-11 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	Implement support for PowerPC BookE ranged watchpoints.

gdb/
	* breakpoint.h
	(struct breakpoint_ops) <resources_needed>: New method.
	Initialize to NULL in all existing breakpoint_ops instances.
	(struct breakpoint) <exact>: New field.
	(target_exact_watchpoints): Declare external global.
	* breakpoint.c (target_exact_watchpoints): New global flag.
	(update_watchpoint): Set b->type to bp_hardware_watchpoint and
	b->enable_state to bp_enabled before calling
	hw_watchpoint_used_count.
	(hw_watchpoint_used_count): Iterate over all bp_locations in a
	watchpoint.  Call breakpoint's breakpoint_ops.resources_needed
	if available.
	(insert_watchpoint, remove_watchpoint): Use fixed length of 1 byte
	if the watchpoint is exact.
	(resources_needed_watchpoint): New function.
	(watchpoint_breakpoint_ops): Add resources_needed_watchpoint.
	(watch_command_1): Set b->exact if the user asked for an exact
	watchpoint and one can be set.
	(can_use_hardware_watchpoint): Add exact_watchpoints argument.
	Pass fixed length of 1 to target_region_ok_for_hw_watchpoint if
	the user asks for an exact watchpoint and one can be set.  Return
	number of needed debug registers to watch the expression.
	* gdbtypes.c (is_scalar_type): New function, based on
	valprint.c:scalar_type_p.
	(is_scalar_type_recursive): New function.
	* gdbtypes.h (is_scalar_type_recursive): Declare.
	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Always
	handle regions when ranged watchpoints are available.
	(create_watchpoint_request): New function.
	(ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint): Use
	create_watchpoint_request.
	* rs6000-tdep.c (show_powerpc_exact_watchpoints): New function.
	(_initialize_rs6000_tdep): Add `exact-watchpoints' boolean to the
	`set powerpc' and `show powerpc' commands.
	* target.h (struct target_ops) <to_region_ok_for_hw_watchpoint>:
	Mention documentation comment in the target macro.
	(target_region_ok_for_hw_watchpoint): Document return value.

gdb/doc/
	* gdb.texinfo (PowerPC Embedded): Document ranged watchpoints and
	the "set powerpc exact-watchpoints" flag.
2011-01-11 19:23:03 +00:00
Thiago Jung Bauermann 9fa40276f0 2011-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
* breakpoint.c (update_watchpoint): Decide on using a software or
	hardware watchpoint after the bp_locations are created.
2011-01-11 19:18:31 +00:00
Thiago Jung Bauermann 77b06cd719 2010-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
Convert hardware watchpoints to use breakpoint_ops.

gdb/
	* breakpoint.h (breakpoint_ops) <insert>: Rename to...
	<insert_location>: ... this.  Return int instead of void.
	Accept pointer to struct bp_location instead of pointer to
	struct breakpoint.  Adapt all implementations.
	(breakpoint_ops) <remove>: Rename to...
	<remove_location>: ... this.  Accept pointer to struct bp_location
	instead of pointer to struct breakpoint.  Adapt all implementations.
	* breakpoint.c (insert_catchpoint): Delete function.
	(insert_bp_location): Call the watchpoint or catchpoint's
	breakpoint_ops.insert method.
	(remove_breakpoint_1): Call the watchpoint or catchpoint's
	breakpoint_ops.remove method.
	(insert_watchpoint, remove_watchpoint): New functions.
	(watchpoint_breakpoint_ops): New structure.
	(watch_command_1): Initialize the OPS field.
	* inf-child.c (inf_child_insert_fork_catchpoint)
	(inf_child_remove_fork_catchpoint, inf_child_insert_vfork_catchpoint)
	(inf_child_remove_vfork_catchpoint, inf_child_insert_exec_catchpoint)
	(inf_child_remove_exec_catchpoint, inf_child_set_syscall_catchpoint):
	Delete functions.
	(inf_child_target): Remove initialization of to_insert_fork_catchpoint,
	to_remove_fork_catchpoint, to_insert_vfork_catchpoint,
	to_remove_vfork_catchpoint, to_insert_exec_catchpoint,
	to_remove_exec_catchpoint and to_set_syscall_catchpoint.
	* target.c (update_current_target): Change default implementation of
	to_insert_fork_catchpoint, to_remove_fork_catchpoint,
	to_insert_vfork_catchpoint, to_remove_vfork_catchpoint,
	to_insert_exec_catchpoint, to_remove_exec_catchpoint and
	to_set_syscall_catchpoint to return_one.
	(debug_to_insert_fork_catchpoint, debug_to_insert_vfork_catchpoint)
	(debug_to_insert_exec_catchpoint): Report return value.
	* target.h (to_insert_fork_catchpoint, to_insert_vfork_catchpoint)
	(to_insert_exec_catchpoint): Change declaration to return int instead
	of void.

gdb/testsuite/
	* gdb.base/foll-exec.exp: Adapt to new error string when the catchpoint
	type is not supported.
	* gdb.base/foll-fork.exp: Likewise.
	* gdb.base/foll-vfork.exp: Likewise.
2011-01-11 19:16:23 +00:00
Michael Snyder 9b20d036b6 2011-01-11 Michael Snyder <msnyder@vmware.com>
* arm-tdep.c: Internationalization.
	* c-lang.c: Ditto.
	* charset.c: Ditto.
	* fork-child.c: Ditto.
	* nto-procfs.c: Ditto.
	* ppc-sysv-tdep.c: Ditto.
	* procfs.c: Ditto.
	* remote-mips.c: Ditto.
	* remote.c: Ditto.
	* rs6000-nat.c: Ditto.
	* rs6000-tdep.c: Ditto.
	* target.c: Ditto.
	* valops.c: Ditto.
	* value.c: Ditto.
	* xml-support.c: Ditto.
	* mi/mi-cmd-break.c: Ditto.
	* mi/mi-cmd-var.c: Ditto.
	* mi/mi-interp.c: Ditto.
	* mi/mi-main.c: Ditto.
2011-01-11 15:10:03 +00:00
Andrew Burgess dae477fed8 http://sourceware.org/ml/gdb-patches/2010-11/msg00112.html
gdb/ChangeLog
	* remote-sim.c (gdbsim_store_register): Update API to
	sim_store_register to check more error conditions.
include/gdb/ChangeLog
	* remote-sim.h (sim_store_register): Update the API
	documentation for this function.
sim/erc32/ChangeLog
sim/h8300/ChangeLog
sim/m32c/ChangeLog
sim/mn10300/ChangeLog
sim/ppc/ChangeLog
sim/rx/ChangeLog
sim/v850/ChangeLog
	* ???.c (sim_store_register): Update return value to
	match new API.
2011-01-11 14:19:34 +00:00
Michael Snyder 0d7a18f740 Fix change log omission. 2011-01-11 03:01:33 +00:00
gdbadmin 8803a348f4 *** empty log message *** 2011-01-11 00:00:33 +00:00
Michael Snyder 0df8b4180a 2011-01-10 Michael Snyder <msnyder@vmware.com>
* nto-procfs.c: Comment cleanup, mostly periods and spaces.
	* nto-tdep.c: Ditto.
	* nto-tdep.h: Ditto.
	* objc-exp.y: Ditto.
	* objc-lang.c: Ditto.
	* objfiles.c: Ditto.
	* objfiles.h: Ditto.
	* observer.c: Ditto.
	* opencl-lang.c: Ditto.
	* osabi.c: Ditto.
	* parse.c: Ditto.
	* parser-defs.h: Ditto.
	* p-exp.y: Ditto.
	* p-lang.c: Ditto.
	* posix-hdep.c: Ditto.
	* ppcbug-rom.c: Ditto.
	* ppc-linux-nat.c: Ditto.
	* ppc-linux-tdep.c: Ditto.
	* ppc-linux-tdep.h: Ditto.
	* ppcnbsd-tdep.c: Ditto.
	* ppcobsd-tdep.c: Ditto.
	* ppcobsd-tdep.h: Ditto.
	* ppc-sysv-tdep.c: Ditto.
	* ppc-tdep.h: Ditto.
	* printcmd.c: Ditto.
	* proc-abi.c: Ditto.
	* proc-flags.c: Ditto.
	* procfs.c: Ditto.
	* proc-utils.h: Ditto.
	* progspace.h: Ditto.
	* prologue-value.c: Ditto.
	* prologue-value.h: Ditto.
	* psympriv.h: Ditto.
	* psymtab.c: Ditto.
	* p-typeprint.c: Ditto.
	* p-valprint.c: Ditto.
	* ravenscar-sparc-thread.c: Ditto.
	* ravenscar-thread.c: Ditto.
	* ravenscar-thread.h: Ditto.
	* record.c: Ditto.
	* regcache.c: Ditto.
	* regcache.h: Ditto.
	* remote.c: Ditto.
	* remote-fileio.c: Ditto.
	* remote-fileio.h: Ditto.
	* remote.h: Ditto.
	* remote-m32r-sdi.c: Ditto.
	* remote-mips.c: Ditto.
	* remote-sim.c: Ditto.
	* rs6000-aix-tdep.c: Ditto.
	* rs6000-nat.c: Ditto.
	* rs6000-tdep.c: Ditto.
2011-01-10 20:38:51 +00:00
Michael Snyder a73c6dcdd4 2011-01-10 Michael Snyder <msnyder@vmware.com>
* charset.c (validate): Internationalization.
	* coffread.c (read_one_sym): Ditto.
	* dwarf2read.c (dwarf2_attach_fields_to_type): Ditto.
	* h8300-tdep.c (H8300_extract_return_value): Ditto.
	* inflow.c (new_tty): Ditto.
	* iq2000-tdep.c (iq2000_breakpoint_from_pc): Ditto.
	* m32c-tdep.c (m32c_return_value): Ditto.
	* mep-tdep.c (mep_store_return_value): Ditto.
	* score-tdep.c (score7_fetch_insn): Ditto.
	* ser-mingw.c (pipe_windows_open): Ditto.
	* sh64-tdep.c (sh64_extract_return_value): Ditto.
	* spu-tdep.c (spu_register_type): Ditto.
	* tracepoint.c (trace_find_command): Ditto.
	* valarith.c (value_pos): Ditto.
2011-01-10 17:14:13 +00:00
Phil Muldoon f39a75d0cd 2011-01-10 Phil Muldoon <pmuldoon@redhat.com>
* gdb.python/py-cmd.exp: Remove gdb_py_test_multiple function.
	Use load_lib gdb-python.exp.
	* gdb.python/python.exp: Ditto.
	* gdb.python/py-function.exp: Ditto.
2011-01-10 11:00:24 +00:00
Joel Brobecker 9a153e0b6f minor comment reformatting (ada-valprint.c:printstr)
Just to make the length of each line a little more balanced.

gdb/ChangeLog:

        * ada-valprint.c (printstr): Minor comment reformatting.
2011-01-10 06:07:10 +00:00
Michael Snyder 35ecd2d6b6 2011-01-08 Michael Snyder <msnyder@vmware.com>
* m32r-rom.c (m32r_upload_command): Fix up ARI warnings for _
	markup.
2011-01-10 02:43:30 +00:00
gdbadmin be8dee528d *** empty log message *** 2011-01-10 00:00:32 +00:00
Andreas Schwab fc529d8069 * gdb.threads/tls.exp ("info address me"): Fix expected output. 2011-01-09 15:22:49 +00:00
Michael Snyder 025bb325db 2011-01-08 Michael Snyder <msnyder@vmware.com>
* m2-exp.y: Comment cleanup, mostly periods and spaces.
	* m2-lang.c: Ditto.
	* m2-typeprint.c: Ditto.
	* m2-valprint.c: Ditto.
	* m32c-tdep.c: Ditto.
	* m32r-linux-nat.c: Ditto.
	* m32r-rom.c: Ditto.
	* m32r-tdep.c: Ditto.
	* m32r-tdep.h: Ditto.
	* m68hc11-tdep.c: Ditto.
	* m58klinux-nat.c: Ditto.
	* m68k-tdep.c: Ditto.
	* m88k-tdep.c: Ditto.
	* m88k-tdep.h: Ditto.
	* machoread.c: Ditto.
	* macrocmd.c: Ditto.
	* macroexp.c: Ditto.
	* macrotab.c: Ditto.
	* main.c: Ditto.
	* maint.c: Ditto.
	* mdebugread.c: Ditto.
	* mdebugread.h: Ditto.
	* memattr.c: Ditto.
	* memattr.h: Ditto.
	* memory-map.h: Ditto.
	* mep-tdep.c: Ditto.
	* microblaze-rom.c: Ditto.
	* microblaze-tdep.c: Ditto.
	* minsyms.c: Ditto.
	* mips-irix-tdep.c: Ditto.
	* mips-linux-nat.c: Ditto.
	* mips-linux-tdep.c: Ditto.
	* mips-linux-tdep.h: Ditto.
	* mipsnbsd-nat.c: Ditto.
	* mipsnbsd-tdep.c: Ditto.
	* mipsread.c: Ditto.
	* mips-tdep.c: Ditto.
	* mips-tdep.h: Ditto.
	* mn10300-linux-tdep.c: Ditto.
	* mn10300-tdep.c: Ditto.
	* mn10300-tdep.h: Ditto.
	* monitor.c: Ditto.
	* monitor.h: Ditto.
	* moxie-tdep.c: Ditto.
	* moxie-tdep.h: Ditto.
	* mt-tdep.c: Ditto.
2011-01-09 03:20:33 +00:00
Michael Snyder 1777feb0fe 2011-01-08 Michael Snyder <msnyder@vmware.com>
* h8300-tdep.c: Comment cleanup, mostly periods and spaces.
	* hppa-hpux-tdep.c: Ditto.
	* hppa-linux-nat.c: Ditto.
	* hppa-linux-tdep.c: Ditto.
	* hppanbsd-tdep.c: Ditto.
	* hppa-tdep.c: Ditto.
	* hppa-tdep.h: Ditto.
	* hpux-thread.c: Ditto.
	* i386-cygwin-tdep.c: Ditto.
	* i386-darwin-nat.c: Ditto.
	* i386gnu-nat.c: Ditto.
	* i386-linux-nat.c: Ditto.
	* i386-linux-tdep.c: Ditto.
	* i386-nat.c: Ditto.
	* i386-nat.h: Ditto.
	* i386nbsd-tdep.c: Ditto.
	* i386-sol2-nat.c: Ditto.
	* i386-stub.c: Ditto.
	* i386-tdep.c: Ditto.
	* i386-tdep.h: Ditto.
	* i387-tdep.c: Ditto.
	* ia64-linux-nat.c: Ditto.
	* ia64-linux-tdep.c: Ditto.
	* ia64-tdep.c: Ditto.
	* infcall.c: Ditto.
	* infcall.h: Ditto.
	* infcmd.c: Ditto.
	* inferior.c: Ditto.
	* inferior.h: Ditto.
	* infloop.c: Ditto.
	* inflow.c: Ditto.
	* infrun.c: Ditto.
	* interps.c: Ditto.
	* interps.h: Ditto.
	* iq2000-tdep.c: Ditto.
	* irix5-nat.c: Ditto.
	* jit.c: Ditto.
	* jit.h: Ditto.
	* jv-exp.y: Ditto.
	* jv-lang.c: Ditto.
	* jv-lang.h: Ditto.
	* jv-typeprint.c: Ditto.
	* jv-valprint.c: Ditto.
	* language.c: Ditto.
	* language.h: Ditto.
	* linespec.c: Ditto.
	* linux-fork.c: Ditto.
	* linux-nat.c: Ditto.
	* linux-thread-db.c: Ditto.
	* lm32-tdep.c: Ditto.
2011-01-09 03:08:57 +00:00
gdbadmin 0cb2acab06 *** empty log message *** 2011-01-09 00:00:33 +00:00
Mike Frysinger 1642781ba3 gdb: bfin: tix typo in register name
Looks like we've long been using "AO" instead of "A0" in the enum for the
A0.W.  But no one noticed since we aren't using it directly (we assume the
position in the reverse).  I've committed this simple fix.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-08 20:45:11 +00:00
Joel Brobecker 394b0adbaa Fix typo in fbsd-nat.c.
* fbsd-nat.c (fbsd_find_memory_regions): Fix typo.
2011-01-08 12:36:27 +00:00
Michael Snyder b670013cd7 2011-01-07 Michael Snyder <msnyder@vmware.com>
* charset.c (_initialize_charset): Fix typo in string.
2011-01-08 04:01:11 +00:00
gdbadmin 4f49af5cb2 *** empty log message *** 2011-01-08 00:00:03 +00:00
Michael Snyder a743e5423c 2011-01-07 Michael Snyder <msnyder@vmware.com>
* mi/mi-cmd-disas.c (mi_cmd_disassemble): Mark up error message
	for i18n.
	* tui/tui-layout.c (tui_set_layout_for_display_command):
	Split line so that operator goes to beginning of line.
	* tui/tui-winsource.c (tui_horizontal_source_scroll): Move
	assignment out of if statement.
2011-01-07 20:24:18 +00:00
Michael Snyder 0963b4bd45 2011-01-07 Michael Snyder <msnyder@vmware.com>
* ada-lang.c: Comment cleanup, mostly periods and spaces.
	* ada-lang.h: Ditto.
	* ada-tasks.c: Ditto.
	* ada-valprint.c: Ditto.
	* aix-threads.c: Ditto.
	* alpha-linux-nat.c: Ditto.
	* alpha-linux-tdep.c: Ditto.
	* alpha-mdebug-tdep.c: Ditto.
	* alpha-nat.c: Ditto.
	* alpha-osf1-tdep.c: Ditto.
	* alpha-tdep.c: Ditto.
	* alphabsd-nat.c: Ditto.
	* alphabsd-tdep.c: Ditto.
	* amd64-darwin-tdep.c: Ditto.
	* amd64-linux-nat.c: Ditto.
	* amd64-linux-tdep.c: Ditto.
	* amd64-sol2-tdep.c: Ditto.
	* amd64-tdep.c: Ditto.
	* amd64-fbsd-tdep.c: Ditto.
	* amd64-nbsd-tdep.c: Ditto.
	* amd64-obsd-tdep.c: Ditto.
	* amd64-linux-nat.c: Ditto.
	* amd64-linux-tdep.c: Ditto.
	* arm-tdep.c: Ditto.
	* arm-tdep.h: Ditto.
	* armnbsd-nat.c: Ditto.
	* avr-tdep.c: Ditto.
	* bfin-tdep.c: Ditto.
	* bsd-kvm.c: Ditto.
	* c-typeprintc: Ditto.
	* c-valprint.c: Ditto.
	* coff-pe-read.h: Ditto.
	* coffreead.c: Ditto.
	* cris-tdep.c: Ditto.
	* d-lang.c: Ditto.
	* darwin-nat-info.c: Ditto.
	* darwin-nat.c: Ditto.
	* dbug-rom.c: Ditto.
	* dbxread.c: Ditto.
	* dcache.c: Ditto.
	* dcache.h: Ditto.
	* dec-thread.c: Ditto.
	* defs.h: Ditto.
	* demangle.c: Ditto.
	* dicos-tdep.c: Ditto.
	* dictionary.c: Ditto.
	* dictionary.h: Ditto.
	* dink32-rom.c: Ditto.
	* disasm.c: Ditto.
	* doublest.c: Ditto.
	* dsrec.c: Ditto.
	* dummy-frame.c: Ditto.
	* dwarf2-frame.c: Ditto.
	* dwarf2expr.c: Ditto.
	* dwarf2loc.c: Ditto.
	* dwarf2read.c: Ditto.
	* elfread.c: Ditto.
	* environ.c: Ditto.
	* eval.c: Ditto.
	* event-top.h: Ditto.
	* exceptions.c: Ditto.
	* exceptions.h: Ditto.
	* exec.c: Ditto.
	* expprint.c: Ditto.
	* expression.h: Ditto.
	* f-exp.y: Ditto.
	* f-lang.c: Ditto.
	* f-lang.h: Ditto.
	* f-typeprint.c: Ditto.
	* f-valprint.c: Ditto.
	* fbsd-nat.c: Ditto.
	* findvar.c: Ditto.
	* fork-child.c: Ditto.
	* frame.c: Ditto.
	* frame.h: Ditto.
	* frv-linux-tdep.c: Ditto.
	* frv-tdep.c: Ditto.
	* gcore.c: Ditto.
	* gdb-stabs.h: Ditto.
	* gdb_assert.h: Ditto.
	* gdb_string.h: Ditto.
	* gdb_thread_db.h: Ditto.
	* gdb_wait.h: Ditto.
	* gdbarch.sh: Ditto.
	* gdbcore.h: Ditto.
	* gdbthread.h: Ditto.
	* gdbtypes.c: Ditto.
	* gdbtypes.h: Ditto.
	* gnu-nat.c: Ditto.
	* gnu-nat.h: Ditto.
	* gnu-v2-abi.c: Ditto.
	* gnu-v3-abi.c: Ditto.
	* go32-nat.c: Ditto.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
2011-01-07 19:36:19 +00:00
Michael Snyder ac74f77061 2011-01-07 Michael Snyder <msnyder@vmware.com>
* ax-gdb.c: Adjust some long output strings.
	* breakpoint.c: Ditto.
	* charset.c: Ditto.
	* cp-abi.c: Ditto.
	* infcall.c: Ditto.
	* infrun.c: Ditto.
	* linux-nat.c: Ditto.
	* solib-pa64.c: Ditto.
	* solib-som.c: Ditto.
2011-01-07 17:35:27 +00:00
Tom Tromey 06e65f4414 * gdb.texinfo (Python API): Add descriptions to @menu items. 2011-01-07 15:47:21 +00:00
Jan Kratochvil fb03cb59c1 gdb/testsuite/
* configure: Regenerate.
2011-01-07 02:51:09 +00:00
gdbadmin b9d2a62bb4 *** empty log message *** 2011-01-07 00:00:02 +00:00
Tom Tromey d8e227793f gdb
PR python/12367:
	* NEWS: Add item.
	* python/python.c (GdbMethods): Add "newest_frame" method.
	* python/python-internal.h (gdbpy_newest_frame): Declare.
	* python/py-frame.c (gdbpy_newest_frame): New function.
gdb/doc
	* gdb.texinfo (Frames In Python): Document gdb.newest_thread.
gdb/testsuite
	* gdb.python/py-frame.exp: Test gdb.newest_frame.
2011-01-06 21:10:53 +00:00
Paul Pluzhnikov a255712f65 ChangeLog:
2010-01-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* jit.h (struct jit_code_entry): use ULONGEST for symfile_size.
	* jit.c (jit_debug): New variable.
	(show_jit_debug): New function.
	(struct target_buffer): Use ULONGEST.
	(bfd_open_from_target_memory): Likewise.
	(jit_register_code, jit_inferior_init): Add debug output.
	(_initialize_jit): Register "debug jit" command.

doc/ChangeLog:
2010-01-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

       * gdb.texinfo (Debugging Output): Document "set debug jit".
2011-01-06 19:56:44 +00:00
Tom Tromey ccfc3d6e06 gdb
* frame.h (enum frame_type) <INLINE_FRAME>: Fix comment.
	* python/py-frame.c (gdbpy_initialize_frames): Add INLINE_FRAME
	and ARCH_FRAME.
gdb/doc
	PR python/12133:
	* gdb.texinfo (Frames In Python): Document various frame
	constants.
2011-01-06 18:34:16 +00:00
Tom Tromey 57126e4a45 * python/py-frame.c (frapy_block): Use get_frame_block. 2011-01-06 17:16:58 +00:00
Joel Brobecker 16dfc9cef0 Do not stop on SIGPRIO signals by default
This signal does not indicate an error condition, so the default
behavior when receiving this signal should be to resume execution
silently.

gdb/ChangeLog:

        Do not stop on SIGPRIO signals by default
        * infrun.c (_initialize_infrun): Unset signal_stop and
        signal_print for TARGET_SIGNAL_PRIO.
2011-01-06 14:58:58 +00:00
Joel Brobecker b1ce2347b7 fix style violation in ada-tasks.c comment
gdb/ChangeLog:

       * ada-tasks.c: Fix style violation in comment.
2011-01-06 14:43:37 +00:00
Joel Brobecker 09050809a4 [testsuite/gdb.ada] simplify some testcases by using clean_restart.
gdb/testsuite/ChangeLog:

        * gdb.ada/array_bounds.exp, gdb.ada/array_return.exp,
        gdb.ada/array_subscript_addr.exp, gdb.ada/arrayidx.exp,
        gdb.ada/arrayparam.exp, gdb.ada/arrayptr.exp,
        gdb.ada/atomic_enum.exp, gdb.ada/call_pn.exp,
        gdb.ada/catch_ex.exp, gdb.ada/char_param.exp,
        gdb.ada/complete.exp, gdb.ada/exprs.exp, gdb.ada/fixed_cmp.exp,
        gdb.ada/fixed_points.exp, gdb.ada/formatted_ref.exp,
        gdb.ada/frame_args.exp, gdb.ada/fun_addr.exp,
        gdb.ada/fun_in_declare.exp, gdb.ada/funcall_param.exp,
        gdb.ada/homonym.exp, gdb.ada/int_deref.exp,
        gdb.ada/interface.exp, gdb.ada/lang_switch.exp,
        gdb.ada/mod_from_name.exp, gdb.ada/nested.exp,
        gdb.ada/null_array.exp, gdb.ada/null_record.exp,
        gdb.ada/packed_array.exp, gdb.ada/packed_tagged.exp,
        gdb.ada/print_chars.exp, gdb.ada/print_pc.exp,
        gdb.ada/ptype_field.exp, gdb.ada/ptype_tagged_param.exp,
        gdb.ada/rec_return.exp, gdb.ada/ref_param.exp,
        gdb.ada/ref_tick_size.exp, gdb.ada/start.exp,
        gdb.ada/str_ref_cmp.exp, gdb.ada/sym_print_name.exp,
        gdb.ada/taft_type.exp, gdb.ada/tagged.exp, gdb.ada/tasks.exp,
        gdb.ada/tick_last_segv.exp, gdb.ada/type_coercion.exp,
        gdb.ada/uninitialized_vars.exp,
        gdb.ada/variant_record_packed_array.exp, gdb.ada/watch_arg.exp:
        Simplify by using clean_restart.
2011-01-06 10:35:00 +00:00
Joel Brobecker 8ed5dd9e5e Avoid the use of gdb_start_cmd in gdb.ada/*.exp testcases.
This command does not work when testing with GDBserver.  So this patch
changes the few tests that do not specifically test the `start' command,
and replace calls to gdb_start_cmd with the usual `run LOC' approach.

For the couple of testcases that do really test the `start' command,
do an early return as UNTESTED instead of running this testcase.

gdb/testsuite/ChangeLog:

	Add marker to be used as anchor for inserting breakpoints.
	* gdb.ada/null_record/null_record.adb: Add "-- START" comment.
	* gdb.ada/start/dummy.adb, gdb.ada/uninitialized_vars/parse.adb:
	Likewise.

	Remove uses of gdb_start_cmd.
	* gdb.ada/null_record.exp: Remove use of gdb_start_cmd.
	* gdb.ada/print_pc.exp, gdb.ada/uninitialized_vars.exp: Ditto.

	Do not run testcase if testing with GDBserver.
	* gdb.ada/exec_changed.exp, gdb.ada/start.exp: Abort as untested
	if testing with GDBserver.
2011-01-06 10:33:38 +00:00
Joel Brobecker 8f7e195f62 Remove trailing new-line at end of error string
gdb/ChangeLog:

	* linespec.c (decode_compound, find_method): Remove trailing \n
	at end of error string.
	* solib-irix.c (irix_current_sos): Likewise.
	* varobj.c (uninstall_variable): Likewise.
2011-01-06 09:30:35 +00:00
Joel Brobecker e9bdf92c6f New script copyright.py
gdb/ChangeLog:

        * copyright.py: New script.
        * copyright.sh (byhand): Add *.ads, *.adb, *.gpr and *.inc.
        Launch emacs without exec'ing. Call copyright.py afterwards.
2011-01-06 06:28:39 +00:00
Joel Brobecker 368a124fc4 Add copyright header to some Ada files (testsuite)
gdb/testsuite/ChangeLog:

 	* gdb.ada/complete/foo.adb, gdb.ada/complete/pck.adb,
 	gdb.ada/complete/pck.ads, gdb.ada/print_chars/foo.adb: Add
 	copyright header.
2011-01-06 06:27:44 +00:00
Michael Snyder 9a2b4c1ba7 2011-01-05 Michael Snyder <msnyder@vmware.com>
* cli/cli-cmds.c: Shorten lines of >= 80 columns.
	* cli/cli-decode.c: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-setshow.c: Ditto.
	* common/signals.c: Ditto.
	* mi/mi-cmd-break.c: Ditto.
	* mi/mi-cmd-disas.c: Ditto.
	* mi/mi-cmd-stack.c: Ditto.
	* mi/mi-cmd-var.c: Ditto.
	* mi/mi-cmds.c: Ditto.
	* mi/mi-common.h: Ditto.
	* mi/mi-console.c: Ditto.
	* mi/mi-interp.c: Ditto.
	* mi/mi-main.c: Ditto.
	* osf-share/cma_attr.c: Ditto.
	* osf-share/cma_deb_core.h: Ditto.
	* osf-share/cma_debug_client.h: Ditto.
	* osf-share/cma_handle.h: Ditto.
	* osf-share/cma_mutex.h: Ditto.
	* osf-share/cma_stack_int.h: Ditto.
	* osf-share/cma_tcb_defs.h: Ditto.
	* python/py-auto-load.c: Ditto.
	* python/py-breakpoint.c: Ditto.
	* python/py-cmd.c: Ditto.
	* python/py-frame.c: Ditto.
	* python/py-objfile.c: Ditto.
	* python/py-param.c: Ditto.
	* python/py-progspace.c: Ditto.
	* python/py-symbol.c: Ditto.
	* python/py-value.c: Ditto.
	* python/python-internal.h: Ditto.
	* python/python.c: Ditto.
	* tui/tui-data.c: Ditto.
	* tui/tui-disasm.c: Ditto.
	* tui/tui-hooks.c: Ditto.
	* tui/tui-io.c: Ditto.
	* tui/tui-layout.c: Ditto.
	* tui/tui-regs.c: Ditto.
	* tui/tui-source.c: Ditto.
	* tui/tui-stack.c: Ditto.
	* tui/tui-win.c: Ditto.
	* tui/tui-windata.c: Ditto.
	* tui/tui-winsource.c: Ditto.
2011-01-06 00:57:05 +00:00
Michael Snyder 493e2a69a4 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* gdbreplay.c: Shorten lines of >= 80 columns.
	* linux-low.c: Ditto.
	* linux-ppc-low.c: Ditto.
	* linux-s390-low.c: Ditto.
	* linux-sparc-low.c: Ditto.
	* linux-x86-low.c: Ditto.
	* linux-xtensa-low.c: Ditto.
	* mem-break.c: Ditto.
	* nto-low.c: Ditto.
	* regcache.h: Ditto.
	* remote-utils.c: Ditto.
	* server.c: Ditto.
	* server.h: Ditto.
	* thread-db.c: Ditto.
	* tracepoint.c: Ditto.
	* utils.c: Ditto.
	* win32-low.h: Ditto.
2011-01-06 00:14:09 +00:00
gdbadmin b1ec4f36ab *** empty log message *** 2011-01-06 00:00:33 +00:00
Michael Snyder 3e43a32aaa 2011-01-05 Michael Snyder <msnyder@vmware.com>
* addrmap.c: Shorten lines of >= 80 columns.
	* arch-utils.c: Ditto.
	* arch-utils.h: Ditto.
	* ax-gdb.c: Ditto.
	* ax-general.c: Ditto.
	* bcache.c: Ditto.
	* blockframe.c: Ditto.
	* breakpoint.c: Ditto.
	* buildsym.c: Ditto.
	* c-lang.c: Ditto.
	* c-typeprint.c: Ditto.
	* charset.c: Ditto.
	* coffread.c: Ditto.
	* command.h: Ditto.
	* corelow.c: Ditto.
	* cp-abi.c: Ditto.
	* cp-namespace.c: Ditto.
	* cp-support.c: Ditto.
	* dbug-rom.c: Ditto.
	* dbxread.c: Ditto.
	* defs.h: Ditto.
	* dfp.c: Ditto.
	* dfp.h: Ditto.
	* dictionary.c: Ditto.
	* disasm.c: Ditto.
	* doublest.c: Ditto.
	* dwarf2-frame.c: Ditto.
	* dwarf2expr.c: Ditto.
	* dwarf2loc.c: Ditto.
	* dwarf2read.c: Ditto.
	* elfread.c: Ditto.
	* eval.c: Ditto.
	* event-loop.c: Ditto.
	* event-loop.h: Ditto.
	* exceptions.h: Ditto.
	* exec.c: Ditto.
	* expprint.c: Ditto.
	* expression.h: Ditto.
	* f-lang.c: Ditto.
	* f-valprint.c: Ditto.
	* findcmd.c: Ditto.
	* frame-base.c: Ditto.
	* frame-unwind.c: Ditto.
	* frame-unwind.h: Ditto.
	* frame.c: Ditto.
	* frame.h: Ditto.
	* gcore.c: Ditto.
	* gdb-stabs.h: Ditto.
	* gdb_assert.h: Ditto.
	* gdb_dirent.h: Ditto.
	* gdb_obstack.h: Ditto.
	* gdbcore.h: Ditto.
	* gdbtypes.c: Ditto.
	* gdbtypes.h: Ditto.
	* inf-ttrace.c: Ditto.
	* infcall.c: Ditto.
	* infcmd.c: Ditto.
	* inflow.c: Ditto.
	* infrun.c: Ditto.
	* inline-frame.h: Ditto.
	* language.c: Ditto.
	* language.h: Ditto.
	* libunwind-frame.c: Ditto.
	* libunwind-frame.h: Ditto.
	* linespec.c: Ditto.
	* linux-nat.c: Ditto.
	* linux-nat.h: Ditto.
	* linux-thread-db.c: Ditto.
	* machoread.c: Ditto.
	* macroexp.c: Ditto.
	* macrotab.c: Ditto.
	* main.c: Ditto.
	* maint.c: Ditto.
	* mdebugread.c: Ditto.
	* memattr.c: Ditto.
	* minsyms.c: Ditto.
	* monitor.c: Ditto.
	* monitor.h: Ditto.
	* objfiles.c: Ditto.
	* objfiles.h: Ditto.
	* osabi.c: Ditto.
	* p-typeprint.c: Ditto.
	* p-valprint.c: Ditto.
	* parse.c: Ditto.
	* printcmd.c: Ditto.
	* proc-events.c: Ditto.
	* procfs.c: Ditto.
	* progspace.c: Ditto.
	* progspace.h: Ditto.
	* psympriv.h: Ditto.
	* psymtab.c: Ditto.
	* record.c: Ditto.
	* regcache.c: Ditto.
	* regcache.h: Ditto.
	* remote-fileio.c: Ditto.
	* remote.c: Ditto.
	* ser-mingw.c: Ditto.
	* ser-tcp.c: Ditto.
	* ser-unix.c: Ditto.
	* serial.c: Ditto.
	* serial.h: Ditto.
	* solib-frv.c: Ditto.
	* solib-irix.c: Ditto.
	* solib-osf.c: Ditto.
	* solib-pa64.c: Ditto.
	* solib-som.c: Ditto.
	* solib-sunos.c: Ditto.
	* solib-svr4.c: Ditto.
	* solib-target.c: Ditto.
	* solib.c: Ditto.
	* somread.c: Ditto.
	* source.c: Ditto.
	* stabsread.c: Ditto.
	* stabsread.c: Ditto.
	* stack.c: Ditto.
	* stack.h: Ditto.
	* symfile-mem.c: Ditto.
	* symfile.c: Ditto.
	* symfile.h: Ditto.
	* symmisc.c: Ditto.
	* symtab.c: Ditto.
	* symtab.h: Ditto.
	* target-descriptions.c: Ditto.
	* target-memory.c: Ditto.
	* target.c: Ditto.
	* target.h: Ditto.
	* terminal.h: Ditto.
	* thread.c: Ditto.
	* top.c: Ditto.
	* tracepoint.c: Ditto.
	* tracepoint.h: Ditto.
	* ui-file.c: Ditto.
	* ui-file.h: Ditto.
	* ui-out.h: Ditto.
	* user-regs.c: Ditto.
	* user-regs.h: Ditto.
	* utils.c: Ditto.
	* valarith.c: Ditto.
	* valops.c: Ditto.
	* valprint.c: Ditto.
	* valprint.h: Ditto.
	* value.c: Ditto.
	* varobj.c: Ditto.
	* varobj.h: Ditto.
	* vec.h: Ditto.
	* xcoffread.c: Ditto.
	* xcoffsolib.c: Ditto.
	* xcoffsolib.h: Ditto.
	* xml-syscall.c: Ditto.
	* xml-tdesc.c: Ditto.
2011-01-05 22:22:53 +00:00
Joel Brobecker 449444484c Update the copyright year for most remaining files in GDB 2011-01-05 05:09:55 +00:00
Joel Brobecker 31886ea655 Add missing copyright header for testsuite/gdb.base/langs1.f.
This file has been created prior to CVS rev 1. Instead of listing all
the years since 1999, I just put 1999, 2010 and 2011.

gdb/testsuite/ChangeLog:

        * gdb.base/langs1.f: Add copyright header.
2011-01-05 05:06:48 +00:00
gdbadmin e94277cb75 *** empty log message *** 2011-01-05 00:00:32 +00:00
gdbadmin 85813ffd59 *** empty log message *** 2011-01-04 00:00:03 +00:00
Jan Kratochvil ebedcab50d gdb/
* frame.c (get_prev_frame_1) <UNWIND_INNER_ID>: New variables
	this_pc_in_block, morestack_msym and morestack_name.  Check for
	"__morestack" minimal symbol there.

gdb/testsuite/
	* gdb.base/morestack.exp: New file.
	* gdb.base/morestack.c: New file.
2011-01-03 13:11:06 +00:00
Jan Kratochvil 42ea3d7a08 gdb/doc/
* Makefile.in (diststuff): Remove gdb-cfg.texi and GDBvn.texi.
	(clean): Add GDBvn.texi.
2011-01-03 13:01:05 +00:00
Joel Brobecker e5cc9f32cd prevent the "load" command from repeating
This makes sure that the `load' command does not repeat when the user
presses Return again, as documented in the GDB User's Manual.

gdb/ChangeLog:

        * symfile.c (find_sym_fns): Add call to dont_repeat.
2011-01-03 07:53:06 +00:00
gdbadmin 8a541dfccf *** empty log message *** 2011-01-03 00:00:03 +00:00
Jan Kratochvil de1eb2f973 gdb/testsuite/
* gdb.ada/gnat_ada.gpr: Fix copyright comment line regression by 2011.
2011-01-02 07:32:34 +00:00
gdbadmin 2b86002189 *** empty log message *** 2011-01-02 00:00:33 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Joel Brobecker 71ce852cc7 Update copyright year in version of output (gdb/gdbserver/gdbreplay)
gdb/ChangeLog:

       * top.c (print_gdb_version): Update copyright year in version output.

gdb/gdbserverChangeLog:

       * server.c (gdbserver_version): Update copyright year in version
       output.
       * gdbreplay.c (gdbreplay_version): Ditto.
2011-01-01 14:14:46 +00:00
Joel Brobecker c3c1ebe81a Rotate GDB's main ChangeLog file
gdb/ChangeLog:

        * ChangeLog-2010: Renames ChangeLog.
        * ChangeLog: New file.
        * config/djgpp/fnchange.lst: Add exception for gdb/ChangeLog-2010.
        Also fix a typo in the exception for gdb/ChangeLog-2009.
2011-01-01 14:05:08 +00:00
gdbadmin d26f9b639c *** empty log message *** 2011-01-01 00:00:03 +00:00
Michael Snyder aff410f180 2010-12-31 Michael Snyder <msnyder@vmware.com>
* charset.c: Comment cleanup and long line wrapping.
	* charset.h: Ditto.
	* c-lang.c: Ditto.
	* c-lang.h: Ditto.
	* coff-pe-read.c: Ditto.
	* coff-pe-read.h: Ditto.
	* coffread.c: Ditto.
	* command.h: Ditto.
	* complaints.c: Ditto.
	* complaints.h: Ditto.
	* completer.c: Ditto.
	* completer.h: Ditto.
	* corefile.c: Ditto.
	* corelow.c: Ditto.
	* core-regset.c: Ditto.
	* cp-abi.c: Ditto.
	* cp-abi.h: Ditto.
	* cp-namespace.c: Ditto.
	* cp-support.c: Ditto.
	* cp-support.h: Ditto.
	* cp-valprint.c: Ditto.
	* cp-typeprint.c: Ditto.
	* c-valprint.c: Ditto.
2010-12-31 22:59:52 +00:00
Michael Snyder 0e2de36609 2010-12-31 Michael Snyder <msnyder@vmware.com>
* annotate.c: Comment cleanup, shorten long lines.
	* arch-utils.c: Ditto.
	* arch-utils.h: Ditto.
	* auxv.c: Ditto.
	* auxv.h: Ditto.
	* ax-gdb.c: Ditto.
	* ax-gdb.h: Ditto.
	* ax-general.c: Ditto.
	* breakpoint.h: Ditto.
	* buildsym.h: Ditto.
2010-12-31 19:16:37 +00:00
gdbadmin 0287c44454 *** empty log message *** 2010-12-31 00:00:03 +00:00
Mike Frysinger 2ce7ff1dce Fix style warnings detected by server in new Blackfin code 2010-12-30 17:36:26 +00:00
gdbadmin c671de8cdd *** empty log message *** 2010-12-30 00:00:32 +00:00
Michael Snyder 4a64f543e6 2010-12-29 Michael Snyder <msnyder@vmware.com>
* bcache.c: Comment clean-up.
	* block.c: Ditto.
	* blockframe.c: Ditto.
	* breakpoint.c: Ditto.
	* bsd-kvm.c: Ditto.
	* buildsym.c: Ditto.
2010-12-29 21:44:26 +00:00
Mike Frysinger eb826dc62c gdbserver: bfin: new port
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-29 16:15:42 +00:00
Mike Frysinger 9102122396 gdb: bfin: new port
Initial support for Blackfin processors.  This supports the standard ABI.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-29 16:11:49 +00:00
Hui Zhu abc1f4cd13 2010-12-29 Hui Zhu <teawater@gmail.com>
* ax-gdb.c (gen_expr): Change error message.
2010-12-29 12:47:19 +00:00
Joel Brobecker 457344df01 revert previous gdb.c commit (it was not a minor comment update)
gdb/ChangeLog:

       * gdb.c: Revert the previous change, which was probably committed
        by accident.
2010-12-29 10:18:51 +00:00
Joel Brobecker eed9788b42 Fix typo in ada-lang.c comment.
gdb/ChangeLog:

        * ada-lang.c: Fix typo in comment.
2010-12-29 08:15:24 +00:00
Joel Brobecker 9e87a40907 [Ada] print null array pointer as `0x0' rather than `(null)'
Trying to print a variable defined as an access to an unconstrained
array:

       type String_Access is access String;
       S1 : String_Access;

If that variable is null, then GDB prints its value in an odd way:

    (gdb) print S1
    $1 = (string_bug.string_access) (null)
                                    ^^^^^^

This patch changes the debugger behavior to print the pointer using
the same output we'd use for any null pointer:

    (gdb) print S1
    $1 = (string_bug.string_access) 0x0

It also adds an assert, helping us verify an assumption.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_1): Print null array pointers as
        `0x0' rather than `(null)'.  Add assertion.

gdb/testsuite/ChangeLog:

        * gdb.ada/arrayptr/foo.adb: Add new local variable Null_String.
        * gdb.ada/arrayptr.exp: Add test printing that new variable.
2010-12-29 08:02:59 +00:00
Joel Brobecker 720d1a4025 [Ada] do not print arrays as array pointers
This patch enhances the debugger to distinguish between fat pointers
that represent either: array types, or array access types.  In the latter
case, the object/type is encoded as a typedef type pointing to the fat
pointer.

The first part of the change is to adjust ada_check_typedef to avoid
stripping the typedef layer when it points to a fat pointer.  The rest
of the patch is adjustments required in various places to deal with
the fact that the type is uses might now be a typedef.

gdb/ChangeLog:

        * ada-lang.h (ada_coerce_to_simple_array): Add declaration.
        * ada-lang.c (ada_typedef_target_type): New function.
        (desc_base_type): Add handling of fat pointer typedefs.
        (ada_coerce_to_simple_array): Make non-static.
        (decode_packed_array_bitsize): Add handling of fat pointer typedefs.
        Add assertion.
        (ada_template_to_fixed_record_type_1, ada_to_fixed_type)
        (ada_check_typedef): Add handling of fat pointer typedefs.
        (ada_evaluate_subexp) [OP_FUNCALL]: Likewise.
        * ada-typeprint.c (ada_print_type): Add handling of fat pointer
        typedefs.
        * ada-valprint.c (ada_val_print_1): Convert fat pointers that are not
        array accesses to simple arrays rather than simple array pointers.
        (ada_value_print): In the case of array descriptors, do not print
        the value type description unless it is an array access.

gdb/testsuite/ChangeLog:

        * gdb.ada/lang_switch.exp: Correct expected parameter value.

gdb/doc/ChangeLog:

        * gdb.texinfo (Ada Glitches): Remove paragraph describing the
        occasional case where the debugger prints an array address
        instead of the array itself.
2010-12-29 08:01:32 +00:00
Joel Brobecker 113a6f1ec9 Add documentation for TARGET_OBJECT_OSDATA
gdb/ChangeLog:

        * target.h (enum target_object): Expand the documentation of
        TARGET_OBJECT_OSDATA a bit.
2010-12-29 02:52:23 +00:00
Michael Snyder ebcd3b23ee 2010-12-28 Michael Snyder <msnyder@vmware.com>
* command.h: Comment clean-up.
	* cli/cli-cmds.c: Ditto.
	* cli/cli-cmds.h: Ditto.
	* cli/cli-decode.c: Ditto.
	* cli/cli-decode.h: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-interp.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-setshow.c: Ditto.
	* cli/cli-setshow.h: Ditto.
2010-12-29 02:11:04 +00:00
Michael Snyder 371d5dec8e 2010-12-28 Michael Snyder <msnyder@vmware.com>
* event-loop.c: Comment clean-up.
	* event-loop.h: Ditto.
	* event-top.c: Ditto.
	* gdb.c: Ditto.
	* gdb.h: Ditto.
	* main.c: Ditto.
	* top.c: Ditto.
	* top.h: Ditto.
2010-12-29 00:58:14 +00:00
gdbadmin 551ce43ca7 *** empty log message *** 2010-12-29 00:00:03 +00:00
Pedro Alves 6ab12e0f33 * ax-gdb.c (gen_expr) <OP_REGISTER>: Error out if trying to
collect a user register.
2010-12-28 17:59:58 +00:00
Hui Zhu 175ff332d0 2010-12-28 Hui Zhu <teawater@gmail.com>
* gdbarch.sh (ax_pseudo_register_collect,
	ax_pseudo_register_push_stack): new callbacks.
	(agent_expr): Forward declare.
	* gdbarch.h, gdbarch.c: Regenerate.
	* ax-gdb.c (gen_expr): Remove pseudo-register check code.
	* ax-general.c (user-regs.h): New include.
	(ax_reg): Call gdbarch_ax_pseudo_register_push_stack.
	(ax_reg_mask): Call gdbarch_ax_pseudo_register_collect.
	* mips-tdep.c (ax.h): New include.
	(mips_ax_pseudo_register_collect,
	mips_ax_pseudo_register_push_stack): New functions.
	(mips_gdbarch_init): Set mips_ax_pseudo_register_collect and
	mips_ax_pseudo_register_push_stack.
2010-12-28 16:00:13 +00:00
Yao Qi f32bf4a4c9 2010-12-28 Yao Qi <yao@codesourcery.com>
* arm-tdep.c (arm_register_aliases): Remove sp, pc, and fp.
2010-12-28 13:26:46 +00:00
Joel Brobecker f73b1357df remove target_acknowledge_created_inferior
This target_ops routine appears to be unused in practice, so this patch
removes it.

gdb/ChangeLog:

        * inf-child.c (inf_child_acknowledge_created_inferior): Delete.
        (inf_child_target): Do not set t->to_acknowledge_created_inferior.
        * inf-ptrace.c (inf_ptrace_create_inferior): Remove call to
        target_acknowledge_created_inferior.
        * inf-ttrace.c (inf_ttrace_him): Likewise.
        * target.h (struct target_ops): Delete to_acknowledge_created_inferior
        field.
        (target_acknowledge_created_inferior): Delete.
        * target.c (update_current_target): Remove setting of
        to_acknowledge_created_inferior field. Do default value for that
        field either.
        (debug_to_acknowledge_created_inferior): Delete.
        (setup_target_debug): Remove setting of
        current_target.to_acknowledge_created_inferior.
2010-12-28 11:40:27 +00:00
gdbadmin 151254a6b5 *** empty log message *** 2010-12-28 00:00:33 +00:00
Pedro Alves 128070bb74 gdb/
* breakpoint.c (breakpoint_restore_shadows): When looking for the
	location with the lowest address that overlaps the memory range we
	want to restore shadows for, account for multiple locations at the
	same address.
2010-12-27 19:37:04 +00:00
Thiago Jung Bauermann 35df450089 Code cleanup - renaming.
* breakpoint.c: Use bl for `*bp_location' variables, blp_tmp for
	`**bp_location' helper variables, b_tmp for `*breakpoint' helper
	variables.
2010-12-27 13:49:45 +00:00
Hui Zhu 6229fbeaa6 2010-12-27 Kevin Buettner <kevinb@redhat.com>
Hui Zhu  <teawater@gmail.com>

	* mips-tedp.c (mips_register_name): Add comments.
2010-12-27 08:17:34 +00:00
gdbadmin 53e6a1dd44 *** empty log message *** 2010-12-27 00:00:33 +00:00
gdbadmin 6c1e9953e3 *** empty log message *** 2010-12-26 00:00:02 +00:00
Andreas Schwab 5d3d9cba6a * gdb.threads/tls.exp: Fix typo. 2010-12-25 19:22:39 +00:00
Andreas Schwab a283af878e * gdb.threads/thread-specific.exp (get_thread_list): Update.
* gdb.threads/execl.exp: Update.
2010-12-25 17:54:01 +00:00
gdbadmin 0f70898ff4 *** empty log message *** 2010-12-25 00:00:33 +00:00
gdbadmin 76136a3cde *** empty log message *** 2010-12-24 00:00:33 +00:00
Mike Frysinger 39ab222a94 gdbserver: start a gitignore 2010-12-23 21:13:24 +00:00
Pedro Alves ad1966379d gdb/doc/
* gdb.texinfo (Packets) <read registers packet>: Document support
	for registers that were not collected.
2010-12-23 20:29:17 +00:00
Yao Qi 2a20745c6f 2010-12-23 Yao Qi <yao@codesourcery.com>
* gdb.arch/arm-disp-step.exp: New.
	* gdb.arch/arm-disp-step.S: New.
2010-12-23 15:10:24 +00:00
Yao Qi 621c6d5b11 2010-12-23 Yao Qi <yao@codesourcery.com>
* arm-tdep.c (thumb_analyze_prologue): Move some code ...
	(EXTRACT_MOVW_MOVT_IMM_T): ... here.  New macro.
	(EXTRACT_MOVW_MOVT_IMM_A): New macro.
	(arm_analyze_load_stack_chk_guard): New.
	(arm_skip_stack_protector): New.
	(arm_skip_prologue): Adjust post_prologue_pc by
	arm_skip_stack_protector.
2010-12-23 14:38:34 +00:00
Joel Brobecker 81ec3cceb2 Add missing _() marker in error message.
gdb/ChangeLog:

	* mi/mi-main.c (mi_cmd_remove_inferior): Use _() marker for error
	message.  Change spelling of "can not" into "cannot".
2010-12-23 04:30:39 +00:00
Yao Qi 0e8708c7b0 2010-12-23 Yao Qi <yao@codesourcery.com>
* arm-tdep.c (arm_gdbarch_init): Remove invoke to
	set_gdbarch_deprecated_fp_regnum.
2010-12-23 03:20:10 +00:00
gdbadmin 26760e3433 *** empty log message *** 2010-12-23 00:00:33 +00:00
Marc Khouzam 8fa067afb2 * inferior.c (remove_inferior_command): Don't remove an active inferior.
* mi/mi-main.c (mi_cmd_remove_inferior): Ditto.
2010-12-22 18:30:19 +00:00
gdbadmin ab73a86628 *** empty log message *** 2010-12-22 00:00:33 +00:00
Tom Tromey a7658b96f6 gdb
* thread.c (print_thread_info): Make a ui-out table in CLI mode.
gdb/testsuite
	* gdb.threads/execl.exp: Update.
	* gdb.threads/linux-dp.exp: Update.
	* gdb.threads/manythreads.exp: Update.
	* gdb.threads/tls.exp: Update.
2010-12-21 19:10:15 +00:00
gdbadmin 049f7d6731 *** empty log message *** 2010-12-21 00:00:02 +00:00
Yao Qi 544838827c 2010-12-20 Yao Qi <yao@codesourcery.com>
* arm-tdep.c (arm_register_reggroup_p): New.
	(arm_gdbarch_init): Set arm_register_reggroup_p for hook
	register_reggroup_p.
2010-12-20 06:19:05 +00:00
Yao Qi 7d8cb66281 Forget to commit in my last check in
2010-12-20  Yao Qi  <yao@codesourcery.com>

	* features/arm-core.xml:  Add attribute type to reg from r0 to r12.
	* features/arm-with-iwmmxt.c: Regenerate.
	* features/arm-with-neon.c: Regenerate.
	* features/arm-with-vfpv2.c: Regenerate.
	* features/arm-with-vfpv3.c: Regenerate.
2010-12-20 06:15:01 +00:00
Yao Qi 8ab03ccb04 2010-12-20 Yao Qi <yao@codesourcery.com>
* features/arm-core.xml:  Add attribute type to reg from r0 to r12.
	* features/arm-with-iwmmxt.c: Regenerate.
	* features/arm-with-neon.c: Regenerate.
	* features/arm-with-vfpv2.c: Regenerate.
	* features/arm-with-vfpv3.c: Regenerate.
2010-12-20 06:09:23 +00:00
gdbadmin 7b78992c6f *** empty log message *** 2010-12-20 00:00:33 +00:00
gdbadmin 3cdd07e5e5 *** empty log message *** 2010-12-19 00:00:33 +00:00
Marc Khouzam 57bf2d7ed8 * mi/mi-main.c (mi_cmd_remove_inferior): Don't delete current inferior.
(get_other_inferior): New.
2010-12-18 02:10:05 +00:00
Marc Khouzam b3422a0d89 * python/py-progspace.c (py_free_pspace): Obtain arch another
way to avoid dereferencing a null pointer.
2010-12-18 02:08:43 +00:00
Michael Snyder 5f2302abf8 2010-12-17 Michael Snyder <msnyder@vmware.com>
* utils.c (do_my_cleanups): Comment fix-up.
2010-12-18 00:11:46 +00:00
gdbadmin e010756507 *** empty log message *** 2010-12-18 00:00:34 +00:00
Kevin Buettner 930bd0e01a * mips-tdep.c (make_mips16_addr): New function.
(mips_elf_make_msymbol_special): Don't set the low bit in the
	symbol's address.
	(mips_read_pc, mips_unwind_pc, mips_addr_bits_remove): Strip bit
	indicating mips16 address, if present.
	(mips_write_pc): Set bit indicating mips16 address when in a mips16
	function.
	(mips_eabi_push_dummy_call, mips_o64_push_dummy_call): Likewise,
	but for each function pointer argument to inferior function call.
2010-12-17 21:39:27 +00:00
Tom Tromey 900c7f9d20 * psympriv.h (struct partial_symtab) <readin>: Move field
earlier.
2010-12-17 17:19:36 +00:00
gdbadmin aeacb1880c *** empty log message *** 2010-12-17 00:00:33 +00:00
Kevin Buettner ee51a8c7e1 * mips-tdep.c (mips_convert_register_float_case_p)
(mips_convert_register_gpreg_case_p): New functions.
	(mips_convert_register_p): Invoke new functions above.
	(mips_register_to_value): Add case for fetching value shorter
	than 64 bits from a 64-bit register.
	(mips_value_to_register): Add case for storing value shorter
	than 64 bits into a 64-bit register.
2010-12-16 22:50:48 +00:00
Tom Tromey fa595c2727 2010-12-16 Joel Borggrén-Franck <joel.borggren.franck@gmail.com>
* python/py-value.c (value_object_type) <tp_flags>: Add
	Py_TPFLAGS_BASETYPE.
2010-12-16 17:40:27 +00:00
Mike Frysinger 448a92bf2b NEWS: Mention new sim --map-info flag. 2010-12-16 13:05:28 +00:00
Doug Evans fc1a9d6e90 * dwarf2read.c (_initialize_dwarf2_read): Fix help text of
"save gdb-index" command.
2010-12-16 01:43:01 +00:00
gdbadmin cee43517c5 *** empty log message *** 2010-12-16 00:00:02 +00:00
Tom Tromey 5b79abe7f1 gdb
* infrun.c (save_infcall_control_state): Handle the
	exception-resume breakpoint.
	(restore_infcall_control_state): Likewise.
	(discard_infcall_control_state): Likewise.
gdb/testsuite
2010-12-15  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.cp/nextoverthrow.cc (dummy): Return int 0.
	(NextOverThrowDerivates) <resumebpt>: New.
	(resumebpt_test): New.
	(main): Call resumebpt_test.
	* gdb.cp/nextoverthrow.exp: New block for test of "resumebpt".
2010-12-15 21:19:50 +00:00
Kevin Buettner 8bdf35dcae * mips-tdep.c (mips_pseudo_register_write): Sign extend 32-bit
cooked values that are being transferred to 64-bit raw registers.
	(mips_pseudo_register_read): Revise to preserve symmetry with
	mips_pseudo_register_write().
2010-12-15 20:53:08 +00:00
Tom Tromey 45ccdddcbf 2010-12-15 Greg Watson <g.watson@computer.org>
* f-exp.y (yylex): Check entire token against keywords.
2010-12-15 19:28:31 +00:00
Doug Evans a86caf66bb Rename "maint set python auto-load" to "set auto-load-scripts".
* NEWS: Mention it.
	* python/py-auto-load.c (auto_load_scripts): Renamed from
	gdbpy_auto_load.
	(load_auto_scripts_for_objfile): Update.
	(gdbpy_initialize_auto_load): Rename "maint set python auto-load" to
	"set auto-load-scripts".

	doc/
	* gdb.texinfo (Startup): Document auto-loading of scripts during
	startup.
	(Auto-loading): Delete "maint set python auto-load on|off".
	Add "set auto-load-scripts on|off".
2010-12-15 17:28:00 +00:00
gdbadmin 363f826a8f *** empty log message *** 2010-12-15 00:00:04 +00:00
Kevin Buettner a8852dc55e * mips-tdep.c (mips_eabi_push_dummy_call): Place signed, rather
than unsigned, values in registers.
2010-12-14 21:07:50 +00:00
H.J. Lu b6c882c784 Move gdb ChangeLog entry to gdb/ChangeLog. 2010-12-14 14:50:42 +00:00
Ken Werner cfa6f0541f gdb:
* valops.c (value_one): Use get_array_bounds to compute the number
	of array elements instead of dividing the length of the array by the
	length of the element types.
	* valarith.c (value_complement, value_neg): Likewise.
2010-12-14 10:23:41 +00:00
Joel Brobecker 043b651001 build failure on IRIX when building with Python support.
This is a nasty interaction between Python and GDB. Basically,
Python causes some macros to be unilaterally defined in order
to turns some features on:

    /* Define to activate features from IEEE Stds 1003.1-2001 */
    #define _POSIX_C_SOURCE 200112L

    /* Define to the level of X/Open that your system supports */
    #define _XOPEN_SOURCE 600

But the problem is that they turn off defines provided by some
system headers on which we depend. Namely:

  * sys/siginfo.h:

        #if _SGIAPI
        #define siginfo __siginfo
        #endif

  * sys/ucontext.h:

        #if _SGIAPI && !defined(__SGI_NOUCONTEXT_COMPAT)
        [...]
        #define fp_r            __fp_r
        [...]
        #define fp_csr          __fp_csr
        [...]
        #endif

The important macro here is _SGIAPI, defined as follow in standards.h:

        #define _SGIAPI ((defined(_SGI_SOURCE) && \
                                _NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5) || \
                        (_ANSIMODE && _NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5))

If one builds GDB without Python, then _SGIAPI is true, and all is fine.
But building with Python causes both _POSIX_C_SOURCE and _XOPEN_SOURCE
to trip all the _NO_[...] tests (_NO_POSIX, _NO_XOPEN4, _NO_XOPEN5).
And so we get build failures because we try to use undefined types, or
non-existent component names inside the regset structure.

The latter problem is observed only within irix5-nat.c, which means
that it is specific to IRIX.  So it's easy to write the code in a way
that it does not require the macros (just use the real component names,
rather than relying on the macros to do the translation).

The former, on the other hand, is a little trickier, because the problem
occurs inside a generic unit (procfs.c). The solution I chose was to
adjust the configure script to add -Dsiginfo=__siginfo to the CPPFLAGS
if building with python using GCC on IRIX.

We hadn't seen this sort of issue up to now because the affect units
have not been dependent on the python includes up to now.  Recent changes
have made them indirectly dependent on Python, thus triggering the issues.

gdb/ChangeLog:

        * irix5-nat.c: Replace fp_r, fp_regs and fp_scr by __fp_r, __fp_regs
        and __fp_scr respectively throughout.
        * configure.ac: Compile with -Dsiginfo=__siginfo if building with
        Python using GCC on IRIX.
        * configure: Regenerate.
2010-12-14 07:17:15 +00:00
gdbadmin c4a64778e0 *** empty log message *** 2010-12-14 00:00:33 +00:00
Kevin Buettner c6490bf2ed * solib-svr4.c (enable_break): Don't attempt to place breakpoints,
when attaching, on the names in bkpt_names: _start, __start, and
	main.
2010-12-13 15:45:55 +00:00
Stan Shebs 0914bcdbf6 2010-12-12 Stan Shebs <stan@codesourcery.com>
* value.c (value_of_internalvar): Add case for trace state
	variables.

	* gdb.trace/tsv.exp: Test print command on trace state variables.
2010-12-13 05:29:32 +00:00
gdbadmin 8d4f41361d *** empty log message *** 2010-12-13 00:00:04 +00:00
Doug Evans 7b9f3c509c * dwarf2read.c (dwarf2_per_objfile): New member quick_file_names_table.
(dwarf2_per_cu_quick_data): Move definition down to "quick functions"
	section.  Delete members lines full_names.  Rename read_lines to
	no_file_data.
	(quick_file_names): New struct.
	(hash_file_name_entry, eq_file_name_entry): New functions.
	(delete_file_name_entry, create_quick_file_names_table): New functions.
	(dwarf2_read_index): Initialize quick_file_names_table.
	(dw2_get_file_names): Renamed from dw2_require_line_header.
	Return pointer to quick_file_names entry.  All callers updated.
	(dw2_get_real_path): Renamed from dw2_require_full_path.
	Replace per_cu arg with pointer to quick_file_names entry.
	All callers updated.
	(dw2_free_cached_file_names): New function.
	(dw2_forget_cached_source_info): Call it (via htab_traverse_noresize).
	(dwarf2_initialize_objfile): Initialize quick_file_names_table in
	the OBJF_READNOW case.
	(dwarf2_free_objfile): Rewrite freeing of quick file names tables.
2010-12-12 19:19:27 +00:00
Mark Kettenis 1583e7ea01 Fix mail addres in ChangeLog. 2010-12-12 19:06:21 +00:00
Mark Kettenis 89fa5cc879 * mips64obsd-tdep.c (floatformats_mips64_quad): New define.
(mips64obsd_init_abi): Set long_double_bit and long_double_format.
2010-12-12 18:23:25 +00:00
Mark Kettenis 7a58cce85c * sparc-tdep.c: Fix typo in comment. 2010-12-12 17:41:19 +00:00
gdbadmin 97e84e2551 *** empty log message *** 2010-12-12 00:00:03 +00:00
gdbadmin 4a2b320e1f *** empty log message *** 2010-12-11 00:01:03 +00:00
Doug Evans ae2de4f869 * dwarf2read.c: Whitespace cleanup, plus comment additions.
No code changes.
2010-12-10 22:00:00 +00:00
Tom Tromey 66cb815960 * NEWS: Document exception-handling change. 2010-12-10 20:33:44 +00:00
gdbadmin 315e99a5b4 *** empty log message *** 2010-12-10 00:00:33 +00:00
Marc Khouzam 30a7f059d8 * mi/mi-parse.c (mi_parse): Wrong error message. 2010-12-09 20:41:54 +00:00
Doug Evans ad727bb22e * symfile.h (quick_symbol_functions): Clarify usage of
map_symbol_filenames.
2010-12-09 19:52:23 +00:00
Tom Tromey 305aeedc41 gdb
* mi/mi-parse.h (mi_parse): Update.
	* mi/mi-parse.c (mi_parse_cleanup): New function.
	(mi_parse): Add 'token' argument.  Throw exception on error.
	* mi/mi-main.c (mi_print_exception): New function.
	(mi_execute_command): Use mi_print_exception.  Catch exceptions
	from mi_parse.
gdb/testsuite
	* gdb.base/interp.exp: Add regression test.
2010-12-09 19:23:49 +00:00
Tom Tromey 186c406b19 gdb
PR c++/9593:
	* thread.c (clear_thread_inferior_resources): Call
	delete_longjmp_breakpoint.
	* infrun.c (handle_inferior_event): Handle exception breakpoints.
	(handle_inferior_event): Likewise.
	(insert_exception_resume_breakpoint): New function.
	(check_exception_resume): Likewise.
	* inferior.h (delete_longjmp_breakpoint_cleanup): Declare.
	* infcmd.c (delete_longjmp_breakpoint_cleanup): No longer static.
	(step_1): Set thread's initiating frame.
	(until_next_continuation): New function.
	(until_next_command): Support exception breakpoints.
	(finish_command_continuation): Delete longjmp breakpoint.
	(finish_forward): Support exception breakpoints.
	* gdbthread.h (struct thread_info) <initiating_frame>: New field.
	* breakpoint.h (enum bptype) <bp_exception, bp_exception_resume,
	bp_exception_master>: New constants.
	(struct bpstat_what) <is_longjmp>: New field.
	(set_longjmp_breakpoint): Update.
	* breakpoint.c (create_exception_master_breakpoint): New function.
	(update_breakpoints_after_exec): Handle bp_exception_master.  Call
	create_exception_master_breakpoint.
	(print_it_typical): Handle bp_exception_master, bp_exception.
	(bpstat_stop_status): Handle bp_exception_master.
	(bpstat_what): Handle bp_exception_master, bp_exception,
	bp_exception_resume.
	(bptype_string): Likewise.
	(print_one_breakpoint_location): Likewise.
	(allocate_bp_location): Likewise.
	(set_longjmp_breakpoint): Handle exception breakpoints.  Change
	interface.
	(delete_longjmp_breakpoint): Handle exception breakpoints.
	(mention): Likewise.
	(struct until_break_command_continuation_args) <thread_num>: New
	field.
	(until_break_command_continuation): Call
	delete_longjmp_breakpoint.
	(until_break_command): Support exception breakpoints.
	(delete_command): Likewise.
	(breakpoint_re_set_one): Likewise.
	(breakpoint_re_set): Likewise.
gdb/testuite
	* gdb.java/jnpe.java: New file.
	* gdb.java/jnpe.exp: New file.
	* gdb.cp/nextoverthrow.exp: New file.
	* gdb.cp/nextoverthrow.cc: New file.
2010-12-09 16:09:54 +00:00
gdbadmin 87cc8f36a7 *** empty log message *** 2010-12-09 00:00:02 +00:00
Doug Evans 4e4666e6f7 * gdbtypes.h (TYPE_IS_OPAQUE): Reformat. 2010-12-08 21:35:59 +00:00
Doug Evans 73e2eb35ba * gdbtypes.c (check_typedef): Tweak comment. 2010-12-08 21:33:20 +00:00
Doug Evans 0a5429f697 PR symtab/12302
* dwarf2read.c (struct psymtab_cu_index_map): New struct.
	(hash_psymtab_cu_index, eq_psymtab_cu_index): New functions.
	(struct addrmap_index_data): New struct.
	(add_address_entry): Remove arg `pst', new args `start', `end'.
	(add_address_entry_worker, write_address_map): New functions.
	(write_psymtabs_to_index): Address table generation moved to
	write_address_map.  Build a table mapping psymtab to CU index
	to pass to it.
2010-12-08 19:03:35 +00:00
Doug Evans 7e17e08811 * dwarf2read.c (write_psymtabs_to_index): When stat fails, pass file
name to perror.
2010-12-08 18:26:40 +00:00
Doug Evans d4637a0471 * symfile.h (quick_symbol_functions): Clarify usage of
expand_symtabs_with_filename.
	* dwarf2read.c (dw2_expand_symtabs_with_filename): Only iterate over
	comp units, ignore type units.
2010-12-08 18:04:08 +00:00
Doug Evans 1ef75ecca6 * dwarf2read.c (dw2_expand_symtabs_with_filename): Use FILENAME_CMP. 2010-12-08 17:31:52 +00:00
gdbadmin 4937863dfe *** empty log message *** 2010-12-08 00:00:03 +00:00
Doug Evans 74dd2ca6a7 * dwarf2read.c (dw2_lookup_symtab): Remove duplicate call to
gdb_realpath.
2010-12-07 17:30:52 +00:00
Doug Evans aae1c79a03 PR python/12227
* NEWS: Mention -data-directory.
	* main.c (captured_main): Recognize -data-directory.

	doc/
	* gdb.texinfo (Mode Options): Document -data-directory.
	(Data Files): Add reference to -data-directory.

	testsuite/
	* gdb.base/catch-syscall.exp (do_syscall_tests): Remove setting
	of data-directory.
	* lib/gdb-python.exp (gdb_check_python_config): Delete, all callers
	updated.
	* lib/gdb.exp (INTERNAL_GDBFLAGS): Add -data-directory.
2010-12-07 17:26:06 +00:00
gdbadmin ee6352bb19 *** empty log message *** 2010-12-07 00:00:02 +00:00
Marc Khouzam 8e0e408ae6 2010-12-06 Marc Khouzam <marc.khouzam@ericsson.com>
* mi/mi-parse.c (mi_parse): Missing else.
2010-12-06 14:16:43 +00:00
gdbadmin a2c86c8224 *** empty log message *** 2010-12-06 00:00:03 +00:00
gdbadmin 7353ec481f *** empty log message *** 2010-12-05 00:00:33 +00:00
Masaki Muranaka 97fc68fe16 * configure.tgt: Accept microblaze*-*-linux* for linux target
and microblaze*-*-* for  as target.
2010-12-04 02:10:53 +00:00
gdbadmin 5492beb9c8 *** empty log message *** 2010-12-04 00:00:33 +00:00
gdbadmin d91ffc6b21 *** empty log message *** 2010-12-03 00:00:33 +00:00
Michael Snyder d426f7b419 2010-11-29 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* gdb.base/callfuncs.exp: Test for skip_float_tests.
	* gdb.base/call-sc.exp: Ditto.
	* gdb.base/finish.exp: Ditto.
	* gdb.base/return.exp: Ditto.
	* gdb.base/return2.exp: Ditto.
2010-12-02 21:34:14 +00:00
Keith Seitz d03a3acf07 * linespec.c (find_method): Move name canonicalization outside
the loop.
	Be paranoid and use a cleanup.
2010-12-02 20:05:59 +00:00
gdbadmin 985f879c3a *** empty log message *** 2010-12-02 00:00:33 +00:00
Doug Evans 148c11bf2e * dwarf2read.c (save_gdb_index_command): Add comment. 2010-12-01 19:37:36 +00:00
Ulrich Weigand 4aac0db70f * valops.c (value_assign): Returned value is never lazy. If a
C++ class type is returned, fix incorrect enclosing type / embedded
	offset.  If internal variable is returned, allocate new internalvar
	value using value_of_internalvar.

	* NEWS: Document changes in behavior of "print x = 0" and similar
	expressions.
2010-12-01 16:49:41 +00:00
gdbadmin ba4b845cec *** empty log message *** 2010-12-01 00:00:33 +00:00
Doug Evans 5fa290c134 * lib/gdb.exp (gdb_test_sequence): Return result of gdb_expect_list.
(gdb_expect_list): Fix spelling errors in comments.
	* gdb.arch/system-gcore.exp: Use gdb_test_sequence instead of
	send_gdb/gdb_expect_list where applicable.
	* gdb.base/call-ar-st.exp: Ditto.
	* gdb.base/funcargs.exp: Ditto.
	* gdb.base/gcore.exp: Ditto.
	* gdb.base/page.exp: Ditto.
	* gdb.base/sigaltstack.exp: Ditto.
	* gdb.base/siginfo.exp: Ditto.
	* gdb.base/sigstep.exp: Ditto.
	* gdb.base/trace-commands.exp: Ditto.
2010-11-30 17:41:14 +00:00
gdbadmin 46a4d0e06b *** empty log message *** 2010-11-30 00:00:32 +00:00
Doug Evans 4e04c971fb * python/lib/gdb/printing.py (register_pretty_printer): Change
printer-name:subprinter-name to printer-name;subprinter-name.
	* python/lib/gdb/command/pretty_printers.py (parse_printer_regexps):
	Ditto.
	(InfoPrettyPrinter, EnablePrettyPrinter, DisablePrettyPrinter): Ditto.

	doc/
	* gdb.texinfo (Pretty-Printer Introduction): Change
	printer-name:subprinter-name to printer-name;subprinter-name.

	testsuite/
	* gdb.python/py-pp-maint.exp: Change printer-name:subprinter-name to
	printer-name;subprinter-name.
2010-11-29 23:20:58 +00:00
Tom Tromey 8cf6f0b103 gdb
* opencl-lang.c (lval_func_check_synthetic_pointer): New
	function.
	* value.h (struct lval_funcs) <indirect, check_synthetic_pointer>:
	New fields.
	(value_bits_synthetic_pointer): Declare.
	* value.c (value_bits_synthetic_pointer): New function.
	* valprint.c (valprint_check_validity): Handle synthetic
	pointers.
	* valops.c (value_ind): Use new 'indirect' lval_funcs method.
	* valarith.c (value_ptradd): Use set_value_component_location.
	* p-valprint.c (pascal_object_print_value_fields): Handle
	synthetic pointers.
	* jv-valprint.c (java_print_value_fields): Handle synthetic
	pointers.
	* dwarf2read.c (dwarf_stack_op_name): Add
	DW_OP_GNU_implicit_pointer.
	(dwarf2_fetch_die_location_block): Add get_frame_pc, baton
	arguments.  Handle location lists.
	(fill_in_loclist_baton): New function.
	(dwarf2_symbol_mark_computed): Use it.
	* dwarf2loc.h (dwarf2_find_location_expression): Declare.
	(dwarf2_fetch_die_location_block): Add get_frame_pc, baton
	arguments.
	* dwarf2loc.c (dwarf2_find_location_expression): Rename from
	find_location_expression.  No longer static.  Update all callers.
	(dwarf_expr_frame_pc): New function.
	(per_cu_dwarf_call): Add get_frame_pc, baton arguments.  Update
	all callers.
	(struct piece_closure) <per_cu>: New field.
	(allocate_piece_closure): Add per_cu argument.
	(read_pieced_value): Handle DWARF_VALUE_IMPLICIT_POINTER.
	(check_pieced_value_bits): Remove validity argument, add check_for
	argument.  Handle DWARF_VALUE_IMPLICIT_POINTER.
	(check_pieced_value_validity, check_pieced_value_invalid):
	Update.
	(check_pieced_synthetic_pointer): New function.
	(get_frame_address_in_block_wrapper): New function.
	(indirect_pieced_value): New function.
	(pieced_value_funcs): Update.
	(invalid_synthetic_pointer): New function.
	(dwarf2_evaluate_loc_desc_full): Rename from
	dwarf2_evaluate_loc_desc.  Add byte_offset argument.
	(dwarf2_evaluate_loc_desc): Rewrite.
	(dwarf2_loc_desc_needs_frame): Set new field on context.
	(get_ax_pc): New function.
	(disassemble_dwarf_expression): Handle
	DW_OP_GNU_implicit_pointer.
	* dwarf2expr.h (enum dwarf_value_location)
	<DWARF_VALUE_IMPLICIT_POINTER>: New constant.
	(struct dwarf_expr_context) <get_frame_pc>: New field.
	(struct dwarf_expr_piece) <v.ptr>: New field.
	* dwarf2expr.c (add_piece): Handle DWARF_VALUE_IMPLICIT_POINTER.
	(execute_stack_op): Handle DW_OP_GNU_implicit_pointer.
	* dwarf2-frame.c (no_get_frame_pc): New function.
	(execute_stack_op): Set new field on context.
	* cp-valprint.c (cp_print_value_fields): Handle synthetic
	pointers.
gdb/testsuite
	* gdb.dwarf2/implptr.exp: New file.
	* gdb.dwarf2/implptr.c: New file.
	* gdb.dwarf2/implptr.S: New file.
2010-11-29 21:18:16 +00:00