Commit Graph

26474 Commits

Author SHA1 Message Date
gdbadmin d903301282 *** empty log message *** 2010-05-05 00:00:33 +00:00
Mark Kettenis c4f7c68703 * remote.c (register_remote_support_xml)
(remote_query_supported_append, remote_query_supported): Add cast
to NULL used as sentinel.
* tracepoint.c (tvariables_info_1): Likewise.
* utils.c (add_internal_problem_command): Likewise.
2010-05-04 21:09:25 +00:00
Matthew Gretton-Dann 63b4f126d1 * gdb/dwarf2loc.c (read_pieced_value, write_pieced_value,
dwarf2_evaluate_loc_desc): Handle not being able to access DWARF
	registers gracefully.
2010-05-04 09:54:18 +00:00
Matthew Gretton-Dann 2f1bdd26c4 * gdb/exec.c (print_section_info): Display entry point without arch
specific parts.
2010-05-04 08:47:13 +00:00
Pierre Muller e1c34c5d94 PR exp/11349.
* printcmd.c (x_command): Only dereference once implicitly for
	TYPE_CODE_REF.

testsuite dir:
	PR exp/11349.
	* testsuite/gdb.cp/ref-types.exp: Add test to examine
	use a reference local variable.
2010-05-04 06:48:27 +00:00
gdbadmin bf49180de2 *** empty log message *** 2010-05-04 00:00:32 +00:00
Doug Evans ae462839ef * event-loop.c (gdb_timer): Delete unused global.
(create_timer): Update.
2010-05-03 20:58:21 +00:00
Doug Evans 24b066ba2b * event-loop.c (struct callback_event): New struct.
(callback_list): New global.
	(append_callback_event, delete_callback_event): New functions.
	(process_callback): New function.
	(start_event_loop): Call it.
	* remote-utils.c (NOT_SCHEDULED): Define.
	(readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
	moved out of readchar.
	(readchar): Rewrite.  Call reschedule before returning.
	(reset_readchar): New function.
	(remote_close): Call it.
	(process_remaining, reschedule): New functions.
	* server.h (callback_handler_func): New typedef.
	(append_callback_event, delete_callback_event): Declare.
2010-05-03 20:53:21 +00:00
Jan Kratochvil 1ac77ea163 gdb/
* cp-namespace.c (cp_lookup_symbol_imports): Support ALIAS for the
	CURRENT->DECLARATION case.
	* cp-support.h (struct using_direct): Provide extended comment.
2010-05-03 20:10:22 +00:00
Mark Kettenis 7c54a10880 * hppaobsd-tdep.c (HPPAOBSD_SIZEOF_GREGS): Renamed from
HPPABSD_SIZEOF_GREGS.
(HPPAOBSD_SIZEOF_FPREGS): New define.
(hppaobsd_supply_gregset): Renamed from hppabsd_supply_gregset.
(hppaobsd_supply_fpregset): New function.
(hppaobsd_gregset): Renamed from hppabsd_gregset.
(hppaobsd_fpregset): New variable.
(hppaobsd_regset_from_core_section): Handle floating-point registers.
(_initialize_hppabsd_tdep): Remove spurious blank line.
2010-05-03 19:59:13 +00:00
Pedro Alves 9836d6ea69 gdb/gdbserver/
* proc-service.c (ps_pglobal_lookup): Use
	thread_db_look_up_one_symbol.
	* remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
	parameter.  Use it instead of all_symbols_looked_up.
	* server.h (struct process_info) <all_symbols_looked_up>: Delete
	field.
	(all_symbols_looked_up): Don't declare.
	(look_up_one_symbol): Add new `may_ask_gdb' parameter.
	* thread-db.c (struct thread_db) <all_symbols_looked_up>: New
	field.
	(thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
	Set all_symbols_looked_up here.
	(thread_db_look_up_one_symbol): New.
	(thread_db_get_tls_address): Adjust.
	(thread_db_load_search, try_thread_db_load_1): Always allocate the
	thread_db object on the heap, and tentatively set it in the
	process structure.
	(thread_db_init): Don't set all_symbols_looked_up here.
	* linux-low.h (thread_db_look_up_one_symbol): Declare.
2010-05-03 18:13:36 +00:00
Pierre Muller 278582cb37 PR pascal/11349.
* p-valprint.c (pascal_value_print): Always dereference a value with
	type code TYPE_CODE_REF.
2010-05-03 13:38:27 +00:00
Pedro Alves 7984d53228 * linux-low.c (linux_kill, linux_detach): Adjust.
(status_pending_p_callback): Remove redundant statement.  Check
	for !TARGET_WAITIKIND_IGNORE, instead of
	TARGET_WAITKIND_STOPPED.
	(handle_tracepoints): Make sure LWP is locked.  Adjust.
	(linux_wait_for_event_1): Adjust.
	(linux_cancel_breakpoints): New.
	(unsuspend_one_lwp): New.
	(unsuspend_all_lwps): New.
	(linux_wait_1): If finishing a step-over, unsuspend all lwps.
	(send_sigstop_callback): Change return type to int, add new
	`except' parameter and handle it.
	(suspend_and_send_sigstop_callback): New.
	(stop_all_lwps): Add new `suspend' and `expect' parameters, and
	pass them down.  If SUSPEND, also increment the lwp's suspend
	count.
	(linux_resume_one_lwp): Add notice about resuming a suspended LWP.
	(need_step_over_p): Don't consider suspended LWPs.
	(start_step_over): Adjust.
	(proceed_one_lwp): Change return type to int, add new `except'
	parameter and handle it.
	(unsuspend_and_proceed_one_lwp): New.
	(proceed_all_lwps): Use find_inferior instead of
	for_each_inferior.
	(unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
	also decrement the suspend count of LWPs.  Pass `except' down,
	instead of hacking its suspend count.
	(linux_pause_all): Add `freeze' parameter.  Adjust.
	(linux_unpause_all): New.
	(linux_target_ops): Install linux_unpause_all.
	* server.c (handle_status): Adjust.
	* target.h (struct target_ops): New fields `unpause_all' and
	`cancel_breakpoints'.  Add new parameter to `pause_all'.
	(pause_all): Add new `freeze' parameter.
	(unpause_all): New.
	(cancel_breakpoints): New.
	* tracepoint.c (clear_installed_tracepoints): Pause threads, and
	cancel breakpoints.
	(cmd_qtstart): Pause threads.
	(stop_tracing): Pause threads, and cancel breakpoints.
	* win32-low.c (win32_target_ops): Adjust.
2010-05-03 04:02:20 +00:00
Pedro Alves e471f25b4b * linux-low.c (linux_wait_for_event_1): Move passing the signal to
the inferior right away from here...
	(linux_wait_1): ... to here, and adjust to check the thread's
	last_resume_kind instead of the lwp's step or stop_expected flags.
2010-05-03 03:04:30 +00:00
Pedro Alves f022308135 * remote.c (remote_notice_signals): New.
(remote_start_remote): In non-stop mode, update the remote end on
	which signals it can silently pass.
	(init_remote_ops): Install remote_notice_signals.
2010-05-03 02:13:01 +00:00
gdbadmin 6e206f8f6f *** empty log message *** 2010-05-03 00:00:03 +00:00
Jan Kratochvil c25c4a8b0e gdb/
* cli/cli-cmds.h (error_no_arg): Remove.  Move the comment ...
	* command.h (error_no_arg): ... here.  Remove NORETURN, change
	ATTR_NORETURN to ATTRIBUTE_NORETURN.
	* defs.h (NORETURN, ATTR_NORETURN): Remove.
	(perror_with_name, verror, error, error_stream, vfatal, fatal)
	(internal_verror, internal_error, nomem): Remove NORETURN, change
	ATTR_NORETURN to ATTRIBUTE_NORETURN.
	* exceptions.c (throw_exception, deprecated_throw_reason, throw_verror)
	(throw_vfatal, throw_error): Remove NORETURN.
	(throw_it): Remove NORETURN, change ATTR_NORETURN to ATTRIBUTE_NORETURN.
	* exceptions.h (throw_exception, throw_verror, throw_vfatal)
	(throw_error, deprecated_throw_reason): Remove NORETURN, change
	ATTR_NORETURN to ATTRIBUTE_NORETURN.
	* linespec.c (cplusplus_error): Remove NORETURN, change ATTR_NORETURN
	to ATTRIBUTE_NORETURN for prototype, for the definition only remove
	NORETURN.
	* remote-mips.c (mips_error): Change NORETURN to ATTRIBUTE_NORETURN.
	* remote-sim.c (gdb_os_error): Change ATTR_NORETURN to
	ATTRIBUTE_NORETURN.
	* target.c (tcomplain): Likewise.
	* target.h (noprocess): Remove NORETURN, change ATTR_NORETURN to
	ATTRIBUTE_NORETURN.
	* utils.c (verror, error, vfatal, fatal, error_stream, internal_verror)
	(internal_error, perror_with_name, nomem): Remove NORETURN.
	* xml-support.h (gdb_xml_error): Change ATTR_NORETURN to
	ATTRIBUTE_NORETURN.

gdb/doc/
	* gdbint.texinfo (Host Definition): Remove items NORETURN and
	ATTR_NORETURN.
2010-05-02 23:52:14 +00:00
Jan Kratochvil a0b31db1be gdb/
* ada-lang.c (lim_warning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
	* amd64-tdep.c (amd64_insn_length_fprintf): Likewise.
	* cli-out.c (cli_field_fmt): New ATTRIBUTE_PRINTF.
	(cli_message, out_field_fmt): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
	* complaints.c (find_complaint): New ATTRIBUTE_PRINTF.
	(vcomplaint): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
	* complaints.h (complaint, internal_complaint): Likewise.
	* defs.h: Change ATTR_FORMAT to ATTRIBUTE_PRINTF in the top comment.
	(ATTR_FORMAT): Remove.
	(query, nquery, yquery, vprintf_filtered, vfprintf_filtered)
	(fprintf_filtered, fprintfi_filtered, printf_filtered, printfi_filtered)
	(vprintf_unfiltered, vfprintf_unfiltered, fprintf_unfiltered)
	(printf_unfiltered, xasprintf, xvasprintf, xstrprintf, xstrvprintf)
	(xsnprintf, verror, error, vfatal, fatal, internal_verror)
	(internal_error, internal_vwarning, internal_warning, warning)
	(vwarning): Change ATTR_FORMAT to ATTRIBUTE_PRINTF.
	* disasm.c (fprintf_disasm): Likewise.
	* exceptions.c (throw_it): Likewise.
	* exceptions.h (exception_fprintf, throw_verror, throw_vfatal)
	(throw_error): Likewise.
	* language.h (type_error, range_error): Likewise.
	* linespec.c (cplusplus_error): Likewise.
	* mi/mi-interp.c (mi_interp_query_hook): Likewise.
	* mi/mi-out.c (mi_field_fmt, mi_message): Likewise.
	* monitor.c (monitor_debug): Likewise.
	* parser-defs.h (parser_fprintf): Likewise.
	* serial.h (serial_printf): Likewise.
	* tui/tui-hooks.c (tui_query_hook): Likewise.
	* ui-out.c (default_field_fmt, default_message, uo_field_fmt)
	(uo_message): Likewise.
	* ui-out.h (ui_out_field_fmt, ui_out_message): Likewise.
	* utils.c (vfprintf_maybe_filtered, internal_vproblem, defaulted_query):
	Likewise.
	* xml-support.h (gdb_xml_debug, gdb_xml_error): Likewise.
2010-05-02 21:14:59 +00:00
Pedro Alves 02a45ac028 * cli-out.c (cli_table_begin, cli_table_body, cli_table_end)
(cli_table_header, cli_begin, cli_end, cli_field_int)
	(cli_field_skip, cli_field_string, cli_field_fmt, cli_spaces)
	(cli_text, cli_message, cli_wrap_hint, cli_flush, cli_redirect):
	Delete forward declarations.
	(cli_ui_out_impl): Move below the callbacks.
	(_initialize_cli_out): Delete.
2010-05-02 16:50:02 +00:00
Pedro Alves 1915ef4f3a gdb/
* README: Use consistent `GDB' and `GDBserver' spellings.

	gdb/gdbserver/
	* README: Use consistent `GDB' and `GDBserver' spellings.
2010-05-02 16:10:03 +00:00
Jan Kratochvil 0dfb946f50 gdb/
* cli/cli-dump.h (parse_and_eval_with_error): Remove the declaration.
2010-05-02 09:13:35 +00:00
Jan Kratochvil 8e1d0c49c1 gdb/testsuite/
* gdb.base/break-interp.exp: Remove $exec.debug safety removal.
	* gdb.base/sepdebug.exp: Remove .debug subdirectory handling.  New
	variable different_dir. Move debugfile into a full directory pathname
	under DIFFERENT_DIR.
	* lib/gdb.exp (separate_debug_filename): Remove.
	(gdb_gnu_strip_debug): No longer call separate_debug_filename.  Remove
	variable debug_dir and mkdir of it.  Update function comments.
2010-05-02 09:08:59 +00:00
Pedro Alves f9e39928dc * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
(linux_kill): Stop all lwps here.  Don't delete the main lwp here.
	(linux_detach_one_lwp): Assume the lwp is stopped.
	(any_thread_of): Delete.
	(linux_detach): Stop all lwps here.  Don't blindly delete all
	breakpoints.
	(delete_lwp_callback): New.
	(linux_mourn): Delete all lwps of the process that is gone.
	(linux_wait_1): Don't delete the last lwp of the process here.
	* mem-break.h (mark_breakpoints_out): Declare.
	* mem-break.c (mark_breakpoints_out): New.
	(free_all_breakpoints): Use it.
	* server.c (handle_target_event): If the process is gone, mark
	breakpoints out.
	* thread-db.c (struct thread_db) <create_bp>: New field.
	(thread_db_enable_reporting): Fix prototype.  Store a thread event
	breakpoint reference in the thread_db struct.
	(thread_db_load_search): Clear the thread_db object.
	(try_thread_db_load_1): Ditto.
	(switch_to_process): New.
	(disable_thread_event_reporting): Use it.
	(remove_thread_event_breakpoints): New.
	(thread_db_detach, thread_db_mourn): Use it.
2010-05-02 00:47:34 +00:00
gdbadmin 9dbc5bd275 *** empty log message *** 2010-05-02 00:00:33 +00:00
Pedro Alves 4d53310308 * infrun.c (prepare_for_detach): In non-stop, context switch to
the thread that got the event before handling the event.
2010-05-01 15:56:52 +00:00
Pedro Alves 1e7fc18c9c * linux-low.c (linux_enable_event_reporting): New.
(linux_wait_for_event_1, handle_extended_wait): Use it.
2010-05-01 15:46:26 +00:00
gdbadmin f11b36d6c5 *** empty log message *** 2010-05-01 00:00:03 +00:00
Pedro Alves 02fc4de7fc * linux-low.c (linux_kill_one_lwp, linux_kill)
(linux_detach_one_lwp): Adjust to send_sigstop interface change.
	(send_sigstop): Take an lwp_info as parameter instead.  Queue a
	SIGSTOP even if the LWP is stopped.
	(send_sigstop_callback): New.
	(stop_all_lwps): Use send_sigstop_callback instead.
	(linux_resume_one_thread): Adjust.
	(proceed_one_lwp): Still proceed an LWP that the client has
	requested to stop, if we haven't reported it as stopped yet.  Make
	sure that LWPs the client want stopped, have a pending SIGSTOP.
2010-04-30 21:36:45 +00:00
Tom Tromey 705b5767b7 * symtab.c (symbol_set_names): Fix typo. 2010-04-30 17:43:55 +00:00
Pierre Muller 3c0ee1a464 * python/py-param.c (parm_constants): Avoid ARI warning
by adding ARI comment.
	(parmpy_init): Likewise.
2010-04-30 16:22:42 +00:00
Pierre Muller ea1fae46d8 * windows-tdep.c (windows_get_tlb_type): Remember last GDBARCH
and created type for re-use.
2010-04-30 15:38:42 +00:00
Pierre Muller c24d024232 * NEWS: Mention gdbserver support for x86_64 Windows 64-bit. 2010-04-30 07:04:52 +00:00
gdbadmin f3c08bc4d1 *** empty log message *** 2010-04-30 00:00:33 +00:00
Doug Evans a26d8d1160 * ser-base.h (reschedule): Delete prototype.
* ser-base.c (reschedule): Make static.
2010-04-29 22:51:04 +00:00
Matthew Gretton-Dann f8624c62cc *** empty log message *** 2010-04-29 16:34:25 +00:00
Pedro Alves e66408edfd PR gdb/11557
gdb/
	* regcache.c (registers_changed): Rename to ...
	(registers_changed_ptid): ... this, and only delete register cache
	entries matching the ptid filter argument.
	(registers_changed): Reimplement on top of registers_changed_ptid.
	* regcache.h (registers_changed_ptid): Declare.
	* target.c (target_resume): Flush register caches.

	gdb/testsuite/
	* gdb.mi/mi-ns-stale-regcache.exp, gdb.mi/ns-stale-regcache.c: New
	files.
2010-04-29 16:33:16 +00:00
Joel Brobecker b2319725b8 Fix typo in ChangeLog name (non-UTF8 character).
Seems to have been inserted accidently.
2010-04-29 16:03:32 +00:00
Phil Muldoon d7b32ed3ab 2010-04-29 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey  <tromey@redhat.com>
            Thiago Jung Bauermann  <bauerman@br.ibm.com>

       	* Makefile.in (SUBDIR_PYTHON_OBS): Add py-parameter.
        (SUBDIR_PYTHON_SRCS): Likewise.
       	(py-parameter.o): New rule.
       	* python/py-parameter.c: New file.
        * python/python-internal.h (gdbpy_initialize_parameter)
        (gdbpy_parameter, gdbpy_parameter_value)
        (gdbpy_parse_command_name): Declare.
        * python/py-cmd.c (parse_command_name): Rename to
       	gdbpy_parse_command_name.
        (gdbpy_parse_command_name): Accept a starting list parameter and
       	use over cmdlist.
       	(cmdpy_init): Use gdbpy_parse_command_name.
        * python/python.c (parameter_to_python): Rename to
        gdbpy_parameter_to_python.  Accept enum var_types and value.
        (gdbpy_parameter): Use gdbpy_parameter_value.
        (_initialize_python): Call gdbpy_initialize_parameters.

2010-04-29  Phil Muldoon  <pmuldoon@redhat.com>

        * gdb.python/py-param.exp: New File.

2010-04-29  Phil Muldoon  <pmuldoon@redhat.com>
            Tom Tromey  <tromey@redhat.com>
            Thiago Jung Bauermann  <bauerman@br.ibm.com>

        * gdb.texinfo (Parameters In Python): New Node.
2010-04-29 15:45:57 +00:00
Matthew Gretton-Dann ce72ce4139 * gdb/MAINTAINERS: Add myself for write after approval privileges. 2010-04-29 14:55:38 +00:00
Joel Brobecker 6aecb9c228 D language support.
gdb/ChangeLog:

        D language support.
        * Makefile.in (SFILES): Add d-lang.c d-valprint.c.
        (COMMON_OBS): Add d-lang.o d-valprint.o.
        (HFILES_NO_SRCDIR): Add d-lang.h.
        * NEWS: Mention D language support.
        * c-lang.c (c_emit_char, exp_descriptor_c): Make public.
        * c-lang.h (c_emit_char, exp_descriptor_c): Add declaration.
        * d-lang.c: New file.
        * d-lang.h: New file.
        * d-valprint.c: New file.
        * defs.h (enum language): Add language_d.
        * dwarf2read.c (set_cu_language): Add DW_LANG_D.
        * language.c (binop_result_type, integral_type, character_type)
        (string_type, boolean_type, structured_type): Add language_d.
        * symfile.c (init_filename_language_table): Add language_d.
        * symtab.c: Include d-lang.h.
        (symbol_init_language_specific, symbol_find_demangled_name)
        (symbol_natural_name, lookup_symbol_in_language)
        (symbol_demangled_name, symbol_matches_domain): Add language_d.

gdb/doc/ChangeLog:

        * gdb.texinfo: (Summary) Add mention about D language support.
        (Filenames): Add D suffixes.
        (D): New node.

gdb/testsuite/ChangeLog:

        * gdb.base/default.exp: Fix "set language" test.
2010-04-29 14:45:39 +00:00
gdbadmin c0643a5132 *** empty log message *** 2010-04-29 00:00:09 +00:00
gdbadmin ad65aa6576 *** empty log message *** 2010-04-28 00:00:33 +00:00
Joel Brobecker 67f1675e78 Fix author list for one of the patches.
I was the committer, not the author.
2010-04-27 21:06:28 +00:00
Joel Brobecker 6f992fbf7f Expand description of solib-svr4.c:solib_svr4_r_map
2010-04-27  Joel Brobecker  <brobecker@adacore.com>

        * solib-svr4.c (solib_svr4_r_map): Expand function description.
2010-04-27 21:02:11 +00:00
Joel Brobecker dde5918526 Associate .dg files to Ada
The .dg files are files containing the user's code, after the GNAT
expander was applied.  The expansion replaces some of the complex
features by simpler pseudo-Ada code and the user can ask to see and
debug that code using the -gnatDG option...

For instance, given the following code where Circle is a tagged type
(aka as a class type in C++):

    procedure Foo is
       My_Shape : Circle := (X => 1, Y => 2, R => 3);
       X : Integer;
    begin
       X := Position_X (My_Shape);
    end Foo;

The expansion results in:

    procedure foo is
       my_shape : pck__circle := (
          _parent => (
             _tag => pck__circleP,
             x => 1,
             y => 2),
          r => 3);
       x : integer;
    begin
       x := pck__position_x (my_shape);
       return;
    end foo;

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

        * symfile.c (init_filename_language_table): Register .dg files
        with language_ada.
2010-04-27 21:01:57 +00:00
Joel Brobecker d09ce91e4f Document special use of target_type field in Ada structs.
This is a comment that I wrote not too long ago, I believe, as part
of a submission process, and somehow did not get to commit.  It explains
how the TYPE_TARGET_TYPE is used by Ada in the case of dynamic records/
unions.

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

        * gdbtypes.h (struct main_type): Expand comment about target_type
        field.
2010-04-27 21:01:45 +00:00
Joel Brobecker 02aeec7bde Check library name rather than member name when rereading symbols.
On Darwin, we have lots of complaints being emitted when restarting
a program:

    (gdb) start
    `a-except.o' has disappeared; keeping its symbols.
    `unwind-dw2.o' has disappeared; keeping its symbols.
    `s-except.o' has disappeared; keeping its symbols.
    `s-traceb.o' has disappeared; keeping its symbols.

These object files are part of the GNAT runtime, and were never available.
The warning comes from the fact that we're checking whether the .o files
in the GNAT shared runtime have changed whereas we should be checking
whether the GNAT shared library itself has changed.

This patch implements this.  Although it is really only useful on a platform
such as Darwin (debug info stored in .o files), we believe that this is
the right thing to do in general.  This change should be a noop for all
the other platforms in any case.

gdb/ChangeLog (from Tristan Gingold & Pedro Alves):

        * symfile.c (reread_symbols): Also search for file in libraries.
        Update comment.

Tested on x86_64-darwin and x86_64-linux.
2010-04-27 21:01:30 +00:00
Joel Brobecker dfd0fe27e3 Add support for x86-lynxos cross debugger (as bareboard x86).
This is a fairly simple patch that we have had for a while.  LynxOS has
relatively few features, from a GDB perspective, and we've been using
a bareboard x86 debugger as our LynxOS cross-debugger.  So here is a patch
that make x86-lynxos an alias of bareboard x86.

On the other end of things, I'm still working on gdbserver support
for LynxOS - I'm just lacking the time to make significant progress.
But this is in the works (in the meantime, we're using gdbserver from
gdb-6.8 which is derived work from LinuxWorks' patch).

I wasn't sure whether this would be interesting or not for the FSF tree,
but since it's simple and unintrusive, I am suggesting it now... Any
objection?  I wasn't sure whether it warranted a NEWS entry either, since
it doesn't really add a new port, just an alias.  I suggest the NEWS entry
when I'm finally done with the gdbserver port.

gdb/ChangeLog:

        * configure.tgt: Treat x86-lynxos targets as x86 bareboard targets
        in terms of configuration.
2010-04-27 21:01:14 +00:00
Jan Kratochvil 0133421afd gdb/
* objfiles.c: Include solist.h.
	(free_all_objfiles): New variable so.  Check stale solist objfiles.
	* symfile.c (symbol_file_clear): Swap the order of free_all_objfiles
	and no_shared_libraries.
2010-04-27 20:07:01 +00:00
Joel Brobecker e78f4312c5 ARI warning fix.
* python/py-auto-load.c (source_section_scripts): Remove trailing
        new-line in i18n string.
2010-04-27 16:36:02 +00:00
gdbadmin 7ce0d9b1ff *** empty log message *** 2010-04-27 00:00:33 +00:00
Doug Evans ae1ada354c * server.c (handle_general_set): Make static. 2010-04-26 22:02:33 +00:00
Doug Evans 9214d3714a * serial.c (serial_write): Handle serial_debug_p akin to serial_read. 2010-04-26 21:45:50 +00:00
Pierre Muller bdf92a1c03 PR breakpoints/11531.
* gdb.base/gdb11531.c: New file.
	* gdb.base/gdb11531.exp: New file.
2010-04-26 20:49:28 +00:00
Tom Tromey 3f172e2492 gdb
* cli/cli-decode.c (complete_on_cmdlist): Make two passes over the
	command list.
gdb/testsuite
	* gdb.base/completion.exp: Add tests for completion and deprecated
	commands.
2010-04-26 18:37:14 +00:00
Doug Evans bc3b5632dc * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
Print received char after testing for error/eof instead of before.
	(input_interrupt): Tweak comment.
2010-04-26 17:38:07 +00:00
Jan Kratochvil 64af4c92f8 gdb/testsuite/
* gdb.pascal/gdb11492.exp (print integer_array, print /d char_array)
	(print /x char_array): Escape curly brackets.
2010-04-26 15:49:11 +00:00
Pierre Muller 8856258259 *Fix ChangeLog entry 2010-04-26 13:58:42 +00:00
Pierre Muller e790e06ecb Removal of config/i386/nm-i386sol2.h native configuration file.
* config/i386/nm-i386sol2.h: Remove file.
	* config/i386/i386sol2.mh: Remove NAT_FILE definition.
	* config/i386/sol2-64.mh: Idem.
	* config/djgpp/fnchange.lst: Idem.
	* Makefile.in (HFILES_NO_SRCDIR): Remove reference to that file.
2010-04-26 13:53:57 +00:00
Pierre Muller b7da9e9f5f PR breakpoints/11531.
* config/i386/nm-i386sol2.h (CANNOT_STEP_HW_WATCHPOINTS): Remove
	macro definition and related comment.
	* infrun.c (CANNOT_STEP_HW_WATCHPOINTS): Remove macro.
	(resume): Remove code and comment related to this macro.

doc ChangeLog entry:
	* gdbint.texinfo (CANNOT_STEP_HW_WATCHPOINTS): Remove explanation
	of macro deleted from GDB code.
2010-04-26 12:01:44 +00:00
Jan Kratochvil 72f6eb52ad gdb/
* cp-namespace.c (cp_lookup_symbol_in_namespace): Fix alloca size.
	Fix whitespace.
2010-04-26 09:30:10 +00:00
gdbadmin 8092910b63 *** empty log message *** 2010-04-26 00:00:33 +00:00
gdbadmin 9b59671e9c *** empty log message *** 2010-04-25 00:00:36 +00:00
Pedro Alves ab38a727c9 * defs.h: Adjust comment.
* filesystem.h, filesystem.c: New files.
	* Makefile.in (SFILES): Add filesystem.c.
	(COMMON_OBS): Add filesystem.o.
	* solib.c (solib_find): Handle DOS-based filesystems.  Handle
	different target and host path flavours.
	* arm-symbian-tdep.c (arm_symbian_init_abi): Set
	has_dos_based_file_system on the gdbarch.
	* arm-wince-tdep.c (arm_wince_init_abi): Ditto.
	* i386-cygwin-tdep.c (i386_cygwin_init_abi): Ditto.
	* i386-tdep.c (i386_go32_init_abi): Ditto.
	* gdbarch.sh (has_dos_based_file_system): New.
	* gdbarch.h, gdbarch.c: Regenerate.
	* NEWS: Mention improved support for remote targets with DOS-based
	filesystems.  Mention new `set/show target-file-system-kind'
	commands.

	gdb/doc/
	* gdb.texinfo (Commands to specify files): Describe what how GDB
	looks up DOS-based filesystem paths on the system root.  Document
	the new `set/show target-file-system-kind' commands.
2010-04-24 13:12:56 +00:00
Doug Evans 6573024339 * server.c (start_inferior): Print inferior argv if --debug. 2010-04-24 00:58:43 +00:00
gdbadmin 9c6da39a2e *** empty log message *** 2010-04-24 00:00:05 +00:00
Stan Shebs 35c9c7ba77 2010-04-23 Stan Shebs <stan@codesourcery.com>
* ax.h (struct agent_expr): Merge in agent_reqs fields, add some
	comments.
	(struct agent_reqs): Remove.
	(ax_reg_mask): Declare.
	* ax-general.c (new_agent_expr): Add gdbarch argument, set new fields.
	(free_agent_expr): Free reg_mask.
	(ax_print): Add scope and register mask info.
	(ax_reqs): Remove agent_reqs argument, use agent expression
	fields, and move part of register mask computation to...
	(ax_reg_mask): New function.
	* ax-gdb.c (gen_trace_static_fields): Call it.
	(gen_traced_pop): Ditto.
	(is_nontrivial_conversion): Add dummy gdbarch to new_agent_expr.
	(gen_trace_for_var): Pass gdbarch to new_agent_expr.
	(gen_trace_for_expr): Ditto, and clear optimized_out flag.
	(gen_eval_for_expr): Ditto, and require an rvalue.
	(agent_command): Call ax_reqs.
	(agent_eval_command): Ditto.
	* tracepoint.c (report_agent_reqs_errors): Use agent expression fields.
	(validate_action_line): Ditto.
	(collect_symbol): Ditto.
	(encode_actions_1): Ditto.
2010-04-23 23:51:05 +00:00
Jan Kratochvil 492928e407 gdb/
Fix deadlock on looped list of loaded shared objects.
	* solib-svr4.c (LM_PREV): New function.
	(IGNORE_FIRST_LINK_MAP_ENTRY): Use it.
	(svr4_current_sos): Check for correct l_prev.  New variables prev_lm
	and next_lm.  Clear prev_lm for solib_svr4_r_ldsomap.
	* config/djgpp/fnchange.lst: Add translation for solib-corrupted.exp.

gdb/testsuite/
	Fix deadlock on looped list of loaded shared objects.
	* gdb.base/solib-corrupted.exp: New.
2010-04-23 21:44:20 +00:00
Doug Evans 88a1906b0d * configure.ac (CONFIG_SRCS): Add py-auto-load.o even if not using
python.
	* configure: Regenerate.
	* main.c: #include "python/python.h".
	(captured_main): Defer loading auto-loaded scripts until after
	local_gdbinit has been sourced.
	* python/py-auto-load.c (gdbpy_global_auto_load): New global.
	(load_auto_scripts_for_objfile): New function.
	(auto_load_new_objfile): Call it.
	* python/python.h (gdbpy_global_auto_load): Declare.
	(load_auto_scripts_for_objfile): Declare.
2010-04-23 18:09:16 +00:00
Doug Evans 66d0954266 Add support for auto-loading scripts from .debug_gdb_scripts section.
* NEWS: Add entry for .debug_gdb_scripts.
	* Makefile.in SUBDIR_PYTHON_OBS): Add py-auto-load.o.
	(SUBDIR_PYTHON_SRCS): Add py-auto-load.c.
	(py-auto-load.o): New rule.
	* cli/cli-cmds.c (find_and_open_script): Make externally visible.
	* cli/cli-cmds.h (find_and_open_script): Update prototype.
	* python/py-auto-load.c: New file.
	* python/python-internal.h: #include <stdio.h>.
	(set_python_list, show_python_list): Declare.
	(gdbpy_initialize_auto_load): Declare.
	(source_python_script_for_objfile): Declare.
	* python/python.c: Remove #include of observer.h.
	(gdbpy_auto_load): Moved to py-auto-load.c.
	(GDBPY_AUTO_FILENAME): Ditto.
	(gdbpy_new_objfile): Delete.
	(source_python_script_for_objfile): New function.
	(set_python_list, show_python_list): Make externally visible.
	(_initialize_python): Move "auto-load" command to py-auto-load.c
	and observer_attach_new_objfile to py-auto-load.c.

	doc/
	* gdb.texinfo (Python): Move Auto-loading section here ...
	(Python API): from here.
	(Auto-loading): Add docs for .debug_gdb_scripts auto-loaded scripts.
	(Maintenance Commands): Add docs for "maint print section-scripts".

	testsuite/
	* gdb.python/py-section-script.c: New file.
	* gdb.python/py-section-script.exp: New file.
	* gdb.python/py-section-script.py: New file.
2010-04-23 18:03:31 +00:00
Doug Evans 8a1ea21f7e Add support for auto-loading scripts from .debug_gdb_scripts section.
* NEWS: Add entry for .debug_gdb_scripts.
	* Makefile.in SUBDIR_PYTHON_OBS): Add py-auto-load.o.
	(SUBDIR_PYTHON_SRCS): Add py-auto-load.c.
	(py-auto-load.o): New rule.
	* cli/cli-cmds.c (find_and_open_script): Make externally visible.
	* cli/cli-cmds.h (find_and_open_script): Update prototype.
	* python/py-auto-load.c: New file.
	* python/python-internal.h: #include <stdio.h>.
	(set_python_list, show_python_list): Declare.
	(gdbpy_initialize_auto_load): Declare.
	(source_python_script_for_objfile): Declare.
	* python/python.c: Remove #include of observer.h.
	(gdbpy_auto_load): Moved to py-auto-load.c.
	(GDBPY_AUTO_FILENAME): Ditto.
	(gdbpy_new_objfile): Delete.
	(source_python_script_for_objfile): New function.
	(set_python_list, show_python_list): Make externally visible.
	(_initialize_python): Move "auto-load" command to py-auto-load.c
	and observer_attach_new_objfile to py-auto-load.c.

	doc/
	* gdb.texinfo (Python): Move Auto-loading section here ...
	(Python API): from here.
	(Auto-loading): Add docs for .debug_gdb_scripts auto-loaded scripts.
	(Maintenance Commands): Add docs for "maint print section-scripts".

	testsuite/
	* gdb.python/py-section-script.c: New file.
	* gdb.python/py-section-script.exp: New file.
	* gdb.python/py-section-script.py: New file.
