1 2009-06-19 Samuel Bronson <naesten@gmail.com>
4 * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
5 for prefix commands to avoid duplicates in the output.
7 2009-06-19 Samuel Bronson <naesten@gmail.com>
10 * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
13 2009-06-19 Jerome Guitton <guitton@adacore.com>
15 * breakpoint.c (expand_line_sal_maybe): When explicit_line,
16 skip prologue on each sals.
17 (skip_prologue_sal): Return explicit_line and explicit_pc
20 2009-06-19 Tristan Gingold <gingold@adacore.com>
22 * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
25 2009-06-19 Tristan Gingold <gingold@adacore.com>
26 * machoread.c (macho_symtab_read): Adjust for bfd changes.
27 * darwin-nat.h (struct darwin_exception_msg): New type to describe
29 (struct private_thread_info): New type to describe the state of the
31 (DEF_VEC_I thread_t): Removed, replaced by ...
32 (DEF_VEC_O darwin_thread_t): ... this new type.
33 (struct darwin_inferior): Renamed to ...
34 (struct private_inferior): ... this type. Fields added.
35 (darwin_not_port): Moved into the private inferior structure.
36 * darwin-nat.c: Add includes, improve comments.
37 Rewrite to handle multiple threads and processes.
38 (darwin_resume_to): New function and protype.
39 (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
40 (darwin_kill_inferior): Add ops argument.
41 (darwin_pid_to_str): New function.
42 (darwin_thread_alive): Ditto.
43 (darwin_inf, darwin_not_port): Removed.
44 (darwin_inf_fake_stop): New variable.
45 (msgin, msgout, msg_state, exc_msg): Removed.
46 (mach_check_error): Use warning instead of error.
47 (darwin_ptrace): Adjust debug level.
48 (cmp_thread_t): Fix names (typo).
49 (darwin_check_new_threads): Argument is now an inferior,
50 adjust for new structures, add no change check, ignore dead ports,
51 handle first thread case.
52 (find_inferior_task_it): New function.
53 (find_inferior_notify_it): Ditto.
54 (darwin_find_inferior_by_task): Ditto.
55 (darwin_find_inferior_by_notify): Ditto.
56 (darwin_find_thread): Ditto.
57 (darwin_suspend_inferior): Ditto.
58 (darwin_resume_inferior): Ditto.
59 (catch_exception_raise_state): Removed.
60 (catch_exception_raise_state_identity): Removed.
61 (darwin_suspend_inferior_it): New function.
62 (darwin_resume_inferior_it): Ditto.
63 (darwin_dump_message): New function, extracted from darwin_wait.
64 (darwin_decode_exception_message): New function.
65 (darwin_encode_reply): New function.
66 (catch_exception_raise): Removed.
67 (darwin_send_reply): New function, extracted from darwin_resume.
68 (darwin_resume_thread): New function, extracted from darwin_resume.
69 (struct resume_inferior_threads_param): New type.
70 (darwin_resume_inferior_threads_it): New function.
71 (darwin_resume_inferior_threads): New function.
72 (darwin_suspend_inferior_threads): New function.
73 (darwin_resume): Mostly rewritten to handle multiple threads and
75 (darwin_decode_message): New function extracted from darwin_wait.
76 (cancel_breakpoint): New function.
77 (darwin_wait): Mostly rewritten. Handle multiple threads.
78 (darwin_mourn_inferior): Adjust for per process structures.
79 (darwin_reply_to_all_pending_messages): New function.
80 (darwin_stop_inferior): Adjust for per inferior structures.
81 (darwin_attach_pid): Ditto.
82 (darwin_init_thread_list): Ditto.
83 (darwin_attach): Ditto.
84 (darwin_detach): Ditto.
85 (darwin_files_info): Now empty.
86 (darwin_pid_to_str): Adjust returns string to match one expected by
88 (darwin_read_write_inferior): Rename err variable to match other uses.
89 Adjust debug message. Handle submaps.
90 (darwin_xfer_memory): Adjust for per inferior structures.
91 (set_enable_mach_exceptions): Ditto.
92 (darwin_pid_to_exec_file): New function.
93 (darwin_get_ada_task_ptid): Ditto.
94 (darwin_supports_multi_process): Ditto.
95 (_initialize_darwin_inferior): Remove useless assertion, adjust for
96 per inferior structures. Add new target operations.
98 2009-06-18 Hui Zhu <teawater@gmail.com>
99 Michael Snyder <msnyder@vmware.com>
101 * infrun.c (handle_inferior_event): Improve reverse stepping
102 through function epilogue.
104 * infrun.c (handle_inferior_event): Reverse-next through
107 2009-06-18 Paul Pluzhnikov <ppluzhnikov@google.com>
109 * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
112 2009-06-17 Tom Tromey <tromey@redhat.com>
114 * dwarf2read.c (zlib_decompress_section): Use a cleanup.
116 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
118 * gdbarch.sh (pointer_to_address): Change to type 'm'.
119 (address_to_pointer): Likewise.
120 * gdbarch.c, gdbarch.h: Regenerate.
122 * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
123 (signed_pointer_to_address): Likewise.
124 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
125 * findvar.c (unsigned_pointer_to_address): Likewise.
126 (signed_pointer_to_address): Likewise.
127 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
129 * avr-tdep.c (avr_address_to_pointer): Likewise.
130 (avr_pointer_to_address): Likewise.
131 * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
132 (iq2000_address_to_pointer): Likewise.
133 * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
134 (m32c_m16c_pointer_to_address): Likewise.
135 * spu-tdep.c (spu_pointer_to_address): Likewise.
136 * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
137 (xstormy16_address_to_pointer): Likewise.
139 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
141 * printcmd.c (print_scalar_formatted): Always truncate
144 * cli-dump.c (struct callback_data): Change type of load_offset
146 (restore_binary_file): Update type casts.
147 (restore_command): Parse load_offset as address, not long.
149 * utils.c (string_to_core_addr): Do not sign-extend value.
150 * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
151 before comparing against requested frame address.
153 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
155 * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
156 * gdbarch.h, gdbarch.c: Regenerate.
158 * gcore.c (default_gcore_target): Make return value const.
159 Call gdbarch_gcore_bfd_target if present.
160 (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
162 * corelow.c (core_read_description): Call gdbarch_core_read_description
163 on core_gdbarch instead of current_gdbarch.
165 * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
167 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
169 * gdbtypes.c (create_string_type): Receive character type as argument.
170 * gdbtypes.h (create_string_type): Add character type argument.
171 * dwarf2read.c (read_tag_string_type): Pass character type to
174 * value.h (value_string): Add character type argument.
175 * valops.c (value_string): Add character type argument. Pass it to
176 create_string_type. Do not allocate space in inferior.
177 * valarith.c (value_concat): Pass character type to value_string.
179 * value.h (value_typed_string): Rename to ...
180 (value_cstring): ... this.
181 * valops.c (value_typed_string): Rename to ...
182 (value_cstring): ... this.
183 * c-lang.c (evaluate_subexp_c): Update.
185 * python/python-value.c (builtin_type_pychar): New define.
186 (convert_value_from_python): Call value_cstring instead
187 of value_from_string.
188 * value.c (value_from_string): Remove.
189 * value.h (value_from_string): Remove.
191 * eval.c (evaluate_subexp_standard): Pass character type to
192 value_string. Pass expression architecture to value_nsstring
193 and lookup_child_selector.
194 * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
195 (lookup_child_selector): Likewise.
196 (value_nsstring): Likewise.
197 * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
198 Pass character type to value_string..
199 (lookup_child_selector): Likewise.
200 (value_nsstring): Add GDBARCH parameter, use it instead of
201 objfile architecture. Pass architecture to lookup_objc_class
202 and lookup_child_selector. Pass character type to value_string.
203 (end_msglist): Pass architecture to lookup_objc_class.
204 * objc-exp.y: Pass architecture to lookup_objc_class.
206 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
208 * gdbtypes.h (struct language_defn): Add forward declaration.
209 (lookup_typename): Add LANGUAGE and GDBARCH parameters.
210 (lookup_unsigned_typename): Likewise.
211 (lookup_signed_typename): Likewise.
212 * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
213 Use them instead of current_language and current_gdbarch.
214 (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
215 Pass them to lookup_typename.
216 (lookup_signed_typename): Likewise.
218 * c-exp.y: Pass parse_language and parse_gdbarch to
219 lookup_unsigned_typename and lookup_signed_typename.
220 * objc-exp.y: Likewise.
221 * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
223 * c-lang.c (evaluate_subexp_c): Pass expression language and
224 gdbarch to lookup_typename.
225 * printcmd.c (printf_command): Pass current language and
226 gdbarch to lookup_typename.
227 * python/python-type.c (typy_lookup_typename): Likewise.
228 Include "language.h".
230 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
232 * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
233 Use it instead of current_gdbarch. Pass architecture to
234 sparc32_gregset_supplies_p.
235 (sparc64_fpregset_supplies_p): Add GDBARCH parameter. Use it instead
236 of current_gdbarch. Pass architecture to sparc32_fpregset_supplies_p.
237 * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
238 sparc64nbsd_fpregset_supplies_p): Likewise.
239 * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
240 Add GDBARCH parameter.
241 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
242 (sparc_fetch_inferior_registers): Pass regcache architecture to
243 sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
244 (sparc_store_inferior_registers): Likewise.
245 * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
246 Add GDBARCH parameter.
247 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
249 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
251 * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
253 * aix-thread.c (pd_enable): Likewise.
254 * amd64-linux-nat.c (ps_get_thread_area): Likewise.
255 * bsd-uthread.c (bsd_uthread_activate): Likewise.
256 * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
257 * linux-thread-db.c (enable_thread_event): Likewise.
258 * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
259 * nto-procfs.c (procfs_open): Likewise.
260 * procfs.c (invalidate_cache, procfs_insert_watchpoint,
261 info_proc_mappings, info_mappings_callback): Likewise.
262 * record.c (record_open): Likewise.
263 * rs6000-nat.c (ARCH64): Likewise.
264 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
265 (darwin_bfd_open): Likewise.
266 * memattr.c (mem_info_command): Likewise.
268 * windows-nat.c (win32_resume): Use current regcache architecture
269 instead of current_gdbarch.
271 * dbug-rom.c (dbug_regname): Remove check against number of
272 registers in current_gdbarch.
273 * solib-pa64.c (read_dynamic_info): Remove unused variable.
275 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
277 * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
278 use it instead of current_gdbarch.
279 * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
280 * arm-tdep.c (arm_skip_prologue): Pass architecture to
281 deprecated_pc_in_call_dummy.
283 * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
284 Use it instead of current_gdbarch.
285 * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
286 * breakpoint.c (expand_line_sal_maybe): Pass architecture to
287 skip_prologue_using_sal.
288 * arm-tdep.c (skip_prologue_using_sal): Likewise.
289 * lm32-tdep.c (lm32_skip_prologue): Likewise.
290 * m32-tdep.c (m32c_skip_prologue): Likewise.
291 * mips-tdep.c (mips_skip_prologue): Likewise.
292 * moxie-tdep.c (moxie_skip_prologue): Likewise.
293 * mt-tdep.c (mt_frame_unwind_cache): Likewise.
294 * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
295 * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
296 it to skip_prologue_using_sal. Update call sites ...
297 (frv_skip_prologue, frv_frame_unwind_cache): ... here.
299 * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
300 (check_for_saved): Use it instead of current_gdbarch.
301 (mn10300_analyze_prologue): Set it.
303 * value.c (using_struct_return): Add GDBARCH parameter. Use it
304 instead of current_gdbarch.
305 * value.h (using_struct_return): Add GDBARCH parameter.
306 * eval.c (evaluate_subexp_standard): Pass architecture to
308 * infcall.c (call_function_by_hand): Likewise.
309 * stack.c (return_command): Likewise.
310 * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
312 * symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
314 * symtab.h (in_prologue): Add GDBARCH parameter.
315 * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
317 * eval.c (evaluate_subexp_standard): Use expression architecture
318 instead of current_gdbarch.
320 * c-lang.c (evaluate_subexp_c): Use expression architecture and
321 language instead of current_gdbarch and current_language.
323 * printcmd.c (do_one_display): Use expression architecture instead
326 * infcmd.c (print_return_value): Use architecture of stop_regcache
327 instead of current_gdbarch.
328 (print_vector_info, print_float_info): Remove GDBARCH argument,
329 use frame architecture instead.
330 (vector_info, float_info): Update calls.
332 * objc-lang.c (objc_skip_trampoline): Use frame architecture
333 instead of current_gdbarch.
335 * parse.c (write_dollar_variable): Use parse architecture instead
338 * source.c (line_info): Use objfile architecture instead of
341 * symtab.c (find_function_start_sal): Use gdbarch instead of
343 (print_msymbol_info): Use objfile architecture instead of
346 * valops.c (value_assign): Use frame architecture instead of
349 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
351 * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
353 * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
355 (enter_linenos): Likewise.
356 * dbxread.c (process_one_symbol): Likewise.
357 * dwarf2read.c (dwarf_decode_lines): Likewise.
358 * mdebugread.c (psymtab_to_symtab_1): Likewise.
359 * xcoffread.c (enter_line_range): Likewise.
361 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
363 * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
364 architecture instead of current_gdbarch.
365 (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
366 (gen_expr): Pass expression to get_struct_ref.
368 * symtab.h (struct symbol_ops): Add GDBARCH parameter to
369 tracepoint_var_ref callback.
370 * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
371 symbol operation callback.
372 * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
373 Use it instead of current_gdbarch.
374 (locexpr_tracepoint_var_ref): Add GDBARCH parameter. Pass it to
375 dwarf2_tracepoint_var_ref.
376 (loclist_tracepoint_var_ref): Likewise.
378 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
380 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
381 Use it instead of address bits of current_gdbarch.
382 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
383 * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
385 (arm_scan_prologue): Likewise.
386 * m32c-tdep.c (m32c_analyze_prologue): Likewise.
387 * mep-tdep.c (mep_analyze_prologue): Likewise.
388 * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
389 * s390-tdep.c (s390_analyze_prologue): Likewise.
391 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
393 * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
394 frame architecture instead of current_gdbarch.
395 (mi_cmd_data_list_changed_registers): Likewise.
396 (mi_cmd_data_list_register_values): Likewise. Pass selected
397 frame to get_register.
398 (get_register): Add FRAME argument, use it as frame to retrieve
399 registers from (instead of selected frame). Use frame architecture
400 instead of current_gdbarch.
401 (mi_cmd_data_write_register_values): Use current regcache
402 architecture instead of current_gdbarch.
404 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
406 * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
407 use frame architecture instead. Replace current_gdbarch uses.
408 (tui_show_registers): Update call.
409 (tui_get_register): Remove GDBARCH parameter; use frame architecture
411 (tui_show_register_group): Update call.
412 (tui_check_register_values): Likewise.
413 (tui_register_format): Remove GDBARCH parameter; use frame
414 architecture instead. Replace current_gdbarch uses.
415 (tui_get_register): Update call.
417 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
419 * gdbarch.sh (construct_inferior_arguments): Remove.
420 * gdbarch.c, gdbarch.h: Regenerate.
421 * infcmd.c (get_inferior_args): Call construct_inferior_arguments
422 directly instead of gdbarch_construct_inferior_arguments.
423 (construct_inferior_arguments): Remove GDBARCH argument.
424 * inferior.h (construct_inferior_arguments): Likewise.
426 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
428 * symfile.c (section_is_mapped): Use objfile architecture instead
430 (TARGET_LONG_BYTES): Remove.
431 (read_target_long_array): Add SIZE argument. Use it instead of
433 (simple_read_overlay_table): Retrieve long size from objfile
434 architecture; pass it to read_target_long_array.
435 (simple_read_overlay_region_table): Likewise.
436 (simple_overlay_update_1): Likewise.
438 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
440 * infrun.c (cleanup_displaced_step_closure): Remove.
441 (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
442 (displaced_step_prepare): Use displaced_step_clear_cleanup instead
443 of cleanup_displaced_step_closure.
444 (handle_inferior_event, keep_going): Use thread architecture instead
447 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
449 * infrun.c (handle_inferior_event): Use current frame architecture
450 or thread architecture instead of current_gdbarch. Pass to
451 handle_step_into_function and handle_step_into_function_backward.
452 (handle_step_into_function): Add GDBARCH parameter. Use it instead
454 (handle_step_into_function_backward): Likewise.
455 (insert_step_resume_breakpoint_at_frame): Use frame architecture
456 instead of current_gdbarch.
457 (insert_step_resume_breakpoint_at_caller): Likewise.
459 2009-06-17 Pierre Muller <muller@ics.u-strasbg.fr>
460 Pedro Alves <pedro@codesourcery.com>
462 * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
463 is pushed for watchpoint promotion to hardware watchpoint.
465 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
467 * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
468 (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
469 (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
470 (dwarf_ranges_section, dwarf_frame_section)
471 (dwarf_eh_frame_section): Removed.
472 (dwarf2_resize_section): Likewise.
473 (dwarf2_read_section): Now static, use bfd_mmap() if possible.
474 (dwarf2_get_section_info): New function.
475 (munmap_section_buffer): Likewise.
476 (dwarf2_per_objfile_cleanup): Likewise.
477 (section_is_p): Signature change.
478 * dwarf2-frame.c (dwarf2_build_frame_info): Use
479 dwarf2_get_section_info instead of dwarf2_read_section.
481 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
483 * solib.c (symbol_add_stub): New FLAGS parameter.
484 (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
486 (solib_add): Defer breakpoint_re_set until after all solibs.
487 * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
488 * rs6000-nat.c (objfile_symbol_add): Adjust.
489 * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
490 (new_symfile_objfile): Likewise.
491 (symbol_file_add_with_addrs_or_offsets): Likewise.
492 (symbol_file_add_from_bfd): Likewise.
493 (symbol_file_add): Likewise.
494 * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
495 * symfile-mem.c (symbol_file_add_from_memory): Adjust.
496 * windows-nat.c (safe_symbol_file_add_stub): Adjust.
497 * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
499 2009-06-16 Keith Seitz <keiths@redhat.com>
501 * linespec.c (collect_methods): Delete.
502 (add_matching_methods): Reove destructor special case.
503 (find_method): Call find_methods directly instead of
505 * valops.c (value_struct_elt): Remove destructor
507 (check_field): Likewise.
508 (value_struct_elt_for_reference): Likewise.
509 (destructor_name_p): Remove misleading comment about dtors
510 being "special cases".
511 * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
512 * gdbtypes.c (get_destructor_fn_field): Likewise.
514 2009-06-16 Pedro Alves <pedro@codesourcery.com>
516 * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
517 TARGET_OJECT_MEMORY reads to the topmost target, not to the
518 flattened current_target.
520 2009-06-16 Tristan Gingold <gingold@adacore.com>
522 * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
524 (avr_register_name): Add const to register_names.
525 (avr_scan_arg_moves): Move inside avr_scan_prologue.
526 (avr_scan_prologue): Add pc_end argument.
527 Only read prologue bytes that can be read.
528 Limit the scan to the known prologue length.
529 Makes pattern variables static and const.
531 (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
533 (avr_breakpoint_from_pc): Constify avr_break_insn.
534 (avr_extract_return_value): Fix function comment.
535 (avr_frame_unwind_cache): Fix GNU style violations.
536 Pass current_pc argument to avr_scan_prologue to stop prologue
537 analysis to the current pc. This fixes the bug with the 'next'
539 Correctly set the SP register of the previous frame (use call_length).
540 (avr_frame_prev_register): Fix indentation.
541 Correctly read PC from the stack on avr6 architectures.
542 (avr_push_dummy_call): Fix indentation.
543 (avr_gdbarch_init): Set call_length according to the architecture.
545 2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
547 * infcall.c (show_unwind_on_terminating_exception_p): New
549 (call_function_by_hand): Create breakpoint and clean-up call for
550 std::terminate.breakpoint. Add unwind_on_terminating_exception_p
551 gate. Pop frame on breakpoint hit.
552 (_initialize_infcall): Add add_setshow_boolean_cmd for
553 unwind-on-terminating-exception.
555 2009-06-12 Kevin Buettner <kevinb@redhat.com>
557 * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
558 `has_section_at_zero' flag from stripped objfile to separate,
559 debug info only, objfile.
561 2009-06-12 Pedro Alves <pedro@codesourcery.com>
563 * exec.h (section_table_xfer_memory_partial): Improve description,
564 mention SECTION_NAME.
565 * exec.c (section_table_xfer_memory_partial): Remove stale
568 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
570 * nto-tdep.h (nto_generic_supply_gpregset)
571 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
572 * nto-tdep.c (nto_generic_supply_gpregset)
573 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
575 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
577 * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
578 (i386nto_sigcontext_addr): Change the way context address is calculated.
579 (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
580 sc_sp_offset and set sc_reg_offset and sc_num_regs.
582 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
584 * i386-nto-tdep.c (i386_nto_target): Remove definition.
585 (init_i386nto_ops): Use macros to set fields to global
586 current_nto_target directly.
587 (i386nto_init_abi): Remove unused nto_set_target call.
588 * nto-tdep.h (nto_set_target): Remove unused declaration.
589 * nto-tdep.c (nto_set_target): Remove unused function.
591 2009-06-11 Pedro Alves <pedro@codesourcery.com>
593 * breakpoint.c (break_command_really): Rename local variable
594 breakpoint_chain to bkpt_chain.
596 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
598 Add support for XMM registers.
599 * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
600 (i386nto_register_area): Correctly calculate offsets and sizes for
601 all supported registers.
603 2009-06-11 Tom Tromey <tromey@redhat.com>
605 * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
606 'static' from local variable definitions.
608 2009-06-11 Pedro Alves <pedro@codesourcery.com>
610 * symtab.c (append_expanded_sal): Remove unused local variables.
612 2009-06-11 Pedro Alves <pedro@codesourcery.com>
614 * infrun.c (sched_multi): New global.
615 (resume): If sched_multi is set, resume only threads of the
617 (prepare_to_proceed): Don't switch over to wait_ptid if we're
618 resuming a different inferior, and sched_multi is off.
619 (show_schedule_multiple): New.
620 (_initialize_infrun): Register new "set schedule-multiple" command.
621 * inferior.h (sched_multi): Declare.
622 * NEWS: Mention new "schedule-multiple" setting.
624 2009-06-11 Pedro Alves <pedro@codesourcery.com>
626 * varobj.c (varobj_create): Properly restore the selected frame.
628 2009-06-05 Tom Tromey <tromey@redhat.com>
630 * inferior.c (print_inferior): Make a table, not a list. Emit
633 2009-06-10 Jonas Maebe <jonas.maebe@elis.ugent.be>
635 * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
636 darwin_wait (blocking wait).
637 (darwin_kill_inferior): Likewise.
639 2009-06-10 Pedro Alves <pedro@codesourcery.com>
641 * infrun.c (handle_inferior_event): Update comment around trying
642 to revert back to a stepping thread that has exited.
644 2009-06-10 Cary Coutant <ccoutant@google.com>
646 * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
647 DW_LNE_set_discriminator.
649 2009-06-10 Pierre Muller <muller@ics.u-strasbg.fr>
651 * breakpoint.c: ARI fixes.
652 (create_overlay_event_breakpoint): Avoid assignment inside if statement.
653 (print_one_breakpoint_location): Likewise.
654 (create_longjmp_breakpoint): Likewise.
655 (tracepoint_save_command): Likewise
656 (bpstat_find_step_resume_breakpoint): No operator at end of line.
657 (bpstat_stop_status): Likewise.
658 (describe_other_breakpoints): Likewise.
659 (hw_watchpoint_used_count): Likewise.
660 (expand_line_sal_maybe): Likewise.
661 (break_command_really): Likewise.
662 (delete_command): Likewise.
663 (do_enable_breakpoint): Likewise.
664 (delete_trace_command): Likewise.
665 (catch_exception_command_1): Likewise and remove extra parentheses.
667 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
669 * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
670 "ubreak" command that does not exist.
672 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
674 * cli/cli-decode.c (add_alias_cmd): Correct assertion.
676 2009-06-07 Pedro Alves <pedro@codesourcery.com>
678 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
680 2009-06-07 Pedro Alves <pedro@codesourcery.com>
683 * proc-utils.h (procfs_first_available): Don't declare here.
684 * sol-thread.c: Include procfs.h instead of sys/procfs.h and
686 * procfs.c: Include procfs.h.
687 (procfs_target): Make it public. Don't register
688 procfs_can_use_hw_breakpoint here.
689 (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
690 defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
691 (procfs_can_use_hw_breakpoint): Remove check of
692 TARGET_HAS_HARDWARE_WATCHPOINTS.
693 (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
695 (_initialize_procfs): Don't add the procfs target here.
697 * i386-sol2-nat.c: Include target.h and procfs.h.
698 (_initialize_amd64_sol2_nat): Install the procfs target here,
699 customized with watchpoints support.
700 * irix5-nat.c: Include target.h.
701 (_initialize_core_irix5): Rename to ...
702 (_initialize_irix5_nat): ... this. Install the procfs target
703 here, customized with watchpoints support.
704 * alpha-nat.c: Include procfs.h.
705 (_initialize_core_alpha): Rename to...
706 (_initialize_alpha_nat): ... this. Install the procfs target
707 here, customized with watchpoints support.
708 * sparc-sol2-nat.c: Include target.h and procfs.h.
709 (_initialize_sparc_sol2_nat): New.
711 * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
712 * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
713 * config/mips/irix5.mh (NAT_FILE): Delete.
714 * config/mips/irix6.mh (NAT_FILE): Delete.
715 * config/mips/nm-irix5.h: Delete.
717 20009-06-07 Pedro Alves <pedro@codesourcery.com>
719 * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
720 to enum target_object. Cleanup comments.
721 * auxv.h: Include "target.h". Cleanup comments to not mention
722 NATIVE_XFER_AUXV anymore.
724 2009-06-07 Pedro Alves <pedro@codesourcery.com>
726 * inferior.h (procfs_first_available): Move declaration to...
727 * proc-utils.h: ... here.
728 * sol-thread.c: Include procfs.h and proc-utils.h.
730 2009-06-07 Pedro Alves <pedro@codesourcery.com>
732 * inferior.h (proc_iterate_over_mappings): Delete declaration.
733 * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
734 * procfs.c (proc_iterate_over_mappings): Delete.
736 2009-06-07 Pedro Alves <pedro@codesourcery.com>
738 * target.h (struct target_ops): Make to_has_all_memory,
739 to_has_memory, to_has_stack, to_has_registers and to_has_execution
740 methods instead of variables.
741 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
742 (target_has_registers_1, target_has_execution_1): Declare
744 (target_has_all_memory): Rewrite to call target_has_all_memory_1.
745 (target_has_memory): Rewrite to call target_has_memory_1.
746 (target_has_stack): Rewrite to call target_has_all_stack_1.
747 (target_has_registers): Rewrite to call target_has_registers_1.
748 (target_has_execution): Rewrite to call target_has_execution_1.
749 (default_child_has_all_memory, default_child_has_memory)
750 (default_child_has_stack, default_child_has_registers)
751 (default_child_has_execution): Declare.
752 (target_mark_running, target_mark_exited): Delete declarations.
753 * target.c (default_child_has_all_memory,
754 default_child_has_memory, default_child_has_stack,
755 default_child_has_registers, default_child_has_execution): New.
756 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
757 target_has_registers_1, target_has_execution_1): New.
758 (add_target): Default the to_has_all_memory, to_has_all_memory,
759 to_has_memory, to_has_stack, to_has_registers and to_has_execution
760 callbacks to return 0.
761 (update_current_target): Do not inherit to_has_all_memory,
762 to_has_memory, to_has_stack, to_has_registers or to_has_execution.
763 (target_mark_running, target_mark_exited): Delete.
764 (memory_xfer_partial): Adjust.
765 (target_read_memory, target_write_memory, target_search_memory):
766 Dispatch to the the top-most target, not the flattened
768 (target_info): Adjust.
769 (init_dummy_target): Install return_zero as callback for
770 to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
772 (set_maintenance_target_async_permitted): Use have_live_inferiors
773 instead of target_has_execution.
774 * target-memory.c (target_write_memory_blocks): Dispatch memory
775 writes to the the top-most target, not the flattened
778 * breakpoint.c (insert_breakpoints): Don't check for
779 target_has_execution here.
780 (update_global_location_list): Check if there are live inferiors
781 to debug instead of target_has_execution.
782 * infcmd.c (kill_command, detach_command): Check if there are
783 inferiors instead of target_has_execution.
784 * inferior.h (have_live_inferiors): Declare.
785 * inferior.c (have_live_inferiors): New.
786 * infrun.c (normal_stop): Don't check for target_has_execution to
787 finish the thread states.
788 * thread.c (is_thread_state, is_stopped, is_exited, is_running)
789 (any_running, is_executing): Remove checks for
790 target_has_execution.
791 * top.c (kill_or_detach): Don't try to kill core inferiors.
792 (quit_target): Don't check for target_has_execution.
794 * corelow.c (core_has_memory, core_has_stack, core_has_registers):
796 (init_core_ops): Install core_has_memory, core_has_stack and
798 * exec.c (exec_has_memory): New.
799 (init_exec_ops): Install exec_has_memory.
800 * remote.c (remote_add_inferior): Don't call target_mark_running.
801 (remote_start_remote): Don't call target_mark_exited or call
803 (remote_open_1): Use have_inferiors instead of
804 target_has_execution. Don't use target_mark_exited.
805 (init_remote_ops): Install deafult_child_has_all_memory,
806 default_child_has_memory, default_child_has_stack,
807 default_child_has_registers, default_child_has_execution.
808 * bsd-kvm.c (bsd_kvm_return_one): New.
809 (bsd_kvm_add_target): Register bsd_kvm_return_one as
810 to_has_memory, to_has_stack and to_has_registers callbacks.
811 * remote-m32r-sdi.c (m32r_return_one): New.
812 (init_m32r_ops): Register it.
813 * inf-child.c (inf_child_target): Adjust to register
814 default_child_has_all_memory, default_child_has_memory,
815 default_child_has_stack, default_child_has_registers,
816 default_child_has_execution callbacks.
817 * gnu-nat.c (init_gnu_ops): Likewise.
818 * go32-nat.c (init_go32_ops): Likewise.
819 * hpux-thread.c (init_hpux_thread_ops): Likewise.
820 * monitor.c (init_base_monitor_ops): Likewise.
821 * nto-procfs.c (init_procfs_ops): Likewise.
822 * remote-mips.c (_initialize_remote_mips): Likewise.
823 * windows-nat.c (init_windows_ops): Likewise.
824 * remote-sim.c (gdbsim_create_inferior): Don't use
825 target_mark_running or target_mark_exited.
826 (gdbsim_mourn_inferior): Don't call target_mark_exited.
827 (init_gdbsim_ops): Adjust to register
828 default_child_has_all_memory, default_child_has_memory,
829 default_child_has_stack, default_child_has_registers,
830 default_child_has_execution callbacks.
832 * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
833 there's no inferior selected, defer to a lower stratum.
835 2009-06-05 Tom Tromey <tromey@redhat.com>
837 * varobj.c (update_dynamic_varobj_children): Wrap error text in
839 (install_visualizer): Likewise.
840 (varobj_set_visualizer): Likewise.
842 2009-06-05 Marc Khouzam <marc.khouzam@ericsson.com>
844 * mi/mi-main.c (mi_cmd_exec_continue)
845 (mi_cmd_exec_interrupt): Adjust parsing of thread group
846 ids to current reality, where they don't have any 'p' prefix.
848 2009-06-05 Aleksandar Ristovski <aristovski@qnx.com>
850 * corelow.c (core_open): Check for core_gdbarch before calling
851 gdbarch_target_signal_from_host.
853 2009-06-05 Tom Tromey <tromey@redhat.com>
855 * c-exp.y (parse_number): Don't use K&R definition.
859 2009-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
861 * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
863 2009-06-04 Ulrich Weigand <uweigand@de.ibm.com>
865 * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
866 * ax-gdb.c (gen_var_ref): Likewise.
867 * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
868 * printcmd.c (address_info): Likewise.
869 * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
870 * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
871 * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
872 * dwarf2loc.h: Likewise.
873 * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
875 * symtab.h: (struct symbol_register_ops): New struct definition.
876 (struct symbol): Make "ops" member a union of symbol_computed_ops and
877 symbol_register_ops callback pointers.
878 (SYMBOL_REGISTER_OPS): New macro.
879 * tracepoint.c: Include "objfiles.h".
880 (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
881 callback to retrieve register numbers.
882 * ax-gdb.c (gen_var_ref): Likewise.
883 * findvar.c (read_var_value): Likewise.
884 * printcmd.c (address_info): Likewise.
886 * coffread.c (coff_reg_to_regnum): New function.
887 (coff_register_funcs): New static variable.
888 (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
889 Install SYMBOL_REGISTER_OPS callbacks.
890 * mdebugread.c (mdebug_reg_to_regnum): New function.
891 (mdebug_register_funcs): New static variable.
892 (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
893 Install SYMBOL_REGISTER_OPS callbacks.
894 * stabsread.c (stab_reg_to_regnum): New function.
895 (stab_register_funcs): New static variable.
896 (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
897 Install SYMBOL_REGISTER_OPS callbacks.
899 2009-06-03 Doug Evans <dje@google.com>
901 * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
902 after discarding its contents.
904 2009-06-03 Pedro Alves <pedro@codesourcery.com>
906 * target.c: Include "exec.h".
907 (update_current_target): Don't inherit to_sections or
909 (target_get_section_table): New.
910 (target_section_by_addr): Fetch the section table from the passed
912 (memory_xfer_partial): Handle unmapped overlay sections before
913 anything else. Get the overlay mapped address here. Adjust to
914 use section_table_xfer_memory_partial.
915 (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
916 instead of TARGET_OBJECT_MEMORY.
917 (target_resize_to_sections): Delete.
918 (remove_target_sections): Adjust to remove target sections from
919 `current_target_sections', and use resize_section_table.
920 * target.h (struct target_ops) <to_sections, to_sections_end>:
922 <to_get_section_table>: New method.
923 (xfer_memory, print_section_info): Delete declarations.
924 (struct target_section_table): New type.
925 (target_get_section_table): Declare.
926 (target_resize_to_sections): Delete declaration.
927 (remove_target_sections): Delete declaration.
928 * bfd-target.c (target_bfd_xfer_partial): Get the section table
930 (target_bfd_get_section_table): New.
931 (target_bfd_xclose): Adjust.
932 (target_bfd_reopen): Store the section table in the to_data field.
933 * corelow.c (core_data): New.
934 (core_close): Adjust to release core_data and its sections.
935 (core_open): Allocate core_data, and build its target sections
937 (deprecated_core_resize_section_table): New.
938 (core_files_info): Pass core_data to print_section_info.
939 (core_xfer_partial): Adjust to use
940 section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
941 (init_core_ops): Do not install a deprecated_xfer_memory callback
943 * solib.c (update_solib_list): Add the shared library sections
944 to the current target sections table.
945 * exec.c (current_target_sections_1): New global.
946 (current_target_sections): New global.
947 (exec_close_1): New function, refactored from exec_close. Remove
948 the exec_bfd's sections from the current target sections table.
949 Adjust to not use to_sections.
950 (exec_close): Remove all target sections. Call exec_close_1.
951 (exec_file_clear): Use exec_close_1 instead of unpushing the
953 (exec_file_attach): Likewise. Adjust to not use to_sections. Add
954 exec_bfd's sections to the current target sections table. Don't
955 push the exec_ops target here.
956 (resize_section_table): New.
957 (add_target_sections): New.
958 (remove_target_sections): Moved here.
959 (section_table_xfer_memory): Adjust to implement the xfer_partial
960 interface, and rename to...
961 (section_table_xfer_memory_partial): ... this, replacing the
962 current function of that same name.
963 (exec_get_section_table): New.
964 (exec_xfer_partial): New.
965 (xfer_memory): Delete.
966 (print_section_info): Replace the target_ops parameter by a
967 target_section_table parameter.
968 (exec_files_info, set_section_command, exec_set_section_address):
969 Adjust to use the current sections table.
970 (init_exec_ops): Do not register a deprecated_xfer_memory
971 callback. Register to_xfer_partial and to_get_section_table
973 * infrun.c (handle_inferior_event): Update comments around
975 * rs6000-nat.c (xcoff_relocate_core): Adjust to use
976 deprecated_core_resize_section_table.
977 * exec.h (resize_section_table): Declare.
978 (section_table_xfer_memory_partial): Add const char * argument.
979 (remove_target_sections): Declare here.
980 (add_target_sections): Declare.
981 (print_section_info): Declare here.
982 * gdbcore.h (deprecated_core_resize_section_table): Declare.
984 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
986 * value.h (struct internalvar): Remove.
987 (get_internalvar_integer): Add prototype.
988 (set_internalvar_integer): Add prototype.
989 (clear_internalvar): Add prototype.
991 * value.c (struct internalvar): Move here. Add type member. Remove
992 endian member. Add union_internalvar member instead of value member.
993 (init_if_undefined_command): Use intvar->type.
994 (create_internalvar): Do not initialize value/endian, but type.
995 (create_internalvar_type_lazy): Call create_internalvar.
996 (value_of_internalvar): Handle host-side internalvar contents.
997 (set_internalvar_component): Likewise.
998 (set_internalvar): Likewise.
999 (get_internalvar_integer): New function.
1000 (clear_internalvar): Likewise.
1001 (set_internalvar_integer): Likewise.
1002 (preserve_values): Handle host-side internalvar contents.
1004 * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
1005 set_internalvar_integer instead of set_internalvar.
1006 * findcmd.c (find_command): Likewise.
1007 * infrun.c (handle_inferior_event): Likewise.
1008 * source.c (forward_search_command, reverse_search_command): Likewise.
1009 * tracepoint.c (set_traceframe_num, set_tracepoint_num,
1010 set_traceframe_context): Likewise.
1012 * printcmd.c (x_command): Call clear_internalvar instead of
1014 * tracepoint.c (set_traceframe_context): Likewise.
1016 * breakpoint.c (get_number_trailer): Call get_internalvar_integer
1017 instead of value_of_internalvar.
1018 * linespec.c (decode_dollar): Likewise.
1020 * expprint.c (dump_subexp_body_standard): Use internalvar_name
1021 instead of accessing internalvar private elements.
1022 * valops.c (value_assign): Copy from original source instead of
1023 accessing internalvar private elements.
1025 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
1027 * scm-lang.c (builtin_type_scm): Remove.
1028 (scm_lookup_name): Add GDBARCH parameter. Use it instead of
1029 objfile architecture. Use per-architecture builtin_scm_type instead
1030 of builtin_type_scm.
1031 (evaluate_exp): Pass expression architecture to scm_lookup_name.
1033 (scm_get_field): Add SIZE parameter. Use it instead of
1034 TYPE_LENGTH (builtin_type_scm).
1036 (build_scm_types): New function.
1037 (scm_type_data): New variable.
1038 (builtin_scm_type): New function.
1039 (_initialize_scheme_language): Do not initialize builtin_type_scm.
1040 Register build_scm_types as post-init function for scm_type_data.
1042 * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
1043 instead of builtin_type_scm.
1045 * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
1046 (scm_get_field): Add SIZE paramter.
1047 (scm_scmval_print): Remove prototype.
1048 (builtin_type_scm): Remove.
1049 (struct builtin_scm_type): Add structure definition.
1050 (builtin_scm_type): Add prototype.
1052 * scm-valprint.c (scm_inferior_print): Add TYPE parameter. Use it
1053 instead of builtin_core_addr type; do not use objfile architecture.
1054 (scm_scmlist_print): Add TYPE parameter. Use it to define SCM_SIZE.
1055 Pass type to scm_scmval_print.
1056 (scm_ipruk): Add TYPE parameter. Use it to define SCM_SIZE.
1057 (scm_scmval_print): Make static. Add TYPE parameter. Use it to
1058 define SCM_SIZE. Pass type to scm_ipruk and scm_scmlist_print.
1059 (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
1061 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
1063 * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
1064 mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
1065 mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
1066 mdebug_type_unsigned_char, mdebug_type_unsigned_short,
1067 mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
1068 mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
1069 mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
1070 mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
1071 mdebug_type_complex, mdebug_type_double_complex,
1072 mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
1075 (basic_type_data): New global variable.
1076 (basic_type): New function.
1077 (parse_type): Remove static basic type map map_bt. Call basic_type
1078 to get basic types instead of using mdebug_type_ variables.
1080 (parse_symbol): Use builtin types instead of mdebug_type_ variables.
1081 (upgrade_type): Likewise.
1082 (parse_procedure): Likewise.
1083 (psymtab_to_symtab_1): Likewise.
1085 (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
1086 Initialize basic_type_data.
1088 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
1090 * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
1091 * dfp.c (promote_decimal): Remove.
1092 (decimal_binop): Convert LEN_RESULT to input parameter.
1093 Remove call to decimal_binop.
1094 (decimal_compare): Remove call to decimal_binop.
1096 * valarith.c (value_binop): Pass desired result type length
1099 2009-06-01 Tristan Gingold <gingold@adacore.com>
1101 * configure.tgt (avr): Set gdb_sim to use the simulator.
1103 2009-05-29 Doug Evans <dje@google.com>
1105 * infrun.c (prepare_to_proceed): Document. Assert !non_stop.
1106 If scheduler-locking is enabled, we're not going to be singlestepping
1107 any other previously stopped thread.
1109 2009-05-29 Pedro Alves <pedro@codesourcery.com>
1111 * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
1113 2009-05-29 Eli Zaretskii <eliz@gnu.org>
1115 * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
1116 for stabs and COFF debug info.
1118 2009-05-28 Pedro Alves <pedro@codesourcery.com>
1120 * infrun.c (handle_inferior_event): When thread hoping, switch
1121 inferior_ptid to the event thread before removing breakpoints from
1122 the target. If not stopping, also try to revert back to a thread
1123 that was doing a "next". Check if that thread still exists before
1125 (currently_stepping_thread): Delete and merge with ...
1126 (currently_stepping): ... this.
1127 (currently_stepping_callback): Rename to ...
1128 (currently_stepping_or_nexting_callback): ... this, and also
1129 return true if the thread was stepping over a call (has a
1130 step-resume breakpoint).
1132 2009-05-28 Tom Tromey <tromey@redhat.com>
1134 * python/python.c (gdbpy_parameter): Rename. Fix error message.
1135 (GdbMethods): Change "get_parameter" to "parameter".
1137 2009-05-28 Pierre Muller <muller@ics.u-strasbg.fr>
1138 Paul Pluzhnikov <ppluzhnikov@google.com>
1140 * configure.ac (!have_libpython): Add python-prettyprint source
1142 * configure: Regenerate.
1143 * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
1146 2009-05-27 Vladimir Prus <vladimir@codesourcery.com>
1147 Tom Tromey <tromey@redhat.com>
1148 Thiago Jung Bauermann <bauerman@br.ibm.com>
1150 * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
1151 * varobj.h (varobj_set_visualizer): Declare.
1152 (varobj_get_display_hint): Likewise.
1153 (varobj_update_result_t) <children_changed, value_installed>: New
1155 * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
1156 * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
1157 mi_cmd_var_set_child_range): Declare.
1158 * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
1159 (mi_cmd_var_list_children): Emit display hint.
1160 (varobj_update_one): Emit display hint. Handle dynamic children.
1161 * python/python.c (GdbMethods): Add "default_visualizer".
1162 * python/python-internal.h (apply_varobj_pretty_printer,
1163 gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
1165 (gdbpy_default_visualizer): Likewise.
1166 * varobj.c: Include python.h, python-internal.h.
1167 (PyObject): New typedef.
1168 (struct varobj) <children_requested, pretty_printer>: New fields.
1169 (varobj_create): Call install_default_visualizer.
1170 (instantiate_pretty_printer): New function.
1171 (varobj_set_display_format): Update.
1172 (varobj_get_display_hint): New function.
1173 (update_dynamic_varobj_children): New function.
1174 (varobj_get_num_children): Handle dynamic children.
1175 (varobj_list_children): Likewise.
1176 (install_new_value): Likewise.
1177 (varobj_add_child): New function.
1178 (install_visualizer): Likewise.
1179 (install_default_visualizer): Likewise.
1180 (varobj_set_visualizer): Likewise.
1181 (varobj_update): Handle dynamic children.
1182 (create_child): Use create_child_with_value.
1183 (create_child_with_value): New function.
1184 (value_get_print_value): Call pretty printer. Add value_formatter
1186 (c_value_of_variable): Update.
1187 (varobj_invalidate): Always free all_rootvarobj.
1188 * python/python-prettyprint.c (apply_varobj_pretty_printer): New
1190 (gdbpy_get_varobj_pretty_printer): Likewise.
1191 (gdbpy_default_visualizer): Likewise.
1193 2009-05-27 Tom Tromey <tromey@redhat.com>
1194 Thiago Jung Bauermann <bauerman@br.ibm.com>
1195 Phil Muldoon <pmuldoon@redhat.com>
1196 Paul Pluzhnikov <ppluzhnikov@google.com>
1197 Vladimir Prus <vladimir@codesourcery.com>
1199 * python/python-value.c (value_object_to_value): New function.
1200 * python/python-internal.h: Include frameobject.h.
1201 (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
1203 (value_object_to_value): Declare.
1204 * printcmd.c (struct format_data) <raw>: New field.
1205 (last_format): Default to 0.
1206 (decode_format): Initialize val.raw. Handle /r flag.
1207 (print_command_1): Initialize fmt.raw and opts.raw.
1208 (output_command): Likewise.
1209 (x_command): Fix initialization of fmt.format. Initialize
1211 (display_command): Initialize fmt.raw.
1212 (do_one_display): Set opts.raw.
1213 * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
1214 gdbpy_display_hint_cst): New globals.
1215 (_initialize_python): Initialize them. Set gdb.pretty_printers.
1216 * cp-valprint.c: Include python.h.
1217 (cp_print_value): Call apply_val_pretty_printer.
1218 * python/python.h (apply_val_pretty_printer): Declare.
1219 * stack.c (print_this_frame_argument_p): Remove.
1220 (print_frame_args): Compute summary flag. Don't use
1221 print_this_frame_argument_p.
1222 * valprint.c: Include python.h.
1223 (user_print_options): Initialize new fields.
1224 (scalar_type_p): New function.
1225 (val_print): Handle 'raw' and 'summary' modes. Call
1226 apply_val_pretty_printer.
1227 (value_print): Handle 'raw' mode.
1228 * valprint.h (struct value_print_options) <raw, summary>: New
1230 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
1231 (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
1232 (python-prettyprint.o): New target.
1233 * python/python-prettyprint.c: New file.
1235 2009-05-27 Tom Tromey <tromey@redhat.com>
1236 Paul Pluzhnikov <ppluzhnikov@google.com>
1238 * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
1240 * cli/cli-dump.c (dump_value_to_file): Use value_address.
1241 * valprint.c (common_val_print): Likewise.
1242 * v850-tdep.c (v850_push_dummy_call): Use value_address.
1243 * tracepoint.c (encode_actions): Use value_address.
1244 * printcmd.c (print_formatted): Use value_address.
1245 (x_command): Likewise.
1246 * p-valprint.c (pascal_object_print_static_field): Use
1248 * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
1249 * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
1250 * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
1251 * jv-valprint.c (java_value_print): Use value_address.
1252 * infcall.c (find_function_addr): Use value_address.
1253 * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
1254 * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
1255 * frv-tdep.c (frv_push_dummy_call): Use value_address.
1256 * frame.c (frame_register_unwind): Use value_address.
1257 (frame_unwind_register_value): Likewise.
1258 * darwin-nat-info.c (info_mach_region_command): Use
1260 * cp-valprint.c (cp_print_static_field): Use value_address.
1261 * c-valprint.c (c_value_print): Use value_address.
1262 * breakpoint.c (update_watchpoint): Use value_address.
1263 (can_use_hardware_watchpoint): Likewise.
1264 * ada-valprint.c (ada_val_print_1): Use value_address.
1265 (ada_value_print): Likewise.
1266 * ada-tasks.c (read_fat_string_value): Use value_address.
1267 * jv-lang.c (java_link_class_type): Use set_value_address.
1268 (java_link_class_type): Likewise.
1269 (get_java_utf8_name): Use value_address.
1270 (type_from_class): Likewise.
1271 (java_link_class_type): Likewise.
1272 * findvar.c (value_of_register): Use set_value_address.
1273 (read_var_value): Likewise.
1274 (read_var_value): Likewise.
1275 * eval.c (evaluate_subexp_standard): Use set_value_address.
1276 (evaluate_subexp_standard): Use value_address.
1277 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
1278 * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
1279 (ada_value_primitive_packed_val): Likewise.
1280 (ensure_lval): Likewise.
1281 (thin_data_pntr): Use value_address.
1282 (desc_bounds): Likewise.
1283 (ada_value_primitive_packed_val): Likewise.
1284 (value_assign_to_component): Likewise.
1285 (ensure_lval): Likewise.
1286 (make_array_descriptor): Likewise.
1287 (ada_to_fixed_value): Likewise.
1288 (unwrap_value): Likewise.
1289 * value.c (deprecated_value_address_hack): Remove.
1290 (value_address): New function.
1291 (value_raw_address): Likewise.
1292 (set_value_address): Likewise.
1293 (value_fn_field): Use set_value_address.
1294 (value_from_contents_and_address): Likewise.
1295 (value_fn_field): Likewise.
1296 (allocate_value_lazy): Don't use VALUE_ADDRESS.
1297 (value_as_address): Use value_address.
1298 (value_static_field): Likewise.
1299 * valops.c (search_struct_field): Use set_value_address.
1300 (value_at): Likewise.
1301 (value_at_lazy): Likewise.
1302 (value_repeat): Likewise.
1303 (value_cast_structs): Use value_address.
1304 (value_cast): Likewise.
1305 (value_fetch_lazy): Likewise.
1306 (value_assign): Likewise.
1307 (value_repeat): Likewise.
1308 (address_of_variable): Likewise.
1309 (value_coerce_array): Likewise.
1310 (value_coerce_function): Likewise.
1311 (value_addr): Likewise.
1312 (search_struct_field): Likewise.
1313 (search_struct_method): Likewise.
1314 (find_method_list): Likewise.
1315 (value_struct_elt_for_reference): Likewise.
1316 (value_full_object): Likewise.
1317 * jv-valprint.c (java_value_print): Use set_value_address.
1318 * value.h (deprecated_value_address_hack): Remove.
1319 (VALUE_ADDRESS): Remove.
1320 (value_address): Declare.
1321 (value_raw_address): Declare.
1322 (set_value_address): Declare.
1324 2009-05-27 Tom Tromey <tromey@redhat.com>
1325 Thiago Jung Bauermann <bauerman@br.ibm.com>
1326 Phil Muldoon <pmuldoon@redhat.com>
1327 Paul Pluzhnikov <ppluzhnikov@google.com>
1329 * python/python.c (_initialize_python): Call
1330 gdbpy_initialize_types.
1331 (GdbMethods): Add "lookup_type".
1332 * python/python-value.c (value_object) <type>: New field.
1333 (valpy_dealloc): Decref type.
1334 (valpy_new): Initialize type.
1335 (valpy_get_type): New function.
1336 (value_to_value_object): Initialize type.
1337 (valpy_cast): New function.
1338 (value_object_getset): Add "type".
1339 (value_object_methods): Add "cast".
1340 * python/python-internal.h (type_to_type_object): Declare.
1341 (type_object_to_type): Likewise.
1342 (gdbpy_initialize_types): Likewise.
1343 (gdbpy_lookup_type): Declare.
1344 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
1345 (SUBDIR_PYTHON_SRCS): Add python-type.c.
1346 (python-type.o): New target.
1347 * python/python-type.c: New file.
1349 2009-05-27 Tom Tromey <tromey@redhat.com>
1350 Thiago Jung Bauermann <bauerman@br.ibm.com>
1351 Phil Muldoon <pmuldoon@redhat.com>
1353 * python/python.c: Include objfiles.h, observer.h.
1354 (gdbpy_auto_load): New global.
1355 (gdbpy_current_objfile): Likewise.
1356 (GDBPY_AUTO_FILENAME): New define.
1357 (gdbpy_new_objfile): New function.
1358 (gdbpy_get_current_objfile): Likewise.
1359 (gdbpy_objfiles): Likewise.
1360 (_initialize_python): Add "maint set auto-load". Call
1361 gdbpy_initialize_objfile. Attach objfile observer.
1362 (GdbMethods): New methods current_objfile, objfiles.
1363 * python/python-objfile.c: New file.
1364 * python/python-internal.h (objfile_to_objfile_object): Declare.
1365 (objfpy_get_printers): Likewise.
1366 (gdbpy_initialize_objfile): Likewise.
1367 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
1368 (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
1369 (python-objfile.o): New target.
1371 2009-05-27 Pedro Alves <pedro@codesourcery.com>
1373 * infrun.c (follow_exec): Clear the stop_requested flag.
1374 * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
1377 2009-05-27 Aleksandar Ristovski <aristovski@qnx.com>
1379 * nto-procfs.c (get_regset): Pass correct pointer.
1381 2009-05-26 Doug Evans <dje@google.com>
1383 * dwarf2read.c (follow_die_ref): Add comment.
1384 (dwarf2_mark_helper): Tweak comment.
1385 (dwarf2_mark): Move description to its proper place.
1387 2009-05-25 Pierre Muller <muller@ics.u-strasbg.fr>
1389 * procfs.c (procfs_wait): Add options parameter.
1391 2009-05-24 Doug Evans <dje@google.com>
1393 Global renaming of find_thread_pid to find_thread_ptid.
1394 * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
1395 * thread.c (find_thread_ptid): Renamed from find_thread_pid.
1396 All callers updated.
1398 * infrun.c (follow_fork): Initialize new step_* locals
1399 to avoid "may be used uninitialized" warnings.
1401 2009-05-24 Pedro Alves <pedro@codesourcery.com>
1403 * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
1405 2009-05-24 Pedro Alves <pedro@codesourcery.com>
1407 * gdbthread.h (struct thread_info): New `pending_follow' field.
1408 * thread.c (new_thread): New function.
1409 (add_thread_silent): Use it.
1410 * breakpoint.c (internal_breakpoint_number): New global, moved
1412 (create_internal_breakpoint): ... this.
1413 (clone_momentary_breakpoint): New.
1414 * breakpoint.h (clone_momentary_breakpoint): Declare.
1415 * infrun.c (nullify_last_target_wait_ptid): Move declaration
1417 (pending_follow): Delete.
1418 (follow_fork): Handle pending follow fork event here. Moved the
1419 preserving of thread stepping state here.
1420 (resume): Don't handle pending follow fork events here. Only
1421 install the inferior's terminal modes if we're about to resume it.
1422 (proceed): Handle possible pending follow fork events here.
1423 (init_wait_for_inferior): No need to clear pending_follow anymore,
1425 (handle_inferior_event): Adjust to per-thread `pending_follow'.
1426 Call `follow_fork' to handle following the fork. If the
1427 follow-fork is cancelled, stop stepping.
1428 * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
1429 `pending_follow' events. Remove code that handled preserving the
1430 thread stepping state.
1431 * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
1432 * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
1434 2009-05-24 Pierre Muller <muller@ics.u-strasbg.fr>
1436 * symfile.c (add_shared_symbol_files_command): Remove
1437 prototype and function.
1438 (_initialize _symfile): Move "add-shared-symbol-files"
1439 command and "assf" alias.
1440 * windows-nat.c (_initialize_windows_nat): to here.
1441 Change "add-shared-symbol-files" to alias.
1443 * config/i386/cygwin.mh: Remove NAT_FILE.
1444 * config/i386/mingw.mh: Remove NAT_FILE.
1445 * config/i386/mingw64.mh: Remove NAT_FILE.
1446 * config/i386/nm-cygwin.h: Remove file.
1447 * config/i386/nm-cygwin64.h: Remove file.
1449 2009-05-24 Hui Zhu <teawater@gmail.com>
1451 * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
1452 I386_LINUX_RECORD_IOCTL_*,
1453 I386_LINUX_RECORD_FCNTL_*) Removed.
1454 (i386_linux_init_abi): Change size of record from macros to
1457 2009-05-24 Hui Zhu <teawater@gmail.com>
1459 * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
1460 * linux-record.c (record_linux_system_call): Ditto.
1461 * linux-record.h (linux_record_tdep): Ditto.
1463 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
1465 Replace the savestring calls by xstrdup calls where possible.
1466 * breakpoint.c (condition_command, set_raw_breakpoint)
1467 (create_catchpoint, update_breakpoint_locations): Replace the
1468 savestring calls by xstrdup calls where possible.
1469 * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
1470 (record_producer): Likewise.
1471 * coffread.c (coff_start_symtab, complete_symtab): Likewise.
1472 * corefile.c (set_gnutarget): Likewise.
1473 * dbxread.c (add_new_header_file): Likewise.
1474 * demangle.c (set_demangling_command, set_demangling_style): Likewise.
1475 * event-top.c (push_prompt, pop_prompt, command_line_handler)
1476 (set_async_prompt): Likewise.
1477 * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
1479 * language.c (set_language_command, _initialize_language): Likewise.
1480 * linespec.c (decode_line_2): Likewise.
1481 * rs6000-nat.c (add_vmap): Likewise.
1482 * top.c (set_prompt, init_history, init_main): Likewise.
1483 * tracepoint.c (stringify_collection_list): Likewise.
1484 * varobj.c (varobj_create): Remove variable expr_len. Replace the
1485 savestring calls by xstrdup calls where possible.
1486 (value_of_root, c_name_of_variable, c_describe_child): Replace the
1487 savestring calls by xstrdup calls where possible.
1488 * xcoffread.c (complete_symtab): Likewise.
1489 * cli/cli-script.c (build_command_line, define_command): Likewise.
1490 * cli/cli-setshow.c (do_setshow_command): Likewise.
1492 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
1494 Remove already unreachable code.
1495 * varobj.c (varobj_get_handle): Fix comment when error is called.
1496 All callers updated.
1498 2009-05-23 Eli Zaretskii <eliz@gnu.org>
1500 * README (`configure' options): Document GDB-specific options to
1503 * symtab.c (skip_prologue_using_lineinfo): New function.
1504 (find_function_start_sal): Use it to get to the first line of
1505 function's body that has an entry in the lineinfo table.
1507 * symmisc.c (dump_symtab): Switch the current language to
1508 the language of the symtab we are dumping only if the symtab's
1509 language is neither language_auto nor language_unknown.
1511 * coffread.c (coff_symtab_read): Set language_minimal as the
1512 language for the "_globals_" pseudo-file.
1513 (process_coff_symbol): Set the symbol's language to the language
1516 2009-05-22 Pedro Alves <pedro@codesourcery.com>
1518 * target.h (struct section_table): Rename to ...
1519 (struct target_section): ... this.
1520 * exec.c: Adjust all references.
1521 * exec.h: Adjust all references.
1522 * nto-tdep.c: Adjust all references.
1523 * nto-tdep.h: Adjust all references.
1524 * ppc-linux-tdep.c: Adjust all references.
1525 * rs6000-nat.c: Adjust all references.
1526 * s390-tdep.c: Adjust all references.
1527 * solib-darwin.c: Adjust all references.
1528 * solib-frv.c: Adjust all references.
1529 * solib-irix.c: Adjust all references.
1530 * solib-null.c: Adjust all references.
1531 * solib-osf.c: Adjust all references.
1532 * solib-pa64.c: Adjust all references.
1533 * solib-som.c: Adjust all references.
1534 * solib-sunos.c: Adjust all references.
1535 * solib-svr4.c: Adjust all references.
1536 * solib-target.c: Adjust all references.
1537 * solib.c: Adjust all references.
1538 * solist.h: Adjust all references.
1539 * symfile.c: Adjust all references.
1540 * symfile.h: Adjust all references.
1541 * target.c: Adjust all references.
1543 2009-05-22 Hui Zhu <teawater@gmail.com>
1545 Add sys_fcntl argument interfaces to linux_record_tdep.
1547 * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
1548 fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
1550 * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
1551 I386_LINUX_RECORD_FCNTL_F_GETLK64,
1552 I386_LINUX_RECORD_FCNTL_F_SETLK64,
1553 I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
1554 of I386 Linux sys_fcntl arguments.
1555 (i386_linux_init_abi): Set macros values to linux_record_tdep.
1556 * linux-record.c (record_linux_system_call): Change to use
1557 the interface in linux_record_tdep in sys_fcntl and
1560 * linux-record.c (record_linux_system_call): Fix the process
1561 record build error about type in CYGWIN.
1563 2009-05-22 Pedro Alves <pedro@codesourcery.com>
1565 * inflow.c (kill_command): Delete left over static declaration.
1567 2009-05-22 Pedro Alves <pedro@codesourcery.com>
1569 * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
1571 (struct section_closure): Delete.
1572 (add_to_section_table): Delete.
1573 (build_target_sections_from_bfd): Delete.
1574 (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
1575 (target_bfd_reopen): Use build_section_table.
1576 * exec.c (xfer_memory): Move most code except for overlay
1577 debugging support from here...
1578 (section_table_xfer_memory): ... to this new function.
1579 (section_table_xfer_memory_partial): New.
1580 * exec.h (section_table_xfer_memory_partial): Declare.
1581 * bfd-target.h (build_target_sections_from_bfd): Delete
1584 2009-05-22 Pedro Alves <pedro@codesourcery.com>
1586 * remote.c (compare_sections_command): Don't declare exec_bfd.
1587 * tracepoint.c: Include "gdbcore.h".
1588 (remote_set_transparent_ranges): Don't declare exec_bfd.
1590 2009-05-21 Pedro Alves <pedro@codesourcery.com>
1592 * aix-thread.c (init_aix_thread_ops): Whitespace.
1594 2009-05-21 Pedro Alves <pedro@codesourcery.com>
1596 * dec-thread.c (dec_thread_wait): Add options parameter. Use it
1597 to call the to_wait method in the target beneath.
1598 * remote-m32r-sdi.c (m32r_wait): Add options parameter.
1600 2009-05-21 Joel Brobecker <brobecker@adacore.com>
1602 * aix-thread.c (aix_thread_wait): Add options parameter. Use it
1603 to call the to_wait method in the target_beneath.
1605 2009-05-21 Pedro Alves <pedro@codesourcery.com>
1607 * linux-nat.c (linux_nat_terminal_inferior)
1608 (linux_nat_terminal_ours): Don't check sync_execution.
1609 * remote.c (remote_terminal_inferior, remote_terminal_ours):
1610 Don't check sync_execution. Update comments.
1611 * target.c (target_terminal_inferior): New.
1612 * target.h (target_terminal_inferior): Delete macro, and declare
1614 * event-top.c (async_disable_stdin): Make idempotent. Don't give
1615 the target the terminal here.
1616 * inflow.c (terminal_ours_1): Don't return early without setting
1619 2009-05-21 Pedro Alves <pedro@codesourcery.com>
1621 * target.h (TARGET_WNOHANG): New.
1622 * target.c (target_wait): Add `options' argument. Adjust.
1623 (struct target_ops) <to_wait>: Add `options' argument.
1624 (target_wait): Add `options' argument.
1625 * infrun.c (wait_for_inferior): Pass 0 as options to
1626 target_wait (blocking wait).
1627 (fetch_inferior_event): Pass TARGET_WNOHANG as options to
1629 * fork-child.c (startup_inferior): Pass 0 as options to
1630 target_wait (blocking wait).
1631 * linux-nat.c (linux_nat_create_inferior): Remove async masking.
1632 (linux_nat_wait_1): Add `target_options' argument. Use it instead
1633 of checking on target_can_async_p.
1634 (linux_nat_wait): Add `target_options' argument. Adjust.
1635 * remote.c (remote_wait_ns): Add `options' argument. Adjust to
1636 check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
1637 (remote_wait_as): Add `options' argument. Adjust to check on
1638 TARGET_WNOWAIT instead of checking on remote_is_async_p. If doing
1639 a blocking wait, keep waiting until an interesting event comes
1641 (remote_wait): Add `options' argument. Don't loop here if the
1642 target is in async mode, and a blocking wait has been requested.
1644 * top.c (deprecated_target_wait_hook): Add `options' argument.
1645 * linux-thread-db.c (thread_db_wait): Add `options' argument, and
1646 pass it down to the layer beneath.
1647 * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
1648 * record.c (record_beneath_to_wait): Add `options' argument.
1649 (record_wait): Add `options' argument, and pass it down to the
1651 * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
1652 * darwin-nat.c (darwin_wait): Likewise.
1653 * defs.h (deprecated_target_wait_hook): Likewise.
1654 * gnu-nat.c (gnu_wait): Add `options' argument.
1655 * go32-nat.c (go32_wait): Likewise.
1656 * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
1657 pass it down to the layer beneath.
1658 * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
1659 * monitor.c (monitor_wait): Likewise.
1660 * nto-procfs.c (procfs_wait): Likewise.
1661 * remote-mips.c (mips_wait): Add `options' argument.
1662 * remote-sim.c (gdbsim_wait): Likewise.
1663 * rs6000-nat.c (rs6000_wait): Add `options' argument.
1664 * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
1665 it down to the layer beneath.
1666 * spu-linux-nat.c (spu_child_wait): Add `options' argument.
1667 * windows-nat.c (windows_wait): Likewise.
1668 * tui/tui-hooks.c (tui_target_wait_hook): Likewise. Adjust.
1670 2009-05-21 Pedro Alves <pedro@codesourcery.com>
1672 * mi/mi-interp.c (mi_on_resume): Account for whole process
1675 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1677 * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
1679 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1681 * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
1683 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1685 Fix parsing DW_AT_const_value using DW_FORM_string.
1686 * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
1688 2009-05-20 Joel Brobecker <brobecker@adacore.com>
1690 * aix-thread.c (giter_count): Do not count the main thread.
1691 (giter_accum): Do not include the main thread.
1693 2009-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1695 Remove the PROT parameter from openp.
1696 * source.c (openp): Remove the parameter PROT. Assertion check MODE.
1697 defs.h (openp): Update the prototype.
1698 Update all the openp callers.
1700 2009-05-19 Pedro Alves <pedro@codesourcery.com>
1702 * inflow.c (kill_command): Moved to infcmd.c.
1703 (_initialize_inflow): Don't add the "kill" command or clear
1705 * infcmd.c (kill_command): Moved here from inflow.c.
1706 (_initialize_infcmd): Add the "kill" command here.
1708 2009-05-19 Pedro Alves <pedro@codesourcery.com>
1710 * fork-child.c: Don't include frame.h. Include terminal.h.
1711 (fork_inferior): Call new_tty_postfork after forking adn adding
1712 the child to the inferior list.
1713 * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
1715 * inflow.c (struct terminal_info): Remove const qualifier from
1716 `run_terminal' field.
1717 (inferior_thisrun_terminal): Tweak comment.
1718 (inflow_inferior_exit): Release the `run_terminal' field.
1719 (copy_terminal_info): New function.
1720 (new_tty_postfork): New function.
1721 * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
1722 (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
1723 * inf-ptrace.c: Include terminal.h.
1724 (inf_ptrace_follow_fork): Copy the parent's terminal info to the
1726 * linux-nat.c: Include terminal.h.
1727 (linux_child_follow_fork): Copy the parent's terminal info to the
1729 * inf-ttrace.c: Include terminal.h.
1730 (inf_ttrace_follow_fork): Copy the parent's terminal info to the
1733 2009-05-19 Pedro Alves <pedro@codesourcery.com>
1735 * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
1736 (update_global_location_list): Use gdbarch_has_global_breakpoints
1737 instead of gdbarch_has_global_solist and
1738 target_supports_multi_process.
1739 * dicos-tdep.c (dicos_init_abi): Set
1740 gdbarch_has_global_breakpoints.
1741 * gdbarch.sh (has_global_solist): Update comment.
1742 (has_global_breakpoints): New.
1743 * remote.c (remote_start_remote): Use
1744 gdbarch_has_global_breakpoints instead of
1745 gdbarch_has_global_solist.
1746 * target.c (target_detach): Use gdbarch_has_global_breakpoints
1747 instead of gdbarch_has_global_solist.
1748 * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
1749 of target_supports_multi_process.
1751 2009-05-18 Paul Pluzhnikov <ppluzhnikov@google.com>
1753 * objc-lang.c (find_methods): Plug a small memory leak.
1755 2009-05-18 Pedro Alves <pedro@codesourcery.com>
1757 * solib-svr4.c: Include observer.h.
1758 (debug_base, debug_loader_offset_p, debug_loader_offset)
1759 (debug_loader_name, main_lm_addr): Move these globals...
1760 (struct svr4_info): ... into this new structure.
1761 (svr4_info_p): New typedef.
1762 (svr4_info): New global.
1763 (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
1765 (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
1766 (solib_svr4_r_ldsomap): Add svr4_info argument. Adjust to
1768 (open_symbol_file_object): Adjust to per-inferior svr4.
1769 (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
1771 (enable_break): Add svr4_info argument. Adjust to per-inferior
1773 (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
1774 Adjust to per-inferior svr4.
1775 (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
1778 2009-05-18 Pedro Alves <pedro@codesourcery.com>
1780 * linux-nat.h (linux_proc_get_tgid): Declare.
1781 * linux-nat.c (linux_proc_get_tgid): New.
1782 * linux-thread-db.c (struct thread_db_info): New field
1783 `need_stale_parent_threads_check'.
1784 (add_thread_db_info): Set it.
1785 (find_new_threads_callback): Ignore stale fork parent threads.
1786 (thread_db_resume): New.
1787 (init_thread_db_ops): Install thread_db_resume.
1789 2009-05-18 Pedro Alves <pedro@codesourcery.com>
1791 * fork-child.c (fork_inferior): Only reset the thread list if this
1792 is the first inferior.
1793 (startup_inferior): If the target support multi-process, tell it
1794 to resume only the new process.
1795 * linux-nat.c (num_lwps): Delete global.
1796 (purge_lwp_list): New function.
1797 (num_lwps): New function.
1798 (add_lwp, delete_lwp): Adjust.
1800 (iterate_over_lwps): Add filter argument. Handle it.
1801 (linux_nat_attach): Remove FIXME note.
1802 (linux_nat_detach): Adjust to iterate over threads of the inferior
1803 we're detaching from. Adjust to num_lwps being a function. Don't
1804 assume the head of the lwp list is the main thread of the process
1805 we're detaching from. Don't destroy the LWP list.
1806 (resume_callback): Add debug output.
1807 (linux_nat_resume): Handle resuming a single inferior. Allow a
1808 wildcard resume in non-stop mode.
1809 (linux_handle_extended_wait): Don't assume inferior_ptid is the
1810 correct inferior of the parent LWP.
1811 (status_callback): Also check lp->waitstatus.
1812 (select_event_lwp): Add new filter parameter. Handle it.
1813 (linux_nat_filter_event): Adjust to num_lwps being a function.
1814 (linux_nat_wait_1): When adding the first lwp of the inferior, use
1815 an is_lwp check instead of checking for the number of lwps.
1816 (linux_nat_wait_1): Handle waiting for a specific tgid. Handle
1817 pending process exit statuses.
1818 (linux_nat_mourn_inferior): Don't destroy all the LWP info.
1819 Instead delete LWPs of the inferior that we're mourning. Don't
1820 unregister from the event loop here.
1821 (linux_nat_pid_to_str): Use `num_lwps'.
1822 (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
1824 (linux_nat_is_async_p): Check if async was masked out.
1825 (linux_multi_process): New global.
1826 (linux_nat_supports_multi_process): New.
1827 (linux_nat_stop_lwp): Remove LWP filtering. It is done by the
1829 (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
1831 (linux_nat_close): New.
1832 (linux_nat_add_target): Register linux_nat_close and
1833 linux_nat_supports_multi_process.
1834 * linux-nat.h (iterate_over_lwps): Add filter argument.
1835 * linux-thread-db.c (thread_db_handle): Delete.
1836 (proc_handle, thread_agent, td_init_p, td_ta_new_p)
1837 (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
1838 (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
1839 (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
1840 (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
1841 longer globals, moved to...
1842 (struct thread_db_info): ... this new structure.
1843 (thread_db_list): New.
1844 (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
1846 (have_threads_callback): Filter out threads of all inferiors but
1847 the one specified by the ARGS argument.
1848 (have_threads): Add ptid argument specifying the inferior we're
1849 interested in. Handle it.
1850 (struct thread_get_info_inout): New.
1851 (thread_get_info_callback, thread_from_lwp): Adjust to use it.
1852 (thread_db_attach_lwp): Check that inferior of the passed in
1853 thread is using thread-db. Adjust.
1854 (enable_thread_event): Remove thread_agent parameter. Instead,
1855 get it from the per-inferior thread-db info.
1856 (dladdr_to_soname): Move higher up.
1857 (enable_thread_event_reporting): Adjust to use per-inferior
1859 (try_thread_db_load_1): Replace `handle' parameter by a
1860 thread_db_info parameter. Adjust to use per-inferior thread-db
1862 (try_thread_db_load): Adjust to use per-inferior thread-db info.
1863 (thread_db_load, disable_thread_event_reporting): Ditto.
1864 (check_for_thread_db): Remove conditional reporting of which
1865 libthread_db is in use.
1866 (thread_db_new_objfile): Add comment about inferior_ptid.
1867 (attach_thread): Adjust to use per-inferior thread-db info.
1868 (thread_db_detach): Adjust to use per-inferior thread-db info.
1869 Remove thread event breakpoints of the current inferior. Only
1870 unpush the thread-db target if there are no more processes using
1872 (check_event): Adjust to use per-inferior thread-db info.
1873 (thread_db_wait): Adjust to use per-inferior thread-db info. Only
1874 unpush the thread-db target if there are no more processes using
1876 (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
1877 info. Mark breakpoints of the current inferior out before
1878 deleting them. Only unpush the thread-db target if there are no
1879 more processes using it.
1880 (find_new_threads_callback): Adjust to use per-inferior thread_db
1882 (thread_db_find_new_threads_1): Add new ptid argument. Adjust to
1883 use per-inferior thread-db info.
1884 (thread_db_find_new_threads): Adjust to use per-inferior thread-db
1886 (thread_db_get_thread_local_address): Adjust.
1887 (thread_db_get_ada_task_ptid): Adjust.
1888 * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
1889 if there no more processes left to debug.
1890 * thread.c (set_running, set_executing): Handle resuming all
1891 threads of a single inferior.
1892 * mi/mi-interp.c (mi_output_running_pid): New.
1893 (mi_inferior_count): New.
1894 (mi_on_resume): For backwards compatibility, if resuming all
1895 threads of an inferior, and there is only one inferior, output
1898 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
1900 * ada-lang.c (ada_find_any_type): Move check for primitive types ...
1901 (to_fixed_range_type): ... to here.
1903 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
1905 * ada-lang.c (desc_data_type): Remove, replace by ...
1906 (desc_data_target_type): ... this.
1907 (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
1908 (ada_is_array_descriptor_type): Likewise.
1909 (ada_type_of_array): Likewise.
1910 (ada_coerce_to_simple_array_type): Likewise.
1911 (ada_array_element_type): Likewise.
1913 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
1915 * ada-valprint.c (ada_val_print_1): Use val_print_string to print
1916 result of ada_vax_float_print_function inferior call.
1918 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
1920 * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
1921 avoid creating a dummy value.
1923 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
1925 * p-valprint.c (pascal_val_print): Use extract_typed_address
1926 to extract reference value.
1928 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
1930 * doublest.c (NAN): Remove unused define.
1931 (extract_floating_by_length, deprecated_extract_floating): Remove.
1932 (store_floating_by_length, deprecated_store_floating): Remove.
1933 (extract_typed_floating): Do not call extract_floating_by_length.
1934 (store_typed_floating): Do not call store_floating_by_length.
1935 (convert_typed_floating): Remove redundant assertions.
1936 * doublest.h (deprecated_extract_floating): Remove.
1937 (deprecated_store_floating): Remove.
1938 * sh64-tdep.c (sh64_register_convert_to_raw): Call
1939 extract_typed_floating instead of deprecated_extract_floating.
1941 2009-05-18 Jon Beniston <jon@beniston.com>
1943 * MAINTAINERS: Add lm32 target.
1944 * Makefile.in: Add lm32 dependencies.
1945 * NEWS: Indicate lm32 is a new target.
1946 * configure.tgt: Add lm32 targets.
1947 * lm32-tdep.c: New file.
1949 2009-05-18 Pedro Alves <pedro@codesourcery.com>
1951 * corelow.c (core_open): Flush the register cache before doing
1952 anything with registers.
1954 2009-05-18 Pedro Alves <pedro@codesourcery.com>
1956 * inflow.h (our_process_group): Remove declaration.
1957 (inferior_process_group): Delete global variable declaration.
1958 (inferior_process_group): New function declaration.
1959 * inflow.c: Include observer.h.
1960 (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
1962 (struct terminal_info): New struct.
1963 (our_terminal_info): New global.
1964 (inferior_process_group): New function.
1965 (inferior_thisrun_terminal): Extend description comment.
1966 (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
1968 (terminal_init_inferior_with_pgrp): Adjust to per-inferior
1970 (terminal_inferior): Ditto.
1971 (terminal_ours_1): Ditto.
1972 (inflow_new_inferior, inflow_inferior_exit): New functions.
1973 (child_terminal_info): Adjust to per-inferior terminal settings.
1974 (osig_set): New global.
1975 (set_sigint_trap): Adjust to per-inferior terminal settings. Set
1976 or clear `osig_set' accordingly.
1977 (clear_sigint_trap): Check `osig_set' to decide wheater to restore
1978 SIGINT handler, instead of checking the current inferior (which
1980 (_initialize_inflow): Attach inflow_new_inferior and
1981 inflow_inferior_exit to the "new_inferior" and "inferior_exit"
1982 notifications, respectively.
1983 * inferior.h (struct terminal_info): Forward declare.
1984 (struct inferior): Add `terminal_info' field.
1985 * inferior.c (delete_inferior_1): Notify the inferior_exit
1986 observers before removing the inferior from the lists and deleting
1988 * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
1989 a function instead of a variable. Adjust.
1990 * procfs.c (procfs_stop): Ditto.
1992 2009-05-17 Pedro Alves <pedro@codesourcery.com>
1994 * infrun.c (handle_inferior_event): When handling a
1995 TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
1997 * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
1998 from the child if vforking.
1999 * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
2000 breakpoints from the child here.
2002 2009-05-17 Pedro Alves <pedro@codesourcery.com>
2004 * infrun.c (pending_follow): Remove execd_pathname member.
2005 (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
2006 (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
2007 event, don't copy `execd_pathname' to pending_follow, use the
2008 event copy instead. Release `execd_pathname' once done with
2011 * infrun.c (pending_follow): Remove mention of exec events.
2013 2009-05-17 Hui Zhu <teawater@gmail.com>
2015 * i386-tdep.c (i386_process_record): Make it extern.
2016 (i386_gdbarch_init): Don't call set_gdbarch_process_record
2018 * i386-tdep.h (i386_process_record): Declare.
2019 * i386-linux-tdep.c (i386_linux_init_abi): Call
2020 set_gdbarch_process_record.
2022 2009-05-17 Vladimir Prus <vladimir@codesourcery.com>
2024 Always report varobj as changed when in_scope attribute changes.
2026 * varobj.c (install_new_value): If non-NULL-ness of value
2029 2009-05-15 Paul Pluzhnikov <ppluzhnikov@google.com>
2031 * NEWS: Mention set/show libthread-db-search-path.
2032 * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
2033 (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
2034 * linux-thread-db.c (libthread_db_search_path): New setting.
2035 (thread_db_handle): New variable (replaces using_thread_db).
2036 (try_thread_db_load_1): New function.
2037 (try_thread_db_load, thread_db_load_search): Likewise.
2038 (dladdr_to_soname): Likewise.
2039 (thread_db_load): Iterate over possibly multiple libthread_db's.
2040 (check_for_thread_db): Attempt to load new libthread_db.
2041 (thread_db_detach, thread_db_wait): Unload libthread_db.
2042 (thread_db_mourn_inferior): Likewise.
2043 (_initialize_thread_db): Add new libthread-db-search-path option.
2044 Defer loading of libthread_db to check_for_thread_db.
2045 * solib.c (libpthread_name_p): New function.
2046 (libpthread_solib_p): Call it.
2047 * solib.h (libpthread_name_p): New prototype.
2049 2009-05-15 Pierre Muller <muller@ics.u-strasbg.fr>
2051 * MAINTAINERS: Update my email address.
2053 2009-05-14 Paul Pluzhnikov <ppluzhnikov@google.com>
2055 * breakpoint.h: Add breakpoint_re_set_objfile prototype.
2056 * breakpoint.c (create_overlay_event_breakpoint): Renamed
2057 from create_overlay_event_breakpoint_1, old
2058 create_overlay_event_breakpoint deleted.
2059 (breakpoint_re_set_objfile): Don't rescan all objfiles
2061 (breakpoint_re_set): New function.
2062 * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
2063 instead of breakpoint_re_set.
2064 * objfiles.c (objfile_relocate): Likewise.
2066 2009-05-14 Joel Brobecker <brobecker@adacore.com>
2068 * gdbarch.sh: Add comment documenting the target_gdbarch global.
2069 gdbarch.h does NOT need to be regenerated as the corresponding
2070 change has already been made in a previous commit.
2072 2009-05-14 Pierre Muller <muller@ics.u-strasbg.fr>
2074 Remove all i386 debug register low level macros in config nm files.
2075 (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
2076 (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
2077 (I386_USE_GENERIC_WATCHPOIINTS): Remove.
2079 * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
2080 (struct i386_dr_low_type): New type.
2081 (i386_dr_low): New global variable.
2082 * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
2083 (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
2084 i386_dr_low struct variable fields.
2085 (i386_remove_aligned_watchpoint): Likewise.
2086 (i386_stopped_data_address): Likewise.
2087 (i386_stopped_by_hwbp): Likewise.
2088 (show_debug_regs_command_added): New static variable.
2089 (add_show_debug_regs_command): New static function.
2090 (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
2091 (i386_set_debug_register_length): New function.
2092 (_initialize_i386_nat): Delete.
2094 * amd64-linux-nat.c: Include "i386-nat.h".
2095 (amd64_linux_dr_set_control): Change to static.
2096 (amd64_linux_dr_get_status): Change to static.
2097 (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
2098 (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
2100 * go32-nat.c: Include "i386-nat.h".
2101 (go32_set_addr): Change to static.
2102 (go32_set_dr7): Change to static. Change arg type to unisgned long.
2103 (go32_get_dr6): Change to static. Change return type to unisnged long.
2104 (init_go32_ops): Set i386_dr_low variable fields.
2105 * i386-linux-nat.c: Include "i386-nat.h".
2106 (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
2107 (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
2108 (_initialize_i386_linux_nat): Set i386_dr_low variable fields.
2109 * i386bsd-nat.h: Declare functions used for
2110 i386_dr_low fields in i386fbsd-nat.c.
2111 * i386fbsd-nat.c: Include "i386-nat.h".
2112 (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
2113 * windows-nat.c: Include "i386-nat.h".
2114 (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
2116 (cygwin_get_dr6): Change return type to unisnged long.
2117 (cygwin_set_dr7): Change arg type to unisgned long.
2118 (init_windows_ops): Set i386_dr_low function fields.
2120 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call
2121 i386_set_debug_register_length.
2122 * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
2124 * config/i386/nm-cygwin.h: Remove all I386_* macros.
2125 * config/i386/nm-cygwin64.h: Likewise.
2126 * config/i386/nm-fbsd.h: Likewise.
2127 * config/i386/nm-linux.h: Likewise.
2128 * config/i386/nm-i386.h: Remove completely.
2129 * config/i386/nm-go32.h: Remove completely.
2130 * config/i386/nm-linux64.h: Remove completely.
2131 * config/i386/go32.mh (NAT_FILE): Remove entry.
2132 * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
2134 2009-05-14 Jon Beniston <jon@beniston.com>
2136 * MAINTAINERS: Add Jon Beniston to write after approval list.
2138 2009-05-13 Paul Pluzhnikov <ppluzhnikov@google.com>
2140 * objc-lang.c (objc_objfile_data): New variable.
2141 (find_methods): Skip objfiles without Obj-C methods.
2142 (_initialize_objc_lang): New function.
2144 2009-05-13 Joel Brobecker <brobecker@adacore.com>
2146 * c-lang.c (print_wchar): Remove unnecessary cast.
2148 2009-05-12 Jim Blandy <jimb@red-bean.com>
2150 * MAINTAINERS: Remove self as m32c target maintainer.
2152 2009-05-12 Pedro Alves <pedro@codesourcery.com>
2154 * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
2155 * command.h (deprecated_add_set_cmd): Delete declaration.
2156 * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
2157 'set debug gnu-nat' and 'show debug gnu-nat'.
2158 * i386-nat.c (_initialize_i386_nat): Replace 'maint
2159 show-debug-registers' with 'maint set show-debug-registers' and
2160 'maint show show-debug-registers'.
2161 * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
2162 show-debug-registers' with 'maint set show-debug-registers' and
2163 'maint show show-debug-registers'.
2165 2009-05-12 Joel Brobecker <brobecker@adacore.com>
2167 * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
2168 pushing it on the output obstack.
2170 2009-05-11 Joel Brobecker <brobecker@adacore.com>
2172 Fix internal error on breaking at a multi-locations caller source line.
2173 * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
2174 command with no parameters.
2176 2009-05-11 Pedro Alves <pedro@codesourcery.com>
2178 * linux-nat.c (enum sigchld_state): Delete.
2179 (linux_nat_async_events_state): Delete.
2180 (struct waitpid_result): Delete.
2181 (waitpid_queue): Delete.
2182 (queued_waitpid_1): Delete.
2183 (async_file_flush): New.
2184 (queued_waitpid, push_waitpid): Delete.
2185 (async_file_mark): New.
2186 (drain_queued_events): Delete.
2187 (my_waitpid): Remove locally queued events handling.
2188 (linux_test_for_tracefork): Upjust.
2189 (linux_child_follow_fork): Ditto.
2190 (sync_sigchld_action): Delete.
2191 (blocked_mask): Reinstate.
2192 (async_sigchld_action): Rename to...
2193 (sigchld_action): ... this.
2194 (block_child_signals): New.
2195 (restore_child_signals_mask): New.
2196 (lin_lwp_attach_lwp): Adjust.
2197 (linux_nat_create_inferior): Ditto.
2198 (linux_nat_attach): Also use lp->status in async mode.
2199 (get_pending_status): Don't use queued_waitpid.
2200 (linux_nat_detach): Don't drain locally queued events.
2201 (linux_nat_resume): Allow pending wait statuses stored lp->status
2202 in async mode. If returning early due to a pending event,
2203 re-register the event source.
2204 (stop_wait_callback): Allow pending wait statuses stored
2205 lp->status in async mode.
2206 (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
2207 (linux_nat_wait): Rename to ...
2208 (linux_nat_wait_1): ... this. Allow pending wait statuses stored
2209 lp->status in async mode. Always add WNOHANG to the waitpid
2210 options in async mode.
2211 (linux_nat_wait): New.
2212 (kill_callback): Don't drain locally queued events.
2213 (sigchld_handler): Rewrite.
2214 (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
2215 refer to "set target-async".
2216 (linux_nat_async_mask): If in non-stop, and re-enabling async
2217 mode, re-register the target event source in the event loop.
2218 (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
2219 (get_pending_events, async_sigchld_handler)
2220 (linux_nat_async_events): Delete.
2221 (handle_target_event): New.
2222 (linux_nat_async_file_handler): Delete.
2223 (linux_async_pipe): New.
2224 (linux_nat_async): Only re-register in the event loop if not
2225 registered yet. Always notify the event-loop once if enabling the
2227 (linux_nat_stop_lwp): Rewrite to handle pending events stored in
2228 lp->status, not in the locally queued event list.
2229 (linux_nat_stop): Don't mask out async event handling.
2230 (linux_nat_setup_async): Delete.
2231 (_initialize_linux_nat): Adjust.
2232 (lin_thread_get_thread_signals): blocked_mask is global again.
2235 2009-05-11 Pierre Muller <muller@ics.u-strasbg.fr>
2237 Unify target macros.
2239 * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
2240 (target_stoppped_by_watchpoint): New macro.
2241 (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
2242 (target_have_steppable_watchpoint): New macro.
2243 (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
2244 (target_have_continuable_watchpoint): New macro.
2245 (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
2246 (target_can_use_hardware_watchpoint): New macro.
2247 (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
2248 (target_region_ok_for_hw_watchpoint): New macro.
2250 * breakpoint.c (update_watchpoint): Use new macros.
2251 (bpstat_alloc): Likewise.
2252 (create_breakpoint): Likewise.
2253 (watch_command_1): Likewise.
2254 (can_use_hardware_watchpoint): Likewise.
2255 (do_enable_breakpoint): Likewise.
2256 * infrun.c (handle_inferior_event): Adapt to new macros.
2257 * mips-tdep.c (mips_gdbarch_init): Update comments.
2258 * procfs.c (procfs_set_watchpoint): Update comment.
2259 (procfs_insert_watchpoint): Adapt to new macros.
2260 * remote-m32r-sdi.c (m32r_stop):
2261 * remote-mips.c (mips_remove_breakpoint):
2262 * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
2263 (debug_to_stopped_by_watchpoint): Likewise.
2266 2009-05-10 Pierre Muller <muller@ics.u-strasbg.fr>
2268 * src/gdb/target.h: Remove all tests for already defined
2269 macros. All macros defined here should not be set in config
2272 2009-05-08 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
2274 * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
2275 (have_ptrace_getsetfpregs): Likewise.
2276 fetch_all_gp_regs): New function.
2277 (fetch_gp_regs): New function.
2278 (fetch_all_fp_regs): Likewise.
2279 (fetch_fp_regs): New function.
2280 (fetch_ppc_registers): Using the new methods to fetch general-
2281 purpose and floating-pointer registers.
2282 (store_all_gp_regs): New function.
2283 (store_gp_regs): Likewise.
2284 (store_all_fp_regs): New function.
2285 (store_fp_regs): Likewise.
2286 (store_ppc_registers): Using the new methods to store general-
2287 purpose and floating-pointer registers.
2289 2009-05-08 Doug Evans <dje@google.com>
2291 * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
2293 2009-05-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
2295 * MAINTAINERS (Write After Approval): Add self.
2297 2009-05-07 Joel Brobecker <brobecker@adacore.com>
2299 * gdbarch.h (target_gdbarch): Add comment documenting this global.
2301 2009-05-06 Joel Brobecker <brobecker@adacore.com>
2303 * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
2305 * configure: Regenerate.
2307 2009-05-06 Joel Brobecker <brobecker@adacore.com>
2309 * utils.c: Add include of gdb_usleep.h.
2310 (defaulted_query): Detect false EOF conditions that happen
2311 on terminals opened with the O_NONBLOCK flag when there is
2314 2009-05-06 Pedro Alves <pedro@codesourcery.com>
2316 * inferior.c (add_inferior): Move observer_notify_new_inferior
2318 (add_inferior_silent): ... here.
2320 2009-05-06 Pierre Muller <muller@ics.u-strasbg.fr>
2321 Pedro Alves <pedro@codesourcery.com>
2323 * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
2324 (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
2326 (procfs_stopped_by_watchpoint): Made static, ptid argument
2328 (_initialize_procfs): Register new watchpoint related target
2330 * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
2331 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
2332 (HAVE_CONTINUABLE_WATCHPOINT): Delete.
2333 (target_insert_watchpoint, target_remove_watchpoint): Delete.
2334 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
2336 * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
2337 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
2338 (target_insert_watchpoint, target_remove_watchpoint): Delete.
2339 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
2341 * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
2342 (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
2343 (target_insert_watchpoint, target_remove_watchpoint): Delete.
2344 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
2347 2009-05-06 Hui Zhu <teawater@gmail.com>
2349 * i386-tdep.c (i386_process_record): Change bzero to memset.
2351 2009-05-06 Hui Zhu <teawater@gmail.com>
2353 * NEWS: Add item for process record and replay.
2355 2009-05-05 Maxim Grigoriev <maxim2405@gmail.com>
2357 * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
2359 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
2361 * inferior.h (read_pc, write_pc): Remove.
2362 * regcache.c (read_pc, write_pc): Remove.
2364 * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
2366 (handle_inferior_event): Use regcache_read_pc instead of read_pc
2367 when determining value of stop_pc. Replace subsequent uses of
2368 read_pc by inspecting already-retrieved stop_pc value.
2369 (keep_going): Use regcache_read_pc instead of read_pc.
2371 * breakpoint.c (watchpoint_check): Use current frame architecture
2372 and PC instead of current_gdbarch and read_pc ().
2373 * tracepoint.c (set_traceframe_context): Replace PC argument
2374 with FRAME argument.
2375 (trace_start_command, finish_tfind_command): Update calls.
2376 (finish_tfind_command): Compare frame IDs to identify transitions
2378 (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
2379 * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
2380 of gdbarch. Use regcache_read_pc and regcache_write_pc instead
2381 of read_pc and write_pc.
2382 (store_register): Make regcache argument non-const. Update call
2383 to exec_one_dummy_insn.
2385 * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
2386 * infcmd.c (post_create_inferior): Likewise.
2387 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
2388 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
2389 * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
2390 * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
2391 * linux-fork.c (fork_load_infrun_state): Likewise.
2392 * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
2393 * record.c (record_wait): Likewise.
2394 * procfs.c (procfs_wait): Likewise.
2395 * remote-mips.c (common_open, mips_wait): Likewise.
2396 * remote-m32r-sdi.c (m32r_resume): Likewise.
2398 * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
2399 * monitor.c (monitor_create_inferior, monitor_load): Likewise.
2400 * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
2401 * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
2402 * remote-mips.c (mips_create_inferior, mips_load): Likewise.
2404 * solib-darwin.c: Include "regcache.h".
2405 * solib-pa64.c: Include "regcache.h".
2406 * solib-svr4.c: Include "regcache.h.".
2408 * symfile.c: Do not mention read_pc or write_pc in comments.
2409 * dink32-rom.c: Likewise.
2410 * m32r-rom.c: Likewise.
2411 * mips-tdep.c: Likewise.
2413 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
2415 * fork-child.c (startup_inferior): Move setting stop_pc ...
2416 * infcmd.c (post_create_inferior): ... to here.
2418 2009-05-04 Michael Snyder <msnyder@vmware.com>
2420 * NEWS: Add item for reverse debugging commands.
2422 2009-05-04 Pedro Alves <pedro@codesourcery.com>
2424 * go32-nat.c (go32_stop): Delete.
2425 (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
2426 (go32_create_inferior): Don't call go32_stop or
2428 (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
2430 (init_go32_ops): Don't register go32_stop.
2432 2009-05-02 Eli Zaretskii <eliz@gnu.org>
2434 * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
2437 * infcall.c (find_function_addr): Avoid compiler warnings for
2440 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2442 * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
2443 (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
2445 2009-05-01 Doug Evans <dje@google.com>
2447 * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
2450 2009-05-01 Eli Zaretskii <eliz@gnu.org>
2452 * record.c (_initialize_record): Reformat and clarify doc strings
2453 for stop-at-limit and insn-number-max.
2455 * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
2457 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2459 Make specifiable the make_function_type type memory ownership.
2460 * gdbtypes.c (make_function_type): New parameter `objfile', use it
2461 explicitely instead of TYPE-initialized removed local variable
2462 `objfile'. Describe `objfile' it in the function comment.
2463 (lookup_function_type): Update make_function_type callers.
2464 * gdbtypes.h (make_function_type): Update the prototype.
2465 * jv-lang.c (java_link_class_type): Update make_function_type callers.
2466 * dwarf2read.c (read_subroutine_type): Likewise.
2467 * stabsread.c (read_type): Likewise.
2469 2009-05-01 Eli Zaretskii <eliz@gnu.org>
2471 * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
2472 printing a bogus "Thread <main>".
2473 (go32_thread_alive): Don't return 1 for null_ptid.
2475 * i386-tdep.c (i386_go32_init_abi): Override the number of
2476 registers due to non-support of SSE.
2478 2009-04-30 Anthony Green <green@moxielogic.com>
2480 * configure.tgt: Link the moxie simulator in with gdb.
2482 2009-04-30 Paul Pluzhnikov <ppluzhnikov@google.com>
2484 * elfread.c (elf_symtab_read): Don't assume .data and .rodata
2487 2009-04-30 Hui Zhu <teawater@gmail.com>
2488 Michael Snyder <msnyder@vmware.com>
2490 I386 Linux process record and replay support.
2492 * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
2493 This struct has the argument for the function
2494 "record_linux_system_call".
2495 (i386_linux_intx80_sysenter_record): New function. Parse the
2496 system call instruction and call function
2497 "record_linux_system_call" to record execute log.
2498 (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
2499 Set "i386_linux_intx80_sysenter_record" to
2500 "i386_intx80_record" and "i386_sysenter_record".
2502 2009-04-30 Hui Zhu <teawater@gmail.com>
2503 Michael Snyder <msnyder@vmware.com>
2505 I386 architecture process record and replay support.
2507 * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
2508 PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
2510 (aflag, dflag, override, modrm, mod, reg, rm, ot,
2511 i386_record_pc): New variables. Ditto.
2512 (i386_record_modrm, i386_record_lea_modrm_addr,
2513 i386_record_lea_modrm): New functions. Ditto.
2514 (i386_process_record): New function. Parse the instruction in
2515 address "addr" and record the values of registers and memory
2516 that will be changed by this instruction.
2517 (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
2518 "process_record" interface.
2519 * i386-tdep.h (gdbarch_tdep): New function pointers
2520 "i386_intx80_record" and "i386_sysenter_record" that point to
2521 the function that can record "intx80" and "sysenter" execute
2524 2009-04-30 Hui Zhu <teawater@gmail.com>
2525 Michael Snyder <msnyder@vmware.com>
2527 * infrun.c (use_displaced_stepping): Return false if process
2528 record and replay target is used.
2529 (proceed): Call function "record_not_record_set" if pocess
2530 record and replay target is used.
2532 2009-04-30 Hui Zhu <teawater@gmail.com>
2533 Michael Snyder <msnyder@vmware.com>
2535 Linux process record and replay support.
2537 * Makefile.in (ALLDEPFILES): Add linux-record.c.
2538 (ALL_TARGET_OBS): Add linux-record.o.
2539 * configure.tgt (x86_64-*-linux*): Add linux-record.o.
2540 (i[34567]86-*-linux*): Add linux-record.o.
2541 * linux-record.c, linux-record.h: New file.
2543 2009-04-30 Hui Zhu <teawater@gmail.com>
2544 Michael Snyder <msnyder@vmware.com>
2546 Process record and replay target.
2548 * Makefile.in (SFILES): Add record.c.
2549 (COMMON_OBS): Add record.o.
2550 * record.c, record.h: New file.
2552 2009-04-30 Hui Zhu <teawater@gmail.com>
2553 Michael Snyder <msnyder@vmware.com>
2555 * target.h (strata): New stratum "record_stratum".
2557 2009-04-30 Hui Zhu <teawater@gmail.com>
2558 Michael Snyder <msnyder@vmware.com>
2560 GDBARCH interface for process record and replay.
2562 * gdbarch.sh (process_record): This interface point to the
2563 function that records the inferior execute log.
2565 2009-04-29 Doug Evans <dje@google.com>
2567 * i386-nat.c (child_post_startup_inferior): Delete, unused.
2569 2009-04-29 Pedro Alves <pedro@codesourcery.com>
2571 * breakpoint.c (print_exception_catchpoint): Access `b' directly
2572 instead of `b->loc->owner'.
2573 (print_mention_exception_catchpoint): Ditto.
2575 2009-04-29 Jan Kratochvil <jan.kratochvil@redhat.com>
2577 * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
2579 2009-04-27 Tom Tromey <tromey@redhat.com>
2581 * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
2583 2009-04-27 Jerome Guitton <guitton@adacore.com>
2585 * symtab.c (append_exact_match_to_sals): New function, extracted
2586 from expand_line_sal.
2587 (expand_line_sal): Use append_exact_match_to_sals to append exact
2588 matches. If none found, append all best items.
2590 2009-04-27 Jerome Guitton <guitton@adacore.com>
2592 * main.c (captured_main): Move gdbinit lookups after gdb_init.
2594 2009-04-27 Jan Kratochvil <jan.kratochvil@redhat.com>
2597 * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
2598 (read_func_scope): Call inherit_abstract_dies.
2600 2009-04-25 Eli Zaretskii <eliz@gnu.org>
2602 * Makefile.in (ALLDEPFILES): Remove duplicate entries for
2603 sparc-sol2-nat.c and sparc-sol2-tdep.c.
2605 * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
2607 2009-04-24 Pierre Muller <muller@ics.u-strasbg.fr>
2609 ARI change: Use "/* ARI: rule */" pattern.
2610 * utils.c: Update ARI patterns.
2611 * gdb_dirent.h: Likewise.
2613 2009-04-23 Anthony Green <green@moxielogic.com>
2615 * MAINTAINERS: Add moxie target.
2616 * configure.tgt: Add moxie-*-elf target.
2617 * moxie-tdep.c: New file.
2618 * moxie-tdep.h: New file.
2620 2009-04-23 Joel Brobecker <brobecker@adacore.com>
2622 * ada-lang.c: Remove an extra empty line. No code change.
2624 2009-04-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2626 Fix double free on error inserting the breakpoint instruction.
2627 * breakpoint.c (create_breakpoints): Move the
2628 update_global_location_list call to ...
2629 (break_command_really): ... here together with the second local call
2630 both unified after all the cleanups.
2632 2009-04-23 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
2633 Tom Tromey <tromey@redhat.com>
2635 * configure, config.in: Regenerate.
2636 * configure.ac: Support for relocatable GDB datadir. Use
2637 GDB_AC_WITH_DIR. Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
2638 * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
2639 * top.c (init_main): Add "set data-directory".
2640 * defs.h (gdb_datadir): Declare.
2641 * main.c (gdb_datadir): New global.
2642 (captured_main): Initialize gdb_datadir. Use relocate_directory.
2643 (relocate_path): New function.
2644 (relocate_directory): Likewise.
2645 (get_init_files): Use relocate_path.
2646 (README): Mention --with-gdb-datadir.
2648 2009-04-23 Joel Brobecker <brobecker@adacore.com>
2650 * ada-tasks (task_command_1): Call target_find_new_threads.
2652 2009-04-23 Joel Brobecker <brobecker@adacore.com>
2654 * stack.c (do_gdb_disassembly): Print the exception message if an
2655 error was thrown while trying to perform the disassembly.
2657 2009-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
2659 * varobj.c (free_variable): Replace free_current_contents by xfree.
2661 2009-04-22 Kazu Hirata <kazu@codesourcery.com>
2663 * arm-linux-nat.c (fetch_register, store_register): Use
2664 ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
2665 * arm-linux-tdep.c (arm_linux_supply_gregset,
2666 arm_linux_collect_gregset): Likewise.
2667 * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
2668 * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
2670 2009-04-22 Hui Zhu <teawater@gmail.com>
2672 * stack.c (_initialize_stack): Set the default of
2673 disassemble-next-line to off.
2675 2009-04-21 Tom Tromey <tromey@redhat.com>
2677 * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
2678 * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
2680 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
2682 * configure.ac: Add quotes to not lose brackets in help text.
2683 * configure: Rebuild.
2685 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
2687 * configure.ac: Don't postprocess Makefile in config.status.
2688 Substitute GDB_NM_FILE. Don't substitute nm_h.
2689 * Makefile.in (GDB_NM_FILE): Substitute.
2690 (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
2691 * configure: Regenerate.
2692 * gnulib/Makefile.in: Regenerate.
2694 2009-04-21 Joseph Myers <joseph@codesourcery.com>
2696 * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
2697 --with-htmldir): New.
2698 * configure: Regenerate.
2700 2009-04-21 Tom Tromey <tromey@redhat.com>
2702 * configure: Rebuild.
2703 * configure.ac: Use lower case for start of help strings. Clean
2704 up --with-sysroot help.
2706 2009-04-21 Tom Tromey <tromey@redhat.com>
2708 * configure: Rebuild.
2709 * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
2710 * configure.ac: Use AC_HELP_STRING. Use upper case for variables
2713 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
2715 ARI fix: remove "%p".
2716 * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
2717 (ia64_sigtramp_frame_this_id): Ditto.
2718 (ia64_libunwind_frame_this_id): Ditto.
2719 (ia64_libunwind_sigtramp_frame_this_id): Ditto.
2720 * symmisc.c (maintenance_info_psymtabs): Ditto.
2722 2009-04-21 Joseph Myers <joseph@codesourcery.com>
2724 * configure.ac (--with-relocated-sources): New.
2725 * configure, config.in: Regenerate.
2726 * source.c (add_substitute_path_rule): Remove static.
2727 * source.h (add_substitute_path_rule): Declare.
2728 * main.c: Include "source.h".
2729 (captured_main): Add substitution rule if RELOC_SRCDIR.
2731 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
2733 * gnu-nat.h (proc_debug): Add missing continuation line in macro.
2735 2009-04-20 David Daney <ddaney@caviumnetworks.com>
2737 * NEWS: Mention MIPS/Linux hardware watchpoint support.
2739 2009-04-20 David Daney <ddaney@caviumnetworks.com>
2741 * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
2742 (maint_show_dr, super_close): New variables.
2743 (super_fetch_registers, super_store_registers): Make static.
2744 (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
2745 (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
2746 (pt_watch_style): Define new enum.
2747 (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
2749 (watch_readback_valid, watch_readback, current_watches, watch_mirror):
2751 (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
2752 (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
2753 (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
2754 (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
2755 (type_to_irw, fill_mask, try_one_watch)
2756 (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
2757 (mips_linux_new_thread, populate_regs_from_watches)
2758 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
2759 (mips_linux_close): New functions.
2760 (_initialize_mips_linux_nat): Register watchpoint functions with
2761 the target_ops. Add show-debug-regs maintenance command.
2763 2009-04-20 David Daney <ddaney@caviumnetworks.com>
2765 * infrun.c (handle_inferior_event): Move gegisters_changed call down.
2767 2009-04-19 Pedro Alves <pedro@codesourcery.com>
2769 * NEWS: Mention gdbserver support for x86 Windows CE.
2771 2009-04-19 Eli Zaretskii <eliz@gnu.org>
2773 * config/djgpp/fnchange.lst: Fix typos.
2775 Set default host and target charsets in the DJGPP port.
2777 * config/djgpp/config.sed (am_cv_langinfo_codeset)
2778 (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
2779 in all configure scripts that define ac_cv_env_CPP_value.
2781 * go32-nat.c (dos_codepage, nl_langinfo): New functions.
2784 * config/djgpp/nl_types.h: New file.
2786 * config/djgpp/langinfo.h: New file.
2788 * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
2790 2009-04-18 Carlos O'Donell <carlos@codesourcery.com>
2792 * Makefile.in (MAKEHTML): Set to makeinfo --html.
2793 (MAKEHTMLFLAGS): Set to empty.
2795 2009-04-18 Eli Zaretskii <eliz@gnu.org>
2797 * NEWS: Mention all new set/show commands added since GDB 6.8 was
2800 * go32-nat.c (go32_sysinfo): Check if the call to
2801 __dpmi_get_capabilities fills the buffer with information, and
2802 don't use the buffer if not.
2804 2009-04-17 Tom Tromey <tromey@redhat.com>
2806 * charset.c (_initialize_charset): Add special case for "646".
2808 2009-04-17 Carlos O'Donell <carlos@codesourcery.com>
2810 * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
2811 * configure: Regenerate.
2812 * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
2813 configure substitutions.
2814 (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
2816 2009-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2818 ARI fix: Do not use %p, replace by call to host_address_to_string
2820 * darwin-nat.c (darwin_xfer_partial): Apply change.
2821 * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
2822 * gnu-nat.h (proc_debug): Ditto.
2823 * symmisc.c (maintenance_info_symtabs): Ditto.
2824 (maintenance_info_psymtabs): Ditto.
2825 * windows-nat.c (handle_load_dll): Ditto.
2826 (handle_unload_dll, info_w32_command, handle_exception): Ditto.
2827 * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
2829 2009-04-17 Joseph Myers <joseph@codesourcery.com>
2831 * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
2832 --enable-64-bit-bfd.
2833 (sparc-*-linux*): Likewise.
2835 2009-04-17 Eli Zaretskii <eliz@gnu.org>
2837 * go32-nat.c (go32_sysinfo): Update list of Windows versions of
2840 2009-04-16 Pedro Alves <pedro@codesourcery.com>
2842 * remote.c (remote_query_attached): Fix pasto in packet_ok result
2845 2009-04-16 Joel Brobecker <brobecker@adacore.com>
2847 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
2848 Revert the previous change. Might not be correct, actually.
2850 2009-04-16 Joel Brobecker <brobecker@adacore.com>
2852 * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
2853 (ada_get_current_task, ada_print_exception_breakpoint_nontask)
2854 (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
2855 Remove declaration. These are non-existent functions.
2857 2009-04-16 Joel Brobecker <brobecker@adacore.com>
2859 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
2860 Fix a compilation warning on mips-irix due to casting from
2861 a pointer of different size.
2863 2009-04-16 Joel Brobecker <brobecker@adacore.com>
2865 * ada-lang.c (symtab_for_sym): Delete.
2866 (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
2868 2009-04-16 Joel Brobecker <brobecker@adacore.com>
2870 * ada-lang.c (extract_string): Delete.
2871 (ada_main_name): Reimplement using target_read_string instead of
2874 2009-04-16 Andreas Schwab <schwab@linux-m68k.org>
2876 * m68klinux-nat.c: Remove obsolete comment.
2877 (fetch_register, store_register): Don't call
2878 gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
2879 which are always nops here.
2881 2009-04-14 Tom Tromey <tromey@redhat.com>
2883 * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
2884 (c_printstr): Likewise.
2885 * charset.c: Include gdb_wait.h.
2886 (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
2887 (find_charset_names): Use pexecute. Handle libiconv's output.
2889 (_initialize_charset): Use xstrdup.
2890 * gdb_wchar.h: Check HAVE_BTOWC. Split PHONY_ICONV and wchar
2892 (INTERMEDIATE_ENCODING): New define.
2893 * configure, config.in: Rebuild.
2894 * configure.ac: Check for btowc.
2896 2009-04-15 Tom Tromey <tromey@redhat.com>
2898 * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
2900 2009-04-15 Eli Zaretskii <eliz@gnu.org>
2902 * utils.c (parse_escape): Initialize target_char to pacify GCC.
2904 2009-04-14 Jan Kratochvil <jan.kratochvil@redhat.com>
2906 * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
2908 2009-04-14 Pierre Muller <muller@ics.u-strasbg.fr>
2910 ARI fix: sprintf rule.
2911 * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
2912 * ada-lang.c (add_angle_brackets): Use xstrprintf.
2913 (ada_decode): Replace sprintf by xsnprintf.
2914 (find_old_style_renaming_symbol): Ditto.
2915 (ada_to_fixed_type_1, ada_enum_name): Ditto.
2918 2009-04-14 Joel Brobecker <brobecker@adacore.com>
2920 * target.c (target_mourn_inferior): Call bfd_cache_close_all
2921 after having executed the target mourn_inferior routine.
2923 2009-04-14 Eli Zaretskii <eliz@gnu.org>
2925 * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
2928 2009-04-13 David Daney <ddaney@caviumnetworks.com>
2930 * infrun.c (maybe_software_singlestep): New function.
2931 (resume): Call maybe_software_singlestep.
2932 (handle_inferior_event): Same.
2934 2009-04-13 Tom Tromey <tromey@redhat.com>
2936 * python/python-frame.c (frapy_richcompare): Return
2937 Py_NotImplemented, not an error. Handle Py_NE as well.
2939 2009-04-13 Eli Zaretskii <eliz@gnu.org>
2941 * charset.c (EILSEQ): Define if not defined by system headers.
2943 2009-04-11 Eli Zaretskii <eliz@gnu.org>
2945 * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
2946 to be consistent with renaming config.intl.in into config_intl.in.
2948 * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
2949 consistent with the change from 2008-11-09.
2951 2009-04-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2953 * gdbtypes.c: Remove excessive parentheses at the return keywords.
2954 * varobj.c (varobj_invalidate): Fix indentation.
2955 * varobj.c (varobj_invalidate): Fix formatting text width.
2957 2009-04-08 Vladimir Prus <vladimir@codesourcery.com>
2959 Implement -exec-jump.
2961 * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
2962 * mi/mi-main.c (mi_cmd_exec_jump): New.
2963 * mi/mi-cmds.c (mi_cmds): Register exec-jump.
2965 2009-04-07 Doug Evans <dje@google.com>
2967 * symfile.c (symbol_file_clear): Fix indentation.
2969 2009-04-06 Mark Kettenis <kettenis@gnu.org>
2971 * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
2973 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2975 * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
2976 (ppc_linux_auxv_parse): New function.
2977 (ppc_linux_read_description): Use ppc_linux_target_wordsize.
2978 (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
2980 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2982 * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
2983 BFD to contents of SPU name note.
2984 (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
2985 with "from_tty" argument 1 instead of 0.
2987 2009-04-02 Jan Kratochvil <jan.kratochvil@redhat.com>
2990 (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
2991 Create the symbol in local scope.
2992 * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
2994 2009-04-02 Keith Seitz <keiths@redhat.com>
2996 * stabsread.c (read_member_functions): GCC may emit an extra space
2997 at the end of the names "__base_ctor" and "__base_dtor"; so ignore
2998 whitespace when looking for these functions.
3000 2009-04-01 Joel Brobecker <brobecker@adacore.com>
3002 Change the default value for "set print frame-arguments" to scalars.
3004 * stack.c (print_frame_arguments): Set initial value to "scalars".
3006 2009-04-01 Aleksandar Ristovski <aristovski@qnx.com>
3008 * mips-tdep.c (mips_numeric_register_alieses): New definition.
3009 (mips_gdbarch_init): Add user registers from
3010 mips_numeric_register_aliases.
3012 2009-04-01 Joel Brobecker <brobecker@adacore.com>
3014 * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
3016 2009-04-01 Joel Brobecker <brobecker@adacore.com>
3018 * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
3019 this is the last one.
3021 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3023 * remote.c (append_resumption): New.
3024 (remote_vcont_resume): Use it.
3026 2009-04-01 Joel Brobecker <brobecker@adacore.com>
3028 * windows-nat.c (+windows_get_ada_task_ptid): New function.
3029 (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
3031 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com>
3032 Keith Seitz <keiths@redhat.com>
3033 Jan Kratochvil <jan.kratochvil@redhat.com>
3036 * Makefile.in (dbxread.o): Update.
3037 * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
3038 * dwarf2read.c (GDB_FORM_cached_string): New.
3039 (read_partial_die): Use dwarf2_canonicalize_name.
3040 (dwarf2_linkage_name): Use dwarf2_name.
3041 (dwarf2_canonicalize_name): New.
3042 (dwarf2_name): Use dwarf2_canonicalize_name.
3043 (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
3044 * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
3045 * symtab.c (lookup_symbol_in_language): Canonicalize input before
3047 * cp-name-parser.y: operator() requires two parameters,
3048 according to libiberty.
3049 * minsyms.c (lookup_minimal_symbol): Canonicalize input
3053 2009-03-31 Joel Brobecker <brobecker@adacore.com>
3055 Provide support for (Ada) task-specific breakpoints.
3057 * ada-lang.h (ada_get_task_number): Add declaration.
3058 (breakpoint_ada_task_match): Delete declaration.
3059 * ada-tasks.c (ada_get_task_number): Make non-static.
3060 * breakpoint.h (struct breakpoint): Add field "task".
3061 * breakpoint.c (print_one_breakpoint_location): Add handling of
3062 task-specific breakpoints.
3063 (create_breakpoint, create_breakpoints, find_condition_and_thread):
3064 New parameter "task".
3065 (break_command_really): Update calls to find_condition_and_thread
3066 and create_breakpoints.
3067 (breakpoint_re_set_one): Update call to find_condition_and_thread.
3070 2009-03-31 Joel Brobecker <brobecker@adacore.com>
3072 * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
3074 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3076 * remote.c (remote_notice_new_inferior): Use ptid_is_pid. Check
3077 if the thread's ptid without a thread id field is in the list
3078 before calling thread_change_ptid.
3079 (extended_remote_attach_1): In non-stop mode, do not rely on
3080 querying the current thread, instead, query the thread list, and
3081 select the first thread of the process.
3082 * gdbthread.h (first_thread_of_process): Declare.
3083 * thread.c (first_thread_of_process): Define.
3085 2009-03-30 Stan Shebs <stan@codesourcery.com>
3087 Make tracepoints into a type of breakpoint.
3088 * breakpoint.h (enum bptype): Add bp_tracepoint.
3089 (struct breakpoint): Add fields step_count, pass_count, actions.
3090 (get_tracepoint, get_tracepoint_by_number): Declare.
3091 (all_tracepoints): Declare.
3092 * breakpoint.c: Include tracepoint.h, readline.h.
3093 (ALL_TRACEPOINTS): Move here from tracepoint.c.
3094 (tracepoint_count): Ditto.
3095 (should_be_inserted): GDB does not insert tracepoints itself.
3096 (print_it_typical): Add tracepoint case.
3097 (bpstat_what): Ditto.
3098 (print_one_breakpoint_location): Ditto, and add printing for
3099 pass count, step count, and action list.
3100 (user_settable_breakpoint): Add tracepoint case.
3101 (allocate_bp_location): Ditto.
3102 (set_breakpoint_location_function): Ditto.
3103 (disable_breakpoints_in_shlibs): Ditto.
3105 (break_command_really): Add argument traceflag, use to choose
3106 basic breakpoint type.
3107 (break_command_1): Pass extra argument.
3108 (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
3109 (breakpoint_re_set_one): Add tracepoint case.
3110 (disable_command, enable_command): Ditto.
3111 (set_tracepoint_count): Move here from tracepoint.c.
3112 (trace_command): Move here from tracepoint.c and use
3113 break_command_really.
3114 (tracepoints_info): Move here from tracepoint.c and call
3116 (enable_trace_command): Move here from tracepoint.c and call
3118 (disable_trace_command): Move here from tracepoint.c and call
3120 (delete_trace_command): Move here from tracepoint.c and call
3122 (trace_pass_command): Move here from tracepoint.c.
3123 (get_tracepoint_by_number): Ditto.
3124 (tracepoint_save_command): Ditto.
3125 (get_tracepoint): New function.
3126 (all_tracepoints): New function.
3127 (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
3128 deprecate "enable trace" and "disable trace" commands.
3129 * tracepoint.h (struct tracepoint): Remove.
3130 (tracepoint_chain): Remove decl.
3131 (deprecated_create_tracepoint_hook): Remove decl.
3132 (deprecated_delete_tracepoint_hook): Remove decl.
3133 (deprecated_modify_tracepoint_hook): Remove decl.
3134 (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
3135 (free_actions): Update signature.
3136 (validate_actionline): Update signature.
3137 (end_actions_pseudocommand): Declare.
3138 (while_stepping_pseudocommand): Declare.
3139 * tracepoint.c: Include breakpoint.h.
3140 (tracepoint_chain, tracepoint_count): Remove.
3141 (free_actions, make_cleanup_free_actions): Update signature.
3142 (trace_command, set_raw_tracepoint): Remove.
3143 (trace_mention): Remove.
3144 (tracepoints_info): Remove.
3145 (tracepoint_operation, map_args_over_tracepoints): Remove.
3146 (get_tracepoint_by_number): Remove.
3147 (enable_trace_command, disable_trace_command): Remove.
3148 (delete_trace_command, trace_pass_command): Remove.
3149 (trace_actions_command, read_actions): Update signature.
3150 (validate_actionline): Update signature, use bp loc.
3151 (encode_actions): Ditto.
3152 (download_tracepoint): New function, body of trace_start_command.
3153 (trace_start_command): Call it, use all_tracepoints.
3154 (tracepoint_save_command): Remove.
3155 (tracepoint_dump_command): Use get_tracepoint.
3156 (end_actions_pseudocommand): Make globally visible.
3157 (while_stepping_pseudocommand): Ditto.
3158 (_initialize_tracepoint): Move command definitions to breakpoint.c.
3160 2009-03-30 Thiago Jung Bauermann <bauerman@br.ibm.com>
3162 Expose frames to Python.
3163 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
3164 (SUBDIR_PYTHON_SRCS): Add python-frame.c.
3165 (python-frame.o): New target.
3166 * python/python-frame.c: New file.
3167 * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
3168 gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
3169 gdbpy_initialize_frames): New prototypes.
3170 * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
3171 (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
3173 * stack.c (find_frame_funname): New function, factored out of
3175 (print_frame): Call find_frame_funname.
3176 * stack.h (find_frame_funname): Add prototype.
3178 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
3180 Remove unused value_object attribute `owned_by_gdb'.
3181 * python/python-value.c (value_object): Remove owned_by_gdb
3183 (valpy_dealloc): Remove reference to self->owned_by_gdb.
3184 (valpy_new): Likewise.
3185 (value_to_value_object): Likewise.
3187 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
3189 Change gdb.Value.address from a method to an attribute.
3190 * python/python-value.c (value_object): Add `address' element.
3191 (valpy_dealloc): Decrement reference to self->address if set.
3192 (valpy_new): Initialize val_obj->address.
3193 (valpy_address): Rename to ...
3194 (valpy_get_address): ... this. Change signature from method to
3195 attribute. Update self->address if not set.
3196 (value_to_value_object): Initialize val_obj->address.
3197 (value_object_getset): Add `address' element.
3198 (value_object_methods): Remove `address' element.
3200 2009-03-29 Andreas Schwab <schwab@linux-m68k.org>
3202 * observer.sh: Set LANG/LC_ALL to C, not c.
3204 2009-03-28 Kevin Buettner <kevinb@redhat.com>
3206 * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
3209 2009-03-28 Pedro Alves <pedro@codesourcery.com>
3211 * remote.c (remote_stop_ns): If multi-process extensions are off,
3212 and GDB is requesting the whole process to stop, sent "vCont;t",
3215 2009-03-28 Pedro Alves <pedro@codesourcery.com>
3217 * inf-loop.c (inferior_event_handler): Avoid calling is_running on
3220 2009-03-27 Eli Zaretskii <eliz@gnu.org>
3222 * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
3224 2009-03-26 Doug Evans <dje@google.com>
3226 * thread.c (do_restore_current_thread_cleanup): Redo test for
3227 whether to restore old->inferior_ptid.
3229 2009-03-26 Tom Tromey <tromey@redhat.com>
3231 * breakpoint.c (resolve_sal_pc): Preserve original line number
3232 when skipping prologue.
3234 2009-03-26 Doug Evans <dje@google.com>
3236 * thread.c (inferior_thread) Remove "extern" in definition.
3238 2009-03-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
3240 Add gdb.Value.is_optimized_out attribute.
3241 * python/python-value.c (valpy_get_is_optimized_out): New
3243 (value_object_getset): New variable.
3244 (value_object_type): Initialize tp_getset element.
3246 2009-03-26 Joel Brobecker <brobecker@adacore.com>
3248 Recognize missing DW_AT_location as <value optimized out>.
3250 (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
3251 Call add_symbol_to_list.
3253 2009-03-25 Tom Tromey <tromey@redhat.com>
3255 * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
3256 * stack.c (print_this_frame_argument_p): Use check_typedef.
3258 2009-03-25 Tom Tromey <tromey@redhat.com>
3260 * configure: Rebuild.
3261 * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
3262 Rearrange flags setting. Add comments.
3264 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
3266 * config/i386/nm-i386.h: Remove code within
3267 I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
3268 * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
3270 * config/i386/nm-cygwin64.h: Ditto.
3271 * config/i386/nm-fbsd.h: Ditto.
3272 * config/i386/nm-go32.h: Ditto.
3273 * config/i386/nm-linux.h: Ditto.
3274 * config/i386/nm-linux64.h: Ditto.
3276 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
3278 ARI fix: "xasprintf" rule.
3279 * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
3281 2009-03-25 Pedro Alves <pedro@codesourcery.com>
3283 * remote.c (remote_start_remote): In non-stop mode, call
3284 init_wait_for_inferior before adding threads and inferiors.
3286 2009-03-25 Joel Brobecker <brobecker@adacore.com>
3288 * breakpoint.c (breakpoint_thread_match): Split a large condition
3289 into several smaller conditions. No behavior change.
3291 2009-03-25 Pedro Alves <pedro@codesourcery.com>
3293 * infrun.c (infrun_thread_thread_exit): New.
3294 (_initialize_infrun): Attach it to the thread_exit observer.
3295 * thread.c (delete_thread_1): Always call the observer, passing it
3297 * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter. If
3298 SILENT, return immediately.
3300 2009-03-25 Pedro Alves <pedro@codesourcery.com>
3302 * infrun.c (normal_stop): Use has_stack_frames instead of
3304 * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
3305 when there is no thread selected.
3306 (mi_cmd_execute): Don't special case commands that can run without
3307 a valid selected thread.
3308 * top.c (execute_command): Don't special case commands that can
3309 run without a valid selected thread. Use has_stack_frames.
3310 * infcmd.c (ensure_valid_thread): New.
3311 (continue_1, step_1, jump_command, signal_command): Use it.
3312 (detach_command): Error out if there's no selected thread/inferior.
3313 * thread.c (print_thread_info): Allow having no thread selected.
3314 (switch_to_thread): Don't read the PC if there is no current thread.
3315 (do_restore_current_thread_cleanup): Don't record the current
3316 frame if there is no current thread.
3317 (make_cleanup_restore_current_thread): Don't read frame info if
3318 there is no selected thread.
3319 (_initialize_thread): Don't mark commands as
3320 "no_selected_thread_ok".
3321 * frame.c (get_current_frame): Error out if there is no valid
3323 (has_stack_frames): Return false if there is no valid
3325 * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
3326 "no_selected_thread_ok".
3327 * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
3328 (get_cmd_no_selected_thread_ok): Delete.
3329 * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
3330 (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
3332 * stack.c (get_selected_block): Use has_stack_frames.
3334 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3336 Fix size of FPSCR in Power 7 processors.
3337 * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3338 (PPC_FEATURE_HAS_DFP): New #define.
3339 (ppc_linux_read_description): Check for DFP feature instead of
3340 ISA 2.05 to decide on size of the FPSCR.
3342 2009-03-25 Kevin Buettner <kevinb@redhat.com>
3344 * mn10300-tdep.c (trad-frame.h): Don't include.
3345 (prologue-value.h): Include.
3346 (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
3347 (struct mn10300_prologue): Define.
3348 (push_reg, translate_rreg, check_for_saved): New functions.
3349 (mn10300_analyze_prologue): Rewrite, using prologue-value
3350 machinery. Handle more instructions than before. Permit
3351 instructions to occur in any order.
3352 (mn10300_skip_prologue): Find the extents of the function
3353 in question; mn10300_analyze_prologue no longer does this.
3354 (mn10300_analyze_frame_prologue): New function.
3355 (mn10300_frame_base): New function.
3356 (mn10300_frame_this_id): Rewrite, no longer using trad-frame
3358 (mn10300_frame_prev_register): Likewise.
3359 (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
3360 (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
3362 (mn10300_frame_unwind_init): Don't call frame_base_set_default().
3364 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
3366 Fix completer problem for filename completion on the first try.
3368 * gdb/completer.h (gdb_completion_word_break_characters): New function.
3369 * gdb/completer.c: Include gdb_assert.h.
3370 (complete_line_internal_reason): New enum.
3371 (complete_line_internal): Change last argument type to
3372 complete_line_internal_reason.
3373 Modify function to handle the different complete_line_internal_reason
3375 (complete_line): Adapt to change in complete_line_internal.
3376 (command_completer): Ditto.
3377 (gdb_completion_word_break_characters): Implement new function.
3378 * top.c (init_main): Set rl_completion_word_break_hook to
3379 gdb_completion_word_break_characters.
3382 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
3384 ARI fix: "strlen d_name" rule.
3385 * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
3388 2009-03-24 Tom Tromey <tromey@redhat.com>
3389 Pedro Alves <pedro@codesourcery.com>
3391 * configure, config.in: Rebuild.
3392 * configure.ac: Check for libiconvlist.
3393 * charset.c: Check HAVE_LIBICONVLIST.
3394 * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
3395 LIBICONV_LIBDIR. Update CPPFLAGS and LIBS.
3396 * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
3398 (INTERNAL_CFLAGS_BASE): Update.
3399 (INTERNAL_LDFLAGS): Update.
3402 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3404 * configure.ac: Initialize the variable $PREFER_CURSES.
3405 * configure: Regenerated.
3407 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3409 * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
3410 * configure: Regenerated.
3412 2009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
3414 ARI fix: "strerror" rule.
3415 * darwin-nat.c (darwin_ptrace): Use safe_strerror.
3416 (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
3418 2009-03-23 Joel Brobecker <brobecker@adacore.com>
3420 * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
3421 before looking up the fields inside our struct type.
3423 2009-03-23 Joel Brobecker <brobecker@adacore.com>
3425 * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
3426 trying to resolve the type qualification.
3428 2009-03-23 Joel Brobecker <brobecker@adacore.com>
3430 * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
3431 we try to apply the attribute on the real type, rather than
3432 its associated typedef.
3434 2009-03-23 Joel Brobecker <brobecker@adacore.com>
3436 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
3437 to make sure we try to get the modulus of the actual type, not the
3440 2009-03-23 Joel Brobecker <brobecker@adacore.com>
3442 * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
3443 [OP_ATR_LENGTH]: When using the attribute on a type, make sure
3444 to get the real type, not the associated typedef.
3446 2009-03-23 Joel Brobecker <brobecker@adacore.com>
3448 * ada-lang.c (ada_get_field_index): Add handling of the case
3449 when TYPE is a typedef of a struct.
3451 2009-03-23 Joel Brobecker <brobecker@adacore.com>
3453 Add gdb_usleep as a portable version of usleep based on gdb_select.
3454 * gdb_usleep.h, gdb_usleep.c: New files.
3455 * Makefile.in (SFILES): Add gdb_usleep.c.
3456 (HFILES_NO_SRCDIR): Add gdb_usleep.h.
3457 (COMMON_OBS): Add gdb_usleep.o.
3458 * ser-unix.c (hardwire_send_break): Replace call to gdb_select
3459 by call to gdb_usleep.
3461 2009-03-23 Joel Brobecker <brobecker@adacore.com>
3463 * buildsym.c (end_symtab): If we ignore the subfiles, then
3464 unlink the associated symtabs if they were already allocated.
3466 2009-03-23 Jerome Guitton <guitton@adacore.com>
3468 Provide a way to force building of GDB with libcurses.
3469 * configure.ac: Add --with-curses.
3470 * configure: Regenerated.
3472 2009-03-23 Tom Tromey <tromey@redhat.com>
3474 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
3477 2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
3479 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
3480 solib_contains_address_p instead of searching.
3482 2009-03-23 Tom Tromey <tromey@redhat.com>
3484 * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
3485 (iconv): Make 'inbuf' argument const.
3486 (convert_between_encodings): Use ICONV_CONST.
3487 (wchar_iterate): Likewise.
3489 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
3491 * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
3492 dynamically loaded function.
3493 (LookupPrivilegeValueA): Ditto.
3494 (OpenProcessToken): Ditto.
3495 (AdjustTokenPrivileges): Rename and define placeholder for address of
3496 dynamically loaded function.
3497 (LookupPrivilegeValueA): Ditto.
3498 (OpenProcessToken): Ditto.
3499 (set_process_privilege): Remove check for loaded functions.
3500 (bad_OpenProcessToken): Define.
3501 (_initialize_loadable): Load token functions from advapi here, setting
3502 OpenProcessToken function to a dummy static function which always return
3503 error if OS doesn't support this functionality.
3505 2009-03-22 Nicolas Roche <roche@adacore.com>
3506 Christopher Faylor <me+cygwin@cgf.cx>
3508 * win32-nat.c (ctrl_c_handler): New function.
3509 (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
3510 is run in a separate console.
3512 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
3514 * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
3515 for dynamically loaded function.
3516 (DebugBreakProcess): Ditto.
3517 (DebugSetProcessKillOnExit): Ditto.
3518 (EnumProcessModules): Ditto.
3519 (GetModuleFileNameExA): Ditto.
3520 (GetModuleInformation): Ditto.
3521 (DebugActiveProcessStop): Rename and define placeholder for address of
3522 dynamically loaded function.
3523 (DebugBreakProcess): Ditto.
3524 (DebugSetProcessKillOnExit): Ditto.
3525 (EnumProcessModules): Ditto.
3526 (GetModuleFileNameExA): Ditto.
3527 (GetModuleInformation): Ditto.
3528 (psapi_loaded): Delete.
3529 (get_module_name): Don't check psapi_loaded, just rely on the fact that
3530 dynamically loaded functions will return failure if they weren't
3532 (has_detach_ability): Delete.
3533 (windows_attach): Remove call to has_detach_ability (). Just rely on
3534 functions being callable.
3535 (bad_DebugActiveProcessStop): Define.
3536 (bad_DebugBreakProcess): Ditto.
3537 (bad_DebugSetProcessKillOnExit): Ditto.
3538 (bad_EnumProcessModules): Ditto.
3539 (bad_GetModuleFileNameExA): Ditto.
3540 (bad_GetModuleInformation): Ditto.
3541 (_initialize_loadable): Rename from _initialize_psapi. Initialize all
3542 dynamic storage here, setting nonexistent functions to dummy static
3543 functions which always return error.
3545 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3547 * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
3548 to the about_to_proceed observer notification.
3549 (mi_about_to_proceed): New.
3550 (mi_on_resume): Only output ^running and the prompt here if the
3551 target was proceeded.
3552 * breakpoint.c (breakpoint_proceeded): New static.
3553 (breakpoint_about_to_proceed): New.
3554 (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
3555 the about_to_proceed observer notification.
3556 * inferior.h (breakpoint_proceeded): Delete declaration.
3557 * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
3558 Notify the about_to_proceed observers.
3559 (struct inferior_status): Delete breakpoint_proceeded member.
3560 (save_inferior_status): Don't save it.
3561 (restore_inferior_status): Don't restore it.
3562 * mi-main.h (mi_proceeded): Declare.
3563 * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
3566 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3568 * gdbthread.h (struct thread_info): Add in_infcall member.
3569 * infcall.c (run_inferior_call): Save, set and restore in_infcall.
3570 Remove reverences to suppress_resume_observer. Refresh
3571 `call_thread' after returning from `proceed'.
3572 * infcmd.c (suppress_resume_observer): Delete.
3573 * inferior.h (suppress_resume_observer): Delete declaration.
3574 * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
3576 * thread.c (set_running): Remove references to
3577 suppress_resume_observer.
3578 * infrun.c (struct inferior_status): Add in_infcall member.
3579 (save_inferior_status): Save it.
3580 (restore_inferior_status): Restore it.
3582 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3584 * infcall.c (run_inferior_call): Remove references to
3585 suppress_stop_observer.
3586 * infcmd.c (suppress_stop_observer): Delete.
3587 (finish_command_continuation): Remove NOTE. Don't clear
3588 suppress_stop_observer anymore.
3589 (finish_command_continuation_free_arg): Likewise.
3590 (finish_forward): Remove references to suppress_stop_observer.
3591 Call normal_stop observer if we haven't already.
3592 * inferior.h (suppress_stop_observer): Delete.
3593 * infrun.c (normal_stop): When deciding to suppress the
3594 normal_stop observer, check for proceed_to_finish instead of
3595 suppress_stop_observer.
3597 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3599 * symfile.c (symfile_relocate_debug_section): Remove check for
3602 2009-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3603 Jim Blandy <jimb@red-bean.com>
3604 Thiago Jung Bauermann <bauerman@br.ibm.com>
3605 Tom Tromey <tromey@redhat.com>
3607 Miscellaneous fixes to the Python code.
3608 * python/python-cmd.c (cmdpy_init): Accept keyword
3610 * python/python-value.c (valpy_string): Accept keyword
3612 (valpy_binop): Use `break' to exit from the TRY_CATCH block.
3613 Do not call value_to_value_object on NULL RES_VAL.
3614 (value_object_methods): Change `string' entry to also accept
3616 (convert_value_from_python): Return a copy of the value if obj is
3618 (value_object_methods): Mark the `string' method as accepting
3619 keywords, and show method "prototype" in the doc string.
3620 * python/python.c (get_parameter): Don't return inside a
3623 2009-03-20 Tom Tromey <tromey@redhat.com>
3625 Add support for convenience functions in Python.
3626 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
3627 (SUBDIR_PYTHON_SRCS): Add python-function.c.
3628 (python-function.o): New target.
3629 * eval.c: Include "python/python.h" and <ctype.h>.
3630 (evaluate_subexp_standard): Handle values of type
3631 TYPE_CODE_INTERNAL_FUNCTION.
3632 * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
3633 * parse.c (write_exp_string): Remove duplicate word in comment.
3634 * python/python-function.c: New file.
3635 * python/python-internal.h (gdbpy_initialize_functions): Add
3637 * python/python.c (_initialize_python): Call
3638 gdbpy_initialize_functions.
3639 * valprint.c (value_check_printable): Handle values of type
3640 TYPE_CODE_INTERNAL_FUNCTION.
3641 * value.c: Include "cli/cli-decode.h".
3642 (internal_function): New struct.
3643 (functionlist, internal_fn_type): New static variables.
3644 (lookup_only_internalvar,
3645 lookup_internalvar): Add const qualifier to name argument.
3646 (create_internalvar): Likewise. Initialize new field.
3647 (set_internal_var): Fix typo in comment. Don't allow assignment
3648 to canonical variable.
3649 (value_create_internal_function, value_internal_function_name,
3650 call_internal_function, function_command, function_destroyer,
3651 add_internal_function): New functions.
3652 (_initialize_values): Create `function' placeholder command.
3653 Initialize internal_fn_type.
3654 * value.h (lookup_only_internalvar, create_internalvar,
3655 lookup_internalvar): Add const qualifier to name argument.
3656 (internal_function_fn, add_internal_function, call_internal_function,
3657 value_internal_function_name): Add prototypes.
3658 (struct internalvar) <canonical>: New field.
3660 2009-03-20 Tom Tromey <tromey@redhat.com>
3662 * c-lang.c (evaluate_subexp_c): Call check_typedef.
3664 2009-03-20 Tom Tromey <tromey@redhat.com>
3665 Julian Brown <julian@codesourcery.com>
3667 PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
3668 PR i18n/9401, PR exp/9613:
3670 * value.h (value_typed_string): Declare.
3671 (val_print_string): Update.
3672 * valprint.h (print_char_chars): Update.
3673 * valprint.c (print_char_chars): Add type argument. Update.
3674 (val_print_string): Likewise.
3675 * valops.c (value_typed_string): New function.
3676 * utils.c (host_char_to_target): New function.
3677 (parse_escape): Use host_char_to_target, host_hex_value. Update.
3679 (no_control_char_error): Remove.
3680 * typeprint.c (print_type_scalar): Update.
3681 * scm-valprint.c (scm_scmval_print): Update.
3682 * scm-lang.h (scm_printchar, scm_printstr): Update.
3683 * scm-lang.c (scm_printchar): Add type argument.
3684 (scm_printstr): Likewise.
3685 * printcmd.c (print_formatted): Update.
3686 (print_scalar_formatted): Update.
3687 (printf_command) <wide_string_arg, wide_char_arg>: New constants.
3688 Handle '%lc' and '%ls'.
3689 * parser-defs.h (struct typed_stoken): New type.
3690 (struct stoken_vector): Likewise.
3691 (write_exp_string_vector): Declare.
3692 * parse.c (write_exp_string_vector): New function.
3693 * p-valprint.c (pascal_val_print): Update.
3694 * p-lang.h (is_pascal_string_type, pascal_printchar,
3695 pascal_printstr): Update.
3696 * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
3697 Add 'char_type' argument.
3698 (pascal_emit_char): Add type argument.
3699 (pascal_printchar): Likewise.
3700 (pascal_printstr): Likewise.
3701 * objc-lang.c (objc_emit_char): Add type argument.
3702 (objc_printchar): Likewise.
3703 (objc_printstr): Likewise.
3704 * macroexp.c (get_character_constant): Handle unicode characters.
3706 (get_string_literal): Handle unicode strings. Use
3708 * m2-valprint.c (print_unpacked_pointer): Update.
3709 (m2_print_array_contents): Update.
3710 (m2_val_print): Update.
3711 * m2-lang.c (m2_emit_char): Add type argument.
3712 (m2_printchar): Likewise.
3713 (m2_printstr): Likewise.
3714 * language.h (struct language_defn) <la_printchar>: Add type
3716 <la_printstr, la_emitchar>: Likewise.
3717 (LA_PRINT_CHAR): Likewise.
3718 (LA_PRINT_STRING): Likewise.
3719 (LA_EMIT_CHAR): Likewise.
3720 * language.c (unk_lang_emit_char): Add type argument.
3721 (unk_lang_printchar): Likewise.
3722 (unk_lang_printstr): Likewise.
3723 * jv-valprint.c (java_val_print): Update.
3724 * jv-lang.c (java_emit_char): Add type argument.
3725 * f-valprint.c (f_val_print): Update.
3726 * f-lang.c (f_emit_char): Add type argument.
3727 (f_printchar): Likewise.
3728 (f_printstr): Likewise.
3729 * expprint.c (print_subexp_standard): Update.
3730 * charset.h (target_wide_charset): Declare.
3731 (c_target_char_has_backslash_escape, c_parse_backslash,
3732 host_char_print_literally, host_char_to_target,
3733 target_char_to_host, target_char_to_control_char): Remove.
3734 (enum transliterations): New type.
3735 (convert_between_encodings): Declare.
3736 (HOST_ESCAPE_CHAR): New define.
3737 (host_letter_to_control_character, host_hex_value): Declare.
3738 (enum wchar_iterate_result): New enum.
3739 (struct wchar_iterator): Declare.
3740 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
3741 wchar_push_back): Declare.
3742 * charset-list.h: New file.
3743 * c-valprint.c (textual_name): New function.
3744 (textual_element_type): Handle wide character types.
3745 (c_val_print): Pass original type to textual_element_type. Handle
3746 wide character types.
3747 (c_value_print): Use textual_element_type. Pass original type of
3749 * c-lang.h (enum c_string_type): New type.
3750 (c_printchar, c_printstr): Update.
3751 * c-lang.c (classify_type): New function.
3752 (print_wchar): Likewise.
3753 (c_emit_char): Add type argument. Handle wide characters.
3754 (c_printchar): Likewise.
3755 (c_printstr): Add type argument. Handle wide and multibyte
3757 (convert_ucn): New function.
3758 (emit_numeric_character): Likewise.
3759 (convert_octal): Likewise.
3760 (convert_hex): Likewise.
3761 (ADVANCE): New macro.
3762 (convert_escape): New function.
3763 (parse_one_string): Likewise.
3764 (evaluate_subexp_c): Likewise.
3765 (exp_descriptor_c): New global.
3766 (c_language_defn): Use exp_descriptor_c.
3767 (cplus_language_defn): Likewise.
3768 (asm_language_defn): Likewise.
3769 (minimal_language_defn): Likewise.
3770 (charset_for_string_type): New function.
3771 * c-exp.y (%union): Add 'svec' and 'tsval'.
3773 (exp): Add CHAR production.
3774 (string_exp): Rewrite.
3775 (exp) <string_exp>: Rewrite.
3776 (tempbuf): Now global.
3777 (tempbuf_init): New global.
3778 (parse_string_or_char): New function.
3779 (yylex) <tempbuf>: Now global.
3780 <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
3782 Handle 'u', 'U', and 'L' prefixes. Call parse_string_or_char.
3783 (c_parse_escape): New function.
3784 * auxv.c (fprint_target_auxv): Update.
3785 * ada-valprint.c (ada_emit_char): Add type argument.
3786 (ada_printchar): Likewise.
3787 (ada_print_scalar): Update.
3788 (printstr): Add type argument. Update calls to ada_emit_char.
3789 (ada_printstr): Add type argument.
3790 (ada_val_print_array): Update.
3791 (ada_val_print_1): Likewise.
3792 * ada-lang.c (emit_char): Add type argument.
3793 * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
3795 * gdb_locale.h: Include langinfo.h.
3796 * charset.c (_initialize_charset): Set default host charset from
3797 the locale. Don't register charsets. Add target-wide-charset
3798 commands. Call find_charset_names.
3799 (struct charset, struct translation): Remove.
3800 (GDB_DEFAULT_HOST_CHARSET): Remove.
3801 (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
3802 (target_wide_charset_name): New global.
3803 (show_host_charset_name): Handle "auto".
3804 (show_target_wide_charset_name): New function.
3805 (host_charset_enum, target_charset_enum): Remove.
3806 (charset_enum): New global.
3807 (all_charsets, register_charset, lookup_charset, all_translations,
3808 register_translation, lookup_translation): Remove.
3809 (simple_charset, ascii_print_literally, ascii_to_control): Remove.
3810 (iso_8859_print_literally, iso_8859_to_control,
3811 iso_8859_family_charset): Remove.
3812 (ebcdic_print_literally, ebcdic_to_control,
3813 ebcdic_family_charset): Remove.
3814 (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
3815 register_iconv_charsets): Remove.
3816 (target_wide_charset_be_name, target_wide_charset_le_name): New
3818 (identity_either_char_to_other): Remove.
3819 (set_be_le_names, validate): New functions.
3820 (backslashable, backslashed, represented): Remove.
3821 (default_c_target_char_has_backslash_escape): Remove.
3822 (default_c_parse_backslash, iconv_convert): Remove.
3823 (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
3824 ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
3825 iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
3826 ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
3827 ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
3828 ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
3829 (table_convert_char, table_translation, simple_table_translation):
3831 (current_host_charset, current_target_charset,
3832 c_target_char_has_backslash_escape_func,
3833 c_target_char_has_backslash_escape_baton): Remove.
3834 (c_parse_backslash_func, c_parse_backslash_baton): Remove.
3835 (host_char_to_target_func, host_char_to_target_baton): Remove.
3836 (target_char_to_host_func, target_char_to_host_baton): Remove.
3837 (cached_iconv_host_to_target, cached_iconv_target_to_host):
3839 (lookup_charset_or_error, check_valid_host_charset): Remove.
3840 (set_host_and_target_charsets): Remove.
3841 (set_host_charset, set_target_charset): Remove.
3842 (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
3843 (set_target_wide_charset_sfunc): New function.
3844 (show_charset): Print target wide character set.
3845 (host_charset, target_charset): Rewrite.
3846 (target_wide_charset): New function.
3847 (c_target_char_has_backslash_escape): Remove.
3848 (c_parse_backslash): Remove.
3849 (host_letter_to_control_character): New function.
3850 (host_char_print_literally): Remove.
3851 (host_hex_value): New function.
3852 (target_char_to_control_char): Remove.
3853 (cleanup_iconv): New function.
3854 (convert_between_encodings): New function.
3855 (target_char_to_host): Remove.
3856 (struct wchar_iterator): Define.
3857 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
3858 wchar_push_back): New functions.
3859 (do_cleanup_iterator): New function.
3860 (char_ptr): New typedef.
3861 (charsets): New global.
3862 (add_one, find_charset_names): New functions.
3863 (default_charset_names): New global.
3864 (auto_host_charset_name): Likewise.
3865 * aclocal.m4, config.in, configure: Rebuild.
3866 * configure.ac: Call AM_LANGINFO_CODESET.
3867 (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
3868 (AM_ICONV): Invoke earlier.
3869 * acinclude.m4: Include codeset.m4. Subst LIBICONV_INCLUDE and
3870 LIBICONV_LIBDIR. Check for libiconv in build tree.
3871 * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
3872 (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
3873 (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
3874 * gdb_obstack.h (obstack_grow_wstr): New define.
3875 * gdb_wchar.h: New file.
3876 * defs.h: Include it.
3878 2009-03-20 Tom Tromey <tromey@redhat.com>
3879 Jan Kratochvil <jan.kratochvil@redhat.com>
3881 * dwarf2read.c (process_die): Handle DW_TAG_typedef.
3882 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
3884 * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
3886 * ada-typeprint.c (print_array_type): Do the NULL check
3889 2009-03-19 Tom Tromey <tromey@redhat.com>
3891 * utils.c (do_obstack_free): New function.
3892 (make_cleanup_obstack_free): Likewise.
3893 * defs.h (make_cleanup_obstack_free): Declare.
3895 2009-03-18 Doug Evans <dje@google.com>
3897 * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
3898 int, not a long long.
3899 (linux_nat_info_proc_cmd): Store pid in long instead of long long.
3901 * expprint.c (dump_raw_expression): Print note if non-NULL.
3903 * printcmd.c (display_uses_solib_p): Redo loop, scan element list
3906 2009-03-18 Nathan Sidwell <nathan@codesourcery.com>
3908 * Makefile.in: Update license to GPLv3.
3909 * ada-exp.y: Update license to GPLv3.
3910 * ada-lex.l: Update license to GPLv3.
3911 * c-exp.y: Update license to GPLv3.
3912 * cp-name-parser.y: Update license to GPLv3.
3913 * darwin-nat-info.c: Update license to GPLv3.
3914 * f-exp.y: Update license to GPLv3.
3915 * gdb_thread_db.h: Update license to GPLv3.
3916 * hppanbsd-nat.c: Update license to GPLv3.
3917 * hppanbsd-tdep.c: Update license to GPLv3.
3918 * hppaobsd-tdep.c: Update license to GPLv3.
3919 * jv-exp.y: Update license to GPLv3.
3920 * m2-exp.y: Update license to GPLv3.
3921 * objc-exp.y: Update license to GPLv3.
3922 * p-exp.y: Update license to GPLv3.
3923 * reply_mig_hack.awk: Update license to GPLv3.
3924 * reverse.c: Update license to GPLv3.
3925 * xtensa-xtregs.c: Update license to GPLv3.
3927 2009-03-18 Pedro Alves <pedro@codesourcery.com>
3929 * remote.c (remote_close): Don't call generic_mourn_inferior.
3930 (remote_mourn_1): Call generic_mourn_inferior after closing the
3933 2009-03-18 Pedro Alves <pedro@codesourcery.com>
3935 * remote.c (remote_start_remote): Add missing call to
3936 init_wait_for_inferior in non-stop mode.
3938 2009-03-18 Pedro Alves <pedro@codesourcery.com>
3940 * breakpoint.c (bpstat_should_step): Only consider software
3941 watchpoints that have a location.
3943 2009-03-17 Joel Brobecker <brobecker@adacore.com>
3945 Add a target_ops parameter to the to_kill method in struct target_ops.
3947 * target.h (struct target_ops): Add a "target_ops *" parameter to
3949 (target_kill): Remove macro. Add declaration.
3950 * target.c (debug_to_kill): Delete, no longer necessary.
3951 (target_kill): New function.
3952 (update_current_target): Stop inheriting the to_kill method.
3953 Do not de_fault it to no_process either.
3954 (setup_target_debug): Do not set current_target.to_kill.
3955 * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
3956 linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
3957 remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
3960 2009-03-17 Doug Evans <dje@google.com>
3962 * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
3963 glibc 2.3.2 and earlier.
3965 2009-03-17 Joel Brobecker <brobecker@adacore.com>
3967 * frame.c (get_prev_frame_1): Do not perform the inner_frame
3968 sanity check if this_frame is not NORMAL.
3969 (frame_id_inner): Update the description of this function.
3971 2009-03-17 Hui Zhu <teawater@gmail.com>
3973 * stack.c: Change the introduce of "disassemble-next-line".
3975 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3977 * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
3980 2009-03-17 Hui Zhu <teawater@gmail.com>
3982 * stack.c: Include valprint.h.
3983 (disassemble_next_line): New enum.
3984 (show_disassemble_next_line): New function. Show the current
3985 value of disassemble-next-line.
3986 (gdb_disassembly_stub_args): New struct for argument passing
3987 between function do_gdb_disassembly and function
3988 gdb_disassembly_stub.
3989 (gdb_disassembly_stub): New function. Helper for
3991 (do_gdb_disassembly): New function. Use TRY_CATCH to catch
3992 the exception from the gdb_disassembly because it will be
3993 broken by filter sometime.
3994 (print_frame_info): If disassemble-next-line is set to auto
3995 or on and doesn't have the line debug messages for $pc,
3996 output the next instruction.
3997 If disassemble-next-line is set to on and there is line debug
3998 messages, output assembly codes for next line.
3999 (_initialize_stack): Make the "set disassemble-next-line"
4000 command an auto-boolean command. Change its class to
4001 class_stack. Place it in the top level set list. Extend help
4002 to describe the auto mode.
4004 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4006 * infrun.c (normal_stop): Don't overwrite old_chain.
4008 2009-03-16 Joel Brobecker <brobecker@adacore.com>
4010 * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
4011 which is undefined, by call to regcache_invalidate, which should
4012 do what the original author wanted to do.
4014 2009-03-16 Joel Brobecker <brobecker@adacore.com>
4016 * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
4017 (mips_create_inferior): Likewise.
4019 2009-03-16 Joel Brobecker <brobecker@adacore.com>
4021 * go32-nat.c (go32_create_inferior): Add missing ops parameter.
4023 2009-03-16 Joel Brobecker <brobecker@adacore.com>
4025 * darwin-nat.c (darwin_resume): Fix a compiler warning when
4026 building on x86_64-darwin.
4028 2009-03-16 Tristan Gingold <gingold@adacore.com>
4030 * configure.tgt: Add handling for x86_64-darwin.
4032 2009-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
4034 * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
4036 2009-03-15 Joel Brobecker <brobecker@adacore.com>
4038 * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
4039 Use the ops parameter to get to the target beneath, rather than
4040 using the current_target global. Using the current_target global
4041 was an unintended accident.
4043 2009-03-15 Joel Brobecker <brobecker@adacore.com>
4045 Fix an error happening while loading symbols from a core file
4048 * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
4049 to detect whether we're debugging a core file or not.
4051 2009-03-15 Joel Brobecker <brobecker@adacore.com>
4053 Modernize the aix-thread later by getting rid of the base_target
4054 global. This brings back to life the AIX port which was otherwise
4055 crashing all the time.
4057 * aix-thread.c (base_target): Delete.
4058 (pd_enable): Do not set base_target.
4059 (aix_thread_attach): Use find_target_beneath instead of base_target.
4060 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4061 (aix_thread_fetch_registers, aix_thread_store_registers),
4062 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4063 (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
4064 (aix_thread_kill): Delete. Does not seem necessary.
4065 (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
4067 2009-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4069 * stack.c (return_command <retval_exp>): New variables retval_expr
4070 and old_chain. Inline parse_and_eval to initialize retval_expr. Check
4071 RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
4072 if RETURN_TYPE is NULL.
4074 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4076 * remote.c (PACKET_qAttached): New.
4077 (remote_query_attached): New.
4078 (remote_add_inferior): Add new `attached' argument. Handle it.
4079 (remote_notice_new_inferior, remote_start_remote): Adjust to pass
4080 -1 to remote_add_inferior in new parameter.
4081 (extended_remote_attach_1): Adjust to pass 1 to
4082 remote_add_inferior in the new parameter.
4083 (extended_remote_create_inferior_1): Adjust to pass 0 to
4084 remote_add_inferior in the new parameter.
4085 (_initialize_remote): Add "set/show remote query-attached-packet"
4088 2009-03-13 Tom Tromey <tromey@redhat.com>
4090 * symtab.c (lookup_symbol_in_language): Use a cleanup.
4092 2009-03-13 Doug Evans <dje@google.com>
4094 * exceptions.h: Clean up some comments on catch_exceptions usage.
4095 * exceptions.c: Ditto. Plus mark catch_errors as superseded by
4098 2009-02-17 Joel Brobecker <brobecker@adacore.com>
4100 The following patch helps getting rid of a warning inside solib-som.c.
4102 * source.c (source_full_path_of): Constify parameter filename.
4103 * defs.h (source_full_path_of): Update declaration accordingly.
4105 2009-03-12 Joel Brobecker <brobecker@adacore.com>
4107 * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
4108 BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
4109 Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
4111 2009-03-12 Joel Brobecker <brobecker@adacore.com>
4113 * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
4114 promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
4116 2009-03-12 Joel Brobecker <brobecker@adacore.com>
4118 * ada-tasks.c (ada_task_is_alive): Move up and make static.
4119 * ada-lang.h (ada_task_is_alive): Remove declaration.
4121 2009-03-12 Jerome Guitton <guitton@adacore.com>
4123 * ada-lang.c (ada_delta): Change the type of numerators and
4124 denominators to DOUBLEST, as they may not fit into a long.
4125 (scaling_factor): Ditto.
4127 2009-03-12 Jerome Guitton <guitton@adacore.com>
4129 * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
4131 2009-03-12 Joel Brobecker <brobecker@adacore.com>
4133 * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
4134 types, if we are unable to determine the actual symbol type
4135 from its tag, then use the static approximation instead.
4137 2009-03-12 Joel Brobecker <brobecker@adacore.com>
4139 Fix crash printing packed record with packed array.
4141 * ada-lang.c (ada_modulus_from_name): New function.
4142 (ada_modulus): In the case where the type length is bigger than
4143 the size of the type used to hold the bounds, try determining
4144 the modulus from the type name.
4145 (ada_value_primitive_packed_val): Fix bug in the computation of
4146 ntarg causing an out-of-buffer invalid access.
4148 2009-03-12 Joel Brobecker <brobecker@adacore.com>
4150 Fix segfault when printing short_integer'last.
4152 * ada-lang.c (ada_find_any_type): Search in the primitive types
4153 if a symbol could not be found.
4155 2009-03-12 Joel Brobecker <brobecker@adacore.com>
4157 * ada-tasks.c (task_states,long_task_states): Add new states
4158 Activating and Acceptor_Delay_Sleep. Update the description
4159 of state Acceptor_Sleep.
4161 2009-03-12 Jonas Maebe <jonas.maebe@elis.ugent.be> (obvious change)
4163 Fix a build failure on Darwin following some changes in
4164 the profile of some target_ops methods.
4166 * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
4168 (darwin_stop_inferior, darwin_detach): Likewise.
4170 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
4172 Include token in ^running notification for CLI commands.
4174 * mi/mi-main.c (mi_execute_command): Set current_token here.
4175 (mi_cmd_execute): Do not set current_token here.
4177 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
4181 * mi/mi-main.c (mi_print_timing_maybe): New.
4182 (captured_mi_execute_command): Simplify. Output timings to
4184 (mi_execute_async_cli_command): Do not print timings.
4185 * mi/mi-main.h (mi_print_timing_maybe): Declare.
4186 * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
4188 2009-03-12 Jerome Guitton <guitton@adacore.com>
4190 * xcoffread.c (process_linenos): Check if the line in the
4191 include table refers to the main source file and, if so,
4192 add them to the main subfile.
4194 2009-03-12 Joel Brobecker <brobecker@adacore.com>
4196 Fix a build failure on AIX introduced after a change in the profile
4197 of some of the "methods" in the target_ops structure.
4198 * aix-thread.c: Add missing target_ops parameter throughout.
4200 Implement Ada task switching on AIX.
4201 * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
4202 (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
4204 2009-03-11 Daniel Jacobowitz <dan@codesourcery.com>
4206 * breakpoint.c (bpstat_check_breakpoint_conditions): Use
4207 value_mark and value_free_to_mark.
4208 * objfiles.c (free_objfile): Call objfile_free_data before
4211 2009-03-10 Hui Zhu <teawater@gmail.com>
4213 * disasm.c (gdb_disassembly): Remove unused argument
4215 * disasm.h (gdb_disassembly): Ditto.
4216 * cli/cli-cmds.c (print_disassembly): Ditto.
4217 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
4219 2009-03-09 Paul Pluzhnikov <ppluzhnikov@google.com>
4221 * solib.c (solib_contains_address_p): New function.
4222 (solib_name_from_address): Use it.
4223 * printcmd.c (display_uses_solib_p): Use it.
4224 * solib.h (solib_contains_address_p): Declare it.
4226 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4228 * varobj.c (free_variable): Call value_free.
4230 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4233 * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
4234 Move the variable `macinfo_type' out of the loop. Create a new
4235 processing pass before the current one to pre-create `current_file'.
4236 New complaint on misplaced zero/non-zero definitions/includes.
4237 Skip first DW_MACINFO_start_file with `at_commandline' set.
4239 2008-03-09 Vladimir Prus <vladimir@codesourcery.com>
4241 * solib.c (reload_shared_libraries): Give
4242 inferior a chance to reset solib breakpoint.
4245 2009-03-08 Christopher Faylor <me+cygwin@cgf.cx>
4247 * windows-nat.c (dr): Redefine to use largest possible integer which
4249 (cygwin_set_dr): Avoid coercion.
4251 2009-03-08 Oswald Buddenhagen <oswald.buddenhagen@trolltech.de>
4253 * windows-nat.c (windows_create_inferior): Implement --tty handling on
4256 2009-03-06 Paul Pluzhnikov <ppluzhnikov@google.com>
4258 Rename solib_address to solib_name_from_address.
4259 * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
4260 (disable_breakpoints_in_unloaded_shlib): Update.
4261 * printcmd.c (display_uses_solib_p): Likewise.
4262 * stack.c (print_frame): Likewise.
4266 2009-03-05 Paul Pluzhnikov <ppluzhnikov@google.com>
4268 * printcmd.c (do_one_display): Reparse exp_string.
4269 (display_uses_solib_p): New function.
4270 (clear_dangling_display_expressions): New function.
4271 (_initialize_printcmd): Add observer.
4272 * solib.c (no_shared_libraries): Swap order of calls to
4273 clear_solib and objfile_purge_solibs.
4275 2009-03-05 Joel Brobecker <brobecker@adacore.com>
4277 Implement the target-specific part of Ada tasking support
4280 * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
4281 (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
4283 2009-03-05 Joel Brobecker <brobecker@adacore.com>
4285 Get rid of the global "base_target" and use "find_target_beneath"
4286 to find the underlying target.
4287 * dec-thread.c (base_target): Delete.
4288 (enable_dec_thread): Remove assignement to base_target.
4289 (dec_thread_detach, dec_thread_wait, dec_thread_wait)
4290 (dec_thread_fetch_registers, dec_thread_store_registers)
4291 (dec_thread_mourn_inferior, dec_thread_pid_to_str):
4292 Update the function profile if necessary.
4293 Use find_target_beneath to call the same method but from
4294 the underlying target, removing the need for "base_target".
4296 * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
4297 Fix a copy/paste error in a few debug traces...
4299 * solib-osf.c (init_so): Use a simpler method for computing
4300 the size of lm_info structure. This also gets rid of warning
4301 emitted by the compiler.
4303 2009-03-05 Pedro Alves <pedro@codesourcery.com>
4305 * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
4306 duplicates of permanent breakpoints.
4308 2009-03-04 Pedro Alves <pedro@codesourcery.com>
4310 * inferior.h (notice_new_inferior): Declare.
4311 * infcmd.c (notice_new_inferior): New.
4312 * remote.c (remote_add_inferior, remote_add_thread): New.
4313 (notice_new_inferiors): Rename to...
4314 (remote_notice_new_inferior): ... this. Add RUNNING argument.
4315 Use remote_add_thread instead of add_thread, passing it the
4316 RUNNING argument. Add an inferior with remote_add_inferior. If
4317 we just learned about an inferior, call notice_new_inferior.
4318 (record_currthread): Adjust.
4319 (remote_threads_info): Adjust to use remote_notice_new_inferior.
4320 (remote_start_remote, extended_remote_attach_1): Use
4321 remote_add_inferior.
4322 (process_stop_reply): Adjust. Call remote_notice_new_inferior
4323 after handling expedited registers and watchpoint state.
4324 (extended_remote_create_inferior_1): Use remote_add_inferior.
4326 2009-03-04 Aleksandar Ristovski <aristovski@qnx.com>
4328 * infcmd.c (registers_info): Remove register number case.
4330 2009-03-03 Pedro Alves <pedro@codesourcery.com>
4332 * top.c (quit_target): Check for target_has_execution before
4333 killing or detaching from inferiors.
4335 2009-03-02 Joel Brobecker <brobecker@adacore.com>
4337 Remove some unused routines.
4339 * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
4341 * ada-lang.c (ada_task_list_iterator_ftype)
4342 (iterate_over_live_ada_tasks): Delete.
4343 * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
4346 2009-03-01 Doug Evans <dje@google.com>
4348 * symtab.c: Remove trailing whitespace throughout the file.
4349 (expand_line_sal): Fix some typos and whitespace.
4351 * Makefile.in (clean): rm -f $(DEPDIR)/*.
4353 * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
4354 (init.c): signals/ -> common/.
4355 (signals.o): Update.
4356 * target.h (target_signal_to_string,target_signal_to_string)
4357 (target_signal_from_name,target_signal_to_host_p)
4358 (target_signal_from_host,target_signal_to_host): Move to ...
4359 * common/gdb_signals.h: ... here. New file.
4360 * common/signals.c: Moved here from signals/signals.c.
4361 #include gdb_signals.h, remove #include of target.h in gdb case.
4362 (target_signal_from_command,default_target_signal_to_host)
4363 (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
4365 Include thread ID in target_wait debugging output.
4366 * infrun.c (print_target_wait_results): New function.
4367 (wait_for_inferior,fetch_inferior_event): Call it.
4369 2009-02-27 Pedro Alves <pedro@codesourcery.com>
4371 * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
4372 with a ptid_t field.
4373 * linux-thread-db.c (thread_get_info_callback): Build the ptid
4374 using the pid stored in proc_handle.ptid.
4375 (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
4376 (check_for_thread_db, thread_db_detach, check_event)
4377 (thread_db_mourn_inferior, find_new_threads_callback)
4378 (thread_db_find_new_threads_1): Adjust.
4379 * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
4380 (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
4382 2009-02-27 Phil Muldoon <pmuldoon@redhat.com>
4384 * valprint.c (read_string): Rework clean-up logic. Use
4385 free_current_contents to clean-up buffer.
4387 2009-02-27 Andreas Schwab <schwab@linux-m68k.org>
4389 * MAINTAINERS: Update e-mail address.
4391 2009-02-26 Phil Muldoon <pmuldoon@redhat.com>
4393 * python/python-utils.c (python_string_to_unicode): Always return
4395 (python_string_to_target_string): Decrement transient python
4397 (python_string_to_host_string): Likewise.
4399 2007-02-26 Pedro Alves <pedro@codesourcery.com>
4401 * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
4402 call to super_fetch_registers.
4403 (mips64_linux_store_registers): Pass `ops' to call to
4404 super_store_registers.
4406 2009-02-25 Doug Evans <dje@google.com>
4408 * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
4411 * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
4412 disabled_shlib_breaks, unused.
4414 * printcmd.c (build_address_symbolic): Fix comment.
4416 2009-02-25 Hui Zhu <teawater@gmail.com>
4418 * cli/cli-script.c (define_command): Add _() to query.
4419 * gnu-nat.c (inf_validate_task_sc): Ditto.
4420 * infcmd.c (kill_if_already_running): Ditto.
4421 (jump_command): Ditto.
4422 (attach_command): Ditto.
4423 * inflow.c (kill_command): Ditto.
4424 * infrun.c (handle_command): Ditto.
4425 * maint.c (maintenance_dump_me): Ditto.
4426 * memattr.c (mem_delete_command): Ditto.
4427 * monitor.c (monitor_interrupt_query): Ditto.
4428 * nto-procfs.c (interrupt_query): Ditto.
4429 * printcmd.c (undisplay_command): Ditto.
4430 * remote-mips.c (mips_kill): Ditto.
4431 * remote.c (interrupt_query): Ditto.
4432 * solib-irix.c (irix_open_symbol_file_object): Ditto.
4433 * solib-osf.c (osf_open_symbol_file_object): Ditto.
4434 * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
4435 * solib-som.c (som_open_symbol_file_object): Ditto.
4436 * solib-svr4.c (open_symbol_file_object): Ditto.
4437 * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
4438 * target.c (kill_or_be_killed): Ditto.
4439 * tracepoint.c (delete_trace_command): Ditto.
4440 * top.c (quit_confirm): Add _() to s that will be used
4443 2009-02-24 Pierre Muller <muller@ics.u-strasbg.fr>
4445 Fix windows-nat.c compilation failure.
4447 * windows-nat.c (windows_thread_alive): Fix forward declaration.
4448 (get_windows_debug_event): Add ops parameter to call to windows_resume.
4450 2009-02-23 Pedro Alves <pedro@codesourcery.com>
4452 * remote-sim.c (gdbsim_resume): Add target_ops* argument.
4454 2009-02-23 Jay Krell <jay.krell@cornell.edu> (tiny change)
4456 * symtab.c (find_line_symtab): Initialize exact to avoid
4459 2009-02-23 Pedro Alves <pedro@codesourcery.com>
4461 * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
4462 `ops' to recursive call.
4464 2009-02-23 Pedro Alves <pedro@codesourcery.com>
4466 * corelow.c (get_core_registers): Adjust.
4467 (core_file_thread_alive): Rename to...
4468 (core_thread_alive): ... this.
4469 (core_pid_to_str): Try gdbarch_core_pid_to_str first.
4470 (init_core_ops): Adjust.
4471 (coreops_suppress_target): Delete.
4472 (_initialize_corelow): Unconditionally add core_ops.
4473 * procfs.c: Include "inf-child.h".
4474 (procfs_ops): Delete.
4475 (init_procfs_ops): Delete. Reimplement as...
4476 (procfs_target): ... this, inheriting from inf-child.
4477 (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
4478 (procfs_prepare_to_store): Delete.
4479 (procfs_store_registers, procfs_resume): Adjust.
4480 (procfs_open): Delete.
4481 (procfs_suppress_run): Delete.
4482 (procfs_can_run): Delete.
4483 (procfs_mourn_inferior): Adjust.
4484 (procfs_init_inferior): Add target_ops parameter. Adjust.
4485 (procfs_create_inferior): Don't pass procfs_init_inferior to
4486 fork_inferior. Instead call it after fork_inferior returns.
4487 (procfs_find_new_threads): Adjust.
4488 (_initialize_procfs): Adjust to use procfs_target instead of
4490 * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
4491 (lwp_to_thread): Use target_thread_alive.
4492 (sol_thread_open): Delete.
4493 (sol_thread_attach): Delete.
4494 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4495 (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
4496 to use find_target_beneath.
4497 (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
4498 (sol_thread_xfer_partial): Adjust to use find_target_beneath.
4499 (sol_thread_files_info, sol_thread_kill_inferior): Delete.
4500 (check_for_thread_db): New.
4501 (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
4502 (sol_thread_new_objfile): Call check_for_thread_db.
4503 (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
4504 (sol_thread_can_run): Delete.
4505 (sol_thread_alive): Adjust to use find_target_beneath.
4506 (sol_thread_stop): Delete.
4507 (rw_common): Use target_write_memory or target_read_memory.
4508 (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
4509 (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
4510 (solaris_pid_to_str): Remove check for libthread_db initialization
4512 (sol_find_new_threads): Remove check for libthread_db
4513 initialization failing, or for an invalid inferior_ptid. Adjust
4514 to use find_target_beneath.
4515 (sol_core_open, sol_core_close, sol_core_detach,
4516 sol_core_files_info, sol_find_memory_regions,
4517 sol_make_note_section, ignore): Delete.
4518 (init_sol_thread_ops): Make it a thread_stratum target. Remove
4519 unneeded callback settings.
4520 (init_sol_core_ops): Delete.
4521 (_initialize_sol_thread): No longer call init_sol_core_ops, set
4522 procfs_suppress_run, or hack with core_ops.
4524 * target.h (struct target_ops): Add a target_ops * parameter to
4525 to_resume, to_fetch_registers, to_store_registers, to_thread_alive
4526 and to_find_new_threads.
4527 (target_fetch_registers, target_store_registers)
4528 (target_thread_alive, target_find_new_threads): Redeclare as
4531 * target.c (update_current_target): Do not inherit or de_fault
4532 to_resume, to_fetch_registers, to_store_registers,
4533 to_thread_alive, to_find_new_threads.
4534 (target_resume): Adjust.
4535 (target_thread_alive, target_find_new_threads): New.
4536 (debug_to_resume, debug_to_fetch_registers): Delete.
4537 (target_fetch_registers): New.
4538 (debug_to_store_registers): Delete.
4539 (target_store_registers): New.
4540 (debug_to_thread_alive, debug_to_find_new_threads): Delete.
4541 (setup_target_debug): Adjust.
4543 * gdbcore.h (core_ops): Delete declaration.
4545 * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
4546 inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
4547 i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
4548 hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
4549 nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
4550 alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
4551 bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
4552 hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
4553 ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
4554 m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
4555 mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
4556 ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
4557 shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
4558 vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
4560 * gdbarch.sh (core_pid_to_str): New gdbarch callback.
4561 * gdbarch.h, gdbarch.c: Regenerate.
4563 * sol2-tdep.c: Include "inferior.h".
4564 (sol2_core_pid_to_str): New.
4565 * sol2-tdep.h (sol2_core_pid_to_str): Declare.
4567 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
4568 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
4569 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
4570 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
4572 2009-02-22 Doug Evans <dje@google.com>
4574 * exec.c (exec_file_attach): Fix comment.
4576 2009-02-22 Pedro Alves <pedro@codesourcery.com>
4578 Silence a few -Wmissing-prototypes warnings.
4581 * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
4583 * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
4584 * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
4585 * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
4586 (_initialize_amd64nbsd_tdep): ... this.
4587 * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
4588 (_initialize_arm_linux_tdep): Declare.
4589 * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
4590 * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
4591 * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
4592 * avr-tdep.c (avr_return_value): Make it static.
4593 (avr_frame_unwind_cache): Ditto.
4594 * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
4595 (bsd_uthread_solib_loaded): Ditto.
4596 (bsd_uthread_solib_unloaded): Ditto.
4597 (bsd_uthread_target): Ditto.
4598 (_initialize_bsd_uthread): Declare.
4599 * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
4600 (cris_frame_unwind_cache): Ditto.
4601 * frv-tdep.c (frv_return_value): Ditto.
4602 * h8300-tdep.c (h8300_use_struct_convention): Ditto.
4603 (h8300h_use_struct_convention): Ditto.
4604 * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
4606 * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
4608 * hppabsd-tdep.c: Include hppabsd-tdep.h.
4609 (hppabsd_find_global_pointer): Make it static.
4610 * hppabsd-tdep.h: New.
4611 * hppanbsd-tdep.c: Include hppabsd-tdep.h.
4612 (hppabsd_init_abi): Remove declaration.
4613 (_initialize_hppabsd_tdep): Remove declaration.
4614 (_initialize_hppanbsd_tdep): Declare.
4615 * hppaobsd-tdep.c: Include hppabsd-tdep.h.
4616 (hppabsd_init_abi): Delete declaration.
4617 (hppaobsd_init_abi): Make it static.
4618 * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
4619 * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
4620 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
4621 * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
4622 * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
4623 * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
4624 (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
4625 (_initialize_m32c_tdep): Declare.
4626 * m32r-rom.c (_initialize_m32r_rom): Declare.
4627 * m32r-tdep.c (m32r_skip_prologue): Make it static.
4628 (m32r_return_value): Ditto.
4629 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
4630 (m68hc11_return_value): Ditto.
4631 * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
4632 * m88k-tdep.c (m88k_frame_cache): Make it static.
4633 * mep-tdep.c (mep_gdb_print_insn): Ditto.
4634 (mep_return_value): Ditto.
4635 (_initialize_mep_tdep): Declare.
4636 * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
4637 * mips-linux-tdep.c (supply_64bit_reg): Make it static.
4638 (mips_linux_syscall_next_pc): Ditto.
4639 (_initialize_mips_linux_tdep): Declare.
4640 * mips-tdep.c (mips_single_step_through_delay): Make it static.
4641 * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
4642 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
4643 * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
4644 * mt-tdep.c (_initialize_mt_tdep): Declare.
4645 * nbsd-tdep.c: Include nbsd-tdep.h.
4646 * nto-tdep.c (find_load_phdr): Make it static.
4647 (_initialize_nto_tdep): Declare.
4648 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
4650 (_initialize_ppc_linux_tdep): Declare.
4651 * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
4652 (m32r_insert_watchpoint, m32r_remove_watchpoint)
4653 (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
4655 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
4656 * rs6000-nat.c: Include xcoffread.h.
4657 (find_toc_address): Don't extern declare get_toc_offset. Adjust
4658 to call xcoff_get_to_offset.
4659 * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
4660 (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
4661 (rs6000_skip_trampoline_code): Make static.
4662 * s390-tdep.c (s390_regset_from_core_section): Ditto.
4663 * sh-tdep.c (sh_register_reggroup_p): Ditto.
4664 * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
4665 (_initialize_shnbsd_tdep): Declare.
4666 * solib-frv.c (displacement_from_map): Make static.
4667 (_initialize_frv_solib): Declare.
4668 * solib-irix.c (fetch_lm_info): Make static.
4669 (_initialize_irix_solib): Declare.
4670 * solib-som.c: Include solib-som.h.
4671 (som_solib_select): Line break.
4672 * sparc-tdep.c (sparc_regset_from_core_section): Make static.
4673 * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
4674 (_initialize_sparcnbsd_tdep): ... this.
4675 * spu-tdep.c (spu_software_single_step): Make it static.
4676 (_initialize_spu_tdep): Declare.
4677 * vax-tdep.c (vax_frame_cache): Make it static.
4678 * xcoffread.c: Include xcoffread.h.
4679 (get_toc_offset): Rename to ...
4680 (xcoff_get_toc_offset): ... this.
4681 (_initialize_xcoffread): Declare.
4683 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
4684 * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
4686 (_initialize_xtensa_tdep): Declare.
4688 2008-02-21 Pedro Alves <pedro@codesorcery.com>
4690 Silence a few -Wmissing-prototypes warnings.
4693 * amd64-nat.c: Include "amd64-nat.h".
4694 * fork-child.c (_initialize_fork_child): Ditto.
4695 * gcore.c (_initialize_gcore): Ditto.
4696 * inf-ptrace.c: Include "inf-ptrace.h".
4697 (inf_ptrace_store_registers): Make it static.
4698 * linux-nat.c (linux_nat_terminal_ours): Make it static.
4699 (_initialize_linux_nat): Declare before definition.
4700 * linux-tdep.c: Include "linux-tdep.h".
4701 * linux-thread-db.c (_initialize_thread_db): Declare before
4703 * proc-service.c (_initialize_proc_service): Ditto.
4704 * remote.c (remote_send_printf): Make it static.
4705 * solib.c: Include "solib.h".
4706 * symfile-mem.c (_initialize_symfile_mem): Declare before
4708 * ada-lang.c (ada_la_decode, ada_match_name)
4709 (ada_suppress_symbol_printing, ada_is_array_type)
4710 (ada_value_ptr_subscript, ada_array_length)
4711 (ada_to_static_fixed_value): Make them static.
4712 (_initialize_ada_language): Declare before definition.
4713 * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
4714 (ada_task_list_changed, ada_new_objfile_observer): Make them
4716 (_initialize_tasks): Declare before definition.
4717 * addrmap.c (_initialize_addrmap): Declare before definition.
4718 * auxv.c (default_auxv_parse): Make it static.
4719 * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
4721 * breakpoint.c (remove_sal): Add line break.
4722 (expand_line_sal_maybe): Make it static.
4723 * cp-name-parser.y: Include "cp-support.h".
4724 * cp-valprint.c (cp_find_class_member): Make it static.
4725 * eval.c (value_f90_subarray): Ditto.
4726 * exceptions.c (print_any_exception): Ditto.
4727 * findcmd.c (_initialize_mem_search): Declare before definition.
4728 * frame.c (frame_observer_target_changed): Make it static.
4729 * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
4730 * inf-child.c: Include "inf-child.h".
4731 * inferior.h (valid_inferior_id): Rename to ...
4732 (valid_gdb_inferior_id): ... this.
4733 * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
4735 * jv-lang.c (java_language_arch_info): Make it static.
4736 * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
4737 * osdata.c (info_osdata_command): Make it static.
4738 * regcache.c (regcache_observer_target_changed): Make it static.
4739 * reverse.c (_initialize_reverse): Declare before definition.
4740 * stabsread.c (cleanup_undefined_types_noname)
4741 (cleanup_undefined_types_1): Make them static.
4742 * symfile.c (place_section): Make it static.
4743 * symtab.c (find_pc_sect_psymtab_closer): Make it static.
4744 * target-descriptions.c (_initialize_target_descriptions): Declare
4746 * target.c (default_get_ada_task_ptid, find_default_can_async_p)
4747 (find_default_is_async_p, find_default_supports_non_stop): Make
4749 (target_supports_non_stop): Add prototype.
4750 (dummy_pid_to_str): Make it static.
4751 * utils.c (_initialize_utils): Declare before definition.
4752 * ada-exp.y (_initialize_ada_exp): Declare before definition.
4753 * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
4754 * target.h (struct target_ops): Add a prototype to the
4755 to_can_execute_reverse callback.
4756 * macroscope.c (_initialize_macroscope): Declare before definition.
4757 * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
4758 * python/python.c (_initialize_python): Declare before definition.
4759 * tui/tui-command.c: Include "tui/tui-command.h".
4760 * tui/tui-data.c (init_content_element, init_win_info): Make them
4762 * tui/tui-disasm.c: Include "tui/tui-disasm.h".
4763 * tui/tui-interp.c (_initialize_tui_interp): Declare before
4765 * tui/tui-layout.c: Include "tui/tui-layout.h".
4766 (_initialize_tui_layout): Declare before definition.
4767 * tui/tui-regs.c: Include "tui/tui-regs.h".
4768 (tui_display_reg_element_at_line): Make it static.
4769 (_initialize_tui_regs): Declare before definition.
4770 * tui/tui-stack.c (_initialize_tui_stack): Declare before
4772 * tui/tui-win.c: Include "tui/tui-win.h".
4773 (_initialize_tui_win): Declare before definition.
4774 (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
4775 * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
4776 (tui_get_cmd_list): Add a prototype.
4777 * tui/tui-windata.c: Include tui-windata.h.
4778 * tui/tui-wingeneral.c (box_win): Make it static.
4779 * cli/cli-logging.c (show_logging_command): Make it static.
4780 (_initialize_cli_logging): Declare before definition.
4781 * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
4784 2009-02-20 Pierre Muller <muller@ics.u-strasbg.fr>
4786 Extend use of i386_use_watchpoints to all i386 native files
4787 using hardware watchpoints.
4788 * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
4789 * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
4790 * windows-nat.c (init_windows_ops): Ditto.
4791 * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
4792 * config/i386/nm-cygwin64.h: Ditto.
4793 * config/i386/nm-fbsd.h: Ditto.
4794 * config/i386/nm-go32.h: Ditto.
4796 2009-02-19 Joel Brobecker <brobecker@adacore.com>
4798 * ada-typeprint.c (ada_typedef_print): Remove. Unused.
4800 2009-02-18 Vladimir Prus <vladimir@codesourcery.com>
4802 * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
4803 (mi_interpreter_init): Register the above.
4804 * solib.c (clear_solib): Notify solib unload.
4805 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
4806 disable breakpoints on a.out targets.
4808 2009-02-17 Vladimir Prus <vladimir@codesourcery.com>
4810 * observer.c (observer_test_first_notification_function)
4811 (observer_test_second_notification_function)
4812 (observer_test_third_notification_function): Adjust prototype.
4814 2009-02-17 Pedro Alves <pedro@codesourcery.com>
4816 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
4817 (ALL_TARGET_OBS): Add dicos-tdep.o.
4818 (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
4819 * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
4821 (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
4823 * dicos-tdep.h, dicos-tdep.c: New.
4824 * amd64-dicos-tdep.c: New.
4825 * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
4826 inferior.h. Include dicos-tdep.h.
4827 (i386_dicos_init_abi): Call dicos_init_abi.
4828 (i386_dicos_bfd_has_symbol_p): Delete.
4829 (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
4831 * NEWS: Mention x86-64 DICOS target support.
4833 2009-02-16 Doug Evans <dje@google.com>
4835 * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
4836 All callers updated.
4837 (amd64_get_insn_details): Handle more 3-byte opcode insns.
4838 (amd64_breakpoint_p): Delete.
4839 (amd64_displaced_step_fixup): When fixing up after stepping an int3,
4840 don't back up pc to the start of the int3.
4841 * i386-tdep.c: #include opcode/i386.h.
4842 (i386_skip_prefixes): New function.
4843 (i386_absolute_jmp_p): Constify argument.
4844 (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
4845 (i386_breakpoint_p): Delete.
4846 (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
4847 When fixing up after stepping an int3, don't back up pc to the start
4850 2009-02-16 Pedro Alves <pedro@codesourcery.com>
4852 * corelow.c (core_close): Don't hardcode the core's pid.
4853 (core_open): Find core threads before calling
4854 post_create_inferior.
4855 (add_to_thread_list, get_core_register_section): Take into account
4856 systems where the regset section names encode the pid of the
4859 * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
4860 * gdbarch.h, gdbarch.c: Regenerate.
4862 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
4863 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
4864 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
4865 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
4867 2009-02-14 Vladimir Prus <vladimir@codesourcery.com>
4869 Include frame information for *stopped due to CLI commands.
4871 * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
4872 * infcmd.c (finish_command_continuation): Pass '1' for
4873 'print_frame' parameter to the observer.
4874 * infrun.c (normal_stop): Don't print mi-specific information
4875 here. Pass 'stop_print_frame' to the 'print_frame' parameter
4877 * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
4878 If we need to print frame, and current uiout is not the MI one,
4881 2009-02-13 Pierre Muller <muller@ics.u-strasbg.fr>
4883 * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
4884 Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
4886 2009-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4889 * dwarf2read.c (process_die <DW_TAG_module>, read_module)
4890 (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
4892 2009-02-11 Pierre Muller <muller@ics.u-strasbg.fr>
4894 * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
4895 for DW_ATE_signed_char and DW_ATE_unsigned_char
4896 for pascal language.
4898 2009-02-11 Jim Meyering <meyering@redhat.com>
4899 Jan Kratochvil <jan.kratochvil@redhat.com>
4901 Avoid NULL dereference.
4902 * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
4903 New variable func_type.
4905 2009-02-11 Pedro Alves <pedro@codesourcery.com>
4907 * gdbarch.c: Regenerate.
4909 2009-02-10 Pierre Muller <muller@ics.u-strasbg.fr>
4911 * p-lang.c (is_pascal_string_type): Fix comment.
4912 Determine exact size of char elements for GPC
4914 (pascal_printstr): Handle char width of 2 or 4.
4915 * p-valprint.c (pascal_val_print): Handle char
4918 2009-02-07 Daniel Jacobowitz <dan@codesourcery.com>
4920 * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
4921 inside the loop. Only call addrmap_set_empty if the compilation unit
4922 had DW_AT_high_pc and DW_AT_low_pc. Update call to
4923 scan_partial_symbols.
4924 (scan_partial_symbols): Take NEED_PC argument and pass it along with
4926 (add_partial_namespace): Take NEED_PC argument and pass it through.
4927 (add_partial_subprogram): Take NEED_PC argument. Update the addrmap
4930 2009-02-07 Pedro Alves <pedro@codesourcery.com>
4932 * NEWS: Mention inspecting extra signal information, $_siginfo,
4933 and the qXfer:siginfo:read and qXfer:siginfo:write packets.
4935 2009-02-07 Pedro Alves <pedro@codesourcery.com>
4937 * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
4940 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4942 * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
4943 (compat_timer_t, compat_clock_t, struct compat_timeval)
4944 (compat_sigval_t, compat_siginfo_t): New types.
4945 (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
4946 (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
4947 (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
4948 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4949 (amd64_linux_siginfo_fixup): New.
4950 * linux-nat.c (linux_nat_siginfo_fixup): New.
4951 (siginfo_fixup): New.
4952 (linux_xfer_siginfo): Use siginfo_fixup to convert between the
4953 siginfo layout expected by ptrace and the siginfo layout of the
4955 (linux_nat_set_siginfo_fixup): New.
4956 * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
4958 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4960 * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
4961 * infrun.c (siginfo_value_read, siginfo_value_write): New.
4962 (siginfo_value_funcs): New.
4963 (siginfo_make_value): New.
4964 (_initialize_infrun): Create the $_siginfo convenience variable.
4965 * gdbtypes.h (append_composite_type_field_aligned): Declare.
4966 * gdbtypes.c (append_composite_type_field): Rename to...
4967 (append_composite_type_field_aligned): ... this. Add ALIGNMENT
4968 argument. Handle it.
4969 (append_composite_type_field): Rewrite on top of
4970 append_composite_type_field_aligned.
4971 * value.h (internalvar_make_value): New typedef.
4972 (struct internalvar) <make_value>: New field.
4973 (create_internalvar_type_lazy): Declare.
4974 * value.c (create_internalvar): Clear make_value.
4975 (create_internalvar_type_lazy): New.
4976 (value_of_internalvar): If make_value is set use it.
4977 (preserve_values): Skip internal variables that don't have a
4979 * gdbarch.sh (get_siginfo_type): New.
4980 * gdbarch.h, gdbarch.c: Regenerate.
4982 * linux-tdep.h, linux-tdep.c: New.
4983 * amd64-linux-tdep.c: Include "linux-tdep.h".
4984 (amd64_linux_init_abi): Register linux_get_siginfo_type and
4985 linux_get_siginfo_mapper.
4986 * i386-linux-tdep.c: Include "linux-tdep.h".
4987 (i386_linux_init_abi): Register linux_get_siginfo_type and
4988 linux_get_siginfo_mapper.
4989 * arm-linux-tdep.c: Include "linux-tdep.h".
4990 (i386_linux_init_abi): Register linux_get_siginfo_type and
4991 linux_get_siginfo_mapper.
4993 * linux-nat.c (linux_xfer_siginfo): New.
4994 (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
4995 * remote.c (PACKET_qXfer_siginfo_read)
4996 (PACKET_qXfer_siginfo_write): New.
4997 (feature remote_protocol_features): Add "qXfer:siginfo:read" and
4998 "qXfer:siginfo:write" features.
4999 (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
5000 (_initialize_remote): Add "set/show remote read-siginfo-object"
5001 and "set/show remote write-siginfo-object" commands.
5003 * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
5004 (HFILES_NO_SRCDIR): Add linux-tdep.h.
5005 (ALLDEPFILES): Add linux-tdep.c.
5007 * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
5008 (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
5011 2009-02-06 Jim Blandy <jimb@codesourcery.com>
5012 Daniel Jacobowitz <dan@codesourcery.com>
5013 Vladimir Prus <vladimir@codesourcery.com>
5014 Pedro Alves <pedro@codesourcery.com>
5016 * defs.h (enum lval_type): New value: lval_computed.
5017 * value.h (struct lval_funcs): New type.
5018 (allocate_computed_value, value_computed_funcs)
5019 (value_computed_closure): New declarations.
5020 * value.c (struct value): Add a structure to the location union
5021 for computed lvalues, containing 'funcs' and 'closure' members.
5022 (allocate_computed_value, value_computed_funcs)
5023 (value_computed_closure): New functions.
5024 (value_free): For computed lvalues, call the closure's
5025 'free_closure' function before freeing the value itself.
5026 (value_copy): If we're copying an lval_computed value, call the
5027 closure's 'copy_closure' function.
5028 (set_value_component_location): If the original value is a
5029 computed lvalue, then call the closure's 'copy_closure' function.
5030 (value_of_internalvar): If an internal variable's value is a
5031 computed lvalue, make retrieving its value produce an equivalent
5033 * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
5034 their read function.
5035 (value_assign): Assign to computed lvalues by calling their write
5038 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5040 * linux-nat.c (linux_nat_wait): Adjust.
5041 (linux_nat_pid_to_str): Adjust. Remove call to thread_db_init.
5042 * linux-nat.h (thread_db_init): Delete declaration.
5043 * linux-thread-db.c (target_beneath): Delete.
5044 (thread_db_init): Delete.
5045 (thread_db_detach): Use find_target_beneath.
5046 (thread_db_wait): Adjust interface. Use find_target_beneath.
5047 (thread_db_mourn_inferior): Use find_target_beneath.
5048 (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
5049 (thread_db_async_mask): Delete.
5050 (thread_db_pid_to_str): Adjust interface. Use
5051 find_target_beneath.
5052 (thread_db_get_thread_local_address): Adjust interface. Use
5053 find_target_beneath.
5054 (init_thread_db_ops): Delete references to delete functions.
5055 * target.c (update_current_target): Don't inherit or default
5056 to_wait. Don't inherit to_pid_to_str and
5057 to_get_thread_local_address.
5058 (target_translate_tls_address): Look for a pushed target that
5059 implements to_get_thread_local_address, and use it instead of
5060 checking for target_get_thread_local_address_p.
5061 (target_wait, target_pid_to_str): Reimplement as functions.
5062 (dummy_pid_to_str): New.
5063 (init_dummy_target): Register it.
5064 (debug_to_wait): Delete.
5065 * target.h (struct target_ops): Make to_wait, to_pid_to_str and
5066 to_get_thread_local_address accept a pointer to struct target_ops.
5067 (target_wait): Delete macro, and declare as function.
5068 (target_pid_to_str): Likewise.
5069 (target_get_thread_local_address)
5070 (target_get_thread_local_address_p): Delete.
5071 (noprocess): Add NORETURN and ATTR_NORETURN tags.
5072 * inf-ptrace.c (inf_ptrace_wait): Adjust.
5073 (inf_ptrace_pid_to_str): New.
5074 (inf_ptrace_target): Use inf_ptrace_pid_to_str.
5075 * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
5076 * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
5077 * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
5079 * corelow.c (core_pid_to_str): Adjust.
5080 * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
5081 * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
5082 * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
5083 * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
5084 * hpux-thread.c (hpux_thread_wait): Adjust.
5085 * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
5086 * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
5087 * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
5088 * procfs.c (procfs_pid_to_str): Adjust.
5089 * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
5090 * remote-mips.c (mips_wait): Adjust.
5091 * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
5092 * remote.c (remote_wait, remote_pid_to_str)
5093 (remote_get_thread_local_address): Adjust.
5094 * rs6000-nat.c (rs6000_wait): Adjust.
5095 * sol-thread.c (procfs_pid_to_str): Adjust declaration.
5096 (sol_thread_wait, solaris_pid_to_str): Adjust.
5097 * spu-linux-nat.c (spu_child_wait): Adjust.
5098 * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
5100 2009-02-06 Tom Tromey <tromey@redhat.com>
5102 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
5103 (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
5104 (python-cmd.o): New target.
5105 * cli/cli-decode.c (set_cmd_completer): Add self parameter to
5106 completer prototype.
5107 (add_cmd): Initialize destroyer member of cmd_list_element. Use
5108 make_symbol_completion_list_fn as completer.
5109 (delete_cmd): Call destroyer if one is set.
5110 * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
5111 completer member. Add destroyer member.
5112 (set_cmd_completer): Add self parameter to
5113 completer prototype.
5114 * command.h (set_cmd_completer): Add cmd parameter to
5115 completer prototype.
5116 * completer.c (noop_completer, filename_completer,
5117 location_completer, expression_completer, command_completer): Adapt
5118 to new completer prototype.
5119 (complete_line_internal): Pass new parameter to completer function.
5120 * completer.h (noop_completer, filename_completer,
5121 location_completer, expression_completer, command_completer): Adapt
5122 prototypes to new completer prototype.
5123 * interps.c (interpreter_completer): Adapt to new completer
5125 * python/python-cmd.c: New file.
5126 * python/python-internal.h (gdbpy_initialize_commands): Add
5128 (gdbpy_doc_cst): Add forward declaration.
5129 * python/python.c (gdbpy_doc_cst): Declare.
5130 (_initialize_python): Call gdbpy_initialize_commands. Initialize
5132 * symtab.c (make_symbol_completion_list_fn): New function.
5133 * symtab.h (make_symbol_completion_list_fn): Add prototype.
5135 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5137 * target.c (target_get_osdata): Check for equal or higher than
5138 process_stratum, not dummy_stratum.
5140 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5142 * remote.c (extended_remote_can_run): Delete.
5143 (init_remote_ops): Don't register it.
5144 * target.c (target_get_osdata): Don't check for target_can_run.
5145 Instead any target that has already been pushed, otherwise
5146 fallback to the default run target.
5148 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5150 * target.c (target_create_inferior, target_detach)
5151 (target_mourn_inferior, target_attach, target_close): Do target
5153 (debug_to_attach, debug_to_detach, debug_to_create_inferior)
5154 (debug_to_mourn_inferior, debug_to_close): Delete.
5155 (setup_target_debug): Adjust.
5157 2009-02-05 Pedro Alves <pedro@codesourcery.com>
5159 * target.h (target_stopped_data_address_p): Delete declaration,
5160 and don't define as macro.
5161 * target.c (target_stopped_data_address_p): Delete.
5163 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
5164 Tom Tromey <tromey@redhat.com>
5166 * python/python-utils.c (target_string_to_unicode): New function.
5167 * python/python-internal.h (target_string_to_unicode): New prototype.
5168 * python/python-value.c (valpy_string): New function.
5169 (value_object_methods): Add `string' entry.
5171 2009-02-05 Pedro Alves <pedro@codesourcery.com>
5173 * target.h (target_tid_to_str): Delete.
5174 * thread.c (print_thread_info, thread_apply_all_command)
5175 (thread_apply_command, thread_command, do_captured_thread_select):
5176 Use target_pid_to_str instead of target_tid_to_str.
5177 * linux-fork.c (delete_fork_command): Likewise.
5179 2009-02-05 Pedro Alves <pedro@codesourcery.com>
5181 * frame.c (has_stack_frames): Make public.
5182 (get_prev_frame): Don't allow a NULL this_frame anymore.
5183 * frame.h (has_stack_frames): Declare.
5184 * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
5185 to get_prev_frame, instead start at get_current_frame.
5186 (varobj_create): Check has_stack_frames before getting any frame;
5187 eliminate one usage of deprecated_safe_get_selected_frame.
5189 2009-02-05 Tom Tromey <tromey@redhat.com>
5190 Thiago Jung Bauermann <bauerman@br.ibm.com>
5192 * python/python.c (GdbMethods): Move to bottom of file.
5193 (get_parameter, execute_gdb_command, gdbpy_write,
5194 gdbpy_flush): Remove forward declarations.
5195 (eval_python_from_control_command): Fix error checking of function
5196 PyRun_SimpleString. Fix error string.
5197 (python_command): Likewise.
5198 (execute_gdb_command): Added from_tty argument.
5200 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
5202 * language.h (language_dfn): Add la_get_string member.
5203 (LA_GET_STRING): New macro.
5204 (default_get_string): New prototype.
5205 * language.c (default_get_string): New function.
5206 (unknown_language_defn, auto_language_defn, local_language_defn): Use
5207 default_get_string for la_get_string.
5208 * c-lang.c (c_get_string): New function.
5209 (c_language_defn, cplus_language_defn, asm_language_defn): Use
5210 c_get_string for la_get_string.
5211 (minimal_language_defn): Likewise
5212 * ada-lang.c (ada_language_defn): Likewise.
5213 * f-lang.c (f_language_defn): Use default_get_string for
5215 * jv-lang.c (java_language_defn): Likewise.
5216 * m2-lang.c (m2_language_defn): Likewise.
5217 * objc-lang.c (objc_language_defn): Likewise.
5218 * p-lang.c (p_language_defn): Likewise.
5219 * scm-lang.c (scm_language_defn): Likewise.
5220 * typeprint.c (type_to_string): New function.
5221 * value.h (type_to_string): New prototype.
5222 * valprint.c (val_print_string): Factor out code for reading string
5223 from the inferior into its own function. Put 2 spaces after period
5225 (read_string): New function.
5226 * valprint.h (read_string): New prototype.
5228 2009-01-07 Pierre Muller <muller@ics.u-strasbg.fr>
5229 Tom Tromey <tromey@redhat.com>
5231 PR breakpoints/8079:
5232 * breakpoint.c (print_one_breakpoint): Use exp_string field
5233 to display expression of watchpoints.
5234 (mention): Likewise.
5235 (watch_command_1): Remove trailing whitespace from expression.
5236 * printcmd.c (struct display) <exp_string>: New field.
5237 (display_command): Set exp_string.
5238 (free_display): Free exp_string.
5239 (clear_displays): Use free_display.
5240 (do_one_display): Print exp_string.
5241 (display_info): Likewise.
5243 2009-02-04 Tom Tromey <tromey@redhat.com>
5244 Thiago Jung Bauermann <bauerman@br.ibm.com>
5245 Phil Muldoon <pmuldoon@redhat.com>
5247 * python/python-internal.h (gdbpy_get_value_from_history): Rename
5248 prototype to gdbpy_history.
5249 (gdbpy_is_string): Declare.
5250 (python_string_to_host_string): Declare.
5251 * python/python-utils.c (gdbpy_is_string): New function.
5252 (unicode_to_encoded_string): New function.
5253 (unicode_to_target_string): Use it.
5254 (python_string_to_host_string): New function.
5255 * python/python-value.c (valpy_address): New function.
5256 (convert_value_from_python): Use gdbpy_is_string. Change to throw
5257 Python exception instead of a GDB exception on error. Properly check
5259 (valpy_getitem): Convert field name to host string. Handle array
5260 accesses. Adapt to new behaviour of convert_value_from_python.
5261 (valpy_new): Adapt to new behaviour of convert_value_from_python.
5262 (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
5263 VALPY_BITXOR, VALPY_BITOR>: New constants.
5264 (valpy_binop): Update. Adapt to new behaviour of
5265 convert_value_from_python.
5266 (valpy_invert): New function.
5267 (valpy_lsh): Likewise.
5268 (valpy_rsh): Likewise.
5269 (valpy_and): Likewise.
5270 (valpy_or): Likewise.
5271 (valpy_xor): Likewise.
5272 (valpy_richcompare): Call convert_value_from_python instead of doing
5274 (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
5275 (gdbpy_get_value_from_history): Rename
5276 function to gdbpy_history.
5277 (gdbpy_initialize_values): Don't set tp_new.
5278 (value_object_type): Add valpy_new.
5279 (value_object_methods): Add `address' entry.
5280 (value_object_as_number): Update for new methods.
5281 * python/python.c (GdbMethods): Rename entry from
5282 `get_value_from_history' to `history'.
5284 2009-02-04 Jerome Guitton <guitton@adacore.com>
5286 * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
5287 of type to guard against a crash.
5289 2009-02-04 Jerome Guitton <guitton@adacore.com>
5291 * value.c (value_from_contents_and_address): Always return
5292 a lval_memory value, even if address is null.
5294 2009-02-04 Tristan Gingold <gingold@adacore.com>
5296 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
5297 (amd64_darwin_sigcontext_addr): Ditto.
5298 (darwin_dwarf_signal_frame_p): Ditto.
5299 (i386_darwin_init_abi): Handle signal frames, use the const for
5301 (x86_darwin_init_abi_64): Ditto.
5303 2009-02-04 Tristan Gingold <gingold@adacore.com>
5305 * i386-tdep.c (i386_sigtramp_p): Make it public.
5306 * i386-tdep.h (i386_sigtramp_p): Declare.
5308 2009-02-04 Tristan Gingold <gingold@adacore.com>
5310 * machoread.c (macho_symfile_read): Read minsymtab also from
5312 (macho_symfile_read): Try to read dwarf2 frame info from main
5313 object file, but not from OSO files.
5314 (macho_symfile_offsets): Update section names for latest BFD
5316 * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
5317 (x86_darwin_init_abi_64): Ditto.
5318 * solib-darwin.c: New file.
5319 * solib-darwin.h: New file.
5320 * configure.tgt: Add solib.o solib-darwin.o for Darwin.
5322 2009-02-04 Tristan Gingold <gingold@adacore.com>
5324 * solist.h (struct target_so_ops): Comment fallback behavior for
5327 2009-02-03 Tom Tromey <tromey@redhat.com>
5329 * completer.c (add_struct_fields): Check type_name against NULL
5332 2009-02-03 Joel Brobecker <brobecker@adacore.com>
5334 * MAINTAINERS: Update Elena's email address.
5336 2009-02-02 Joel Brobecker <brobecker@adacore.com>
5338 * breakpoint (update_watchpoint): Minor comment adjustment.
5340 2009-02-02 Tom Tromey <tromey@redhat.com>
5343 * completer.c (count_struct_fields): Count method names.
5344 (add_struct_fields): Add matching method names.
5346 2009-02-02 Doug Evans <dje@google.com>
5348 * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
5349 doing any further tcl/tk configury. Don't configure gdbtk if
5350 tcl or tk check fails.
5351 * aclocal.m4: Regenerate.
5352 * configure: Regenerate.
5354 2009-02-02 Tom Tromey <tromey@redhat.com>
5357 * valops.c (find_overload_match): Follow typedefs before taking
5358 address of object argument.
5360 2009-02-01 Doug Evans <dje@google.com>
5362 * target.h (target_waitstatus_to_string): Declare.
5363 * target.c (target_waitstatus_to_string): New function. Copied from
5364 debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
5365 TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
5366 TARGET_WAITKIND_NO_HISTORY.
5367 (debug_to_wait): Call it.
5368 * infrun.c (wait_for_inferior): If debug_infrun, print result of
5370 (fetch_inferior_event): Ditto.
5372 2009-01-30 Tom Tromey <tromey@redhat.com>
5374 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
5376 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
5379 * thread.c (do_captured_list_thread_ids): Report the current
5382 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
5384 * breakpoint.c (create_breakpoint, create_breakpoints)
5385 (break_command_really, set_breakpoint): New parameter enabled.
5386 (create_breakpoint, break_command_really): Make breakpoint
5387 disabled if so requested.
5388 * breakpoint.h (set_breakpoint): New parameter enabled.
5389 * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
5391 2009-01-28 Doug Evans <dje@google.com>
5393 * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
5394 (amd64_displaced_step_fixup): Declare.
5395 * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
5396 (amd64_arch_regmap): Move out of amd64_analyze_stack_align
5397 and make static global.
5398 (amd64_arch_regmap_len): New static global.
5399 (amd64_arch_reg_to_regnum): New function.
5400 (struct amd64_insn): New struct.
5401 (struct displaced_step_closure): New struct.
5402 (onebyte_has_modrm,twobyte_has_modrm): New static globals.
5403 (rex_prefix_p,skip_prefixes)
5404 (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
5405 (amd64_insn_length,amd64_get_unused_input_int_reg)
5406 (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
5407 (amd64_displaced_step_copy_insn)
5408 (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
5409 (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
5410 (amd64_displaced_step_fixup): New functions.
5411 * amd64-linux-tdep.c: #include arch-utils.h.
5412 (amd64_linux_init_abi): Install displaced stepping support.
5414 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
5415 Jerome Guitton <guitton@adacore.com>
5417 * configure, config.in: Regenerated.
5418 * configure.ac: Add --with-system-gdbinit.
5419 * main.c (get_init_files): New.
5420 (captured_main): Use get_init_files. Load system gdbinit before
5422 (print_gdb_help): Print location of init files.
5424 2009-01-28 Pedro Alves <pedro@codesourcery.com>
5426 * corefile.c (generic_search): Delete disabled code.
5427 * gdbcore.h (generic_search): Delete declaration.
5429 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5431 * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
5432 parent to the child.
5433 * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
5434 * inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use
5435 remove_breakpoints to remove breakpoints from the parent.
5437 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5439 PR backtrace/9458, PR backtrace/8864:
5440 * frame.c (create_new_frame): Update the frame's cached PC before
5441 finding its unwinder. Use frame_id_build to build the new frame's
5443 * stack.c (parse_frame_specification_1): Correct setting ``addrs''
5444 array values from the ``args'' array values.
5446 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5448 * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
5449 (create_array_type, create_set_type, init_flags_type)
5450 (copy_type_recursive): Replace pairs of calls to XALLOC and memset
5451 with a call to XZALLOC or XCALLOC, and pairs of calls to
5452 obstack_alloc and memset with a call to OBSTACK_ZALLOC.
5454 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5456 Add "maint set|show internal-error|internal-warning quit|corefile
5457 ask|yes|no" commands.
5460 * utils.c (internal_problem_ask, internal_problem_yes)
5461 (internal_problem_no, internal_problem_modes): New.
5462 (struct internal_problem): Remove FIXME. Make should_quit and
5463 should_dump_core types to char *.
5464 (internal_vproblem, internal_error_problem)
5465 (internal_warning_problem): Adjust.
5466 (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
5468 (add_internal_problem_command): New.
5469 (_initialize_utils): New.
5471 2009-01-25 Pedro Alves <pedro@codesourcery.com>
5473 * infcmd.c (program_info): Use paddress instead of casting stop_pc
5476 2009-01-24 Pedro Alves <pedro@codesourcery.com>
5478 * infrun.c (normal_stop): Don't call
5479 deprecated_update_frame_pc_hack.
5480 * frame.c (deprecated_update_frame_pc_hack)
5481 (deprecated_update_frame_base_hack): Delete, and ...
5482 (create_new_frame): ... inline here.
5483 * frame.h (deprecated_update_frame_pc_hack)
5484 (deprecated_update_frame_base_hack): Delete declarations.
5486 2009-01-23 Pedro Alves <pedro@codesourcery.com>
5488 * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
5489 * cli/cli-setshow.c (do_setshow_command): Handle it.
5490 * command.h (enum var_types): Add var_zuinteger.
5491 (add_setshow_zuinteger_cmd): Declare.
5493 * valprint.c (_initialize_valprint): Change the set input-radix
5494 and set output-radix commands to zuinteger type.
5496 2009-01-23 Pedro Alves <pedro@codesourcery.com>
5499 * infrun.c (normal_stop): Tag threads as stopped, and run the
5500 hook-stop before printing the stack frame.
5502 2009-01-22 Pedro Alves <pedro@codesourcery.com>
5505 * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
5508 2009-01-20 Kazu Hirata <kazu@codesourcery.com>
5510 * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
5513 2009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
5516 * infcmd.c (signal_command): Do not specify a resume PC.
5518 2009-01-19 Doug Evans <dje@google.com>
5520 * dummy-frame.c (dummy_frame): Replace regcache member with
5522 (dummy_frame_push): Replace caller_regcache arg with caller_state.
5523 All callers updated.
5524 (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
5525 (dummy_frame_pop): Rewrite. Verify requested frame is in the
5526 dummy frame stack. Restore program state.
5527 (cleanup_dummy_frames): Rewrite.
5528 (dummy_frame_sniffer): Update. Make static.
5529 * dummy-frame.h (regcache,frame_info): Delete forward decls.
5530 (inferior_thread_state): New forward decl.
5531 (dummy_frame_push): Update prototype.
5532 * frame.c (frame_pop): dummy_frame_pop now does all the work for
5534 * infcall.c (breakpoint_auto_delete_contents): Delete.
5535 (get_function_name,run_inferior_call): New fns.
5536 (call_function_by_hand): Simplify by moving some code to
5537 get_function_name, run_inferior_call. Inferior function call wrapped
5538 in TRY_CATCH so there's less need for cleanups and all exits from
5539 proceed are handled similarily. Detect program exit.
5540 Detect program stopping in a different thread.
5541 Make error messages more consistent.
5542 * inferior.h (inferior_thread_state): Declare (opaque type).
5543 (save_inferior_thread_state,restore_inferior_thread_state,
5544 make_cleanup_restore_inferior_thread_state,
5545 discard_inferior_thread_state, get_inferior_thread_state_regcache):
5547 (save_inferior_status): Update prototype.
5548 * infrun.c: (normal_stop): When stopped for the completion of an
5549 inferior function call, verify the expected stack frame kind.
5550 (inferior_thread_state): New struct.
5551 (save_inferior_thread_state,restore_inferior_thread_state,
5552 do_restore_inferior_thread_state_cleanup,
5553 make_cleanup_restore_inferior_thread_state,
5554 discard_inferior_thread_state,
5555 get_inferior_thread_state_regcache): New functions.
5556 (inferior_status): Move stop_signal, stop_pc, registers to
5557 inferior_thread_state. Remove restore_stack_info.
5558 (save_inferior_status): Remove arg restore_stack_info.
5559 All callers updated. Remove saving of state now saved by
5560 save_inferior_thread_state.
5561 (restore_inferior_status): Remove restoration of state now done by
5562 restore_inferior_thread_state.
5563 (discard_inferior_status): Remove freeing of registers, now done by
5564 discard_inferior_thread_state.
5566 2009-01-18 Pedro Alves <pedro@codesourcery.com>
5568 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
5569 at a time, times NUM_TO_SCROLL.
5570 * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
5571 fetch the selected frame if there is no stack.
5573 2009-01-18 Pedro Alves <pedro@codesourcery.com>
5576 * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
5578 * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
5579 * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
5580 is thrown while handling an event, finish the thread state.
5581 (normal_stop): Use finish_thread_state cleanup.
5582 * infcmd.c (run_command_1): If an error is thrown while starting
5583 the inferior, finish the thread state.
5585 2009-01-18 Pedro Alves <pedro@codesourcery.com>
5587 * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
5588 skip breakpoints without a location (pending breakpoints).
5590 2009-01-18 Pedro Alves <pedro@codesourcery.com>
5593 * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
5595 2009-01-18 Nick Roberts <nickrob@snap.net.nz>
5597 * thread.c (thread_command): Move call to annotate_thread_changed
5599 (do_captured_thread_select): ... here, to avoid printing an
5600 annotation if the thread change generates an exception.
5602 2009-01-16 Joel Brobecker <brobecker@adacore.com>
5604 * NEWS: Document x86_64/MinGW as a new native configuration.
5606 2009-01-16 Joel Brobecker <brobecker@adacore.com>
5608 * NEWS: Move the documentation of "info os processes" to
5609 the appropriate section (documenting the new commands).
5611 2009-01-15 Doug Evans <dje@google.com>
5613 * target.h (target_signal_to_string): Make return type const char *.
5614 (target_signal_to_name): Ditto.
5615 (target_signal_from_name): Make arg const char *.
5616 * infrun.c (sig_print_info): Update.
5617 * signals/signals.c (signals): Make array and struct members const.
5618 (target_signal_to_string): Make return type const char *.
5619 (target_signal_to_name): Ditto.
5620 (target_signal_from_name): Make arg const char *.
5622 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
5623 Tristan Gingold <gingold@adacore.com>
5625 * solist.h (struct target_so_ops): New member bfd_open.
5626 (solib_find): Add prototype.
5627 (solib_bfd_fopen): Add prototype.
5628 * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
5629 from solib_bfd_open.
5630 (solib_bfd_open): Use ops->bfd_open override if present. Call
5631 solib_find and solib_bfd_open otherwise.
5633 * objfiles.h (OBJF_KEEPBFD): New define.
5634 * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
5635 objfile flag is set.
5636 * solib.c (symbol_add_stub): Do not allocate second BFD for
5637 shared library; use OBJF_KEEPBFD flag on solib objfile.
5639 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
5641 * frame.c (get_frame_arch): Abort if called with NULL this_frame.
5643 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
5645 * value.h (address_of_variable): Add prototype.
5646 (locate_var_value): Remove prototype.
5648 * findvar.c (read_var_value): Do not attempt to default frame
5650 (locate_var_value): Remove function.
5651 * valops.c (value_of_variable): Retrieve selected frame for
5652 symbols that require a frame when called with NULL block.
5653 * valops.c (address_of_variable): New function.
5655 * eval.c (evaluate_subexp_for_address): Call address_of_variable
5656 instead of calling locate_var_value.
5657 (evaluate_subexp_with_coercion): Likewise.
5659 2009-01-14 Daniel Jacobowitz <dan@codesourcery.com>
5661 * NEWS: Document "define" for prefixed commands.
5662 * cli/cli-cmds.c (show_user): Update calls to show_user_1. Call
5663 show_user_1 for prefix commands.
5664 * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
5665 * cli/cli-script.c (validate_comname): Rewrite to handle prefix
5666 commands. Return the containing command list.
5667 (define_command, document_command): Update to handle prefix commands.
5668 (show_user_1): Add prefix and name arguments. Handle prefix
5670 * cli/cli-script.h (show_user_1): Update prototype.
5672 2009-01-14 Kai Tietz <kai.tietz@onevision.com>
5674 * ser-mingw.c (console_select_thread): Add return to make
5676 (pipe_select_thread): Likewise.
5677 (file_select_thread): Likewise.
5679 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5681 * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
5684 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5686 * remote.c (extended_remote_mourn_1): Invalidate our notion of
5687 current general thread.
5689 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5691 * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
5692 without a live selected thread.
5694 2009-01-14 Joel Brobecker <brobecker@adacore.com>
5696 Update the copyright notice of some of the files I missed
5697 in the previous copyright update.
5699 2009-01-14 Joel Brobecker <brobecker@adacore.com>
5701 * windows-nat.c (handle_unload_dll): Use %p to print the DLL
5702 base address instead of casting it to DWORD.
5704 2009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
5706 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
5707 for NULL frame pointers.
5709 2009-01-13 Mark Kettenis <kettenis@gnu.org>
5711 * utils.c (host_address_to_string): Reimplement in a way that
5712 avoids the cast of the address to long.
5714 2009-01-13 Joel Brobecker <brobecker@adacore.com>
5716 * mdebugread.c (parse_symbol): Save the symbol private data
5717 using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
5718 (psymtab_to_symtab_1): Likewise.
5719 (parse_procedure): Declare variable "e" only in the scope
5720 where it is used. Extract the symbol private data using
5723 2009-01-13 Jim Blandy <jimb@codesourcery.com>
5725 Abstract out common code for copying value locations.
5727 * value.h (set_value_component_location): New declaration.
5728 * value.c (set_value_component_location): New function.
5729 (value_primitive_field): Use it.
5730 * valarith.c (value_subscript, value_subscripted_rvalue): Same.
5731 * valops.c (search_struct_field, value_slice): Same.
5732 * ada-lang.c (coerce_unspec_val_to_type)
5733 (ada_value_primitive_packed_val): Same.
5735 2009-01-13 Joel Brobecker <brobecker@adacore.com>
5737 * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
5739 2009-01-12 Christopher Faylor <me+cygwin@cgf.cx>
5741 * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
5743 * i386-cygwin-tdep.c: Ditto.
5744 * i386-windows-nat.c: Ditto.
5745 * windows-nat.h: Ditto.
5746 * windows-tdep.c: Ditto.
5747 * windows-tdep.h: Ditto.
5748 * windows-nat.c: Ditto.
5749 (cygwin_load_start): Redefine as CORE_ADDR.
5750 (cygwin_load_end): Ditto.
5751 (windows_make_so): Coerce result of address arithmetic to uintptr_t
5752 before coercing to CORE_ADDR to avoid a compiler warning.
5753 (handle_exception): Define addr as CORE_ADDR and coerce
5754 ExceptionAddress to uintptr_t before assigining to avoid a compiler
5756 * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
5759 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
5761 Fix linking with --enable-targets=all:
5762 * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
5763 (HFILES_NO_SRCDIR): Add windows-tdep.h.
5764 (ALLDEPFILES): Add windows-tdep.c.
5766 2009-01-11 Chris Faylor <me.gdb@cgf.cx>
5768 * win32-nat.h: Delete.
5769 * windows-nat.h: Rename from win32-nat.h.
5770 * win32-nat.c: Delete.
5771 * windows-nat.c: Rename from win32-nat.c.
5772 * win32-termcap.c: Delete.
5773 * windows-termcap.c: Rename from win32-termcap.c.
5774 * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
5775 * configure.ac: Handle rename from win32-termcap.c ->
5777 * configure: Regenerate.
5778 * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
5779 -> windows-termcap.c.
5780 * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
5782 * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
5783 * windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
5785 (win32_make_so): Handle cygwin compiler warning due to change of
5786 load_addr from DWORD to LPVOID.
5787 (handle_load_dll): Use %p in format string to properly print address
5788 and avoid a compiler warning.
5789 (DEBUG_EXCEPTION_SIMPLE): Ditto.
5790 (handle_exception): Ditto.
5791 * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
5792 * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
5794 * config/i386/mingw.mh: Ditto.
5795 * config/i386/mingw64.mh: Ditto.
5797 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
5799 * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
5800 arrayprint_recurse_level to a parameter. Update all the callers. New
5801 comment at autovariables.
5803 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
5805 * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
5808 2009-01-11 Joel Brobecker <brobecker@adacore.com>
5810 * target.c (target_xfer_partial): Use host_address_to_string to
5811 print the address of readbuf and writebuf. Cast the address of
5812 elements inside the myaddr buffer into intptr_t.
5813 (deprecated_debug_xfer_memory): Use paddress to print memaddr.
5814 Cast the address of elements inside the myaddr buffer into
5817 2009-01-11 Joel Brobecker <brobecker@adacore.com>
5819 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
5820 * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
5821 * configure.host, configure.tgt: Add handling for x86_64/windows.
5822 * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
5823 and amd64-windows-tdep.c.
5825 2009-01-11 Joel Brobecker <brobecker@adacore.com>
5827 * win32-tdep.h, win32-tdep.c: New files.
5828 * i386-cygwin-tdep.h: Delete.
5829 * i386-cygwin-tdep.c: Include win32-tdep.h instead of
5831 (win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
5832 * win32-nat.c: Likewise.
5833 * configure.tgt: Add win32-tdep.o to the list of target object
5834 files for i386-cygwin and i386-mingw targets.
5836 2009-01-11 Joel Brobecker <brobecker@adacore.com>
5838 * win32-nat.h: New file.
5839 * win32-nat.c (mappings): Initialize to NULL.
5840 (win32_set_context_register_offsets): New function.
5841 * i386-windows-nat.c: New file.
5842 (mappings): Moved here from win32-nat.c.
5843 (_initialize_i386_windows_nat): New function.
5844 * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
5845 * config/i386/cygwin.mh (NATDEPFILES): Likewise.
5847 2009-01-09 Andreas Schwab <schwab@suse.de>
5849 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
5851 2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5853 * gdbtypes.c (append_composite_type_field): Correct the location of
5856 2009-01-09 Pedro Alves <pedro@codesourcery.com>
5858 * defs.h (deprecated_error_hook): Delete declaration.
5859 * interps.c (clear_interpreter_hooks): Adjust.
5860 * remote-sim.c (gdb_os_error): Don't try to call
5861 deprecated_error_hook. No need to call exit anymore.
5862 * top.c (deprecated_error_hook): Delete.
5864 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5866 * arch-utils.c (gdbarch_update_p): Use host_address_to_string
5867 to print the address of the gdbarch pointer.
5869 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5871 * gdbarch.sh: Fix all the compilation errors on amd64-windows
5872 due to casting a pointer to a long when printing a function
5873 address. Instead, use host_address_to_string to convert our
5874 address to a string.
5875 * gdbarch.c: Regenerate.
5877 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5879 * event-top.c (async_disconnect, async_stop_sig): use "raise"
5880 instead of "kill" to raise a signal.
5882 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5884 * win32-nat.c (get_module_name): Change the type of parameter
5885 "base_address" to LPVOID. Remove unnecessary cast.
5886 (struct lm_info): Change type of load_addr to LPVOID.
5887 (win32_make_so): Change the type of parameter "load_addr"
5888 to LPVOID. Remove some unnecessary casts.
5889 (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
5890 (win32_xfer_shared_libraries): Add missing cast.
5892 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5894 * win32-nat.c (has_detach_ability, set_process_privilege):
5895 Cast the result of GetProcAddress to (void *) to avoid
5896 a compilation warning.
5898 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5900 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
5903 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5905 * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
5906 definition of local variable "done".
5907 (info_w32_command, handle_exception): Remove unnecessary cast.
5909 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5911 * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
5912 DebugSetProcessKillOnExit. Update all uses in this file.
5913 (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
5914 Update all uses in this file.
5916 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5918 * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
5919 and use it when pushing the target.
5920 (win32_attach, win32_create_inferior): Update call to
5921 do_initial_win32_stuff.
5922 (win32_detach, win32_mourn_inferior): Use our ops parameter
5923 instead of the global win32_ops to unpush the target.
5925 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5927 * ser-mingw.c (ser_windows_open): Use proper type when casting
5928 in call to _open_osfhandle.
5930 2009-01-09 Kai Tietz <kai.tietz@onevision.com>
5932 * coff-pe-read.c (read_pe_exported_syms): Fix typo.
5934 2009-01-09 Joel Brobecker <brobecker@adacore.com>
5936 * CONTRIBUTE: Minor reformatting.
5938 2009-01-08 Kai Tietz <kai.tietz@onevision.com>
5940 * MAINTAINERS: Add myself to Write After Approval.
5941 * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
5944 2009-01-08 Nathan Froyd <froydnj@codesourcery.com>
5946 * remote-sim.c (gdb_os_error): Mark as a noreturn function.
5947 Call exit to make it obvious to GCC.
5949 2009-01-08 Tom Tromey <tromey@redhat.com>
5951 PR breakpoints/9350:
5952 * varobj.c (varobj_invalidate): Unconditionally free
5954 * symfile.c (syms_from_objfile): Free local_addr when returning
5956 * exec.c (exec_file_attach): Do cleanups before returning.
5957 (exec_file_command): Likewise.
5958 * corefile.c (reopen_exec_file): Do cleanups before returning.
5959 * breakpoint.c (insert_breakpoint_locations): Do cleanups before
5961 (do_vec_free): New function.
5962 (update_global_location_list): Make a cleanup for old_locations.
5963 Do cleanups before returning. Remove unused variable 'e'.
5964 (find_condition_and_thread): Free result of parsing the
5966 (print_it_typical): Do cleanups before returning.
5967 (breakpoint_re_set_one): Always free sals.sals.
5969 2009-01-08 Joel Brobecker <brobecker@adacore.com>
5970 Emi Suzuki <emi-suzuki@tjsys.co.jp>
5972 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
5975 2009-01-07 Doug Evans <dje@google.com>
5977 * top.c (gdb_prompt_string): Delete, unused.
5979 2009-01-07 Pedro Alves <pedro@codesourcery.com>
5981 Delete ONE_PROCESS_WRITETEXT leftovers.
5983 * breakpoint.c (insert_bp_location): Delete process_warning
5985 (insert_breakpoint_locations): Adjust.
5986 (reattach_breakpoints): Adjust.
5987 * infrun.c (normal_stop): Drop "It might be running in another
5990 2009-01-07 Stan Shebs <stan@codesourcery.com>
5992 * config/pa/linux.mh (XDEPFILES): Remove.
5994 2009-01-07 Doug Evans <dje@google.com>
5996 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
5998 2009-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6000 * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
6001 spacing, a regression from 2008-04-22.
6003 2009-01-07 Joel Brobecker <brobecker@adacore.com>
6005 * utils.c (gdb_print_host_address): Adjust implementation to
6006 reuse host_address_to_string. Move comment explaining the conversion
6007 from host address to string from here...
6008 (host_address_to_string): ... to there.
6010 2009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
6012 * MAINTAINERS: Add myself for write after approval privileges.
6014 2009-01-06 Tom Tromey <tromey@redhat.com>
6016 * value.c (set_internalvar): Use value_free, not xfree.
6018 2009-01-06 Jim Blandy <jimb@red-bean.com>
6020 Check return values of functions declared with warn_unused_result
6021 attribute in GLIBC 2.8.
6022 * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
6023 * inflow.c (check_syscall): New function.
6024 (new_tty): Use check_syscall to check return values from open and dup.
6025 * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
6026 * main.c (captured_main): Call cwd after setting up gdb_stderr;
6027 check for errors from getcwd.
6028 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
6029 * ui-file.c (stdio_file_write): Ignore return value from fwrite.
6030 (stdio_file_fputs): Same.
6031 * utils.c (internal_vproblem): abort if last-ditch error message
6034 * top.c (gdb_init): Don't set the current directory here; that's
6035 already been done in captured_main.
6037 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
6039 * ser-tcp.c: Adjust includes.
6040 (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
6041 (tcp_auto_retry, tcp_retry_limit): Declare.
6042 (TIMEOUT): Remove, in favor of tcp_retry_limit.
6043 (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
6044 (wait_for_connect): New function.
6045 (net_open): Use it. Add auto-retry logic.
6046 (set_tcp_cmd, show_tcp_cmd): New functions.
6047 (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
6048 and "set/show tcp connect-timeout" commands.
6049 * NEWS: Document new commands.
6051 2009-01-05 Tom Tromey <tromey@redhat.com>
6053 * python/python-internal.h (Py_ssize_t): Define as int.
6055 2009-01-05 Jim Blandy <jimb@red-bean.com>
6057 * MAINTAINERS: Fix my e-mail address as steering committee member.
6059 2009-01-03 Joel Brobecker <brobecker@adacore.com>
6061 Updated copyright notices for most files.
6063 2009-01-03 Joel Brobecker <brobecker@adacore.com>
6065 * top.c (print_gdb_version): Update copyright year.
6067 2009-01-03 Joel Brobecker <brobecker@adacore.com>
6069 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
6071 2009-01-01 Pedro Alves <pedro@codesourcery.com>
6073 PR breakpoints/9681:
6074 * exceptions.h (enum errors): New error type, MEMORY_ERROR.
6075 * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
6076 * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
6077 retrow all other exceptions.
6079 For older changes see ChangeLog-2008.
6085 version-control: never