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