* NEWS: Add entry mentioning support for native Windows x64
SEH data.
* amd64-windows-tdep.c: #include "objfiles.h", "frame-unwind.h",
"coff/internal.h", "coff/i386.h", "coff/pe.h" and "libcoff.h".
(struct amd64_windows_frame_cache): New struct.
(amd64_windows_w2gdb_regnum): New global.
(pc_in_range, amd64_windows_frame_decode_epilogue)
(amd64_windows_frame_decode_insns, amd64_windows_find_unwind_info)
(amd64_windows_frame_cache, amd64_windows_frame_prev_register)
(amd64_windows_frame_this_id): New functions.
(amd64_windows_frame_unwind): New static global.
(amd64_windows_skip_prologue): New function.
(amd64_windows_init_abi): Call frame_unwind_prepend_unwinder
with amd64_windows_frame_unwind. Call set_gdbarch_skip_prologue
with amd64_windows_skip_prologue.
This is the patch to add new option '--skip-unavailable' to MI
commands '-stack-list-{locals, arguments, variables}'. This patch
extends list_args_or_locals to add a new parameter 'skip_unavailable',
and don't list locals or arguments if values are unavailable and
'skip_unavailable' is true.
This is inspecting a trace frame (tfind mode), where only a few
locals have been collected.
-stack-list-locals, no switch vs new switch:
-stack-list-locals --simple-values
^done,locals=[{name="array",type="unsigned char [2]"},{name="i",type="int",value="<unavailable>"}]
-stack-list-locals --skip-unavailable --simple-values
^done,locals=[{name="array",type="unsigned char [2]"}]
-stack-list-arguments, no switch vs new switch:
-stack-list-arguments --simple-values
^done,stack-args=[frame={level="0",args=[{name="j",type="int",value="4"},{name="s",type="char *",value="<unavailable>"}]},frame={level="1",args=[]}]
-stack-list-arguments --skip-unavailable --simple-values
^done,stack-args=[frame={level="0",args=[{name="j",type="int",value="4"}]},frame={level="1",args=[]}]
-stack-list-variables, no switch vs new switch:
-stack-list-variables --simple-values
^done,variables=[{name="j",arg="1",type="int",value="4"},{name="s",arg="1",type="char *",value="<unavailable>"},{name="array",type="unsigned char [2]"},{name="i",type="int",value="<unavailable>"}]
-stack-list-variables --skip-unavailable --simple-values
^done,variables=[{name="j",arg="1",type="int",value="4"},{name="array",type="unsigned char [2]"}]
tests are added to test these new options.
gdb:
2013-08-27 Pedro Alves <pedro@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* mi/mi-cmd-stack.c (list_args_or_locals): Adjust prototype.
(parse_no_frames_option): Remove.
(mi_cmd_stack_list_locals): Handle --skip-unavailable.
(mi_cmd_stack_list_args): Adjust.
(mi_cmd_stack_list_variables): Handle --skip-unavailable.
(list_arg_or_local): Add new parameter 'skip_unavailable'. Return
early if SKIP_UNAVAILABLE is true and ARG->val is unavailable.
Caller update.
(list_args_or_locals): New parameter 'skip_unavailable'.
Handle it.
* valprint.c (scalar_type_p): Rename to ...
(val_print_scalar_type_p): ... this. Make extern.
(val_print, value_check_printable): Adjust.
* valprint.h (val_print_scalar_type_p): Declare.
* value.c (value_entirely_unavailable): New function.
* value.h (value_entirely_unavailable): Declare.
* NEWS: Mention the new option "--skip-unavailable" to MI
commands '-stack-list-locals', '-stack-list-arguments' and
'-stack-list-variables'.
gdb/doc:
2013-08-27 Pedro Alves <pedro@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* gdb.texinfo (GDB/MI Stack Manipulation) <-stack-list-locals>:
Document new --skip-unavailable option.
<-stack-list-variables>: Document new --skip-unavailable option.
gdb/testsuite:
2013-08-27 Yao Qi <yao@codesourcery.com>
* gdb.trace/entry-values.exp: Test unavailable entry value is
not shown when option '--skip-unavailable' is specified.
* gdb.trace/mi-trace-unavailable.exp (test_trace_unavailable):
Add tests for new option '--skip-unavailable'.
* symmisc.c (maintenance_print_objfiles): Argument is now an optional
regexp of objfiles to print.
(_initialize_symmisc): Update doc string for "mt print objfiles".
doc/
* gdb.texinfo (Maintenance Commands): "maint print objfiles" now takes
an optional regexp.
This time, it passes all the tests and comes with a nearly complete
XML file (plus a script that can nearly regenerate the XML file).
(I elected to leave out __ARM_NR_cmpxchg, since it has dire warnings
to the effect that the only pieces of code that should be aware of it
are the implementation and the __kuser_cmpxchg code in entry-armv.S.)
gdb/
2013-08-14 Samuel Bronson <naesten@gmail.com>
ARM Linux support for `catch syscall'.
* syscalls/arm-linux.py: New file.
* syscalls/arm-linux.xml: Likewise.
* arm-linux-tdep.c (arm_linux_get_syscall_number): New function.
(arm_linux_init_abi): Register the new function and syscall xml file.
* data-directory/Makefile.in: Install the new syscall xml file.
* NEWS: Brag about this.
gdb/testsuite/
2013-08-14 Samuel Bronson <naesten@gmail.com>
ARM Linux support for `catch syscall'.
* gdb.base/catch-syscall.exp: Test this on ARM now.
(fill_all_syscalls_numbers): ARM has close/chroot on 6/61, too.
* Makefile.in (SFILES): Add common/mips-linux-watch.c.
(mips-linux-watch.o): New rule.
(mips_linux_watch_h): New variable.
* configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
srv_tgtobj.
* linux-mips-low.c: Include mips-linux-watch.h.
(struct arch_process_info, struct arch_lwp_info): New.
(update_watch_registers_callback): New function.
(mips_linux_new_process, mips_linux_new_thread) New functions.
(mips_linux_prepare_to_resume, mips_insert_point): New
functions.
(mips_remove_point, mips_stopped_by_watchpoint): New
functions.
(rsp_bp_type_to_target_hw_bp_type): New function.
(mips_stopped_data_address): New function.
(the_low_target): Add watchpoint support functions.
gdb/
* NEWS: Mention that GDBserver now supports hardware
watchpoints on the MIPS GNU/Linux target.
http://sourceware.org/ml/gdb-patches/2013-07/msg00235.html
gdb/ChangeLog
* NEWS: Mention new 'z' formatter.
* printcmd.c (print_scalar_formatted): Add new 'z' formatter.
(_initialize_printcmd): Mention 'z' formatter in help text of the
'x' command.
gdb/doc/ChangeLog
* gdb.texinfo (Output Formats): Mention the new 'z' formatter.
gdb/testsuite/ChangeLog
* gdb.base/printcmds.exp (test_print_int_arrays): Add tests for x,
z, o, and t output formats.
* gdb.base/display.exp: Use 'k' as an undefined format now that
'z' is defined.
2013-06-26 Pedro Alves <pedro@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* gdb.texinfo (GDB/MI Tracepoint Commands): Document
-trace-frame-collected.
gdb:
2013-06-26 Pedro Alves <pedro@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* mi/mi-cmds.c (mi_cmds): Register -trace-frame-collected.
* mi/mi-cmds.h (mi_cmd_trace_frame_collected): Declare.
* mi/mi-main.c (print_variable_or_computed): New function.
(mi_cmd_trace_frame_collected): New function.
* tracepoint.c (find_trace_state_variable_by_number): New.
(struct traceframe_info): Move to tracepoint.h
(struct collection_list): Likewise.
(do_collect_symbol): Include locals and arguments in the wholly
collected variables list.
(clear_collection_list): Clear wholly collected variables list
and computed variables list.
(append_exp): New function.
(encode_actions_1): Include variables in the wholly
collected variables list. Include memory ranges and
full-fledged expressions in the computed expressions list.
(encode_actions): Move some code to ...
Return the cleanup chain.
(encode_actions_rsp): ... here. New function.
(get_traceframe_location, get_traceframe_info): Remove static.
* tracepoint.h (struct memrange): Moved from tracepoint.c.
(struct collection_list): Moved from tracepoint.c. Add two
new fields 'wholly_collected' and 'computed'.
(find_trace_state_variable_by_number): Declare.
(encode_actions): Adjust declaration.
(encode_actions_rsp): Declare.
(get_traceframe_info, get_traceframe_location): Declare.
* NEWS: Mention new MI command -trace-frame-collected.
2013-06-26 Pedro Alves <pedro@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* ctf.c (ctf_traceframe_info): Push trace state variables
present in the trace data into the traceframe info object.
* breakpoint.c (DEF_VEC_I): Remove.
* common/filestuff.c (DEF_VEC_I): Likewise.
* dwarf2loc.c (DEF_VEC_I): Likewise.
* mi/mi-main.c (DEF_VEC_I): Likewise.
* common/gdb_vecs.h (DEF_VEC_I): Define vector for int.
* features/traceframe-info.dtd: Add tvar element and its
attributes.
* tracepoint.c (free_traceframe_info): Free vector 'tvars'.
(build_traceframe_info): Push trace state variables present in the
trace data into the traceframe info object.
(traceframe_info_start_tvar): New function.
(tvar_attributes): New.
(traceframe_info_children): Add "tvar" element.
* tracepoint.h (struct traceframe_info) <tvars>: New field.
* NEWS: Mention the change in GDB and GDBserver.
gdb/doc:
2013-06-26 Pedro Alves <pedro@codesourcery.com>
* gdb.texinfo (Traceframe Info Format): Document tvar element and
its attributes.
gdb/gdbserver:
2013-06-26 Pedro Alves <pedro@codesourcery.com>
* tracepoint.c (build_traceframe_info_xml): Output trace state
variables present in the trace buffer.
This patch adds an option --skip-unavailable to MI command
-data-list-register-values, so that unavailable registers are not
displayed (on the context of traceframes).
The old -data-list-register-values command behaves like
-data-list-register-values x 0 8
^done,register-values=[{number="0",value="<unavailable>"},{number="8",value="0x80483de"}]
With this patch, an option --skip-unavailable is added,
-data-list-register-values --skip-unavailable x 0 8
^done,register-values=[{number="8",value="0x80483de"}]
gdb:
2013-06-20 Pedro Alves <pedro@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* NEWS: Mention the new option '--skip-unavailable' of command
-data-list-register-values.
* mi/mi-main.c (mi_cmd_data_list_register_values): Accept the
--skip-unavailable option. Adjust to use output_register.
(output_register): Add new 'skip_unavailable' parameter.
Handle it.
gdb/doc:
2013-06-20 Pedro Alves <pedro@codesourcery.com>
* gdb.texinfo (GDB/MI Data Manipulation)
<-data-list-register-values>: Document the --skip-unavailable
option.
gdb/testsuite:
2013-06-20 Yao Qi <yao@codesourcery.com>
* gdb.trace/mi-trace-unavailable.exp: Set tracepoint on 'foo'
and set an action.
(test_trace_unavailable): Test command -data-list-register-values
in the context of traceframe and with option --skip-unavailable.
* gdb.trace/trace-unavailable.c (foo): New.
(main): Call it.
* gdb.mi/gdb2549.exp: Update matching pattern.
This patch adds support for range stepping to GDBserver, teaching it
about vCont;r.
It'd be easy to enable this for all hardware single-step targets
without needing the linux_target_ops hook, however, at least PPC needs
special care, due to the fact that PPC atomic sequences can't be
hardware single-stepped through, a thing which GDBserver doesn't know
about. So this leaves the support limited to x86/x86_64.
gdb/
2013-05-23 Pedro Alves <palves@redhat.com>
* NEWS: Mention GDBserver range stepping support.
gdb/gdbserver/
2013-05-23 Yao Qi <yao@codesourcery.com>
Pedro Alves <palves@redhat.com>
* linux-low.c (lwp_in_step_range): New function.
(linux_wait_1): If the thread was range stepping and stopped
outside the stepping range, report the stop to GDB. Otherwise,
continue stepping. Add range stepping debug output.
(linux_set_resume_request): Copy the step range from the resume
request to the lwp.
(linux_supports_range_stepping): New.
(linux_target_ops) <supports_range_stepping>: Set to
linux_supports_range_stepping.
* linux-low.h (struct linux_target_ops)
<supports_range_stepping>: New field.
(struct lwp_info) <step_range_start, step_range_end>: New fields.
* linux-x86-low.c (x86_supports_range_stepping): New.
(the_low_target) <supports_range_stepping>: Set to
x86_supports_range_stepping.
* server.c (handle_v_cont): Handle 'r' action.
(handle_v_requests): Append ";r" if the target supports range
stepping.
* target.h (struct thread_resume) <step_range_start,
step_range_end>: New fields.
(struct target_ops) <supports_range_stepping>:
New field.
(target_supports_range_stepping): New macro.
This patch teaches GDB to take advantage of target-assisted range
stepping. It adds a new 'r ADDR1,ADDR2' action to vCont (vCont;r),
meaning, "step once, and keep stepping as long as the thread is in the
[ADDR1,ADDR2) range".
Rationale:
When user issues the "step" command on the following line of source,
a = b + c + d * e - a;
GDB single-steps every single instruction until the program reaches a
new different line. E.g., on x86_64, that line compiles to:
0x08048434 <+65>: mov 0x1c(%esp),%eax
0x08048438 <+69>: mov 0x30(%esp),%edx
0x0804843c <+73>: add %eax,%edx
0x0804843e <+75>: mov 0x18(%esp),%eax
0x08048442 <+79>: imul 0x2c(%esp),%eax
0x08048447 <+84>: add %edx,%eax
0x08048449 <+86>: sub 0x34(%esp),%eax
0x0804844d <+90>: mov %eax,0x34(%esp)
0x08048451 <+94>: mov 0x1c(%esp),%eax
and the following is the RSP traffic between GDB and GDBserver:
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:3c840408;thread:p2e13.2e13;core:1;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:3e840408;thread:p2e13.2e13;core:2;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:42840408;thread:p2e13.2e13;core:2;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:47840408;thread:p2e13.2e13;core:0;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:49840408;thread:p2e13.2e13;core:0;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:4d840408;thread:p2e13.2e13;core:0;
--> vCont;s:p2e13.2e13;c
<-- T0505:68efffbf;04:30efffbf;08:51840408;thread:p2e13.2e13;core:0;
IOW, a lot of roundtrips between GDB and GDBserver.
If we add a new command to the RSP, meaning "keep stepping and don't
report a stop until the program goes out of the [0x08048434,
0x08048451) address range", then the RSP traffic can be reduced down
to:
--> vCont;r8048434,8048451:p2db0.2db0;c
<-- T0505:68efffbf;04:30efffbf;08:51840408;thread:p2db0.2db0;core:1;
As number of packets is reduced dramatically, the performance of
stepping source lines is much improved.
In case something is wrong with range stepping on the stub side, the
debug info or even gdb, this adds a "set/show range-stepping" command
to be able to turn range stepping off.
gdb/
2013-05-23 Yao Qi <yao@codesourcery.com>
Pedro Alves <palves@redhat.com>
* gdbthread.h (struct thread_control_state) <may_range_step>: New
field.
* infcmd.c (step_once, until_next_command): Enable range stepping.
* infrun.c (displaced_step_prepare): Disable range stepping.
(resume): Disable range stepping if stepping over a breakpoint or
we have software watchpoints. If range stepping is enabled,
assert the thread is in the stepping range.
(clear_proceed_status_thread): Clear may_range_step.
(handle_inferior_event): Disable range stepping as soon as we know
the thread that hit the event. Re-enable it whenever we're going
to step with a step range.
* remote.c (struct vCont_action_support) <r>: New field.
(use_range_stepping): New global.
(remote_vcont_probe): Handle 'r' action.
(append_resumption): Append an 'r' action if the thread may range
step.
(show_range_stepping): New function.
(set_range_stepping): New function.
(_initialize_remote): Call add_setshow_boolean_cmd to register the
'set range-stepping' and 'show range-stepping' commands.
* NEWS: Mention range stepping, the new vCont;r action, and the
new "set/show range-stepping" commands.
gdb/doc/
2013-05-23 Yao Qi <yao@codesourcery.com>
Pedro Alves <palves@redhat.com>
* gdb.texinfo (Packets): Document 'vCont;r'.
(Continuing and Stepping): Document target-assisted range
stepping, and the 'set range-stepping' and 'show range-stepping'
commands.
gdb/doc/ChangeLog:
* gdb.texinfo (Installed System-wide Configuration Scripts):
Add subsection describing the scripts now available under
the data-dir's system-gdbbinit subdirectory.
* NEWS: Add entry announcing the availability of system-wide
configuration scripts for ElinOS and Wind River Linux.
expand-symtabs, and renamed check-psymtabs.
* psymtab.c (maintenance_check_psymtabs): Renamed from
maintenance_check_symtabs. Only process already-expanded symbol
tables.
(_initialize_psymtab): Update.
* symmisc.c (maintenance_check_symtabs): New function.
(maintenance_expand_name_matcher): New function
(maintenance_expand_file_matcher): New function
(maintenance_expand_symtabs): New function.
(_initialize_symmisc): Add "mt check-symtabs" and "mt expand-symtabs"
commands.
doc/
* gdb.texinfo (Maintenance Commands): Update doc for
"maint check-psymtabs". Add doc for "maint check-symtabs",
"maint expand-symtabs".
testsuite/
* gdb.base/maint.exp: Update test for "maint check-psymtabs".
Add tests for "maint check-symtabs", "maint expand-symtabs".
Andrew Jenner <andrew@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
Julian Brown <julian@codesourcery.com>
Based on the nios2-elf port from Altera Corporation.
gdb/
* Makefile.in (ALL_TARGET_OBS): Add nios2-tdep.o and
nios2-linux-tdep.o.
(HFILES_NO_SRCDIR): Add nios2-tdep.h.
(ALLDEPFILES): Add nios2-tdep.c and nios2-linux-tdep.c.
* configure.tgt: Add nios2*-*-linux* and nios2*-*-* targets.
* nios2-tdep.h: New.
* nios2-tdep.c: New.
* nios2-linux-tdep.c: New.
* features/Makefile (WHICH): Add nios2-linux.
(nios2-linux-expedite): Set.
* features/nios2-cpu.xml: New.
* features/nios2.xml: New.
* features/nios2-linux.xml: New.
* features/nios2.c: New (autogenerated).
* features/nios2-linux.c: New (autogenerated).
* regformats/nios2-linux.dat: New (autogenerated).
* NEWS (Changes since GDB 7.6): Add new Nios II targets
and commands.
gdb/doc/
* gdb.texinfo (Nios II): New section.
(Nios II Features): New section.
Mention "set foo unlimited" in NEWS, right below the "New options"
section.
2013-04-16 Pedro Alves <palves@redhat.com>
Eli Zaretskii <eliz@gnu.org>
* NEWS: Mention "set foo unlimited".
2013-04-10 Hui Zhu <hui@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* configure.ac: Check libbabeltrace is installed.
* config.in: Regenerate.
* configure: Regenerate.
* Makefile.in (LIBBABELTRACE): New.
(CLIBS): Add LIBBABELTRACE.
* ctf.c: Include "exec.h".
(CTF_EVENT_ID_STATUS, CTF_EVENT_ID_TSV_DEF): New macros.
(CTF_EVENT_ID_TP_DEF, ctf_save_write_int32): New macros.
(ctf_save_metadata_header): Define new type aliases in
metadata.
(ctf_write_header): Define event type "tsv_def" and "tp_def"
in metadata. Start a new faked packet for trace status.
(ctf_write_status): Write trace status to CTF.
(ctf_write_uploaded_tsv): Write TSV to CTF.
(ctf_write_uploaded_tp): Write tracepoint definition to CTF.
(ctf_write_definition_end): End the faked packet.
(ctx, ctf_iter, trace_dirname): New.
(start_pos): New variable.
(ctf_destroy, ctf_open_dir, ctf_open): New.
(SET_INT32_FIELD, SET_ARRAY_FIELD, SET_STRING_FIELD): New
macros.
(ctf_read_tsv, ctf_read_tp, ctf_close, ctf_files_info): New.
(ctf_fetch_registers, ctf_xfer_partial): New.
(ctf_get_trace_state_variable_value): New.
(ctf_get_tpnum_from_frame_event): New.
(ctf_get_traceframe_address): New.
(ctf_trace_find, ctf_has_stack): New.
(ctf_has_registers, ctf_traceframe_info, init_ctf_ops): New.
(ctf_get_trace_status, ctf_read_status): New.
(_initialize_ctf): New.
* tracepoint.c (get_tracepoint_number): New
(get_uploaded_tsv): Remove 'static'.
(struct traceframe_info, trace_regblock_size): Move it to ...
* tracepoint.h: ... here.
(get_tracepoint_number): Declare it.
(get_uploaded_tsv): Declare it.
* NEWS: Mention new configure option.
gdb/doc/
2013-04-10 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (Trace Files): Add "target ctf".
gdb/testsuite/
2013-04-10 Yao Qi <yao@codesourcery.com>
* gdb.trace/actions.exp: Save trace data to CTF.
Change to ctf target if GDB supports, read CTF data in ctf
target, and check the actions of tracepoints.
* gdb.trace/while-stepping.exp: Likewise.
* gdb.trace/report.exp: Test GDB saves trace data to CTF
format and read CTF trace file if GDB supports.
* gdb.trace/tstatus.exp: Save trace data to CTF. If ctf
target is supported, change to ctf target, read trace data and
check output of command "tstatus".
* gdb.trace/tsv.exp: Save trace frame to CTF. If GDB supports,
read CTF data by target ctf and call check_tsv.
x86_64/Cygwin is only mentioned as a new target, but we gained support
for building a native x86_64/Cygwin debugger too.
gdb/
2013-04-03 Pedro Alves <palves@redhat.com>
* NEWS: Mention x86_64/Cygwin as new native configuration.
I hacked "apropos" to dump the whole set of commands (just make it
accept the entry string as regex), and then diffed the output of 7.5
vs 7.6, --enable-targets=all builds. That allowed then checking
whether some commands had not been mentioned in NEWS or the manual.
These are what I found missing. We've been a bit negligent in
requiring documentation bits for debug commands.
gdb/
2013-04-02 Pedro Alves <palves@redhat.com>
* NEWS: Mention "set/show debug aarch64", "set/show debug
coff-pe-read" and "set/show debug mach-o".
gdb/doc/
2013-04-02 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Debugging Output): Document "set/show debug
aarch64", "set/show debug coff-pe-read" and "set/show debug
mach-o".
The "New commands" section reads:
"New commands (for set/show, see "New options" below)"
gdb/
2013-04-02 Pedro Alves <palves@redhat.com>
* NEWS: Move "set debug notification" and "set trace-buffer-size"
under "New options".
GDB currently sends a qTStatus even if the target previously replied
an empty packet to a previous qTStatus. If the target doesn't
recognize the packet, there's no point in trying again.
The machinery we have in place is packet_ok, which has the nice side
effect of forcing one to install a configuration command/knob for the
packet in question, which is often handy when you need to debug
things, and/or emulate a target that doesn't support the packet, or even,
it can be used as workaround for the old broken kgdb's that return error
to qTSTatus instead of an empty packet.
gdb/
2013-03-28 Pedro Alves <palves@redhat.com>
* NEWS (New options): New section.
(New options): Mention set/show remote trace-status-packet.
* remote.c (PACKET_qTStatus): New enumeration value.
(remote_get_trace_status): Skip sending qTStatus if the packet is
disabled. Use packet_ok.
(_initialize_remote): Register a configuration command for
qTStatus packet.
gdb/doc/
2013-03-28 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Remote Configuration) <set remote @var{name}-packet
table>: Add entry for "trace-status".
* NEWS: Add entry.
* event-top.c: #include "maint.h".
* main.c: #include "maint.h".
* maint.c: #include <sys/time.h>, <time.h>, block.h, top.h,
timeval-utils.h, maint.h, cli/cli-setshow.h.
(per_command_time, per_command_space): New static globals.
(per_command_symtab): New static global.
(per_command_setlist, per_command_showlist): New static globals.
(struct cmd_stats): Move here from utils.c.
(set_per_command_time): Renamed from set_display_time in utils.c
and moved here. All callers updated.
(set_per_command_space): Renamed from set_display_space in utils.c
and moved here. All callers updated.
(count_symtabs_and_blocks): New function.
(report_command_stats): Moved here from utils.c. Add support for
printing symtab stats. Only print data if enabled before command
executed.
(make_command_stats_cleanup): Ditto.
(sert_per_command_cmd, show_per_command_cmd): New functions.
(_initialize_maint_cmds): Add new commands
mt set per-command {space,time,symtab} {on,off}.
* maint.h: New file.
* top.c: #include "maint.h".
* utils.c (reset_prompt_for_continue_wait_time): New function.
(get_prompt_for_continue_wait_time): New function.
* utils.h (reset_prompt_for_continue_wait_time): Declare
(get_prompt_for_continue_wait_time): Declare.
(make_command_stats_cleanup): Moved to maint.h.
(set_display_time, set_display_space): Moved to maint.h and renamed
to set_per_command_time, set_per_command_space.
* cli/cli-setshow.c (parse_cli_boolean_value): Renamed from
parse_binary_operation and made non-static. Don't call error,
just return an error marker. All callers updated.
* cli/cli-setshow.h (parse_cli_boolean_value): Declare.
doc/
* gdb.texinfo (Maintenance Commands): Add docs for
"mt set per-command {space,time,symtab} {on,off}".
testsuite/
* gdb.base/maint.exp: Update tests for per-command stats.
record-full.
Document two new record sub-commands "record instruction-history" and
"record function-call-history" and two associated set/show commands
"set record instruction-history-size" and "set record
function-call-history-size".
Add this to NEWS.
gdb/
* NEWS: Add record changes.
doc/
* gdb.texinfo (Process Record and Replay): Document record
changes.
Hafiz Abid Qadeer <abidh@codesourcery.com>
gdb/
* NEWS: Mention set and show trace-buffer-size commands.
Mention new packet.
* target.h (struct target_ops): New method
to_set_trace_buffer_size.
(target_set_trace_buffer_size): New macro.
* target.c (update_current_target): Set up new method.
* tracepoint.c (trace_buffer_size): New global.
(start_tracing): Send it to the target.
(set_trace_buffer_size): New function.
(_initialize_tracepoint): Add new setshow for trace-buffer-size.
* remote.c (remote_set_trace_buffer_size): New function.
(_initialize_remote): Use it.
(QTBuffer:size) New remote command.
(PACKET_QTBuffer_size): New enum.
(remote_protocol_features): Add an entry for
PACKET_QTBuffer_size.
gdb/gdbserver/
* tracepoint.c (trace_buffer_size): New global.
(DEFAULT_TRACE_BUFFER_SIZE): New define.
(init_trace_buffer): Change to one-argument function. Allocate
trace buffer memory.
(handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
handle QTBuffer:size packet.
(cmd_bigqtbuffer_size): New function.
(initialize_tracepoint): Call init_trace_buffer with
DEFAULT_TRACE_BUFFER_SIZE.
* server.c (handle_query): Add QTBuffer:size in the
supported packets.
gdb/doc/
* gdb.texinfo (Starting and Stopping Trace Experiments): Document
trace-buffer-size set and show commands.
(Tracepoint Packets): Document QTBuffer:size.
(General Query Packets): Document QTBuffer:size.
gdb/testsuite/
* gdb.trace/trace-buffer-size.exp: New file.
* gdb.trace/trace-buffer-size.c: New file.
Hafiz Abid Qadeer <abidh@codesourcery.com>
gdb/
* NEWS: Mention new field "trace-file".
* tracepoint.c (trace_status_mi): Output "trace-file" field.
(tfile_open): Record the trace file's filename in the trace
status.
(tfile_files_info): Mention the name of the trace file.
Check the "filename" field explicitely.
(trace_status_command): Explicitely check "filename" field.
(trace_find_command): Ditto.
(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.
* tracepoint.h (struct trace_status) <from_file>: Rename it
to "filename" and make it hold the trace file's filename
instead of a boolean.
* remote.c (remote_get_trace_status): Initialize "filename"
field with NULL instead of 0.
gdb/doc/
* gdb.texinfo (GDB/MI Tracepoint Commands) <-trace-status>:
Document the "trace-file" field.
gdb/testsuite/
* gdb.trace/tfile.exp: Add test for -trace-status command.
2013-02-06 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (GDB/MI Async Records): Document new MI
notification "=tsv-modified". Update the document of MI
notification "=tsv-created".
* observer.texi (GDB Observers): New observer tsv_modified.
Update observer tsv_created and tsv_deleted.
gdb:
2013-02-06 Yao Qi <yao@codesourcery.com>
* mi/mi-interp.c: Include "tracepoint.h".
(mi_tsv_modified): Declare.
(mi_tsv_created, mi_tsv_deleted): Update declaration.
(mi_interpreter_init): Call observer_attach_tsv_modified.
(mi_tsv_modified): New.
(mi_tsv_created, mi_tsv_deleted): Update.
* tracepoint.c (trace_variable_command): Call
observer_notify_tsv_modified if the initial value of tsv is
changed.
(delete_trace_state_variable): Call
observer_notify_tsv_deleted earlier.
(trace_variable_command): Caller update.
(create_tsv_from_upload): Likewise.
* observer.sh: Declare "struct trace_state_variable".
* NEWS: Mention the new MI notification "=tsv-modified".
gdb/testsuite:
2013-02-06 Yao Qi <yao@codesourcery.com>
* gdb.trace/mi-tsv-changed.exp (test_create_delete_tsv): Rename
to ...
(test_create_delete_modify_tsv): ... here. New test on modifying
the initial value of a tsv.
Add a new variable that controls a way in which filenames are
displayed.
* NEWS (set filename-display): New entry.
* source.c (filename_display_basename, filename_display_relative)
(filename_display_absolute, filename_display_kind_names)
(filename_display_string, show_filename_display_string)
(symtab_to_filename_for_display): New.
(_initialize_source): Added initialization of 'filename-display'
variable.
* source.h (symtab_to_filename_for_display): Added declaration.
* stack.c (print_frame): Added new variable and calling of a new
function and condition with this variable. Changed third argument of
calling of a function.
gdb/doc/
* gdb.texinfo (Backtrace): Added description of 'filename-display'
variable in 'set/show backtrace' section.
gdb/testsuite/
* gdb.dwarf2/dw2-dir-file-name.exp: New file.
* gdb.dwarf2/dw2-dir-file-name.c: New file.
internal representation of architecture via GDB Python API.
* Makefile.in: Add entries corresponding to the new file
python/py-arch.c.
* NEWS (Python Scripting): Add entries for the new class
gdb.Architecture and the new method gdb.Frame.architecture.
* python/py-arch.c: Implement gdb.Architecture class.
* python/py-frame.c (frapy_arch): Implement the method
gdb.Frame.architecture().
(frame_object_methods): Add 'architecture' to the method table.
* python/python-internal.h: Add declarations of new utility
functions.
* python/python.c (_initialize_python): Initialize
gdb.Architecture class.
* doc/gdb.texinfo (Architectures In Python): New sub-sub-section
describing the gdb.Architecture class.
(Frames In Python): Add description about the new method
gdb.Frame.architecture().
* testsuite/gdb.python/frame.exp: Add a test for
gdb.Frame.architecture() method.
* breakpoint.c (print_one_breakpoint_location): Display the
state of 'installed' of each non-pending location of a tracepoint
in both CLI and MI.
(download_tracepoint_locations): Notify 'breakpoint-modified'
observer if any tracepoint location is downloaded.
* tracepoint.c (start_tracing): Likewise.
(merge_uploaded_tracepoints): Record all modified
tracepoints and notify 'breakpoint-modified' observer for them.
* NEWS: Mention the change for CLI and MI.
gdb/doc:
2012-12-15 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (Listing Tracepoints): New item and example about
'installed on target' output.
Add more in the example about 'installed on target'.
(GDB/MI Breakpoint Commands): Doc about 'installed field.
gdb/testsuite:
2012-12-15 Yao Qi <yao@codesourcery.com>
* gdb.trace/mi-tracepoint-changed.exp (test_pending_resolved): Check
'installed' field in '=breakpoint-modified'.
(test_reconnect): Check 'installed' field in
'=breakpoint-modified' and '=breakpoint-created'.
* gdb.trace/actions.exp: Update test for 'installed' field.
* gdb.trace/change-loc.exp (tracepoint_change_loc_1):
(tracepoint_change_loc_2): Likewise.
Check 'info tracepoint' display nothing else.
* gdb.trace/deltrace.exp: Likewise.
* gdb.trace/infotrace.exp: Likewise.
* gdb.trace/mi-traceframe-changed.exp (test_tfind_remote):
Likewise.
* gdb.trace/passcount.exp: Likewise.
* gdb.trace/tracecmd.exp: Likewise.
* gdb.trace/while-stepping.exp: Likewise.
2012-11-16 Mircea Gherzan <mircea.gherzan@intel.com>
gdb/doc:
* gdb.texinfo (GDB/MI Catchpoint Commands): New section.
gdb/:
* NEWS: mention the -catch-load/-catch-unload MI commands.
* NEWS: Mention Python 3 support.
* varobj.c (value_get_print_value): Use
python_string_to_target_string.
* python/py-block.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
* python/py-breakpoint.c: Ditto.
* python/py-cmd.c: Ditto.
* python/py-event.c: Ditto.
* python/py-event.h: Ditto.
* python/py-evtregistry.c: Ditto.
* python/py-finishbreakpoint.c: Ditto.
* python/py-frame.c: Ditto.
* python/py-function.c: Ditto.
* python/py-infthread.c: Ditto.
* python/py-lazy-string.c: Ditto.
* python/py-progspace.c: Ditto.
* /python/py-symbol.c: Ditto.
* python/py-evts.c: (gdbpy_initialize_py_events): Add module
initialization for Python 3.
* python/py-inferior.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(infpy_read_memory): Return memoryview object if Python 3.
(infpy_write_memory): Use "s*" operand parsing code for Python 3.
(infpy_search_memory): Ditto.
(get_buffer): New function for Python 3.
* python/py-objfile.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(objfpy_dealloc): Use Py_TYPE to call tp_free.
* python/py-param.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(get_attr): Use PyUnicode_CompareWithASCIIString if Python 3.
(set_attr): Ditto.
* python/py-prettyprint.c (print_string_repr): use PyBytes methods
instead of PyString methods if Python 3.
(print_children): Skip push_dummy_python_frame call if Python 3.
* python/py-symtab.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(salpy_dealloc): Use Py_TYPE to call tp_free.
* python/py-type.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(field_dealloc): Use Py_TYPE to call tp_free.
(typy_dealloc): Ditto.
(type_object_as_number): Adjust struct initializations for
differences in layout for Python 2 vs. Python 3.
* python/py-utils.c (python_string_to_unicode): Omit non-Unicode
string case for Python 3.
(unicode_to_encoded_python_string): Shorten code (no functional
change).
(python_string_to_target_python_string): Comment that in Python 3
returned value is a Python "bytes" type.
(gdbpy_is_string): Omit non-Unicode string check in Python 3.
(gdb_py_object_from_longest): Omit non-long integer case in Python
3.
(gdb_py_object_from_ulongest): Ditto.
* python/py-value.c: Use PyVarObject_HEAD_INIT in initialization
of type objects.
(valpy_dealloc): Use Py_TYPE to call tp_free.
(valpy_int): Omit function if Python 3.
(convert_value_from_python): Use "%S" format (Python object as a
string) if Python 3.
(value_object_as_number): Adjust struct initializations for
differences in layout for Python 2 vs. Python 3.
* python/python-config.py: Adjust syntax for Python 3
compatibility.
Include "sys.abiflags" string as part of python library name, if
that attribute exists (Python 3).
* python/python-internal.h (IS_PY3): Define if Python 3.
(Py_TPFLAGS_HAVE_ITER, Py_TPFLAGS_CHECKTYPES): Define with
placeholder value if Python 3.
(PyInt_Check, PyInt_FromLong, PyInt_AsLong, PyString_FromString,
PyString_Decode, PyString_FromFormat, PyString_Check): Define as
analogous Python 3 API function if Python 3.
(PyVarObject_HEAD_INIT): Define if not already defined.
(Py_TYPE): Ditto.
* python/python.c (eval_python_command): Omit Py_FlushLine call if
Python 3.
Check return values of all Python API calls for error.
Supply dummy "python" and "python-interactive" commands if Python
initialization failed.
(_initialize_python): Convert argc to wchar_t** if Python 3.
Add module initialization for Python 3.
(finish_python_initialization): Pass wchar_t * argument to
PySys_SetPath if Python 3.
* python/lib/gdb/__init__.py: Define "reload" if Python 3.
(_GdbFile): New class for common output file behavior.
(GdbOutFile): Subclass from _GdbFile.
(GdbOutputErrorFile): Ditto.
(auto_load_packages): Adjust syntax for Python 3 compatibility.
* python/lib/gdb/printing.py: Define basestr and int if Python 3.
* python/lib/gdb/prompt.py: Use sorted() function rather than
sort() method.
* python/lib/gdb/command/explore.py: Define raw_input if Python 3.
Adjust syntax for Python 3 compatibility.
* python/lib/gdb/command/pretty_printers.py: Use sorted() function
rather than sort() method.
Adjust syntax for Python 3 compatibility.
* python/lib/gdb/command/type_printers.py: Ditto.
* doc/gdb.texinfo (Inferior.read_memory): Mention that the return
value is a memoryview object if Python 3.
(get_init_files): If --data-directory is provided,
and SYSTEM_GDBINIT lives in data-directory, look for it there.
* NEWS: Mention it.
doc/
* gdb.texinfo (System-wide configuration): If the system-wide init
file lives in the data-directory, and --data-directory is provided,
look for it there.
* mi/mi-main.c (mi_cmd_data_write_memory): Handle additional
parameter COUNT, for pattern filling of memory regions.
* NEWS: Mention it.
doc
* gdb.texinfo (GDB/MI Data Manipulation): Document new optional
parameter "count" of -data-write-memory-bytes, and add an example.
testsuite
* gdb.mi/mi-fill-memory.exp: New test.
* data-directory/Makefile.in (PYTHON_FILES): Add
type_printers.py.
* python/lib/gdb/command/type_printers.py: New file.
* python/lib/gdb/command/types.py (TypePrinter): New class.
(_get_some_type_recognizers, get_type_recognizers,
apply_type_recognizers, register_type_printer): New
functions.
* python/py-objfile.c (objfile_object) <type_printers>: New
field.
(objfpy_dealloc): Decref new field.
(objfpy_new): Set new field.
(objfpy_get_type_printers, objfpy_set_type_printers): New
functions.
(objfile_to_objfile_object): Set new field.
(objfile_getset): Add "type_printers".
* python/py-progspace.c (pspace_object) <type_printers>: New
field.
(pspy_dealloc): Decref new field.
(pspy_new): Set new field.
(pspy_get_type_printers, pspy_set_type_printers): New functions.
(pspace_to_pspace_object): Set new field.
(pspace_getset): Add "type_printers".
* python/python.c (start_type_printers, apply_type_printers,
free_type_printers): New functions.
(_initialize_python): Set gdb.type_printers.
* python/python.h (start_type_printers, apply_type_printers,
free_type_printers): Declare.
* typeprint.c (type_print_raw_options, default_ptype_flags):
Update for new fields.
(do_free_global_table, create_global_typedef_table,
find_global_typedef): New functions.
(find_typedef_in_hash): Use find_global_typedef.
(whatis_exp): Use create_global_typedef_table. Change cleanup
handling.
* typeprint.h (struct type_print_options) <global_typedefs,
global_printers>: New fields.
doc
* gdb.texinfo (Symbols): Document "info type-printers",
"enable type-printer" and "disable type-printer".
(Python API): Add new node to menu.
(Type Printing API): New node.
(Progspaces In Python): Document type_printers field.
(Objfiles In Python): Likewise.
(gdb.types) <get_type_recognizers, apply_type_recognizers,
register_type_printer, TypePrinter>: Document.
testsuite
* gdb.base/completion.exp: Update for "info type-printers".
* gdb.python/py-typeprint.cc: New file.
* gdb.python/py-typeprint.exp: New file.
* gdb.python/py-typeprint.py: New file.
* c-typeprint.c (c_type_print_base): Handle print_method and
print_typedefs flags.
* gdbcmd.h (setprinttypelist, showprinttypelist): Declare.
* python/py-type.c (typy_str): Use LA_PRINT_TYPE and raw
options.
* typeprint.c (type_print_raw_options, default_ptype_flags):
Update for new field.s
(whatis_exp): Parse flags. Use LA_PRINT_TYPE.
(setprinttypelist, showprinttypelist, print_methods,
print_typedefs): New globals.
(set_print_type, show_print_type, set_print_type_methods,
show_print_type_methods, set_print_type_typedefs,
show_print_type_typedefs): New functions.
(_initialize_typeprint): Update documentation. Add "print
type methods" and "print type typedefs" parameters.
* typeprint.h (struct type_print_options) <print_methods,
print_typedefs>: New fields.
doc
* gdb.texinfo (Symbols): Document "set print type methods",
"set print type typedefs", and flags to ptype and whatis.
gdb/ChangeLog
* source.c (print_source_lines_base): Add fullname field giving
full path to file in mi output.
* NEWS: Mention the new fullname field.
gdb/doc/ChangeLog
* gdb.texinfo (GDB/MI Data Manipulation): Add fullname field to
the example -data-disassemble output. Extend the description of
the -data-disassemble results to document all fields. Document
the cli disassemble command as being related to -data-disassemble.
gdb/testsuite/ChangeLog
* gdb.mi/mi-disassemble.exp: Expect fullname field in mi
disassembly output.
* python/python.c (finalize_python): New function.
(_initialize_python): Make a final cleanup.
testsuite
* gdb.python/python.exp: Test atexit.register.
Python interactive prompt with "pi" as alias, and add "py" as
an alias to "python".
* NEWS: Mention the new commands.
* doc/gdb.texinfo (Python Commands): Document the new
commands.
* python/python.c (eval_python_command): New function.
(python_interactive_command): For "python-interactive" with
arguments, call eval_python_command. For "python-interactive"
without arguments, call PyRun_InteractiveLoop.
(_initialize_python): Add "python-interactive" command with
"pi" as alias, and add "py" as an alias to "python".
2012-08-06 Nathaniel Flath <flat0103@gmail.com>
* NEWS: New entry for 'cd' default parameters.
* cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment.
gdb/doc/
2012-08-06 Nathaniel Flath <flat0103@gmail.com>
* gdb.texinfo (Working Directory): Added information about new
default argument for 'cd' command.
and delete reference to --use-deprecated-index-sections.
* symfile.h (use_deprecated_index_sections): Delete.
* dwarf2read.c (use_deprecated_index_sections): Make static.
(read_index_from_section): Update wording of how to load
deprecated index sections.
(_initialize_dwarf2_read): New options
"set/show use-deprecated-index-sections".
* main.c (captured_main): Delete --use-deprecated-index-sections.
doc/
* gdb.texinfo (Mode Options): Delete --use-deprecated-index-sections.
(Index Files): Document how to control the use of deprecated index
sections.
(Index Section Format): Replace --use-deprecated-index-sections with
"set use-deprecated-index-sections on".
* NEWS: Mention it.
* interps.h (interp_set_logging_ftype): New typedef.
(struct interp_procs): New field set_logging_proc.
(current_interp_set_logging): Declare.
* interps.c (current_interp_set_logging): New function.
* cli/cli-logging.c: Include interps.h.
(set_logging_redirect): Call current_interp_set_logging.
(pop_output_files): Ditto.
(handle_redirections): Ditto, plus skip ui-out redirect if MI.
* mi/mi-console.h (mi_console_set_raw): Declare.
* mi/mi-console.c (mi_console_set_raw): New function.
* mi/mi-interp.c (saved_raw_stdout): New global.
(mi_set_logging): New function.
(_initialize_mi_interp): Add it to interp procs.
* gdb.mi/mi-logging.exp: New file.
New attribute 'last' for gdb.Symtab_and_line.
* NEWS (Python Scripting): Add entry about the new attribute.
* python/py-symtab.c (salpy_get_last): New function which
implements the get method for the 'last' attribute of
gdb.Symtab_and_line.
(sal_object_getset): Add entry for the 'last' attribute.
doc/
* gdb.texinfo (Symbol Tables In Python): Add description about
the new 'last' attribute of gdb.Symtab_and line.
testsuite/
* gdb.python/py-symtab.exp: Add tests to test the new attribute
'last' of gdb.Symtab_and_line.
* gdb.python/py-symbol.c: Move break point comment to enable
testing of gdb.Symtab_and_line.last.
* NEWS: Document additions to .gdb_index.
* dwarf2read.c: #include "gdb/gdb-index.h".
(DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): New macro.
(DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): New macro.
(DW2_GDB_INDEX_CU_SET_VALUE): New macro.
(dwarf2_read_index): Recognize version 7.
(dw2_do_expand_symtabs_matching): New args want_specific_block,
block_kind, domain): All callers updated.
(dw2_find_symbol_file): Handle new index CU values.
(dw2_expand_symtabs_matching): Match symbol kind if requested.
(add_index_entry): New args is_static, kind. All callers updated.
(offset_type_compare, uniquify_cu_indices): New functions
(symbol_kind): New function.
(write_psymtabs_to_index): Remove duplicate CU values.
(write_psymtabs_to_index): Write .gdb_index version 7.
doc/
* gdb.texinfo (Index Section Format): Document version 7 format.
include/gdb/
* gdb-index.h: New file.
* NEWS (--with-auto-load-dir): Prepend $debugdir to the default path.
Describe it.
* auto-load.c (auto_load_expand_dir_vars): New function.
(auto_load_safe_path_vec_update): Use it, remove the
substitute_path_component call thanks to it.
(auto_load_objfile_script): Remove the debug_file_directory processing.
Use auto_load_expand_dir_vars, remove the substitute_path_component
call thanks to it.
* configure: Regenerate.
* configure.ac (--with-auto-load-dir): Prepend $debugdir to the default
path. Escape $ also for $debugdir.
(--with_auto_load_safe_path): Escape $ also for $debugdir.
* utils.c (substitute_path_component): Accept also DIRNAME_SEPARATOR.
gdb/doc/
* gdb.texinfo (Separate Debug Files): New anchor debug-file-directory.
Mention also --with-separate-debug-dir.
(Auto-loading): Prepend $debugdir in the sample output.
(Auto-loading safe path): Likewise. Mention also $debugdir for the
auto-load safe-path variable.
(objfile-gdb.py file): Remove the extra debug-file-directory paragraph.
Mention also $debugdir for 'set auto-load scripts-directory'.
Add a new function gdb.find_pc_line to the Python API.
* NEWS (Python Scripting): Add entry about the new function.
* python/python.c (gdbpy_find_pc_line): New function which
implements gdb.find_pc_line.
(GdbMethods): Add entry for the new function.
doc/
* gdb.texinfo (Basic Python): Add description about the function
gdb.find_pc_line
testsuite/
* gdb.python/python.c: Add a new breakpoint comment.
* gdb.python/python.exp: Add tests to test gdb.find_pc_line.
Kwok Cheung Yeung <kcy@codesourcery.com>
* NEWS: Describe new info os commands.
* common/linux-osdata.c (PID_T, TIME_T): Define.
(MAX_PID_T_STRLEN): New.
(linux_common_core_of_thread): Add comment. Change to use PID_T and
MAX_PID_T_STRLEN.
(command_from_pid): Add comment. Change to use PID_T.
(commandline_from_pid): Change to use PID_T.
(user_from_pid): Add comment.
(get_process_owner): Add comment. Change to use PID_T and
MAX_PID_T_STRLEN.
(get_number_of_cpu_cores): Add comment.
(get_cores_used_by_process): Add comment. Change to use PID_T and
MAX_PID_T_STRLEN.
(linux_xfer_osdata_processes): Change to use PID_T and
MAX_PID_T_STRLEN.
(compare_processes): New function.
(linux_xfer_osdata_processgroups): New function.
(linux_xfer_osdata_threads): Change to use PID_T.
(linux_xfer_osdata_fds): New function.
(format_socket_state, print_sockets): New functions.
(union socket_addr): New union.
(linux_xfer_osdata_isockets): New function.
(time_from_time_t, group_from_gid): New functions.
(linux_xfer_osdata_shm): New function.
(linux_xfer_osdata_sem): New function.
(linux_xfer_osdata_msg): New function.
(linux_xfer_osdata_modules): New function.
(osdata_table): Add new entries.
* common/buffer.c (buffer_xml_printf): Add support for long and
long long format specifiers.
* gdb.texinfo (Operating System Auxiliary Information): Document new
'info os' subcommands.
* gdb.base/info-os.exp: New file.
* gdb.base/info-os.c: New file.
Provide $ddir substitution for --with-auto-load-safe-path.
* NEWS (--with-auto-load-safe-path, --without-auto-load-safe-path): New
entries.
* auto-load.c: Include observer.h.
(auto_load_safe_path_vec_update): Call substitute_path_component for
each component. New variable ddir_subst.
(auto_load_gdb_datadir_changed): New function.
(set_auto_load_safe_path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
AUTO_LOAD_SAFE_PATH. New comment.
(_initialize_auto_load): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
AUTO_LOAD_SAFE_PATH. Install auto_load_gdb_datadir_changed.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac (--auto-load-safe-path): Rename
DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH. Default to
GDB_DATADIR/auto-load.
* defs.h (substitute_path_component): New declaration.
* top.c: Include observer.h.
(set_gdb_datadir): New function.
(init_main): Install it for "set data-directory".
* utils.c (substitute_path_component): New function.
gdb/doc/
Provide $ddir substitution for --with-auto-load-safe-path.
* gdb.texinfo (Auto-loading): Replace /usr/local by $ddir/auto-load.
(Auto-loading safe path): Likewise. Mention the default value,
$ddir substitution, --with-auto-load-safe-path and
--without-auto-load-safe-path.
* observer.texi (gdb_datadir_changed): New.
Add two new methods global_block and static_block to gdb.Symtab
objects.
* NEWS (Python scripting): Add entry about the new methods.
* python/py-symtab.c (stpy_global_block): New function which
implements the gdb.Symtab.global_block() method.
(stpy_static_block): New function which implements the
gdb.Symtab.static_block() method.
(symtab_object_methods): Add entries for the two new methods.
* testsuite/gdb.python/py-symbol.exp: Add tests to test the new
methods gdb.Symtab.global_block() and gdb.Symtab.static_block().
* tessuite/gdb.python/py-symbol.c: Add new struct to help test
gdb.Symtab.static_block().
* doc/gdb.texinfo (Symbol Tables In Python): Add documentation
about the new methods global_block and static_block on
gdb.Symtab objects.
Revert this patch to allow breakpoint always-inserted
in record target.
2011-12-05 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c: Include record.h.
(breakpoints_always_inserted_mode): Return false when the record
target is in use.
* breakpoint.c (iterate_over_bp_locations): New.
* breakpoint.h: Declare.
New typedef walk_bp_location_callback.
* record.c (record_open): Call record_init_record_breakpoints.
(record_sync_record_breakpoints): New.
(record_init_record_breakpoints): New.
* NEWS: Mention supporting breakpoint always-inserted mode in
record target.
New option "set auto-load safe-path".
* NEWS: New commands "set auto-load safe-path"
and "show auto-load safe-path".
* auto-load.c: Include gdb_vecs.h, readline/tilde.h and completer.h.
(auto_load_safe_path, auto_load_safe_path_vec)
(auto_load_safe_path_vec_update, set_auto_load_safe_path)
(show_auto_load_safe_path, add_auto_load_safe_path, filename_is_in_dir)
(filename_is_in_auto_load_safe_path_vec, file_is_auto_load_safe): New.
(source_gdb_script_for_objfile): New variable is_safe. Call
file_is_auto_load_safe. Return if it is not.
(struct loaded_script): New field loaded.
(maybe_add_script): Add parameter loaded. Initialize SLOT with it.
(print_script): Use LOADED indicator instead of FULL_PATH. Change
output "Missing" to "No".
(_initialize_auto_load): New variable cmd. Initialize
auto_load_safe_path. Register "set auto-load safe-path",
"show auto-load safe-path" and "add-auto-load-safe-path".
* auto-load.h (maybe_add_script): Add parameter loaded.
(file_is_auto_load_safe): New declaration.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: New parameters --with-auto-load-safe-path
and --without-auto-load-safe-path.
* linux-thread-db.c (try_thread_db_load_from_pdir_1)
(try_thread_db_load_from_dir): Check file_is_auto_load_safe first.
* main.c (captured_main): Check file_is_auto_load_safe for
LOCAL_GDBINIT.
* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile): New
variable is_safe. Call file_is_auto_load_safe. Return if it is not.
(source_section_scripts): Call file_is_auto_load_safe. Return if it is
not.
gdb/doc/
New option "set auto-load safe-path".
* gdb.texinfo (Auto-loading): Extend the "show auto-load"
and "info auto-load" examples for safe-path. Put there also references
for "set auto-load safe-path" and "show auto-load safe-path".
New menu item for Auto-loading safe path.
(Auto-loading safe path): New node.
(Python Auto-loading): Update the expected output from "Missing"
to "No".
gdb/testsuite/
New option "set auto-load safe-path".
* gdb.python/py-objfile-script.exp (set auto-load safe-path): New.
* gdb.python/py-section-script.exp (set auto-load safe-path): New.
auto-load: Implementation.
* NEWS: New descriptions for "info auto-load",
"info auto-load gdb-scripts", "info auto-load python-scripts",
"info auto-load local-gdbinit" and "info auto-load libthread-db".
Deprecate "info auto-load-scripts", "set auto-load-scripts on|off"
and "show auto-load-scripts". New description for "set auto-load",
"show auto-load", "set auto-load gdb-scripts",
"show auto-load gdb-scripts", "set auto-load python-scripts",
"show auto-load python-scripts", "set auto-load local-gdbinit",
"show auto-load local-gdbinit", "set auto-load libthread-db" and
"show auto-load libthread-db".
* auto-load.c: Remove include python/python-internal.h. Add includes
exceptions.h, cli/cli-script.h, gdbcmd.h, cli/cli-decode.h and
cli/cli-setshow.h.
(GDB_AUTO_FILE_NAME, source_gdb_script_for_objfile)
(auto_load_gdb_scripts, show_auto_load_gdb_scripts): New.
(gdbpy_global_auto_load): Rename to ...
(global_auto_load): ... here.
(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
(auto_load_local_gdbinit_loaded, show_auto_load_local_gdbinit)
(script_language_gdb, source_gdb_script_for_objfile): New.
(struct loaded_script): New field language.
(hash_loaded_script_entry, eq_loaded_script_entry): Calculate also
LANGUAGE.
(maybe_add_script): Add parameter language. Drop redundant
entry.full_path initialization. Initialize entry.language and
(*slot)->language.
(auto_load_objfile_script): Change parameter suffix to language.
Remove the call of maybe_add_script.
Call language->source_script_for_objfile.
(load_auto_scripts_for_objfile, struct collect_matching_scripts_data):
New.
(collect_matching_scripts): Adjust it for
struct collect_matching_scripts_data.
(auto_load_info_scripts_pattern_nl): New variable.
(info_auto_load_scripts): Rename to ...
(auto_load_info_scripts): ... here, add parameter language. Adjust it
for struct collect_matching_scripts_data.
(info_auto_load_gdb_scripts, info_auto_load_local_gdbinit)
(set_auto_load_cmd, auto_load_set_cmdlist_get, show_auto_load_cmd)
(auto_load_show_cmdlist_get, info_auto_load_cmd)
(auto_load_info_cmdlist_get): New.
(_initialize_auto_load): Move add_info of "auto-load-scripts" to
python/py-auto-load.c. New installment for "set auto-load gdb-scripts",
"info auto-load gdb-scripts", "set auto-load local-gdbinit" and
"info auto-load local-gdbinit".
* auto-load.h (struct script_language): New.
(gdbpy_global_auto_load): Rename to ...
(global_auto_load): ... here.
(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
(auto_load_local_gdbinit_loaded): New declarations.
(maybe_add_script): New parameter language.
(auto_load_objfile_script): Change parameter suffix to language.
(load_auto_scripts_for_objfile, auto_load_info_scripts_pattern_nl)
(auto_load_info_scripts, auto_load_set_cmdlist_get)
(auto_load_show_cmdlist_get, auto_load_info_cmdlist_get): New
declarations.
* linux-thread-db.c: Include auto-load.h and ctype.h.
(auto_load_thread_db, show_auto_load_thread_db): New.
(struct thread_db_info): New field filename.
(delete_thread_db_info): Call xfree for FILENAME.
(try_thread_db_load): Initialize FILENAME.
(try_thread_db_load_from_pdir, try_thread_db_load_from_dir): Return
if !AUTO_LOAD_THREAD_DB.
(info_auto_load_libthread_db_compare, info_auto_load_libthread_db): New.
(_initialize_thread_db): Install auto_load_thread_db
as "set auto-load libthread-db" and install info_auto_load_libthread_db
as "info auto-load libthread-db".
* main.c (captured_main): Rename gdbpy_global_auto_load to
global_auto_load. Initialize AUTO_LOAD_LOCAL_GDBINIT_PATHNAME and
AUTO_LOAD_LOCAL_GDBINIT_LOADED.
(print_gdb_help): Extend the help for 'local init file'.
* python/py-auto-load.c: Remove a comment about gdb scripts extension.
(GDBPY_AUTO_SECTION_NAME): Extend the comment it is Python specific.
(auto_load_scripts): Rename to ...
(auto_load_python_scripts): ... here, update the comment.
(gdbpy_load_auto_script_for_objfile): New declaration.
(show_auto_load_python_scripts, script_language_python)
(gdbpy_load_auto_script_for_objfile): New.
(source_section_scripts): Refactor the code.
(load_auto_scripts_for_objfile): Rename to ...
(gdbpy_load_auto_scripts_for_objfile): ... here, update the
auto_load_objfile_script caller, drop GDBPY_GLOBAL_AUTO_LOAD checking.
(info_auto_load_python_scripts): New.
(gdbpy_initialize_auto_load): New variables cmd and cmd_name.
Rename "set auto-load-scripts" to "set auto-load python-scripts".
Register "set auto-load-scripts" as its deprecated alias. Register
"info auto-load python-scripts". Register "info auto-load-scripts" as
its deprecated alias.
(load_auto_scripts_for_objfile): Rename to ...
(gdbpy_load_auto_scripts_for_objfile): ... here.
* python/python.h (load_auto_scripts_for_objfile): Rename to ...
(gdbpy_load_auto_scripts_for_objfile): ... here.
gdb/doc/
auto-load: Implementation.
* gdb.texinfo (Mode Options): New anchor for -nx.
(Startup): New anchors for Option -init-eval-command,
Home Directory Init File
and Init File in the Current Directory during Startup.
Mention set auto-load local-gdbinit with a reference.
Change the sample code to "set auto-load python-scripts".
(Threads): New anchor set libthread-db-search-path.
Provide references to libthread_db.so.1 file.
(Controlling GDB): New menu item for Auto-loading.
(Auto-loading, Init File in the Current Directory)
(libthread_db.so.1 file, objfile-gdb.gdb file): New nodes.
(Python): Rename the menu item Auto-loading to Python Auto-loading.
(Writing a Pretty-Printer, Objfiles In Python): Update the renamed
reference.
(Auto-loading): Rename to ...
(Python Auto-loading): ... here. Change "set auto-load-scripts" to
"set auto-load python-scripts", new anchor for it. Change
"show auto-load-scripts" to "show auto-load python-scripts", new anchor
for it. Change "info auto-load-scripts"
to "info auto-load python-scripts", new anchor for it. Change "scripts"
to "Python scripts".
gdb/testsuite/
auto-load: Implementation.
* gdb.base/help.exp (test set height): Increase the height.
* gdb.python/py-objfile-script.exp (info auto-load-scripts): Change
to ...
(info auto-load python-scripts): ... here.
* gdb.python/py-section-script.exp (info auto-load-scripts *): Change
to ...
(info auto-load python-scripts *): ... here.
New command 'explore' which helps explore values and types in
scope.
* NEWS: Add an entry about the new 'explore' command.
* data-directory/Makefile.in: Add gdb/command/explore.py
* python/lib/gdb/command/explore.py: Implemention of the 'explore'
command using the GDB Python API.
* doc/gdb.texinfo (Examining Data): Document the 'explore'
command.
* testsuite/gdb.python/Makefile.in: Add py-explore to EXECUTABLES.
* testsuite/gdb.python/py-explore.c: C program used for testing
the new 'explore' command on C constructs.
* testsuite/gdb.python/py-explore.cc: C++ program used for testing
the new 'explore' command on C++ constructs.
* testsuite/gdb-python/py-explore.exp: Tests for the new 'explore'
command on C constructs.
* testsuite/gdb-python/py-explore-cc.exp: Tests for the new
'explore' command on C++ constructs.
set_gdbarch_process_record.
Initialize `arm_swi_record' field.
* arm-tdep.c (arm_process_record): New function.
(deallocate_reg_mem): New function.
(decode_insn): New function.
(thumb_record_branch): New function.
(thumb_record_ldm_stm_swi(): New function.
(thumb_record_misc): New function.
(thumb_record_ld_st_stack): New function.
(thumb_record_ld_st_imm_offset): New function.
(thumb_record_ld_st_reg_offset(): New function.
(thumb_record_add_sub_cmp_mov): New function.
(thumb_record_shift_add_sub): New function.
(arm_record_coproc_data_proc): New function.
(arm_record_coproc): New function.
(arm_record_b_bl): New function.
(arm_record_ld_st_multiple): New function.
(arm_record_ld_st_reg_offset): New function.
(arm_record_ld_st_imm_offset): New function.
(arm_record_data_proc_imm): New function.
(arm_record_data_proc_misc_ld_str): New function.
(arm_record_extension_space): New function.
(arm_record_strx): New function.
(sbo_sbz): New function.
(struct insn_decode_record): New structure for arm insn record.
(REG_ALLOC): New macro for reg allocations.
(MEM_ALLOC): New macro for memory allocations.
* arm-tdep.h (struct gdbarch_tdep): New field 'arm_swi_record'
Python scripting: Add new method Value.referenced_value to
gdb.Value which can dereference pointer as well as reference
values.
* NEWS: Add entry under 'Python scripting' about the new method
Value.referenced_value on gdb.Value objects.
* python/py-value.c (valpy_referenced_value): New function
defining a new method on gdb.Value objects which can dereference
pointer and reference values.
* testsuite/gdb.python/py-value.cc: Add test case for
testing the methodology exposing C++ values to Python.
* testsuite/gdb.python/py-value-cc.exp: Add tests testing the
methodology exposing C++ values to Python.
* testsuite/gdb.python/Makefile.in: Add py-value-cc to
EXECUTABLES.
* docs/gdb.texinfo (Python API/Values From Inferior): Add
description about the new method Value.referenced_value. Add
description on how Value.dereference is different (and similar)
to Value.referenced_value.
* NEWS: Describe new options --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
* main.c (struct cmdarg): New enum items CMDARG_INIT_FILE and
CMDARG_INIT_COMMAND.
(captured_main): New enum items OPT_IX and OPT_IEX. Add
"init-command", "init-eval-command", "ix" and "iex" to the variable
long_options. Handle OPT_IX and OPT_IEX. Process them from CMDARG_VEC.
New comment for CMDARG_FILE and CMDARG_COMMAND processing.
(print_gdb_help): Describe --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
gdb/doc/
* gdb.texinfo (File Options): Describe --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
(Startup): Describe -iex and -ix. Simplify the example
for "set auto-load-scripts off".
gdb/testsuite/
* gdb.gdb/selftest.exp (do_steps_and_nexts): New entry
for cmdarg_vec = NULL. Remove entries for cmdsize = 1, cmdarg = and
ncmd = 0. New entry for VEC_cleanup cmdarg_s.
PR breakpoints/10738
* dwarf2read.c (use_deprecated_index_sections): New global.
(struct partial_die_info): New member may_be_inlined.
(read_partial_die): Set may_be_inlined where appropriate.
(add_partial_subprogram): Add partial symbols for partial
DIEs that may be inlined.
(new_symbol_full): Add inlined subroutines to the current
scope.
(write_psymtabs_to_index): Bump version number.
(dwarf2_read_index): Read only version 6 indices unless
use_deprecated_index_sections is set.
* linespec.c (symbol_and_data_callback): New structure.
(iterate_inline_only): New function.
(iterate_over_all_matching_symtabs): New argument
"include_inline". If nonzero, also call the callback for
symbols representing inlined subroutines.
(lookup_prefix_sym): Pass extra argument to the above.
(find_function_symbols): Likewise.
(add_matching_symbols_to_info): Likewise.
* NEWS: Mention that GDB can now set breakpoints on inlined
functions.
gdb/doc:
PR breakpoints/10738
* gdb.texinfo (Inline Functions): Remove the now-unnecessary @item
stating that GDB cannot set breakpoints on inlined functions.
(Mode Options): Document --use-deprecated-index-sections.
(Index Section Format): Document new index section version format.
gdb/testsuite:
PR breakpoints/10738
* gdb.opt/inline-break.exp: New file.
* gdb.opt/inline-break.c: Likewise.
* gdb.dwarf2/inline-break.exp: Likewise.
* gdb.dwarf2/inline-break.S: Likewise.
* gdb.base/annota1.exp: Cope with old .gdb_index warnings.
* gdb.base/async-shell.exp: Likewise.
* lib/mi-support.exp (library_loaded_re): Likewise.
* cli/cli-cmds.c (show_user): Print error when used on a python
command.
(init_cli_cmds): Update documentation strings for "show user" and
"set/show max-user-call-depth" to clarify that it does not apply to
python commands.
* python/py-cmd.c (cmdpy_init): Treat class_user as a valid class in
error check.
(gdbpy_initialize_commands): Add COMMAND_USER as a constant in
gdb python api.
* top.c (execute_command): Only execute a user-defined command as a
legacy macro if c->user_commands is set.
doc/
* gdb.texinfo (Commands In Python): Put example python macro in
COMMAND_USER category rather than COMMAND_OBSCURE.
Document gdb.COMMAND_USER.
(User-defined Commands): Update documentation to clarify
"set/show max-user-call-depth" and "show user" don't apply to python
commands. Update documentation to clarify "help user-defined" may
also include python commands defined as COMMAND_USER.
testsuite/
* gdb.python/py-cmd.exp: Add test to verify that python commands can
be put in the user-defined category and that the commands appear in
"help user-defined".
* solib.c (update_solib_list): Update the program space's
added_solibs and deleted_solibs fields.
* progspace.h (struct program_space) <added_solibs,
deleted_solibs>: New fields.
(clear_program_space_solib_cache): Declare.
* progspace.c (release_program_space): Call
clear_program_space_solib_cache.
(clear_program_space_solib_cache): New function.
* infrun.c (handle_inferior_event) <TARGET_WAITKIND_LOADED>: Call
bpstat_stop_status. Use handle_solib_event.
* breakpoint.c: Include gdb_regex.h.
(print_solib_event): New function.
(bpstat_print): Use print_solib_event.
(bpstat_stop_status): Add special case for bp_shlib_event.
(handle_solib_event): New function.
(bpstat_what): Use handle_solib_event.
(struct solib_catchpoint): New.
(dtor_catch_solib, insert_catch_solib, remove_catch_solib)
(breakpoint_hit_catch_solib, check_status_catch_solib)
(print_it_catch_solib, print_one_catch_solib)
(print_mention_catch_solib, print_recreate_catch_solib): New
functions.
(catch_solib_breakpoint_ops): New global.
(catch_load_or_unload, catch_load_command_1)
(catch_unload_command_1): New functions.
(internal_bkpt_check_status): Add special case for
bp_shlib_event.
(internal_bkpt_print_it): Use print_solib_event.
(initialize_breakpoint_ops): Initialize
catch_solib_breakpoint_ops.
(_initialize_breakpoint): Register "catch load" and "catch
unload".
* breakpoint.h (handle_solib_event): Declare.
* NEWS: Add entry for "catch load" and "catch unload".
gdb/doc
* gdb.texinfo (Set Catchpoints): Document "catch load" and "catch
unload".
(Files): Mention new catch commands.
(GDB/MI Async Records): Likewise.
gdb/testsuite
* lib/mi-support.exp (mi_expect_stop): Add special case for
solib-event.
* gdb.base/catch-load-so.c: New file.
* gdb.base/catch-load.exp: New file.
* gdb.base/catch-load.c: New file.
* gdb.base/break-interp.exp (reach_1): Update regexp.
* NEWS: Add item.
* symtab.h (compare_filenames_for_search): Declare.
* symtab.c (compare_filenames_for_search): New function.
(iterate_over_some_symtabs): Use it.
* symfile.h (struct quick_symbol_functions)
<map_symtabs_matching_filename>: Change spec.
* psymtab.c (partial_map_symtabs_matching_filename): Use
compare_filenames_for_search. Update for new spec.
* dwarf2read.c (dw2_map_symtabs_matching_filename): Use
compare_filenames_for_search. Update for new spec.
* breakpoint.c (clear_command): Use compare_filenames_for_search.
gdb/doc
* gdb.texinfo (Specify Location): Document relative file name
handling.
gdb/testsuite
* gdb.linespec/linespec.exp: Change some tests to use $decimal.
Add tests for relative directory.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-finishbreakpoint.o.
(SUBDIR_PYTHON_SRCS): Add python/py-finishbreakpoint.c.
Add build rule for this file.
* infcmd.c (print_return_value): Split to create get_return_value.
(get_return_value): New function based on print_return_value. Handle
case where stop_registers are not set.
* inferior.h (get_return_value): New prototype.
* python/py-breakpoint.c (bppy_pending_object): Make non-static.
(gdbpy_breakpoint_created): Set is_py_finish_bp is necessary.
(struct breakpoint_object): Move to python-internal.h
(BPPY_REQUIRE_VALID): Likewise.
(BPPY_SET_REQUIRE_VALID): Likewise.
(gdbpy_breakpoint_created): Initialize is_finish_bp.
(gdbpy_should_stop): Add pre/post hooks before/after calling stop
method.
* python/python-internal.h (breakpoint_object_type): Add as extern.
(bppy_pending_object): Likewise.
(typedef struct breakpoint_object) Removed.
(struct breakpoint_object): Moved from py-breakpoint.c.
Add field is_finish_bp.
(BPPY_REQUIRE_VALID): Moved from py-breakpoint.c.
(BPPY_SET_REQUIRE_VALID): Likewise.
(frame_object_to_frame_info): New prototype.
(gdbpy_initialize_finishbreakpoints): New prototype.
(bpfinishpy_is_finish_bp): Likewise.
(bpfinishpy_pre_stop_hook): Likewise.
(bpfinishpy_post_stop_hook): Likewise.
* python/py-finishbreakpoint.c: New file.
* python/py-frame.c(frame_object_to_frame_info): Make non-static and
accept PyObject instead of frame_object.
(frapy_is_valid): Don't cast to frame_object.
(frapy_name): Likewise.
(frapy_type): Likewise.
(frapy_unwind_stop_reason): Likewise.
(frapy_pc): Likewise.
(frapy_block): Likewise.
(frapy_function): Likewise.
(frapy_older): Likewise.
(frapy_newer): Likewise.
(frapy_find_sal): Likewise.
(frapy_read_var): Likewise.
(frapy_select): Likewise.
* python/python.c (gdbpy_is_stopped_at_finish_bp): New noop function.
(_initialize_python): Add gdbpy_initialize_finishbreakpoints.
* python/python.h: Include breakpoint.h
(gdbpy_is_stopped_at_finish_bp): New prototype.
doc/
* gdb.texinfo (Finish Breakpoints in Python): New subsection.
(Python API): Add menu entry for Finish Breakpoints.
testsuite/
* Makefile.in (EXECUTABLES): Add py-finish-breakpoint and
py-finish-breakpoint2
(MISCALLANEOUS): Add py-events-shlib.so and py-events-shlib-nodebug.so
* gdb.python/py-breakpoint.exp (mult_line): Define and use variable
instead of line number.
* gdb.python/py-finish-breakpoint.c: New file.
* gdb.python/py-finish-breakpoint.exp: New file.
* gdb.python/py-finish-breakpoint.py: New file.
* gdb.python/py-finish-breakpoint2.cc: New file.
* gdb.python/py-finish-breakpoint2.exp: New file.
* gdb.python/py-finish-breakpoint2.py: New file.
* breakpoint.h (struct tracepoint): New field traceframe_usage.
* breakpoint.c (print_one_breakpoint_location): Identify
tracepoints as such when reporting hit counts, report
trace buffer usage.
(create_tracepoint_from_upload): Copy status info.
* tracepoint.h (struct trace_status): Rename error_desc to stop_desc,
add fields user_name, notes, start_time, stop_time.
(struct uploaded_tp): Add fields hit_count, traceframe_usage.
* tracepoint.c (trace_user): New global.
(trace_notes): New global.
(trace_stop_notes): New global.
(start_tracing): Add argument and trace note handling.
(stop_tracing): Ditto.
(trace_start_command): Add notes argument.
(trace_stop_command): Ditto.
(trace_status_command): Report additional status info.
(trace_status_mi): Similarly.
(trace_save): Update, record tracepoint status.
(set_disconnected_tracing): Call target method directly.
(send_disconnected_tracing_value): Remove.
(set_trace_user): New function.
(set_trace_notes): New function.
(set_trace_stop_notes): New function.
(parse_trace_status): Handle additional status.
(parse_tracepoint_status): New function.
(parse_tracepoint_definition): Call it.
(tfile_get_tracepoint_status): New function.
(init_tfile_ops): Use it.
(_initialize_tracepoint): Add new setshows.
* target.h (struct target_ops): New methods to_get_tracepoint_status
and to_set_trace_notes.
(target_get_tracepoint_status): New macro.
(target_set_trace_notes): New macro.
* target.c (update_current_target): Add new methods.
* remote.c (remote_get_tracepoint_status): New function.
(remote_set_trace_notes): New function.
(init_remote_ops): Add them.
* mi/mi-main.c (mi_cmd_trace_start): Add argument to call.
(mi_cmd_trace_stop): Ditto.
* tracepoint.c (struct tracepoint): New field traceframe_usage.
(tracing_start_time): New global.
(tracing_stop_time): New global.
(tracing_user_name): New global.
(tracing_notes): New global.
(tracing_stop_note): New global.
(cmd_qtstart): Set traceframe_usage, start_time.
(stop_tracing): Set stop_time.
(cmd_qtstatus): Report additional status.
(cmd_qtp): New function.
(handle_tracepoint_query): Call it.
(cmd_qtnotes): New function.
(handle_tracepoint_general_set): Call it.
(get_timestamp): Rename from tsv_get_timestamp.
* gdb.texinfo (Starting and Stopping Trace Experiments): Document
note-related options and variables.
(Tracepoint Packets): Document packet changes.
* gdb.trace/tstatus.exp: New.
* gdb.trace/actions.c: Include string.h.
Kwok Cheung Yeung <kcy@codesourcery.com>
* NEWS: Document shorter fast tracepoints and qTMinFTPILen packet.
* i386-tdep.c (i386_fast_tracepoint_valid_at): Query target for
the minimum instruction size for fast tracepoints.
* target.h (struct target_ops): Add new method
to_get_min_fast_tracepoint_insn_len.
(target_get_min_fast_tracepoint_insn_len): New.
* target.c (update_current_target): Set up new target operation.
* remote.c (remote_write_bytes_aux): Fix typo.
(remote_get_min_fast_tracepoint_insn_len): New.
(init_remote_ops): Initialize new field.
* gdb.texinfo (Create and Delete Tracepoints): Describe what is
needed to get shorter fast tracepoints.
(Tracepoint Packets): Document new qTMinFTPILen packet.
* linux-x86-low.c (small_jump_insn): New.
(i386_install_fast_tracepoint_jump_pad): Add arguments for
trampoline and error message, build a trampoline and issue a small
jump instruction to it.
(x86_install_fast_tracepoint_jump_pad): Add arguments for
trampoline and error message.
(x86_get_min_fast_tracepoint_insn_len): New.
(the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
* linux-low.h (struct linux_target_ops): Add arguments to
install_fast_tracepoint_jump_pad operation, add new operation.
* linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
arguments.
(linux_get_min_fast_tracepoint_insn_len): New function.
(linux_target_op): Add new operation.
* tracepoint.c (gdb_trampoline_buffer): New IPA variable.
(gdb_trampoline_buffer_end): Ditto.
(gdb_trampoline_buffer_error): Ditto.
(struct ipa_sym_addresses): Add fields for new IPA variables.
(symbol_list): Add entries for new IPA variables.
(struct tracepoint): Add fields to hold the address range of the
trampoline used by the tracepoint.
(trampoline_buffer_head): New static variable.
(trampoline_buffer_tail): Ditto.
(claim_trampoline_space): New function.
(have_fast_tracepoint_trampoline_buffer): New function.
(clone_fast_tracepoint): Fill in trampoline fields of tracepoint
structure.
(install_fast_tracepoint): Ditto, also add error buffer argument.
(cmd_qtminftpilen): New function.
(handle_tracepoint_query): Add response to qTMinFTPILen packet.
(fast_tracepoint_from_trampoline_address): New function.
(fast_tracepoint_collecting): Handle trampoline as part of jump
pad space.
(set_trampoline_buffer_space): New function.
(initialize_tracepoint): Initialize new IPA variables.
* target.h (struct target_ops): Add arguments to
install_fast_tracepoint_jump_pad operation, add new
get_min_fast_tracepoint_insn_len operation.
(target_get_min_fast_tracepoint_insn_len): New.
(install_fast_tracepoint_jump_pad): Add arguments.
* server.h (IPA_BUFSIZ): Define.
* linux-i386-ipa.c: Include extra header files.
(initialize_fast_tracepoint_trampoline_buffer): New function.
(initialize_low_tracepoint): Call it.
* server.h (set_trampoline_buffer_space): Declare.
(claim_trampoline_space): Ditto.
(have_fast_tracepoint_trampoline_buffer): Ditto.
* gdb.trace/ftrace.c: New.
* gdb.trace/ftrace.exp: New.
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.
* 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.
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.
* NEWS: Document the new gdbserver --once option.
gdb/doc/
* gdb.texinfo (Starting and Stopping Trace Experiments): New anchor
for disconnected tracing.
(Multi-Process Mode for @code{gdbserver}): Mention --multi and
extended-remote relationship. Mention --once.
(TCP port allocation lifecycle of @code{gdbserver}): New.
gdb/gdbserver/
* remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
(remote_prepare): New function with most of the TCP code from ...
(remote_open): ... here. Detect PORT here unconditionally. Move also
setting transport_is_reliable.
* server.c (run_once): New variable.
(gdbserver_usage): Document it.
(main): Set run_once for `--once'. Call remote_prepare. Exit after
the first run if RUN_ONCE.
* server.h (run_once, remote_prepare): New declarations.
gdb/testsuite/
* gdb.base/solib-disc.exp: Set gdbserver_reconnect_p.
* lib/gdb.exp (gdb_init): Clear gdbserver_reconnect_p.
* lib/gdbserver-support.exp (gdbserver_start): Add `--once' if
!gdbserver_reconnect_p..
(gdbserver_reconnect): Call error if !gdbserver_reconnect_p..
Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Implement support for PowerPC BookE ranged breakpoints.
gdb/
* NEWS: Mention support for ranged breakpoints on embedded PowerPC.
* breakpoint.h (struct bp_target_info) <length>: New member
variable.
(struct breakpoint_ops) <breakpoint_hit>: Take struct bp_location
instead of struct breakpoint as argument, and also add ASPACE
and BP_ADDR arguments. Update all callers.
(struct breakpoint_ops) <print_one_detail>: New method.
(struct breakpoint) <addr_string_range_end>: New member variable.
* breakpoint.c (breakpoint_location_address_match): Add function
prototype.
(insert_bp_location): Set bl->target_info.length.
(breakpoint_here_p): Call breakpoint_location_address_match.
(moribund_breakpoint_here_p): Likewise.
(regular_breakpoint_inserted_here_p): Likewise.
(breakpoint_thread_match): Likewise.
(bpstat_stop_status): Likewise.
(bpstat_check_location): Move call to
breakpoint_ops.breakpoint_hit to the top.
(print_one_breakpoint_location): Call
breakpoint_ops.print_one_detail if available.
(breakpoint_address_match_range): New function.
(breakpoint_location_address_match): Likewise.
(breakpoint_locations_match): Compare the length field of the
locations too.
(hw_breakpoint_used_count): Count resources used by all locations
in a breakpoint, and use breakpoint_ops.resources_needed if
available.
(breakpoint_hit_ranged_breakpoint): New function.
(resources_needed_ranged_breakpoint): Likewise.
(print_it_ranged_breakpoint): Likewise.
(print_one_ranged_breakpoint): Likewise.
(print_one_detail_ranged_breakpoint): Likewise.
(print_mention_ranged_breakpoint): Likewise.
(print_recreate_ranged_breakpoint): Likewise.
(ranged_breakpoint_ops): New structure.
(find_breakpoint_range_end): New function.
(break_range_command): Likewise.
(delete_breakpoint): Free addr_string_range_end.
(update_breakpoint_locations): Add SALS_END argument. Update
all callers. Calculate breakpoint length if a non-zero SALS_END
is given. Call breakpoint_locations_match instead of
breakpoint_address_match.
(reset_breakpoint): Find SaL of the end of the range if B is a
ranged breakpoint.
(_initialize_breakpoint): Register break-range command.
* defs.h (print_core_address): Add function prototype.
* ppc-linux-nat.c (ppc_linux_ranged_break_num_registers): New
function.
(ppc_linux_insert_hw_breakpoint): Support ranged breakpoints.
(ppc_linux_remove_hw_breakpoint): Likewise.
(_initialize_ppc_linux_nat): Initialize
to_ranged_break_num_registers.
* target.c (update_current_target): Add comment about
to_ranged_break_num_registers.
(target_ranged_break_num_registers): New function.
* target.h (struct target_ops) <to_ranged_break_num_registers>:
New method.
(target_ranged_break_num_registers): Add function prototype.
* ui-out.c (ui_out_field_core_addr): Move address-printing logic to ...
* utils.c (print_core_address): ... here.
gdb/doc/
* gdb.texinfo (PowerPC Embedded): Document ranged breakpoints.
This simulates a CFI flash. Its pretty configurable via the device
tree. For now, only basic read/write/erase operations are supported
for the Intel command set, but it's easy enough to extend support.
It's certainly enough to trick Das U-Boot into using it for probing,
reading, writing, and erasing.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* command.h (enum command_class): New class 'no_set_class', for
"show" commands without a corresponding "set" command.
* value.c (_initialize_values): Use 'no_set_class' for "show values".
* copying.c (_initialize_copying): Ditto for "show copying" and
"show warranty".
* cli/cli-cmds.c (init_cli_cmds): Ditto for "show commands" and
"show version".
* cli/cli-setshow.c (cmd_show_list): Skip "show" commands for
which there is no corresponding "set" command (eg. "show copying").
2011-02-14 Michael Snyder <msnyder@vmware.com>
* gdb.texinfo (threads): Document argument for "info threads" cmd.
Document new command "thread find".
2011-02-15 Michael Snyder <msnyder@vmware.com>
* gdb.base/default.exp: Add tests for thread commands.
* gdb.base/help.exp: Add tests for thread commands.
* gdb.threads/thread-find.exp: New test for thread find command.
2011-02-04 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.python/py-evthreads.c: New file.
* gdb.python/py-evthreads.exp: New file.
* gdb.python/py-events.py: New file.
* gdb.python/py-events.exp: New file.
* gdb.python/py-events.c: New file.
2011-02-04 Sami Wagiaalla <swagiaal@redhat.com>
Oguz Kayral <oguzkayral@gmail.com>
* python/py-inferior.c (python_on_normal_stop): New function.
(python_on_resume): New function.
(python_inferior_exit): New function.
(gdbpy_initialize_inferior): Add normal_stop, target_resumed, and
inferior_exit observers.
* python/py-evtregistry.c: New file.
* python/py-threadevent.c : New file.
* python/py-event.c: New file.
* python/py-evts.c: New file.
* python/py-continueevent.c: New file.
* python/py-bpevent.c: New file.
* python/py-signalevent.c: New file.
* python/py-exetiedevent.c: New file.
* python/py-breakpoint.c (gdbpy_breakpoint_from_bpstats): New function.
Move struct breakpoint_object from here...
* python/python-internal.h: ... to here.
* python/py-event.h: New file.
* python/py-events.h: New file.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-breakpointstopevent.o,
py-continueevent.o, py-event.o, py-eventregistry.o, py-events.o,
py-exitedevent.o, py-signalstopevent.o, and py-stopevent.o.
(SUBDIR_PYTHON_SRCS): Add py-breakpointstopevent.c,
py-continueevent.c, py-event.c, py-eventregistry.c, py-events.c,
py-exitedevent.c, py-signalstopevent.c, and py-stopevent.c.
Add build rules for all the above.
gdb/
* disasm.c (dump_insns): Support dumping opcodes for MI.
* mi/mi-cmd-disas.c (mi_cmd_disassemble): Allow mode to control
dumping of instruction opcodes.
gdb/doc/
* gdb.texinfo (GDB/MI Data Manipulation): Update to reflect
changes in mi/mi-cmd-disas.c
gdb/testsuite/
* gdb.mi/mi-disassemble.exp, gdb.mi/mi2-disassemble.exp: Update
expected output to reflect changes in gdb/mi/mi-cmd-disas.c and
add new tests for opcode dumping.
Initial support for Blackfin processors. This supports the standard ABI.
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
C++ class type is returned, fix incorrect enclosing type / embedded
offset. If internal variable is returned, allocate new internalvar
value using value_of_internalvar.
* NEWS: Document changes in behavior of "print x = 0" and similar
expressions.
New command "set directories".
* NEWS: Document them.
* source.c (set_directories_command): New function.
(show_directories_1): Renamed from show_directories.
All callers updated.
(show_directories_command): New function.
(_initialize_source): Install "directories" as a set/show
variable instead of just a show command.
doc/
* gdb.texinfo (Source Path): Document "set directories".
testsuite/
* gdb.base/help.exp: Update expected output.
* gdb.python/py-parameter.exp: New file.
enable pretty-printer, disable pretty-printer.
* NEWS: Mention them.
* data-directory/Makefile.in (PYTHON_FILES): Add gdb/printing.py,
gdb/command/__init__.py, gdb/command/pretty_printers.py.
* python/lib/gdb/__init__.py: Install pretty-printer commands.
* python/lib/gdb/printing.py: New file.
* python/lib/gdb/command/__init__.py: New file.
* python/lib/gdb/command/pretty_printers.py: New file.
doc/
* gdb.texinfo (Pretty Printing): Expand into three sections,
introduction, example, and commands.
(Python API): Delete section Disabling Pretty-Printers, merge into
Selecting Pretty-Printers.
(Writing a Pretty-Printer): New section. Move the pretty-printer
example here, and reformat to match python coding style. Add a second
example using the gdb.printing module.
(Python modules): Add gdb.printing.
testsuite/
* gdb.python/py-pp-maint.c: New file.
* gdb.python/py-pp-maint.exp: New file.
* gdb.python/py-pp-maint.py: New file.
This announces the support for debugging Ada programs using
the Ravenscar Profile, as well as documents the new commands
introduced as part of this effort.
gdb/ChangeLog:
* NEWS: Announce Ravenscar Profile support.
gdb/doc/ChangeLog:
* gdb.texinfo (Ravenscar Profile): New node.
This patch adjusts the NEWS entry for the LynxOS gdbserver to include
x86-lynxos to the list of supported platforms.
gdb/ChangeLog:
* NEWS: Add x86-lynxos to the list of platforms supported by
gdbserver.
This adjusts the news entry about ppc-lynxos to add version 5.x
of the OS to the list of supported versions...
gdb/ChangeLog:
* NEWS: Announce GDBserver support for version 5.x of ppc-lynxos.
This adds an entry in the NEWS file announcing the GDBserver support
on powerpc-lynxos.
gdb/ChangeLog:
* NEWS: Add entry announcing GDBserver support on powerpc-lynxos.
* NEWS: Add entry.
* dwarf2read.c (dwarf2_add_field): If DW_AT_const_value is present,
create a symbol for the field and record the value.
(new_symbol): Handle DW_TAG_member.
* gdbtypes.c (field_is_static): Remove FIXME.
* symtab.c (search_symbols): When searching for VARIABLES_DOMAIN,
only ignore LOC_CONST symbols that are enums.
testsuite/
Test PR c++/11702.
* gdb.cp/m-static.exp: Add testcase.
* gdb.cp/m-static.h (gnu_obj_4): Add initialized static const member.
2010-06-27 Joel Brobecker <brobecker@adacore.com>
* NEWS: Add entry announcing the python directory.
2010-06-27 Joel Brobecker <brobecker@adacore.com>
* gdb.texinfo (Python): Document what the python directory is
and what its location is.
(Basic Python): Document the gdb.PYTHONDIR constant.
* NEWS: Document them.
* python/py-cmd.c (cmdpy_function): Don't print a traceback if
the exception is gdb.GdbError. Print a second traceback if there's
an error computing the error message.
(gdbpy_string_to_argv): New function.
* python/py-utils.c (gdbpy_obj_to_string): New function.
(gdbpy_exception_to_string): New function.
* python/python-internal.h (gdbpy_string_to_argv): Declare.
(gdbpy_obj_to_string, gdbpy_exception_to_string): Declare.
(gdbpy_gdberror_exc): Declare.
* python/python.c (gdbpy_gdberror_exc): New global.
(_initialize_python): Initialize gdbpy_gdberror_exc and create
gdb.GdbError.
(GdbMethods): Add string_to_argv.
doc/
* gdb.texinfo (Exception Handling): Document gdb.GdbError.
(Commands In Python): Document gdb.string_to_argv.
testsuite/
* gdb.python/py-cmd.exp: Add tests for gdb.GdbError and
gdb.string_to_argv.
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.
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.
* 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.
PR breakpoints/9352:
* NEWS: Mention changes to `commands' and `rbreak'.
* symtab.c (do_end_rbreak_breakpoints): New function.
(rbreak_command): Call start_rbreak_breakpoints; arrange to call
end_rbreak_breakpoints.
* breakpoint.c (breakpoint_count, tracepoint_count): Now static.
(set_breakpoint_count): Likewise. Clear last_was_multi.
(multi_start, multi_end, last_was_multi): New globals.
(start_rbreak_breakpoints, end_rbreak_breakpoints): New
functions.
(struct commands_info): New
(do_map_commands_command): New function.
(commands_command_1): New function.
(commands_command): Use it.
(commands_from_control_command): Likewise.
(do_delete_breakpoint): New function.
(delete_command): Use it.
(map_breakpoint_numbers): Add 'data' argument. Pass to callback.
(do_map_disable_breakpoint): New function.
(disable_command): Use it.
(do_map_enable_breakpoint): New function.
(enable_command): Use it.
(enable_once_breakpoint): Add argument.
(enable_once_command): Update.
(enable_delete_breakpoint): Add argument.
(enable_delete_command): Update.
(break_command_really): Set last_was_multi when needed.
(check_tracepoint_command): Fix formatting.
(validate_commands_for_breakpoint): New function.
(breakpoint_set_commands): Use it.
(tracepoint_save_command): Update.
* breakpoint.h (start_rbreak_breakpoints, end_rbreak_breakpoints):
Declare.
gdb/doc
PR breakpoints/9352:
* gdb.texinfo (Break Commands): Update.
gdb/testsuite
PR breakpoints/9352:
* gdb.base/default.exp: Update.
* gdb.base/commands.exp: Update.
* gdb.cp/extern-c.exp: Test setting commands on multiple
breakpoints at once.
* defs.h (read_command_lines, read_command_lines_1): New
parameters validator and closure.
* tracepoint.h (struct action_line): Remove.
* breakpoint.h (struct breakpoint): Remove the 'actions'
field.
* defs.h (enum command_control_type): New value
while_stepping_control.
(struct command_line): Add comments.
* breakpoint.c (breakoint_is_tracepoint): New.
(breakpoint_set_commands): For tracepoints,
verify the commands are permissible.
(check_tracepoint_commands): New.
(commands_command): Require that each new line is validated using
check_tracepoint_command, if we set commands for a tracepoint.
(create_tracepoint_from_upload): Likewise.
(print_one_breakpoint_location): Remove the code to print
actions specifically.
(tracepoint_save_command): Relay to print_command_lines.
* cli/cli-script.c (process_next_line): New parameters validator
and closure. Handle 'while-stepping'. Call validator if not null.
(read_command_lines, read_command_lines1): Likewise.
(recurse_read_control_structure): New parameters validator and
closure. Handle while_stepping_control.
(print_command_lines): Handle while-stepping.
(get_command_line, define_command, document_command): Adjust.
* remote.c (remote_download_tracepoint): Adjust.
* tracepoint.c (make_cleanup_free_actions, read_actions)
(free_actions, do_free_actions_cleanup): Remove.
(trace_actions_command): Use read_command_lines.
(validate_actionline): Use error in one place.
(encode_actions_1): New, extracted from...
(encode_actions): ...this. Also use cleanups for exception
safety.
(trace_dump_command): Adjust.
* mi/mi-cmd-break (mi_cmd_break_commands): Validate commands if
it's tracepoint.