aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2011-05-202011-05-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves5-36/+73
gdb/ * infcmd.c: Include "inf-loop.h". (step_once): When stepping into an inline subroutine, pretend the target has run. If the target can async, switch the inferior event loop to INF_EXEC_COMPLETE. * inferior.h (user_visible_resume_ptid): Declare. * infrun.c (user_visible_resume_ptid): New function, factored out from `resume'. (resume): Use it. * mi/mi-main.c (mi_execute_async_cli_command): Remove assertion that the current thread is running. Merge async and sync branches.
2011-05-202011-05-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-13/+15
gdb/ * infcmd.c (step_1): Simplify synchronous case.
2011-05-202011-05-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-40/+72
gdb/ * tracepoint.c: Include exceptions.h. (TFILE_PID): Move higher in file. (tfile_open): Delay pushing the tfile target until we're assured the tfile header is present in the file. Wrap reading the initial newline-terminated lines in TRY_CATCH. Pop the target if the initial setup failed. Add the tfile's thread immediately aftwards, before any non-essential setup. Don't skip post_create_inferior if there are no traceframes present in the file. (tfile_close): Remove redundant check for null before xfree call. (tfile_thread_alive): New function. (init_tfile_ops): Register it as to_thread_alive callback.
2011-05-202011-05-20 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-5/+4
gdb/ * tracepoint.c (tfile_open): Delete #if 0'd code.
2011-05-20 * lib/gdb.exp (gdb_test_list_exact): Suggest use of doublePierre Muller3-4/+11
quote pattern to avoid problems with Cygwin/mingw expect versions. * gdb.base/default.exp (show convenience): Use double quote pattern for regular expressions.
2011-05-20gdb/Jan Kratochvil5-13/+161
Fix -readnow for -gdwarf-4 unused type units. * dwarf2read.c (struct signatured_type): Remove the field offset. (create_signatured_type_table_from_index): Remove its initialization. (create_debug_types_hash_table): Likewise. Initialize per_cu.offset instead. Add a complaint call. (process_psymtab_comp_unit): Change assignment to gdb_assert. (process_type_comp_unit, lookup_die_type, dump_die_shallow) (lookup_signatured_type_at_offset, read_signatured_type) (write_one_signatured_type): Update the field for per_cu. gdb/testsuite/ Fix -readnow for -gdwarf-4 unused type units. * gdb.dwarf2/dw4-sig-type-unused.S: New file. * gdb.dwarf2/dw4-sig-type-unused.exp: New file.
2011-05-20*** empty log message ***gdbadmin1-1/+1
2011-05-19 * python/py-inferior.c (python_inferior_exit): UseTom Tromey2-2/+8
target_gdbarch. (python_on_resume): Likewise.
2011-05-192011-05-19 Matt Rice <ratmice@gmail.com>Tom Tromey2-0/+6
* breakpoint.c (bpstat_do_actions_1): Call prevent_dont_repeat.
2011-05-192011-05-19 Hui Zhu <teawater@gmail.com>Hui Zhu2-0/+10
* tracepoint.c (tfile_trace_find): Return directly when num is -1.
2011-05-192011-05-19 Hui Zhu <teawater@gmail.com>Hui Zhu2-1/+5
* xcoffread.c (read_xcoff_symtab): Initialize fcn_aux_saved.
2011-05-19*** empty log message ***gdbadmin1-1/+1
2011-05-18 * dwarf2read.c (dwarf2_add_field): Constify.Tom Tromey5-5/+13
* value.c (value_static_field): Constify. * gdbtypes.h (struct main_type) <field.field_location.physname>: Now const. * ax-gdb.c (gen_static_field): Constify
2011-05-18gdb/Jan Kratochvil5-0/+87
* linux-nat.c (kill_callback): Use SIGKILL first. gdb/testsuite/ * gdb.base/kill-after-signal.c: New file. * gdb.base/kill-after-signal.exp: New file.
2011-05-18Remove one use of sprintf in ada-lang.c (print_it_exception)Joel Brobecker2-1/+5
This is just a minor cleanup of an ARI violation. As this affects code that is normally unreachable (you'd need a runtime where the unit providing the exception hook has been compiled without debugging information), I tested this manually by commenting out the code just above, thus forcing this part of the code to be exercised. gdb/ChangeLog: * ada-lang.c (print_it_exception): Avoid use of sprintf. Tested on x86_64-linux.
2011-05-18 * value.c (value_fn_field): Constify.Tom Tromey11-29/+58
* symtab.c (gdb_mangle_name): Constify. * stabsread.c (update_method_name_from_physname): Make 'physname' argument const. * p-typeprint.c (pascal_type_print_method_args): Make arguments const. Use explicit fputc_filtered loop. (pascal_type_print_base): Constify. * p-lang.h (pascal_type_print_method_args): Update. * linespec.c (add_matching_methods): Constify. (add_constructors): Likewise. * jv-typeprint.c (java_type_print_base): Constify. * gdbtypes.h (struct cplus_struct_type) <fn_fieldlist.fn_field.physname>: Now const. * dwarf2read.c (compute_delayed_physnames): Constify. (dwarf2_add_member_fn): Likewise. * c-typeprint.c (c_type_print_base): Constify. Use cleanups.
2011-05-182011-05-18 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-2/+17
gdb/ * infrun.c (resume): Mention which is the current thread, and its current PC in debug output. (prepare_to_proceed): Mention the thread switching in debug output.
2011-05-18 * linux-thread-db.c (try_thread_db_load_from_pdir_1): Fix absoluteTom Tromey2-31/+33
path check. Use xmalloc and cleanups. (try_thread_db_load_from_dir): Use xmalloc and cleanups.
2011-05-18*** empty log message ***gdbadmin1-1/+1
2011-05-17 * cp-valprint.c (cp_print_value_fields): Catch errors fromTom Tromey2-3/+18
value_static_field.
2011-05-17 * dwarf2read.c (dwarf2_get_die_type): CallTom Tromey3-15/+10
get_die_type_at_offset. * dwarf2expr.c (dwarf_get_base_type): Handle NULL return from get_base_type function.
2011-05-172011-05-17 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-8/+34
gdb/doc/ * gdb.texinfo (Remote Protocol) <Overview>: Mention vCont is required for multi-threading support. (Remote Protocol) <Packets>: Mention that 'c', 's', 'C', 'S' and Hc are deprecated for multi-threading debugging. Point readers at the vCont packet.
2011-05-172011-05-17 Tomas Martinec <fyzmat@gmail.com>Pedro Alves2-0/+7
gdb/ * infrun.c (handle_inferior_event) <handling deferred step>: Clear trap_expected.
2011-05-17*** empty log message ***gdbadmin1-1/+1
2011-05-16 * python/py-auto-load.c (source_section_scripts): Mention objfileDoug Evans2-2/+8
name in warning.
2011-05-162011-05-16 Adrian Cornish <gnu@bluedreamer.com>Tom Tromey2-1/+6
* linux-i386-ipa.c (supply_static_tracepoint_registers): Pass __FILE__ and __LINE__ to internal_error.
2011-05-162011-05-16 Pedro Alves <pedro@codesourcery.com>Pedro Alves19-47/+78
gdb/testsuite/ * gdb.ada/start.exp: Call untested with the correct test filename. * gdb.arch/i386-bp_permanent.exp: Call untested with the correct test filename. Make the test's binary unique. * gdb.arch/i386-signal.exp: Call untested with the correct test filename. * gdb.arch/i386-size-overlap.exp: Ditto. * gdb.arch/Makefile.in (EXECUTABLES): Update. * gdb.base/gcore-buffer-overflow.exp: Ditto. * gdb.cp/call-c.exp: Ditto. * gdb.mi/mi-reverse.exp: Call untested with the correct test filename. Make the test's binary unique. * gdb.mi/Makefile.in (EXECUTABLES): Update. * gdb.python/py-mi.exp: Ditto. * gdb.python/Makefile.in (EXECUTABLES): Update. * gdb.reverse/i386-precsave.exp: Ditto. * gdb.reverse/i387-env-reverse.exp: Call untested with the correct test filename. * gdb.reverse/i387-stack-reverse.exp: Ditto. * gdb.reverse/sigall-precsave.exp: Ditto. Make the test's binary unique. * gdb.reverse/sigall-reverse.exp: Call untested with the correct test filename. * gdb.reverse/Makefile.in (EXECUTABLES): Update. * gdb.trace/tfile.exp: Ditto.
2011-05-16 * linux-thread-db.c (try_thread_db_load_from_pdir_1): New function.Doug Evans2-22/+46
(try_thread_db_load_from_pdir): Call it. If unable to find libthread_db in directory of libpthread, see if we're looking at the separate-debug-info copy.
2011-05-16*** empty log message ***gdbadmin1-1/+1
2011-05-15 * python/py-autoload.c (print_script): Print "Missing" instead ofDoug Evans4-6/+27
"No" for missing scripts. (info_auto_load_scripts): Tweak "Loaded" column to fit "Missing". doc/ * gdb.texinfo (Auto-loading): Document printing of missing scripts.
2011-05-15*** empty log message ***gdbadmin1-1/+1
2011-05-142011-05-14 Yao Qi <yao@codesourcery.com>Yao Qi2-4/+9
* gdb.trace/tfile.c(add_memory_block): Store address in unsigned type.
2011-05-14 * ui-file.c (stdio_file_write_async_safe): Add comment.Doug Evans2-0/+7
2011-05-142011-05-14 Hui Zhu <teawater@gmail.com>Hui Zhu2-1/+6
* ui-file.c (stdio_file_write_async_safe): Add empty check for build.
2011-05-14*** empty log message ***gdbadmin1-1/+1
2011-05-13 Support $pdir and $sdir in libthread-db-search-path.Doug Evans8-104/+256
* 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.
2011-05-13 * NEWS: Mention "info auto-load-scripts".Doug Evans10-72/+420
* 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".
2011-05-13fix >80 cols in earlier entryDoug Evans2-2/+4
2011-05-13fix >80 column entry in earlier entryDoug Evans1-1/+2
2011-05-13gdbTom Tromey6-2/+1037
* dwarf2expr.c (read_uleb128): Cast intermediate result. (read_sleb128): Likewise. gdb/testsuite * gdb.dwarf2/clztest.exp: New file. * gdb.dwarf2/clztest.c: New file. * gdb.dwarf2/clztest.S: New file.
2011-05-13 * gdb.texinfo (Threads): Clarify default value for libthread-db-search-path.Doug Evans2-1/+5
2011-05-13 * dwarf2loc.c (disassemble_dwarf_expression): Fix instructionTom Tromey2-2/+7
offset display.
2011-05-13 * gdb.base/charset.exp: If UTF-16 is not available, skip char16_t, String16 ↵Doug Evans2-4/+16
tests.
2011-05-13 * linux-nat.c (debug_linux_nat_async): Delete.Doug Evans6-40/+107
Replace all references to use debug_linux_nat instead. (show_debug_linux_nat_async): Delete. (sigchld_handler): Call ui_file_write_async_safe instead of fprintf_unfiltered. (_initialize_linux_nat): Remove `set debug lin-lwp-async'. * ui-file.c (struct ui_file): New member to_write_async_safe. (null_file_write_async_safe): New function. (ui_file_write_async_safe): New function. (set_ui_file_write_async_safe): New function. (ui_file_new): Initialize to_write_async_safe. (stdio_file_write_async_safe): New function. (struct stdio_file): New member fd. (stdio_file_new): Initialize to_write_async_safe, fd. (stdio_file_read, stdio_file_isatty): New stdio->fd instead of calling fileno. * ui-file.h (ui_file_write_async_safe_ftype): New typedef. (set_ui_file_write_async_safe): Declare. (ui_file_write_async_safe): Declare. doc/ * gdb.texinfo (Completion): Update example. (Debugging Output): Delete `set/show debug lin-lwp-async'.
2011-05-13 * lib/gdb.exp (is_x86_like_target): New proc.Tom Tromey10-12/+36
* gdb.dwarf2/watch-notconst.exp: Use is_x86_like_target. * gdb.dwarf2/valop.exp: Use is_x86_like_target. * gdb.dwarf2/typeddwarf.exp: Use is_x86_like_target. Pass -nostdlib to compiler. * gdb.dwarf2/typeddwarf.S (_start): Rename from 'main'. * gdb.dwarf2/pieces.exp: Use is_x86_like_target. * gdb.dwarf2/implptr.exp: Use is_x86_like_target. * gdb.dwarf2/dw2-restore.exp: Check for LP64. * gdb.dwarf2/callframecfa.exp: Use is_x86_like_target.
2011-05-13 * utils.c (do_value_free): New function.Tom Tromey7-7/+52
(make_cleanup_value_free): Likewise. * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Handle value freeing correctly. (dwarf2_loc_desc_needs_frame): Call make_cleanup_value_free_to_mark. * dwarf2expr.h (struct dwarf_expr_context) <mark>: Remove field. * dwarf2expr.c (free_dwarf_expr_context): Don't call value_free_to_mark. (new_dwarf_expr_context): Don't call value_mark. * dwarf2-frame.c (execute_stack_op): Call make_cleanup_value_free_to_mark. * defs.h (make_cleanup_value_free): Declare.
2011-05-13gdb/Thiago Jung Bauermann8-8/+68
* mi/mi-main.c (mi_cmd_execute): Use cleanup from prepare_execute_command. * top.c (prepare_execute_command): Return cleanup. (execute_command): Use cleanup from prepare_execute_command. * top.h (prepare_execute_command): Change prototype to return cleanup. * defs.h (struct value): Add opaque declaration. (make_cleanup_value_free_to_mark): Add prototype. * utils.c (do_value_free_to_mark): New function. (make_cleanup_value_free_to_mark): Likewise. gdb/testsuite/ * gdb.python/py-function.exp: Test setting a value from a function which executes a command.
2011-05-13*** empty log message ***gdbadmin1-1/+1
2011-05-12 * dwarf2expr.c (execute_stack_op) <DW_OP_shr>: UnconditionallyTom Tromey2-1/+6
cast left-hand-side to unsigned.
2011-05-12gdbTom Tromey13-123/+2971
PR gdb/12617: * value.h (value_from_contents): Declare. * value.c (value_from_contents): New function. * dwarf2read.c (dwarf_stack_op_name): Add new values. (dwarf2_get_die_type): New function. * dwarf2loc.c (dwarf_expr_get_base_type): New function. (allocate_piece_closure): Acquire reference to values. (read_pieced_value): Update for value-based expressions. (write_pieced_value): Likewise. (free_pieced_value_closure): Call value_free as needed. (dwarf2_evaluate_loc_desc_full): Set get_base_type field. Update for value-based expressions. * dwarf2loc.h (dwarf2_get_die_type): Declare. * dwarf2expr.h (struct dwarf_stack_value) <value>: Change type. <get_base_type>: New field. (struct dwarf_expr_piece) <v.value>: Change type. <v.regno>: New field. (struct dwarf_expr_context) <mark>: New field. (dwarf_expr_piece, dwarf_expr_fetch): Update. (dwarf_expr_pop, dwarf_expr_push): Remove. (dwarf_expr_push_address): Declare. * dwarf2expr.c (dwarf_arch_cookie): New global. (struct dwarf_gdbarch_types): New. (dwarf_gdbarch_types_init, dwarf_expr_address_type): New functions. (dwarf_expr_push): Change type of 'value' argument. Update. Now static. (dwarf_expr_push_address): New function. (dwarf_expr_pop): Now static. (dwarf_expr_fetch): Change return type. (dwarf_require_integral): New function. (dwarf_expr_fetch): Simplify. (add_piece): Update. (base_types_equal_p, dwarf_get_base_type, get_unsigned_type): New functions. (execute_stack_op) <sign_ext>: Remove. Use values for DWARF stack. <DW_OP_GNU_const_type, DW_OP_GNU_deref_type, DW_OP_GNU_regval_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret>: New cases. (_initialize_dwarf2expr): New function. (add_piece): Update. (new_dwarf_expr_context): Set new field. (free_dwarf_expr_context): Call value_free_to_mark. * dwarf2-frame.c (no_base_type): New function. (execute_stack_op): Set get_base_type field. Update. gdb/testsuite * gdb.dwarf2/typeddwarf.S: New file. * gdb.dwarf2/typeddwarf.c: New file. * gdb.dwarf2/typeddwarf.exp: New file.