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