2010-04-23 16:20:13 +00:00
Jerome Guitton 3a48e6ff66 * alpha-tdep.c (INSN_OPCODE, MEM_RA, MEM_RB, MEM_DISP, BR_RA)
(OPR_FUNCTION, OPR_HAS_IMMEDIATE, OPR_RA, OPR_RC, OPR_LIT): New macros.
	(lda_opcode, stq_opcode, bne_opcode, subq_opcode, subq_function):
	New constants.
	(alpha_heuristic_analyze_probing_loop): New function.
	(alpha_heuristic_frame_unwind_cache): In the prologue analysis, detect
	and handle cases when a stack probe loop is generated.
	* alpha-mdebug-tdep.c (alpha_mdebug_frameless): New function.
	(alpha_mdebug_max_frame_size_exceeded): New function.
	(alpha_mdebug_after_prologue): Use alpha_mdebug_frameless.
	(alpha_mdebug_frame_sniffer, alpha_mdebug_frame_base_sniffer):
	Return 0 when the maximum debuggable frame size has been exceeded.
2010-04-23 15:14:22 +00:00
Joel Brobecker e4166a49ea Fix ARI warning.
* ppc-linux-nat.c (booke_cmp_hw_point): Do not mark inline.
2010-04-23 12:36:05 +00:00
Chris Moller 8bd10a10b3 PR 10179
* symtab.c (rbreak_command): Added code to include a filename
specification in the rbreak argument.
* NEWS: Added a brief description of filename-qualified rbreak.
* gdb.base/Makefile.in (EXECUTABLES): Added pr10179.
* gdb.base/pr10179-a.c:
* gdb.base/pr10179-b.c:
* gdb.base/pr10179.exp: New files.
* gdb.texinfo (Setting Breakpoints): Added description of
filename-qualified rbreak.
* refcard.tex (Breakpoints and Watchpoints): Added brief
description of filename-qualified rbreak.
2010-04-23 12:08:07 +00:00
gdbadmin 496ddd4f6a *** empty log message *** 2010-04-23 00:00:33 +00:00
Jan Kratochvil c0201579c8 gdb/
Fix crashes on dangling display expressions.
	* ada-lang.c (ada_operator_check): New function.
	(ada_exp_descriptor): Fill-in the field operator_check.
	* c-lang.c (exp_descriptor_c): Fill-in the field operator_check.
	* jv-lang.c (exp_descriptor_java): Likewise.
	* m2-lang.c (exp_descriptor_modula2): Likewise.
	* scm-lang.c (exp_descriptor_scm): Likewise.
	* parse.c (exp_descriptor_standard): Likewise.
	(operator_check_standard): New function.
	(exp_iterate, exp_uses_objfile_iter, exp_uses_objfile): New functions.
	* parser-defs.h (struct exp_descriptor): New field operator_check.
	(operator_check_standard, exp_uses_objfile): New declarations.
	* printcmd.c: Remove the inclusion of solib.h.
	(display_uses_solib_p): Remove the function.
	(clear_dangling_display_expressions): Call lookup_objfile_from_block
	and exp_uses_objfile instead of display_uses_solib_p.
	* solist.h (struct so_list) <objfile>: New comment.
	* symtab.c (lookup_objfile_from_block): Remove the static qualifier.
	* symtab.h (lookup_objfile_from_block): New declaration.
	(struct general_symbol_info) <obj_section>: Extend the comment.

