* infrun.c (disable_randomization): New global variable.
(show_disable_randomization): New function.
(set_disable_randomization): Likewise.
(_initialize_infrun): Install set/show disable-randomization
commands.
* linux-nat.c (disable_randomization): Remove.
(show_disable_randomization): Likewise.
(set_disable_randomization): Likewise.
(_initialize_linux_nat): No longer install set/show
disable-randomization commands here.
(linux_nat_supports_disable_randomization): New function.
(linux_nat_add_target): Install it.
* remote.c (PACKET_QDisableRandomization): New enum value.
(remote_protocol_packets): Support QDisableRandomization.
(_initialize_remote): Likewise.
(remote_supports_disable_randomization): New function.
(init_remote_ops): Install it.
(extended_remote_supports_disable_randomization): New function.
(init_extended_remote_ops): Install it.
(extended_remote_disable_randomization): New function.
(extended_remote_create_inferior_1): Call it.
* target.h (struct target_ops): Add to_supports_disable_randomization.
(target_supports_disable_randomization): Add prototype.
* target.c (target_supports_disable_randomization): New function.
(find_default_supports_disable_randomization): Likewise.
(init_dummy_target): Install it.
doc/
* gdb.texinfo (Starting your Program): "set disable-randomization"
is no longer Linux-specific.
(Remote Configuration): Document "set remote
disable-randomization-packet".
(General Query Packets): Document "QDisableRandomization" packet
and add it to "qSupported" list.
gdbserver/
* configure.ac: Check support for personality routine.
* configure: Regenerate.
* config.in: Likewise.
* linux-low.c: Include <sys/personality.h>.
Define ADDR_NO_RANDOMIZE if necessary.
(linux_create_inferior): Disable address space randomization when
forking inferior, if requested.
(linux_supports_disable_randomization): New function.
(linux_target_ops): Install it.
* server.h (disable_randomization): Declare.
* server.c (disable_randomization): New global variable.
(handle_general_set): Handle QDisableRandomization.
(handle_query): Likewise for qSupported.
(main): Support --disable-randomization and --no-disable-randomization
command line arguments.
* target.h (struct target_ops): Add supports_disable_randomization.
(target_supports_disable_randomization): New macro.
PR python/12691: Add the inferior to Python exited event
* python/py-exitedevent.c (create_exited_event_object): Add inferior
to exited_event.
* python/py-event.h (emit_exited_event): Likewise
* python/-inferior.c (python_inferior_exit): Likewise
2011-10-04 Kevin Pouget <kevin.pouget@st.com>
PR python/12691: Add the inferior to Python exited event
* gdb.python/py-events.exp: Test the inferior attribute of exited
event with a fork.
* gdb.python/py-events.py: Print inferior number on exit.
* gdb.python/py-events.c: Fork the inferior.
2011-10-04 Kevin Pouget <kevin.pouget@st.com>
PR python/12691: Add the inferior to Python exited event
* gdb.texinfo (Events In Python): Describe exited inferior attribute.
gdb/doc/ChangeLog:
* gdb.texinfo (GDB/MI Ada Tasking Commands): New node.
(GDB/MI Miscellaneous Commands): Add `ada-task-info'
as possible feature returned by the `-list-features'
command.
* tracepoint.c (encode_actions_1): Add case for $_ret.
(validate_actionline): Check for $_ret.
(trace_dump_actions): Ditto.
* ax-gdb.h (gen_trace_for_return_address): Declare.
* ax-gdb.c: Include arch-utils.h.
(gen_trace_for_return_address): New function.
(agent_command): Add return address special case.
* amd64-tdep.c: Include ax.h and ax-gdb.h.
(amd64_gen_return_address): New function.
(amd64_init_abi): Call it.
* i386-tdep.c: Include ax.h and ax-gdb.h.
(i386_gen_return_address): New function.
(i386_init_abi): Call it.
* arch-utils.h (default_gen_return_address): Declare.
* arch-utils.c (default_gen_return_address): New function.
* gdbarch.sh (gen_return_address): New method.
* gdbarch.h, gdbarch.c: Regenerate.
* gdb.texinfo (Tracepoint Action Lists): Document $_ret.
* gdb.trace/collection.exp: Test collection of $_ret.
Handle multiple breakpoint hits in Python interface:
* python/py-bpevent.c (create_breakpoint_event_object): Rename C/Python
variable to breakpoints.
* python/py-stopevent.c (emit_stop_event): Return a Python tuple of
bps instead of single breakpoint. Fix some space typos.
* python/py-stopevent.c (create_breakpoint_event_object): Rename
variable to breakpoints.
testsuite:
* gdb.python/py-events.exp: Set a duplicate breakpoint and check its
presence.
* gdb.python/py-events.py (breakpoint_stop_handler): Browse all the
breakpoint hits.
doc:
* gdb.texinfo (Events In Python): New function documentation:
gdb.BreakpointEvent.breakpoints. Indicate that
gdb.BreakpointEvent.breakpoint is now deprecated.
* python/lib/gdb/__init__.py: Auto-load files in command and
function directories.
* python/python.c (finish_python_initialization): Use
os.path.join.
* python/lib/gdb/command/pretty_printers.py: Self register
command.
* NEWS: Document auto-loading.
2011-08-09 Phil Muldoon <pmuldoon@redhat.com>
* gdb.texinfo (Python): Document command and function
auto-loading.
* remote.c (remote_region_ok_for_hw_watchpoint): New function.
(remote_hw_watchpoint_length_limit): New variable.
(_initialize_remote) add set,show cmds for this new variable.
* gdb.texinfo: document these new commands.
* NEWS: Mention these new commands.
* gdb.texinfo (whatis, ptype): Highlight their differences. Describe
typedefs unrolling. Extend the sample code by an inner typedef and
outer typedefs unrolling.
* macrotab.h (macro_callback_fn): Add new arguments to callback.
* macrotab.c (foreach_macro): Ditto.
(foreach_macro_in_scope): Ditto.
* macrocmd.c (print_macro_callback): New function.
(info_macro_command): Move some code to print_macro_definition.
(print_macro_definition): New function.
(print_one_macro): Add new arguments to callback.
testsuite/
* gdb.base/info-macros.c: New test sources.
* gdb.base/info-macros.exp: New tests.
docs/
* gdb.texinfo (Macros): Add info definitions and info macros commands.
Update text and cindex entries for info macro command.
* dwarf2read.c (check_physname): New variable.
(dwarf2_physname): Prefer DW_AT_linkage_name over dwarf2_compute_name.
(show_check_physname): New function.
(_initialize_dwarf2_read): Add `check-physname' for check_physname.
gdb/doc/
* gdb.texinfo (Debugging Output): Document set debug
check-physname.
gdb/testsuite/
* gdb.base/break-interp.exp (reach_1, test_ld): Allow also the prefix
__GI_.
* gdb.cp/psymtab-parameter.cc (func): Make it a template function.
(f): New function.
* gdb.cp/psymtab-parameter.exp (complete break 'func(): Rename to ...
(complete p 'func<short>(): ... here.
* gdb.dwarf2/dw2-linkage-name-trust-main.cc: New file.
* gdb.dwarf2/dw2-linkage-name-trust.S: New file.
* gdb.dwarf2/dw2-linkage-name-trust.exp: New file.
* gdb.cp/temargs.exp (test type of F in k3_m, test value of F in k3_m):
Make them KFAIL gcc/49546.
gdb/doc/
* gdb.texinfo (Remote Protocol) <Overview>: Mention vCont is
required for multi-threading support.
(Remote Protocol) <Packets>: Mention that 'c', 's', 'C', 'S' and
Hc are deprecated for multi-threading debugging. Point readers at
the vCont packet.
"No" for missing scripts.
(info_auto_load_scripts): Tweak "Loaded" column to fit "Missing".
doc/
* gdb.texinfo (Auto-loading): Document printing of missing scripts.
* NEWS: Mention $sdir,$pdir.
* gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): Add $sdir:$pdir.
* linux-thread-db.c (try_thread_db_load_from_pdir): New function.
(try_thread_db_load_from_sdir): New function.
(try_thread_db_load_from_dir): New function.
(thread_db_load_search): Handle $pdir, $sdir. Remove trying of
system directories if search of libthread-db-search-path fails,
that is now done via $sdir.
(has_libpthread): New function.
(thread_db_load): Remove search for libthread_db in directory of
libpthread, that is now done via $pdir.
gdbserver/
* thread-db.c (try_thread_db_load_from_sdir): New function.
(try_thread_db_load_from_dir): New function.
(thread_db_load_search): Handle $sdir, ignore $pdir.
Remove trying of system directories if search of
libthread-db-search-path fails, that is now done via $sdir.
doc/
* gdb.texinfo (Threads): Document $sdir,$pdir.
(Server): Document $pdir exception.
* python/py-auto-load.c (struct auto_load_pspace_info): New member
script_not_found_warning_printed.
(init_loaded_scripts_info): Renamed from create_loaded_scripts_hash,
all callers updated. Initialize script_not_found_warning_printed.
(get_auto_load_pspace_data_for_loading): New function.
(maybe_add_script): New function.
(source_section_scripts): Simplify. Only print one warning regardless
of the number of auto-load scripts not found.
(clear_section_scripts): Clear script_not_found_warning_printed.
(auto_load_objfile_script): Record script in hash table.
(count_matching_scripts): New function.
(maybe_print_script): Renamed from maybe_print_section_script, all
callers updated. Rewrite to use ui_out_*.
(info_auto_load_scripts): Renamed from
maintenance_print_section_scripts, all callers updated.
(gdbpy_initialize_auto_load): "maintenance print section-scripts"
renamed as "info auto-load-scripts".
doc/
* gdb.texinfo (Auto-loading): Document "info auto-load-scripts".
testsuite/
* gdb.python/py-objfile-script.exp: New file.
* gdb.python/py-objfile-script.c: New file.
* gdb.python/py-objfile-script-gdb.py: New file.
* testsuite/gdb.python/py-section-script.exp: Test
"info auto-load-scripts".
experiment is still running.
gdb/
* breakpoint.c (disable_breakpoint): Disable all locations
associated with a tracepoint on target if a trace experiment is
running.
(disable_command): Disable a specific tracepoint location on target if
a trace experiment is running.
(do_enable_breakpoint): Enable all locations associated with a
tracepoint on target if a trace experiment is running.
(enable_command) Enable a specific tracepoint location on target if a
trace experiment is running.
* target.c (update_current_target): Add INHERIT and de_fault clauses for
to_supports_enable_disable_tracepoint, to_enable_tracepoint and
to_disable_tracepoint.
* target.h: Add declaration of struct bp_location.
(struct target_ops): Add new functions
to_supports_enable_disable_tracepoint, to_enable_tracepoint and
to_disable_tracepoint to target operations.
(target_supports_enable_disable_tracepoint): New macro.
(target_enable_tracepoint): New macro.
(target_disable_tracepoint): New macro.
* remote.c (struct remote_state): Add new field.
(remote_enable_disable_tracepoint_feature): New.
(remote_protocol_features): Add new entry.
(remote_supports_enable_disable_tracepoint): New.
(remote_enable_tracepoint): New.
(remote_disable_tracepoint): New.
(init_remote_ops): Add remote_enable_tracepoint,
remote_disable_tracepoint and remote_supports_enable_disable_tracepoint
to remote operations.
* tracepoint.c (start_tracing): Allow tracing to start without any
tracepoints enabled with just a warning if they can be re-enabled
later.
* NEWS: Add news item for the new behaviour of the enable and disable
GDB commands when applied to tracepoints.
Add news items for the new remote packets QTEnable and QTDisable.
gdb/doc/
* gdb.texinfo: Document change in the behaviour of the enable and
disable GDB commands when applied to tracepoints.
Document the EnableDisableTracepoints remote stub feature.
Document QTEnable and QTDisable in the list of tracepoint packets.
gdb/gdbserver/
* server.c (handle_query): Add EnableDisableTracepoints to the list
of supported features.
* tracepoint.c (clear_installed_tracepoints): Uninstall disabled
tracepoints.
(cmd_qtenable_disable): New.
(cmd_qtstart): Install tracepoints even if disabled.
(handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
receiving a QTEnable or QTDisable packet.
(gdb_collect): Skip data collection if fast tracepoint is disabled.
(ust_marker_to_static_tracepoint): Do not ignore disabled static
tracepoints.
(gdb_probe): Skip data collection if static tracepoint is disabled.
(_initialize_thread_db): Add setter for libthread-db-search-path.
gdbserver/
* thread-db.c (thread_db_handle_monitor_command): Handle elided path.
doc/
* gdb.texinfo (Threads): If an empty path is provided for
libthread-db-search-path it is reset to its default value.
(Server): Ditto.
Thiago Jung Bauermann <bauerman@br.ibm.com>
Implement support for PowerPC BookE masked watchpoints.
gdb/
* NEWS: Mention masked watchpoint support. Create "Changed commands"
section.
* breakpoint.h (struct breakpoint_ops) <works_in_software_mode>: New
method. Initialize to NULL in all existing breakpoint_ops instances.
(struct breakpoint) <hw_wp_mask>: New field.
* breakpoint.c (is_masked_watchpoint): Add prototype.
(update_watchpoint): Don't set b->val for masked watchpoints. Call
breakpoint's breakpoint_ops.works_in_software_mode if available.
(watchpoints_triggered): Handle the case of a hardware masked
watchpoint trigger.
(watchpoint_check): Likewise.
(works_in_software_mode_watchpoint): New function.
(insert_masked_watchpoint, remove_masked_watchpoint)
(resources_needed_masked_watchpoint)
(works_in_software_mode_masked_watchpoint, print_it_masked_watchpoint)
(print_one_detail_masked_watchpoint, print_mention_masked_watchpoint)
(print_recreate_masked_watchpoint, is_masked_watchpoint): New
functions.
(masked_watchpoint_breakpoint_ops): New structure.
(watch_command_1): Check for the existence of the `mask' parameter.
Set b->ops according to the type of hardware watchpoint being created.
* ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint)
(ppc_linux_remove_mask_watchpoint)
(ppc_linux_masked_watch_num_registers): New functions.
(_initialize_ppc_linux_nat): Initialize to_insert_mask_watchpoint,
to_remove_mask_watchpoint and to_masked_watch_num_registers.
* target.c (update_current_target): Mention to_insert_mask_watchpoint,
to_remove_mask_watchpoint, and to_masked_watch_num_registers.
(target_insert_mask_watchpoint, target_remove_mask_watchpoint)
(target_masked_watch_num_registers): New functions.
* target.h (struct target_ops) <to_insert_mask_watchpoint>,
<to_remove_mask_watchpoint>, <to_masked_watch_num_registers>: New
methods.
(target_insert_mask_watchpoint, target_remove_mask_watchpoint)
(target_masked_watch_num_registers): Add prototypes.
gdb/doc/
* gdb.texinfo (Set Watchpoints): Document mask parameter.
(PowerPC Embedded): Mention support of masked watchpoints.
@value{GDBN} should be used in place of GDB, so this patch fixes it.
gdb/doc/ChangeLog:
* gdb.texinfo (In Memoriam): Replace litteral uses of `GDB' with
`@value{GDBN}'.
This change removes the dedication of the manual to Fred Fish.
It also creates a new `In Memoriam' appendix, where Fred Fish
and Michael Snyder are mentioned.
gdb/doc/ChangeLog:
* gdb.texinfo (titlepage): Remove dedication.
(In Memoriam): New appendix.
* gdb.texinfo (Index Section Format): Change the version to 5.
Describe the different formula.
gdb/
Case insensitive lookups implementation.
* dwarf2read.c: Include ctype.h.
(struct mapped_index): New field version.
(mapped_index_string_hash): New parameter index_version. New comment
for it. Call tolower appropriately.
(find_slot_in_mapped_hash): New variable cmp, initialize it, use it.
Choose the right index version for mapped_index_string_hash.
(dwarf2_read_index): Support also the index version 5. Initialize the
new struct mapped_index field version.
(hash_strtab_entry): Pass INT_MAX for the new parameter, explain why.
(find_slot): Explain the version needs. Pass INT_MAX for the new
parameter.
(write_psymtabs_to_index): Produce version 5.
* minsyms.c (lookup_minimal_symbol): New variable cmp, initialize it,
use it. New comment for SYMBOL_MATCHES_SEARCH_NAME.
* psymtab.c (lookup_partial_symbol): Find the
SYMBOL_MATCHES_SEARCH_NAME start of the found block of matching
entries.
* symtab.c (lookup_symbol_in_language): Remove the case_sensitive_off
NAME lowercasing.
(search_symbols): Pass REG_ICASE to regcomp for case_sensitive_off.
(completion_list_add_name): New variable ncmp, initialize it, use it.
* symtab.h (SYMBOL_HASH_NEXT): Always call tolower.
* utils.c (strcmp_iw): Support case_sensitive_off.
(strcmp_iw_ordered): Sort in a way compatible with case_sensitive_off.
New function comment part. New variables saved_string1,
saved_string2 and case_pass. Add a proper second pass.
gdb/testsuite/
* gdb.base/fortran-sym-case.c: New file.
* gdb.base/fortran-sym-case.exp: New file.
* gdb.dwarf2/dw2-case-insensitive-debug.S: New file.
* gdb.dwarf2/dw2-case-insensitive.c: New file.
* gdb.dwarf2/dw2-case-insensitive.exp: New file.