Commit Graph

25607 Commits

Author SHA1 Message Date
Vladimir Prus dc146f7c09 Implement core awareness.
* bcache.c (compare_ints): Remove
	(print_percentage): Use compare_positive_ints.
	* defs.h (compare_positive_ints): Declare.
	* linux-nat.h (struct lin_lwp): New field core.
	(linux_nat_core_of_thread_1): Declare.
	* linux-nat.c (add_lwp): Init the 'core' field.
	(linux_nat_wait_1): Record the core.
	(linux_nat_core_of_thread_1, linux_nat_core_of_thread): New.
	(linux_nat_add_target): Register the above.
	* linux-thread-db.c (update_thread_core): New.
	(thread_db_find_new_threads): Update core information for
	every thread.
	* remote.c (struct private_thread_info): New.
	(free_private_thread_info, demand_private_info): New.
	(PACKET_qXfer_threads, use_osdata_threads): New.
	(struct thread_item, threads_parsing_context
	(start_thread, end_thread, thread_attributes)
	(thread_children, threads_children, threads_elements): New.
	(remote_threads_info): Try qXfer:threads before anything
	else.
	(remote_protocol_packets): Register qXfer:threads.
	(remote_open_1): Init use_osdata_threads.
	(struct stop_reply): New field 'core'.
	(remote_parse_stop_reply): Parse core number.
	(process_stop_reply): Record core number.
	(remote_xfer_partial): Handle qXfer:threads.
	(remote_core_of_thread): New.
	(init_remote_ops): Register remote_core_of_thread.
	(_initialize_remote): Register qXfer:read.
	* target.c (target_core_of_thread): New
	* target.h (enum target_object): New value TARGET_OBJECT_THREADS.
	(struct target_ops): New field to_core_of_threads.
	(target_core_of_thread): Declare.
	* gdbthread.h (struct thread_info): New field private_dtor.
	* thread.c (print_thread_info): Report the core.
	* ui-out.c (MAX_UI_OUT_LEVELS): Increase.
	* utils.c (compare_positive_ints): New.
	* features/threads.dtd: New.
	* mi/mi-interp.c (mi_on_normal_stop): Report the core.
	* mi/mi-main.c (struct collect_cores_data, collect_cores)
	(do_nothing, free_vector_of_osdata_items)
	(splay_tree_int_comparator, free_splay_tree): New.
	(print_one_inferior_data): Implemented printing of selected
	inferiors.  Collect and print cores.
	(output_cores): New.
	(mi_cmd_list_thread_groups): Support --recurse.  Permit specifying
	thread groups together with --available.
2010-01-12 21:40:25 +00:00
Jan Kratochvil d30c533689 gdb/
* configure: Regenerate (for _STRUCTURED_PROC).
2010-01-12 12:22:52 +00:00
Joel Brobecker 02893727c5 Delete dead function.
* ada-lang.c (extract_string): Delete.  No longer used.
2010-01-12 08:50:44 +00:00
Joel Brobecker 46ed2d6ff0 Fix -Wunused warning in dec-thread.c.
* dec-thread.c (dec_thread_count_gdb_threads)
        (dec_thread_add_gdb_thread): Prevent -Wunused warning.
2010-01-12 07:51:09 +00:00
Joel Brobecker 606b8d1a46 * ada-valprint.c (ada_print_floating): Remove trailing space. 2010-01-12 07:45:51 +00:00
Joel Brobecker b4ba55a181 gdb/ChangeLog:
Add support for DW_AT_GNAT_descriptive_type.
        * gdbtypes.h (enum type_specific_kind): New enum.
        (struct main_type) [type_specific_field]: New component.
        [type_specific]: Add new component "gnat_stuff".
        (struct gnat_aux_type): New type.
        (INIT_CPLUS_SPECIFIC): Also set TYPE_SPECIFIC_FIELD (type).
        (HAVE_CPLUS_STRUCT): Also check TYPE_SPECIFIC_FIELD (type).
        (gnat_aux_default, allocate_gnat_aux_type): Add declaration.
        (INIT_GNAT_SPECIFIC, ALLOCATE_GNAT_AUX_TYPE, HAVE_GNAT_AUX_INFO)
        (TYPE_SPECIFIC_FIELD): New macros.
        (TYPE_CPLUS_SPECIFIC): Return cplus_struct_default if the given
        type does not hold any cplus-specific data.
        (TYPE_RAW_CPLUS_SPECIFIC): New macro.
        (TYPE_GNAT_SPECIFIC, TYPE_DESCRIPTIVE_TYPE): New macros.
        (TYPE_IS_OPAQUE): Use HAVE_CPLUS_STRUCT to check if type has
        cplus-specific data.
        * gdbtypes.c (allocate_cplus_struct_type): Minor stylistic rewrite.
        Set new component TYPE_SPECIFIC_FIELD (type).
        (gnat_aux_default): New constant.
        (allocate_gnat_aux_type): New function.
        (init_type): Add initialization the type-specific stuff for
        TYPE_CODE_FLT and TYPE_CODE_FUNC types.
        (print_gnat_stuff): New function.
        (recursive_dump_type): Use HAVE_CPLUS_STRUCT to check for cplus-
        specific data.  Adjust code that prints the contents of the
        type-specific union using the TYPE_SPECIFIC_FIELD value.
        * dwarf2read.c (dwarf2_attach_fields_to_type): Do not allocate
        the type cplus stuff for Ada types.
        (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
        Error out if these routines are called with an Ada type.
        (read_structure_type, read_array_type, read_subrange_type):
        Add call to set_descriptive_type.
        (set_die_type): Initialize the gnat-specific data if necessary.
        (need_gnat_info, die_descriptive_type, set_descriptive_type):
        New functions.
        * ada-lang.c (decode_constrained_packed_array_type): Use
        decode_constrained_packed_array_type instead of doing a standard
        lookup to locate a parallel type.
        (find_parallel_type_by_descriptive_type): New function.
        (ada_find_parallel_type_with_name): New function.
        (ada_find_parallel_type): Reimplement using
        ada_find_parallel_type_with_name.
        * ada-valprint.c (print_field_values): Use HAVE_CPLUS_STRUCT
        to check if type has a cplus stuff.
        * linespec.c (total_number_of_methods): Likewise.
        * mdebugread.c (new_type): Likewise.

gdb/testsuite/ChangeLog:

        * gdb.base/maint.exp: Adjust the expected output for the
        "maint print type" test. Use gdb_test_multiple instead of
        gdb_sent/gdb_expect.
2010-01-12 05:49:00 +00:00
Doug Evans 6496a6093d * lib/gdbserver-support.exp (gdbserver_download_current_prog): Rename
from gdbserver_download.  All callers updated.
2010-01-12 00:50:26 +00:00
Doug Evans 08e24bd4ab * gdb.server/ext-run.exp: "info os processes" requires xml support. 2010-01-12 00:48:33 +00:00
gdbadmin 32d670fa3f *** empty log message *** 2010-01-12 00:00:03 +00:00
Jan Kratochvil b0f02ee9ae gdb/
* NEWS: Document the 0b binary number prefix parsing.
2010-01-11 19:29:12 +00:00
Jan Kratochvil b260e10983 gdb/
* objfiles.c (objfile_relocate1): Change the return type to int.
	Describe the new return value.  Return non-zero if data changed.
	(objfile_relocate): New variable changed.  Set it.  Call
	breakpoint_re_set depending on CHANGED.
2010-01-11 18:15:05 +00:00
Jan Kratochvil b5cfddf53b gdb/
Implement binary numbers parsing.
	* c-exp.y (parse_number): New case 'b' and 'B'.

gdb/testsuite/
	Implement binary numbers parsing.
	* gdb.base/printcmds.exp (test_integer_literals_accepted)
	(test_integer_literals_rejected): New binary tests.
2010-01-11 17:58:16 +00:00
Jan Kratochvil e0ae424066 gdb/
* solib.c (info_sharedlibrary_command): Replace
	objfile_has_partial_symbols and objfile_has_full_symbols calls by
	objfile_has_symbols.
2010-01-11 16:30:10 +00:00
gdbadmin 6ae8025abb *** empty log message *** 2010-01-11 00:00:33 +00:00
Joel Brobecker 6e0e59772a Document the improvements made to the mips-irix port.
* NEWS: Document the improvements made to the mips-irix port.
2010-01-10 06:43:01 +00:00
gdbadmin 9c744956e3 *** empty log message *** 2010-01-10 00:00:33 +00:00
Ralf Wildenhues 3725885a65 Sync Libtool from GCC.
/:
	* libtool.m4: Sync from git Libtool.
	* ltmain.sh: Likewise.
	* ltoptions.m4: Likewise.
	* ltversion.m4: Likewise.
	* lt~obsolete.m4: Likewise.

sim/iq2000/:
	* configure: Regenerate.

sim/d10v/:
	* configure: Regenerate.

sim/m32r/:
	* configure: Regenerate.

sim/frv/:
	* configure: Regenerate.

sim/:
	* avr/configure: Regenerate.
	* cris/configure: Regenerate.
	* microblaze/configure: Regenerate.

sim/h8300/:
	* configure: Regenerate.

sim/mn10300/:
	* configure: Regenerate.

sim/erc32/:
	* configure: Regenerate.

sim/arm/:
	* configure: Regenerate.

sim/m68hc11/:
	* configure: Regenerate.

sim/lm32/:
	* configure: Regenerate.

sim/sh64/:
	* configure: Regenerate.

sim/v850/:
	* configure: Regenerate.

sim/cr16/:
	* configure: Regenerate.

sim/moxie/:
	* configure: Regenerate.

sim/m32c/:
	* configure: Regenerate.

sim/mips/:
	* configure: Regenerate.

sim/mcore/:
	* configure: Regenerate.

sim/sh/:
	* configure: Regenerate.

gprof/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

opcodes/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

gas/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

ld/:
	* configure: Regenerate.

gdb/testsuite/:
	* gdb.cell/configure: Regenerate.

binutils/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

bfd/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

bfd/doc/:
	* Makefile.in: Regenerate.
2010-01-09 21:11:44 +00:00
Joel Brobecker 7348c5e1e3 Fix the documentation of valprint.c:value_print.
* valprint.c (value_print): Update the function description to
        mention that the syntax of the output follows the current_language,
        not necessarily C.
2010-01-09 11:46:13 +00:00
Jan Kratochvil 567995e103 gdb/
Fix displacement of separate debug info files.
	* objfiles.c (objfile_relocate): Rename to ...
	(objfile_relocate1): ... here and make it static.  Extend the comment.
	(objfile_relocate): New function.
	* solib-spu.c (spu_relocate_main_executable): Explicitly check if
	SYMFILE_OBJFILE is NULL.  Remove variables objfile and old_chain.
	Remove following of SEPARATE_DEBUG_OBJFILE.  new_offsets is now
	allocated using alloca.
	* symfile.c (copy_section_addr_info): Remove.
	(build_section_addr_info_from_objfile): Make it global.  New variables
	addr_bit and mask, use them.
	* symfile.h (build_section_addr_info_from_objfile): New prototype.
	(copy_section_addr_info): Remove.
2010-01-09 09:11:00 +00:00
Joel Brobecker 1a3fd2625d Fix patch ownership in ChangeLog entry. 2010-01-09 05:03:34 +00:00
Joel Brobecker 6d8eadbddc Signal unwinder for mips-irix N32.
* mips-irix-tdep.c: #include mips-tdep.h, trad-frame.h, and
        tramp-frame.h.
        (SIGTRAMP_FRAME_SIZE, SIGCONTEXT_PC_OFF, SIGCONTEXT_REGS_OFF)
        (SIGCONTEXT_FPREGS_OFF, SIGCONTEXT_FPCSR_OFF, SIGCONTEXT_HI_OFF)
        (SIGCONTEXT_LO_OFF): New macros.
        (mips_irix_n32_tramp_frame_init): New function.
        (mips_irix_n32_tramp_frame): New static constant.
        (mips_irix_init_abi): Prepend the mips_irix_n32_tramp_frame unwinder.
2010-01-09 04:44:55 +00:00
Joel Brobecker 27087a3dc2 Breakpoint in shared library does not work on mips-irix.
* procfs.c: #include "observer.h".
        (procfs_inferior_created): New function, moving here the code
        which unsets the syssgi syscall-exit notifications.
        (procfs_create_inferior): Remove the code which unsets the syssgi
        syscall-exit notifications. It is too early to do this here.
        (_initialize_procfs): Attach the procfs_inferior_created observer.
2010-01-09 04:44:02 +00:00
Joel Brobecker f08877ba09 Wrong return convention for arrays (mips-irix).
* mips-tdep.c (mips_n32n64_return_value): Arrays whose size is
        128 bits or smaller are returned the same way as structs
        and unions of the the same size.
2010-01-09 04:42:54 +00:00
Joel Brobecker e4b97d48ee Cannot set the PC on mips-irix.
* irix5-nat.c (fill_gregset): Check regno against the raw PC
        register number, no the cooked one.
2010-01-09 04:41:50 +00:00
Joel Brobecker 11377e6835 Error while loading core file on mips-irix.
* solib-irix.c (irix_solib_create_inferior_hook): Do nothing
        if debugging from a core file.
2010-01-09 04:40:59 +00:00
Joel Brobecker b2391021b6 GDB hangs when attaching to process on mips-irix.
* solib-irix.c (irix_solib_create_inferior_hook): Do nothing if
        attaching to a process.
2010-01-09 04:40:02 +00:00
Joel Brobecker f2ec0ecff6 * mips-tdep.c (mips_breakpoint_from_pc): Add new static variable
containing the correct breakpoint instruction to use on mips-irix.
        Use it when the osabi is GDB_OSABI_IRIX.
2010-01-09 04:38:29 +00:00
Joel Brobecker 3c95f01cee -Wunused warning in procfs.c (mips-irix only).
* procfs.c (gdb_praddset, gdb_prdelset): New macros.  Use them
        throughout instead of using praddset and prdelset respectively.
2010-01-09 04:37:12 +00:00
Joel Brobecker 4b7703adcc GDB crash while stepping into function.
* infrun.c (handle_inferior_event): Refetch the current frame
        after handling what.main_action, in case that pointer became
        dangling.
2010-01-09 04:36:00 +00:00
Joel Brobecker 12c8947461 * ada-valprint.c, parse.c: Include defs.h before including ctype.h. 2010-01-09 04:34:35 +00:00
Joel Brobecker 4c49065043 * procfs.c: (procfs_do_thread_registers) Use elfcore_write_lwpstatus. 2010-01-09 04:32:52 +00:00
Jan Kratochvil 37aeb5df6e gdb/testsuite/
* gdb.base/corefile.exp: Move the core finding block out and call it as
	core_find, new variable $corefile, replace corefile by $corefile and
	[file tail $corefile] for usage vs. test names resp.
	* lib/gdb.exp (core_find): Move it as a new function here.  New
	parameter binfile and deletefiles.  New variable $destcore.  Pre-delete
	$destcore.  Return "" on error.
2010-01-09 00:14:11 +00:00
gdbadmin ab42223304 *** empty log message *** 2010-01-09 00:00:03 +00:00
Jan Kratochvil d521f56333 gdb/testsuite/
Workaround PR binutils/10802.
	* lib/gdb.exp (gdb_gnu_strip_debug): Preserve the file attributes
	(twice).
2010-01-08 22:59:47 +00:00
Jan Kratochvil 75242ef48d gdb/
Move some symfile code into subroutines.
	* symfile.h (relative_addr_info_to_section_offsets)
	(addr_info_make_relative): New prototypes.
	* symfile.c (default_symfile_offsets): Move a part to ...
	(relative_addr_info_to_section_offsets): ... this new function.
	(default_symfile_offsets): Call it.
	(syms_from_objfile <!mainline && addrs && addrs->other[0].name>): Move
	this part to ...
	(addr_info_make_relative): ... this new function.
2010-01-08 22:55:15 +00:00
Jan Kratochvil 268a4a75bd gdb/
Add from_tty to solib_create_inferior_hook.
	* infcmd.c (post_create_inferior): Move solib_add after
	solib_create_inferior_hook.  Pass from_tty to
	solib_create_inferior_hook.  Call solib_add and SOLIB_ADD with
	0 from_tty and comment why.
	* infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0.
	* linux-nat.c (linux_child_follow_fork): Likewise.
	* nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise.
	* solib-darwin.c (darwin_solib_create_inferior_hook): New parameter
	from_tty.
	* solib-frv.c (frv_solib_create_inferior_hook): Likewise.
	* solib-irix.c (irix_solib_create_inferior_hook): Likewise.
	* solib-null.c (null_solib_create_inferior_hook): Likewise.
	* solib-osf.c (osf_solib_create_inferior_hook): Likewise.
	* solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
	* solib-som.c (som_solib_create_inferior_hook): Likewise.
	* solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty.
	Pass it to svr4_so_ops.solib_create_inferior_hook.
	* solib-sunos.c (sunos_solib_create_inferior_hook): New parameter
	from_tty.
	* solib-svr4.c (enable_break): New parameter from_tty.  Pass it to
	solib_add.
	(svr4_solib_create_inferior_hook): New parameter from_tty.  Pass it to
	enable_break.
	* solib-target.c (solib_target_solib_create_inferior_hook): New
	parameter from_tty.
	* solib.c (solib_create_inferior_hook): New parameter from_tty.  Pass
	it to ops->solib_create_inferior_hook.
	(reload_shared_libraries): Pass from_tty to solib_create_inferior_hook.
	Move solib_add after solib_create_inferior_hook, call it now with
	from_tty as 0.  New comment there.
	* solib.h (solib_create_inferior_hook): New parameter from_tty.
	* solist.h (struct target_so_ops <solib_create_inferior_hook>):
	Likewise.
2010-01-08 22:52:04 +00:00
Daniel Jacobowitz 28f2482621 * gdb.cp/gdb2495.exp: Skip if gdb,nosignals. 2010-01-08 17:48:04 +00:00
Vladimir Prus cf00dfa7c9 Fix multiexec race.
* infrun.c (handle_inferior_event): Use get_thread_regcache
	with events ptid, not get_current_regcache.
2010-01-08 16:54:14 +00:00
Joel Brobecker f91e5ac34e GDB crash with empty executable name (MinGW).
* source.c (openp): Add assert that parameter string is not NULL.
        if parameter string is an empty string, then return with a failure
        immediately.
2010-01-08 13:54:40 +00:00
Joel Brobecker 2de75e717c * lib/gdb.exp (gdb_start_cmd): Move comment outside of gdb_expect
call, to avoid interruption.
2010-01-08 12:03:36 +00:00
Joel Brobecker fe00719b00 Fix typo in date. 2010-01-08 12:01:59 +00:00
Joel Brobecker 92b9ce5b60 Get rid of support for VAX Floats.
* ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
        (ada_vax_float_print_function): Delete.
        * ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
        (ada_vax_float_print_function): Delete.
        * ada-typeprint.c (print_vax_floating_point_type): Delete.
        (ada_print_type): Remove support for VAX floats.
        * ada-valprint.c (ada_val_print_1): Remove support for VAX floats.
2010-01-08 11:58:23 +00:00
Joel Brobecker cf000afb0d Fix typo in date. 2010-01-08 11:56:36 +00:00
Jan Kratochvil d24d854870 gdb/
* stabsread.c (read_args): Handle zero arguments.

gdb/testsuite/
	* gdb.stabs/weird.def (args93): New.
2010-01-08 08:55:16 +00:00
Joel Brobecker f0f209491f Cannot find in-tree libiconv.a after reconfigure.
* acinclude.m4 (AM_ICONV): If we find an in-tree libiconv.a
        that we can use, then cache the path to this archive.
        * configure: Regenerate.
2010-01-08 07:16:43 +00:00
gdbadmin 0edfa059ee *** empty log message *** 2010-01-08 00:00:32 +00:00
Doug Evans d0ef5df828 * lib/gdb.exp (gdb_skip_xml_test): Add comment. 2010-01-07 23:26:39 +00:00
Tom Tromey 3a08d52f28 * gdb.base/source.exp: Use correct line number. 2010-01-07 20:07:18 +00:00
Stan Shebs 35b1e5cca0 Make tracepoint operations go through target vector.
* target.h (enum trace_find_type): New enum.
	(struct target_ops): New fields to_trace_init,
	to_download_tracepoint, to_download_trace_state_variable,
	to_trace_set_readonly_regions, to_trace_start, to_get_trace_status,
	to_trace_stop, to_trace_find, to_get_trace_state_variable_value,
	to_set_disconnected_tracing.
	(target_trace_init): New macro.
	(target_download_tracepoint): New macro.
	(target_download_trace_state_variable): New macro.
	(target_trace_start): New macro.
	(target_trace_set_readonly_regions): New macro.
	(target_get_trace_status): New macro.
	(target_trace_stop): New macro.
	(target_trace_find): New macro.
	(target_get_trace_state_variable_value): New macro.
	(target_set_disconnected_tracing): New macro.
	* target.c (update_current_target): Inherit and set defaults for
	tracepoint operations.
	* tracepoint.c (default_collect): Make globally visible.
	(target_is_remote): Remove, along with all calls.
	(tvariables_info): Call target_get_trace_state_variable_value.
	(remote_set_transparent_ranges): Remove.
	(trace_start_command): Call target_trace_init,
	target_download_tracepoint, etc.
	(download_tracepoint): Remove.
	(trace_stop_command): Simplify.
	(stop_tracing): Call target_trace_stop.
	(get_trace_status): Call target_get_trace_status.
	(trace_status_command): Add case for targets that cannot trace.
	(finish_tfind_command): Change to take numerical arguments, call
	target_trace_find.
	(trace_find_command): Update call to finish_tfind_command.
	(trace_find_pc_command): Ditto.
	(trace_find_tracepoint_command): Ditto.
	(trace_find_line_command): Ditto.
	(trace_find_range_command): Ditto.
	(trace_find_outside_command): Ditto.
	(set_disconnected_tracing_value): Call
	target_set_disconnected_tracing.
	* remote.c: Add protocol encoding bits from tracepoint.c.
	(trace_error): Move from tracepoint.c.
	(remote_get_noisy_reply): Ditto.
	(free_actions_list_cleanup_wrapper): Ditto.
	(free_actions_list): Ditto.
	(remote_trace_init): New function.
	(remote_download_tracepoint): New function.
	(remote_download_trace_state_variable): New function.
	(remote_trace_set_readonly_regions): New function.
	(remote_trace_start): New function.
	(remote_get_trace_status): New function.
	(remote_trace_stop): New function.
	(remote_trace_find): New function.
	(remote_download_trace_state_variable): New function.
	(remote_set_disconnected_tracing): New function.
	(init_remote_ops): Add tracepoint operations.
2010-01-07 19:17:46 +00:00
Stan Shebs 6b6218c55a * tracepoint.c (trace_dump_command): Don't decr_pc_after_break. 2010-01-07 19:09:09 +00:00