gdb/testsuite/
	Fix crashes on dangling display expressions.
	* gdb.base/solib-display.exp: Call gdb_gnu_strip_debug if LIBSEPDEBUG
	is SEP.
	(lib_flags): Remove the "debug" keyword.
	(libsepdebug): New variable for iterating new loop.
	(save_pf_prefix): New variable wrapping the loop.
	(sep_lib_flags): New variable derived from LIB_FLAGS.  Use it.
	* lib/gdb.exp (gdb_gnu_strip_debug): Document the return code.
2010-04-22 23:15:43 +00:00
Pierre Muller 793b0ff8d7 * gdb.threads/watchthreads.exp: Change to obtain consistent output. 2010-04-22 22:29:01 +00:00
Thiago Jung Bauermann 6ffbb7abe4 2010-04-22 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* ppc-linux-nat.c (PTRACE_GET_DEBUGREG): Update comment.
	(PPC_PTRACE_GETWDBGINFO, PPC_PTRACE_SETHWDEBUG, PPC_PTRACE_DELHWDEBUG,
	ppc_debug_info, PPC_DEBUG_FEATURE_INSN_BP_RANGE,
	PPC_DEBUG_FEATURE_INSN_BP_MASK, PPC_DEBUG_FEATURE_DATA_BP_RANGE,
	PPC_DEBUG_FEATURE_DATA_BP_MASK, ppc_hw_breakpoint,
	PPC_BREAKPOINT_TRIGGER_EXECUTE, PPC_BREAKPOINT_TRIGGER READ,
	PPC_BREAKPOINT_TRIGGER_WRITE, PPC_BREAKPOINT_TRIGGER_RW,
	PPC_BREAKPOINT_MODE_EXACT PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE,
	PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE, PPC_BREAKPOINT_MODE_MASK,
	PPC_BREAKPOINT_CONDITION_NONE, PPC_BREAKPOINT_CONDITION_AND,
	PPC_BREAKPOINT_CONDITION_EXACT, PPC_BREAKPOINT_CONDITION_OR,
	PPC_BREAKPOINT_CONDITION_AND_OR, PPC_BREAKPOINT_CONDITION_BE_ALL,
	PPC_BREAKPOINT_CONDITION_BE_SHIFT, PPC_BREAKPOINT_CONDITION_BE):
	Define, in case <ptrace.h> doesn't provide it.
	(booke_debug_info): New variable.
	(max_slots_number): Ditto.
	(hw_break_tuple): New struct.
	(thread_points): Ditto.
	(ppc_threads): New variable.
	(PPC_DEBUG_CURRENT_VERSION): New define.
	(have_ptrace_new_debug_booke): New function.
	(ppc_linux_check_watch_resources): Renamed to ...
	(ppc_linux_can_use_hw_breakpoint): ... this.  Handle BookE processors.
	(ppc_linux_region_ok_for_hw_watchpoint): Handle BookE processors.
	(booke_cmp_hw_point): New function.
	(booke_find_thread_points_by_tid): Ditto.
	(booke_insert_point): Ditto.
	(booke_remove_point): Ditto.
	(ppc_linux_insert_hw_breakpoint): Ditto.
	(ppc_linux_remove_hw_breakpoint): Ditto.
	(get_trigger_type): Ditto.
	(ppc_linux_insert_watchpoint): Handle BookE processors.
	(ppc_linux_remove_watchpoint): Ditto.
	(ppc_linux_new_thread): Ditto.
	(ppc_linux_thread_exit): New function..
	(ppc_linux_stopped_data_address): Handle BookE processors.
	(ppc_linux_watchpoint_addr_within_range): Ditto.
	(_initialize_ppc_linux_nat): Initialize to_insert_hw_breakpoint and
	to_remove_hw_breakpoint fields of the target operations struct.
	Add observe for the thread_exit event.
