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