summaryrefslogtreecommitdiff
path: root/gdb/cli
Commit message (Collapse)AuthorAgeFilesLines
...
* * cli/cli-decode.c (add_setshow_string_noescape_cmd): Return theTom Tromey2013-01-141-2/+5
| | | | | | | | | | set command. * command.h (add_setshow_string_noescape_cmd): Update. * corefile.c (set_gnutarget_command): Remove trailing whitespace. (complete_set_gnutarget): New function. (_initialize_core): Set the "set gnutarget" completer. gdb/testsuite * gdb.base/completion.exp: Add "set gnutarget" test.
* Add make_cleanup_free_command_lines declaration "extern".Joel Brobecker2013-01-011-1/+2
| | | | | | gdb/ChangeLog: * cli/cli-script.h (make_cleanup_free_command_lines): Make extern.
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-0114-15/+14
| | | | | | | Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
* gdb/Jan Kratochvil2012-12-251-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ada-lang.c (is_known_support_routine): New variable fullname. Use access call to verify the symtab_to_fullname result. * breakpoint.c (print_breakpoint_location, update_static_tracepoint): Remove NULL check of symtab_to_fullname result. * cli/cli-cmds.c (edit_command): Likewise. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file) (mi_cmd_file_list_exec_source_files): Likewise. * python/py-symtab.c (stpy_fullname): Likewise. * source.c (symtab_to_fullname): Update function comment. Rename variable r to fd, move it to inner block. Always provide non-NULL result. (print_source_lines_base): Remove NULL check of symtab_to_fullname result. * stack.c (print_frame): Likewise. * symtab.c (iterate_over_some_symtabs, find_line_symtab, sources_info): Likewise. * tracepoint.c (print_one_static_tracepoint_marker): Likewise. gdb/doc/ * gdb.texinfo (GDB/MI Data Manipulation) (fullname): Make it always present. (GDB/MI File Commands) (-file-list-exec-source-files): Make the fullname output always present. gdb/testsuite/ * gdb.mi/mi-fullname-deleted.exp: New file.
* * cli/cli-cmds.c (apropos_command): Now static.Tom Tromey2012-12-181-3/+1
|
* * cli/cli-cmds.c (_initialize_cli_cmds): Remove "document",Tom Tromey2012-12-183-35/+35
| | | | | | | | | "define", "while", and "if" commands. * cli/cli-script.c (while_command, if_command, define_command) (document_command): Now static. (_initialize_cli_script): New function. * cli/cli-script.h (while_command, if_command, define_command) (document_command): Don't declare.
* * cli/cli-cmds.c (_initialize_cli_cmds): New function.Tom Tromey2012-12-181-16/+25
| | | | (init_cli_cmds): Move most code into new function.
* Avoid memory leaks on struct cmd_list_element.doc field.Pierre Muller2012-12-052-1/+16
| | | | | | | | | | | * cli/cli-decode.c (add_alias_cmd): Make a copy of doc field if flags contains DOC_ALLOCATED. (add_setshow_cmd_full): Add DOC_ALLOCATED to set and show flags. (delete_cmd): Handle DOC_ALLOCATED flag. * cli/cli-decode.h (DOC_ALLOCATED): New macro for use in flags filed of struct cmd_list_element. (struct cmd_list_element): Document new flag item.
* ARI fixes: sprintf rule.Pierre Muller2012-11-201-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace sprintf function calls for char arrays by calls to xsnprintf calls. * arm-tdep.c (arm_push_dummy_call): Replace sprintf by xsnprintf. (arm_dwarf_reg_to_regnum, arm_return_value): Ditto. (arm_neon_quad_read, arm_pseudo_read): Ditto. (arm_neon_quad_write, arm_pseudo_write): Ditto. * breakpoint.c (condition_completer): Ditto. (create_tracepoint_from_upload): Ditto. * dwarf2read.c (file_full_name): Ditto. * gcore.c (gcore_command): Ditto. * gnu-nat.c (proc_string, gnu_pid_to_str): Ditto. * go32-nat.c (go32_sysinfo): Ditto. * interps.c (interp_set): Ditto. * m32c-tdep.c (make_types): Ditto. * ppc-linux-nat.c (fetch_register, store_register): Ditto. * remote-m32r-sdi.c (m32r_open): Ditto. * sol-thread.c (td_err_string): Ditto. (td_state_string, solaris_pid_to_str): Ditto. * symtab.c (gdb_mangle_name): Ditto. * cli/cli-script.c (execute_control_command): Ditto. (define_command, document_command): Ditto. * tui/tui-io.c (tui_rl_display_match_list): Ditto. * tui/tui-stack.c (tui_make_status_line): Ditto. * tui/tui-win.c (tui_update_gdb_sizes): Ditto.
* gdb: include help aliases in help command completionMike Frysinger2012-11-201-2/+3
| | | | | | | | | | | | | | | | There are a bunch of aliases that get used with help, but the current command completion logic does not include those when doing completions. Since the framework is already mostly in place, extend complete_on_cmdlist slightly to pass down the ignore_help_classes flag like is done with the existing lookup command logic. Now you can do: (gdb) help use<tab> and get back: (gdb) help user-defined Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* * gdbarch.sh (target_gdbarch): Remove macro.Tom Tromey2012-11-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | (get_target_gdbarch): Rename to target_gdbarch. * gdbarch.c, gdbarch.h: Rebuild. * ada-tasks.c, aix-thread.c, amd64-linux-nat.c, arch-utils.c, arm-tdep.c, auxv.c, breakpoint.c, bsd-uthread.c, corefile.c, darwin-nat-info.c, dcache.c, dsrec.c, exec.c, fbsd-nat.c, filesystem.c, gcore.c, gnu-nat.c, i386-darwin-nat.c, i386-nat.c, ia64-vms-tdep.c, inf-ptrace.c, infcmd.c, jit.c, linux-nat.c, linux-tdep.c, linux-thread-db.c, m32r-rom.c, memattr.c, mep-tdep.c, microblaze-tdep.c, mips-linux-nat.c, mips-linux-tdep.c, mips-tdep.c, monitor.c, moxie-tdep.c, nto-procfs.c, nto-tdep.c, ppc-linux-nat.c, proc-service.c, procfs.c, progspace.c, ravenscar-thread.c, record.c, remote-m32r-sdi.c, remote-mips.c, remote-sim.c, remote.c, rl78-tdep.c, rs6000-nat.c, rx-tdep.c, s390-nat.c, sol-thread.c, solib-darwin.c, solib-dsbt.c, solib-frv.c, solib-ia64-hpux.c, solib-irix.c, solib-pa64.c, solib-som.c, solib-spu.c, solib-sunos.c, solib-svr4.c, solib.c, spu-linux-nat.c, spu-multiarch.c, spu-tdep.c, symfile-mem.c, symfile.c, symtab.c, target-descriptions.c, target.c, target.h, tracepoint.c, windows-nat.c, windows-tdep.c, xcoffsolib.c, cli/cli-dump.c, common/agent.c, mi/mi-interp.c, python/py-finishbreakpoint.c, python/py-inferior.c, python/python.c: Update.
* * tracepoint.c (print_one_static_tracepoint_marker): Constify.Tom Tromey2012-10-181-1/+2
| | | | | | | | | | * symtab.c (iterate_over_some_symtabs): Constify. * source.h (symtab_to_fullname): Return 'const char *'. * source.c (symtab_to_fullname): Return 'const char *'. * python/py-symtab.c (stpy_fullname): Constify. * cli/cli-cmds.c (edit_command): Constify. * breakpoint.c (print_breakpoint_location) (update_static_tracepoint): Constify.
* gdb/Jan Kratochvil2012-09-211-1/+1
| | | | | | | | | | Fix disassemble without parameters in tailcall frame. * cli/cli-cmds.c (disassemble_current_function): Use get_frame_address_in_block. gdb/testsuite/ Fix disassemble without parameters in tailcall frame. * gdb.arch/amd64-entry-value.exp (down, disassemble): New tests.
* gdb/Yao Qi2012-09-173-6/+55
| | | | | | | | | | | | | | | | | | | | | | * cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): New. Update comment to add_setshow_integer_cmd. * cli/cli-setshow.c (do_set_command): Handle case 'var_zuinteger_unlimited'. (do_show_command): Likewise. * cli/cli-cmds.c (init_cmds): Call add_setshow_zuinteger_unlimited_cmd for command 'remotetimeout'. * command.h (enum var_types): New zuinteger_unlimited. Update comment to var_integer. * source.c (_initialize_source): Call add_setshow_zuinteger_unlimited_cmd for command 'set listsize'. gdb/doc/ * gdb.texinfo (List): Describe the meaning of 0 and -1 in 'set listsize'. gdb/testsuite/ * gdb.base/list.exp (set_listsize): Don't set arg to "unlimited" when it is less than 0.
* gdb/Yao Qi2012-08-282-6/+6
| | | | | | | | | | | | | | | | | | | | | * cli/cli-cmds.c (max_user_call_depth): Add 'unsigned'. (init_cmds): Call add_setshow_uinteger_cmd for command 'max-user-call-depth'. * cli/cli-script.c (execute_user_command): Add 'unsigned' to the declaration of 'max_user_call_depth'. * frame.c (backtrace_limit): Add 'unsigned'. (_initialize_frame): Call add_setshow_uinteger_cmd for command 'limit'. * remote.c (remoteaddresssize): Add 'unsigned'. (remote_address_masked): Change local var 'address_size' to 'unsigned'. (_initialize_remote): Call add_setshow_uinteger_cmd for 'remoteaddresssize'. * top.c (history_size): Add 'unsigned'. (show_commands): Change local variables to 'unsigned'. (set_history_size_command): Don't check history_size is negative. Adjust the condition to call unstifle_history and set history_size to UNIT_MAX.
* gdb/Jan Kratochvil2012-08-271-1/+4
| | | | | * cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not followed by a whitespace.
* * cli/cli-cmds.c (filter_sals): Handle nelts == 0 case.Tom Tromey2012-08-221-1/+2
|
* gdb/Yao Qi2012-08-094-217/+479
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cli/cli-decode.c (set_cmd_prefix): New. (lookup_cmd_for_prefixlist): New. (add_prefix_cmd): Call set_cmd_prefix and update field 'prefix' of each cmd_list_element in *prefixlist. (add_setshow_cmd_full): set_cmd_prefix. (add_alias_cmd): Likewise. * cli/cli-decode.h (struct cmd_list_element) <prefix>: New field. Declare 'auto_boolean_enums'. * cli/cli-setshow.c: Include "observer.h". (notify_command_param_changed_p): New. (add_setshow_auto_boolean_cmd): Move auto_boolean_enums out. Remove 'static'. (do_setshow_command): Split it to ... (do_set_command, do_show_command): ... them. New. (do_set_command): Call observer_notify_command_param_changed if notify_command_param_changed_p returns true. (cmd_show_list): Caller update. * auto-load.c (set_auto_load_cmd): Likewise. * remote.c (show_remote_cmd): Likewise. * cli/cli-setshow.h: Update declarations. * top.c (execute_command): Call do_set_command and do_show_command. * NEWS: Mention new MI notification. * mi/mi-interp.c: Declare mi_command_param_changed. (mi_interpreter_init): Attach mi_command_param_changed to observer command_param_changed. (mi_command_param_changed): New. Remove mi_suppress_breakpoint_notifications. Define global variable mi_suppress_notification. (mi_breakpoint_created): Update. (mi_breakpoint_deleted): Likewise. (mi_breakpoint_modified): Likewise. * mi/mi-main.c (mi_cmd_execute): Likewise. Check command 'gdb-set' and set mi_suppress_notification. * mi/mi-main.h: (mi_suppress_notification): New struct. gdb/doc/ * observer.texi: New observer command_param_changed. * gdb.texinfo (GDB/MI Async Records): Doc for '=cmd-param-changed'. gdb/testsuite/ * gdb.mi/mi-cmd-param-changed.exp: New. * gdb.mi/mi-cli.exp: Update for MI notification "=cmd-param-changed". * gdb.mi/mi-var-rtti.exp, gdb.mi/mi2-cli.exp: Likewise. * gdb.mi/mi2-prompt.exp: Likewise.
* gdb/Yao Qi2012-08-092-14/+0
| | | | | | | | | | | | | * cli/cli-cmds.c (enablebreaklist): Move it to breakpoint.c. (skiplist): Move it to skip.c. (init_cmd_lists): Remove code setting enablebreaklist and skiplist to NULL. * breakpoint.c (enablebreaklist): Moved from cli/cli-cmds.c. * cli/cli-cmds.h: Remove declaration of enablebreaklist and skiplist. * gdbcmd.h: Likewise. * skip.c (_initialize_step_skip): Move 'skiplist' from cli/cli-cmds.c.
* gdb/Yao Qi2012-08-091-7/+7
| | | | | * cli/cli-dump.c: Add 'static' to some cmd_list_element variables. * gnu-nat.c, symfile.c: Likewise.
* PR cli/14392:Tom Tromey2012-08-061-1/+1
| | | | * cli/cli-cmds.c (list_command): Filter 'sals_end'.
* gdb/Jan Kratochvil2012-08-061-1/+1
| | | | | | | | | | | 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.
* * symmisc.c (print_symbol_bcache_statistics): Use QUIT, notTom Tromey2012-07-261-2/+0
| | | | | | | | | | | | | | immediate_quit. (print_objfile_statistics): Likewise. (maintenance_print_symbols): Likewise. (maintenance_print_msymbols): Likewise. (maintenance_print_objfiles): Likewise. * psymtab.c (print_partial_symbols): Call QUIT. (maintenance_print_psymbols): Likewise. Don't modify immediate_quit. * copying.c (show_copying_command): Don't modify immediate_quit. (show_warranty_command): Likewise. * cli/cli-cmds.c (show_version): Don't modify immediate_quit.
* gdb/Yao Qi2012-07-241-12/+4
| | | | | | * cli/cli-setshow.c (do_setshow_command): Handle case 'var_uinteger' and 'var_zuninteger' together. Handle case 'var_integer' and 'var_zinteger' together.
* * cli/cli-dump.c (bfd_openr_with_cleanup): Use gdb_bfd_openr.Tom Tromey2012-07-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (bfd_openw_with_cleanup): Use gdb_bfd_openw. * corelow.c (core_open): Use gdb_bfd_fopen. * dsrec.c (load_srec): Use gdb_bfd_openr. * exec.c (exec_file_attach): Use gdb_bfd_fopen. * gcore.c (gcore_memory_sections): Use gdb_bfd_openw. * gdb_bfd.c (gdb_bfd_fopen, gdb_bfd_openr, gdb_bfd_openw) (gdb_bfd_openr_iovec, gdb_bfd_openr_next_archived_file) (gdb_bfd_fdopenr): New functions. * gdb_bfd.h (gdb_bfd_fopen, gdb_bfd_openr, gdb_bfd_openw) (gdb_bfd_openr_iovec, gdb_bfd_openr_next_archived_file) (gdb_bfd_fdopenr): Declare. * jit.c (bfd_open_from_target_memory): Use gdb_bfd_openr_iovec. * m32-rom.c (m32r_load, m32r_upload_command): Use gdb_bfd_openr. * machoread.c (macho_symfile_read_all_oso): Use gdb_bfd_openr, gdb_bfd_openr_next_archived_file. (macho_check_dsym): Use gdb_bfd_openr. (macho_add_oso_symfile): Don't call gdb_bfd_stash_filename. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_fdopenr. * remote-m32r-sdi.c (m32r_load): Use gdb_bfd_openr. * remote-mips.c (mips_load_srec, pmon_load_fast): Use gdb_bfd_openr. * remote.c (remote_bfd_open): Use gdb_bfd_openr_iovec. * rs6000-nat.c (add_vmap): Use gdb_bfd_openr, gdb_bfd_fdopenr, gdb_bfd_openr_next_archived_file. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_openr. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_openr. * solib-spu.c (spu_bfd_fopen): Use gdb_bfd_openr_iovec. * solib.c (solib_bfd_fopen): Use gdb_bfd_fopen. * spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_openr_iovec. * symfile.c (bfd_open_maybe_remote): Use gdb_bfd_openr. (symfile_bfd_open): Use gdb_bfd_fopen. (generic_load): Use gdb_bfd_openr. * windows-nat.c (windows_make_so): Use gdb_bfd_openr.
* * bfd-target.c (target_bfd_reopen): Update.Tom Tromey2012-07-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cli/cli-dump.c (bfd_openr_with_cleanup) (bfd_openw_with_cleanup): Update. * corelow.c (core_open): Update. * dsrec.c (load_srec): Update. * exec.c (exec_file_attach): Update. * gcore.c (create_gcore_bfd): Update. * gdb_bfd.c (gdb_bfd_ref): Return void. (gdb_bfd_open): Update. * gdb_bfd.h (gdb_bfd_ref): Return void. Update comments. * jit.c (jit_bfd_try_read_symtab): Update. * m32r-rom.c (m32r_load, m32r_upload_command): Update. * machoread.c (macho_symfile_read_all_oso): Update. (macho_check_dsym): Update. * procfs.c (insert_dbx_link_bpt_in_file): Update. * remote-m32r-sdi.c (m32r_load): Update. * remote-mips.c (mips_load_srec, pmon_load_fast): Update. * rs6000-nat.c (add_vmap): Update. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Update. * solib-pa64.c (pa64_solib_create_inferior_hook): Update. * solib-spu.c (spu_bfd_open): Update. * solib.c (solib_bfd_fopen, solib_read_symbols): Update. * spu-linux-nat.c (spu_bfd_open): Update. * symfile.c (bfd_open_maybe_remote, symfile_bfd_open) (generic_load): Update. * windows-nat.c (windows_make_so): Update.
* gdb/Yao Qi2012-07-201-6/+3
| | | | | * cli/cli-setshow.c (do_setshow_command): Don't check pointer is NULL for xfree.
* * cli/cli-setshow.c (do_setshow_command): Handle case 'var_filename'Yao Qi2012-07-191-15/+15
| | | | | | | | | | | and case 'var_optional_filename' together. * infcmd.c (_initialize_infcmd): Call add_setshow_string_noescape_cmd instead of add_setshow_optional_filename_cmd for setshow command 'args'. Set completer for 'set args'. gdb/testsuite: * gdb.base/setshow.exp: Test 'set args ~'.
* * utils.c (make_cleanup_bfd_unref): Rename fromTom Tromey2012-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | make_cleanup_bfd_close. * defs.h (make_cleanup_bfd_unref): Rename from make_cleanup_bfd_close. * cli/cli-dump.c (bfd_openr_with_cleanup): Update. (bfd_openw_with_cleanup): Update. * corelow.c (core_open): Update. * dsrec.c (load_srec): Update. * m32r-rom.c (m32r_load, m32r_upload_command): Update. * remote-m32r-sdi.c (m32r_load): Update. * remote-mips.c (mips_load_srec): Update. (pmon_load_fast): Update. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Update. (darwin_bfd_open): Update. * solib.c (solib_bfd_fopen): Update. * symfile-mem.c (symbol_file_add_from_memory): Update. * symfile.c (symbol_file_add_with_addrs_or_offsets): Update. (symfile_bfd_open): Update. (generic_load): Update.
* * dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref andTom Tromey2012-07-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb_bfd_unref. (free_dwo_file): Use gdb_bfd_unref. * cli/cli-dump.c: Include gdb_bfd.h. (bfd_openw_with_cleanup): Use gdb_bfd_ref. (bfd_openr_with_cleanup): Likewise. * windows-nat.c (windows_make_so): Use gdb_bfd_ref, gdb_bfd_unref. * utils.c: Include gdb_bfd.h. (do_bfd_close_cleanup): Use gdb_bfd_unref. * symfile.c: Include gdb_bfd.h. (separate_debug_file_exists): Use gdb_bfd_unref. (bfd_open_maybe_remote): Use gdb_bfd_ref. (symfile_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref. (generic_load): Use gdb_bfd_ref. (reread_symbols): Use gdb_bfd_unref. * symfile-mem.c: Include gdb_bfd.h. (symbol_file_add_from_memory): Use make_cleanup_bfd_close. * spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref. * solib.c: Include gdb_bfd.h. (solib_bfd_fopen): Use gdb_bfd_ref. (solib_bfd_open): Use gdb_bfd_unref. (free_so_symbols): Use gdb_bfd_unref. (reload_shared_libraries_1): Use gdb_bfd_unref. * solib-spu.c: Include gdb_bfd.h. (spu_bfd_fopen): Use gdb_bfd_ref, gdb_bfd_unref. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_ref, gdb_bfd_unref. * solib-frv.c: Include gdb_bfd.h. (enable_break2): Use gdb_bfd_unref. * solib-dsbt.c: Include gdb_bfd.h. (enable_break2): Use gdb_bfd_unref. * solib-darwin.c: Include gdb_bfd.h. (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_ref, gdb_bfd_unref. (darwin_bfd_open): Use gdb_bfd_unref. * rs6000-nat.c (add_vmap): Use gdb_bfd_ref, gdb_bfd_unref. * remote-mips.c: Include gdb_bfd.h. (mips_load_srec): Use gdb_bfd_ref. (pmon_load_fast): Use gdb_bfd_ref. * remote-m32r-sdi.c: Include gdb_bfd.h. (m32r_load): Use gdb_bfd_ref. * record.c: Include gdb_bfd.h. (record_save_cleanups): Use gdb_bfd_unref. (cmd_record_save): Use gdb_bfd_unref. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_ref, gdb_bfd_unref. * objfiles.h (gdb_bfd_close_or_warn): Remove. (gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.h. * objfiles.c: Include gdb_bfd.h. (free_objfile): Use gdb_bfd_unref. (gdb_bfd_close_or_warn, gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.c. * machoread.c (macho_add_oso_symfile): Use gdb_bfd_unref. (macho_symfile_read_all_oso): Use gdb_bfd_ref, gdb_bfd_unref. (macho_check_dsym): Likewise. * m32r-rom.c: Include gdb_bfd.h. (m32r_load): Use gdb_bfd_ref. (m32r_upload_command): Use gdb_bfd_ref. * jit.c: Include gdb_bfd.h. (jit_bfd_try_read_symtab): Use gdb_bfd_ref, gdb_bfd_unref. * gdb_bfd.h: New file. * gdb_bfd.c: New file. * gcore.c: Include gdb_bfd.h. (create_gcore_bfd): Use gdb_bfd_ref. (do_bfd_delete_cleanup): Use gdb_bfd_unref. (gcore_command): Use gdb_bfd_unref. * exec.c: Include gdb_bfd.h. (exec_close): Use gdb_bfd_unref. (exec_close_1): Use gdb_bfd_unref. (exec_file_attach): Use gdb_bfd_ref. * elfread.c: Include gdb_bfd.h. (build_id_verify): Use gdb_bfd_unref. * dsrec.c: Include gdb_bfd.h. (load_srec): Use gdb_bfd_ref. * corelow.c: Include gdb_bfd.h. (core_close): Use gdb_bfd_unref. (core_open): Use gdb_bfd_ref. * bfd-target.c: Include gdb_bfd.h. (target_bfd_xclose): Use gdb_bfd_unref. (target_bfd_reopen): Use gdb_bfd_ref. * Makefile.in (SFILES): Add gdb_bfd.c. (HFILES_NO_SRCDIR): Add gdb_bfd.h. (COMMON_OBS): Add gdb_bfd.o.
* 2012-07-05 Hui Zhu <hui_zhu@mentor.com>Hui Zhu2012-07-052-0/+20
| | | | | | * breakpoint.c (check_for_argument): Move to file cli/cli-utils.c. * cli/cli-utils.c (check_for_argument): New function. * cli/cli-utils.h (check_for_argument): Ditto.
* Make logging work for MI.Stan Shebs2012-06-281-21/+43
| | | | | | | | | | | | | | | | | | | * 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.
* * ada-lang.c (ada_make_symbol_completion_list): Return a VEC.Tom Tromey2012-06-132-89/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * breakpoint.c (catch_syscall_completer): Return a VEC. * cli/cli-cmds.c (complete_command): Update. * cli/cli-decode.c (complete_on_cmdlist): Return a VEC. (complete_on_enum): Likewise. * command.h: Include gdb_vecs.h. (completer_ftype): Change return type. (complete_on_cmdlist, complete_on_enum): Likewise. * completer.c (noop_completer, filename_completer) (location_completer): Return a VEC. (add_struct_fields): Remove 'nextp' argument. Change 'output' to a VEC. (expression_completer, complete_line_internal, complete_line) (command_completer): Return a VEC. (gdb_completion_word_break_characters, line_completion_function): Update. * completer.h: Include gdb_vecs.h. (complete_line, noop_completer, filename_completer) (expression_completer, location_completer, command_completer): Update. * f-lang.c (f_word_break_characters): Return a VEC. * interps.c (interpreter_completer): Return a VEC. * language.h (struct language_defn) <la_make_symbol_completion_list>: Return a VEC. * python/py-cmd.c (cmdpy_completer): Return a VEC. * symtab.c (free_completion_list): Take a VEC. (return_val_size, return_val_index): Remove. (return_val): Now a VEC. (completion_list_add_name): Update. (default_make_symbol_completion_list_break_on) (default_make_symbol_completion_list, make_symbol_completion_list) (make_symbol_completion_list_fn, make_file_symbol_completion_list): Return a VEC. (add_filename_to_list): Update. (struct add_partial_filename_data) <list_used, list_alloced>: Remove. <list>: Now a VEC. (maybe_add_partial_symtab_filename): Update. (make_source_files_completion_list): Return a VEC. * symtab.h (default_make_symbol_completion_list_break_on) (default_make_symbol_completion_list, make_symbol_completion_list) (make_symbol_completion_list_fn, make_file_symbol_completion_list) (make_source_files_completion_list): Update.
* * breakpoint.c (add_catch_command): Use completer_ftype.Tom Tromey2012-06-132-5/+2
| | | | | | | | | | | | * breakpoint.h: Include command.h. (add_catch_command): Use completer_ftype. * cli/cli-decode.c (set_cmd_completer): Use completer_ftype. * cli/cli-decode.h (struct cmd_list_element) <completer>: Use completer_ftype. * command.h (completer_ftype): New typedef. (set_cmd_completer): Use it. * python/py-cmd.c (struct cmdpy_completer) <completer>: Use completer_ftype.
* 2012-05-18 Sergio Durigan Junior <sergiodj@redhat.com>Sergio Durigan Junior2012-05-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ada-lang.c: * ada-tasks.c: * ada-varobj.c: * amd64-darwin-tdep.c: * arm-symbian-tdep.c: * arm-tdep.c: * avr-tdep.c: * ax-gdb.c: * bfin-linux-tdep.c: * breakpoint.c: * c-valprint.c: * cli/cli-cmds.c: * coffread.c: * cp-support.c: * cris-tdep.c: * dwarf2-frame-tailcall.c: * dwarf2-frame.c: * dwarf2expr.c: * dwarf2loc.c: * dwarf2read.c: * elfread.c: * eval.c: * expprint.c: * f-valprint.c: * frv-tdep.c: * h8300-tdep.c: * hppa-hpux-tdep.c: * hppa-tdep.c: * hppanbsd-tdep.c: * i386-nto-tdep.c: * i386-tdep.c: * i387-tdep.c: * ia64-tdep.c: * jit.c: * linespec.c: * linux-tdep.c: * lm32-tdep.c: * m2-valprint.c: * m32c-tdep.c: * m32r-rom.c: * m32r-tdep.c: * m68k-tdep.c: * m68klinux-tdep.c: * mi/mi-main.c: * microblaze-tdep.c: * mips-linux-tdep.c: * mips-tdep.c: * mn10300-tdep.c: * p-valprint.c: * parse.c: * ppc-linux-tdep.c: * ppc-sysv-tdep.c: * printcmd.c: * python/py-finishbreakpoint.c: * python/py-inferior.c: * python/py-infthread.c: * python/py-type.c: * python/python.c: * remote-fileio.c: * remote-m32r-sdi.c: * remote-mips.c: * reverse.c: * rl78-tdep.c: * rs6000-aix-tdep.c: * rs6000-tdep.c: * s390-tdep.c: * score-tdep.c: * sh64-tdep.c: * skip.c: * solib-darwin.c: * solib-dsbt.c: * solib-frv.c: * sparc-tdep.c: * spu-multiarch.c: * spu-tdep.c: * stack.c: * symfile.c: * symtab.c: * tic6x-tdep.c: * tracepoint.c: * v850-tdep.c: * valarith.c: * valprint.c: * value.c: * xcoffread.c: * xtensa-tdep.c: * ada-lang.c: * ada-tasks.c: * ada-varobj.c: * amd64-darwin-tdep.c: * arm-symbian-tdep.c: * arm-tdep.c: Delete unused variables.
* Display the ">" prompt in interactive mode while reading cannedEli Zaretskii2012-05-081-2/+21
| | | | | | | | | | commands, even when the current interpreter is MI. interps.c (interp_set_temp): New function. interps.h (interp_set_temp): Add prototype. cli/cli-script.c (restore_interp): New cleanup function. (read_command_lines): Temporarily override the current interpreter with CLI and arrange for restoring the original one.
* 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>Sergio Durigan Junior2012-04-272-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tom Tromey <tromey@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> * Makefile.in (SFILES): Add `probe' and `stap-probe'. (COMMON_OBS): Likewise. (HFILES_NO_SRCDIR): Add `probe'. * NEWS: Mention support for static and SystemTap probes. * amd64-tdep.c (amd64_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * arm-linux-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (arm_stap_is_single_operand): New function. (arm_stap_parse_special_token): Likewise. (arm_linux_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * ax-gdb.c (require_rvalue): Removing static declaration. (gen_expr): Likewise. * ax-gdb.h (gen_expr): Declaring function. (require_rvalue): Likewise. * breakpoint.c: Include `gdb_regex.h' and `probe.h'. (bkpt_probe_breakpoint_ops): New variable. (momentary_breakpoint_from_master): Set the `probe' value. (add_location_to_breakpoint): Likewise. (break_command_1): Using proper breakpoint_ops according to the argument passed by the user in the command line. (bkpt_probe_insert_location): New function. (bkpt_probe_remove_location): Likewise. (bkpt_probe_create_sals_from_address): Likewise. (bkpt_probe_decode_linespec): Likewise. (tracepoint_probe_create_sals_from_address): Likewise. (tracepoint_probe_decode_linespec): Likewise. (tracepoint_probe_breakpoint_ops): New variable. (trace_command): Using proper breakpoint_ops according to the argument passed by the user in the command line. (initialize_breakpoint_ops): Initializing breakpoint_ops for static probes on breakpoints and tracepoints. * breakpoint.h (struct bp_location) <probe>: New field. * cli-utils.c (skip_spaces_const): New function. (extract_arg): Likewise. * cli-utils.h (skip_spaces_const): Likewise. (extract_arg): Likewise. * coffread.c (coff_sym_fns): Add `sym_probe_fns' value. * configure.ac: Append `stap-probe.o' to be generated when ELF support is present. * configure: Regenerate. * dbxread.c (aout_sym_fns): Add `sym_probe_fns' value. * elfread.c: Include `probe.h' and `arch-utils.h'. (probe_key): New variable. (elf_get_probes): New function. (elf_get_probe_argument_count): Likewise. (elf_evaluate_probe_argument): Likewise. (elf_compile_to_ax): Likewise. (elf_symfile_relocate_probe): Likewise. (stap_probe_key_free): Likewise. (elf_probe_fns): New variable. (elf_sym_fns): Add `sym_probe_fns' value. (elf_sym_fns_lazy_psyms): Likewise. (elf_sym_fns_gdb_index): Likewise. (_initialize_elfread): Initialize objfile cache for static probes. * gdb_vecs.h (struct probe): New forward declaration. (probe_p): New VEC declaration. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh (stap_integer_prefix): New variable. (stap_integer_suffix): Likewise. (stap_register_prefix): Likewise. (stap_register_suffix): Likewise. (stap_register_indirection_prefix): Likewise. (stap_register_indirection_suffix): Likewise. (stap_gdb_register_prefix): Likewise. (stap_gdb_register_suffix): Likewise. (stap_is_single_operand): New function. (stap_parse_special_token): Likewise. (struct stap_parse_info): Forward declaration. * i386-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (i386_stap_is_single_operand): New function. (i386_stap_parse_special_token): Likewise. (i386_elf_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * i386-tdep.h (i386_stap_is_single_operand): New function. (i386_stap_parse_special_token): Likewise. * machoread.c (macho_sym_fns): Add `sym_probe_fns' value. * mipsread.c (ecoff_sym_fns): Likewise. * objfiles.c (objfile_relocate1): Support relocation for static probes. * parse.c (prefixify_expression): Remove static declaration. (initialize_expout): Likewise. (reallocate_expout): Likewise. * parser-defs.h (initialize_expout): Declare function. (reallocate_expout): Likewise. (prefixify_expression): Likewise. * ppc-linux-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (ppc_stap_is_single_operand): New function. (ppc_stap_parse_special_token): Likewise. (ppc_linux_init_abi): Initializing proper fields used by SystemTap probes' arguments parser. * probe.c: New file, for generic statically defined probe support. * probe.h: Likewise. * s390-tdep.c: Including headers needed to perform the parsing of SystemTap probes' arguments. (s390_stap_is_single_operand): New function. (s390_gdbarch_init): Initializing proper fields used by SystemTap probes' arguments parser. * somread.c (som_sym_fns): Add `sym_probe_fns' value. * stap-probe.c: New file, for SystemTap probe support. * stap-probe.h: Likewise. * symfile.h: Include `gdb_vecs.h'. (struct sym_probe_fns): New struct. (struct sym_fns) <sym_probe_fns>: New field. * symtab.c (init_sal): Initialize `probe' field. * symtab.h (struct probe): Forward declaration. (struct symtab_and_line) <probe>: New field. * tracepoint.c (start_tracing): Adjust semaphore on breakpoints locations. (stop_tracing): Likewise. * xcoffread.c (xcoff_sym_fns): Add `sym_probe_fns' value.
* * cli/cli-decode.c (print_doc_line): Use stream instead ofDoug Evans2012-04-251-1/+1
| | | | current_uiout.
* back out previous changeDoug Evans2012-04-251-1/+1
|
* * cli/cli-decode.c (print_doc_line): Use stream instead ofDoug Evans2012-04-251-1/+1
| | | | current_uiout.
* Corrupted path caused by "cd" command.Joel Brobecker2012-04-251-2/+2
| | | | | | gdb/ChangeLog: * cli/cli-cmds.c (cd_command): Use memmove instead of strcpy.
* 2012-03-27 Pedro Alves <palves@redhat.com>Pedro Alves2012-03-271-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate struct ui_stream. * ui-out.h (struct ui_stream): Delete. (ui_out_field_stream): Adjust prototype. (ui_out_stream_new, ui_out_stream_delete) (make_cleanup_ui_out_stream_delete): Delete declarations. * ui-out.c (ui_out_field_stream): Change prototype to take a ui_file instead of a ui_stream. Adjust. (ui_out_stream_new, ui_out_stream_delete, do_stream_delete) (make_cleanup_ui_out_stream_delete): Delete. * breakpoint.c (print_breakpoint_location) (print_one_detail_ranged_breakpoint, print_it_watchpoint): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * disasm.c (dump_insns): Ditto. (do_mixed_source_and_assembly, do_assembly_only): Adjust prototype. (gdb_disassembly): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * infcmd.c (print_return_value): Ditto. * osdata.c (info_osdata_command): Don't allocate a local ui_stream. * stack.c (print_frame_arg, print_frame_args, print_frame): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * tracepoint.c (print_one_static_tracepoint_marker): Don't allocate a local ui_stream. * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. (list_args_or_locals): Don't allocate a local ui_stream. * mi/mi-main.c (get_register, mi_cmd_data_evaluate_expression) (mi_cmd_data_read_memory): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * cli/cli-setshow.c (do_setshow_command): Ditto.
* * NEWS: Mention new python command class gdb.COMMAND_USER.Doug Evans2012-03-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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".
* * blockframe.c (find_pc_partial_function_gnu_ifunc): Change type ofDoug Evans2012-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "name" parameter to const char ** from char **. All callers updated. (find_pc_partial_function): Ditto. (cache_pc_function_name): Change type to const char * from char *. * symtab.h ((find_pc_partial_function_gnu_ifunc): Update. (find_pc_partial_function): Update. * alpha-tdep.h (struct gdbarch_tdep, member pc_in_sigtramp): Change type of "name" parameter to const char * from char *. All uses updated. * arch-utils.c (generic_in_solib_return_trampoline): Change type of "name" parameter to const char * from char *. * arch-utils.h (generic_in_solib_return_trampoline): Update. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Change type of "name" parameter to const char * from char *. * gdbarch.sh (in_solib_return_trampoline): Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Update. * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Update. * m32r-linux-tdep.c (m32r_linux_pc_in_sigtramp): Change type of "name" parameter to const char * from char *. * skip.c (skip_function_pc): Ditto. * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Ditto. * sparc-tdep.h (sparc_sol2_pc_in_sigtramp): Update. * sparc64fbsd-tdep.c (sparc64fbsd_pc_in_sigtramp): Ditto. * sparc64nbsd-tdep.c (sparc64nbsd_pc_in_sigtramp): Ditto. * sparc64obsd-tdep.c (sparc64obsd_pc_in_sigtramp): Ditto. * sparcnbsd-tdep.c (sparc32nbsd_pc_in_sigtramp): Ditto. * sparcobsd-tdep.c (sparc32obsd_pc_in_sigtramp): Ditto. * nbsd-tdep.c (nbsd_pc_in_sigtramp): Similary for "func_name". * nbsd-tdep.h (nbsd_pc_in_sigtramp): Update.
* gdb/Jan Kratochvil2012-01-283-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code cleanup: Make 1440 bytes of data segment read-only. * arch-utils.c (endian_enum): Make it const char *const []. * arm-tdep.c (fp_model_strings, arm_abi_strings, arm_mode_strings): Likewise. * breakpoint.c (always_inserted_enums): Likewise. * cli/cli-cmds.c (script_ext_enums): Likewise. * cli/cli-decode.c (add_setshow_enum_cmd, complete_on_enum): Make the enumlist parameter const char *const *. * cli/cli-decode.h (struct cmd_list_element): Make the enums field const char *const *. * command.h (complete_on_enum, add_setshow_enum_cmd): Make the enumlist parameter const char *const *. * cris-tdep.c (cris_modes): Make it const char *const []. * filesystem.c (target_file_system_kinds): Likewise. * i386-tdep.c (valid_flavors, valid_conventions): Likewise. * infrun.c (follow_fork_mode_kind_names, follow_exec_mode_names) (can_use_displaced_stepping_enum, scheduler_enums) (exec_direction_names): Likewise. * language.c (_initialize_language): Make the type_or_range_names and case_sensitive_names variables const char *const []. * mips-tdep.c (mips_abi_strings): Make it const char *const []. * python/python.c (python_excp_enums): Likewise. * remote.c (interrupt_sequence_modes): Likewise. * rs6000-tdep.c (powerpc_vector_strings): Likewise. * serial.c (logbase_enums): Likewise. * sh-tdep.c (sh_cc_enum): Likewise. * stack.c (print_frame_arguments_choices, print_entry_values_choices): Likewise. * symtab.c (multiple_symbols_modes): Likewise. * tui/tui-win.c (tui_border_kind_enums, tui_border_mode_enums): Likewise. * utils.c (internal_problem_modes): Likewise.
* gdb/Jan Kratochvil2012-01-261-3/+1
| | | | | | | | | | | | | | | | | | | Do not open script filenames twice. * cli/cli-cmds.c (source_script_from_stream): Pass to source_python_script also STREAM. * python/py-auto-load.c (source_section_scripts): Pass to source_python_script_for_objfile also STREAM. (auto_load_objfile_script): Pass to source_python_script_for_objfile also INPUT. * python/python-internal.h (source_python_script_for_objfile): New parameter file, rename parameter file to filename. * python/python.c (python_run_simple_file): Call PyRun_SimpleFile instead if !_WIN32. Update the function comment. (source_python_script, source_python_script_for_objfile) (source_python_script): New parameter file, rename parameter file to filename. Pass FILENAME to python_run_simple_file. * python/python.h (source_python_script): New parameter file, rename parameter file to filename.
* gdb/Jan Kratochvil2012-01-242-8/+3
| | | | | | | | | Code cleanup. * cli/cli-cmds.c (source_script_from_stream): Never fclose STREAM. Update the function comment for it. (source_script_with_search): Call make_cleanup_fclose for STREAM. * cli/cli-script.c (script_from_file): Do not call make_cleanup_fclose for STREAM.
* gdb/Jan Kratochvil2012-01-231-0/+11
| | | | * cli/cli-cmds.c (find_and_open_script): Handle failure of fdopen.
* * Makefile.in (SFILES): Remove wrapper.c.Keith Seitz2012-01-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | (HFILES_NO_SRCDIR): Remove wrapper.h. (COMMON_OBS): Remove wrapper.o. * cli/cli-interp.c: Don't inlude wrapper.h. * corelow.c: Likewise. (core_open): Replace gdb_target_find_new_threads with TRY_CATCH around target_find_new_threads. * eval.c (fetch_subexp_value): Likewise for value_fetch_lazy. * gdbtypes.c (safe_parse_type): Likewise for parse_and_eval_type. * varobj.c (varobj_create): Likewise for parse_exp_1 and evaluate_expression. (varobj_set_value): Likewise for evaluate_expression and value_assign. (install_new_variable): Likewise for value_fetch_lazy. (adjust_value_for_child_access): Likewise for value_ind. (c_describe_child): Likewise for value_subscript and value_ind. (c_value_of_root): Likewise for evaluate_expression. * wrapper.c: Remove. * wrapper.h: Remove.
* 2012-01-05 Pedro Alves <alves.ped@gmail.com>Pedro Alves2012-01-051-91/+4
| | | | | | | | | | | | | | | * cli/cli-decode.h: Add comments. (CMD_LIST_AMBIGUOUS): Moved to command.h (add_cmd, add_alias_cmd, add_prefix_cmd, add_abbrev_prefix_cmd) (set_cmd_cfunc, set_cmd_sfunc, set_cmd_completer, cmd_cfunc_eq) (set_cmd_context, get_cmd_context, lookup_cmd, lookup_cmd_1) (deprecate_cmd, deprecated_cmd_warning, lookup_cmd_composition) (add_com, add_com_alias, add_info, add_info_alias) (complete_on_cmdlist, complete_on_enum, help_list): Remove declarations. * command.h: Add and adjust comments. (CMD_LIST_AMBIGUOUS): Moved here. (help_cmd, help_cmd_list): Delete declarations.