2010-04-22 22:26:36 +00:00
H.J. Lu 758afad7fa Reformat. 2010-04-22 20:42:04 +00:00
H.J. Lu be0d295484 Remove regmap from i386-linux-nat.c.
2010-04-22  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-linux-nat.c (regmap): Removed.
	(fetch_register): Replace regmap with
	i386_linux_gregset_reg_offset.
	(store_register): Likewise.
	(supply_gregset): Likewise.
	(fill_gregset): Likewise.

	* i386-linux-tdep.c (i386_linux_gregset_reg_offset): Make it
	global.

	* i386-linux-tdep.h (i386_linux_gregset_reg_offset): New.
2010-04-22 20:35:28 +00:00
Chris Moller f56dcb8879 * cp-valprint.c (cp_print_value_fields): Replaced obstack_base()
method of popping recursion-detection stack with a method based on
obstack_object_size().  (Similar to the PR9167 patch below, but for
the static array obstack rather than the static member obstack.)
2010-04-22 20:12:07 +00:00
H.J. Lu 6cd6a2aec6 Remove amd64_linux_gregset64_reg_offset.
2010-04-22  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-linux-nat.c (amd64_linux_gregset64_reg_offset): Removed.
	(_initialize_amd64_linux_nat): Replace
	amd64_linux_gregset64_reg_offset with
	amd64_linux_gregset_reg_offset.

	* amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Make it
	global.

	* amd64-tdep.h (amd64_linux_gregset_reg_offset): New.
2010-04-22 20:02:55 +00:00
Jan Kratochvil 4c37440995 gdb/doc/
* gdb.texinfo (Data): New @menu reference to Pretty Printing.
	(Python API): Change the reference to Pretty Printing API.
	(Pretty Printing): Move the user part under the Data node.  Reformat
	the sample output to 72 columns.  Create a new reference to Pretty
	Printing API.  Rename the API part ...
	(Pretty Printing API): To a new node name.
	(Selecting Pretty-Printers, Progspaces In Python, Objfiles In Python)
	(GDB/MI Variable Objects): Change references to Pretty Printing API.
2010-04-22 16:32:43 +00:00
Pierre Muller 097f51f74b PR stabs/11479.
* gdb.stabs/gdb11479.exp: New file.
	* gdb.stabs/gdb11479.c: New file.
2010-04-22 13:37:18 +00:00
Pierre Muller 9e69f3b65a * Remove unwanted space in set_length_in_type_chain parameterdeclaration 2010-04-22 12:34:24 +00:00
Pierre Muller 621791b854 PR stabs/11479.
* stabsread.c (set_length_in_type_chain): New function.
	(read_struct_type): Call set_length_in_type_chain function.
	(read_enum_type): Idem.
2010-04-22 12:30:55 +00:00
Stan Shebs 105c2d85f7 2010-04-21 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell  <nathan@codesourcery.com>

	* tracepoint.c (trace_save): Open in binary mode.
2010-04-22 04:14:15 +00:00
Stan Shebs 5a9351aeae 2010-04-21 Stan Shebs <stan@codesourcery.com>
* gdb.texinfo (Tracepoint Actions): Mention synonymy of actions
 	and commands.
	(Listing Tracepoints): Update to reflect current behavior.
2010-04-22 04:09:25 +00:00
gdbadmin cbc085687d *** empty log message *** 2010-04-22 00:00:35 +00:00
Pierre Muller 9a22f0d0ae gdb ChangeLog
* gdbtypes.h (builtin_type): Add builtin_char16 and builtin_char32
	fields.
	* gdbtypes.c (gdbtypes_post_init): Set builtin_char16 and
	builtin_char32 fields.
	* printcmd.c (decode_format): Set char size to '\0'
	for strings unless explicit size is given.
	(print_formatted): Correct calculation of NEXT_ADDRESS
	for 16 or 32 bit strings.
	(do_examine): Do not force byte size for strings.
	Use builtin_char16 and builtin_char32 types to display
	16 or 32 bit-wide strings.
	(x_command): Set LAST_SIZE to 'b' for string type.

gdb/doc ChangeLog

      * gdb.texinfo (Examining memory): Update for
	change in string display with explicit size.

gdb/testsuite ChangeLog

	* gdb.base/charset.c (Strin16, String32): New variables.
	* gdb.base/charset.exp (gdb_test): Test correct display
	of 16 or 32 bit strings.
2010-04-21 23:21:04 +00:00
H.J. Lu 32d7376d07 Reformat. 2010-04-21 20:23:03 +00:00
H.J. Lu f335d1b395 Properly read i386 coredump.
2010-04-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR corefiles/11523
	* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
	XCR0 first.

	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
	there is no .reg-xstate section.
	(i386_linux_core_read_description): Check XCR0 first.
2010-04-21 20:22:20 +00:00
Mike Frysinger a9789a6b9d gdb: workaround sparc memcpy fortify error
Building on an x86_64-linux system with --enable-targets=all fails on the
sparc code with a fortify error:

cc1: warnings being treated as errors
In file included from /usr/include/string.h:640,
                 from gnulib/string.h:23,
                 from ../../gdb/gdb_string.h:25,
                 from ../../gdb/vec.h:25,
                 from ../../gdb/memattr.h:24,
                 from ../../gdb/target.h:60,
                 from ../../gdb/exec.h:23,
                 from ../../gdb/gdbcore.h:31,
                 from ../../gdb/sparc-tdep.c:29:
In function 'memcpy',
    inlined from 'sparc32_store_return_value' at ../../gdb/sparc-tdep.c:1112,
    inlined from 'sparc32_return_value' at ../../gdb/sparc-tdep.c:1170:
/usr/include/bits/string3.h:52: error: call to __builtin___memcpy_chk will
        always overflow destination buffer
make: *** [sparc-tdep.o] Error 1

This is due to the gcc optimizer bug PR37060, so tweak the gdb_assert ()
to avoid the issue.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-21 20:13:41 +00:00
Chris Moller 0b66f31738 PR 9167
* cp-valprint.c (cp_print_value_fields): Replaced obstack_base()
method of popping recursion-detection stack with a method based on
obstack_object_size().
* gdb.cp/Makefile.in (EXECUTABLES): Added pr9167.
* gdb.cp/pr9167.cc: New file.
* gdb.cp/pr9167.exp: New file.
2010-04-21 17:33:54 +00:00
Aleksandar Ristovski a8ae7dc0fb * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
* nto-x86-low.c: Include server.h
2010-04-21 13:42:56 +00:00
Pierre Muller 6e354e5ec2 gdb ChangeLog
PR pascal/11492.
	* p-valprint.c (pascal_val_print): Fix default printing of integer
	arrays.

gdb/testsuite ChangeLog
	PR pascal/11492.
	* gdb.pascal/gdb11492.pas: New file.
	* gdb.pascal/gdb11492.exp: New file.
2010-04-21 09:54:59 +00:00
Pierre Muller 57174f3173 Fix compilation warning on gcc-4.1.2.
* rs6000-aix-tdep.c (rs6000_convert_from_func_ptr_addr): Initialize
	local variable`pc' to zero.
2010-04-21 08:44:51 +00:00
Doug Evans efbae210a7 * gdb.base/source-test.gdb: New file.
Remove duplicate entry.
2010-04-21 03:27:35 +00:00
gdbadmin a906e07362 *** empty log message *** 2010-04-21 00:00:34 +00:00
Joel Brobecker 6fbc7cd8d3 Implement thread support with core files on alpha-tru64
Thread support currently does not work with core files.  Note that,
in order to thread support to work on tru64, one need to allow GDB
to write in the core file (this is because the thread debug library
needs to write).

An obvious visible symptom of the problem is that "info threads" does
not list the various threads:

    (gdb) info threads
    * 1 <main task>  0x000003ff805c0918 in __nxm_thread_kill ()
       from /usr/shlib/libpthread.so

One other noticeable consequence is that GDB generates some warnings
when using "info tasks":

    (gdb) info tasks
    warning: Could not find thread id from THREAD = 0x3ffc01b6000

    warning: Could not find thread id from THREAD = 0x20000e2b4c0

      ID       TID P-ID Pri State                  Name
    *  1 140051000    0  30 Runnable               main_task
    *  2 14005c000    1  30 Accept or Select Term  my_t

(notice also how both tasks are marked as being the active task,
which cannot be true).

The problem is that the dec-thread module has not updated its thread list
after the core file got loaded.  In fact, the list only gets resync'ed
at the end of each target-wait.  The solution was to implement the
find_new_threads target_ops method.

gdb/ChangeLog:

        Implement thread support with core files on alpha-tru64.
        * dec-thread.c (dec_thread_find_new_threads): New function,
        extracted from resync_thread_list.
        (resync_thread_list): Add OPS parameter.  Replace extracted-out
        code by call to dec_thread_find_new_threads.
        (dec_thread_wait): Update call to resync_thread_list.
        (init_dec_thread_ops): Set dec_thread_ops.to_find_new_threads.
2010-04-20 23:14:12 +00:00
Joel Brobecker 1667e6e349 Add missing directory name in last ChangeLog entry. 2010-04-20 22:51:24 +00:00
Joel Brobecker 438c98a1ed [AVR] inferior call of subprogram with pointer as argument
On AVR, the gdb view of an address is different from the machine view of the
same address.  We need to use special machinery implemented by value_pointer
to take the pointer of a value.

For instance, considering the following function...

  procedure Trace (Unit    : T; Message : String);

... where T is an access Integer (a pointer to an integer), call to this
function currently triggers the following warnings:

    (gdb) call debug.trace (me, "You")
    warning: Value does not fit in 16 bits.
    warning: Value does not fit in 16 bits.
    Tracing message: You

It could have been worse if Trace actually tried to dereference the Unit
argument...

gdb/ChangeLog (from Tristan Gingold):

	* ada-lang.c (value_pointer): New function.
	(make_array_descriptor): Call value_pointer to convert addresses to
	pointers.

Tested on avr and x86_64-linux.
2010-04-20 22:40:36 +00:00
Joel Brobecker 2971b56ba6 [AIX] Memory error while checking if pointer is descriptor.
A long time ago (Oct 2009), I noticed a problem on AIX, where something
failed with an error while the debugger was checking whether an address
was a descriptor or not.  Unfortunately, like an idiot, I forgot to write
notes about the scenario where the problem occured - I am usually pretty
meticulous about that because my memory of these things is really bad.
I hope you'll forgive me for not providing a solid testcase - if it's
any consolation, I've searched for a long time before giving up :-(.

Based on the testsuite reports that I have, I think that this happened
while inserting a breakpoint, as follow:

    (gdb) break x
    Cannot access memory at address 0x200093b4

What happened is that rs6000_convert_from_func_ptr_addr tried to read
the memory at the given address, and fail because of an exception.
It seems pretty clear that, if the address was in fact a descriptor,
GDB would have been able to read the target memory region.

So this patch protects the memory-read against exceptions, and treats
such exceptions as an indication that our address is not a descriptor.

gdb/ChangeLog:

        * rs6000-aix-tdep.c: #include exceptions.h.
        (rs6000_convert_from_func_ptr_addr): If an exception is thrown
        while reading the memory at ADDR, then ADDR cannot be a function
        descriptor.
2010-04-20 22:38:54 +00:00
Joel Brobecker be9425454f "unsupported language" error in info types when using Ada.
This implements a rudimentary version of the la_print_typedef method
for Ada.  Ada usually does not use typedefs, but there is one exception:
pointers to unconstrained arrays.  Without this patch, we sometimes
get an error in the "info types" output:

    (gdb) info types new_integer_type
    All types matching regular expression "new_integer_type":

    File foo.adb:
    Language not supported.

For now, we treat the typedef as if it did not exist - using the
underlying type instead.  This is the right thing to do for most cases,
the only exception being access to array types.  Since we already have
a general issue in handling these pointers (we confuse them with fat
pointers), we will enhance ada_print_typedef to handle these pointers
at the same time we address the general issue.

gdb/ChangeLog:

        * ada-typeprint.c (ada_print_typedef): New function.
        * ada-lang.h (ada_print_typedef): Add declaration.
        * ada-lang.c (ada_language_defn): set la_print_typdef field
        to ada_print_typedef.

gdb/testsuite/ChangeLog:

        * info_types.c, info_types.exp: New files.

Tested on x86_64-linux.
2010-04-20 22:38:02 +00:00
Joel Brobecker 1ca8fce046 Unused function in procfs.c on alpha-tru64.
The procfs_address_to_host_pointer function was not used outside of
alpha-tru64, and thus was triggering a compiler warning.  Adjusted
accordingly.

gdb/ChangeLog:

        * procfs.c (procfs_address_to_host_pointer): Only define when used.
2010-04-20 22:36:35 +00:00
Joel Brobecker e9ef4f394d procfs.c: iterate_over_mappings callback has wrong profile.
The function proc_find_memory_regions calls iterate_over_mappings as
follow:

> return iterate_over_mappings (pi, func, data,
>                               find_memory_regions_callback);

The problem is that both func and find_memory_regions_callback
do not match the profile expected by iterate_over_mappings:

> iterate_over_mappings (procinfo *pi, int (*child_func) (), void *data,
>                        int (*func) (struct prmap *map,
>                                     int (*child_func) (),
>                                     void *data))

We cannot change proc_find_memory_regions such that FUNC is a pointer
to a function that takes no argument (in place of the 6 that it has).
This is because proc_find_memory_regions is used as a target_ops method.
However, it turns out that changing iterate_over_mappings to conform
to the profile imposed by the target_ops vector is possible without
much effort.

gdb/ChangeLog:

        * procfs.c (iterate_over_mappings_cb_ftype): New typedef.
        (iterate_over_mappings): Adjust function profile. Add declaration.
        (insert_dbx_link_bpt_in_region, info_mappings_callback):
        Adjust accordingly.
2010-04-20 22:35:58 +00:00
Joel Brobecker e294797a88 procfs.c: Move solib_mappings_callback up to avoid compiler warning.
There are currently 2 issues with the placement of this routine:
  - It's defined after it is being used (causing an implicit declaration);
  - It looks like it's being defined all the time, whereas it is used
    only on mips-irix (AFAICT) - shouldn't have this triggered a warning
    on sparc-solaris, for instance???

In any case, this patch moves this function up, inside the right region,
just before the function where it is actually used.

gdb/ChangeLog:

        * procfs.c (solib_mappings_callback): Move function up to avoid
        a compiler warning.
2010-04-20 22:35:03 +00:00
Joel Brobecker a223f1e7a0 procfs.c: Move find_signalled_thread and find_stop_signal.
These two functions are only used from procfs_make_note_section, which
itself is only defined if:

    #if defined (UNIXWARE) || defined (PIOCOPENLWP) || defined (PCAGENT)

So these two functions are unused on mips-irix, and they get flagged
by -Wunused-function. This patch simply moves these functions closer
to the function that uses them, which also has the effect of putting
them inside the same #if block as procfs_make_note_section.  Thus
they are defined only when used.

gdb/ChangeLog:

        * procfs.c (find_signalled_thread, find_stop_signal): Move
        these functions down to define them only when used.
2010-04-20 22:34:09 +00:00
Joel Brobecker 0c3acc0923 Wrong value printed by info locals for dynamic object.
The problem is printing the wrong value for dynamic local variables
when using the "info locals" command. Consider the following code:

   procedure Print (I1 : Positive; I2 : Positive) is
      type My_String is array (I1 .. I2) of Character;
      I : My_String := (others => 'A');
      S : String (1 .. I2 + 3) := (others => ' ');
   begin
      S (I1 .. I2) := String (I); --  BREAK
      Put_Line (S);
   end Print;

After the debugger stopped at BREAK, we try printing all local variables.
Here is what we get:

        (gdb) info locals
        i = "["00"]["00"]"
        s = "["00"]["00"]["00"]["00"]["00"]["00"]["00"]["00"]"

Curiously, printing their value using the "print" command works:

        (gdb) print i
        $1 = "AA"
        (gdb) print s
        $2 = "        "

We traced the problem to trying to get the contents of a variable
(call to value_contents) before "fix'ing" it.  For those not familiar
with the Ada language support, "fixing" a value consists of swapping
the value's dynamic type with a static version that is appropriate
for our actual value.  As a result, the dynamic type was used to
determine the value size, which is zero, and thus the value contents
was empty.

gdb/ChangeLog:

        * valprint.c (common_val_print): Fix the value before extracting
        its contents.
        * ada-lang.c (ada_to_fixed_value): Make this function extern.
        * ada-lang.h (ada_to_fixed_value): New function declaration.
        * ada-valprint.c (ada_value_print): Use ada_to_fixed_value
        to avoid code duplication and fix a bug in the handling of
        fixed types contents.

gdb/testsuite/ChangeLog:

        * gdb.ada/dyn_loc: New testcase.
2010-04-20 22:26:57 +00:00
Tom Tromey 31ef98ae61 * dwarf2read.c (dwarf2_compute_name): Handle DW_AT_linkage_name.
(read_partial_die): Likewise.
	(dwarf_attr_name): Likewise.
2010-04-20 21:19:07 +00:00
Chris Moller ec31cde594 PR 10867
* cp-valprint.c (global): Adding new static array recursion
detection obstack.
(cp_print_value_fields, cp_print_static_field): Added new static
array recursion detection code.
* gdb.cp/Makefile.in  (EXECUTABLES): Added pr10687
* gdb.cp/pr10687.cc: New file.
* gdb.cp/pr10687.exp: New file
2010-04-20 20:22:12 +00:00
Mark Kettenis e0e0e543d5 * i386-linux-tdep.c (i386_linux_regset_sections): Size of the
general-purpose register set should be 68 instead of 144.
(i386_linux_sse_regset_sections): Likewise.
(i386_linux_avx_regset_sections): Likewise.
2010-04-20 19:39:50 +00:00
Stan Shebs 08922a1050 2010-04-20 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell  <nathan@codesourcery.com>

	* dwarf2loc.c (struct axs_var_loc): New struct.
	(dwarf2_tracepoint_var_loc): New function.
	(dwarf2_tracepoint_var_access): New function.
	(dwarf2_tracepoint_var_ref): Use dwarf2_tracepoint_var_loc, deal
	with DW_OP_piece.
	(locexpr_describe_location_piece): New function.
	(locexpr_describe_location_1): New function.
	(locexpr_describe_location): Call it, update signature.
	(loclist_describe_location): Rewrite to loop over locations,
	update signature.
	* symtab.h (struct symbol_computed_ops): Add address to
	describe_location arguments, return void.
	* printcmd.c (address_info): Get context PC, pass to computed
	location description.
	* tracepoint.c (scope_info): Ditto.
	* ax-gdb.c (trace_kludge): Export.
2010-04-20 18:52:59 +00:00
Tom Tromey 2dc7f7b33b * dwarf2-frame.c (decode_frame_entry_1): Handle CIE version 4.
(struct dwarf2_cie) <segment_size>: New field.
	* dwarf2read.c (partial_read_comp_unit_head): Accept DWARF 4.
	(skip_one_die): Handle DW_FORM_flag_present, DW_FORM_sec_offset,
	DW_FORM_exprloc.
	(read_attribute_value): Handle DW_FORM_flag_present,
	DW_FORM_sec_offset, DW_FORM_exprloc.
	(dump_die_shallow): Likewise.
	(attr_form_is_section_offset): Handle DW_FORM_sec_offset.
	(dwarf2_const_value): Handle DW_FORM_exprloc.
	(attr_form_is_block): Likewise.
	(struct line_header) <maximum_ops_per_instruction>: New field.
	(dwarf_decode_line_header): Set new field.
	(dwarf_decode_lines): Handle new field.
2010-04-20 17:33:14 +00:00
Sergio Durigan Junior ce4b068214 gdb/ChangeLog:
2010-04-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* f-exp.y: Add new production to recognize the `logical*8' type.
	(LOGICAL_S8_KEYWORD): New token.
	* f-lang.c (enum f_primitive_types)
	<f_primitive_type_logical_s8>: New field.
	(f_language_arch_info): Handling `logical*8' type.
	(build_fortran_types): Building `logical*8' type.
	* f-lang.h (struct builtin_f_type) <builtin_logical_s8>: New field.

gdb/testsuite/ChangeLog:

2010-04-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.fortran/logical.exp: New testcase.
	* gdb.fortran/logical.f90: New file.
2010-04-20 17:22:19 +00:00
Pierre Muller 1c07cc1903 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
be consistent with other sources of this directory.
	(init_registers_amd64): Correct name of source file of this function
	in the comment.
2010-04-20 09:58:42 +00:00
Doug Evans 9f117f4723 (generic_readchar): Tweak previous checkin, close error_fd if EOF. 2010-04-20 06:06:38 +00:00
Doug Evans ff9f22f1a7 * ser-base.c (generic_readchar): Watch for EOF in read of error_fd.
* ser-pipe.c (pipe_open): Fix file descriptor leaks.
	(pipe_close): Ditto.
2010-04-20 05:52:07 +00:00
Doug Evans 3436961f29 * gdb.base/help.exp (help source): Update expected output. 2010-04-20 05:36:02 +00:00
Pierre Muller 437125bd80 * configure.tgt (x86_64-*-mingw*): Set BUILD_GDBSERVER to yes. 2010-04-20 00:21:33 +00:00
Pierre Muller e0a61e099d * configure.srv (x86_64-*-mingw*): New configuration for Windows
64-bit executables.
2010-04-20 00:19:35 +00:00
Pierre Muller 54709339f5 * win32-i386-low.c: Add 64-bit support.
(CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
	(init_registers_amd64): Declare.
	(mappings): Add 64-bit version of array.
	(init_windows_x86): New function.
	(the_low_target): Change init_arch field to init_windows_x86.
2010-04-20 00:17:05 +00:00
Pierre Muller e8f0053d6e * win32-low.c: Adapt to support also 64-bit architecture.
(child_xfer_memory): Use uintptr_t type for local variable `addr'.
	(get_image_name): Use SIZE_T type for local variable `done'.
	(psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
	(toolhelp_get_dll_name): Idem.
	(handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
	Use uintptr_t typecast to avoid warning.
	(handle_unload_dll): Use uintptr_t typecast to avoid warning.
	(handle_exception): Use phex_nz to avoid warning.
	(win32_wait): Remove unused local variable `process'.
2010-04-20 00:07:44 +00:00
gdbadmin 2dd893b03e *** empty log message *** 2010-04-20 00:00:03 +00:00
Pierre Muller e8e6c82edd * windows-tdep.c (windows_get_tlb_type): Change current_seh.handle
type to void function.
2010-04-19 23:52:11 +00:00
Stan Shebs 4136fdd244 2010-04-19 Stan Shebs <stan@codesourcery.com>
Vladimir Prus  <vladimir@codesourcery.com>

	* tracepoint.c (tfind_1): Add missing newline, report exit from
	tfind mode as such.
	* target.c (update_current_target): Make default
	to_trace_find return -1.
2010-04-19 22:06:17 +00:00
Mike Frysinger 0c4b2e6393 gdb: objc-lang: check symbol name before accessing memory
The current ObjC logic will check both the symbol name and the target
address space when trying to locate an appropriate selector.  The problem
is that first the target address space is checked before the symbol name.
This may lead to a lot of unnecessary host<->target transactions when
dealing with a non-OjbC target that does use function descriptors to
describe functions as every symbol will have its FD read just to have the
result thrown away with non-matching symbol names.

It also may lead to problems when a non-FD symbol is found that points near
the end of the address space as the target will throw up a memory_error().
One such example are symbols that are not functions, smaller than a FD,
and are the last valid location.  Obviously treating it as a larger data
struct can cause memory overflows.

So to speed things up and not screw over such targets, check the symbol
name (which we already have locally) first before attempting to read the
function's descriptor.  This fixes breakpoints with Blackfin Linux FDPIC
ELFs, and seems to cause no native regressions on my x86_64/Linux system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-19 19:51:39 +00:00
Pedro Alves 78076abca5 * ada-lang.c (print_recreate_exception)
<ex_catch_exception_unhandled>: It's "catch exception unhandled",
	not "catch unhandled".
2010-04-19 17:06:11 +00:00
Pierre Muller c481e77ec5 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
`amd64-avx.o'.
2010-04-19 14:08:05 +00:00
Jan Kratochvil 4d836c0979 gdb/testsuite/
* gdb.base/solib-display.exp: Replace gdb_exit, gdb_start,
	gdb_reinitialize_dir and gdb_load by clean_restart.  Remove trailing
	gdb_exit and return.
	(executable): New variable.
	(binfile): Use it.
2010-04-19 03:13:07 +00:00
Pedro Alves 645797a830 Fix format of previous-previous entry. 2010-04-19 01:08:25 +00:00
Pedro Alves 6149aea959 PR breakpoints/8554.
Implement `save-breakpoints'.

	gdb/
	* breakpoint.c (save_cmdlist): New.
	(breakpoint_set_cmdlist, breakpoint_show_cmdlist): Moved up close
	to save_cmdlist.
	(print_recreate_catch_fork): New.
	(catch_fork_breakpoint_ops): Install it.
	(print_recreate_catch_vfork): New.
	(catch_vfork_breakpoint_ops): Install it.
	(print_recreate_catch_syscall): New.
	(catch_syscall_breakpoint_ops): Install it.
	(print_recreate_catch_exec): New.
	(catch_exec_breakpoint_ops): Install it.
	(print_recreate_exception_catchpoint): New.
	(gnu_v3_exception_catchpoint_ops): Install it.
	(save_breakpoints): New, based on tracepoint_save_command, but
	handle all breakpoint types.
	(save_breakpoints_command): New.
	(tracepoint_save_command): Rename to...
	(save_tracepoints_command): ... this, and reimplement using
	save_breakpoints.
	(save_command): New.
	(_initialize_breakpoints): Install the "save" command prefix.
	Install the "save breakpoints" command.  Make "save-tracepoints" a
	deprecated alias for "save tracepoints".
	* breakpoint.h (struct breakpoint_ops): New field `print_recreate'.
	* ada-lang.c (print_recreate_exception): New.
	(print_recreate_catch_exception): New.
	(catch_exception_breakpoint_ops): Install it.
	(print_recreate_catch_exception_unhandled): New.
	(catch_exception_unhandled_breakpoint_ops): Install it.
	(print_recreate_catch_assert): New.
	(catch_assert_breakpoint_ops): Install it.

	* NEWS: Mention the new `save breakpoints' command.  Mention the
	new `save tracepoints' alias and that `save-tracepoints' is now
	deprecated.

	gdb/doc/
	* gdb.texinfo (Save Breakpoints): New node.
	(save-tracepoints): Rename to ...
	(save tracepoints): ... this.  Mention that `save-tracepoints' is
	a deprecated alias to `save tracepoints'.

	gdb/testsuite/
	* gdb.trace/save-trace.exp: Adjust.
2010-04-19 00:48:44 +00:00
gdbadmin 8b47812243 *** empty log message *** 2010-04-19 00:00:34 +00:00
Pedro Alves 0a8fce9a70 PR tui/9217
* tui/tui-out.c: Include cli-out.h.
	(tui_table_begin, tui_table_body, tui_table_end, tui_table_header)
	(tui_begin, tui_end, tui_field_int, tui_field_skip)
	(tui_field_string, tui_field_fmt, tui_spaces, tui_text)
	(tui_message, tui_wrap_hint, tui_flush): Delete forward
	declarations.
	(struct ui_out_data): Rename to...
	(struct tui_ui_out_data): ... this.  Remove `stream' and
	`suppress_output' fields, and inherit cli_ui_out_data.
	(tui_out_data): New typedef.
	(tui_ui_out_impl): Don't initialize fields staticaly.
	(tui_table_begin, tui_table_body, tui_table_end, tui_table_header)
	(tui_begin, tui_end): Delete.
	(tui_field_int): Adjust to delegate most work to the base type.
	(tui_field_skip): Delete.
	(tui_field_string, tui_field_fmt): Adjust comment.  Adjust to
	delegate most work to the base type.
	(tui_spaces): Delete.
	(tui_text): Adjust to delegate most work to the base type.
	(tui_message): Delete.
	(tui_wrap_hint): Delete.
	(tui_flush): Delete.
	(out_field_fmt): Delete.
	(field_separator): Delete.
	(tui_out_new): Adjust to initialize the base type.
	(_initialize_tui_out): Initialize tui_ui_out_impl.
	* cli-out.c (struct ui_out_data): Moved out to cli-out.h, renamed
	cli_ui_out_data.
	(cli_out_data): Adjust.
	(cli_ui_out_impl): Make extern.
	(cli_table_header, cli_field_int, cli_field_skip): Use
	uo_field_string instead of cli_field_string.
	(cli_redirect): Adjust to use cli_out_data.
	(cli_out_data_ctor): New.
	(cli_out_new): Use it.
	* cli-out.h (struct ui_file): Remove forward declaration.
	(struct cli_ui_out_data): New, moved from cli-out.c, and renamed.
	(cli_ui_out_impl): Declare.
	(cli_out_data_ctor): Declare.
	* ui-out.c (struct ui_out) <data>: Change type to void pointer.
	(uo_field_string): No longer static.
	(ui_out_data): Change return type to void pointer.
	(ui_out_new): Change `data' parameter type to void pointer.
	* ui-out.h (struct ui_out_data): Don't forward declare.
	(ui_out_data): Change return type to void pointer.
	(ui_out_new): Change `data' parameter type to void pointer.
	(uo_field_string): Declare.
2010-04-18 00:11:55 +00:00
gdbadmin 61d05fada4 *** empty log message *** 2010-04-18 00:00:34 +00:00
Pedro Alves 172240dd22 * ui-file.c (tee_file_isatty): Return whether `tee->one' is a tty,
instead of always false.
2010-04-17 23:56:27 +00:00
Pierre Muller 12ea4b6986 * configure.ac: Use `ws2_32' library for srv_mingw.
* configure: Regenerate.
	* gdbreplay.c: Include winsock2.h instead of winsock.h.
	* remote-utils.c: Likewise.
2010-04-17 20:43:13 +00:00
H.J. Lu ed41462c79 gdb/
2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR corefiles/11511
	* amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Support
	orig_rax.

gdb/testsuite/

2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR corefiles/11511
	* gdb.arch/system-gcore.exp: New.
	* gdb.arch/gcore.c: Likewise.
2010-04-17 18:53:46 +00:00
Pedro Alves cc60f2e372 * breakpoint.c (watchpoints_triggered): Use
is_hardware_watchpoint.
	(watchpoints_triggered): Ditto.
	(bpstat_check_location): Use is_watchpoint and
	is_hardware_watchpoint.
	(bpstat_check_watchpoint): Use is_watchpoint and
	is_hardware_watchpoint.
	(bpstat_stop_status): Fix comment.
	(user_settable_breakpoint): Use is_watchpoint.
	(hw_watchpoint_used_count): Use is_hardware_watchpoint.
	(disable_watchpoints_before_interactive_call_start): Use
	is_watchpoint.
	(enable_watchpoints_after_interactive_call_stop): Use
	is_watchpoint.
	(clear_command): Use is_watchpoint.
	(do_enable_breakpoint): Use is_watchpoint.
2010-04-17 18:42:46 +00:00
H.J. Lu f6d1620c59 Define xmltarget_amd64_linux_no_xml only for amd64.
2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	* linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
	if __x86_64__ is defined.
2010-04-17 14:12:31 +00:00
gdbadmin 6cfa03d350 *** empty log message *** 2010-04-17 00:00:05 +00:00
Mike Frysinger cb7db0f2a9 gdb: fdpic/frv: fix shared library loading
The recent change to reload_shared_libraries() broke FDPIC shared libraries as
the solib-frv.c code was implicitly relying on the initial order of calls
(first solib_addr() and then solib_create_inferior_hook()).  It was
maintaining internal state via enable_break{1,2}_done to handle this.

While I could tweak these values a bit more, the original code wasn't terribly
bullet proof -- if during the initial debug you attempted to view shared
libraries, the enable2_break() code would whine about the ldso internal debug
addresses being unfetchable (and would actually attempt to read address 0x8 on
the target).  So I've dropped this implicit dependency on order (i.e.
enable_break1_done) and updated the ldso poking code (i.e. enable_break2) to
silently return when the internal debug address is still set to 0.  It will
remain this way until the ldso gets a chance to initialize at which point the
code will act the same as before.

While I have no way of testing the FRV, the Blackfin FDPIC code is using this
same base in a 100% copy & paste method since we implemented FDPIC the same
way as the FRV guys (I'll address this in the future).  This fix was required
in order to handle shared libraries with Blackfin FDPIC properly, and I see no
reason why it wouldn't also work for FRV (since the uClibc ldso FDPIC code is
the same too and that's really what this is poking).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-16 22:47:42 +00:00
Kevin Buettner d77b48cf13 * m32c-tdep.c (m32c_m16c_address_to_pointer): Print warning
instead of an error if no PLT entry is found.  Return a
	potentially useful result.
	(m32c_m16c_pointer_to_address): Add code to search for function
	address when no .plt entry is found.
2010-04-16 22:46:27 +00:00
Stan Shebs f90824dcbc 2010-04-16 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_variable_command): Run a cleanup.
2010-04-16 18:22:01 +00:00
Pierre Muller 8e64287381 * configure: Regenerate. 2010-04-16 16:22:15 +00:00
Pierre Muller 9b79b476a6 * p-lang.c (pascal_one_char): Do not restrict C to 0..255 range. 2010-04-16 08:12:59 +00:00
Pierre Muller 711e434b39 Support for Windows OS Thread Information Block.
* NEWS: Document new feature.
	* remote.c (PACKET_qGetTIBAddr): New enum element.
	(remote_get_tib_address): New function.
	(init_remote_ops): Set to_get_tib_address field
	to remote_get_tib_address.
	(_initialize_remote): Add add_packet_config_cmd
	for PACKET_qGetTIBAddr.
	* target.c (update_current_target): Set default value for
	new to_get_tib_address field.
	* target.h (target_ops): New field to_get_tib_address.
	(target_get_tib_address): New macro.
	* windows-nat.c (thread_info): Add thread_local_base field.
	(windows_add_thread): Add tlb argument of type 'void *'.
	(fake_create_process): Adapt windows_add_thread call.
	(get_windows_debug_event): Idem.
	(windows_get_tib_address): New function.
	(init_windows_ops): Set to_get_tib_address field
	to remote_get_tib_address.
	(_initialize_windows_nat): Replace info_w32_cmdlist
	initialization by a call to init_w32_command_list.
	(info_w32_command, info_w32_cmdlist): Removed from here...
	to windows-tdep.c file.
	* windows-tdep.h (info_w32_cmdlist): Declare.
	(init_w32_command_list): New external function
	declaration.
	* windows-tdep.c: Add several headers.
	(info_w32_cmdlist): to here, made global.
	(thread_information_32): New struct.
	(thread_information_64): New struct.
	(TIB_NAME): New char array.
	(MAX_TIB32, MAX_TIB64, FULL_TIB_SIZE): New constants.
	(maint_display_all_tib): New static variable.
	(windows_get_tlb_type): New function.
	(tlb_value_read, tlb_value_write): New functions.
	(tlb_value_funcs): New static struct.
	(tlb_make_value): New function.
	(display_one_tib): New function.
	(display_tib): New function.
	(show_maint_show_all_tib):New function.
	(info_w32_command): Moved from windows-nat.c.
	(init_w32_command_list): New function.
	(_initialize_windows_tdep): New function.
	New "maint set/show show-all-tib" command
	New "$_tlb" internal variable.

gdbserver/ChangeLog entry:

	* server.c (handle_query): Handle 'qGetTIBAddr' query.
	* target.h (target_ops): New get_tib_address field.
	* win32-low.h (win32_thread_info): Add thread_local_base field.
	* win32-low.c (child_add_thread): Add tlb argument.
	Set thread_local_base field to TLB.
	(get_child_debug_event): Adapt to child_add_thread change.
	(win32_get_tib_address): New function.
	(win32_target_ops): Set get_tib_address field to
	win32_get_tib_address.
	* linux-low.c (linux_target_ops): Set get_tib_address field to NULL.

doc/ChangeLog entry:

	gdb.texinfo ($_tlb): Document new automatic convinience variable.
	(info w32 thread-information-block): Document new command.
	(qGetTIBAddress): Document new gdbserver query.
	(maint set/show show-all-tib): Document new command.
2010-04-16 07:49:37 +00:00
Joel Brobecker cae3f17bee * tui/tui-regs.c (tui_display_register): Add comment about
a couple of casts.
        * tui/tui-stack.c (tui_show_locator_content): Ditto.
2010-04-16 04:34:31 +00:00
Stan Shebs 2ce6d6bf7c 2010-04-15 Stan Shebs <stan@codesourcery.com>
* frame.c: Include tracepoint.h.
	(get_current_frame): Allow a trace frame to be an alternate source
	of stack frame data.
	* tracepoint.c (tfind_1): Don't try to get current stack frame if
	it won't succeed.
2010-04-16 01:12:07 +00:00
gdbadmin 47edb3fead *** empty log message *** 2010-04-16 00:00:33 +00:00