5128dc6e8794d8011c22dc658e907ab0eedcb620
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * solib.c (solib_bfd_open): Do not call ops->bfd_open.
4 (solib_map_sections): Call ops->bfd_open instead of solib_bfd_open.
5 * solib-frv.c (_initialize_frv_solib): Initialize bfd_open member.
6 * solib-irix.c (_initialize_irix_solib): Likewise.
7 * solib-null.c (_initialize_null_solib): Likewise.
8 * solib-osf.c (_initialize_osf_solib): Likewise.
9 * solib-pa64.c (_initialize_pa64_solib): Likewise.
10 * solib-som.c (_initialize_som_solib): Likewise.
11 * solib-sunos.c (_initialize_sunos_solib): Likewise.
12 * solib-svr4.c (_initialize_svr4_solib): Likewise.
13 * solib-target.c (_initialize_solib_target): Likewise.
14
15 2009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
16
17 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Respect mixed_mode flag.
18
19 2009-07-16 Doug Evans <dje@google.com>
20
21 * linux-thread.db.c (try_thread_db_load_1): Tweak comment.
22
23 2007-07-16 Paul Pluzhnikov <ppluzhnikov@google.com>
24
25 * linux-thread-db.c (thread_db_find_new_threads_silently):
26 New function.
27 (try_thread_db_load_1): Call it.
28
29 2009-07-15 Doug Evans <dje@google.com>
30
31 Code reorg in preparation for adding comdat types support.
32 * dwarf2read.c (struct die_reader_specs): New struct.
33 (locate_pdi_sibling): New arg buffer. All callers updated.
34 (load_partial_dies, read_partial_die): Ditto.
35 (read_8_bytes): Change return type to ULONGEST.
36 (read_comp_unit): Delete arg abfd. All callers updated.
37 (read_die_and_children_1): Delete args abfd, cu. New arg reader.
38 All callers updated.
39 (read_die_and_children, read_die_and_siblings): Ditto.
40 (read_full_die): Ditto. Move closer to callers.
41 (skip_one_die): New arg buffer. All callers updated.
42 (load_full_comp_unit): Change return type to void. All callers
43 updated.
44 (partial_read_comp_unit_head): New args buffer, buffer_size.
45 All callers updated.
46 (process_psymtab_comp_unit): New function, split out from
47 dwarf2_build_psymtabs_hard.
48 (dwarf2_build_psymtabs_hard): Call it.
49 (load_partial_comp_unit): Renamed from load_comp_unit.
50 All callers updated.
51 (skip_children): New arg buffer. All callers updated.
52 (init_cu_die_reader): New function.
53 (is_ref_attr): New function.
54 (dwarf2_get_ref_die_offset): Call it.
55 (alloc_one_comp_unit): New function.
56
57 2009-07-14 Stan Shebs <stan@codesourcery.com>
58
59 * MAINTAINERS (Global Maintainers): Add Doug Evans.
60
61 2009-07-14 Stan Shebs <stan@codesourcery.com>
62
63 Conditional tracepoints.
64 * ax-gdb.h (gen_eval_for_expr): Declare.
65 * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL
66 and other comparisons.
67 (gen_eval_for_expr): New function.
68 (agent_eval_command): New maintenance command.
69 (_initialize_ax_gdb): Define the command.
70 * remote.c (struct remote_state): New field cond_tracepoints.
71 (PACKET_ConditionalTracepoints): New packet config type.
72 (remote_cond_tracepoint_feature): New function.
73 (remote_protocol_features): Add ConditionalTracepoints.
74 (remote_supports_cond_tracepoints): New function.
75 (_initialize_remote): Add ConditionalTracepoints.
76 * tracepoint.c (download_tracepoint): Add conditional.
77 * NEWS: Mention conditional tracepoints.
78
79 2009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
80
81 * objfiles.c (objfile_relocate): Do not relocate the same
82 BLOCKVECTOR_MAP address map multiple times.
83
84 2009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
85
86 * remote.c (process_stop_reply): Access expedited target registers
87 in target_gdbarch.
88
89 2009-07-13 Jan Kratochvil <jan.kratochvil@redhat.com>
90
91 Fix memory access from signed 32bit inferior registers on 64bit GDB.
92 * linux-nat.c (linux_xfer_partial <TARGET_OBJECT_MEMORY>): New variable
93 addr_bit. Mask OFFSET by the ADDR_BIT width.
94
95 2009-07-13 Anthony Green <green@moxielogic.com>
96
97 * moxie-tdep.c (moxie_gdbarch_init): Call
98 set_gdbarch_process_record.
99 (moxie_process_record): New.
100 (moxie_process_readu): New.
101
102 2009-07-12 Michael Snyder <msnyder@vmware.com>
103
104 * i386-tdep.c: Add a frame unwinder for function epilogues.
105 (i386_in_function_epilogue_p): New function.
106 (i386_epilogue_frame_sniffer): New function.
107 (i386_epilogue_frame_cache): New function.
108 (i386_epilogue_frame_this_id): New function.
109 (i386_epilogue_frame_unwind): New struct frame_unwind.
110 (i386_gdbarch_init): Hook the new unwinder.
111
112 2009-07-11 Hui Zhu <teawater@gmail.com>
113
114 * cli/cli-cmds.c (disassemble_command): Add a new modifier /r
115 to "disassemble" command to print the raw instructions in hex as
116 well as in symbolic form.
117 (init_cli_cmds): Ditto.
118 (print_disassembly): Change "mixed" to "flags" to translate
119 the behavior of disassemble.
120 (disassemble_current_function): Ditto.
121 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
122 * stack.c (gdb_disassembly_stub): Ditto.
123 * disasm.c (do_mixed_source_and_assembly): Ditto.
124 (do_mixed_source_and_assembly): Ditto.
125 (do_assembly_only): Ditto.
126 (gdb_disassembly): Ditto.
127 (dump_insns): print the raw instructions in hex as well as in
128 symbolic form if DISASSEMBLY_RAW_INSN and flags is true.
129 * disasm.h (DISASSEMBLY_SOURCE): Include source code with the
130 assembly if it and flags is true.
131 (DISASSEMBLY_RAW_INSN): Include the raw instructions in hex with
132 the assembly if it and flags is true.
133 (gdb_disassembly): Update extern.
134 * NEWS: Document disassemble/r support.
135
136 2009-07-10 Tom Tromey <tromey@redhat.com>
137
138 * dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h.
139 * dwarf2expr.c: Likewise.
140 * dwarf2loc.c: Likewise.
141 * dwarf2read.c: Likewise.
142 * sh-tdep.c: Likewise.
143 * xtensa-tdep.c: Likewise.
144
145 2009-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
146
147 Tidy up the code.
148 * mi/mi-cmd-var.c (mi_cmd_var_update): Remove variable nv. Move
149 variables var, rootlist and cr to their local sub-block. Move the
150 make_cleanup_ui_out_tuple_begin_end, make_cleanup_ui_out_list_begin_end
151 and do_cleanups calls to the common base block. Remove the zero NV
152 check.
153
154 2009-07-10 Phil Muldoon <pmuldoon@redhat.com>
155
156 * python/python-internal.h (apply_varobj_pretty_printer): Update
157 definition.
158 (python_string_to_target_python_string): Add definition.
159 * python/python-utils.c (unicode_to_encoded_python_string)
160 (unicode_to_target_python_string)
161 (python_string_to_target_python_string): New Functions.
162 * python/python-prettyprint.c (pretty_print_one_value): Likewise.
163 (print_string_repr): Refactor to logic to account for PyObject
164 returned strings.
165 (apply_varobj_pretty_printer): Likewise.
166 * python/python-value.c (valpy_string): Parse length keyword. Use
167 length keyword in LA_GET_STRING.
168 * varobj.c (value_get_print_value): Refactor logic to account for
169 PyObject returned strings.
170 * c-lang.c (c_get_string): If the length parameter is specified,
171 use that. Return value in characters. Update comments.
172 * language.h: Update c_get_string prototype comments.
173
174 2009-07-09 Doug Evans <dje@google.com>
175
176 * i386-tdep.c (i386_displaced_step_fixup): Fix order of arguments
177 to read_memory_unsigned_integer.
178
179 2009-07-09 Jan Kratochvil <jan.kratochvil@redhat.com>
180
181 Report error on inaccessible memory.
182 * cli/cli-dump.c: Include gdbcore.h.
183 (dump_memory_to_file): Call read_memory instead of target_read_memory.
184
185 2009-07-09 Hui Zhu <teawater@gmail.com>
186
187 * solib.c (solib_bfd_open): Output a warning if solib's
188 architecture is not compatible with inferior's architecture.
189
190 2009-07-09 Ulrich Weigand <uweigand@de.ibm.com>
191 Jan Kratochvil <jan.kratochvil@redhat.com>
192
193 * target.h (struct target_ops <to_thread_architecture>): Describe it.
194 (target_thread_architecture): Refer to to_thread_architecture.
195
196 2009-07-08 Pierre Muller <muller@ics.u-strasbg.fr>
197
198 * cli/cli-cmds.c (init_cli_cmds): Add "inf" alias for "info" command.
199
200 2009-07-07 Ulrich Weigand <uweigand@de.ibm.com>
201
202 * tui/tui-stack.c (tui_make_status_line): Display PC as ?? if unknown.
203
204 2009-07-07 Pierre Muller <muller@ics.u-strasbg.fr>
205
206 * breakpoint.c (set_raw_breakpoint): Remove static modifier.
207
208 2009-07-07 Tom Tromey <tromey@redhat.com>
209
210 * c-lang.c (convert_octal): Only allow 3 octal digits.
211 (print_wchar): Prefer 3-digit octal form. Fall back to hex if
212 needed.
213 * c-exp.y (c_parse_escape): Only allow 3 octal digits.
214
215 2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
216
217 * python/python-value.c (valpy_getitem): Remove incorrect assert.
218
219 2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
220
221 * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH.
222
223 2009-07-07 Sami Wagiaalla <swagiaal@redhat.com>
224
225 * cp-support.h (struct using_direct): Rename members inner and
226 outer to import_src, and import_dest respectively.
227 * cp-namespace.c (cp_add_using_directive): Update.
228 (cp_add_using): Update.
229 (cp_copy_usings): Update.
230 (cp_lookup_symbol_namespace): Update.
231 (cp_scan_for_anonymous_namespaces): Update.
232 * cp-support.c (make_symbol_overload_list_using): Update.
233 * cp-support.h (cp_add_using_directive, cp_add_using): Rename
234 arguments from inner and outer to src and dest respectively.
235 * cp-namespace.c (cp_add_using_directive): Ditto.
236 (cp_add_using): Ditto.
237
238 2009-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
239
240 * mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
241 * varobj.c (varobj_invalidate): Replace a while loop by for loop.
242
243 2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
244
245 Fix hang in floating varobjs.
246
247 * varobj.c (varobj_invalidate): Advance to next
248 element when processing floating varobj.
249
250 2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
251
252 * varobj.c: Remove unnecessary include.
253
254 2009-07-07 Tristan Gingold <gingold@adacore.com>
255
256 * config/i386/darwin.mh (NATDEPFILES): Remove excServer.o.
257 Remove excServer.c target. Remove _all target.
258 * darwin.defs: Removed.
259
260 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
261
262 * configure.tgt (i[34567]86-*-nto*): Add build_gdbserver=yes.
263
264 2009-07-06 Jan Kratochvil <jan.kratochvil@redhat.com>
265
266 * source.c (find_and_open_source): Remove the `objfile' parameter.
267 Update the function comment.
268 (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the
269 find_and_open_source callers.
270
271 2009-07-05 Pedro Alves <pedro@codesourcery.com>
272
273 * coff-pe-read.c (read_pe_exported_syms): Recognize
274 "pe-arm-wince-little" and "pei-arm-wince-little" bfd targets as PE
275 targets.
276
277 2009-07-05 Pedro Alves <pedro@codesourcery.com>
278
279 * arm-wince-tdep.c (arm_wince_skip_main_prologue): New.
280 (arm_wince_init_abi): Register it as gdbarch_skip_main_prologue
281 callback.
282
283 2009-06-29 Tristan Gingold <gingold@adacore.com>
284
285 * i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
286 (amd64_darwin_thread_state_num_regs)
287 (amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
288 amd64-darwin-tdep.c
289 (_initialize_i386_darwin_tdep): Remove 64 bits parts.
290 (darwin_dwarf_signal_frame_p): Make public.
291 * amd64-darwin-tdep.c: New file with most chunks from
292 i386-darwin-tdep.c
293 * i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
294 (amd64_darwin_thread_state_reg_offset)
295 (amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
296 * amd64-darwin-tdep.h: New file.
297 * i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
298 if BFD64 is defined.
299 (i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
300 64 bits parts.
301 (i386_darwin_store_inferior_registers): Ditto.
302 (darwin_set_sstep): Ditto.
303 (darwin_complete_target): Ditto.
304 (amd64_darwin_sstep_at_sigreturn): Ditto.
305 * configure.tgt: Create a separate entry for x86_64-*-darwin.
306 Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.
307 * Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
308 i386-darwin-tdep.c i386-darwin-nat.c
309 (ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
310
311 2009-07-02 Pedro Alves <pedro@codesourcery.com>
312
313 * linux-fork.c (forks_exist_p): Drop unnecessary extern.
314 (add_fork, linux_fork_killall, linux_fork_mourn_inferior)
315 (linux_fork_detach): Ditto.
316 (delete_fork_command): Rename to ...
317 (delete_checkpoint_command): ... this.
318 (detach_fork_command): Rename to ...
319 (detach_checkpoint_command): ... this.
320 (info_forks_command): Rename to ...
321 (info_checkpoints_command): ... this.
322 (_initialize_linux_fork): Remove stale comments. Adjust.
323
324 2009-07-02 Pedro Alves <pedro@codesourcery.com>
325
326 * linux-nat.c (linux_child_follow_fork): If we're staying attached
327 to the child process, enable event reporting on it. Don't handle
328 checkpoints here. Instead, add the child fork to the lwp thread
329 and inferior lists without clobbering the previous inferior. Let
330 the thread_db layer learn about a new child process, even if
331 following the parent.
332 (linux_nat_switch_fork): Delete lwps of the current inferior only,
333 instead of clearing the whole list. Use thread_change_ptid to
334 give the core the illusion the new checkpoint is still the same
335 inferior. Clear the register cache.
336 (linux_handle_extended_wait): Handle checkpoints here.
337 (linux_multi_process): Turn on.
338 * linux-fork.c (struct fork_info) <pc>: Remove field.
339 (init_fork_list): Do not delete the checkpoint from the inferior
340 list (it is not there).
341 (fork_load_infrun_state): Don't switch inferior_ptid here. Pass
342 the new checkpoint's ptid to linux_nat_switch_fork.
343 (fork_save_infrun_state): Make static. Don't stop the pc field of
344 fork_info, it's gone.
345 (linux_fork_mourn_inferior): Don't delete the checkpoint from the
346 inferior list, it's not there.
347 (linux_fork_detach): Ditto.
348 (delete_fork_command): Replace mention of fork/checkpoint by
349 checkpoint only.
350 (detach_fork_command): Likewise. Don't delete the checkpoint from
351 the inferior list.
352 (info_forks_command): Adjust.
353 (restore_detach_fork): Delete.
354 (checkpointing_pid): New.
355 (linux_fork_checkpointing_p): New.
356 (save_detach_fork): Delete.
357 (checkpoint_command): Delete temp_detach_fork. Don't remove
358 breakpoints, that's a nop. Store the pid of the process we're
359 checkpointing, and use make_cleanup_restore_integer to restore it.
360 Don't reinsert breakpoints here.
361 (process_command, fork_command): Delete.
362 (restart_command): Update comments to only mention checkpoints,
363 not forks.
364 (_initialize_linux_fork): Delete "fork", "process", "info forks"
365 commands.
366 * linux-fork.h (fork_save_infrun_state, fork_list): Delete
367 declarations.
368 (linux_fork_checkpointing_p): Declare.
369 * cli/cli-cmds.c (killlist): New.
370 * cli/cli-cmds.h (killlist): Declare.
371 * gdbcmd.h (killlist): Declare.
372 * inferior.c: Include "gdbthread.h".
373 (detach_inferior_command, kill_inferior_command)
374 (inferior_command): New.
375 (info_inferiors_command): Allow specifying a specific inferior id.
376 (_initialize_inferiors): Register "inferior", "kill inferior" and
377 "detach inferior" commands.
378 * infcmd.c (_initialize_infcmd): Make "kill" a prefix command.
379 * gdbthread.h (any_thread_of_process): Declare.
380 * thread.c (any_thread_of_process): New.
381
382 * NEWS: Mention multi-inferior debugging. Mention 'info
383 inferiors', 'inferior', 'detach inferior' and 'kill inferior' as
384 new commands.
385 (Removed commands): New section, mentioning that 'info forks',
386 'fork', 'process', 'delete fork' and 'detach fork' are now gone.
387
388 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
389
390 * gdbarch.sh (current_gdbarch): Remove global variable.
391 (find_arch_by_info): Remove, inline into ...
392 (gdbarch_find_by_info): ... this. Remove current_gdbarch swapping.
393 (deprecated_current_gdbarch_select_hack): Rename to ...
394 (deprecated_target_gdbarch_select_hack): ... this. Do not set
395 or access current_gdbarch.
396 * gdbarch.c, gdbarch.h: Regenerate.
397
398 * arch-utils.c (gdbarch_update_p): Update call.
399 (set_gdbarch_from_file): Likewise.
400
401 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
402
403 * defs.h (extract_signed_integer, extract_unsigned_integer,
404 extract_long_unsigned_integer, store_signed_integer,
405 store_unsigned_integer): Add BYTE_ORDER parameter.
406 * findvar.c (extract_signed_integer, extract_unsigned_integer,
407 extract_long_unsigned_integer, store_signed_integer,
408 store_unsigned_integer): Add BYTE_ORDER parameter. Use it
409 instead of current_gdbarch.
410
411 * gdbcore.h (read_memory_integer, safe_read_memory_integer,
412 read_memory_unsigned_integer, write_memory_signed_integer,
413 write_memory_unsigned_integer): Add BYTE_ORDER parameter.
414 * corefile.c (struct captured_read_memory_integer_arguments): Add
415 BYTE_ORDER member.
416 (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into
417 struct captured_read_memory_integer_arguments.
418 (do_captured_read_memory_integer): Pass it to read_memory_integer.
419 (read_memory_integer): Add BYTE_ORDER parameter. Pass it to
420 extract_signed_integer.
421 (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to
422 extract_unsigned_integer.
423 (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it
424 to store_signed_integer.
425 (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it
426 to store_unsigned_integer.
427
428 * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
429 * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
430 Pass it to extract_unsigned_integer.
431
432
433 Update calls to extract_signed_integer, extract_unsigned_integer,
434 extract_long_unsigned_integer, store_signed_integer,
435 store_unsigned_integer, read_memory_integer,
436 read_memory_unsigned_integer, safe_read_memory_integer,
437 write_memory_signed_integer, write_memory_unsigned_integer, and
438 get_target_memory_unsigned to pass byte order:
439 * ada-lang.c (ada_value_binop): Update.
440 * ada-valprint.c (char_at): Update.
441 * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
442 * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
443 alpha_extract_return_value, alpha_read_insn,
444 alpha_get_longjmp_target): Update.
445 * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
446 * amd64obsd-tdep.c (amd64obsd_supply_uthread,
447 amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
448 * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
449 amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
450 amd64_displaced_step_fixup): Update.
451 * arm-linux-tdep.c (arm_linux_sigreturn_init,
452 arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
453 * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
454 arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
455 arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
456 arm_return_value): Update.
457 * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
458 * auxv.c (default_auxv_parse): Update.
459 * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
460 avr_scan_prologue, avr_extract_return_value,
461 avr_frame_prev_register, avr_push_dummy_call): Update.
462 * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
463 bsd_uthread_wait, bsd_uthread_thread_alive,
464 bsd_uthread_extra_thread_info): Update.
465 * c-lang.c (c_printstr, print_wchar): Update.
466 * cp-valprint.c (cp_print_class_member): Update.
467 * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
468 cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
469 cris_extract_return_value, find_step_target, dip_prefix,
470 sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
471 move_mem_to_reg_movem_op, get_data_from_address): Update.
472 * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
473 * dwarf2-frame.c (execute_cfa_program): Update.
474 * dwarf2loc.c (find_location_expression): Update.
475 * dwarf2read.c (dwarf2_const_value): Update.
476 * expprint.c (print_subexp_standard): Update.
477 * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
478 unsigned_address_to_pointer, address_to_signed_pointer,
479 read_var_value): Update.
480 * frame.c (frame_unwind_register_signed,
481 frame_unwind_register_unsigned, get_frame_memory_signed,
482 get_frame_memory_unsigned): Update.
483 * frame-unwind.c (frame_unwind_got_constant): Update.
484 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
485 frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
486 Update.
487 * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
488 frv_extract_return_value, find_func_descr,
489 frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
490 * f-valprint.c (f_val_print): Update.
491 * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
492 Update.
493 * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
494 h8300_push_dummy_call, h8300_extract_return_value,
495 h8300h_extract_return_value, h8300_store_return_value,
496 h8300h_store_return_value): Update.
497 * hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
498 * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
499 Update.
500 * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
501 hppa64_hpux_in_solib_call_trampoline,
502 hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
503 hppa_hpux_sigtramp_frame_unwind_cache,
504 hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
505 hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
506 hppa32_hpux_search_dummy_call_sequence,
507 hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
508 hppa_hpux_unwind_adjust_stub): Update.
509 * hppa-linux-tdep.c (insns_match_pattern,
510 hppa_linux_find_global_pointer): Update.
511 * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
512 hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
513 skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
514 hppa_pseudo_register_read, hppa_frame_prev_register_helper,
515 hppa_match_insns): Update.
516 * hpux-thread.c (hpux_thread_fetch_registers): Update.
517 * i386-tdep.c (i386bsd_sigcontext_addr): Update.
518 * i386-cygwin-tdep.c (core_process_module_section): Update.
519 * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
520 amd64_darwin_sstep_at_sigreturn): Update.
521 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
522 amd64_darwin_sigcontext_addr): Likewise.
523 * i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
524 * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
525 * i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
526 * i386obsd-nat.c (i386obsd_supply_pcb): Update.
527 * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
528 i386obsd_trapframe_cache): Update.
529 * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
530 i386_analyze_frame_setup, i386_analyze_prologue,
531 i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
532 i386_get_longjmp_target, i386_push_dummy_call,
533 i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
534 i386_fetch_pointer_argument): Update.
535 * i387-tdep.c (i387_supply_fsave): Update.
536 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
537 * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
538 examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
539 ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
540 ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
541 ia64_libunwind_frame_prev_register,
542 ia64_libunwind_sigtramp_frame_this_id,
543 ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
544 find_extant_func_descr, find_func_descr,
545 ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
546 ia64_unwind_pc): Update.
547 * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
548 iq2000_scan_prologue, iq2000_extract_return_value,
549 iq2000_push_dummy_call): Update.
550 * irix5nat.c (fill_gregset): Update.
551 * jv-lang.c (evaluate_subexp_java): Update.
552 * jv-valprint.c (java_value_print): Update.
553 * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call,
554 lm32_extract_return_value, lm32_store_return_value): Update.
555 * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
556 m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
557 m32c_m16c_pointer_to_address): Update.
558 * m32r-tdep.c (m32r_store_return_value, decode_prologue,
559 m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
560 Update.
561 * m68hc11-tdep.c (m68hc11_pseudo_register_read,
562 m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
563 m68hc11_push_dummy_call): Update.
564 * m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
565 m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
566 Update.
567 * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
568 m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
569 m68k_get_longjmp_target): Update.
570 * m88k-tdep.c (m88k_fetch_instruction): Update.
571 * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
572 mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
573 * mi/mi-main.c (mi_cmd_data_write_memory): Update.
574 * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
575 mips64_linux_get_longjmp_target, mips64_fill_gregset,
576 mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
577 * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
578 * mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
579 mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
580 mips_o32_push_dummy_call, mips_o64_push_dummy_call,
581 mips_single_step_through_delay, mips_skip_pic_trampoline_code,
582 mips_integer_to_address): Update.
583 * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
584 Update.
585 * monitor.c (monitor_supply_register, monitor_write_memory,
586 monitor_read_memory_single): Update.
587 * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
588 moxie_analyze_prologue): Update.
589 * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
590 mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
591 mt_push_dummy_call): Update.
592 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
593 read_objc_methlist_method, read_objc_object, read_objc_super,
594 read_objc_class, find_implementation_from_class): Update.
595 * ppc64-linux-tdep.c (ppc64_desc_entry_point,
596 ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
597 Update.
598 * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
599 ppcobsd_sigtramp_frame_cache): Update.
600 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
601 do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
602 ppc64_sysv_abi_return_value): Update.
603 * ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
604 * procfs.c (procfs_auxv_parse): Update.
605 * p-valprint.c (pascal_val_print): Update.
606 * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
607 regcache_raw_write_signed, regcache_raw_write_unsigned,
608 regcache_cooked_read_signed, regcache_cooked_read_unsigned,
609 regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
610 * remote-m32r-sdi.c (m32r_fetch_register): Update.
611 * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
612 Update.
613 * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
614 rs6000_convert_from_func_ptr_addr, branch_dest,
615 rs6000_software_single_step): Update.
616 * rs6000-tdep.c (rs6000_in_function_epilogue_p,
617 ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
618 bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
619 rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
620 rs6000_frame_cache): Update.
621 * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
622 s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
623 s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
624 extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
625 * scm-exp.c (scm_lreadr): Update.
626 * scm-lang.c (scm_get_field, scm_unpack): Update.
627 * scm-valprint.c (scm_val_print): Update.
628 * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
629 score_fetch_inst): Update.
630 * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
631 sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
632 sh64_pseudo_register_read, sh64_pseudo_register_write,
633 sh64_frame_prev_register): Update:
634 * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
635 sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
636 sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
637 * solib-darwin.c (darwin_load_image_infos): Update.
638 * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
639 find_canonical_descriptor_in_load_object): Update.
640 * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
641 irix_open_symbol_file_object): Update.
642 * solib-som.c (som_solib_create_inferior_hook, link_map_start,
643 som_current_sos, som_open_symbol_file_object): Update.
644 * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
645 Update.
646 * solib-svr4.c (read_program_header, scan_dyntag_auxv,
647 solib_svr4_r_ldsomap): Update.
648 * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
649 * sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
650 sparc64obsd_collect_uthread): Update.
651 * sparc64-tdep.c (sparc64_pseudo_register_read,
652 sparc64_pseudo_register_write, sparc64_supply_gregset,
653 sparc64_collect_gregset): Update.
654 * sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
655 * sparcobsd-tdep.c (sparc32obsd_supply_uthread,
656 sparc32obsd_collect_uthread): Update.
657 * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
658 sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
659 sparc_collect_rwindow): Update.
660 * spu-linux-nat.c (parse_spufs_run): Update.
661 * spu-tdep.c (spu_pseudo_register_read_spu,
662 spu_pseudo_register_write_spu, spu_pointer_to_address,
663 spu_analyze_prologue, spu_in_function_epilogue_p,
664 spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
665 spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
666 info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
667 info_spu_dma_command, info_spu_proxydma_command): Update.
668 * stack.c (print_frame_nameless_args, frame_info): Update.
669 * symfile.c (read_target_long_array, simple_read_overlay_table,
670 simple_read_overlay_region_table): Update.
671 * target.c (debug_print_register): Update.
672 * tramp-frame.c (tramp_frame_start): Update.
673 * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
674 v850_extract_return_value, v850_store_return_value,
675 * valarith.c (value_binop, value_bit_index): Update.
676 * valops.c (value_cast): Update.
677 * valprint.c (val_print_type_code_int, val_print_string,
678 read_string): Update.
679 * value.c (unpack_long, unpack_double, unpack_field_as_long,
680 modify_field, pack_long): Update.
681 * vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
682 vax_skip_prologue): Update.
683 * xstormy16-tdep.c (xstormy16_push_dummy_call,
684 xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
685 xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
686 xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
687 * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
688 xtensa_pseudo_register_write, xtensa_frame_cache,
689 xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.
690
691
692 * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
693 decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
694 BYTE_ORDER parameter.
695 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
696 parameters.
697 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
698 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
699 * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it
700 instead of current_gdbarch.
701 (decimal_to_string, decimal_from_integral, decimal_from_floating,
702 decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
703 Pass it to match_endianness.
704 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
705 parameters. Pass them to match_endianness.
706 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
707 Pass them to match_endianness.
708 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
709 Pass them to match_endianness.
710 * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
711 BYTE_ORDER_Y output parameters.
712 (value_binop): Update call to value_args_as_decimal.
713
714 Update calls to decimal_to_string, decimal_from_string,
715 decimal_from_integral, decimal_from_floating, decimal_to_doublest,
716 decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
717 to pass/receive byte order:
718 * c-exp.y (parse_number): Update.
719 * printcmd.c (printf_command): Update.
720 * valarith.c (value_args_as_decimal, value_binop, value_logical_not,
721 value_equal, value_less): Update.
722 * valops.c (value_cast, value_one): Update.
723 * valprint.c (print_decimal_floating): Update.
724 * value.c (unpack_long, unpack_double): Update.
725 * python/python-value.c (valpy_nonzero): Update.
726
727
728 * ada-valprint.c (char_at): Add BYTE_ORDER parameter.
729 (printstr): Update calls to char_at.
730 (ada_val_print_array): Likewise.
731 * valprint.c (read_string): Add BYTE_ORDER parameter.
732 (val_print_string): Update call to read_string.
733 * c-lang.c (c_get_string): Likewise.
734 * charset.h (target_wide_charset): Add BYTE_ORDER parameter.
735 * charset.c (target_wide_charset): Add BYTE_ORDER parameter.
736 Use it instead of current_gdbarch.
737 * printcmd.c (printf_command): Update calls to target_wide_charset.
738 * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
739 Pass to target_wide_charset. Use it instead of current_gdbarch.
740 (classify_type): Add BYTE_ORDER parameter. Pass to
741 charset_for_string_type. Allow NULL encoding pointer.
742 (print_wchar): Add BYTE_ORDER parameter.
743 (c_emit_char): Update calls to classify_type and print_wchar.
744 (c_printchar, c_printstr): Likewise.
745
746
747 * gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
748 * gdbarch.c, gdbarch.h: Regenerate.
749 * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
750 parameter.
751 * arch-utils.c (generic_in_solib_return_trampoline): Likewise.
752 * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
753 * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
754 (rs6000_skip_trampoline_code): Update call.
755
756 * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
757 dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
758 (alpha_read_insn): Add GDBARCH parameter.
759 * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
760 (alpha_register_to_value): Pass architecture to alpha_sts.
761 (alpha_extract_return_value): Likewise.
762 (alpha_value_to_register): Pass architecture to alpha_lds.
763 (alpha_store_return_value): Likewise.
764 (alpha_read_insn): Add GDBARCH parameter.
765 (alpha_skip_prologue): Pass architecture to alpha_read_insn.
766 (alpha_heuristic_proc_start): Likewise.
767 (alpha_heuristic_frame_unwind_cache): Likewise.
768 (alpha_next_pc): Likewise.
769 (alpha_sigtramp_frame_this_id): Pass architecture to
770 tdep->dynamic_sigtramp_offset callback.
771 (alpha_sigtramp_frame_sniffer): Pass architecture to
772 tdep->pc_in_sigtramp callback.
773 * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
774 (alphafbsd_sigtramp_offset): Likewise.
775 * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
776 parameter. Pass to alpha_read_insn.
777 (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to
778 alpha_linux_sigtramp_offset_1.
779 (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to
780 alpha_linux_sigtramp_offset.
781 (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
782 and alpha_linux_sigtramp_offset.
783 * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
784 (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
785 alphanbsd_sigtramp_offset.
786 * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
787 (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
788 alpha_read_insn.
789 (alphaobsd_sigcontext_addr): Pass architecture to
790 alphaobsd_sigtramp_offset.
791 * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
792 parameter.
793
794 * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
795 (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
796 (amd64_frame_cache): Likewise.
797
798 * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
799 (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
800 thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
801 * arm-wince-tdep.c: Include "frame.h".
802
803 * avr-tdep.c (EXTRACT_INSN): Remove.
804 (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
805 (avr_skip_prologue): Pass architecture to avr_scan_prologue.
806 (avr_frame_unwind_cache): Likewise.
807
808 * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
809 (find_step_target): Initialize it.
810 (get_data_from_address): Add BYTE_ORDER parameter.
811 (bdap_prefix): Pass byte order to get_data_from_address.
812 (handle_prefix_assign_mode_for_aritm_op): Likewise.
813 (three_operand_add_sub_cmp_and_or_op): Likewise.
814 (handle_inc_and_index_mode_for_aritm_op): Likewise.
815
816 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
817 (frv_linux_sigcontext_reg_addr): Pass architecture to
818 frv_linux_pc_in_sigtramp.
819 (frv_linux_sigtramp_frame_sniffer): Likewise.
820
821 * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
822 (h8300_analyze_prologue): Add GDBARCH parameter. Pass to
823 h8300_is_argument_spill.
824 (h8300_frame_cache, h8300_skip_prologue): Pass architecture
825 to h8300_analyze_prologue.
826
827 * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
828 in_solib_call_trampoline callback.
829 (hppa_in_solib_call_trampoline): Add GDBARCH parameter.
830 * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
831 parameter.
832 (hppa64_push_dummy_call): Pass architecture to
833 hppa64_convert_code_addr_to_fptr.
834 (hppa_match_insns): Add GDBARCH parameter.
835 (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to
836 hppa_match_insns.
837 (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
838 (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to
839 hppa_match_insns_relaxed.
840 (hppa_stub_unwind_sniffer): Pass architecture to
841 tdep->in_solib_call_trampoline callback.
842 * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
843 (hppa32_hpux_search_dummy_call_sequence): Pass architecture to
844 hppa_hpux_search_pattern.
845 * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
846 (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
847 Pass to insns_match_pattern.
848 (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
849 hppa_linux_sigtramp_find_sigcontext.
850 (hppa_linux_sigtramp_frame_sniffer): Likewise.
851 (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
852 (hppa64_hpux_in_solib_call_trampoline): Likewise.
853
854 * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
855 (i386_analyze_frame_setup): Add GDBARCH parameter.
856 (i386_analyze_prologue): Add GDBARCH parameter. Pass to
857 i386_follow_jump and i386_analyze_frame_setup.
858 (i386_skip_prologue): Pass architecture to i386_analyze_prologue
859 and i386_follow_jump.
860 (i386_frame_cache): Pass architecture to i386_analyze_prologue.
861 (i386_pe_skip_trampoline_code): Add FRAME parameter.
862 * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
863 * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
864 frame to i386_pe_skip_trampoline_code.
865
866 * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
867 to sigcontext_register_address callback.
868 * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
869 (ia64_find_unwind_table): Pass architecture to
870 ia64_find_global_pointer.
871 (find_extant_func_descr): Add GDBARCH parameter.
872 (find_func_descr): Pass architecture to find_extant_func_descr
873 and ia64_find_global_pointer.
874 (ia64_sigtramp_frame_init_saved_regs): Pass architecture to
875 tdep->sigcontext_register_address callback.
876 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
877 GDBARCH parameter.
878
879 * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
880 (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.
881
882 * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
883 (lm32_skip_prologue, lm32_frame_cache): Pass architecture to
884 lm32_analyze_prologue.
885
886 * m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
887 (m32r_skip_prologue): Pass architecture to decode_prologue.
888
889 * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
890 (m68hc11_scan_prologue): Pass architecture to
891 m68hc11_analyze_instruction.
892
893 * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
894 (m68k_analyze_prologue): Pass architecture to
895 m68k_analyze_frame_setup.
896
897 * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
898 (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order
899 to m88k_fetch_instruction.
900 (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
901 (m88k_frame_cache): Likewise.
902
903 * mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
904 (mep_analyze_prologue): Pass architecture to mep_get_insn.
905
906 * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
907 (mips32_next_pc): Pass architecture to mips_fetch_instruction.
908 (deal_with_atomic_sequence): Likewise.
909 (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
910 (mips16_scan_prologue): Likewise.
911 (mips32_scan_prologue): Likewise.
912 (mips16_in_function_epilogue_p): Likewise.
913 (mips32_in_function_epilogue_p): Likewise.
914 (mips_about_to_return): Likewise.
915 (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
916 (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
917 (mips_skip_prologue): Pass architecture to mips16_scan_prologue
918 and mips32_scan_prologue.
919 (mips_in_function_epilogue_p): Pass architecture to
920 mips16_in_function_epilogue_p and
921 mips32_in_function_epilogue_p.
922 (heuristic_proc_start): Pass architecture to mips_fetch_instruction
923 and mips_about_to_return.
924 (mips_skip_mips16_trampoline_code): Pass architecture to
925 mips_fetch_instruction.
926 (fetch_mips_16): Add GDBARCH parameter.
927 (mips16_next_pc): Pass architecture to fetch_mips_16.
928 (extended_mips16_next_pc): Pass architecture to unpack_mips16 and
929 fetch_mips_16.
930
931 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
932 read_objc_methlist_method, read_objc_object, read_objc_super,
933 read_objc_class): Add GDBARCH parameter.
934 (find_implementation_from_class): Add GDBARCH parameter, pass
935 to read_objc_class, read_objc_methlist_nmethods, and
936 read_objc_methlist_method.
937 (find_implementation): Add GDBARCH parameter, pass to
938 read_objc_object and find_implementation_from_class.
939 (resolve_msgsend, resolve_msgsend_stret): Pass architecture
940 to find_implementation.
941 (resolve_msgsend_super, resolve_msgsend_super_stret): Pass
942 architecture to read_objc_super and find_implementation_from_class.
943
944 * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
945 (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
946 ppc64_standard_linkage3_target): Pass architecture to
947 ppc64_desc_entry_point.
948 * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
949 (skip_prologue): Pass byte order to bl_to_blrl_insn_p.
950 (rs6000_fetch_instruction): Add GDBARCH parameter.
951 (rs6000_skip_stack_check): Add GDBARCH parameter, pass to
952 rs6000_fetch_instruction.
953 (skip_prologue): Pass architecture to rs6000_fetch_instruction.
954
955 * remote-mips.c (mips_store_word): Return old_contents as host
956 integer value instead of target bytes.
957
958 * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
959 (s390_analyze_prologue): Initialize it.
960 (extend_simple_arg): Add GDBARCH parameter.
961 (s390_push_dummy_call): Pass architecture to extend_simple_arg.
962
963 * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
964 * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
965 (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
966 * scm-valprint.c (scm_scmval_print): Likewise.
967 (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
968 SCM_BYTE_ORDER.
969
970 * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
971 (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
972 look_for_args_moves.
973 (sh64_skip_prologue): Pass architecture to
974 sh64_skip_prologue_hard_way.
975 * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
976 (sh_skip_prologue): Pass architecture to sh_analyze_prologue.
977 (sh_frame_cache): Likewise.
978
979 * solib-irix.c (extract_mips_address): Add GDBARCH parameter.
980 (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
981 Pass architecture to extract_mips_address.
982
983 * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
984 * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
985 (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
986 to sparc_fetch_wcookie.
987 (sparc32_frame_prev_register): Likewise.
988 * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
989 * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
990 * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.
991
992 * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
993 (spu_skip_prologue): Pass architecture to spu_analyze_prologue.
994 (spu_virtual_frame_pointer): Likewise.
995 (spu_frame_unwind_cache): Likewise.
996 (info_spu_mailbox_list): Add BYTE_ORER parameter.
997 (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
998 (info_spu_dma_cmdlist): Add BYTE_ORER parameter.
999 (info_spu_dma_command, info_spu_proxydma_command): Pass byte order
1000 to info_spu_dma_cmdlist.
1001
1002 * symfile.c (read_target_long_array): Add GDBARCH parameter.
1003 (simple_read_overlay_table, simple_read_overlay_region_table,
1004 simple_overlay_update_1): Pass architecture to read_target_long_array.
1005
1006 * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
1007 (v850_frame_cache): Pass architecture to v850_analyze_prologue.
1008
1009 * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
1010 parameter.
1011 (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
1012 to xstormy16_analyze_prologue.
1013 (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
1014 (xstormy16_find_jmp_table_entry): Likewise.
1015 (xstormy16_skip_trampoline_code): Pass architecture to
1016 xstormy16_resolve_jmp_table_entry.
1017 (xstormy16_pointer_to_address): Likewise.
1018 (xstormy16_address_to_pointer): Pass architecture to
1019 xstormy16_find_jmp_table_entry.
1020
1021 * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
1022 (call0_analyze_prologue): Add GDBARCH parameter, pass to
1023 call0_track_op.
1024 (call0_frame_cache): Pass architecture to call0_analyze_prologue.
1025 (xtensa_skip_prologue): Likewise.
1026
1027 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1028
1029 * defs.h (strlen_paddr, paddr, paddr_nz): Remove.
1030 (paddress): Add GDBARCH parameter.
1031 * utils.c (strlen_paddr, paddr, paddr_nz): Remove.
1032 (paddress): Add GDBARCH parameter, use it instead of current_gdbarch.
1033 * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter.
1034 * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter,
1035 use it instead of current_gdbarch.
1036
1037 Update calls to ui_out_field_core_addr to pass architecture:
1038 * ada-lang.c (print_one_exception): Update.
1039 * breakpoint.c (print_one_breakpoint_location,
1040 print_one_exception_catchpoint): Update.
1041 * disasm.c (dump_insns): Update.
1042 * darwin-nat-info.c (darwin_debug_regions_recurse): Update.
1043 * mi/mi-main.c (mi_cmd_data_read_memory): Update.
1044 * mi/mi-symbol-cmds.c: Include "objfiles.h".
1045 (mi_cmd_symbol_list_lines): Update.
1046 * stack.c (print_frame_info, print_frame): Update.
1047
1048 Update callers of paddress to pass architecture:
1049 * ada-tasks.c (info_task): Update.
1050 * ada-valprint.c (ada_val_print_1): Update.
1051 * annotate.c (annotate_source, annotate_frame_begin): Update.
1052 * breakpoint.c (insert_bp_location, describe_other_breakpoints,
1053 mention): Update.
1054 * cli/cli-cmds.c (edit_command, list_command, print_disassembly):
1055 Update.
1056 * corefile.c (memory_error): Update.
1057 * c-valprint.c (print_function_pointer_address, c_val_print): Update.
1058 * disasm.c (dis_asm_print_address): Update.
1059 * exec.c (print_section_info): Update.
1060 * f-valprint.c (f_val_print): Update.
1061 * infcmd.c: Include "arch-utils.h".
1062 (jump_command, program_info): Update.
1063 * linux-fork.c: Include "arch-utils.h".
1064 (info_forks_command): Update.
1065 * m2-valprint.c (print_function_pointer_address,
1066 print_unpacked_pointer, print_variable_at_address,
1067 m2_val_print): Update.
1068 * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command):
1069 Update.
1070 * printcmd.c (print_address, print_address_demangle, address_info):
1071 Update.
1072 * p-valprint.c (pascal_val_print): Update.
1073 * source.c: Include "arch-utils.h".
1074 (line_info): Update.
1075 * stack.c (frame_info, print_block_frame_labels): Update.
1076 * symfile.c (add_symbol_file_command, list_overlays_command): Update.
1077 * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1,
1078 print_symbol, print_partial_symbols, maintenance_info_psymtabs,
1079 maintenance_check_symtabs): Update.
1080 * symtab.c (find_pc_sect_symtab): Update.
1081 * target.c (deprecated_debug_xfer_memory): Update.
1082 * tracepoint.c (scope_info): Update.
1083 * tui/tui-stack.c (tui_make_status_line): Update.
1084 * valprint.c (val_print_string): Update.
1085
1086 Update callers of paddr_nz to use paddress instead (keeping
1087 user-visible output identical):
1088 * alpha-tdep.c (alpha_heuristic_proc_start): Update.
1089 * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn,
1090 amd64_displaced_step_fixup): Update.
1091 * arch-utils.c (simple_displaced_step_copy_insn): Update.
1092 * auxv.c (fprint_target_auxv): Update.
1093 * breakpoint.c (insert_single_step_breakpoint): Update.
1094 * buildsym.c (finish_block): Update.
1095 * cli/cli-dump.c (restore_section_callback): Update.
1096 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1097 * frame.c (frame_unwind_register_value): Update.
1098 * gcore.c (gcore_create_callback): Update.
1099 * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update.
1100 * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm,
1101 i386_record_lea_modrm_addr, i386_record_lea_modrm,
1102 i386_process_record): Update.
1103 * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id,
1104 ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id,
1105 ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update.
1106 * infrun.c (displaced_step_prepare, displaced_step_fixup,
1107 handle_inferior_event, insert_step_resume_breakpoint_at_sal,
1108 insert_longjmp_resume_breakpoint): Update.
1109 * linux-nat.c (linux_nat_find_memory_regions): Update.
1110 * linux-record.c (record_linux_system_call): Update.
1111 * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call,
1112 mips_n32n64_push_dummy_call, mips_o32_push_dummy_call,
1113 mips_o64_push_dummy_call): Update.
1114 * monitor.c (monitor_error, monitor_remove_breakpoint): Update.
1115 * record.c (record_arch_list_add_mem, record_wait,
1116 record_xfer_partial): Update.
1117 * remote-mips.c (mips_fetch_word, mips_check_lsi_error,
1118 mips_common_breakpoint): Update.
1119 * remote-sim.c (gdbsim_xfer_inferior_memory): Update.
1120 * rs6000-tdep.c (ppc_displaced_step_fixup): Update.
1121 * solib-som.c (som_current_sos): Update.
1122 * symfile.c (load_progress, generic_load): Update.
1123 * symfile-mem.c (add_vsyscall_page): Update.
1124 * valops.c (value_fetch_lazy): Update.
1125 * windows-tdep.c (windows_xfer_shared_library): Update.
1126
1127 Update callers of paddr_nz to use paddress instead (changing
1128 user-visible output to make it more correct):
1129 * dwarf2loc.c (locexpr_describe_location): Update.
1130 * ia64-tdep.c (ia64_memory_insert_breakpoint,
1131 ia64_memory_remove_breakpoint): Update.
1132 * jv-valprint.c (java_value_print): Update.
1133 * m32c-tdep.c (m32c_m16c_address_to_pointer): Update.
1134 * monitor.c (monitor_read_memory): Update.
1135
1136 Update callers of paddr to use paddress instead (changing
1137 user-visible output to make it more correct):
1138 * arm-tdep.c (arm_push_dummy_call): Update.
1139 * breakpoint.c (insert_bp_location, create_thread_event_breakpoint,
1140 create_breakpoint): Update.
1141 * darwin-nat-info.c (darwin_debug_regions): Update.
1142 * dcache.c (dcache_info): Update.
1143 * dsrec.c (load_srec, make_srec): Update.
1144 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program,
1145 dwarf2_frame_cache): Update.
1146 * gcore.c (gcore_copy_callback): Update.
1147 * gnu-nat.c (gnu_xfer_memory): Update.
1148 * mips-linux-nat.c (mips_show_dr): Update.
1149 * monitor.c (monitor_write_memory, monitor_insert_breakpoint,
1150 monitor_remove_breakpoint): Update.
1151 * remote.c (compare_sections_command): Update.
1152 * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint,
1153 m32r_remove_breakpoint, m32r_insert_watchpoint,
1154 m32r_remove_watchpoint): Update.
1155 * sol-thread.c (info_cb): Update.
1156 * symfile.c (load_progress): Update.
1157
1158 Update callers of paddress or paddr_nz to use hex_string instead
1159 (changes output of internal/error/debug messages only):
1160 * dwarf2read.c (dump_die_shallow): Update.
1161 * frame.c (fprint_field, fprint_frame, frame_pc_unwind,
1162 get_frame_func, create_new_frame): Update.
1163 * hppa-tdep.c (find_unwind_entry, unwind_command): Update.
1164 * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x,
1165 ia64_get_dyn_info_list): Update.
1166 * maint.c (maintenance_translate_address): Update.
1167 * mi/mi-cmd-var.c (mi_cmd_var_create): Update.
1168 * target.c (target_flash_erase): Update.
1169
1170 Update callers of paddr/paddr_nz to use phex/phex_nz instead,
1171 using an appropriate address size. Remove use of strlen_paddr.
1172 * exec.c (exec_files_info): Update.
1173 * i386-nat.c (i386_show_dr): Update.
1174 * remote.c (remote_flash_erase): Update.
1175 * m32r-rom.c (m32r_load_section): Update.
1176 * monitor.c (monitor_vsprintf, monitor_store_register): Update.
1177 * remote.c (remote_check_symbols, remote_search_memory): Update.
1178 * remote-mips.c (mips_request, mips_common_breakpoint): Update.
1179 * scm-valprint.c (scm_ipruk, scm_scmval_print): Update.
1180 * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update.
1181 * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs,
1182 sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs,
1183 sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs,
1184 sh_dsp_show_regs): Update.
1185 * xcoffsolib.c (sharedlibrary_command): Update.
1186
1187
1188 * maint.c (maint_print_section_info): Add ADDR_SIZE parameter.
1189 Use hex_string_custom instead of paddr.
1190 (print_bfd_section_info): Pass address size.
1191 (print_objfile_section_info): Likewise.
1192
1193 * annotate.h (annotate_source): Add GDBARCH parameter.
1194 (annotate_frame_begin): Likewise.
1195 * annotate.c (annotate_source): Add GDBARCH parameter.
1196 (annotate_frame_begin): Likewise.
1197 * source.c (identify_source_line): Update call to annotate_source.
1198 * stack.c (print_frame_info, print_frame): Update call to
1199 annotate_frame_begin.
1200
1201 * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter.
1202 (create_breakpoint, create_ada_exception_breakpoint): Update call.
1203
1204 * stack.c (print_block_frame_labels): Add GDBARCH parameter.
1205 (print_frame_label_vars): Update call.
1206
1207 * symmisc.c (print_partial_symbols): Add GDBARCH parameter.
1208 (dump_psymtab): Update call to print_partial_symbols.
1209 (struct print_symbol_args): Add GDBARCH member.
1210 (dump_symtab_1): Set print_symbol_args architecture member.
1211 (print_symbol): Use it.
1212
1213 * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH
1214 parameter.
1215 * windows-tdep.c (windows_xfer_shared_library): Likewise.
1216 * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member.
1217 (core_process_module_section): Pass architecture from cpms_data to
1218 windows_xfer_shared_library.
1219 (windows_core_xfer_shared_libraries): Initialize cmps_data
1220 architecture member.
1221 * windows-nat.c (windows_xfer_shared_libraries): Pass architecture
1222 to windows_xfer_shared_library.
1223
1224 * defs.h (print_address): Add GDBARCH parameter.
1225 * printcmd.c (print_address): Add GDBARCH parameter.
1226 (print_scalar_formatted, do_examine): Update call.
1227 * findcmd.c (find_command): Update call.
1228 * tracepoint.c: Include "arch-utils.h".
1229 (trace_find_line_command): Update call.
1230 * tui/tui-disasm.c (tui_disassemble): Update call.
1231
1232 * value.h (print_address_demangle): Add GDBARCH parameter.
1233 * printcmd.c (print_address_demangle): Add GDBARCH parameter.
1234 * c-valprint.c (print_function_pointer_address, c_val_print):
1235 Update call.
1236 * f-valprint.c (f_val_print): Update call.
1237 * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call.
1238 * jv-valprint.c (java_val_print): Update call.
1239 * m2-valprint.c (print_function_pointer_address, m2_val_print):
1240 Update call.
1241 * p-valprint.c (pascal_val_print): Update call.
1242
1243 * disasm.c (gdb_disassemble_info): Install architecture into
1244 di.application_data field.
1245
1246 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1247
1248 * disasm.h (gdb_disassembly): Add GDBARCH parameter.
1249 (gdb_print_insn): Likewise.
1250 * disasm.c (dump_insns): Add GDBARCH parameter. Use it instead
1251 of current_gdbarch.
1252 (do_mixed_source_and_assembly): Add GDBARCH parameter. Pass to
1253 dump_insns.
1254 (do_assembly_only): Likewise.
1255 (gdb_disassembly): Add GDBARCH parameter. Use it instead of
1256 current_gdbarch. Pass to subroutines.
1257 (gdb_print_insn): Add GDBARCH parameter. Use it instead of
1258 current_gdbarch.
1259
1260 * stack.c (struct gdb_disassembly_stub_args): Add GDBARCH member.
1261 (gdb_disassembly_stub): Pass architecture to gdb_disassembly.
1262 (do_gdb_disassembly): Add GDBARCH argument. Store into args.
1263 (print_frame_info): Pass architecture to do_gdb_disassembly.
1264
1265 * printcmd.c (print_formatted): Pass architecture to gdb_print_insn.
1266
1267 * mi/mi-cmd-disas.c: Include "arch-utils.h"
1268 (mi_cmd_disassemble): Pass architecture to gdb_disassembly.
1269
1270 * cli/cli-cmds.c: Include "arch-utils.h".
1271 (print_disassembly): Add GDBARCH parameter. Pass to gdb_disassembly
1272 and tui_show_assembly.
1273 (disassemble_current_function): Pass architecture to
1274 tui_get_low_disassembly_address and print_disassembly.
1275 (disassemble_command): Pass architecture to
1276 tui_get_low_disassembly_address and print_disassembly.
1277
1278 * tui/tui.c (tui_show_assembly): Add GDBARCH parameter. Pass to
1279 tui_update_source_windows_with_addr.
1280
1281 * tui/tui-data.h (struct tui_locator_element): Add GDBARCH member.
1282 (struct tui_source_info): Likewise.
1283 * tui/tui-data.c (tui_clear_win_detail): Clear source_info.gdbarch.
1284
1285 * tui/tui-disasm.c (tui_disassemble): Add GDBARCH parameter.
1286 Pass to gdb_print_insn.
1287 (tui_find_disassembly_address): Add GDBARCH parameter. Pass to
1288 tui_disassemble.
1289 (tui_set_disassem_content): Add GDBARCH parameter. Install into
1290 source_info.gdbarch. Pass to tui_disassemble.
1291 (tui_show_disassem): Add GDBARCH parameter. Pass to
1292 tui_update_source_window.
1293 (tui_show_disassem_and_update_source): Add GDBARCH parameter. Pass to
1294 tui_show_disassem and tui_update_source_window.
1295
1296 (tui_get_begin_asm_address): Return locator architecture in addition
1297 to locator PC value.
1298
1299 (tui_get_low_disassembly_address): Add GDBARCH parameter. Pass to
1300 tui_get_low_disassembly_address.
1301
1302 (tui_vertical_disassem_scroll): Pass architecture to subroutines.
1303
1304 * tui/tui-disasm.h (tui_set_disassem_content): Add GDBARCH parameter.
1305 (tui_show_disassem): Likewise.
1306 (tui_show_disassem_and_update_source): Likewise.
1307 (tui_get_begin_asm_address): Return architecture and PC value.
1308
1309 * tui/tui.h (tui_get_low_disassembly_address): Add GDBARCH parameter.
1310 (tui_show_assembly): Add GDBARCH parameter.
1311
1312 * tui/tui-layout.c (extract_display_start_addr): Return current window
1313 architecture in addition to current PC value.
1314
1315 (tui_set_layout): Update calls to tui_get_low_disassembly_address and
1316 extract_display_start_addr. Pass architecture to
1317 tui_update_source_windows_with_addr.
1318
1319 * tui/tui-source.c: Include "objfiles.h".
1320 (tui_set_source_content): Initialize window architecture.
1321 (tui_show_symtab_source): Add GDBARCH parameter. Pass to
1322 tui_update_source_window_as_is
1323
1324 * tui/tui-source.h (tui_show_symtab_source): Add GDBARCH parameter.
1325
1326 * tui/tui-stack.c (tui_set_locator_info): Add GDBARCH parameter.
1327 Install locator architecture.
1328 (tui_set_locator_filename): Update call.
1329 (tui_show_frame_info): Pass architecture to tui_set_locator_info
1330 and subroutines.
1331
1332 * tui/tui-win.c (make_visible_with_new_height): Pass architecture
1333 to tui_update_source_window.
1334
1335 * tui/tui-winsource.c: Include "objfiles.h".
1336 (tui_display_main): Update call to tui_get_begin_asm_address.
1337 Pass architecture to tui_update_source_windows_with_addr.
1338 (tui_update_source_window): Add GDBARCH parameter. Pass to
1339 tui_update_source_window_as_is.
1340 (tui_update_source_window_as_is): Add GDBARCH parameter.
1341 Pass to tui_set_disassem_content.
1342 (tui_update_source_windows_with_addr): Add GDBARCH parameter.
1343 Pass to subroutines.
1344 (tui_update_source_windows_with_line): Pass objfile architecture
1345 to subroutines.
1346 (tui_horizontal_source_scroll): Pass architecture to
1347 tui_update_source_window_as_is.
1348
1349 * tui/tui-winsource.h (tui_update_source_window): Add GDBARCH
1350 parameter.
1351 (tui_update_source_window_as_is): Likewise.
1352 (tui_update_source_windows_with_addr): Likewise.
1353
1354 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1355
1356 * breakpoint.h (struct breakpoint): New member GDBARCH.
1357 * breakpoint.c: Include "arch-utils.h".
1358 (set_raw_breakpoint_without_location): Add GDBARCH parameter.
1359 Use it to set breakpoint architecture.
1360 (set_raw_breakpoint): Add GDBARCH parameter.
1361 (create_internal_breakpoint): Likewise.
1362 (create_catchpoint): Likewise.
1363 (create_fork_vfork_event_catchpoint): Likewise.
1364 (create_breakpoint): Likewise.
1365 (create_breakpoints): Likewise.
1366 (break_command_really): Likewise.
1367 (create_ada_exception_breakpoint): Likewise.
1368 Update local callers to pass architecture:
1369 (create_internal_breakpoint): Update.
1370 (create_overlay_event_breakpoint): Update.
1371 (create_longjmp_master_breakpoint): Update.
1372 (create_thread_event_breakpoint): Update.
1373 (create_solib_event_breakpoint): Update.
1374 (create_catchpoint): Update.
1375 (create_fork_vfork_event_catchpoint): Update.
1376 (set_momentary_breakpoint): Update.
1377 (clone_momentary_breakpoint): Update.
1378 (create_breakpoint): Update.
1379 (create_breakpoints): Update.
1380 (break_command_really): Update.
1381 (break_command_1): Update.
1382 (set_breakpoint): Update.
1383 (watch_command_1): Update.
1384 (catch_fork_command_1): Update.
1385 (catch_exec_commnd_1): Update.
1386 (handle_gnu_v3_exceptions): Update.
1387 (create_ada_exception_breakpoint): Update.
1388 (catch_ada_exception_command): Update.
1389 (catch_assert_command): Update.
1390 (trace_command): Update.
1391
1392 * breakpoint.h (struct bp_location): New member GDBARCH.
1393 * breakpoint.c (get_sal_arch): New function.
1394 (set_raw_breakpoint): Set location architecture.
1395 (add_location_to_breakpoint): Likewise.
1396 (clone_momentary_breakpoint): Likewise.
1397 (watch_command_1): Likewise.
1398 (update_watchpoint): Likewise.
1399 (bp_loc_is_permanent): Use location architecture instead of
1400 current_gdbarch.
1401 (adjust_breakpoint_address): Add GDBARCH parameter; use it
1402 instead of current_gdbarch.
1403 Update callers of adjust_breakpoint_address to pass
1404 breakpoint location architecture:
1405 (set_raw_breakpoint): Update.
1406 (watch_command_1): Update.
1407
1408 * tracepoint.c: (collect_symbol): Add GDBARCH parameter, use instead
1409 of current_gdbarch.
1410 (add_local_symbols): Add GDBARCH parameter. Pass to collect_symbol.
1411 (encode_actions): Pass tracepoint architecture to add_local_symbols
1412 (encode_actions): Use tracepoint architecture instead of
1413 current_gdbarch. Pass it to add_local_symbols and collect_symbol.
1414
1415 * breakpoint.h (struct breakpoint_ops): Replace last_addr parameter
1416 of print_one callback with last_loc.
1417 * breakpoint.c (print_one_breakpoint_location): Replace last_addr
1418 parameter with last_loc.
1419 (print_one_breakpoint): Likewise.
1420 (do_captured_breakpoint_query): Update call.
1421 (breakpoint_1): Pass last_loc instead of last_addr to
1422 print_one_breakpoint. Pass last location architecture instead of
1423 current_gdbarch to set_next_address.
1424 Update all implementations of the print_one callback:
1425 * breakpoint.c (print_one_catch_fork): Update.
1426 (print_one_catch_vfork): Update.
1427 (print_one_catch_exec): Update.
1428 (print_one_exception_catchpoint): Update.
1429 * ada-lang.c (print_one_exception): Update.
1430 (print_one_catch_exception): Update.
1431 (print_one_catch_exception_unhandled): Update.
1432 (print_one_catch_assert): Update.
1433
1434 * breakpoint.c (print_one_breakpoint_location): Add PRINT_ADDRESS_BITS
1435 parameter. Use it instead of gdbarch_addr_bit (current_gdbarch).
1436 (print_one_breakpoint): Add PRINT_ADDRESS_BITS parameter and pass it
1437 to print_one_breakpoint_location.
1438 (breakpoint_address_bits): New function.
1439 (do_captured_breakpoint_query): Compute number of address bits to print
1440 and pass it to print_one_breakpoint.
1441 (breakpoint_1): Likewise. Use it instead of current_gdbarch.
1442
1443 * breakpoint.h (create_thread_event_breakpoint): Add GDBARCH.
1444 * breakpoint.c (create_thread_event_breakpoint): Likewise.
1445 Update callers to create_thread_event_breakpoint:
1446 * aix-thread.c (pd_enable): Update.
1447 * linux-thread-db.c (enable_thread_event): Update.
1448
1449 * breakpoint.h (create_solib_event_breakpoint): Add GDBARCH.
1450 * breakpoint.c (create_solib_event_breakpoint): Likewise.
1451 Update callers to create_solib_event_breakpoint:
1452 * solib-frv.c (enable_break, enable_break2): Update.
1453 * solib-pa64.c (pa64_solib_create_inferior_hook): Update.
1454 * solib-som.c (som_solib_create_inferior_hook): Update.
1455 * solib-darwin.c (darwin_solib_create_inferior_hook): Update.
1456 * solib-svr4.c (enable_break): Update.
1457
1458 * breakpoint.h (insert_single_step_breakpoint): Add GDBARCH.
1459 * breakpoint.c (insert_single_step_breakpoint): Likewise.
1460 Update callers to insert_single_step_breakpoint:
1461 * alpha-tdep.c (alpha_software_single_step): Update.
1462 * arm-linux-tdep.c (arm_linux_software_single_step): Update.
1463 * arm-tdep.c (arm_software_single_step): Update.
1464 * cris-tdep.c (cris_software_single_step): Update.
1465 * rs6000-aix-tdep.c (rs6000_software_single_step): Update.
1466 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Update.
1467 * sparc-tdep.c (sparc_software_single_step): Update.
1468 * spu-tdep.c (spu_software_single_step): Update.
1469 * mips-tdep.c (deal_with_atomic_sequence): Add GDBARCH parameter.
1470 Pass it to insert_single_step_breakpoint.
1471 (mips_software_single_step): Pass architecture to
1472 deal_with_atomic_sequence and insert_single_step_breakpoint.
1473
1474 * breakpoint.h (deprecated_insert_raw_breakpoint): Add GDBARCH.
1475 (deprecated_remove_raw_breakpoint): Likewise.
1476 * breakpoint.c (deprecated_insert_raw_breakpoint): Add GDBARCH.
1477 (deprecated_remove_raw_breakpoint): Likewise.
1478 Update callers to deprecated_insert_raw_breakpoint and
1479 deprecated_remove_raw_breakpoint:
1480 * breakpoint.c (single_step_gdbarch): New static variable.
1481 (insert_single_step_breakpoint): Pass GDBARCH parameter to
1482 deprecated_insert_raw_breakpoint. Store it in single_step_gdbarch.
1483 (remove_single_step_breakpoints): Pass architecture stored in
1484 single_step_gdbarch to deprecated_remove_raw_breakpoint.
1485 * rs6000-nat.c (exec_one_dummy_insn): Update.
1486 * solib-irix.c (enable_break, disable_break): Update.
1487 * procfs.c (procfs_mourn_inferior): Update.
1488 (remove_dbx_link_breakpoint): Update.
1489
1490 * breakpoint.h (set_breakpoint): Add GDBARCH parameter.
1491 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
1492 * breakpoint.c (set_breakpoint): Add GDBARCH parameter.
1493 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
1494 Update callers to set_breakpoint, set_momentary_breakpoint and
1495 set_momentary_breakpoint_at_pc:
1496 * breakpoint.c (set_momentary_breakpoint_at_pc): Update.
1497 (until_break_command): Update.
1498 * infcall.c (call_function_by_hand): Update.
1499 * infcmd.c (finish_backward, finish_forward): Update.
1500 * infrun.c (insert_step_resume_breakpoint_at_sal): Add GDBARCH
1501 parameter. Pass it to set_momentary_breakpoint.
1502 (insert_longjmp_resume_breakpoint): Add GDBARCH parameter.
1503 Pass it to set_momentary_breakpoint_at_pc.
1504 (handle_inferior_event): Update.
1505 (insert_step_resume_breakpoint_at_frame): Update.
1506 (insert_step_resume_breakpoint_at_caller): Update..
1507 * mi/mi-cmd-break.c: Include "arch-utils.h".
1508 (mi_cmd_break_insert): Update.
1509
1510 * target.h (struct target_ops): Add GDBARCH parameter to
1511 to_insert_breakpoint, to_remove_breakpoint, to_insert_hw_breakpoint,
1512 and to_remove_hw_breakpoint members.
1513 (target_insert_breakpoint, target_remove_breakpoint,
1514 target_insert_hw_breakpoint, target_remove_hw_breakpoint): Add GDBARCH
1515 parameter, pass to target routine.
1516 (memory_remove_breakpoint, memory_insert_breakpoint): Add GDBARCH
1517 parameter.
1518 * target.c (debug_to_insert_breakpoint, debug_to_remove_breakpoint,
1519 debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint): Add
1520 GDBARCH parameter, pass to target routine.
1521 (update_current_target): Update function signature.
1522 * breakpoint.c (insert_bp_location, remove_breakpoint,
1523 deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint):
1524 Pass architecture to target_ routines.
1525 Update all implementations of the target breakpoint routines to take
1526 GDBARCH parameter and use it instead of GDBARCH as appropriate:
1527 * corelow.c (ignore): Update.
1528 * exec.c (ignore): Update.
1529 * mem-break.c (memory_insert_breakpoint): Update.
1530 (memory_remove_breakpoint): Update.
1531 * monitor.c (monitor_insert_breakpoint): Update.
1532 (monitor_remove_breakpoint): Update.
1533 * record.c (record_insert_breakpoint): Update.
1534 (record_beneath_to_insert_breakpoint): Update.
1535 (record_remove_breakpoint): Update.
1536 (record_beneath_to_remove_breakpoint): Update.
1537 * remote.c (remote_insert_breakpoint): Update.
1538 (remote_remove_breakpoint): Update.
1539 (remote_insert_hw_breakpoint): Update.
1540 (remote_remove_hw_breakpoint): Update.
1541 * remote-m32r-sdi.c (m32r_insert_breakpoint): Update.
1542 (m32r_remove_breakpoint): Update.
1543 * remote-mips.c (mips_insert_breakpoint): Update.
1544 (mips_remove_breakpoint): Update.
1545 * i386-nat.c (i386_insert_hw_breakpoint): Update.
1546 (i386_remove_hw_breakpoint): Update.
1547 * nto-procfs.c (procfs_insert_breakpoint): Update.
1548 (procfs_remove_breakpoint): Update.
1549 (procfs_insert_hw_breakpoint): Update.
1550 (procfs_remove_hw_breakpoint): Update.
1551
1552 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1553
1554 * frame.h (frame_unwind_arch): New.
1555 (frame_unwind_caller_arch): Likewise.
1556 * frame-unwind.h (frame_prev_arch_ftype): New type.
1557 (struct frame_unwind): New member prev_arch.
1558 * frame.c (struct frame_info): New member prev_arch.
1559 (frame_unwind_arch): New function.
1560 (frame_unwind_caller_arch): Likewise..
1561 (get_frame_arch): Reimplement in terms of frame_unwind_arch.
1562 * sentinel-frame.c (sentinel_frame_prev_arch): New function.
1563 (sentinel_frame_unwinder): Install it.
1564
1565 * frame.c (frame_pc_unwind): Use frame_unwind_arch instead
1566 of get_frame_arch.
1567 (frame_unwind_register_value): Likewise.
1568 (frame_unwind_register_signed): Likewise.
1569 (frame_unwind_register_unsigned): Likewise.
1570 * frame-unwind.c (frame_unwind_got_optimized): Likewise.
1571 (frame_unwind_got_register): Likewise.
1572 (frame_unwind_got_constant): Likewise.
1573 (frame_unwind_got_bytes): Likewise.
1574 (frame_unwind_got_address): Likewise.
1575
1576 * frame.h (enum frame_type): New value ARCH_FRAME.
1577 * frame.c (fprint_frame_type): Handle ARCH_FRAME.
1578 * stack.c (print_frame_info): Likewise.
1579
1580 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1581
1582 * target.h (struct target_ops): New member to_thread_architecture.
1583 (target_thread_architecture): New macro.
1584 * target.c (update_current_target): Inherit to_thread_architecture.
1585 (default_thread_architecture): New function.
1586 (debug_to_thread_architecture): New function.
1587 (setup_target_debug): Handle to_thread_architecture.
1588
1589 * regcache.h (get_thread_arch_regcache): New.
1590 * regcache.c (struct regcache_list): New data type.
1591 (current_regcache): Hold regcache list instead of single regcache.
1592 (current_thread_ptid, current_thread_arch): New static variables.
1593 (get_thread_arch_regcache): New function.
1594 (get_thread_regcache): Use it. Call target_thread_architecture.
1595 (regcache_thread_ptid_changed): Update to current_regcache changes.
1596 (registers_changed): Likewise. Reset current_thread_arch and
1597 current_thread_ptid.
1598
1599 * remote.c (remote_wait): Access target registers in target_gdbarch.
1600 * linux-nat.c (linux_nat_do_thread_registers): Likewise.
1601 * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
1602 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
1603 * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
1604 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
1605 * solib-svr4.c (enable_break): Likewise.
1606 (svr4_relocate_main_executable): Likewise.
1607
1608 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1609
1610 * python/python-internal.h (struct language_defn): Declare.
1611 (python_gdbarch, python_language): Likewise.
1612 (ensure_python_env): Add prototype.
1613 (make_cleanup_py_restore_gil): Remove prototype.
1614
1615 * python/python.c: Include "arch-utils.h", "value.h" and "language.h".
1616 (python_gdbarch, python_language): New global variables.
1617 (struct python_env): New data type.
1618 (ensure_python_env, restore_python_env): New functions.
1619 (eval_python_from_control_command): Call ensure_python_env to
1620 install current architecture and language.
1621 (python_command, gdbpy_new_objfile): Likewise.
1622 * python/python-cmd.c: Include "arch-utils.h" and "language.h".
1623 (cmdpy_destroyer, cmdpy_function, cmdpy_completer): Call
1624 ensure_python_env.
1625 * python/python-type.c (clean_up_objfile_types): Likewise.
1626 * python/python-objfile.c: Include "language.h".
1627 (clean_up_objfile): Call ensure_python_env.
1628 * python/python-prettyprint.c (apply_val_pretty_printer): Likewise.
1629 (apply_varobj_pretty_printer): Do not call PyGILState_Ensure.
1630 * varobj.c (varobj_ensure_python_env): New helper function.
1631 (varobj_get_display_hint, update_dynamic_varobj_children,
1632 install_default_visualizer, varobj_set_visualizer, free_variable,
1633 value_get_print_value): Call it.
1634 (value_get_print_value): Add varobj argument instead of pretty
1635 printer argument. Update all callers.
1636
1637 * python/python-utils.c (py_gil_restore, make_cleanup_py_restore_gil):
1638 Remove.
1639
1640 * value.h (internal_function_fn): Add GDBARCH and LANGUAGE argument.
1641 (call_internal_function): Likewise.
1642 * value.c (call_internal_function): Likewise. Pass to handler.
1643 * eval.c (evaluate_subexp_standard): Update call.
1644 * python/python-function.c: Include "language.h".
1645 (fnpy_call): Add GDBARCH and LANGAUAGE arguments and call
1646 make_cleanup_python_env.
1647
1648 * python/python-value.c (builtin_type_pyint, builtin_type_pyfloat,
1649 builtin_type_pylong, builtin_type_pybool, builtin_type_pychar,
1650 valpy_str): Use python_gdbarch and python_language instead of
1651 current_gdbarch and current_language.
1652 * python/python-type.c (typy_lookup_typename): Likewise.
1653
1654 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1655
1656 * arch-utils.c (selected_byte_order): Return target_byte_order_user.
1657 (show_endian): Use target_byte_order_user if specified; otherwise
1658 use get_current_arch () instead of current_gdbarch.
1659 (show_architecture): Use set_architecture_string if specified;
1660 otherwise use get_current_arch () instead of current_gdbarch.
1661 (get_current_arch): New function.
1662 * arch-utils.h (get_current_arch): Add prototype.
1663
1664 * osabi.c (show_osabi): Use get_current_arch () instead of
1665 current_gdbarch.
1666
1667 * findcmd.c: Include "arch-utils.h".
1668 (parse_find_args): Add BIG_P argument. Use it instead of byte order
1669 of current_gdbarch.
1670 (find_command): Use get_current_arch () instead of current_gdbarch.
1671 Pass byte order to parse_find_args.
1672
1673 * maint.c: Include "arch-utils.h".
1674 (maintenance_print_architecture): Use get_current_arch () instead
1675 of current_gdbarch.
1676
1677 * reggroups.c: Include "arch-utils.h".
1678 (maintenance_print_reggroups): Use get_current_arch () instead
1679 of current_gdbarch.
1680
1681 * symfile.c: Include "arch-utils.h".
1682 (overlay_load_command): Use get_current_arch () instead of
1683 current_gdbarch.
1684
1685 * value.c: Include "arch-utils.h".
1686 (show_convenience): Use get_current_arch () instead of
1687 current_gdbarch.
1688
1689 * tui/tui-regs.c: Include "arch-utils.h".
1690 (tui_reg_next_command): Use get_current_arch () instead of
1691 current_gdbarch.
1692
1693 * mi/mi-main.c: Include "arch-utils.h".
1694 (mi_cmd_data_read_memory): Use get_current_arch () instead of
1695 current_gdbarch.
1696
1697 * parse.c: Include "arch-utils.h".
1698 (parse_exp_in_context): Use get_current_arch () instead of
1699 current_gdbarch.
1700
1701 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1702
1703 * gdbtypes.c (make_pointer_type, make_reference_type,
1704 smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
1705 Use type architecture instead of current_gdbarch.
1706
1707 * gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
1708 Add GDBARCH paramter.
1709 * gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
1710 Add GDBARCH parameter. Use it instead of current_gdbarch.
1711 * c-typeprint.c (c_type_print_modifier): Update call.
1712 * parse.c (push_type_address_space): Likewise.
1713
1714 * findvar.c (extract_typed_address, store_typed_address): Use type
1715 architecture instead of current_gdbarch.
1716
1717 * value.c (value_as_address, unpack_field_as_long): Use type architecture
1718 instead of current_gdbarch.
1719
1720 * doublest.c (floatformat_from_length): Add GDBARCH argument. Use it
1721 instead of current_gdbarch.
1722 (floatformat_from_type): Pass type architecture.
1723
1724 * infcall.c (find_function_addr): Use type architecture instead
1725 of current_gdbarch.
1726
1727 * valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
1728 value_bit_index): Use type architecture instead of current_gdbarch.
1729 * valops.c (value_cast, value_slice): Likewise.
1730
1731 * value.h (modify_field): Add TYPE argument.
1732 * value.c (modify_field): Add TYPE argument. Use type architecture
1733 instead of current_gdbarch.
1734 (set_internalvar_component): Likewise.
1735 * eval.c (evaluate_struct_tuple): Update call.
1736 * valops.c (value_assign): Likewise.
1737 * ada-lang.c (modify_general_field): Likewise. Add TYPE argument.
1738 (make_array_descriptor): Update calls.
1739 (move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of
1740 current_gdbarch.
1741 (ada_value_assign, value_assign_to_component): Update calls.
1742 (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
1743 value_assign_to_component): Use type arch instead of current_gdbarch.
1744
1745 * printcmd.c (float_type_from_length): Remove GDBARCH argument,
1746 use type architecture instead.
1747 (print_scalar_formatted, printf_command): Update calls. Use type
1748 architecture instead of current_gdbarch.
1749 * valprint.c (val_print_type_code_int): Use type architecture
1750 instead of current_gdbarch.
1751 * varobj.c (value_get_print_value): Likewise.
1752 * python/python-prettyprint.c (print_string_repr): Add GDBARCH
1753 argument. Use it instead of current_gdbarch.
1754 (apply_val_pretty_printer): Update call.
1755
1756 * ada-valprint.c (ada_val_print_1): Use type architecture instead
1757 of current_gdbarch.
1758 * c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
1759 Use it instead of current_gdbarch.
1760 (c_val_print): Update calls passing type architecture.
1761 * f-valprint.c (f_val_print): Use type architecture instead of
1762 current_gdbarch.
1763 * jv-valprint (java_value_print): Likewise.
1764 * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
1765 Use it instead of current_gdbarch.
1766 (print_unpacked_pointer): Update calls passing type architecture.
1767 * scm-valprint.c (scm_scmval_print): Use type architecture instead of
1768 current_gdbarch.
1769
1770 * gnu-v3-abi.c (get_class_arch): Remove.
1771 (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove
1772 special-case check for Java classes.
1773 (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
1774 gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
1775 Use get_type_arch instead of get_class_arch.
1776
1777 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1778
1779 * gdbtypes.h (TYPE_OBJFILE_OWNED, TYPE_OWNER): New macros.
1780 (TYPE_OBJFILE, TYPE_ALLOC, TYPE_ZALLOC): Reimplement.
1781 (alloc_type_arch): Add prototype.
1782 (alloc_type_copy): Likewise.
1783 (get_type_arch): Likewise.
1784 (arch_type): Likewise.
1785 (arch_integer_type): Likewise.
1786 (arch_character_type): Likewise.
1787 (arch_boolean_type): Likewise.
1788 (init_float_type): Remove, replace by ...
1789 (arch_float_type): ... this.
1790 (init_complex_type): Remove, replace by ...
1791 (arch_complex_type): ... this.
1792 (init_flags_type): Remove, replace by ...
1793 (arch_flags_type): ... this.
1794 (init_composite_type): Remove, replace by ...
1795 (arch_composite_type): ... this.
1796
1797 * gdbtypes.c (alloc_type): No longer support NULL objfile.
1798 (init_type): Likewise.
1799 (alloc_type_arch): New function.
1800 (alloc_type_copy): New function.
1801 (get_type_arch): New function.
1802
1803 (smash_type): Preserve type ownership information.
1804 (make_pointer_type, make_reference_type, make_function_type,
1805 smash_to_memberptr_type, smash_to_method_type): No longer
1806 preserve OBJFILE across smash_type calls.
1807 (make_pointer_type, make_reference_type, make_function_type,
1808 lookup_memberptr_type, lookup_methodptr_type, allocate_stub_method,
1809 create_range_type, create_array_type, create_set_type, copy_type):
1810 Use alloc_type_copy when allocating types.
1811 (check_typedef): Use alloc_type_arch.
1812 (copy_type_recursive): Likewise. Preserve type ownership data
1813 after copying type.
1814 (recursive_dump_type): Dump type ownership data.
1815 (alloc_type_instance): Update type ownership check.
1816 (copy_type, copy_type_recursive): Likewise.
1817
1818 (arch_type): New function.
1819 (arch_integer_type): Likewise.
1820 (arch_character_type): Likewise.
1821 (arch_boolean_type): Likewise.
1822 (init_float_type): Remove, replace by ...
1823 (arch_float_type): ... this.
1824 (init_complex_type): Remove, replace by ...
1825 (arch_complex_type): ... this.
1826 (init_flags_type): Remove, replace by ...
1827 (arch_flags_type): ... this.
1828 (append_flags_type_flag): Move down.
1829 (init_composite_type): Remove, replace by ...
1830 (arch_composite_type): ... this.
1831 (append_composite_type_field_aligned,
1832 append_composite_type_field): Move down.
1833
1834 * gdbarch.c (gdbtypes_post_init): Allocate all types
1835 using per-architecture routines.
1836 * ada-lang.c (ada_language_arch_info): Likewise.
1837 * f-lang.c (build_fortran_types): Likewise.
1838 * jv-lang.c (build_java_types): Likewise.
1839 * m2-lang.c (build_m2_types): Likewise.
1840 * scm-lang.c (build_scm_types): Likewise.
1841
1842 * ada-lang.c (ada_type_of_array): Use alloc_type_copy.
1843 (packed_array_type): Likewise.
1844 (ada_template_to_fixed_record_type_1): Likewise.
1845 (template_to_static_fixed_type): Likewise.
1846 (to_record_with_fixed_variant_part): Likewise.
1847 (to_fixed_variant_branch_type): Likewise.
1848 (to_fixed_array_type): Likewise.
1849 (to_fixed_range_type): Likewise.
1850 (empty_record): Use type instead of objfile argument.
1851 Use alloc_type_copy.
1852 (to_fixed_variant_branch_type): Update call to empty_record.
1853 * jv-lang.c (type_from_class): Use alloc_type_arch.
1854
1855 * arm-tdep.c (arm_ext_type): Allocate per-architecture type.
1856 * i386-tdep.c (i386_eflags_type, i386_mxcsr_type, i387_ext_type,
1857 i386_mmx_type, i386_sse_type): Likewise.
1858 * ia64-tdep.c (ia64_ext_type): Likewise.
1859 * m32c-tdep.c (make_types): Likewise.
1860 * m68k-tdep.c (m68k_ps_type, m68881_ext_type): Likewise.
1861 * rs6000-tdep.c (rs6000_builtin_type_vec64,
1862 rs6000_builtin_type_vec128): Likewise.
1863 * sparc-tdep.c (sparc_psr_type, sparc_fsr_type): Likewise.
1864 * sparc64-tdep.c (sparc64_pstate_type, sparc64_fsr_type,
1865 sparc64_fprs_type): Likewise.
1866 * spu-tdep.c (spu_builtin_type_vec128): Likewise.
1867 * xtensa-tdep.c (xtensa_register_type): Likewise.
1868 * linux-tdep.c (linux_get_siginfo_type): Likewise.
1869 * target-descriptions.c (tdesc_gdb_type): Likewise.
1870 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1871
1872 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1873
1874 * i386-tdep.h (struct gdbarch_tdep): Add i386_eflags_type and
1875 i386_mxcsr_type members.
1876 (i386_eflags_type): Make into function.
1877 (i386_mxcsr_type): Likewise.
1878 * i386-tdep.c (i386_eflags_type): Make into function.
1879 (i386_mxcsr_type): Likewise.
1880 (i386_register_type): Update uses.
1881 (i386_init_types): Remove.
1882 (_initialize_i386_tdep): Do not call it.
1883 * amd64-tdep.c (amd64_register_type): Update uses.
1884
1885 * m68k-tdep.h (struct gdbarch_tdep): Add m68k_ps_type member.
1886 * m68k-tdep.c (m68k_ps_type): Make into function.
1887 (m68k_register_type): Update use.
1888 (m68k_init_types): Remove.
1889 (_initialize_m68k_tdep): Do not call it.
1890
1891 * sparc-tdep.h (struct gdbarch_tdep): Add sparc_psr_type,
1892 sparc_fsr_type, sparc64_pstate_type, sparc64_fsr_type, and
1893 sparc64_fprs_type members.
1894 * sparc-tdep.c (sparc_psr_type): Make into function.
1895 (sparc_fsr_type): Likewise.
1896 (sparc32_register_type): Update uses.
1897 (sparc_init_types): Remove.
1898 (_initialize_sparc_tdep): Do not call it.
1899 * sparc64-tdep.c (sparc64_pstate_type): Make into function.
1900 (sparc64_fsr_type): Likewise.
1901 (sparc64_fprs_type): Likewise.
1902 (sparc64_register_type): Update uses.
1903 (sparc64_init_types): Remove.
1904 (_initialize_sparc64_tdep): Likewise.
1905
1906 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1907
1908 * gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
1909 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
1910 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
1911 (init_float_type, init_complex_type): Add prototypes.
1912 * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
1913 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
1914 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
1915 (_initialize_gdbtypes): Do not initialize them.
1916 (build_flt): Rename to ...
1917 (init_float_type): ... this. Make global.
1918 (build_complex): Rename to ...
1919 (init_complex_type): ... this. Make global. Remove BIT argument.
1920 (gdbtypes_post_init): Update calls.
1921
1922 * ada-lang.c (ada_language_arch_info): Use init_float_type.
1923 * jv-lang.c (build_java_types): Likewise.
1924 * m2-lang.c (build_m2_types): Likewise.
1925 * f-lang.c (build_fortran_types): Use init_float_type and
1926 init_complex_type.
1927
1928 * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
1929 of using builtin_type_ieee_single, builtin_type_ieee_double, or
1930 builtin_type_arm_ext.
1931
1932 * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
1933 * ia64-tdep.c (builtin_type_ia64_ext): Remove.
1934 (_initialize_ia64_tdep): Do not initialize it.
1935 (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
1936 Move up.
1937 (ia64_ext_type): New function.
1938 (ia64_register_reggroup_p, ia64_convert_register_p,
1939 ia64_register_to_value, ia64_value_to_register,
1940 ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
1941 instead of builtin_type_ia64_ext.
1942
1943 * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
1944 (i387_ext_type): Add prototype.
1945 * i386-tdep.c (i387_ext_type): New function.
1946 (i386_extract_return_value, i386_store_return_value,
1947 i386_register_type): Use it instead of builtin_type_i387_ext.
1948 * amd64-tdep.c (amd64_register_type): Likewise.
1949 * i387-tdep.c (print_i387_value, i387_register_to_value,
1950 i387_value_to_register): Likewise.
1951 (print_i387_value, print_i387_ext): Add GDBARCH argument.
1952 (print_i387_ext, i387_print_float_info): Pass to subroutines.
1953
1954 * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
1955 * m68k-tdep.c (m68881_ext_type): New function.
1956 (m68k_register_type, m68k_convert_register_p): Use it instead
1957 of builtin_type_m68881_ext.
1958
1959 * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
1960 * arm-tdep.c (arm_ext_type): New function.
1961 (arm_register_type): Use it instead of builtin_type_arm_ext.
1962
1963 * alpha-tdep.c (alpha_register_type): Use builtin types
1964 instead of builtin_type_ieee_double.
1965
1966 * mips-tdep.c (mips_float_register_type, mips_double_register_type):
1967 Remove.
1968 (mips_register_type): Use builtin types instead of
1969 builtin_type_ieee_single and builtin_type_ieee_double.
1970 (mips_print_fp_register): Use builtin types instead of
1971 mips_float_register_type and mips_double_register_type.
1972
1973 * hppa-tdep.c (hppa32_register_type, hppa64_register_type):
1974 Use builtin types instead of builtin_type_ieee_single and
1975 builtin_type_ieee_double.
1976
1977 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1978
1979 * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
1980 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
1981 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
1982 builtin_type_int128, builtin_type_uint128): Remove.
1983 (struct builtin_type): New members builtin_int0, builtin_int8,
1984 builtin_uint8, builtin_int16, builtin_uint16, builtin_int32,
1985 builtin_uint32, builtin_int64, builtin_uint64, builtin_int128,
1986 and builtin_uint128.
1987 * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
1988 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
1989 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
1990 builtin_type_int128, builtin_type_uint128): Remove.
1991 (_initialize_gdbtypes): Do not initialize them.
1992 (gdbtypes_post_init): Initialize fixed-size integer types.
1993
1994 * dwarf2expr.c (unsigned_address_type, signed_address_type): Add
1995 GDBARCH argument. Return platform-specific type.
1996 (dwarf2_read_address, execute_stack_op): Update calls.
1997
1998 * target-descriptions.c (tdesc_gdb_type): Use platform-specific types
1999 instead of global builtin_int_... variables.
2000 * mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
2001 * printcmd.c (do_examine): Likewise.
2002 * jv-exp.y (parse_number): Likewise.
2003
2004 * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call,
2005 alpha_store_return_value): Likewise.
2006 * amd64-linux-tdep.c (amd64_linux_register_type): Likewise.
2007 * amd64-tdep.c (amd64_register_type): Likewise.
2008 * arm-tdep.c (arm_register_type): Likewise.
2009 * avr-tdep.c (avr_register_type): Likewise.
2010 * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
2011 * frv-tdep.c (frv_register_type): Likewise.
2012 * h8300-tdep.c h8300_register_type): Likewise.
2013 * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type,
2014 hppa64_register_type): Likewise.
2015 * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise.
2016 * iq2000-tdep.c (iq2000_register_type): Likewise.
2017 * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise.
2018 * m32r-tdep.c (m32r_register_type): Likewise.
2019 * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read,
2020 m68hc11_pseudo_register_write): Likewise.
2021 * m68k-tdep.c (m68k_register_type): Likewise.
2022 * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise.
2023 * mep-tdep.c (mep_register_type): Likewise.
2024 * mips-tdep.c (mips_register_type, mips_pseudo_register_type,
2025 mips_print_fp_register): Likewise.
2026 * moxie-tdep.c (moxie_register_type): Likewise.
2027 * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise.
2028 * rs6000-tdep.c (rs6000_builtin_type_vec64,
2029 rs6000_builtin_type_vec128): Likewise.
2030 * score-tdep.c (score_register_type): Likewise.
2031 * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments):
2032 Likewise.
2033 * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments):
2034 Likewise.
2035 * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
2036 * v850-tdep.c (v850_register_type): Likewise.
2037 * xstormy16-tdep.c (xstormy16_register_type): Likewise.
2038 * xtensa-tdep.c (xtensa_register_type): Likewise.
2039
2040 * mt-tdep.c (struct gdbarch_tdep): New data structure.
2041 (mt_gdbarch_init): Alloc TDEP structures.
2042 (mt_register_type): Cache coprocessor type in TDEP instead of
2043 static global variable.
2044
2045 * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member.
2046 * xtensa-tdep.c (type_entries): Remove.
2047 (xtensa_register_type): Cache fixed-size types in TDEP instead
2048 of in global variable.
2049
2050 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2051
2052 * gdbtypes.h (builtin_type_true_char): Remove.
2053 (builtin_type_true_unsigned_char): Likewise.
2054 (struct builtin_type): Add builtin_true_char and
2055 builtin_true_unsigned_char members.
2056 * gdbtypes.c (builtin_type_true_char): Remove.
2057 (builtin_type_true_unsigned_char): Likewise.
2058 (_initialize_gdbtypes): Do not initialize them.
2059 (gdbtypes_post_init): Initialize builtin_true_char and
2060 builtin_true_unsigned_char members of builtin_type.
2061
2062 * printcmd.c (print_scalar_formatted): Use builtin_type
2063 members instead of builtin_type_true_char and
2064 builtin_type_true_unsigned_char.
2065 * ada-valprint.c (ada_val_print_1): Likewise.
2066
2067 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2068
2069 * gdbtypes.h (builtin_type_void): Remove.
2070 * gdbtypes.c (builtin_type_void): Remove.
2071 (_initialize_gdbtypes): Do not initialize it.
2072
2073 (safe_parse_type): Add GDBARCH argument. Use it to construct
2074 void return type.
2075 (check_stub_method): Update call.
2076
2077 * infcall.c (call_function_by_hand): Use platform-specific type
2078 instead of builtin_type_void.
2079 * valops.c (value_cast): Use input void type instead of
2080 builtin_type_void.
2081
2082 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2083
2084 * ada-lang.c (assign_component): Use platform-specific integer type
2085 instead of builtin_type_int32 type.
2086 (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise.
2087
2088 * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type
2089 instead of builtin_type_int8 type.
2090 * valarith.c (value_x_unop): Likewise.
2091 * python/python-value.c (valpy_absolute): Avoid reference to
2092 builtin_type_int8 type.
2093
2094 * eval.c (evaluate_subexp_standard): Use platform-specific integer
2095 type instead of builtin_type_int8 as EVAL_SKIP return value type.
2096 * ada-lang.c (ada_evaluate_subexp): Likewise.
2097 * jv-lang.c (evaluate_subexp_java): Likewise.
2098 * m2-lang.c (evaluate_subexp_modula2): Likewise.
2099 * scm-lang.c (evaluate_exp): Likewise.
2100
2101 * value.h (value_bitstring): Add INDEX_TYPE argument.
2102 * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead
2103 of builtin_type_int32 as base range type.
2104 * eval.c (evaluate_subexp_standard): Update value_bitstring call.
2105
2106 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2107
2108 * gdbtypes.c (lookup_array_range_type): Add prototype.
2109 (lookup_string_range_type): Likewise.
2110 * gdbtypes.c (lookup_array_range_type): New function.
2111 (lookup_string_range_type): Likewise.
2112
2113 * ax-gdb.c (gen_repeat): Use lookup_array_range_type.
2114 * parse.c (follow_types): Likewise.
2115 * jv-lang.c (java_array_type): Likewise.
2116 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2117 * mt-tdep.c (mt_register_type): Likewise.
2118 * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
2119 * sh64-tdep.c (sh64_build_float_register_type): Likewise.
2120 * value.c (allocate_repeat_value): Likewise.
2121 * valops.c (value_array, value_cstring): Likewise.
2122 * valops.c (value_string): Use lookup_string_range_type.
2123
2124 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2125
2126 * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Remove
2127 redundant check for NULL TYPE_TARGET_TYPE.
2128 * m2-valprint.c (m2_print_long_set): Likewise.
2129 * p-valprint.c (pascal_type_print_base): Likewise.
2130
2131 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2132
2133 * printcmd.c (next_gdbarch): New static variable.
2134 (set_next_address, do_examine, x_command): Set it.
2135 (decode_format): Use 'a' size to indicate width of an address.
2136 (do_examine): Add GDBARCH argument. Handle 'a' size.
2137 (x_command): Pass architecture to do_examine.
2138 Error if called without argument the first time.
2139 (do_one_display): Pass architecture to do_examine.
2140
2141 (examine_i_type, examine_b_type, examine_h_type, examine_w_type,
2142 examine_g_type): Remove.
2143 (_initialize_printcmd): Do not initialize them.
2144 (do_examine): Use builin_type_int... instead of examine_..._type.
2145
2146 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2147
2148 * gdbtypes.h (struct builtin_type): Add internal_fn member.
2149 * gdbtypes.c (gdbtypes_post_init): Initialize it.
2150 * value.c (internal_fn_type): Remove.
2151 (_initialize_values): Do not initialize it.
2152
2153 * value.c (struct internalvar): Add enum internalvar_kind type and
2154 kind member. Restructure union internalvar_data type. Remove type,
2155 canonical, and make_value members.
2156 (init_if_undefined_command): Update for data structure changes.
2157 (create_internalvar): Likewise.
2158 (create_internalvar_type_lazy): Likewise.
2159 (get_internalvar_integer): Likewise.
2160 (get_internalvar_function): Likewise.
2161 (set_internalvar_component): Likewise.
2162 (set_internalvar): Likewise.
2163 (set_internalvar_integer): Likewise.
2164 (set_internalvar_function): Likewise.
2165 (clear_internalvar): Likewise.
2166 (add_internal_function): Likewise.
2167 (preserve_one_internalvar): New function.
2168 (preserve_values): Call it.
2169
2170 * value.h (value_of_internalvar): Add GDBARCH parameter.
2171 (internalvar_make_value): Likewise.
2172 * value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
2173 make_value callback. Use it to generate per-architecture result value
2174 types for internal variables with no pre-defined type. Update for data
2175 structure changes.
2176 (show_convenience): Pass architecture to value_of_internalvar.
2177 * eval.c (evaluate_subexp_standard): Likewise.
2178 * infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
2179 instead of current frame architecture. Return per-architecture type.
2180
2181 * value.h (set_internalvar_string): Add prototype.
2182 * value.c (set_internalvar_string): New function.
2183 * tracepoint.c (set_traceframe_context): Use it.
2184
2185 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2186
2187 * jv-lang.h (java_int_type, java_byte_type, java_short_type,
2188 java_long_type, java_boolean_type, java_char_type, java_float_type,
2189 java_double_type, java_void_type): Remove.
2190 (struct builtin_java_type): New data type.
2191 (builtin_java_type): Add prototype.
2192 (java_primitive_type): Add GDBARCH argument.
2193 (java_primitive_type_from_name): Likewise.
2194 (type_from_class): Likewise.
2195
2196 * jv-lang.c (java_int_type, java_byte_type, java_short_type,
2197 java_long_type, java_boolean_type, java_char_type, java_float_type,
2198 java_double_type, java_void_type): Remove.
2199
2200 (build_java_types, builtin_java_type): New functions.
2201 (java_type_data): New static variable.
2202 (_initialize_java_language): Initialize it. No longer initialize
2203 global types.
2204 (java_language_arch_info): Use per-architecture types.
2205
2206 (java_primitive_type): Add GDBARCH argument. Return per-architecture
2207 type instead of refering to global variable.
2208 (java_primitive_type_from_name): Add GDBARCH argument.
2209 (java_primitive_type_name): New function.
2210 (java_demangled_signature_length): Use it instead of
2211 java_primitive_type_from_name.
2212 (java_demangled_signature_copy): Likewise.
2213
2214 (type_from_class): Add GDBARCH argument. Pass to java_link_class_type,
2215 java_primitive_type, and recursive type_from_class call.
2216 (java_link_class_type): Add GDBARCH argument. Pass to type_from_class
2217 calls. Use per-architecture types instead of global types.
2218
2219 * jv-exp.y (parse_java_type): New define.
2220 Use per-architecture types instead of global types througout.
2221
2222 * jv-valprint.c (java_value_print): Pass architecture to
2223 type_from_class and java_primitive_type_from_name. Use per-
2224 architecture types instead of global types.
2225
2226 2009-07-01 Doug Evans <dje@google.com>
2227
2228 * NEWS: Mention biarch amd64-linux gdbserver and hardware watchpoint
2229 support for i386-linux, amd64-linux, and i386-win32 builds of
2230 gdbserver.
2231
2232 2009-07-01 Nick Roberts <nickrob@snap.net.nz>
2233
2234 * Makefile.in (HFILES_NO_SRCDIR): Remove entries for deleted files.
2235
2236 2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
2237
2238 * Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
2239 (check//%): Construct FORCE_PARALLEL for the sub-make. Extend the
2240 comment for it.
2241
2242 2009-06-30 Paul Pluzhnikov <ppluzhnikov@google.com>
2243
2244 gdb/10275
2245 * dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
2246 cfa_how and cfa_exp into regs and adjust users.
2247
2248 2009-06-30 Daniel Jacobowitz <dan@codesourcery.com>
2249
2250 * dwarf2read.c (inherit_abstract_dies): Work around GCC PR 40573.
2251
2252 2009-06-30 Vladimir Prus <vladimir@codesourcery.com>
2253
2254 * mi/mi-cmd-stack.c (parse_print_values): New.
2255 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Use the above.
2256
2257 2009-06-30 Vladimir Prus <vladimir@codesourcery.com>
2258
2259 * varobj.c (varobj_get_type): Use type_to_string.
2260
2261 2009-06-29 Pedro Alves <pedro@codesourcery.com>
2262
2263 * infrun.c (handle_inferior_event): Context switch to the new
2264 thread when resuming for a new_thread_event.
2265
2266 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2267
2268 * ada-lang.h (ada_convert_actual): Add GDBARCH argument.
2269 * ada-lang.c (convert_actual): Remove stale prototype.
2270 (ensure_lval, make_array_descriptor, ada_convert_actual):
2271 Add GDBARCH argument and pass through to subroutine calls.
2272 (ensure_lval): Use GDBARCH instead of current_gdbarch.
2273 * infcall.c (value_arg_coerce): Update ada_convert_actual call.
2274
2275 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2276
2277 * ada-lang.c (resolve): Use per-architecture void type instead
2278 of platform-independent one.
2279 (ada_evaluate_subexp) [STRUCTOP_STRUCT]: Likewise.
2280 (ada_resolve_function): Reimplement fallback logic to avoid
2281 explicit reference to builtin_type_void.
2282
2283 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2284
2285 * ada-valprint.c (ada_print_scalar): Accept NULL type argument
2286 to indicate scalar should be printed as default integer.
2287 (print_optional_low_bound): Pass NULL to ada_print_scalar to
2288 indicate default integer output.
2289 * ada-typeprint.c (print_range, print_range_bound): Likewise.
2290 (print_choices): Likewise. Thus, accept NULL as val_type.
2291 * ada-lang.c (ada_variant_discrim_type): Return NULL when failed
2292 to look up controlling discriminant name.
2293
2294 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2295
2296 * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
2297 Fall back to orig_type as index type if symbol lookup fails.
2298 Allocate result types from ORIG_TYPE's objfile.
2299 (ada_array_bound_from_type, to_fixed_array_type,
2300 ada_evaluate_subexp): Pass original index type to
2301 to_fixed_range_type. Do not pass objfile.
2302
2303 * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
2304 Fall back to orig_type as index type if symbol lookup fails.
2305 (print_array_type, ada_print_type): Pass original index type
2306 to print_range_type_named.
2307
2308 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2309
2310 * ada-lang.c (ada_index_type): Update comment.
2311
2312 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2313
2314 * ada-lang.c (ada_index_type): Make static. Add NAME argument.
2315 Throw error on invalid input arguments. Return NULL if unable
2316 to determine index type.
2317
2318 (ada_array_bound_from_type): Remove TYPEP argument.
2319 (ada_array_bound): Make static. Return LONGEST instead of value.
2320 Update for ada_array_bound_from_type change.
2321 (ada_array_length): Return LONGEST instead of value.
2322 Update for ada_array_bound_from_type change.
2323 (make_array_descriptor): Update for ada_array_bound change.
2324
2325 (ada_evaluate_subexp) [OP_ATR_RANGE, OP_ATR_FIRST, OP_ATR_LAST,
2326 OP_ATR_LENGTH]: Update for ada_array_bound_from_type,
2327 ada_array_bound, ada_array_length, ada_index_type changes.
2328 Always use ada_index_type to compute result type; fall back
2329 to architecture-specific integer type if ada_index_type fails.
2330
2331 * ada-lang.h (ada_index_type): Remove prototype.
2332 (ada_array_bound): Likewise.
2333
2334 2009-06-29 Pedro Alves <pedro@codesourcery.com>
2335
2336 * dbxread.c (read_dbx_symtab): Clear has_line_numbers when ending
2337 a psymtab.
2338
2339 2009-06-29 Tom Tromey <tromey@redhat.com>
2340
2341 * README: Mention parallel check.
2342
2343 2009-06-29 Sami Wagiaalla <swagiaal@redhat.com>
2344
2345 * dwarf2read.c (read_import_statement): Properly set import location
2346 and destination.
2347 * cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
2348 inner, char* outer arguments. Updated callers.
2349
2350 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2351
2352 * value.h (value_subscript, value_subscripted_rvalue,
2353 value_bitstring_subscript, value_ptradd): Use LONGEST instead
2354 of value as type of the index argument.
2355 (value_ptrsub): Remove.
2356 * valarith.c (value_subscript, value_subscripted_rvalue,
2357 value_bitstring_subscript, value_ptradd): Use LONGEST instead
2358 of value as type of the index argument.
2359 (value_ptrsub): Remove.
2360
2361 * wrapper.h (gdb_value_subscript): Use LONGEST instead of
2362 value as type of the index argument.
2363 * wrapper.c (gdb_value_subscript): Likewise.
2364
2365 Update calls to gdb_value_subscript, value_subscript,
2366 value_subscripted_rvalue, value_bitstring_subscript and
2367 value_ptradd to use LONGEST instead of value as index
2368 argument type. Use value_ptradd instead of value_ptrsub.
2369 * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
2370 ada_tag_name_2): Update.
2371 * ada-tasks.c (read_atcb): Update.
2372 * eval.c (evaluate_subexp_standard): Update.
2373 * valarith.c (value_subscript): Update.
2374 * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
2375 * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
2376 gnuv3_method_ptr_to_value): Update.
2377 * jv-lang.c (evaluate_subexp_java): Update.
2378 * m2-lang.c (evaluate_subexp_modula2): Update.
2379 * python/python-value.c (valpy_getitem, valpy_binop): Update.
2380 * wrapper.c (gdb_value_subscript): Update.
2381 * varobj.c (c_describe_child): Update.
2382
2383 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2384
2385 * gdbtypes.h (make_function_type): Remove OBJFILE parameter.
2386 * gdbtypes.c (make_function_type): Remove OBJFILE parameter.
2387 (lookup_function_type): Update call.
2388 * stabsread.c (read_type): Likewise.
2389 * dwarf2read.c (read_subroutine_type): Use lookup_function_type
2390 instead of make_function_type.
2391 * jv-lang.c (type_from_class): Likewise. Do not allocate types
2392 on the fake "dynamics" obstack.
2393
2394 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2395
2396 * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,
2397 nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol,
2398 and nodebug_tls_symbol members.
2399 (struct objfile_type): New data structure.
2400 (objfile_type): Add prototype.
2401 * gdbtypes.c (gdbtypes_post_init): Remove initialization code
2402 for types no longer in struct builtin_type.
2403 (objfile_type_data): New static variable.
2404 (_initialize_gdbtypes): Initialize it.
2405 (objfile_type): New function.
2406
2407 * gdbtypes.h (builtin_type_error): Remove.
2408 * gdbtypes.c (build_complex): Do not use builtin_type_error.
2409 * symtab.c (builtin_type_error): Remove.
2410 (_initialize_symtab): Remove initialization.
2411
2412 * stabsread.c (dbx_lookup_type, define_symbol, error_type,
2413 rs6000_builtin_type, read_range_type): Use per-objfile types
2414 instead of global or per-architecture builtin types.
2415 * coffread.c (decode_type): Likewise.
2416 * dwarf2read.c (read_array_type, read_tag_string_type,
2417 new_symbol, die_type): Likewise.
2418 * mdebugread.c (parse_symbol, basic_type, upgrade_type,
2419 parse_procedure, psymtab_to_symtab_1): Likewise.
2420 * xcoffread.c (process_xcoff_symbol): Likewise.
2421 * parse.c (write_exp_msymbol): Likewise.
2422
2423 * stabsread.c (rs6000_builtin_type_data): New static variable.
2424 (_initialize_stabsread): Initialize it.
2425 (rs6000_builtin_type): Add OBJFILE argument. Allocate builtin
2426 types per-objfile instead of globally.
2427
2428 * stabsread.c (dbx_lookup_type): Add OBJFILE argument. Use it
2429 instead of current_objfile; pass it to rs6000_builtin_type.
2430 (dbx_alloc_type, read_type, read_range_type): Update calls.
2431 (cleanup_undefined_types_noname): Add OBJFILE argument and
2432 pass it to dbx_lookup_type.
2433 (cleanup_undefined_types): Add OBJFILE argument and pass it
2434 to cleanup_undefined_types_noname.
2435 * stabsread.h (cleanup_undefined_types): Add OBJFILE argument.
2436 * buildsym.c (end_symtab): Update call.
2437
2438 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2439
2440 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2441 target_gdbarch instead of current_gdbarch.
2442
2443 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2444
2445 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
2446 (ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
2447 solib-darwin.o.
2448
2449 * configure.tgt: Add comment.
2450
2451 2009-06-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2452
2453 * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.
2454
2455 2009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2456 Jan Kratochvil <jan.kratochvil@redhat.com>
2457
2458 * NEWS: Document inlined function support.
2459 * Makefile.in (SFILES): Add inline-frame.c.
2460 (COMMON_OBS): Add inline-frame.o.
2461 * block.c (contained_in): Rewrite to use lexical nesting.
2462 (block_linkage_function): Skip inlined function blocks.
2463 (block_inlined_p): New.
2464 * block.h (struct block): Update comment.
2465 (block_inlined_p): New prototype.
2466 * blockframe.c (get_frame_block): Handle inlined functions.
2467 (get_frame_function): Do not use block_linkage_function.
2468 (block_innermost_frame): Use get_frame_block and contained_in.
2469 * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
2470 Skip over inlined functions. Simplify epilogue check.
2471 (bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
2472 Update comments.
2473 (set_momentary_breakpoint): Only accept non-inlined frames.
2474 (watch_command_1): Use frame_unwind_caller_pc and
2475 frame_unwind_caller_id instead of get_prev_frame.
2476 (until_break_command): Likewise. Use get_stack_frame_id.
2477 * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
2478 * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
2479 * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
2480 (read_func_scope, new_symbol): Likewise. Handle arguments specially
2481 for inlined functions without call site information.
2482 (inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
2483 (die_specification): Treat DW_AT_abstract_origin as a specification.
2484 (read_type_die): Handle DW_TAG_inlined_subroutine.
2485 * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
2486 * frame.c (fprint_frame_id): Print inline depth.
2487 (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
2488 (skip_inlined_frames, get_stack_frame_id): New.
2489 (frame_unwind_caller_id): Use skip_inlined_frames.
2490 (frame_id_inlined_p): New.
2491 (frame_id_eq): Make the logic match the comments. Add inline_depth
2492 check.
2493 (frame_id_inner): Handle inlined functions.
2494 (frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
2495 (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
2496 (get_prev_frame_1): Check for inline frames. Split out frame
2497 allocation to get_prev_frame_raw.
2498 (get_prev_frame_raw): New function.
2499 (get_prev_frame): Handle inline frames.
2500 (get_frame_pc): Use frame_unwind_pc.
2501 (get_frame_address_in_block): Skip inlined frames on both sides.
2502 (pc_notcurrent): Delete.
2503 (find_frame_sal): Rewrite to handle inline call sites. Use
2504 get_frame_address_in_block.
2505 (deprecated_update_frame_pc_hack): Make static.
2506 * frame.h: Update comments.
2507 (struct frame_id): Add inline_depth.
2508 (enum frame_type): Add INLINE_FRAME.
2509 (frame_id_inlined_p, get_stack_frame_id): New prototypes.
2510 * gdbthread.h (struct thread_info): Add step_stack_frame_id field.
2511 * infcmd.c (set_step_frame): New function.
2512 (step_once): Use set_step_frame. Handle inlined functions.
2513 (until_next_command): Use set_step_frame.
2514 (finish_backward), finish_forward): Use get_stack_frame_id.
2515 (finish_command): Support inlined functions.
2516 * inferior.h (set_step_info): New prototype.
2517 * infrun.c (RESUME_ALL): Use minus_one_ptid.
2518 (clear_proceed_status): Clear step_stack_frame_id.
2519 (init_wait_for_inferior): Call clear_inline_frame_state.
2520 (init_execution_control_state): Make static.
2521 (set_step_info): New function.
2522 (init_thread_stepping_state): Do not set the symtab or line here.
2523 (stepped_in_from): New function.
2524 (handle_inferior_event): Handle inlined functions. Use set_step_info.
2525 (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
2526 (struct inferior_status): Add step_stack_frame_id.
2527 (save_inferior_status, restore_inferior_status): Save and restore
2528 step_stack_frame_id.
2529 * inline-frame.c, inline-frame.h: New files.
2530 * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
2531 * regcache.c (regcache_write_pc): Call reinit_frame_cache.
2532 * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
2533 * stack.c (frame_show_address): New.
2534 (print_frame_info, print_frame): Use it.
2535 (find_frame_funname): Use get_frame_function. Handle inlined blocks.
2536 (frame_info): Mark inlined functions.
2537 (backtrace_command_1): Use get_current_user_frame.
2538 (print_frame_local_vars, print_frame_label_vars): Update comments.
2539 (return_command): Refuse inlined functions.
2540 * symtab.c (lookup_symbol_aux_local): Stop at inlined function
2541 boundaries.
2542 (find_function_start_sal): Avoid inlined functions.
2543 (completion_list_add_fields): New function.
2544 (default_make_symbol_completion_list): Use it. Use block_static_block
2545 and block_global_block. Check for inlined functions.
2546 (skip_prologue_using_sal): Avoid line number comparison across
2547 inlining.
2548 * symtab.h (struct symbol): Add is_inlined.
2549 (SYMBOL_INLINED): New.
2550 * target.c (target_resume): Call clear_inline_frame_state.
2551 * valops.c (value_of_variable): Check block_inlined_p.
2552
2553 2009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2554
2555 * frame.c (frame_unwind_id): Renamed to ...
2556 (frame_unwind_caller_id): ... this. All callers updated.
2557 (frame_pc_unwind): Renamed to ...
2558 (frame_unwind_caller_pc): ... this. All callers updated.
2559 * frame.h: Document frame_unwind_caller_WHAT functions.
2560 (frame_unwind_id): Renamed to ...
2561 (frame_unwind_caller_id): ... this.
2562 (frame_pc_unwind): Renamed to ...
2563 (frame_unwind_caller_pc): ... this.
2564 * hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
2565 * stack.c (parse_frame_specification_1): Do not rely on
2566 frame_unwind_id.
2567
2568 2009-06-27 Michael Snyder <msnyder@vmware.com>
2569
2570 * infrun.c (handle_inferior_event): Improve handling of
2571 reverse-stepping into and over shared library functions.
2572
2573 2009-06-25 Karen Osmond <karen.osmond@gmail.com>
2574
2575 * linespec.c (find_method): Add new not_found_ptr parameter to
2576 bring in line with symtab_from_filename, decode_variable.
2577 (decode_compound): Likewise. Also propagate not_found_ptr to
2578 find_method.
2579 (decode_line_1): Propagate not_found_ptr to decode_compound.
2580 (cplusplus_error): Now throws NOT_FOUND_ERROR.
2581
2582 2009-06-25 Karen Osmond <karen.osmond@gmail.com>
2583
2584 * MAINTAINERS (Write After Approval): Add self.
2585
2586 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2587
2588 * valops.c (value_one): Reimplement broken decimal-float case.
2589
2590 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2591
2592 * eval.c (evaluate_subexp_standard): Use expression architecture
2593 instead of current_gdbarch.
2594
2595 * infrun.c (handle_inferior_event): Avoid unncessary reference
2596 to current_gdbarch and get_current_frame ().
2597
2598 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2599
2600 * breakpoint.h (set_longjmp_breakpoint): Add THREAD argument.
2601 (enum bptype): Add bp_longjmp_master.
2602
2603 * breakpoint.c (create_longjmp_master_breakpoint): New function.
2604 (update_breakpoints_after_exec): Handle bp_longjmp_master
2605 breakpoints. Call create_longjmp_master_breakpoint.
2606 (print_it_typical, bpstat_stop_status, bpstat_what,
2607 print_one_breakpoint_location, allocate_bp_location, mention,
2608 delete_command, breakpoint_re_set_one): Handle bp_longjmp_master.
2609 (breakpoint_re_set): Call create_longjmp_master_breakpoint.
2610 (create_longjmp_breakpoint): Delete.
2611 (set_longjmp_breakpoint): Add THREAD argument. Reimplement
2612 to install momentary clones of bp_longjmp_master breakpoints.
2613
2614 * infcmd.c (step_1): Pass thread to set_longjmp_breakpoint.
2615
2616 2009-06-23 Cary Coutant <ccoutant@google.com>
2617
2618 * dwarf2read.c (dwarf_decode_lines): Ignore rows where is_stmt is 0.
2619 Set basic_block to 0 after a special opcode.
2620
2621 2009-06-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2622
2623 Fix a regression by the mmap patch from 2009-06-16.
2624 * symfile.c (reread_symbols): Move sym_finish and clear_objfile_data
2625 calls before deleting the OBJFILE obstack. Extend the comment.
2626
2627 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2628
2629 * jv-lang.h (JAVA_OBJECT_SIZE): Remove.
2630 (get_java_object_header_size): Add GDBARCH parameter.
2631 * jv-lang.c (get_java_object_header_size): Add GDBARCH parameter.
2632 Use it instead of current_gdbarch.
2633 (evaluate_subexp_java): Replace JAVA_OBJECT_SIZE with call to
2634 get_java_object_header_size.
2635 * jv-valprint.c (java_value_print): Likewise.
2636
2637 2009-06-23 Sami Wagiaalla <swagiaal@redhat.com>
2638
2639 * dwarf2read.c (process_die): Handle import statements
2640 (DW_TAG_imported_declaration, case DW_TAG_imported_module)
2641 (read_import_statement): New.
2642 (read_func_scope): Update using_directives to point to current context
2643 (read_lexical_block_scope): Ditto.
2644 * cp-support.h: Added prototype for cp_add_using.
2645 * cp-namespace.c: Removed local context_stack.
2646 (cp_initialize_namespace): Deleted.
2647 (cp_finalize_namespace): Deleted.
2648 (cp_add_using_directive): Use using_directives instead of using_list.
2649 (cp_add_using): No longer static.
2650 * buildsym.h: Created global using_direct variable.
2651 Created using_direct variable in context_stack.
2652 * buildsym.c (finish_block): Set using directives for the block under
2653 construction.
2654 (start_symtab): Removed call to cp_initialize_namespace().
2655 (end_symtab): Removed call to cp_finalize_namespace().
2656 (push_context): Save and reset using_directives.
2657 * block.c (block_using): Return using directives for given
2658 block instead of static block.
2659
2660 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2661
2662 * target-descriptions.h (struct type): Do not declare.
2663 (struct tdesc_type): Declare.
2664 (tdesc_named_type): Change return type to struct tdesc_type *.
2665 (tdesc_record_type): Remove.
2666 (tdesc_create_vector): Add prototype.
2667 (tdesc_create_union): Likewise.
2668 (tdesc_add_field): Likewise.
2669
2670 * target-descriptions.c (struct tdesc_reg): Replace gdb_type
2671 member by tdesc_type member.
2672 (struct tdesc_type_field, tdesc_type_field): Add type and vector def.
2673 (struct tdesc_type, tdesc_type_p): Likewise.
2674 (struct tdesc_arch_reg, tdesc_arch_reg): Likewise.
2675 (struct tdesc_feature): Change type of "types" to VEC(tdesc_type_p).
2676 (struct tdesc_arch_data): Replace registers member by arch_regs.
2677
2678 (tdesc_predefined_types): Change to array of pre-defined
2679 struct tdesc_type structures. Add "code_ptr" and "data_ptr".
2680 (tdesc_named_type): Return struct tdesc_type * instead of GDB type.
2681 (tdesc_gdb_type): New function.
2682
2683 (target_find_description): Update for data structure changes.
2684 (tdesc_data_cleanup): Likewise.
2685 (tdesc_numbered_register): Likewise.
2686 (tdesc_use_registers): Likewise.
2687 (tdesc_create_reg): Likewise.
2688
2689 (tdesc_find_arch_register): New function.
2690 (tdesc_find_register): Use it.
2691 (tdesc_register_type): Use tdesc_gdb_type to generate GDB type from
2692 tdesc_type on demand; cache generated types in tdesc_arch_reg.
2693
2694 (tdesc_free_type): New function.
2695 (tdesc_free_feature): Call it.
2696
2697 (tdesc_create_vector): New function.
2698 (tdesc_create_union): Likewise.
2699 (tdesc_add_field): Likewise.
2700 (tdesc_record_type): Remove.
2701
2702 (tdesc_type_id): Remove.
2703 (maint_print_c_tdesc_cmd): Update for data structure changes. Update
2704 generated code to create tdesc_type structures instead of GDB types.
2705
2706 * xml-tdesc.c: Do not include "gdbtypes.h".
2707 (struct tdesc_parsing_data): Change type of current_union to
2708 struct tdesc_type *.
2709 (tdesc_start_reg): Do not special-case "code_ptr" or "data_ptr".
2710 (tdesc_start_union): Call tdesc_create_union.
2711 (tdesc_start_field): Call tdesc_add_field.
2712 (tdesc_start_vector): Call tdesc_create_vector.
2713 (tdesc_end_union): Remove.
2714 (feature_children): Remove reference to tdesc_end_union.
2715
2716 * features/arm-with-iwmmxt.c: Regenerate.
2717 * features/mips-linux.c: Regenerate.
2718 * features/mips64-linux.c: Regenerate.
2719 * features/rs6000/powerpc-32.c: Regenerate.
2720 * features/rs6000/powerpc-32l.c: Regenerate.
2721 * features/rs6000/powerpc-403.c: Regenerate.
2722 * features/rs6000/powerpc-403gc.c: Regenerate.
2723 * features/rs6000/powerpc-505.c: Regenerate.
2724 * features/rs6000/powerpc-601.c: Regenerate.
2725 * features/rs6000/powerpc-602.c: Regenerate.
2726 * features/rs6000/powerpc-603.c: Regenerate.
2727 * features/rs6000/powerpc-604.c: Regenerate.
2728 * features/rs6000/powerpc-64.c: Regenerate.
2729 * features/rs6000/powerpc-64l.c: Regenerate.
2730 * features/rs6000/powerpc-7400.c: Regenerate.
2731 * features/rs6000/powerpc-750.c: Regenerate.
2732 * features/rs6000/powerpc-860.c: Regenerate.
2733 * features/rs6000/powerpc-altivec32.c: Regenerate.
2734 * features/rs6000/powerpc-altivec32l.c: Regenerate.
2735 * features/rs6000/powerpc-altivec64.c: Regenerate.
2736 * features/rs6000/powerpc-altivec64l.c: Regenerate.
2737 * features/rs6000/powerpc-e500.c: Regenerate.
2738 * features/rs6000/powerpc-e500l.c: Regenerate.
2739 * features/rs6000/powerpc-isa205-32l.c: Regenerate.
2740 * features/rs6000/powerpc-isa205-64l.c: Regenerate.
2741 * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
2742 * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
2743 * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
2744 * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
2745 * features/rs6000/powerpc-vsx32.c: Regenerate.
2746 * features/rs6000/powerpc-vsx32l.c: Regenerate.
2747 * features/rs6000/powerpc-vsx64.c: Regenerate.
2748 * features/rs6000/powerpc-vsx64l.c: Regenerate.
2749 * features/rs6000/rs6000.c: Regenerate.
2750
2751 2009-06-23 Joel Brobecker <brobecker@adacore.com>
2752
2753 * ada-lang.c (decode_packed_array): If the value is a pointer to
2754 an array, then use value_ind to dereference it, not ada_value_ind.
2755 (ada_template_to_fixed_record_type_1): Handle the case where a
2756 dynamic field is an aligner type.
2757 (to_fixed_array_type): Add handling for packed array types.
2758 (ada_get_base_type): Do not follow the XVS type if the type is
2759 an aligner type.
2760 (ada_evaluate_subexp): Split a few statements up for clarity
2761 and debuggability.
2762 <OP_FUNCALL>: Add handling of the case of a packed array that
2763 has already been fixed.
2764
2765 2009-06-23 Joel Brobecker <brobecker@adacore.com>
2766
2767 * ada-lang.c (evaluate_subexp): Delete. Use the version from eval.c.
2768 (evaluate_subexp_type): Reimplement using evaluate_subexp.
2769 * value.h (evaluate_subexp): Add declaration.
2770 * eval.c (evaluate_subexp): Make non-static.
2771 * objc-lang.c (print_object_command): Use evaluate_subexp.
2772
2773 2009-06-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2774
2775 Revert 2009-05-14 breakpoint commit (no longer needed).
2776 * breakpoint.h (breakpoint_re_set_objfile): Remove
2777 * breakpoint.c (breakpoint_re_set_objfile): Likewise
2778 (create_overlay_event_breakpoint): Remove objfile parameter,
2779 iterate over all objfiles.
2780 * objfiles.c (objfile_relocate): Update.
2781 * symfile.c (new_symfile_objfile): Likewise.
2782
2783 2009-06-23 Tom Tromey <tromey@redhat.com>
2784
2785 PR gdb/10309:
2786 * c-lang.c (classify_type): Iterate over typedefs.
2787 * c-valprint.c (textual_element_type): Iterate over typedefs.
2788
2789 2009-06-22 Tristan Gingold <gingold@adacore.com>
2790
2791 * darwin-nat.c (darwin_xfer_partial): Use host_address_to_string
2792 instead of "%p".
2793
2794 2009-06-22 Jan Kratochvil <jan.kratochvil@redhat.com>
2795
2796 PR gdb/9988:
2797 * buildsym.c (block_compar): New function.
2798 (end_symtab): Replace the bubble sort by a qsort based code.
2799
2800 2009-06-22 Sami Wagiaalla <swagiaal@redhat.com>
2801
2802 * MAINTAINERS (Write After Approval): Add self.
2803
2804 2009-06-22 Ulrich Weigand <uweigand@de.ibm.com>
2805
2806 * spu-tdep.c (spu_get_longjmp_target): New function.
2807 (spu_gdbarch_init): Install it.
2808
2809 2009-06-22 H.J. Lu <hongjiu.lu@intel.com>
2810
2811 PR server/10306
2812 * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
2813
2814 2009-06-21 Michael Snyder <msnyder@vmware.com>
2815
2816 * inferior.h: Update ancient comment.
2817
2818 2009-06-20 Aleksandar Ristovski <aristovski@qnx.com>
2819 Pedro Alves <pedro@codesourcery.com>
2820
2821 * solib-svr4.c (IGNORE_FIRST_LINK_MAP_ENTRY): Avoid dereferencing
2822 NULL pointer.
2823 (scan_dyntag): Skip if input bfd isn't elf flavoured.
2824 (locate_base): Call elf_locate_base even without an exec_bfd.
2825
2826 2009-06-19 Samuel Bronson <naesten@gmail.com>
2827
2828 PR cli/9903:
2829 * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
2830 for prefix commands to avoid duplicates in the output.
2831
2832 2009-06-19 Samuel Bronson <naesten@gmail.com>
2833
2834 PR cli/9903:
2835 * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
2836 printing.
2837
2838 2009-06-19 Jerome Guitton <guitton@adacore.com>
2839
2840 * breakpoint.c (expand_line_sal_maybe): When explicit_line,
2841 skip prologue on each sals.
2842 (skip_prologue_sal): Return explicit_line and explicit_pc
2843 unmodified.
2844
2845 2009-06-19 Tristan Gingold <gingold@adacore.com>
2846
2847 * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
2848 line.
2849
2850 2009-06-19 Tristan Gingold <gingold@adacore.com>
2851 * machoread.c (macho_symtab_read): Adjust for bfd changes.
2852 * darwin-nat.h (struct darwin_exception_msg): New type to describe
2853 a mach exception.
2854 (struct private_thread_info): New type to describe the state of the
2855 thread.
2856 (DEF_VEC_I thread_t): Removed, replaced by ...
2857 (DEF_VEC_O darwin_thread_t): ... this new type.
2858 (struct darwin_inferior): Renamed to ...
2859 (struct private_inferior): ... this type. Fields added.
2860 (darwin_not_port): Moved into the private inferior structure.
2861 * darwin-nat.c: Add includes, improve comments.
2862 Rewrite to handle multiple threads and processes.
2863 (darwin_resume_to): New function and protype.
2864 (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
2865 (darwin_kill_inferior): Add ops argument.
2866 (darwin_pid_to_str): New function.
2867 (darwin_thread_alive): Ditto.
2868 (darwin_inf, darwin_not_port): Removed.
2869 (darwin_inf_fake_stop): New variable.
2870 (msgin, msgout, msg_state, exc_msg): Removed.
2871 (mach_check_error): Use warning instead of error.
2872 (darwin_ptrace): Adjust debug level.
2873 (cmp_thread_t): Fix names (typo).
2874 (darwin_check_new_threads): Argument is now an inferior,
2875 adjust for new structures, add no change check, ignore dead ports,
2876 handle first thread case.
2877 (find_inferior_task_it): New function.
2878 (find_inferior_notify_it): Ditto.
2879 (darwin_find_inferior_by_task): Ditto.
2880 (darwin_find_inferior_by_notify): Ditto.
2881 (darwin_find_thread): Ditto.
2882 (darwin_suspend_inferior): Ditto.
2883 (darwin_resume_inferior): Ditto.
2884 (catch_exception_raise_state): Removed.
2885 (catch_exception_raise_state_identity): Removed.
2886 (darwin_suspend_inferior_it): New function.
2887 (darwin_resume_inferior_it): Ditto.
2888 (darwin_dump_message): New function, extracted from darwin_wait.
2889 (darwin_decode_exception_message): New function.
2890 (darwin_encode_reply): New function.
2891 (catch_exception_raise): Removed.
2892 (darwin_send_reply): New function, extracted from darwin_resume.
2893 (darwin_resume_thread): New function, extracted from darwin_resume.
2894 (struct resume_inferior_threads_param): New type.
2895 (darwin_resume_inferior_threads_it): New function.
2896 (darwin_resume_inferior_threads): New function.
2897 (darwin_suspend_inferior_threads): New function.
2898 (darwin_resume): Mostly rewritten to handle multiple threads and
2899 some corner cases.
2900 (darwin_decode_message): New function extracted from darwin_wait.
2901 (cancel_breakpoint): New function.
2902 (darwin_wait): Mostly rewritten. Handle multiple threads.
2903 (darwin_mourn_inferior): Adjust for per process structures.
2904 (darwin_reply_to_all_pending_messages): New function.
2905 (darwin_stop_inferior): Adjust for per inferior structures.
2906 (darwin_attach_pid): Ditto.
2907 (darwin_init_thread_list): Ditto.
2908 (darwin_attach): Ditto.
2909 (darwin_detach): Ditto.
2910 (darwin_files_info): Now empty.
2911 (darwin_pid_to_str): Adjust returns string to match one expected by
2912 the testsuite.
2913 (darwin_read_write_inferior): Rename err variable to match other uses.
2914 Adjust debug message. Handle submaps.
2915 (darwin_xfer_memory): Adjust for per inferior structures.
2916 (set_enable_mach_exceptions): Ditto.
2917 (darwin_pid_to_exec_file): New function.
2918 (darwin_get_ada_task_ptid): Ditto.
2919 (darwin_supports_multi_process): Ditto.
2920 (_initialize_darwin_inferior): Remove useless assertion, adjust for
2921 per inferior structures. Add new target operations.
2922
2923 2009-06-18 Hui Zhu <teawater@gmail.com>
2924 Michael Snyder <msnyder@vmware.com>
2925
2926 * infrun.c (handle_inferior_event): Improve reverse stepping
2927 through function epilogue.
2928
2929 * infrun.c (handle_inferior_event): Reverse-next through
2930 trampoline.
2931
2932 2009-06-18 Paul Pluzhnikov <ppluzhnikov@google.com>
2933
2934 * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
2935 dwarf_frame_size.
2936
2937 2009-06-17 Tom Tromey <tromey@redhat.com>
2938
2939 * dwarf2read.c (zlib_decompress_section): Use a cleanup.
2940
2941 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
2942
2943 * gdbarch.sh (pointer_to_address): Change to type 'm'.
2944 (address_to_pointer): Likewise.
2945 * gdbarch.c, gdbarch.h: Regenerate.
2946
2947 * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
2948 (signed_pointer_to_address): Likewise.
2949 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
2950 * findvar.c (unsigned_pointer_to_address): Likewise.
2951 (signed_pointer_to_address): Likewise.
2952 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
2953
2954 * avr-tdep.c (avr_address_to_pointer): Likewise.
2955 (avr_pointer_to_address): Likewise.
2956 * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
2957 (iq2000_address_to_pointer): Likewise.
2958 * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
2959 (m32c_m16c_pointer_to_address): Likewise.
2960 * spu-tdep.c (spu_pointer_to_address): Likewise.
2961 * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
2962 (xstormy16_address_to_pointer): Likewise.
2963
2964 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
2965
2966 * printcmd.c (print_scalar_formatted): Always truncate
2967 unsigned data types.
2968
2969 * cli-dump.c (struct callback_data): Change type of load_offset
2970 to CORE_ADDR.
2971 (restore_binary_file): Update type casts.
2972 (restore_command): Parse load_offset as address, not long.
2973
2974 * utils.c (string_to_core_addr): Do not sign-extend value.
2975 * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
2976 before comparing against requested frame address.
2977
2978 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
2979
2980 * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
2981 * gdbarch.h, gdbarch.c: Regenerate.
2982
2983 * gcore.c (default_gcore_target): Make return value const.
2984 Call gdbarch_gcore_bfd_target if present.
2985 (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
2986
2987 * corelow.c (core_read_description): Call gdbarch_core_read_description
2988 on core_gdbarch instead of current_gdbarch.
2989
2990 * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
2991
2992 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
2993
2994 * gdbtypes.c (create_string_type): Receive character type as argument.
2995 * gdbtypes.h (create_string_type): Add character type argument.
2996 * dwarf2read.c (read_tag_string_type): Pass character type to
2997 create_string_type.
2998
2999 * value.h (value_string): Add character type argument.
3000 * valops.c (value_string): Add character type argument. Pass it to
3001 create_string_type. Do not allocate space in inferior.
3002 * valarith.c (value_concat): Pass character type to value_string.
3003
3004 * value.h (value_typed_string): Rename to ...
3005 (value_cstring): ... this.
3006 * valops.c (value_typed_string): Rename to ...
3007 (value_cstring): ... this.
3008 * c-lang.c (evaluate_subexp_c): Update.
3009
3010 * python/python-value.c (builtin_type_pychar): New define.
3011 (convert_value_from_python): Call value_cstring instead
3012 of value_from_string.
3013 * value.c (value_from_string): Remove.
3014 * value.h (value_from_string): Remove.
3015
3016 * eval.c (evaluate_subexp_standard): Pass character type to
3017 value_string. Pass expression architecture to value_nsstring
3018 and lookup_child_selector.
3019 * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
3020 (lookup_child_selector): Likewise.
3021 (value_nsstring): Likewise.
3022 * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
3023 Pass character type to value_string..
3024 (lookup_child_selector): Likewise.
3025 (value_nsstring): Add GDBARCH parameter, use it instead of
3026 objfile architecture. Pass architecture to lookup_objc_class
3027 and lookup_child_selector. Pass character type to value_string.
3028 (end_msglist): Pass architecture to lookup_objc_class.
3029 * objc-exp.y: Pass architecture to lookup_objc_class.
3030
3031 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3032
3033 * gdbtypes.h (struct language_defn): Add forward declaration.
3034 (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3035 (lookup_unsigned_typename): Likewise.
3036 (lookup_signed_typename): Likewise.
3037 * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3038 Use them instead of current_language and current_gdbarch.
3039 (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
3040 Pass them to lookup_typename.
3041 (lookup_signed_typename): Likewise.
3042
3043 * c-exp.y: Pass parse_language and parse_gdbarch to
3044 lookup_unsigned_typename and lookup_signed_typename.
3045 * objc-exp.y: Likewise.
3046 * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
3047
3048 * c-lang.c (evaluate_subexp_c): Pass expression language and
3049 gdbarch to lookup_typename.
3050 * printcmd.c (printf_command): Pass current language and
3051 gdbarch to lookup_typename.
3052 * python/python-type.c (typy_lookup_typename): Likewise.
3053 Include "language.h".
3054
3055 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3056
3057 * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
3058 Use it instead of current_gdbarch. Pass architecture to
3059 sparc32_gregset_supplies_p.
3060 (sparc64_fpregset_supplies_p): Add GDBARCH parameter. Use it instead
3061 of current_gdbarch. Pass architecture to sparc32_fpregset_supplies_p.
3062 * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
3063 sparc64nbsd_fpregset_supplies_p): Likewise.
3064 * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
3065 Add GDBARCH parameter.
3066 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
3067 (sparc_fetch_inferior_registers): Pass regcache architecture to
3068 sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
3069 (sparc_store_inferior_registers): Likewise.
3070 * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
3071 Add GDBARCH parameter.
3072 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
3073
3074 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3075
3076 * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
3077 of current_gdbarch.
3078 * aix-thread.c (pd_enable): Likewise.
3079 * amd64-linux-nat.c (ps_get_thread_area): Likewise.
3080 * bsd-uthread.c (bsd_uthread_activate): Likewise.
3081 * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
3082 * linux-thread-db.c (enable_thread_event): Likewise.
3083 * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
3084 * nto-procfs.c (procfs_open): Likewise.
3085 * procfs.c (invalidate_cache, procfs_insert_watchpoint,
3086 info_proc_mappings, info_mappings_callback): Likewise.
3087 * record.c (record_open): Likewise.
3088 * rs6000-nat.c (ARCH64): Likewise.
3089 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
3090 (darwin_bfd_open): Likewise.
3091 * memattr.c (mem_info_command): Likewise.
3092
3093 * windows-nat.c (win32_resume): Use current regcache architecture
3094 instead of current_gdbarch.
3095
3096 * dbug-rom.c (dbug_regname): Remove check against number of
3097 registers in current_gdbarch.
3098 * solib-pa64.c (read_dynamic_info): Remove unused variable.
3099
3100 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3101
3102 * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
3103 use it instead of current_gdbarch.
3104 * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
3105 * arm-tdep.c (arm_skip_prologue): Pass architecture to
3106 deprecated_pc_in_call_dummy.
3107
3108 * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
3109 Use it instead of current_gdbarch.
3110 * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
3111 * breakpoint.c (expand_line_sal_maybe): Pass architecture to
3112 skip_prologue_using_sal.
3113 * arm-tdep.c (skip_prologue_using_sal): Likewise.
3114 * lm32-tdep.c (lm32_skip_prologue): Likewise.
3115 * m32-tdep.c (m32c_skip_prologue): Likewise.
3116 * mips-tdep.c (mips_skip_prologue): Likewise.
3117 * moxie-tdep.c (moxie_skip_prologue): Likewise.
3118 * mt-tdep.c (mt_frame_unwind_cache): Likewise.
3119 * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
3120 * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
3121 it to skip_prologue_using_sal. Update call sites ...
3122 (frv_skip_prologue, frv_frame_unwind_cache): ... here.
3123
3124 * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
3125 (check_for_saved): Use it instead of current_gdbarch.
3126 (mn10300_analyze_prologue): Set it.
3127
3128 * value.c (using_struct_return): Add GDBARCH parameter. Use it
3129 instead of current_gdbarch.
3130 * value.h (using_struct_return): Add GDBARCH parameter.
3131 * eval.c (evaluate_subexp_standard): Pass architecture to
3132 using_struct_return.
3133 * infcall.c (call_function_by_hand): Likewise.
3134 * stack.c (return_command): Likewise.
3135 * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
3136
3137 * symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
3138 current_gdbarch.
3139 * symtab.h (in_prologue): Add GDBARCH parameter.
3140 * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
3141
3142 * eval.c (evaluate_subexp_standard): Use expression architecture
3143 instead of current_gdbarch.
3144
3145 * c-lang.c (evaluate_subexp_c): Use expression architecture and
3146 language instead of current_gdbarch and current_language.
3147
3148 * printcmd.c (do_one_display): Use expression architecture instead
3149 of current_gdbarch.
3150
3151 * infcmd.c (print_return_value): Use architecture of stop_regcache
3152 instead of current_gdbarch.
3153 (print_vector_info, print_float_info): Remove GDBARCH argument,
3154 use frame architecture instead.
3155 (vector_info, float_info): Update calls.
3156
3157 * objc-lang.c (objc_skip_trampoline): Use frame architecture
3158 instead of current_gdbarch.
3159
3160 * parse.c (write_dollar_variable): Use parse architecture instead
3161 of current_gdbarch.
3162
3163 * source.c (line_info): Use objfile architecture instead of
3164 current_gdbarch.
3165
3166 * symtab.c (find_function_start_sal): Use gdbarch instead of
3167 current_gdbarch.
3168 (print_msymbol_info): Use objfile architecture instead of
3169 current_gdbarch.
3170
3171 * valops.c (value_assign): Use frame architecture instead of
3172 current_gdbarch.
3173
3174 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3175
3176 * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
3177
3178 * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
3179 calling record_line.
3180 (enter_linenos): Likewise.
3181 * dbxread.c (process_one_symbol): Likewise.
3182 * dwarf2read.c (dwarf_decode_lines): Likewise.
3183 * mdebugread.c (psymtab_to_symtab_1): Likewise.
3184 * xcoffread.c (enter_line_range): Likewise.
3185
3186 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3187
3188 * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
3189 architecture instead of current_gdbarch.
3190 (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
3191 (gen_expr): Pass expression to get_struct_ref.
3192
3193 * symtab.h (struct symbol_ops): Add GDBARCH parameter to
3194 tracepoint_var_ref callback.
3195 * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
3196 symbol operation callback.
3197 * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
3198 Use it instead of current_gdbarch.
3199 (locexpr_tracepoint_var_ref): Add GDBARCH parameter. Pass it to
3200 dwarf2_tracepoint_var_ref.
3201 (loclist_tracepoint_var_ref): Likewise.
3202
3203 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3204
3205 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
3206 Use it instead of address bits of current_gdbarch.
3207 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
3208 * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
3209 make_pv_area.
3210 (arm_scan_prologue): Likewise.
3211 * m32c-tdep.c (m32c_analyze_prologue): Likewise.
3212 * mep-tdep.c (mep_analyze_prologue): Likewise.
3213 * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
3214 * s390-tdep.c (s390_analyze_prologue): Likewise.
3215
3216 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3217
3218 * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
3219 frame architecture instead of current_gdbarch.
3220 (mi_cmd_data_list_changed_registers): Likewise.
3221 (mi_cmd_data_list_register_values): Likewise. Pass selected
3222 frame to get_register.
3223 (get_register): Add FRAME argument, use it as frame to retrieve
3224 registers from (instead of selected frame). Use frame architecture
3225 instead of current_gdbarch.
3226 (mi_cmd_data_write_register_values): Use current regcache
3227 architecture instead of current_gdbarch.
3228
3229 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3230
3231 * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
3232 use frame architecture instead. Replace current_gdbarch uses.
3233 (tui_show_registers): Update call.
3234 (tui_get_register): Remove GDBARCH parameter; use frame architecture
3235 instead.
3236 (tui_show_register_group): Update call.
3237 (tui_check_register_values): Likewise.
3238 (tui_register_format): Remove GDBARCH parameter; use frame
3239 architecture instead. Replace current_gdbarch uses.
3240 (tui_get_register): Update call.
3241
3242 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3243
3244 * gdbarch.sh (construct_inferior_arguments): Remove.
3245 * gdbarch.c, gdbarch.h: Regenerate.
3246 * infcmd.c (get_inferior_args): Call construct_inferior_arguments
3247 directly instead of gdbarch_construct_inferior_arguments.
3248 (construct_inferior_arguments): Remove GDBARCH argument.
3249 * inferior.h (construct_inferior_arguments): Likewise.
3250
3251 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3252
3253 * symfile.c (section_is_mapped): Use objfile architecture instead
3254 of current_gdbarch.
3255 (TARGET_LONG_BYTES): Remove.
3256 (read_target_long_array): Add SIZE argument. Use it instead of
3257 TARGET_LONG_BYTES.
3258 (simple_read_overlay_table): Retrieve long size from objfile
3259 architecture; pass it to read_target_long_array.
3260 (simple_read_overlay_region_table): Likewise.
3261 (simple_overlay_update_1): Likewise.
3262
3263 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3264
3265 * infrun.c (cleanup_displaced_step_closure): Remove.
3266 (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
3267 (displaced_step_prepare): Use displaced_step_clear_cleanup instead
3268 of cleanup_displaced_step_closure.
3269 (handle_inferior_event, keep_going): Use thread architecture instead
3270 of current_gdbarch.
3271
3272 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3273
3274 * infrun.c (handle_inferior_event): Use current frame architecture
3275 or thread architecture instead of current_gdbarch. Pass to
3276 handle_step_into_function and handle_step_into_function_backward.
3277 (handle_step_into_function): Add GDBARCH parameter. Use it instead
3278 of current_gdbarch.
3279 (handle_step_into_function_backward): Likewise.
3280 (insert_step_resume_breakpoint_at_frame): Use frame architecture
3281 instead of current_gdbarch.
3282 (insert_step_resume_breakpoint_at_caller): Likewise.
3283
3284 2009-06-17 Pierre Muller <muller@ics.u-strasbg.fr>
3285 Pedro Alves <pedro@codesourcery.com>
3286
3287 * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
3288 is pushed for watchpoint promotion to hardware watchpoint.
3289
3290 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
3291
3292 * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
3293 (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
3294 (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
3295 (dwarf_ranges_section, dwarf_frame_section)
3296 (dwarf_eh_frame_section): Removed.
3297 (dwarf2_resize_section): Likewise.
3298 (dwarf2_read_section): Now static, use bfd_mmap() if possible.
3299 (dwarf2_get_section_info): New function.
3300 (munmap_section_buffer): Likewise.
3301 (dwarf2_per_objfile_cleanup): Likewise.
3302 (section_is_p): Signature change.
3303 * dwarf2-frame.c (dwarf2_build_frame_info): Use
3304 dwarf2_get_section_info instead of dwarf2_read_section.
3305
3306 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
3307
3308 * solib.c (symbol_add_stub): New FLAGS parameter.
3309 (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
3310 directly.
3311 (solib_add): Defer breakpoint_re_set until after all solibs.
3312 * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
3313 * rs6000-nat.c (objfile_symbol_add): Adjust.
3314 * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
3315 (new_symfile_objfile): Likewise.
3316 (symbol_file_add_with_addrs_or_offsets): Likewise.
3317 (symbol_file_add_from_bfd): Likewise.
3318 (symbol_file_add): Likewise.
3319 * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
3320 * symfile-mem.c (symbol_file_add_from_memory): Adjust.
3321 * windows-nat.c (safe_symbol_file_add_stub): Adjust.
3322 * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
3323
3324 2009-06-16 Keith Seitz <keiths@redhat.com>
3325
3326 * linespec.c (collect_methods): Delete.
3327 (add_matching_methods): Reove destructor special case.
3328 (find_method): Call find_methods directly instead of
3329 collect_methods.
3330 * valops.c (value_struct_elt): Remove destructor
3331 special cases.
3332 (check_field): Likewise.
3333 (value_struct_elt_for_reference): Likewise.
3334 (destructor_name_p): Remove misleading comment about dtors
3335 being "special cases".
3336 * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
3337 * gdbtypes.c (get_destructor_fn_field): Likewise.
3338
3339 2009-06-16 Pedro Alves <pedro@codesourcery.com>
3340
3341 * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
3342 TARGET_OJECT_MEMORY reads to the topmost target, not to the
3343 flattened current_target.
3344
3345 2009-06-16 Tristan Gingold <gingold@adacore.com>
3346
3347 * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
3348 call_length field.
3349 (avr_register_name): Add const to register_names.
3350 (avr_scan_arg_moves): Move inside avr_scan_prologue.
3351 (avr_scan_prologue): Add pc_end argument.
3352 Only read prologue bytes that can be read.
3353 Limit the scan to the known prologue length.
3354 Makes pattern variables static and const.
3355 Fix indentation.
3356 (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
3357 Fix indentation.
3358 (avr_breakpoint_from_pc): Constify avr_break_insn.
3359 (avr_extract_return_value): Fix function comment.
3360 (avr_frame_unwind_cache): Fix GNU style violations.
3361 Pass current_pc argument to avr_scan_prologue to stop prologue
3362 analysis to the current pc. This fixes the bug with the 'next'
3363 command.
3364 Correctly set the SP register of the previous frame (use call_length).
3365 (avr_frame_prev_register): Fix indentation.
3366 Correctly read PC from the stack on avr6 architectures.
3367 (avr_push_dummy_call): Fix indentation.
3368 (avr_gdbarch_init): Set call_length according to the architecture.
3369
3370 2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
3371
3372 * infcall.c (show_unwind_on_terminating_exception_p): New
3373 function.
3374 (call_function_by_hand): Create breakpoint and clean-up call for
3375 std::terminate.breakpoint. Add unwind_on_terminating_exception_p
3376 gate. Pop frame on breakpoint hit.
3377 (_initialize_infcall): Add add_setshow_boolean_cmd for
3378 unwind-on-terminating-exception.
3379
3380 2009-06-12 Kevin Buettner <kevinb@redhat.com>
3381
3382 * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
3383 `has_section_at_zero' flag from stripped objfile to separate,
3384 debug info only, objfile.
3385
3386 2009-06-12 Pedro Alves <pedro@codesourcery.com>
3387
3388 * exec.h (section_table_xfer_memory_partial): Improve description,
3389 mention SECTION_NAME.
3390 * exec.c (section_table_xfer_memory_partial): Remove stale
3391 description.
3392
3393 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3394
3395 * nto-tdep.h (nto_generic_supply_gpregset)
3396 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
3397 * nto-tdep.c (nto_generic_supply_gpregset)
3398 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
3399
3400 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3401
3402 * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
3403 (i386nto_sigcontext_addr): Change the way context address is calculated.
3404 (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
3405 sc_sp_offset and set sc_reg_offset and sc_num_regs.
3406
3407 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3408
3409 * i386-nto-tdep.c (i386_nto_target): Remove definition.
3410 (init_i386nto_ops): Use macros to set fields to global
3411 current_nto_target directly.
3412 (i386nto_init_abi): Remove unused nto_set_target call.
3413 * nto-tdep.h (nto_set_target): Remove unused declaration.
3414 * nto-tdep.c (nto_set_target): Remove unused function.
3415
3416 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3417
3418 * breakpoint.c (break_command_really): Rename local variable
3419 breakpoint_chain to bkpt_chain.
3420
3421 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3422
3423 Add support for XMM registers.
3424 * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
3425 (i386nto_register_area): Correctly calculate offsets and sizes for
3426 all supported registers.
3427
3428 2009-06-11 Tom Tromey <tromey@redhat.com>
3429
3430 * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
3431 'static' from local variable definitions.
3432
3433 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3434
3435 * symtab.c (append_expanded_sal): Remove unused local variables.
3436
3437 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3438
3439 * infrun.c (sched_multi): New global.
3440 (resume): If sched_multi is set, resume only threads of the
3441 current inferior.
3442 (prepare_to_proceed): Don't switch over to wait_ptid if we're
3443 resuming a different inferior, and sched_multi is off.
3444 (show_schedule_multiple): New.
3445 (_initialize_infrun): Register new "set schedule-multiple" command.
3446 * inferior.h (sched_multi): Declare.
3447 * NEWS: Mention new "schedule-multiple" setting.
3448
3449 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3450
3451 * varobj.c (varobj_create): Properly restore the selected frame.
3452
3453 2009-06-05 Tom Tromey <tromey@redhat.com>
3454
3455 * inferior.c (print_inferior): Make a table, not a list. Emit
3456 table headers.
3457
3458 2009-06-10 Jonas Maebe <jonas.maebe@elis.ugent.be>
3459
3460 * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
3461 darwin_wait (blocking wait).
3462 (darwin_kill_inferior): Likewise.
3463
3464 2009-06-10 Pedro Alves <pedro@codesourcery.com>
3465
3466 * infrun.c (handle_inferior_event): Update comment around trying
3467 to revert back to a stepping thread that has exited.
3468
3469 2009-06-10 Cary Coutant <ccoutant@google.com>
3470
3471 * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
3472 DW_LNE_set_discriminator.
3473
3474 2009-06-10 Pierre Muller <muller@ics.u-strasbg.fr>
3475
3476 * breakpoint.c: ARI fixes.
3477 (create_overlay_event_breakpoint): Avoid assignment inside if statement.
3478 (print_one_breakpoint_location): Likewise.
3479 (create_longjmp_breakpoint): Likewise.
3480 (tracepoint_save_command): Likewise
3481 (bpstat_find_step_resume_breakpoint): No operator at end of line.
3482 (bpstat_stop_status): Likewise.
3483 (describe_other_breakpoints): Likewise.
3484 (hw_watchpoint_used_count): Likewise.
3485 (expand_line_sal_maybe): Likewise.
3486 (break_command_really): Likewise.
3487 (delete_command): Likewise.
3488 (do_enable_breakpoint): Likewise.
3489 (delete_trace_command): Likewise.
3490 (catch_exception_command_1): Likewise and remove extra parentheses.
3491
3492 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
3493
3494 * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
3495 "ubreak" command that does not exist.
3496
3497 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
3498
3499 * cli/cli-decode.c (add_alias_cmd): Correct assertion.
3500
3501 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3502
3503 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
3504
3505 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3506
3507 * procfs.h: New.
3508 * proc-utils.h (procfs_first_available): Don't declare here.
3509 * sol-thread.c: Include procfs.h instead of sys/procfs.h and
3510 proc-utils.h.
3511 * procfs.c: Include procfs.h.
3512 (procfs_target): Make it public. Don't register
3513 procfs_can_use_hw_breakpoint here.
3514 (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
3515 defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
3516 (procfs_can_use_hw_breakpoint): Remove check of
3517 TARGET_HAS_HARDWARE_WATCHPOINTS.
3518 (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
3519 here.
3520 (_initialize_procfs): Don't add the procfs target here.
3521
3522 * i386-sol2-nat.c: Include target.h and procfs.h.
3523 (_initialize_amd64_sol2_nat): Install the procfs target here,
3524 customized with watchpoints support.
3525 * irix5-nat.c: Include target.h.
3526 (_initialize_core_irix5): Rename to ...
3527 (_initialize_irix5_nat): ... this. Install the procfs target
3528 here, customized with watchpoints support.
3529 * alpha-nat.c: Include procfs.h.
3530 (_initialize_core_alpha): Rename to...
3531 (_initialize_alpha_nat): ... this. Install the procfs target
3532 here, customized with watchpoints support.
3533 * sparc-sol2-nat.c: Include target.h and procfs.h.
3534 (_initialize_sparc_sol2_nat): New.
3535
3536 * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
3537 * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
3538 * config/mips/irix5.mh (NAT_FILE): Delete.
3539 * config/mips/irix6.mh (NAT_FILE): Delete.
3540 * config/mips/nm-irix5.h: Delete.
3541
3542 20009-06-07 Pedro Alves <pedro@codesourcery.com>
3543
3544 * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
3545 to enum target_object. Cleanup comments.
3546 * auxv.h: Include "target.h". Cleanup comments to not mention
3547 NATIVE_XFER_AUXV anymore.
3548
3549 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3550
3551 * inferior.h (procfs_first_available): Move declaration to...
3552 * proc-utils.h: ... here.
3553 * sol-thread.c: Include procfs.h and proc-utils.h.
3554
3555 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3556
3557 * inferior.h (proc_iterate_over_mappings): Delete declaration.
3558 * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
3559 * procfs.c (proc_iterate_over_mappings): Delete.
3560
3561 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3562
3563 * target.h (struct target_ops): Make to_has_all_memory,
3564 to_has_memory, to_has_stack, to_has_registers and to_has_execution
3565 methods instead of variables.
3566 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
3567 (target_has_registers_1, target_has_execution_1): Declare
3568 functions.
3569 (target_has_all_memory): Rewrite to call target_has_all_memory_1.
3570 (target_has_memory): Rewrite to call target_has_memory_1.
3571 (target_has_stack): Rewrite to call target_has_all_stack_1.
3572 (target_has_registers): Rewrite to call target_has_registers_1.
3573 (target_has_execution): Rewrite to call target_has_execution_1.
3574 (default_child_has_all_memory, default_child_has_memory)
3575 (default_child_has_stack, default_child_has_registers)
3576 (default_child_has_execution): Declare.
3577 (target_mark_running, target_mark_exited): Delete declarations.
3578 * target.c (default_child_has_all_memory,
3579 default_child_has_memory, default_child_has_stack,
3580 default_child_has_registers, default_child_has_execution): New.
3581 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
3582 target_has_registers_1, target_has_execution_1): New.
3583 (add_target): Default the to_has_all_memory, to_has_all_memory,
3584 to_has_memory, to_has_stack, to_has_registers and to_has_execution
3585 callbacks to return 0.
3586 (update_current_target): Do not inherit to_has_all_memory,
3587 to_has_memory, to_has_stack, to_has_registers or to_has_execution.
3588 (target_mark_running, target_mark_exited): Delete.
3589 (memory_xfer_partial): Adjust.
3590 (target_read_memory, target_write_memory, target_search_memory):
3591 Dispatch to the the top-most target, not the flattened
3592 current_target.
3593 (target_info): Adjust.
3594 (init_dummy_target): Install return_zero as callback for
3595 to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
3596 to_has_execution.
3597 (set_maintenance_target_async_permitted): Use have_live_inferiors
3598 instead of target_has_execution.
3599 * target-memory.c (target_write_memory_blocks): Dispatch memory
3600 writes to the the top-most target, not the flattened
3601 current_target.
3602
3603 * breakpoint.c (insert_breakpoints): Don't check for
3604 target_has_execution here.
3605 (update_global_location_list): Check if there are live inferiors
3606 to debug instead of target_has_execution.
3607 * infcmd.c (kill_command, detach_command): Check if there are
3608 inferiors instead of target_has_execution.
3609 * inferior.h (have_live_inferiors): Declare.
3610 * inferior.c (have_live_inferiors): New.
3611 * infrun.c (normal_stop): Don't check for target_has_execution to
3612 finish the thread states.
3613 * thread.c (is_thread_state, is_stopped, is_exited, is_running)
3614 (any_running, is_executing): Remove checks for
3615 target_has_execution.
3616 * top.c (kill_or_detach): Don't try to kill core inferiors.
3617 (quit_target): Don't check for target_has_execution.
3618
3619 * corelow.c (core_has_memory, core_has_stack, core_has_registers):
3620 New.
3621 (init_core_ops): Install core_has_memory, core_has_stack and
3622 core_has_registers.
3623 * exec.c (exec_has_memory): New.
3624 (init_exec_ops): Install exec_has_memory.
3625 * remote.c (remote_add_inferior): Don't call target_mark_running.
3626 (remote_start_remote): Don't call target_mark_exited or call
3627 target_mark_running.
3628 (remote_open_1): Use have_inferiors instead of
3629 target_has_execution. Don't use target_mark_exited.
3630 (init_remote_ops): Install deafult_child_has_all_memory,
3631 default_child_has_memory, default_child_has_stack,
3632 default_child_has_registers, default_child_has_execution.
3633 * bsd-kvm.c (bsd_kvm_return_one): New.
3634 (bsd_kvm_add_target): Register bsd_kvm_return_one as
3635 to_has_memory, to_has_stack and to_has_registers callbacks.
3636 * remote-m32r-sdi.c (m32r_return_one): New.
3637 (init_m32r_ops): Register it.
3638 * inf-child.c (inf_child_target): Adjust to register
3639 default_child_has_all_memory, default_child_has_memory,
3640 default_child_has_stack, default_child_has_registers,
3641 default_child_has_execution callbacks.
3642 * gnu-nat.c (init_gnu_ops): Likewise.
3643 * go32-nat.c (init_go32_ops): Likewise.
3644 * hpux-thread.c (init_hpux_thread_ops): Likewise.
3645 * monitor.c (init_base_monitor_ops): Likewise.
3646 * nto-procfs.c (init_procfs_ops): Likewise.
3647 * remote-mips.c (_initialize_remote_mips): Likewise.
3648 * windows-nat.c (init_windows_ops): Likewise.
3649 * remote-sim.c (gdbsim_create_inferior): Don't use
3650 target_mark_running or target_mark_exited.
3651 (gdbsim_mourn_inferior): Don't call target_mark_exited.
3652 (init_gdbsim_ops): Adjust to register
3653 default_child_has_all_memory, default_child_has_memory,
3654 default_child_has_stack, default_child_has_registers,
3655 default_child_has_execution callbacks.
3656
3657 * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
3658 there's no inferior selected, defer to a lower stratum.
3659
3660 2009-06-05 Tom Tromey <tromey@redhat.com>
3661
3662 * varobj.c (update_dynamic_varobj_children): Wrap error text in
3663 _().
3664 (install_visualizer): Likewise.
3665 (varobj_set_visualizer): Likewise.
3666
3667 2009-06-05 Marc Khouzam <marc.khouzam@ericsson.com>
3668
3669 * mi/mi-main.c (mi_cmd_exec_continue)
3670 (mi_cmd_exec_interrupt): Adjust parsing of thread group
3671 ids to current reality, where they don't have any 'p' prefix.
3672
3673 2009-06-05 Aleksandar Ristovski <aristovski@qnx.com>
3674
3675 * corelow.c (core_open): Check for core_gdbarch before calling
3676 gdbarch_target_signal_from_host.
3677
3678 2009-06-05 Tom Tromey <tromey@redhat.com>
3679
3680 * c-exp.y (parse_number): Don't use K&R definition.
3681 (yylex): Likewise.
3682 (yyerror): Likewise.
3683
3684 2009-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3685
3686 * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
3687
3688 2009-06-04 Ulrich Weigand <uweigand@de.ibm.com>
3689
3690 * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
3691 * ax-gdb.c (gen_var_ref): Likewise.
3692 * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
3693 * printcmd.c (address_info): Likewise.
3694 * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
3695 * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
3696 * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
3697 * dwarf2loc.h: Likewise.
3698 * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
3699
3700 * symtab.h: (struct symbol_register_ops): New struct definition.
3701 (struct symbol): Make "ops" member a union of symbol_computed_ops and
3702 symbol_register_ops callback pointers.
3703 (SYMBOL_REGISTER_OPS): New macro.
3704 * tracepoint.c: Include "objfiles.h".
3705 (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
3706 callback to retrieve register numbers.
3707 * ax-gdb.c (gen_var_ref): Likewise.
3708 * findvar.c (read_var_value): Likewise.
3709 * printcmd.c (address_info): Likewise.
3710
3711 * coffread.c (coff_reg_to_regnum): New function.
3712 (coff_register_funcs): New static variable.
3713 (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
3714 Install SYMBOL_REGISTER_OPS callbacks.
3715 * mdebugread.c (mdebug_reg_to_regnum): New function.
3716 (mdebug_register_funcs): New static variable.
3717 (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
3718 Install SYMBOL_REGISTER_OPS callbacks.
3719 * stabsread.c (stab_reg_to_regnum): New function.
3720 (stab_register_funcs): New static variable.
3721 (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
3722 Install SYMBOL_REGISTER_OPS callbacks.
3723
3724 2009-06-03 Doug Evans <dje@google.com>
3725
3726 * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
3727 after discarding its contents.
3728
3729 2009-06-03 Pedro Alves <pedro@codesourcery.com>
3730
3731 * target.c: Include "exec.h".
3732 (update_current_target): Don't inherit to_sections or
3733 to_sections_end.
3734 (target_get_section_table): New.
3735 (target_section_by_addr): Fetch the section table from the passed
3736 in target.
3737 (memory_xfer_partial): Handle unmapped overlay sections before
3738 anything else. Get the overlay mapped address here. Adjust to
3739 use section_table_xfer_memory_partial.
3740 (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
3741 instead of TARGET_OBJECT_MEMORY.
3742 (target_resize_to_sections): Delete.
3743 (remove_target_sections): Adjust to remove target sections from
3744 `current_target_sections', and use resize_section_table.
3745 * target.h (struct target_ops) <to_sections, to_sections_end>:
3746 Remove fields.
3747 <to_get_section_table>: New method.
3748 (xfer_memory, print_section_info): Delete declarations.
3749 (struct target_section_table): New type.
3750 (target_get_section_table): Declare.
3751 (target_resize_to_sections): Delete declaration.
3752 (remove_target_sections): Delete declaration.
3753 * bfd-target.c (target_bfd_xfer_partial): Get the section table
3754 from to_data.
3755 (target_bfd_get_section_table): New.
3756 (target_bfd_xclose): Adjust.
3757 (target_bfd_reopen): Store the section table in the to_data field.
3758 * corelow.c (core_data): New.
3759 (core_close): Adjust to release core_data and its sections.
3760 (core_open): Allocate core_data, and build its target sections
3761 table.
3762 (deprecated_core_resize_section_table): New.
3763 (core_files_info): Pass core_data to print_section_info.
3764 (core_xfer_partial): Adjust to use
3765 section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
3766 (init_core_ops): Do not install a deprecated_xfer_memory callback
3767 anymore.
3768 * solib.c (update_solib_list): Add the shared library sections
3769 to the current target sections table.
3770 * exec.c (current_target_sections_1): New global.
3771 (current_target_sections): New global.
3772 (exec_close_1): New function, refactored from exec_close. Remove
3773 the exec_bfd's sections from the current target sections table.
3774 Adjust to not use to_sections.
3775 (exec_close): Remove all target sections. Call exec_close_1.
3776 (exec_file_clear): Use exec_close_1 instead of unpushing the
3777 target.
3778 (exec_file_attach): Likewise. Adjust to not use to_sections. Add
3779 exec_bfd's sections to the current target sections table. Don't
3780 push the exec_ops target here.
3781 (resize_section_table): New.
3782 (add_target_sections): New.
3783 (remove_target_sections): Moved here.
3784 (section_table_xfer_memory): Adjust to implement the xfer_partial
3785 interface, and rename to...
3786 (section_table_xfer_memory_partial): ... this, replacing the
3787 current function of that same name.
3788 (exec_get_section_table): New.
3789 (exec_xfer_partial): New.
3790 (xfer_memory): Delete.
3791 (print_section_info): Replace the target_ops parameter by a
3792 target_section_table parameter.
3793 (exec_files_info, set_section_command, exec_set_section_address):
3794 Adjust to use the current sections table.
3795 (init_exec_ops): Do not register a deprecated_xfer_memory
3796 callback. Register to_xfer_partial and to_get_section_table
3797 callbacks.
3798 * infrun.c (handle_inferior_event): Update comments around
3799 solib_add.
3800 * rs6000-nat.c (xcoff_relocate_core): Adjust to use
3801 deprecated_core_resize_section_table.
3802 * exec.h (resize_section_table): Declare.
3803 (section_table_xfer_memory_partial): Add const char * argument.
3804 (remove_target_sections): Declare here.
3805 (add_target_sections): Declare.
3806 (print_section_info): Declare here.
3807 * gdbcore.h (deprecated_core_resize_section_table): Declare.
3808
3809 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
3810
3811 * value.h (struct internalvar): Remove.
3812 (get_internalvar_integer): Add prototype.
3813 (set_internalvar_integer): Add prototype.
3814 (clear_internalvar): Add prototype.
3815
3816 * value.c (struct internalvar): Move here. Add type member. Remove
3817 endian member. Add union_internalvar member instead of value member.
3818 (init_if_undefined_command): Use intvar->type.
3819 (create_internalvar): Do not initialize value/endian, but type.
3820 (create_internalvar_type_lazy): Call create_internalvar.
3821 (value_of_internalvar): Handle host-side internalvar contents.
3822 (set_internalvar_component): Likewise.
3823 (set_internalvar): Likewise.
3824 (get_internalvar_integer): New function.
3825 (clear_internalvar): Likewise.
3826 (set_internalvar_integer): Likewise.
3827 (preserve_values): Handle host-side internalvar contents.
3828
3829 * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
3830 set_internalvar_integer instead of set_internalvar.
3831 * findcmd.c (find_command): Likewise.
3832 * infrun.c (handle_inferior_event): Likewise.
3833 * source.c (forward_search_command, reverse_search_command): Likewise.
3834 * tracepoint.c (set_traceframe_num, set_tracepoint_num,
3835 set_traceframe_context): Likewise.
3836
3837 * printcmd.c (x_command): Call clear_internalvar instead of
3838 set_internalvar.
3839 * tracepoint.c (set_traceframe_context): Likewise.
3840
3841 * breakpoint.c (get_number_trailer): Call get_internalvar_integer
3842 instead of value_of_internalvar.
3843 * linespec.c (decode_dollar): Likewise.
3844
3845 * expprint.c (dump_subexp_body_standard): Use internalvar_name
3846 instead of accessing internalvar private elements.
3847 * valops.c (value_assign): Copy from original source instead of
3848 accessing internalvar private elements.
3849
3850 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
3851
3852 * scm-lang.c (builtin_type_scm): Remove.
3853 (scm_lookup_name): Add GDBARCH parameter. Use it instead of
3854 objfile architecture. Use per-architecture builtin_scm_type instead
3855 of builtin_type_scm.
3856 (evaluate_exp): Pass expression architecture to scm_lookup_name.
3857
3858 (scm_get_field): Add SIZE parameter. Use it instead of
3859 TYPE_LENGTH (builtin_type_scm).
3860
3861 (build_scm_types): New function.
3862 (scm_type_data): New variable.
3863 (builtin_scm_type): New function.
3864 (_initialize_scheme_language): Do not initialize builtin_type_scm.
3865 Register build_scm_types as post-init function for scm_type_data.
3866
3867 * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
3868 instead of builtin_type_scm.
3869
3870 * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
3871 (scm_get_field): Add SIZE paramter.
3872 (scm_scmval_print): Remove prototype.
3873 (builtin_type_scm): Remove.
3874 (struct builtin_scm_type): Add structure definition.
3875 (builtin_scm_type): Add prototype.
3876
3877 * scm-valprint.c (scm_inferior_print): Add TYPE parameter. Use it
3878 instead of builtin_core_addr type; do not use objfile architecture.
3879 (scm_scmlist_print): Add TYPE parameter. Use it to define SCM_SIZE.
3880 Pass type to scm_scmval_print.
3881 (scm_ipruk): Add TYPE parameter. Use it to define SCM_SIZE.
3882 (scm_scmval_print): Make static. Add TYPE parameter. Use it to
3883 define SCM_SIZE. Pass type to scm_ipruk and scm_scmlist_print.
3884 (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
3885
3886 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
3887
3888 * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
3889 mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
3890 mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
3891 mdebug_type_unsigned_char, mdebug_type_unsigned_short,
3892 mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
3893 mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
3894 mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
3895 mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
3896 mdebug_type_complex, mdebug_type_double_complex,
3897 mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
3898 Remove.
3899
3900 (basic_type_data): New global variable.
3901 (basic_type): New function.
3902 (parse_type): Remove static basic type map map_bt. Call basic_type
3903 to get basic types instead of using mdebug_type_ variables.
3904
3905 (parse_symbol): Use builtin types instead of mdebug_type_ variables.
3906 (upgrade_type): Likewise.
3907 (parse_procedure): Likewise.
3908 (psymtab_to_symtab_1): Likewise.
3909
3910 (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
3911 Initialize basic_type_data.
3912
3913 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
3914
3915 * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
3916 * dfp.c (promote_decimal): Remove.
3917 (decimal_binop): Convert LEN_RESULT to input parameter.
3918 Remove call to decimal_binop.
3919 (decimal_compare): Remove call to decimal_binop.
3920
3921 * valarith.c (value_binop): Pass desired result type length
3922 to decimal_binop.
3923
3924 2009-06-01 Tristan Gingold <gingold@adacore.com>
3925
3926 * configure.tgt (avr): Set gdb_sim to use the simulator.
3927
3928 2009-05-29 Doug Evans <dje@google.com>
3929
3930 * infrun.c (prepare_to_proceed): Document. Assert !non_stop.
3931 If scheduler-locking is enabled, we're not going to be singlestepping
3932 any other previously stopped thread.
3933
3934 2009-05-29 Pedro Alves <pedro@codesourcery.com>
3935
3936 * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
3937
3938 2009-05-29 Eli Zaretskii <eliz@gnu.org>
3939
3940 * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
3941 for stabs and COFF debug info.
3942
3943 2009-05-28 Pedro Alves <pedro@codesourcery.com>
3944
3945 * infrun.c (handle_inferior_event): When thread hoping, switch
3946 inferior_ptid to the event thread before removing breakpoints from
3947 the target. If not stopping, also try to revert back to a thread
3948 that was doing a "next". Check if that thread still exists before
3949 resuming.
3950 (currently_stepping_thread): Delete and merge with ...
3951 (currently_stepping): ... this.
3952 (currently_stepping_callback): Rename to ...
3953 (currently_stepping_or_nexting_callback): ... this, and also
3954 return true if the thread was stepping over a call (has a
3955 step-resume breakpoint).
3956
3957 2009-05-28 Tom Tromey <tromey@redhat.com>
3958
3959 * python/python.c (gdbpy_parameter): Rename. Fix error message.
3960 (GdbMethods): Change "get_parameter" to "parameter".
3961
3962 2009-05-28 Pierre Muller <muller@ics.u-strasbg.fr>
3963 Paul Pluzhnikov <ppluzhnikov@google.com>
3964
3965 * configure.ac (!have_libpython): Add python-prettyprint source
3966 and object files.
3967 * configure: Regenerate.
3968 * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
3969 python headers.
3970
3971 2009-05-27 Vladimir Prus <vladimir@codesourcery.com>
3972 Tom Tromey <tromey@redhat.com>
3973 Thiago Jung Bauermann <bauerman@br.ibm.com>
3974
3975 * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
3976 * varobj.h (varobj_set_visualizer): Declare.
3977 (varobj_get_display_hint): Likewise.
3978 (varobj_update_result_t) <children_changed, value_installed>: New
3979 fields.
3980 * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
3981 * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
3982 mi_cmd_var_set_child_range): Declare.
3983 * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
3984 (mi_cmd_var_list_children): Emit display hint.
3985 (varobj_update_one): Emit display hint. Handle dynamic children.
3986 * python/python.c (GdbMethods): Add "default_visualizer".
3987 * python/python-internal.h (apply_varobj_pretty_printer,
3988 gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
3989 Declare.
3990 (gdbpy_default_visualizer): Likewise.
3991 * varobj.c: Include python.h, python-internal.h.
3992 (PyObject): New typedef.
3993 (struct varobj) <children_requested, pretty_printer>: New fields.
3994 (varobj_create): Call install_default_visualizer.
3995 (instantiate_pretty_printer): New function.
3996 (varobj_set_display_format): Update.
3997 (varobj_get_display_hint): New function.
3998 (update_dynamic_varobj_children): New function.
3999 (varobj_get_num_children): Handle dynamic children.
4000 (varobj_list_children): Likewise.
4001 (install_new_value): Likewise.
4002 (varobj_add_child): New function.
4003 (install_visualizer): Likewise.
4004 (install_default_visualizer): Likewise.
4005 (varobj_set_visualizer): Likewise.
4006 (varobj_update): Handle dynamic children.
4007 (create_child): Use create_child_with_value.
4008 (create_child_with_value): New function.
4009 (value_get_print_value): Call pretty printer. Add value_formatter
4010 argument.
4011 (c_value_of_variable): Update.
4012 (varobj_invalidate): Always free all_rootvarobj.
4013 * python/python-prettyprint.c (apply_varobj_pretty_printer): New
4014 function.
4015 (gdbpy_get_varobj_pretty_printer): Likewise.
4016 (gdbpy_default_visualizer): Likewise.
4017
4018 2009-05-27 Tom Tromey <tromey@redhat.com>
4019 Thiago Jung Bauermann <bauerman@br.ibm.com>
4020 Phil Muldoon <pmuldoon@redhat.com>
4021 Paul Pluzhnikov <ppluzhnikov@google.com>
4022 Vladimir Prus <vladimir@codesourcery.com>
4023
4024 * python/python-value.c (value_object_to_value): New function.
4025 * python/python-internal.h: Include frameobject.h.
4026 (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
4027 Declare.
4028 (value_object_to_value): Declare.
4029 * printcmd.c (struct format_data) <raw>: New field.
4030 (last_format): Default to 0.
4031 (decode_format): Initialize val.raw. Handle /r flag.
4032 (print_command_1): Initialize fmt.raw and opts.raw.
4033 (output_command): Likewise.
4034 (x_command): Fix initialization of fmt.format. Initialize
4035 fmt.raw.
4036 (display_command): Initialize fmt.raw.
4037 (do_one_display): Set opts.raw.
4038 * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
4039 gdbpy_display_hint_cst): New globals.
4040 (_initialize_python): Initialize them. Set gdb.pretty_printers.
4041 * cp-valprint.c: Include python.h.
4042 (cp_print_value): Call apply_val_pretty_printer.
4043 * python/python.h (apply_val_pretty_printer): Declare.
4044 * stack.c (print_this_frame_argument_p): Remove.
4045 (print_frame_args): Compute summary flag. Don't use
4046 print_this_frame_argument_p.
4047 * valprint.c: Include python.h.
4048 (user_print_options): Initialize new fields.
4049 (scalar_type_p): New function.
4050 (val_print): Handle 'raw' and 'summary' modes. Call
4051 apply_val_pretty_printer.
4052 (value_print): Handle 'raw' mode.
4053 * valprint.h (struct value_print_options) <raw, summary>: New
4054 fields.
4055 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
4056 (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
4057 (python-prettyprint.o): New target.
4058 * python/python-prettyprint.c: New file.
4059
4060 2009-05-27 Tom Tromey <tromey@redhat.com>
4061 Paul Pluzhnikov <ppluzhnikov@google.com>
4062
4063 * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
4064 value_address.
4065 * cli/cli-dump.c (dump_value_to_file): Use value_address.
4066 * valprint.c (common_val_print): Likewise.
4067 * v850-tdep.c (v850_push_dummy_call): Use value_address.
4068 * tracepoint.c (encode_actions): Use value_address.
4069 * printcmd.c (print_formatted): Use value_address.
4070 (x_command): Likewise.
4071 * p-valprint.c (pascal_object_print_static_field): Use
4072 value_address.
4073 * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
4074 * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
4075 * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
4076 * jv-valprint.c (java_value_print): Use value_address.
4077 * infcall.c (find_function_addr): Use value_address.
4078 * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
4079 * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
4080 * frv-tdep.c (frv_push_dummy_call): Use value_address.
4081 * frame.c (frame_register_unwind): Use value_address.
4082 (frame_unwind_register_value): Likewise.
4083 * darwin-nat-info.c (info_mach_region_command): Use
4084 value_address.
4085 * cp-valprint.c (cp_print_static_field): Use value_address.
4086 * c-valprint.c (c_value_print): Use value_address.
4087 * breakpoint.c (update_watchpoint): Use value_address.
4088 (can_use_hardware_watchpoint): Likewise.
4089 * ada-valprint.c (ada_val_print_1): Use value_address.
4090 (ada_value_print): Likewise.
4091 * ada-tasks.c (read_fat_string_value): Use value_address.
4092 * jv-lang.c (java_link_class_type): Use set_value_address.
4093 (java_link_class_type): Likewise.
4094 (get_java_utf8_name): Use value_address.
4095 (type_from_class): Likewise.
4096 (java_link_class_type): Likewise.
4097 * findvar.c (value_of_register): Use set_value_address.
4098 (read_var_value): Likewise.
4099 (read_var_value): Likewise.
4100 * eval.c (evaluate_subexp_standard): Use set_value_address.
4101 (evaluate_subexp_standard): Use value_address.
4102 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
4103 * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
4104 (ada_value_primitive_packed_val): Likewise.
4105 (ensure_lval): Likewise.
4106 (thin_data_pntr): Use value_address.
4107 (desc_bounds): Likewise.
4108 (ada_value_primitive_packed_val): Likewise.
4109 (value_assign_to_component): Likewise.
4110 (ensure_lval): Likewise.
4111 (make_array_descriptor): Likewise.
4112 (ada_to_fixed_value): Likewise.
4113 (unwrap_value): Likewise.
4114 * value.c (deprecated_value_address_hack): Remove.
4115 (value_address): New function.
4116 (value_raw_address): Likewise.
4117 (set_value_address): Likewise.
4118 (value_fn_field): Use set_value_address.
4119 (value_from_contents_and_address): Likewise.
4120 (value_fn_field): Likewise.
4121 (allocate_value_lazy): Don't use VALUE_ADDRESS.
4122 (value_as_address): Use value_address.
4123 (value_static_field): Likewise.
4124 * valops.c (search_struct_field): Use set_value_address.
4125 (value_at): Likewise.
4126 (value_at_lazy): Likewise.
4127 (value_repeat): Likewise.
4128 (value_cast_structs): Use value_address.
4129 (value_cast): Likewise.
4130 (value_fetch_lazy): Likewise.
4131 (value_assign): Likewise.
4132 (value_repeat): Likewise.
4133 (address_of_variable): Likewise.
4134 (value_coerce_array): Likewise.
4135 (value_coerce_function): Likewise.
4136 (value_addr): Likewise.
4137 (search_struct_field): Likewise.
4138 (search_struct_method): Likewise.
4139 (find_method_list): Likewise.
4140 (value_struct_elt_for_reference): Likewise.
4141 (value_full_object): Likewise.
4142 * jv-valprint.c (java_value_print): Use set_value_address.
4143 * value.h (deprecated_value_address_hack): Remove.
4144 (VALUE_ADDRESS): Remove.
4145 (value_address): Declare.
4146 (value_raw_address): Declare.
4147 (set_value_address): Declare.
4148
4149 2009-05-27 Tom Tromey <tromey@redhat.com>
4150 Thiago Jung Bauermann <bauerman@br.ibm.com>
4151 Phil Muldoon <pmuldoon@redhat.com>
4152 Paul Pluzhnikov <ppluzhnikov@google.com>
4153
4154 * python/python.c (_initialize_python): Call
4155 gdbpy_initialize_types.
4156 (GdbMethods): Add "lookup_type".
4157 * python/python-value.c (value_object) <type>: New field.
4158 (valpy_dealloc): Decref type.
4159 (valpy_new): Initialize type.
4160 (valpy_get_type): New function.
4161 (value_to_value_object): Initialize type.
4162 (valpy_cast): New function.
4163 (value_object_getset): Add "type".
4164 (value_object_methods): Add "cast".
4165 * python/python-internal.h (type_to_type_object): Declare.
4166 (type_object_to_type): Likewise.
4167 (gdbpy_initialize_types): Likewise.
4168 (gdbpy_lookup_type): Declare.
4169 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
4170 (SUBDIR_PYTHON_SRCS): Add python-type.c.
4171 (python-type.o): New target.
4172 * python/python-type.c: New file.
4173
4174 2009-05-27 Tom Tromey <tromey@redhat.com>
4175 Thiago Jung Bauermann <bauerman@br.ibm.com>
4176 Phil Muldoon <pmuldoon@redhat.com>
4177
4178 * python/python.c: Include objfiles.h, observer.h.
4179 (gdbpy_auto_load): New global.
4180 (gdbpy_current_objfile): Likewise.
4181 (GDBPY_AUTO_FILENAME): New define.
4182 (gdbpy_new_objfile): New function.
4183 (gdbpy_get_current_objfile): Likewise.
4184 (gdbpy_objfiles): Likewise.
4185 (_initialize_python): Add "maint set auto-load". Call
4186 gdbpy_initialize_objfile. Attach objfile observer.
4187 (GdbMethods): New methods current_objfile, objfiles.
4188 * python/python-objfile.c: New file.
4189 * python/python-internal.h (objfile_to_objfile_object): Declare.
4190 (objfpy_get_printers): Likewise.
4191 (gdbpy_initialize_objfile): Likewise.
4192 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
4193 (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
4194 (python-objfile.o): New target.
4195
4196 2009-05-27 Pedro Alves <pedro@codesourcery.com>
4197
4198 * infrun.c (follow_exec): Clear the stop_requested flag.
4199 * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
4200 Add debug output.
4201
4202 2009-05-27 Aleksandar Ristovski <aristovski@qnx.com>
4203
4204 * nto-procfs.c (get_regset): Pass correct pointer.
4205
4206 2009-05-26 Doug Evans <dje@google.com>
4207
4208 * dwarf2read.c (follow_die_ref): Add comment.
4209 (dwarf2_mark_helper): Tweak comment.
4210 (dwarf2_mark): Move description to its proper place.
4211
4212 2009-05-25 Pierre Muller <muller@ics.u-strasbg.fr>
4213
4214 * procfs.c (procfs_wait): Add options parameter.
4215
4216 2009-05-24 Doug Evans <dje@google.com>
4217
4218 Global renaming of find_thread_pid to find_thread_ptid.
4219 * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
4220 * thread.c (find_thread_ptid): Renamed from find_thread_pid.
4221 All callers updated.
4222
4223 * infrun.c (follow_fork): Initialize new step_* locals
4224 to avoid "may be used uninitialized" warnings.
4225
4226 2009-05-24 Pedro Alves <pedro@codesourcery.com>
4227
4228 * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
4229
4230 2009-05-24 Pedro Alves <pedro@codesourcery.com>
4231
4232 * gdbthread.h (struct thread_info): New `pending_follow' field.
4233 * thread.c (new_thread): New function.
4234 (add_thread_silent): Use it.
4235 * breakpoint.c (internal_breakpoint_number): New global, moved
4236 from inside...
4237 (create_internal_breakpoint): ... this.
4238 (clone_momentary_breakpoint): New.
4239 * breakpoint.h (clone_momentary_breakpoint): Declare.
4240 * infrun.c (nullify_last_target_wait_ptid): Move declaration
4241 higher.
4242 (pending_follow): Delete.
4243 (follow_fork): Handle pending follow fork event here. Moved the
4244 preserving of thread stepping state here.
4245 (resume): Don't handle pending follow fork events here. Only
4246 install the inferior's terminal modes if we're about to resume it.
4247 (proceed): Handle possible pending follow fork events here.
4248 (init_wait_for_inferior): No need to clear pending_follow anymore,
4249 it's gone.
4250 (handle_inferior_event): Adjust to per-thread `pending_follow'.
4251 Call `follow_fork' to handle following the fork. If the
4252 follow-fork is cancelled, stop stepping.
4253 * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
4254 `pending_follow' events. Remove code that handled preserving the
4255 thread stepping state.
4256 * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
4257 * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
4258
4259 2009-05-24 Pierre Muller <muller@ics.u-strasbg.fr>
4260
4261 * symfile.c (add_shared_symbol_files_command): Remove
4262 prototype and function.
4263 (_initialize _symfile): Move "add-shared-symbol-files"
4264 command and "assf" alias.
4265 * windows-nat.c (_initialize_windows_nat): to here.
4266 Change "add-shared-symbol-files" to alias.
4267
4268 * config/i386/cygwin.mh: Remove NAT_FILE.
4269 * config/i386/mingw.mh: Remove NAT_FILE.
4270 * config/i386/mingw64.mh: Remove NAT_FILE.
4271 * config/i386/nm-cygwin.h: Remove file.
4272 * config/i386/nm-cygwin64.h: Remove file.
4273
4274 2009-05-24 Hui Zhu <teawater@gmail.com>
4275
4276 * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
4277 I386_LINUX_RECORD_IOCTL_*,
4278 I386_LINUX_RECORD_FCNTL_*) Removed.
4279 (i386_linux_init_abi): Change size of record from macros to
4280 numbers.
4281
4282 2009-05-24 Hui Zhu <teawater@gmail.com>
4283
4284 * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
4285 * linux-record.c (record_linux_system_call): Ditto.
4286 * linux-record.h (linux_record_tdep): Ditto.
4287
4288 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4289
4290 Replace the savestring calls by xstrdup calls where possible.
4291 * breakpoint.c (condition_command, set_raw_breakpoint)
4292 (create_catchpoint, update_breakpoint_locations): Replace the
4293 savestring calls by xstrdup calls where possible.
4294 * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
4295 (record_producer): Likewise.
4296 * coffread.c (coff_start_symtab, complete_symtab): Likewise.
4297 * corefile.c (set_gnutarget): Likewise.
4298 * dbxread.c (add_new_header_file): Likewise.
4299 * demangle.c (set_demangling_command, set_demangling_style): Likewise.
4300 * event-top.c (push_prompt, pop_prompt, command_line_handler)
4301 (set_async_prompt): Likewise.
4302 * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
4303 Likewise.
4304 * language.c (set_language_command, _initialize_language): Likewise.
4305 * linespec.c (decode_line_2): Likewise.
4306 * rs6000-nat.c (add_vmap): Likewise.
4307 * top.c (set_prompt, init_history, init_main): Likewise.
4308 * tracepoint.c (stringify_collection_list): Likewise.
4309 * varobj.c (varobj_create): Remove variable expr_len. Replace the
4310 savestring calls by xstrdup calls where possible.
4311 (value_of_root, c_name_of_variable, c_describe_child): Replace the
4312 savestring calls by xstrdup calls where possible.
4313 * xcoffread.c (complete_symtab): Likewise.
4314 * cli/cli-script.c (build_command_line, define_command): Likewise.
4315 * cli/cli-setshow.c (do_setshow_command): Likewise.
4316
4317 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4318
4319 Remove already unreachable code.
4320 * varobj.c (varobj_get_handle): Fix comment when error is called.
4321 All callers updated.
4322
4323 2009-05-23 Eli Zaretskii <eliz@gnu.org>
4324
4325 * README (`configure' options): Document GDB-specific options to
4326 `configure'.
4327
4328 * symtab.c (skip_prologue_using_lineinfo): New function.
4329 (find_function_start_sal): Use it to get to the first line of
4330 function's body that has an entry in the lineinfo table.
4331
4332 * symmisc.c (dump_symtab): Switch the current language to
4333 the language of the symtab we are dumping only if the symtab's
4334 language is neither language_auto nor language_unknown.
4335
4336 * coffread.c (coff_symtab_read): Set language_minimal as the
4337 language for the "_globals_" pseudo-file.
4338 (process_coff_symbol): Set the symbol's language to the language
4339 of current_subfile.
4340
4341 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4342
4343 * target.h (struct section_table): Rename to ...
4344 (struct target_section): ... this.
4345 * exec.c: Adjust all references.
4346 * exec.h: Adjust all references.
4347 * nto-tdep.c: Adjust all references.
4348 * nto-tdep.h: Adjust all references.
4349 * ppc-linux-tdep.c: Adjust all references.
4350 * rs6000-nat.c: Adjust all references.
4351 * s390-tdep.c: Adjust all references.
4352 * solib-darwin.c: Adjust all references.
4353 * solib-frv.c: Adjust all references.
4354 * solib-irix.c: Adjust all references.
4355 * solib-null.c: Adjust all references.
4356 * solib-osf.c: Adjust all references.
4357 * solib-pa64.c: Adjust all references.
4358 * solib-som.c: Adjust all references.
4359 * solib-sunos.c: Adjust all references.
4360 * solib-svr4.c: Adjust all references.
4361 * solib-target.c: Adjust all references.
4362 * solib.c: Adjust all references.
4363 * solist.h: Adjust all references.
4364 * symfile.c: Adjust all references.
4365 * symfile.h: Adjust all references.
4366 * target.c: Adjust all references.
4367
4368 2009-05-22 Hui Zhu <teawater@gmail.com>
4369
4370 Add sys_fcntl argument interfaces to linux_record_tdep.
4371
4372 * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
4373 fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
4374 interfaces.
4375 * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
4376 I386_LINUX_RECORD_FCNTL_F_GETLK64,
4377 I386_LINUX_RECORD_FCNTL_F_SETLK64,
4378 I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
4379 of I386 Linux sys_fcntl arguments.
4380 (i386_linux_init_abi): Set macros values to linux_record_tdep.
4381 * linux-record.c (record_linux_system_call): Change to use
4382 the interface in linux_record_tdep in sys_fcntl and
4383 sys_fcntl64.
4384
4385 * linux-record.c (record_linux_system_call): Fix the process
4386 record build error about type in CYGWIN.
4387
4388 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4389
4390 * inflow.c (kill_command): Delete left over static declaration.
4391
4392 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4393
4394 * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
4395 Include exec.h.
4396 (struct section_closure): Delete.
4397 (add_to_section_table): Delete.
4398 (build_target_sections_from_bfd): Delete.
4399 (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
4400 (target_bfd_reopen): Use build_section_table.
4401 * exec.c (xfer_memory): Move most code except for overlay
4402 debugging support from here...
4403 (section_table_xfer_memory): ... to this new function.
4404 (section_table_xfer_memory_partial): New.
4405 * exec.h (section_table_xfer_memory_partial): Declare.
4406 * bfd-target.h (build_target_sections_from_bfd): Delete
4407 declaration.
4408
4409 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4410
4411 * remote.c (compare_sections_command): Don't declare exec_bfd.
4412 * tracepoint.c: Include "gdbcore.h".
4413 (remote_set_transparent_ranges): Don't declare exec_bfd.
4414
4415 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4416
4417 * aix-thread.c (init_aix_thread_ops): Whitespace.
4418
4419 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4420
4421 * dec-thread.c (dec_thread_wait): Add options parameter. Use it
4422 to call the to_wait method in the target beneath.
4423 * remote-m32r-sdi.c (m32r_wait): Add options parameter.
4424
4425 2009-05-21 Joel Brobecker <brobecker@adacore.com>
4426
4427 * aix-thread.c (aix_thread_wait): Add options parameter. Use it
4428 to call the to_wait method in the target_beneath.
4429
4430 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4431
4432 * linux-nat.c (linux_nat_terminal_inferior)
4433 (linux_nat_terminal_ours): Don't check sync_execution.
4434 * remote.c (remote_terminal_inferior, remote_terminal_ours):
4435 Don't check sync_execution. Update comments.
4436 * target.c (target_terminal_inferior): New.
4437 * target.h (target_terminal_inferior): Delete macro, and declare
4438 as function.
4439 * event-top.c (async_disable_stdin): Make idempotent. Don't give
4440 the target the terminal here.
4441 * inflow.c (terminal_ours_1): Don't return early without setting
4442 `terminal_is_ours'.
4443
4444 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4445
4446 * target.h (TARGET_WNOHANG): New.
4447 * target.c (target_wait): Add `options' argument. Adjust.
4448 (struct target_ops) <to_wait>: Add `options' argument.
4449 (target_wait): Add `options' argument.
4450 * infrun.c (wait_for_inferior): Pass 0 as options to
4451 target_wait (blocking wait).
4452 (fetch_inferior_event): Pass TARGET_WNOHANG as options to
4453 target_wait.
4454 * fork-child.c (startup_inferior): Pass 0 as options to
4455 target_wait (blocking wait).
4456 * linux-nat.c (linux_nat_create_inferior): Remove async masking.
4457 (linux_nat_wait_1): Add `target_options' argument. Use it instead
4458 of checking on target_can_async_p.
4459 (linux_nat_wait): Add `target_options' argument. Adjust.
4460 * remote.c (remote_wait_ns): Add `options' argument. Adjust to
4461 check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
4462 (remote_wait_as): Add `options' argument. Adjust to check on
4463 TARGET_WNOWAIT instead of checking on remote_is_async_p. If doing
4464 a blocking wait, keep waiting until an interesting event comes
4465 out.
4466 (remote_wait): Add `options' argument. Don't loop here if the
4467 target is in async mode, and a blocking wait has been requested.
4468
4469 * top.c (deprecated_target_wait_hook): Add `options' argument.
4470 * linux-thread-db.c (thread_db_wait): Add `options' argument, and
4471 pass it down to the layer beneath.
4472 * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
4473 * record.c (record_beneath_to_wait): Add `options' argument.
4474 (record_wait): Add `options' argument, and pass it down to the
4475 layer beneath.
4476 * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
4477 * darwin-nat.c (darwin_wait): Likewise.
4478 * defs.h (deprecated_target_wait_hook): Likewise.
4479 * gnu-nat.c (gnu_wait): Add `options' argument.
4480 * go32-nat.c (go32_wait): Likewise.
4481 * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
4482 pass it down to the layer beneath.
4483 * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
4484 * monitor.c (monitor_wait): Likewise.
4485 * nto-procfs.c (procfs_wait): Likewise.
4486 * remote-mips.c (mips_wait): Add `options' argument.
4487 * remote-sim.c (gdbsim_wait): Likewise.
4488 * rs6000-nat.c (rs6000_wait): Add `options' argument.
4489 * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
4490 it down to the layer beneath.
4491 * spu-linux-nat.c (spu_child_wait): Add `options' argument.
4492 * windows-nat.c (windows_wait): Likewise.
4493 * tui/tui-hooks.c (tui_target_wait_hook): Likewise. Adjust.
4494
4495 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4496
4497 * mi/mi-interp.c (mi_on_resume): Account for whole process
4498 resumes.
4499
4500 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4501
4502 * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
4503
4504 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4505
4506 * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
4507
4508 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4509
4510 Fix parsing DW_AT_const_value using DW_FORM_string.
4511 * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
4512
4513 2009-05-20 Joel Brobecker <brobecker@adacore.com>
4514
4515 * aix-thread.c (giter_count): Do not count the main thread.
4516 (giter_accum): Do not include the main thread.
4517
4518 2009-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4519
4520 Remove the PROT parameter from openp.
4521 * source.c (openp): Remove the parameter PROT. Assertion check MODE.
4522 defs.h (openp): Update the prototype.
4523 Update all the openp callers.
4524
4525 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4526
4527 * inflow.c (kill_command): Moved to infcmd.c.
4528 (_initialize_inflow): Don't add the "kill" command or clear
4529 inferior_ptid here.
4530 * infcmd.c (kill_command): Moved here from inflow.c.
4531 (_initialize_infcmd): Add the "kill" command here.
4532
4533 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4534
4535 * fork-child.c: Don't include frame.h. Include terminal.h.
4536 (fork_inferior): Call new_tty_postfork after forking adn adding
4537 the child to the inferior list.
4538 * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
4539 here.
4540 * inflow.c (struct terminal_info): Remove const qualifier from
4541 `run_terminal' field.
4542 (inferior_thisrun_terminal): Tweak comment.
4543 (inflow_inferior_exit): Release the `run_terminal' field.
4544 (copy_terminal_info): New function.
4545 (new_tty_postfork): New function.
4546 * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
4547 (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
4548 * inf-ptrace.c: Include terminal.h.
4549 (inf_ptrace_follow_fork): Copy the parent's terminal info to the
4550 child.
4551 * linux-nat.c: Include terminal.h.
4552 (linux_child_follow_fork): Copy the parent's terminal info to the
4553 child.
4554 * inf-ttrace.c: Include terminal.h.
4555 (inf_ttrace_follow_fork): Copy the parent's terminal info to the
4556 child.
4557
4558 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4559
4560 * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
4561 (update_global_location_list): Use gdbarch_has_global_breakpoints
4562 instead of gdbarch_has_global_solist and
4563 target_supports_multi_process.
4564 * dicos-tdep.c (dicos_init_abi): Set
4565 gdbarch_has_global_breakpoints.
4566 * gdbarch.sh (has_global_solist): Update comment.
4567 (has_global_breakpoints): New.
4568 * remote.c (remote_start_remote): Use
4569 gdbarch_has_global_breakpoints instead of
4570 gdbarch_has_global_solist.
4571 * target.c (target_detach): Use gdbarch_has_global_breakpoints
4572 instead of gdbarch_has_global_solist.
4573 * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
4574 of target_supports_multi_process.
4575
4576 2009-05-18 Paul Pluzhnikov <ppluzhnikov@google.com>
4577
4578 * objc-lang.c (find_methods): Plug a small memory leak.
4579
4580 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4581
4582 * solib-svr4.c: Include observer.h.
4583 (debug_base, debug_loader_offset_p, debug_loader_offset)
4584 (debug_loader_name, main_lm_addr): Move these globals...
4585 (struct svr4_info): ... into this new structure.
4586 (svr4_info_p): New typedef.
4587 (svr4_info): New global.
4588 (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
4589 functions.
4590 (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
4591 (solib_svr4_r_ldsomap): Add svr4_info argument. Adjust to
4592 per-inferior svr4.
4593 (open_symbol_file_object): Adjust to per-inferior svr4.
4594 (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
4595 Ditto.
4596 (enable_break): Add svr4_info argument. Adjust to per-inferior
4597 svr4.
4598 (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
4599 Adjust to per-inferior svr4.
4600 (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
4601 observer.
4602
4603 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4604
4605 * linux-nat.h (linux_proc_get_tgid): Declare.
4606 * linux-nat.c (linux_proc_get_tgid): New.
4607 * linux-thread-db.c (struct thread_db_info): New field
4608 `need_stale_parent_threads_check'.
4609 (add_thread_db_info): Set it.
4610 (find_new_threads_callback): Ignore stale fork parent threads.
4611 (thread_db_resume): New.
4612 (init_thread_db_ops): Install thread_db_resume.
4613
4614 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4615
4616 * fork-child.c (fork_inferior): Only reset the thread list if this
4617 is the first inferior.
4618 (startup_inferior): If the target support multi-process, tell it
4619 to resume only the new process.
4620 * linux-nat.c (num_lwps): Delete global.
4621 (purge_lwp_list): New function.
4622 (num_lwps): New function.
4623 (add_lwp, delete_lwp): Adjust.
4624 (ptid_match): New.
4625 (iterate_over_lwps): Add filter argument. Handle it.
4626 (linux_nat_attach): Remove FIXME note.
4627 (linux_nat_detach): Adjust to iterate over threads of the inferior
4628 we're detaching from. Adjust to num_lwps being a function. Don't
4629 assume the head of the lwp list is the main thread of the process
4630 we're detaching from. Don't destroy the LWP list.
4631 (resume_callback): Add debug output.
4632 (linux_nat_resume): Handle resuming a single inferior. Allow a
4633 wildcard resume in non-stop mode.
4634 (linux_handle_extended_wait): Don't assume inferior_ptid is the
4635 correct inferior of the parent LWP.
4636 (status_callback): Also check lp->waitstatus.
4637 (select_event_lwp): Add new filter parameter. Handle it.
4638 (linux_nat_filter_event): Adjust to num_lwps being a function.
4639 (linux_nat_wait_1): When adding the first lwp of the inferior, use
4640 an is_lwp check instead of checking for the number of lwps.
4641 (linux_nat_wait_1): Handle waiting for a specific tgid. Handle
4642 pending process exit statuses.
4643 (linux_nat_mourn_inferior): Don't destroy all the LWP info.
4644 Instead delete LWPs of the inferior that we're mourning. Don't
4645 unregister from the event loop here.
4646 (linux_nat_pid_to_str): Use `num_lwps'.
4647 (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
4648 single inferior.
4649 (linux_nat_is_async_p): Check if async was masked out.
4650 (linux_multi_process): New global.
4651 (linux_nat_supports_multi_process): New.
4652 (linux_nat_stop_lwp): Remove LWP filtering. It is done by the
4653 caller.
4654 (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
4655 LWP filtering.
4656 (linux_nat_close): New.
4657 (linux_nat_add_target): Register linux_nat_close and
4658 linux_nat_supports_multi_process.
4659 * linux-nat.h (iterate_over_lwps): Add filter argument.
4660 * linux-thread-db.c (thread_db_handle): Delete.
4661 (proc_handle, thread_agent, td_init_p, td_ta_new_p)
4662 (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
4663 (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
4664 (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
4665 (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
4666 longer globals, moved to...
4667 (struct thread_db_info): ... this new structure.
4668 (thread_db_list): New.
4669 (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
4670 New.
4671 (have_threads_callback): Filter out threads of all inferiors but
4672 the one specified by the ARGS argument.
4673 (have_threads): Add ptid argument specifying the inferior we're
4674 interested in. Handle it.
4675 (struct thread_get_info_inout): New.
4676 (thread_get_info_callback, thread_from_lwp): Adjust to use it.
4677 (thread_db_attach_lwp): Check that inferior of the passed in
4678 thread is using thread-db. Adjust.
4679 (enable_thread_event): Remove thread_agent parameter. Instead,
4680 get it from the per-inferior thread-db info.
4681 (dladdr_to_soname): Move higher up.
4682 (enable_thread_event_reporting): Adjust to use per-inferior
4683 thread-db info.
4684 (try_thread_db_load_1): Replace `handle' parameter by a
4685 thread_db_info parameter. Adjust to use per-inferior thread-db
4686 info.
4687 (try_thread_db_load): Adjust to use per-inferior thread-db info.
4688 (thread_db_load, disable_thread_event_reporting): Ditto.
4689 (check_for_thread_db): Remove conditional reporting of which
4690 libthread_db is in use.
4691 (thread_db_new_objfile): Add comment about inferior_ptid.
4692 (attach_thread): Adjust to use per-inferior thread-db info.
4693 (thread_db_detach): Adjust to use per-inferior thread-db info.
4694 Remove thread event breakpoints of the current inferior. Only
4695 unpush the thread-db target if there are no more processes using
4696 it.
4697 (check_event): Adjust to use per-inferior thread-db info.
4698 (thread_db_wait): Adjust to use per-inferior thread-db info. Only
4699 unpush the thread-db target if there are no more processes using
4700 it.
4701 (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
4702 info. Mark breakpoints of the current inferior out before
4703 deleting them. Only unpush the thread-db target if there are no
4704 more processes using it.
4705 (find_new_threads_callback): Adjust to use per-inferior thread_db
4706 info.
4707 (thread_db_find_new_threads_1): Add new ptid argument. Adjust to
4708 use per-inferior thread-db info.
4709 (thread_db_find_new_threads): Adjust to use per-inferior thread-db
4710 info.
4711 (thread_db_get_thread_local_address): Adjust.
4712 (thread_db_get_ada_task_ptid): Adjust.
4713 * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
4714 if there no more processes left to debug.
4715 * thread.c (set_running, set_executing): Handle resuming all
4716 threads of a single inferior.
4717 * mi/mi-interp.c (mi_output_running_pid): New.
4718 (mi_inferior_count): New.
4719 (mi_on_resume): For backwards compatibility, if resuming all
4720 threads of an inferior, and there is only one inferior, output
4721 "all".
4722
4723 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4724
4725 * ada-lang.c (ada_find_any_type): Move check for primitive types ...
4726 (to_fixed_range_type): ... to here.
4727
4728 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4729
4730 * ada-lang.c (desc_data_type): Remove, replace by ...
4731 (desc_data_target_type): ... this.
4732 (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
4733 (ada_is_array_descriptor_type): Likewise.
4734 (ada_type_of_array): Likewise.
4735 (ada_coerce_to_simple_array_type): Likewise.
4736 (ada_array_element_type): Likewise.
4737
4738 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4739
4740 * ada-valprint.c (ada_val_print_1): Use val_print_string to print
4741 result of ada_vax_float_print_function inferior call.
4742
4743 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4744
4745 * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
4746 avoid creating a dummy value.
4747
4748 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4749
4750 * p-valprint.c (pascal_val_print): Use extract_typed_address
4751 to extract reference value.
4752
4753 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4754
4755 * doublest.c (NAN): Remove unused define.
4756 (extract_floating_by_length, deprecated_extract_floating): Remove.
4757 (store_floating_by_length, deprecated_store_floating): Remove.
4758 (extract_typed_floating): Do not call extract_floating_by_length.
4759 (store_typed_floating): Do not call store_floating_by_length.
4760 (convert_typed_floating): Remove redundant assertions.
4761 * doublest.h (deprecated_extract_floating): Remove.
4762 (deprecated_store_floating): Remove.
4763 * sh64-tdep.c (sh64_register_convert_to_raw): Call
4764 extract_typed_floating instead of deprecated_extract_floating.
4765
4766 2009-05-18 Jon Beniston <jon@beniston.com>
4767
4768 * MAINTAINERS: Add lm32 target.
4769 * Makefile.in: Add lm32 dependencies.
4770 * NEWS: Indicate lm32 is a new target.
4771 * configure.tgt: Add lm32 targets.
4772 * lm32-tdep.c: New file.
4773
4774 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4775
4776 * corelow.c (core_open): Flush the register cache before doing
4777 anything with registers.
4778
4779 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4780
4781 * inflow.h (our_process_group): Remove declaration.
4782 (inferior_process_group): Delete global variable declaration.
4783 (inferior_process_group): New function declaration.
4784 * inflow.c: Include observer.h.
4785 (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
4786 Delete.
4787 (struct terminal_info): New struct.
4788 (our_terminal_info): New global.
4789 (inferior_process_group): New function.
4790 (inferior_thisrun_terminal): Extend description comment.
4791 (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
4792 instead of globals.
4793 (terminal_init_inferior_with_pgrp): Adjust to per-inferior
4794 terminal settings.
4795 (terminal_inferior): Ditto.
4796 (terminal_ours_1): Ditto.
4797 (inflow_new_inferior, inflow_inferior_exit): New functions.
4798 (child_terminal_info): Adjust to per-inferior terminal settings.
4799 (osig_set): New global.
4800 (set_sigint_trap): Adjust to per-inferior terminal settings. Set
4801 or clear `osig_set' accordingly.
4802 (clear_sigint_trap): Check `osig_set' to decide wheater to restore
4803 SIGINT handler, instead of checking the current inferior (which
4804 may be none).
4805 (_initialize_inflow): Attach inflow_new_inferior and
4806 inflow_inferior_exit to the "new_inferior" and "inferior_exit"
4807 notifications, respectively.
4808 * inferior.h (struct terminal_info): Forward declare.
4809 (struct inferior): Add `terminal_info' field.
4810 * inferior.c (delete_inferior_1): Notify the inferior_exit
4811 observers before removing the inferior from the lists and deleting
4812 it.
4813 * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
4814 a function instead of a variable. Adjust.
4815 * procfs.c (procfs_stop): Ditto.
4816
4817 2009-05-17 Pedro Alves <pedro@codesourcery.com>
4818
4819 * infrun.c (handle_inferior_event): When handling a
4820 TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
4821 immediatelly.
4822 * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
4823 from the child if vforking.
4824 * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
4825 breakpoints from the child here.
4826
4827 2009-05-17 Pedro Alves <pedro@codesourcery.com>
4828
4829 * infrun.c (pending_follow): Remove execd_pathname member.
4830 (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
4831 (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
4832 event, don't copy `execd_pathname' to pending_follow, use the
4833 event copy instead. Release `execd_pathname' once done with
4834 handling the event.
4835
4836 * infrun.c (pending_follow): Remove mention of exec events.
4837
4838 2009-05-17 Hui Zhu <teawater@gmail.com>
4839
4840 * i386-tdep.c (i386_process_record): Make it extern.
4841 (i386_gdbarch_init): Don't call set_gdbarch_process_record
4842 here.
4843 * i386-tdep.h (i386_process_record): Declare.
4844 * i386-linux-tdep.c (i386_linux_init_abi): Call
4845 set_gdbarch_process_record.
4846
4847 2009-05-17 Vladimir Prus <vladimir@codesourcery.com>
4848
4849 Always report varobj as changed when in_scope attribute changes.
4850
4851 * varobj.c (install_new_value): If non-NULL-ness of value
4852 changed, return 1.
4853
4854 2009-05-15 Paul Pluzhnikov <ppluzhnikov@google.com>
4855
4856 * NEWS: Mention set/show libthread-db-search-path.
4857 * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
4858 (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
4859 * linux-thread-db.c (libthread_db_search_path): New setting.
4860 (thread_db_handle): New variable (replaces using_thread_db).
4861 (try_thread_db_load_1): New function.
4862 (try_thread_db_load, thread_db_load_search): Likewise.
4863 (dladdr_to_soname): Likewise.
4864 (thread_db_load): Iterate over possibly multiple libthread_db's.
4865 (check_for_thread_db): Attempt to load new libthread_db.
4866 (thread_db_detach, thread_db_wait): Unload libthread_db.
4867 (thread_db_mourn_inferior): Likewise.
4868 (_initialize_thread_db): Add new libthread-db-search-path option.
4869 Defer loading of libthread_db to check_for_thread_db.
4870 * solib.c (libpthread_name_p): New function.
4871 (libpthread_solib_p): Call it.
4872 * solib.h (libpthread_name_p): New prototype.
4873
4874 2009-05-15 Pierre Muller <muller@ics.u-strasbg.fr>
4875
4876 * MAINTAINERS: Update my email address.
4877
4878 2009-05-14 Paul Pluzhnikov <ppluzhnikov@google.com>
4879
4880 * breakpoint.h: Add breakpoint_re_set_objfile prototype.
4881 * breakpoint.c (create_overlay_event_breakpoint): Renamed
4882 from create_overlay_event_breakpoint_1, old
4883 create_overlay_event_breakpoint deleted.
4884 (breakpoint_re_set_objfile): Don't rescan all objfiles
4885 unnecessarily.
4886 (breakpoint_re_set): New function.
4887 * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
4888 instead of breakpoint_re_set.
4889 * objfiles.c (objfile_relocate): Likewise.
4890
4891 2009-05-14 Joel Brobecker <brobecker@adacore.com>
4892
4893 * gdbarch.sh: Add comment documenting the target_gdbarch global.
4894 gdbarch.h does NOT need to be regenerated as the corresponding
4895 change has already been made in a previous commit.
4896
4897 2009-05-14 Pierre Muller <muller@ics.u-strasbg.fr>
4898
4899 Remove all i386 debug register low level macros in config nm files.
4900 (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
4901 (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
4902 (I386_USE_GENERIC_WATCHPOIINTS): Remove.
4903
4904 * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
4905 (struct i386_dr_low_type): New type.
4906 (i386_dr_low): New global variable.
4907 * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
4908 (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
4909 i386_dr_low struct variable fields.
4910 (i386_remove_aligned_watchpoint): Likewise.
4911 (i386_stopped_data_address): Likewise.
4912 (i386_stopped_by_hwbp): Likewise.
4913 (show_debug_regs_command_added): New static variable.
4914 (add_show_debug_regs_command): New static function.
4915 (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
4916 (i386_set_debug_register_length): New function.
4917 (_initialize_i386_nat): Delete.
4918
4919 * amd64-linux-nat.c: Include "i386-nat.h".
4920 (amd64_linux_dr_set_control): Change to static.
4921 (amd64_linux_dr_get_status): Change to static.
4922 (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
4923 (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
4924
4925 * go32-nat.c: Include "i386-nat.h".
4926 (go32_set_addr): Change to static.
4927 (go32_set_dr7): Change to static. Change arg type to unisgned long.
4928 (go32_get_dr6): Change to static. Change return type to unisnged long.
4929 (init_go32_ops): Set i386_dr_low variable fields.
4930 * i386-linux-nat.c: Include "i386-nat.h".
4931 (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
4932 (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
4933 (_initialize_i386_linux_nat): Set i386_dr_low variable fields.
4934 * i386bsd-nat.h: Declare functions used for
4935 i386_dr_low fields in i386fbsd-nat.c.
4936 * i386fbsd-nat.c: Include "i386-nat.h".
4937 (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
4938 * windows-nat.c: Include "i386-nat.h".
4939 (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
4940 Change to static.
4941 (cygwin_get_dr6): Change return type to unisnged long.
4942 (cygwin_set_dr7): Change arg type to unisgned long.
4943 (init_windows_ops): Set i386_dr_low function fields.
4944
4945 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call
4946 i386_set_debug_register_length.
4947 * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
4948
4949 * config/i386/nm-cygwin.h: Remove all I386_* macros.
4950 * config/i386/nm-cygwin64.h: Likewise.
4951 * config/i386/nm-fbsd.h: Likewise.
4952 * config/i386/nm-linux.h: Likewise.
4953 * config/i386/nm-i386.h: Remove completely.
4954 * config/i386/nm-go32.h: Remove completely.
4955 * config/i386/nm-linux64.h: Remove completely.
4956 * config/i386/go32.mh (NAT_FILE): Remove entry.
4957 * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
4958
4959 2009-05-14 Jon Beniston <jon@beniston.com>
4960
4961 * MAINTAINERS: Add Jon Beniston to write after approval list.
4962
4963 2009-05-13 Paul Pluzhnikov <ppluzhnikov@google.com>
4964
4965 * objc-lang.c (objc_objfile_data): New variable.
4966 (find_methods): Skip objfiles without Obj-C methods.
4967 (_initialize_objc_lang): New function.
4968
4969 2009-05-13 Joel Brobecker <brobecker@adacore.com>
4970
4971 * c-lang.c (print_wchar): Remove unnecessary cast.
4972
4973 2009-05-12 Jim Blandy <jimb@red-bean.com>
4974
4975 * MAINTAINERS: Remove self as m32c target maintainer.
4976
4977 2009-05-12 Pedro Alves <pedro@codesourcery.com>
4978
4979 * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
4980 * command.h (deprecated_add_set_cmd): Delete declaration.
4981 * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
4982 'set debug gnu-nat' and 'show debug gnu-nat'.
4983 * i386-nat.c (_initialize_i386_nat): Replace 'maint
4984 show-debug-registers' with 'maint set show-debug-registers' and
4985 'maint show show-debug-registers'.
4986 * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
4987 show-debug-registers' with 'maint set show-debug-registers' and
4988 'maint show show-debug-registers'.
4989
4990 2009-05-12 Joel Brobecker <brobecker@adacore.com>
4991
4992 * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
4993 pushing it on the output obstack.
4994
4995 2009-05-11 Joel Brobecker <brobecker@adacore.com>
4996
4997 Fix internal error on breaking at a multi-locations caller source line.
4998 * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
4999 command with no parameters.
5000
5001 2009-05-11 Pedro Alves <pedro@codesourcery.com>
5002
5003 * linux-nat.c (enum sigchld_state): Delete.
5004 (linux_nat_async_events_state): Delete.
5005 (struct waitpid_result): Delete.
5006 (waitpid_queue): Delete.
5007 (queued_waitpid_1): Delete.
5008 (async_file_flush): New.
5009 (queued_waitpid, push_waitpid): Delete.
5010 (async_file_mark): New.
5011 (drain_queued_events): Delete.
5012 (my_waitpid): Remove locally queued events handling.
5013 (linux_test_for_tracefork): Upjust.
5014 (linux_child_follow_fork): Ditto.
5015 (sync_sigchld_action): Delete.
5016 (blocked_mask): Reinstate.
5017 (async_sigchld_action): Rename to...
5018 (sigchld_action): ... this.
5019 (block_child_signals): New.
5020 (restore_child_signals_mask): New.
5021 (lin_lwp_attach_lwp): Adjust.
5022 (linux_nat_create_inferior): Ditto.
5023 (linux_nat_attach): Also use lp->status in async mode.
5024 (get_pending_status): Don't use queued_waitpid.
5025 (linux_nat_detach): Don't drain locally queued events.
5026 (linux_nat_resume): Allow pending wait statuses stored lp->status
5027 in async mode. If returning early due to a pending event,
5028 re-register the event source.
5029 (stop_wait_callback): Allow pending wait statuses stored
5030 lp->status in async mode.
5031 (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
5032 (linux_nat_wait): Rename to ...
5033 (linux_nat_wait_1): ... this. Allow pending wait statuses stored
5034 lp->status in async mode. Always add WNOHANG to the waitpid
5035 options in async mode.
5036 (linux_nat_wait): New.
5037 (kill_callback): Don't drain locally queued events.
5038 (sigchld_handler): Rewrite.
5039 (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
5040 refer to "set target-async".
5041 (linux_nat_async_mask): If in non-stop, and re-enabling async
5042 mode, re-register the target event source in the event loop.
5043 (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
5044 (get_pending_events, async_sigchld_handler)
5045 (linux_nat_async_events): Delete.
5046 (handle_target_event): New.
5047 (linux_nat_async_file_handler): Delete.
5048 (linux_async_pipe): New.
5049 (linux_nat_async): Only re-register in the event loop if not
5050 registered yet. Always notify the event-loop once if enabling the
5051 event source.
5052 (linux_nat_stop_lwp): Rewrite to handle pending events stored in
5053 lp->status, not in the locally queued event list.
5054 (linux_nat_stop): Don't mask out async event handling.
5055 (linux_nat_setup_async): Delete.
5056 (_initialize_linux_nat): Adjust.
5057 (lin_thread_get_thread_signals): blocked_mask is global again.
5058 Adjust.
5059
5060 2009-05-11 Pierre Muller <muller@ics.u-strasbg.fr>
5061
5062 Unify target macros.
5063
5064 * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
5065 (target_stoppped_by_watchpoint): New macro.
5066 (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
5067 (target_have_steppable_watchpoint): New macro.
5068 (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
5069 (target_have_continuable_watchpoint): New macro.
5070 (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
5071 (target_can_use_hardware_watchpoint): New macro.
5072 (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
5073 (target_region_ok_for_hw_watchpoint): New macro.
5074
5075 * breakpoint.c (update_watchpoint): Use new macros.
5076 (bpstat_alloc): Likewise.
5077 (create_breakpoint): Likewise.
5078 (watch_command_1): Likewise.
5079 (can_use_hardware_watchpoint): Likewise.
5080 (do_enable_breakpoint): Likewise.
5081 * infrun.c (handle_inferior_event): Adapt to new macros.
5082 * mips-tdep.c (mips_gdbarch_init): Update comments.
5083 * procfs.c (procfs_set_watchpoint): Update comment.
5084 (procfs_insert_watchpoint): Adapt to new macros.
5085 * remote-m32r-sdi.c (m32r_stop):
5086 * remote-mips.c (mips_remove_breakpoint):
5087 * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
5088 (debug_to_stopped_by_watchpoint): Likewise.
5089
5090
5091 2009-05-10 Pierre Muller <muller@ics.u-strasbg.fr>
5092
5093 * src/gdb/target.h: Remove all tests for already defined
5094 macros. All macros defined here should not be set in config
5095 headers anymore.
5096
5097 2009-05-08 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5098
5099 * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
5100 (have_ptrace_getsetfpregs): Likewise.
5101 fetch_all_gp_regs): New function.
5102 (fetch_gp_regs): New function.
5103 (fetch_all_fp_regs): Likewise.
5104 (fetch_fp_regs): New function.
5105 (fetch_ppc_registers): Using the new methods to fetch general-
5106 purpose and floating-pointer registers.
5107 (store_all_gp_regs): New function.
5108 (store_gp_regs): Likewise.
5109 (store_all_fp_regs): New function.
5110 (store_fp_regs): Likewise.
5111 (store_ppc_registers): Using the new methods to store general-
5112 purpose and floating-pointer registers.
5113
5114 2009-05-08 Doug Evans <dje@google.com>
5115
5116 * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
5117
5118 2009-05-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5119
5120 * MAINTAINERS (Write After Approval): Add self.
5121
5122 2009-05-07 Joel Brobecker <brobecker@adacore.com>
5123
5124 * gdbarch.h (target_gdbarch): Add comment documenting this global.
5125
5126 2009-05-06 Joel Brobecker <brobecker@adacore.com>
5127
5128 * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
5129 system iconv.
5130 * configure: Regenerate.
5131
5132 2009-05-06 Joel Brobecker <brobecker@adacore.com>
5133
5134 * utils.c: Add include of gdb_usleep.h.
5135 (defaulted_query): Detect false EOF conditions that happen
5136 on terminals opened with the O_NONBLOCK flag when there is
5137 nothing to read.
5138
5139 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5140
5141 * inferior.c (add_inferior): Move observer_notify_new_inferior
5142 call to ...
5143 (add_inferior_silent): ... here.
5144
5145 2009-05-06 Pierre Muller <muller@ics.u-strasbg.fr>
5146 Pedro Alves <pedro@codesourcery.com>
5147
5148 * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
5149 (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
5150 functions.
5151 (procfs_stopped_by_watchpoint): Made static, ptid argument
5152 removed.
5153 (_initialize_procfs): Register new watchpoint related target
5154 functions.
5155 * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
5156 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
5157 (HAVE_CONTINUABLE_WATCHPOINT): Delete.
5158 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5159 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5160 declarations.
5161 * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
5162 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
5163 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5164 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5165 declarations.
5166 * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
5167 (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
5168 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5169 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5170 declarations.
5171
5172 2009-05-06 Hui Zhu <teawater@gmail.com>
5173
5174 * i386-tdep.c (i386_process_record): Change bzero to memset.
5175
5176 2009-05-06 Hui Zhu <teawater@gmail.com>
5177
5178 * NEWS: Add item for process record and replay.
5179
5180 2009-05-05 Maxim Grigoriev <maxim2405@gmail.com>
5181
5182 * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
5183
5184 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
5185
5186 * inferior.h (read_pc, write_pc): Remove.
5187 * regcache.c (read_pc, write_pc): Remove.
5188
5189 * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
5190 of read_pc.
5191 (handle_inferior_event): Use regcache_read_pc instead of read_pc
5192 when determining value of stop_pc. Replace subsequent uses of
5193 read_pc by inspecting already-retrieved stop_pc value.
5194 (keep_going): Use regcache_read_pc instead of read_pc.
5195
5196 * breakpoint.c (watchpoint_check): Use current frame architecture
5197 and PC instead of current_gdbarch and read_pc ().
5198 * tracepoint.c (set_traceframe_context): Replace PC argument
5199 with FRAME argument.
5200 (trace_start_command, finish_tfind_command): Update calls.
5201 (finish_tfind_command): Compare frame IDs to identify transitions
5202 between frames.
5203 (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
5204 * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
5205 of gdbarch. Use regcache_read_pc and regcache_write_pc instead
5206 of read_pc and write_pc.
5207 (store_register): Make regcache argument non-const. Update call
5208 to exec_one_dummy_insn.
5209
5210 * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
5211 * infcmd.c (post_create_inferior): Likewise.
5212 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
5213 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
5214 * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
5215 * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
5216 * linux-fork.c (fork_load_infrun_state): Likewise.
5217 * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
5218 * record.c (record_wait): Likewise.
5219 * procfs.c (procfs_wait): Likewise.
5220 * remote-mips.c (common_open, mips_wait): Likewise.
5221 * remote-m32r-sdi.c (m32r_resume): Likewise.
5222
5223 * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
5224 * monitor.c (monitor_create_inferior, monitor_load): Likewise.
5225 * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
5226 * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
5227 * remote-mips.c (mips_create_inferior, mips_load): Likewise.
5228
5229 * solib-darwin.c: Include "regcache.h".
5230 * solib-pa64.c: Include "regcache.h".
5231 * solib-svr4.c: Include "regcache.h.".
5232
5233 * symfile.c: Do not mention read_pc or write_pc in comments.
5234 * dink32-rom.c: Likewise.
5235 * m32r-rom.c: Likewise.
5236 * mips-tdep.c: Likewise.
5237
5238 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
5239
5240 * fork-child.c (startup_inferior): Move setting stop_pc ...
5241 * infcmd.c (post_create_inferior): ... to here.
5242
5243 2009-05-04 Michael Snyder <msnyder@vmware.com>
5244
5245 * NEWS: Add item for reverse debugging commands.
5246
5247 2009-05-04 Pedro Alves <pedro@codesourcery.com>
5248
5249 * go32-nat.c (go32_stop): Delete.
5250 (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
5251 (go32_create_inferior): Don't call go32_stop or
5252 go32_kill_inferior.
5253 (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
5254 here.
5255 (init_go32_ops): Don't register go32_stop.
5256
5257 2009-05-02 Eli Zaretskii <eliz@gnu.org>
5258
5259 * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
5260 sym_name.
5261
5262 * infcall.c (find_function_addr): Avoid compiler warnings for
5263 funaddr.
5264
5265 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5266
5267 * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
5268 (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
5269
5270 2009-05-01 Doug Evans <dje@google.com>
5271
5272 * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
5273 to thread_info.
5274
5275 2009-05-01 Eli Zaretskii <eliz@gnu.org>
5276
5277 * record.c (_initialize_record): Reformat and clarify doc strings
5278 for stop-at-limit and insn-number-max.
5279
5280 * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
5281
5282 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5283
5284 Make specifiable the make_function_type type memory ownership.
5285 * gdbtypes.c (make_function_type): New parameter `objfile', use it
5286 explicitely instead of TYPE-initialized removed local variable
5287 `objfile'. Describe `objfile' it in the function comment.
5288 (lookup_function_type): Update make_function_type callers.
5289 * gdbtypes.h (make_function_type): Update the prototype.
5290 * jv-lang.c (java_link_class_type): Update make_function_type callers.
5291 * dwarf2read.c (read_subroutine_type): Likewise.
5292 * stabsread.c (read_type): Likewise.
5293
5294 2009-05-01 Eli Zaretskii <eliz@gnu.org>
5295
5296 * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
5297 printing a bogus "Thread <main>".
5298 (go32_thread_alive): Don't return 1 for null_ptid.
5299
5300 * i386-tdep.c (i386_go32_init_abi): Override the number of
5301 registers due to non-support of SSE.
5302
5303 2009-04-30 Anthony Green <green@moxielogic.com>
5304
5305 * configure.tgt: Link the moxie simulator in with gdb.
5306
5307 2009-04-30 Paul Pluzhnikov <ppluzhnikov@google.com>
5308
5309 * elfread.c (elf_symtab_read): Don't assume .data and .rodata
5310 are present.
5311
5312 2009-04-30 Hui Zhu <teawater@gmail.com>
5313 Michael Snyder <msnyder@vmware.com>
5314
5315 I386 Linux process record and replay support.
5316
5317 * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
5318 This struct has the argument for the function
5319 "record_linux_system_call".
5320 (i386_linux_intx80_sysenter_record): New function. Parse the
5321 system call instruction and call function
5322 "record_linux_system_call" to record execute log.
5323 (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
5324 Set "i386_linux_intx80_sysenter_record" to
5325 "i386_intx80_record" and "i386_sysenter_record".
5326
5327 2009-04-30 Hui Zhu <teawater@gmail.com>
5328 Michael Snyder <msnyder@vmware.com>
5329
5330 I386 architecture process record and replay support.
5331
5332 * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
5333 PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
5334 instruction set.
5335 (aflag, dflag, override, modrm, mod, reg, rm, ot,
5336 i386_record_pc): New variables. Ditto.
5337 (i386_record_modrm, i386_record_lea_modrm_addr,
5338 i386_record_lea_modrm): New functions. Ditto.
5339 (i386_process_record): New function. Parse the instruction in
5340 address "addr" and record the values of registers and memory
5341 that will be changed by this instruction.
5342 (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
5343 "process_record" interface.
5344 * i386-tdep.h (gdbarch_tdep): New function pointers
5345 "i386_intx80_record" and "i386_sysenter_record" that point to
5346 the function that can record "intx80" and "sysenter" execute
5347 log.
5348
5349 2009-04-30 Hui Zhu <teawater@gmail.com>
5350 Michael Snyder <msnyder@vmware.com>
5351
5352 * infrun.c (use_displaced_stepping): Return false if process
5353 record and replay target is used.
5354 (proceed): Call function "record_not_record_set" if pocess
5355 record and replay target is used.
5356
5357 2009-04-30 Hui Zhu <teawater@gmail.com>
5358 Michael Snyder <msnyder@vmware.com>
5359
5360 Linux process record and replay support.
5361
5362 * Makefile.in (ALLDEPFILES): Add linux-record.c.
5363 (ALL_TARGET_OBS): Add linux-record.o.
5364 * configure.tgt (x86_64-*-linux*): Add linux-record.o.
5365 (i[34567]86-*-linux*): Add linux-record.o.
5366 * linux-record.c, linux-record.h: New file.
5367
5368 2009-04-30 Hui Zhu <teawater@gmail.com>
5369 Michael Snyder <msnyder@vmware.com>
5370
5371 Process record and replay target.
5372
5373 * Makefile.in (SFILES): Add record.c.
5374 (COMMON_OBS): Add record.o.
5375 * record.c, record.h: New file.
5376
5377 2009-04-30 Hui Zhu <teawater@gmail.com>
5378 Michael Snyder <msnyder@vmware.com>
5379
5380 * target.h (strata): New stratum "record_stratum".
5381
5382 2009-04-30 Hui Zhu <teawater@gmail.com>
5383 Michael Snyder <msnyder@vmware.com>
5384
5385 GDBARCH interface for process record and replay.
5386
5387 * gdbarch.sh (process_record): This interface point to the
5388 function that records the inferior execute log.
5389
5390 2009-04-29 Doug Evans <dje@google.com>
5391
5392 * i386-nat.c (child_post_startup_inferior): Delete, unused.
5393
5394 2009-04-29 Pedro Alves <pedro@codesourcery.com>
5395
5396 * breakpoint.c (print_exception_catchpoint): Access `b' directly
5397 instead of `b->loc->owner'.
5398 (print_mention_exception_catchpoint): Ditto.
5399
5400 2009-04-29 Jan Kratochvil <jan.kratochvil@redhat.com>
5401
5402 * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
5403
5404 2009-04-27 Tom Tromey <tromey@redhat.com>
5405
5406 * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
5407
5408 2009-04-27 Jerome Guitton <guitton@adacore.com>
5409
5410 * symtab.c (append_exact_match_to_sals): New function, extracted
5411 from expand_line_sal.
5412 (expand_line_sal): Use append_exact_match_to_sals to append exact
5413 matches. If none found, append all best items.
5414
5415 2009-04-27 Jerome Guitton <guitton@adacore.com>
5416
5417 * main.c (captured_main): Move gdbinit lookups after gdb_init.
5418
5419 2009-04-27 Jan Kratochvil <jan.kratochvil@redhat.com>
5420
5421 PR gdb/9675:
5422 * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
5423 (read_func_scope): Call inherit_abstract_dies.
5424
5425 2009-04-25 Eli Zaretskii <eliz@gnu.org>
5426
5427 * Makefile.in (ALLDEPFILES): Remove duplicate entries for
5428 sparc-sol2-nat.c and sparc-sol2-tdep.c.
5429
5430 * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
5431
5432 2009-04-24 Pierre Muller <muller@ics.u-strasbg.fr>
5433
5434 ARI change: Use "/* ARI: rule */" pattern.
5435 * utils.c: Update ARI patterns.
5436 * gdb_dirent.h: Likewise.
5437
5438 2009-04-23 Anthony Green <green@moxielogic.com>
5439
5440 * MAINTAINERS: Add moxie target.
5441 * configure.tgt: Add moxie-*-elf target.
5442 * moxie-tdep.c: New file.
5443 * moxie-tdep.h: New file.
5444
5445 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5446
5447 * ada-lang.c: Remove an extra empty line. No code change.
5448
5449 2009-04-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5450
5451 Fix double free on error inserting the breakpoint instruction.
5452 * breakpoint.c (create_breakpoints): Move the
5453 update_global_location_list call to ...
5454 (break_command_really): ... here together with the second local call
5455 both unified after all the cleanups.
5456
5457 2009-04-23 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5458 Tom Tromey <tromey@redhat.com>
5459
5460 * configure, config.in: Regenerate.
5461 * configure.ac: Support for relocatable GDB datadir. Use
5462 GDB_AC_WITH_DIR. Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
5463 * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
5464 * top.c (init_main): Add "set data-directory".
5465 * defs.h (gdb_datadir): Declare.
5466 * main.c (gdb_datadir): New global.
5467 (captured_main): Initialize gdb_datadir. Use relocate_directory.
5468 (relocate_path): New function.
5469 (relocate_directory): Likewise.
5470 (get_init_files): Use relocate_path.
5471 (README): Mention --with-gdb-datadir.
5472
5473 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5474
5475 * ada-tasks (task_command_1): Call target_find_new_threads.
5476
5477 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5478
5479 * stack.c (do_gdb_disassembly): Print the exception message if an
5480 error was thrown while trying to perform the disassembly.
5481
5482 2009-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
5483
5484 * varobj.c (free_variable): Replace free_current_contents by xfree.
5485
5486 2009-04-22 Kazu Hirata <kazu@codesourcery.com>
5487
5488 * arm-linux-nat.c (fetch_register, store_register): Use
5489 ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
5490 * arm-linux-tdep.c (arm_linux_supply_gregset,
5491 arm_linux_collect_gregset): Likewise.
5492 * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
5493 * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
5494
5495 2009-04-22 Hui Zhu <teawater@gmail.com>
5496
5497 * stack.c (_initialize_stack): Set the default of
5498 disassemble-next-line to off.
5499
5500 2009-04-21 Tom Tromey <tromey@redhat.com>
5501
5502 * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
5503 * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
5504
5505 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
5506
5507 * configure.ac: Add quotes to not lose brackets in help text.
5508 * configure: Rebuild.
5509
5510 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
5511
5512 * configure.ac: Don't postprocess Makefile in config.status.
5513 Substitute GDB_NM_FILE. Don't substitute nm_h.
5514 * Makefile.in (GDB_NM_FILE): Substitute.
5515 (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
5516 * configure: Regenerate.
5517 * gnulib/Makefile.in: Regenerate.
5518
5519 2009-04-21 Joseph Myers <joseph@codesourcery.com>
5520
5521 * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
5522 --with-htmldir): New.
5523 * configure: Regenerate.
5524
5525 2009-04-21 Tom Tromey <tromey@redhat.com>
5526
5527 * configure: Rebuild.
5528 * configure.ac: Use lower case for start of help strings. Clean
5529 up --with-sysroot help.
5530
5531 2009-04-21 Tom Tromey <tromey@redhat.com>
5532
5533 * configure: Rebuild.
5534 * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
5535 * configure.ac: Use AC_HELP_STRING. Use upper case for variables
5536 in help.
5537
5538 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
5539
5540 ARI fix: remove "%p".
5541 * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
5542 (ia64_sigtramp_frame_this_id): Ditto.
5543 (ia64_libunwind_frame_this_id): Ditto.
5544 (ia64_libunwind_sigtramp_frame_this_id): Ditto.
5545 * symmisc.c (maintenance_info_psymtabs): Ditto.
5546
5547 2009-04-21 Joseph Myers <joseph@codesourcery.com>
5548
5549 * configure.ac (--with-relocated-sources): New.
5550 * configure, config.in: Regenerate.
5551 * source.c (add_substitute_path_rule): Remove static.
5552 * source.h (add_substitute_path_rule): Declare.
5553 * main.c: Include "source.h".
5554 (captured_main): Add substitution rule if RELOC_SRCDIR.
5555
5556 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
5557
5558 * gnu-nat.h (proc_debug): Add missing continuation line in macro.
5559
5560 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5561
5562 * NEWS: Mention MIPS/Linux hardware watchpoint support.
5563
5564 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5565
5566 * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
5567 (maint_show_dr, super_close): New variables.
5568 (super_fetch_registers, super_store_registers): Make static.
5569 (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
5570 (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
5571 (pt_watch_style): Define new enum.
5572 (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
5573 Define new structs.
5574 (watch_readback_valid, watch_readback, current_watches, watch_mirror):
5575 New variables.
5576 (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
5577 (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
5578 (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
5579 (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
5580 (type_to_irw, fill_mask, try_one_watch)
5581 (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
5582 (mips_linux_new_thread, populate_regs_from_watches)
5583 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5584 (mips_linux_close): New functions.
5585 (_initialize_mips_linux_nat): Register watchpoint functions with
5586 the target_ops. Add show-debug-regs maintenance command.
5587
5588 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5589
5590 * infrun.c (handle_inferior_event): Move gegisters_changed call down.
5591
5592 2009-04-19 Pedro Alves <pedro@codesourcery.com>
5593
5594 * NEWS: Mention gdbserver support for x86 Windows CE.
5595
5596 2009-04-19 Eli Zaretskii <eliz@gnu.org>
5597
5598 * config/djgpp/fnchange.lst: Fix typos.
5599
5600 Set default host and target charsets in the DJGPP port.
5601
5602 * config/djgpp/config.sed (am_cv_langinfo_codeset)
5603 (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
5604 in all configure scripts that define ac_cv_env_CPP_value.
5605
5606 * go32-nat.c (dos_codepage, nl_langinfo): New functions.
5607 Include langinfo.h.
5608
5609 * config/djgpp/nl_types.h: New file.
5610
5611 * config/djgpp/langinfo.h: New file.
5612
5613 * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
5614
5615 2009-04-18 Carlos O'Donell <carlos@codesourcery.com>
5616
5617 * Makefile.in (MAKEHTML): Set to makeinfo --html.
5618 (MAKEHTMLFLAGS): Set to empty.
5619
5620 2009-04-18 Eli Zaretskii <eliz@gnu.org>
5621
5622 * NEWS: Mention all new set/show commands added since GDB 6.8 was
5623 released.
5624
5625 * go32-nat.c (go32_sysinfo): Check if the call to
5626 __dpmi_get_capabilities fills the buffer with information, and
5627 don't use the buffer if not.
5628
5629 2009-04-17 Tom Tromey <tromey@redhat.com>
5630
5631 * charset.c (_initialize_charset): Add special case for "646".
5632
5633 2009-04-17 Carlos O'Donell <carlos@codesourcery.com>
5634
5635 * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
5636 * configure: Regenerate.
5637 * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
5638 configure substitutions.
5639 (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
5640
5641 2009-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5642
5643 ARI fix: Do not use %p, replace by call to host_address_to_string
5644 for host pointers.
5645 * darwin-nat.c (darwin_xfer_partial): Apply change.
5646 * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
5647 * gnu-nat.h (proc_debug): Ditto.
5648 * symmisc.c (maintenance_info_symtabs): Ditto.
5649 (maintenance_info_psymtabs): Ditto.
5650 * windows-nat.c (handle_load_dll): Ditto.
5651 (handle_unload_dll, info_w32_command, handle_exception): Ditto.
5652 * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
5653
5654 2009-04-17 Joseph Myers <joseph@codesourcery.com>
5655
5656 * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
5657 --enable-64-bit-bfd.
5658 (sparc-*-linux*): Likewise.
5659
5660 2009-04-17 Eli Zaretskii <eliz@gnu.org>
5661
5662 * go32-nat.c (go32_sysinfo): Update list of Windows versions of
5663 the NT family.
5664
5665 2009-04-16 Pedro Alves <pedro@codesourcery.com>
5666
5667 * remote.c (remote_query_attached): Fix pasto in packet_ok result
5668 checking.
5669
5670 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5671
5672 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
5673 Revert the previous change. Might not be correct, actually.
5674
5675 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5676
5677 * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
5678 (ada_get_current_task, ada_print_exception_breakpoint_nontask)
5679 (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
5680 Remove declaration. These are non-existent functions.
5681
5682 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5683
5684 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
5685 Fix a compilation warning on mips-irix due to casting from
5686 a pointer of different size.
5687
5688 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5689
5690 * ada-lang.c (symtab_for_sym): Delete.
5691 (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
5692
5693 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5694
5695 * ada-lang.c (extract_string): Delete.
5696 (ada_main_name): Reimplement using target_read_string instead of
5697 extract_string.
5698
5699 2009-04-16 Andreas Schwab <schwab@linux-m68k.org>
5700
5701 * m68klinux-nat.c: Remove obsolete comment.
5702 (fetch_register, store_register): Don't call
5703 gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
5704 which are always nops here.
5705
5706 2009-04-14 Tom Tromey <tromey@redhat.com>
5707
5708 * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
5709 (c_printstr): Likewise.
5710 * charset.c: Include gdb_wait.h.
5711 (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
5712 (find_charset_names): Use pexecute. Handle libiconv's output.
5713 Detect errors.
5714 (_initialize_charset): Use xstrdup.
5715 * gdb_wchar.h: Check HAVE_BTOWC. Split PHONY_ICONV and wchar
5716 cases.
5717 (INTERMEDIATE_ENCODING): New define.
5718 * configure, config.in: Rebuild.
5719 * configure.ac: Check for btowc.
5720
5721 2009-04-15 Tom Tromey <tromey@redhat.com>
5722
5723 * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
5724
5725 2009-04-15 Eli Zaretskii <eliz@gnu.org>
5726
5727 * utils.c (parse_escape): Initialize target_char to pacify GCC.
5728
5729 2009-04-14 Jan Kratochvil <jan.kratochvil@redhat.com>
5730
5731 * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
5732
5733 2009-04-14 Pierre Muller <muller@ics.u-strasbg.fr>
5734
5735 ARI fix: sprintf rule.
5736 * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
5737 * ada-lang.c (add_angle_brackets): Use xstrprintf.
5738 (ada_decode): Replace sprintf by xsnprintf.
5739 (find_old_style_renaming_symbol): Ditto.
5740 (ada_to_fixed_type_1, ada_enum_name): Ditto.
5741
5742
5743 2009-04-14 Joel Brobecker <brobecker@adacore.com>
5744
5745 * target.c (target_mourn_inferior): Call bfd_cache_close_all
5746 after having executed the target mourn_inferior routine.
5747
5748 2009-04-14 Eli Zaretskii <eliz@gnu.org>
5749
5750 * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
5751 undefined.
5752
5753 2009-04-13 David Daney <ddaney@caviumnetworks.com>
5754
5755 * infrun.c (maybe_software_singlestep): New function.
5756 (resume): Call maybe_software_singlestep.
5757 (handle_inferior_event): Same.
5758
5759 2009-04-13 Tom Tromey <tromey@redhat.com>
5760
5761 * python/python-frame.c (frapy_richcompare): Return
5762 Py_NotImplemented, not an error. Handle Py_NE as well.
5763
5764 2009-04-13 Eli Zaretskii <eliz@gnu.org>
5765
5766 * charset.c (EILSEQ): Define if not defined by system headers.
5767
5768 2009-04-11 Eli Zaretskii <eliz@gnu.org>
5769
5770 * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
5771 to be consistent with renaming config.intl.in into config_intl.in.
5772
5773 * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
5774 consistent with the change from 2008-11-09.
5775
5776 2009-04-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5777
5778 * gdbtypes.c: Remove excessive parentheses at the return keywords.
5779 * varobj.c (varobj_invalidate): Fix indentation.
5780 * varobj.c (varobj_invalidate): Fix formatting text width.
5781
5782 2009-04-08 Vladimir Prus <vladimir@codesourcery.com>
5783
5784 Implement -exec-jump.
5785
5786 * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
5787 * mi/mi-main.c (mi_cmd_exec_jump): New.
5788 * mi/mi-cmds.c (mi_cmds): Register exec-jump.
5789
5790 2009-04-07 Doug Evans <dje@google.com>
5791
5792 * symfile.c (symbol_file_clear): Fix indentation.
5793
5794 2009-04-06 Mark Kettenis <kettenis@gnu.org>
5795
5796 * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
5797
5798 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5799
5800 * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
5801 (ppc_linux_auxv_parse): New function.
5802 (ppc_linux_read_description): Use ppc_linux_target_wordsize.
5803 (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
5804
5805 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5806
5807 * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
5808 BFD to contents of SPU name note.
5809 (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
5810 with "from_tty" argument 1 instead of 0.
5811
5812 2009-04-02 Jan Kratochvil <jan.kratochvil@redhat.com>
5813
5814 * dwarf2read.c
5815 (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
5816 Create the symbol in local scope.
5817 * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
5818
5819 2009-04-02 Keith Seitz <keiths@redhat.com>
5820
5821 * stabsread.c (read_member_functions): GCC may emit an extra space
5822 at the end of the names "__base_ctor" and "__base_dtor"; so ignore
5823 whitespace when looking for these functions.
5824
5825 2009-04-01 Joel Brobecker <brobecker@adacore.com>
5826
5827 Change the default value for "set print frame-arguments" to scalars.
5828
5829 * stack.c (print_frame_arguments): Set initial value to "scalars".
5830
5831 2009-04-01 Aleksandar Ristovski <aristovski@qnx.com>
5832
5833 * mips-tdep.c (mips_numeric_register_alieses): New definition.
5834 (mips_gdbarch_init): Add user registers from
5835 mips_numeric_register_aliases.
5836
5837 2009-04-01 Joel Brobecker <brobecker@adacore.com>
5838
5839 * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
5840
5841 2009-04-01 Joel Brobecker <brobecker@adacore.com>
5842
5843 * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
5844 this is the last one.
5845
5846 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5847
5848 * remote.c (append_resumption): New.
5849 (remote_vcont_resume): Use it.
5850
5851 2009-04-01 Joel Brobecker <brobecker@adacore.com>
5852
5853 * windows-nat.c (+windows_get_ada_task_ptid): New function.
5854 (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
5855
5856 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com>
5857 Keith Seitz <keiths@redhat.com>
5858 Jan Kratochvil <jan.kratochvil@redhat.com>
5859
5860 PR gdb/6817
5861 * Makefile.in (dbxread.o): Update.
5862 * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
5863 * dwarf2read.c (GDB_FORM_cached_string): New.
5864 (read_partial_die): Use dwarf2_canonicalize_name.
5865 (dwarf2_linkage_name): Use dwarf2_name.
5866 (dwarf2_canonicalize_name): New.
5867 (dwarf2_name): Use dwarf2_canonicalize_name.
5868 (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
5869 * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
5870 * symtab.c (lookup_symbol_in_language): Canonicalize input before
5871 searching.
5872 * cp-name-parser.y: operator() requires two parameters,
5873 according to libiberty.
5874 * minsyms.c (lookup_minimal_symbol): Canonicalize input
5875 before searching.
5876 * NEWS: Update.
5877
5878 2009-03-31 Joel Brobecker <brobecker@adacore.com>
5879
5880 Provide support for (Ada) task-specific breakpoints.
5881
5882 * ada-lang.h (ada_get_task_number): Add declaration.
5883 (breakpoint_ada_task_match): Delete declaration.
5884 * ada-tasks.c (ada_get_task_number): Make non-static.
5885 * breakpoint.h (struct breakpoint): Add field "task".
5886 * breakpoint.c (print_one_breakpoint_location): Add handling of
5887 task-specific breakpoints.
5888 (create_breakpoint, create_breakpoints, find_condition_and_thread):
5889 New parameter "task".
5890 (break_command_really): Update calls to find_condition_and_thread
5891 and create_breakpoints.
5892 (breakpoint_re_set_one): Update call to find_condition_and_thread.
5893 Set b->task.
5894
5895 2009-03-31 Joel Brobecker <brobecker@adacore.com>
5896
5897 * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
5898
5899 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5900
5901 * remote.c (remote_notice_new_inferior): Use ptid_is_pid. Check
5902 if the thread's ptid without a thread id field is in the list
5903 before calling thread_change_ptid.
5904 (extended_remote_attach_1): In non-stop mode, do not rely on
5905 querying the current thread, instead, query the thread list, and
5906 select the first thread of the process.
5907 * gdbthread.h (first_thread_of_process): Declare.
5908 * thread.c (first_thread_of_process): Define.
5909
5910 2009-03-30 Stan Shebs <stan@codesourcery.com>
5911
5912 Make tracepoints into a type of breakpoint.
5913 * breakpoint.h (enum bptype): Add bp_tracepoint.
5914 (struct breakpoint): Add fields step_count, pass_count, actions.
5915 (get_tracepoint, get_tracepoint_by_number): Declare.
5916 (all_tracepoints): Declare.
5917 * breakpoint.c: Include tracepoint.h, readline.h.
5918 (ALL_TRACEPOINTS): Move here from tracepoint.c.
5919 (tracepoint_count): Ditto.
5920 (should_be_inserted): GDB does not insert tracepoints itself.
5921 (print_it_typical): Add tracepoint case.
5922 (bpstat_what): Ditto.
5923 (print_one_breakpoint_location): Ditto, and add printing for
5924 pass count, step count, and action list.
5925 (user_settable_breakpoint): Add tracepoint case.
5926 (allocate_bp_location): Ditto.
5927 (set_breakpoint_location_function): Ditto.
5928 (disable_breakpoints_in_shlibs): Ditto.
5929 (mention): Ditto.
5930 (break_command_really): Add argument traceflag, use to choose
5931 basic breakpoint type.
5932 (break_command_1): Pass extra argument.
5933 (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
5934 (breakpoint_re_set_one): Add tracepoint case.
5935 (disable_command, enable_command): Ditto.
5936 (set_tracepoint_count): Move here from tracepoint.c.
5937 (trace_command): Move here from tracepoint.c and use
5938 break_command_really.
5939 (tracepoints_info): Move here from tracepoint.c and call
5940 breakpoints_info.
5941 (enable_trace_command): Move here from tracepoint.c and call
5942 enable_command.
5943 (disable_trace_command): Move here from tracepoint.c and call
5944 disable_command.
5945 (delete_trace_command): Move here from tracepoint.c and call
5946 delete_breakpoint.
5947 (trace_pass_command): Move here from tracepoint.c.
5948 (get_tracepoint_by_number): Ditto.
5949 (tracepoint_save_command): Ditto.
5950 (get_tracepoint): New function.
5951 (all_tracepoints): New function.
5952 (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
5953 deprecate "enable trace" and "disable trace" commands.
5954 * tracepoint.h (struct tracepoint): Remove.
5955 (tracepoint_chain): Remove decl.
5956 (deprecated_create_tracepoint_hook): Remove decl.
5957 (deprecated_delete_tracepoint_hook): Remove decl.
5958 (deprecated_modify_tracepoint_hook): Remove decl.
5959 (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
5960 (free_actions): Update signature.
5961 (validate_actionline): Update signature.
5962 (end_actions_pseudocommand): Declare.
5963 (while_stepping_pseudocommand): Declare.
5964 * tracepoint.c: Include breakpoint.h.
5965 (tracepoint_chain, tracepoint_count): Remove.
5966 (free_actions, make_cleanup_free_actions): Update signature.
5967 (trace_command, set_raw_tracepoint): Remove.
5968 (trace_mention): Remove.
5969 (tracepoints_info): Remove.
5970 (tracepoint_operation, map_args_over_tracepoints): Remove.
5971 (get_tracepoint_by_number): Remove.
5972 (enable_trace_command, disable_trace_command): Remove.
5973 (delete_trace_command, trace_pass_command): Remove.
5974 (trace_actions_command, read_actions): Update signature.
5975 (validate_actionline): Update signature, use bp loc.
5976 (encode_actions): Ditto.
5977 (download_tracepoint): New function, body of trace_start_command.
5978 (trace_start_command): Call it, use all_tracepoints.
5979 (tracepoint_save_command): Remove.
5980 (tracepoint_dump_command): Use get_tracepoint.
5981 (end_actions_pseudocommand): Make globally visible.
5982 (while_stepping_pseudocommand): Ditto.
5983 (_initialize_tracepoint): Move command definitions to breakpoint.c.
5984
5985 2009-03-30 Thiago Jung Bauermann <bauerman@br.ibm.com>
5986
5987 Expose frames to Python.
5988 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
5989 (SUBDIR_PYTHON_SRCS): Add python-frame.c.
5990 (python-frame.o): New target.
5991 * python/python-frame.c: New file.
5992 * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
5993 gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
5994 gdbpy_initialize_frames): New prototypes.
5995 * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
5996 (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
5997 entries.
5998 * stack.c (find_frame_funname): New function, factored out of
5999 print_frame.
6000 (print_frame): Call find_frame_funname.
6001 * stack.h (find_frame_funname): Add prototype.
6002
6003 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
6004
6005 Remove unused value_object attribute `owned_by_gdb'.
6006 * python/python-value.c (value_object): Remove owned_by_gdb
6007 attribute.
6008 (valpy_dealloc): Remove reference to self->owned_by_gdb.
6009 (valpy_new): Likewise.
6010 (value_to_value_object): Likewise.
6011
6012 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
6013
6014 Change gdb.Value.address from a method to an attribute.
6015 * python/python-value.c (value_object): Add `address' element.
6016 (valpy_dealloc): Decrement reference to self->address if set.
6017 (valpy_new): Initialize val_obj->address.
6018 (valpy_address): Rename to ...
6019 (valpy_get_address): ... this. Change signature from method to
6020 attribute. Update self->address if not set.
6021 (value_to_value_object): Initialize val_obj->address.
6022 (value_object_getset): Add `address' element.
6023 (value_object_methods): Remove `address' element.
6024
6025 2009-03-29 Andreas Schwab <schwab@linux-m68k.org>
6026
6027 * observer.sh: Set LANG/LC_ALL to C, not c.
6028
6029 2009-03-28 Kevin Buettner <kevinb@redhat.com>
6030
6031 * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
6032 `char' is unsigned.
6033
6034 2009-03-28 Pedro Alves <pedro@codesourcery.com>
6035
6036 * remote.c (remote_stop_ns): If multi-process extensions are off,
6037 and GDB is requesting the whole process to stop, sent "vCont;t",
6038 not "vCont;t:-1"
6039
6040 2009-03-28 Pedro Alves <pedro@codesourcery.com>
6041
6042 * inf-loop.c (inferior_event_handler): Avoid calling is_running on
6043 null inferior_ptid.
6044
6045 2009-03-27 Eli Zaretskii <eliz@gnu.org>
6046
6047 * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
6048
6049 2009-03-26 Doug Evans <dje@google.com>
6050
6051 * thread.c (do_restore_current_thread_cleanup): Redo test for
6052 whether to restore old->inferior_ptid.
6053
6054 2009-03-26 Tom Tromey <tromey@redhat.com>
6055
6056 * breakpoint.c (resolve_sal_pc): Preserve original line number
6057 when skipping prologue.
6058
6059 2009-03-26 Doug Evans <dje@google.com>
6060
6061 * thread.c (inferior_thread) Remove "extern" in definition.
6062
6063 2009-03-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
6064
6065 Add gdb.Value.is_optimized_out attribute.
6066 * python/python-value.c (valpy_get_is_optimized_out): New
6067 function.
6068 (value_object_getset): New variable.
6069 (value_object_type): Initialize tp_getset element.
6070
6071 2009-03-26 Joel Brobecker <brobecker@adacore.com>
6072
6073 Recognize missing DW_AT_location as <value optimized out>.
6074 * dwarf2read.c
6075 (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
6076 Call add_symbol_to_list.
6077
6078 2009-03-25 Tom Tromey <tromey@redhat.com>
6079
6080 * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
6081 * stack.c (print_this_frame_argument_p): Use check_typedef.
6082
6083 2009-03-25 Tom Tromey <tromey@redhat.com>
6084
6085 * configure: Rebuild.
6086 * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
6087 Rearrange flags setting. Add comments.
6088
6089 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6090
6091 * config/i386/nm-i386.h: Remove code within
6092 I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
6093 * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
6094 macro.
6095 * config/i386/nm-cygwin64.h: Ditto.
6096 * config/i386/nm-fbsd.h: Ditto.
6097 * config/i386/nm-go32.h: Ditto.
6098 * config/i386/nm-linux.h: Ditto.
6099 * config/i386/nm-linux64.h: Ditto.
6100
6101 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6102
6103 ARI fix: "xasprintf" rule.
6104 * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
6105
6106 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6107
6108 * remote.c (remote_start_remote): In non-stop mode, call
6109 init_wait_for_inferior before adding threads and inferiors.
6110
6111 2009-03-25 Joel Brobecker <brobecker@adacore.com>
6112
6113 * breakpoint.c (breakpoint_thread_match): Split a large condition
6114 into several smaller conditions. No behavior change.
6115
6116 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6117
6118 * infrun.c (infrun_thread_thread_exit): New.
6119 (_initialize_infrun): Attach it to the thread_exit observer.
6120 * thread.c (delete_thread_1): Always call the observer, passing it
6121 the silent flag.
6122 * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter. If
6123 SILENT, return immediately.
6124
6125 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6126
6127 * infrun.c (normal_stop): Use has_stack_frames instead of
6128 target_has_stack.
6129 * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
6130 when there is no thread selected.
6131 (mi_cmd_execute): Don't special case commands that can run without
6132 a valid selected thread.
6133 * top.c (execute_command): Don't special case commands that can
6134 run without a valid selected thread. Use has_stack_frames.
6135 * infcmd.c (ensure_valid_thread): New.
6136 (continue_1, step_1, jump_command, signal_command): Use it.
6137 (detach_command): Error out if there's no selected thread/inferior.
6138 * thread.c (print_thread_info): Allow having no thread selected.
6139 (switch_to_thread): Don't read the PC if there is no current thread.
6140 (do_restore_current_thread_cleanup): Don't record the current
6141 frame if there is no current thread.
6142 (make_cleanup_restore_current_thread): Don't read frame info if
6143 there is no selected thread.
6144 (_initialize_thread): Don't mark commands as
6145 "no_selected_thread_ok".
6146 * frame.c (get_current_frame): Error out if there is no valid
6147 selected thread.
6148 (has_stack_frames): Return false if there is no valid
6149 selected thread.
6150 * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
6151 "no_selected_thread_ok".
6152 * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
6153 (get_cmd_no_selected_thread_ok): Delete.
6154 * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
6155 (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
6156 Delete declaration.
6157 * stack.c (get_selected_block): Use has_stack_frames.
6158
6159 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6160
6161 Fix size of FPSCR in Power 7 processors.
6162 * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6163 (PPC_FEATURE_HAS_DFP): New #define.
6164 (ppc_linux_read_description): Check for DFP feature instead of
6165 ISA 2.05 to decide on size of the FPSCR.
6166
6167 2009-03-25 Kevin Buettner <kevinb@redhat.com>
6168
6169 * mn10300-tdep.c (trad-frame.h): Don't include.
6170 (prologue-value.h): Include.
6171 (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
6172 (struct mn10300_prologue): Define.
6173 (push_reg, translate_rreg, check_for_saved): New functions.
6174 (mn10300_analyze_prologue): Rewrite, using prologue-value
6175 machinery. Handle more instructions than before. Permit
6176 instructions to occur in any order.
6177 (mn10300_skip_prologue): Find the extents of the function
6178 in question; mn10300_analyze_prologue no longer does this.
6179 (mn10300_analyze_frame_prologue): New function.
6180 (mn10300_frame_base): New function.
6181 (mn10300_frame_this_id): Rewrite, no longer using trad-frame
6182 implementation.
6183 (mn10300_frame_prev_register): Likewise.
6184 (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
6185 (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
6186 `this_frame'.
6187 (mn10300_frame_unwind_init): Don't call frame_base_set_default().
6188
6189 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6190
6191 Fix completer problem for filename completion on the first try.
6192
6193 * gdb/completer.h (gdb_completion_word_break_characters): New function.
6194 * gdb/completer.c: Include gdb_assert.h.
6195 (complete_line_internal_reason): New enum.
6196 (complete_line_internal): Change last argument type to
6197 complete_line_internal_reason.
6198 Modify function to handle the different complete_line_internal_reason
6199 argument values.
6200 (complete_line): Adapt to change in complete_line_internal.
6201 (command_completer): Ditto.
6202 (gdb_completion_word_break_characters): Implement new function.
6203 * top.c (init_main): Set rl_completion_word_break_hook to
6204 gdb_completion_word_break_characters.
6205
6206
6207 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6208
6209 ARI fix: "strlen d_name" rule.
6210 * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
6211
6212
6213 2009-03-24 Tom Tromey <tromey@redhat.com>
6214 Pedro Alves <pedro@codesourcery.com>
6215
6216 * configure, config.in: Rebuild.
6217 * configure.ac: Check for libiconvlist.
6218 * charset.c: Check HAVE_LIBICONVLIST.
6219 * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
6220 LIBICONV_LIBDIR. Update CPPFLAGS and LIBS.
6221 * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
6222 Remove.
6223 (INTERNAL_CFLAGS_BASE): Update.
6224 (INTERNAL_LDFLAGS): Update.
6225 (CLIBS): Update.
6226
6227 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6228
6229 * configure.ac: Initialize the variable $PREFER_CURSES.
6230 * configure: Regenerated.
6231
6232 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6233
6234 * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
6235 * configure: Regenerated.
6236
6237 2009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
6238
6239 ARI fix: "strerror" rule.
6240 * darwin-nat.c (darwin_ptrace): Use safe_strerror.
6241 (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
6242
6243 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6244
6245 * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
6246 before looking up the fields inside our struct type.
6247
6248 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6249
6250 * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
6251 trying to resolve the type qualification.
6252
6253 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6254
6255 * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
6256 we try to apply the attribute on the real type, rather than
6257 its associated typedef.
6258
6259 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6260
6261 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
6262 to make sure we try to get the modulus of the actual type, not the
6263 associated typedef.
6264
6265 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6266
6267 * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
6268 [OP_ATR_LENGTH]: When using the attribute on a type, make sure
6269 to get the real type, not the associated typedef.
6270
6271 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6272
6273 * ada-lang.c (ada_get_field_index): Add handling of the case
6274 when TYPE is a typedef of a struct.
6275
6276 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6277
6278 Add gdb_usleep as a portable version of usleep based on gdb_select.
6279 * gdb_usleep.h, gdb_usleep.c: New files.
6280 * Makefile.in (SFILES): Add gdb_usleep.c.
6281 (HFILES_NO_SRCDIR): Add gdb_usleep.h.
6282 (COMMON_OBS): Add gdb_usleep.o.
6283 * ser-unix.c (hardwire_send_break): Replace call to gdb_select
6284 by call to gdb_usleep.
6285
6286 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6287
6288 * buildsym.c (end_symtab): If we ignore the subfiles, then
6289 unlink the associated symtabs if they were already allocated.
6290
6291 2009-03-23 Jerome Guitton <guitton@adacore.com>
6292
6293 Provide a way to force building of GDB with libcurses.
6294 * configure.ac: Add --with-curses.
6295 * configure: Regenerated.
6296
6297 2009-03-23 Tom Tromey <tromey@redhat.com>
6298
6299 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
6300 error message.
6301
6302 2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
6303
6304 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
6305 solib_contains_address_p instead of searching.
6306
6307 2009-03-23 Tom Tromey <tromey@redhat.com>
6308
6309 * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
6310 (iconv): Make 'inbuf' argument const.
6311 (convert_between_encodings): Use ICONV_CONST.
6312 (wchar_iterate): Likewise.
6313
6314 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
6315
6316 * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
6317 dynamically loaded function.
6318 (LookupPrivilegeValueA): Ditto.
6319 (OpenProcessToken): Ditto.
6320 (AdjustTokenPrivileges): Rename and define placeholder for address of
6321 dynamically loaded function.
6322 (LookupPrivilegeValueA): Ditto.
6323 (OpenProcessToken): Ditto.
6324 (set_process_privilege): Remove check for loaded functions.
6325 (bad_OpenProcessToken): Define.
6326 (_initialize_loadable): Load token functions from advapi here, setting
6327 OpenProcessToken function to a dummy static function which always return
6328 error if OS doesn't support this functionality.
6329
6330 2009-03-22 Nicolas Roche <roche@adacore.com>
6331 Christopher Faylor <me+cygwin@cgf.cx>
6332
6333 * win32-nat.c (ctrl_c_handler): New function.
6334 (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
6335 is run in a separate console.
6336
6337 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
6338
6339 * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
6340 for dynamically loaded function.
6341 (DebugBreakProcess): Ditto.
6342 (DebugSetProcessKillOnExit): Ditto.
6343 (EnumProcessModules): Ditto.
6344 (GetModuleFileNameExA): Ditto.
6345 (GetModuleInformation): Ditto.
6346 (DebugActiveProcessStop): Rename and define placeholder for address of
6347 dynamically loaded function.
6348 (DebugBreakProcess): Ditto.
6349 (DebugSetProcessKillOnExit): Ditto.
6350 (EnumProcessModules): Ditto.
6351 (GetModuleFileNameExA): Ditto.
6352 (GetModuleInformation): Ditto.
6353 (psapi_loaded): Delete.
6354 (get_module_name): Don't check psapi_loaded, just rely on the fact that
6355 dynamically loaded functions will return failure if they weren't
6356 previously found.
6357 (has_detach_ability): Delete.
6358 (windows_attach): Remove call to has_detach_ability (). Just rely on
6359 functions being callable.
6360 (bad_DebugActiveProcessStop): Define.
6361 (bad_DebugBreakProcess): Ditto.
6362 (bad_DebugSetProcessKillOnExit): Ditto.
6363 (bad_EnumProcessModules): Ditto.
6364 (bad_GetModuleFileNameExA): Ditto.
6365 (bad_GetModuleInformation): Ditto.
6366 (_initialize_loadable): Rename from _initialize_psapi. Initialize all
6367 dynamic storage here, setting nonexistent functions to dummy static
6368 functions which always return error.
6369
6370 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6371
6372 * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
6373 to the about_to_proceed observer notification.
6374 (mi_about_to_proceed): New.
6375 (mi_on_resume): Only output ^running and the prompt here if the
6376 target was proceeded.
6377 * breakpoint.c (breakpoint_proceeded): New static.
6378 (breakpoint_about_to_proceed): New.
6379 (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
6380 the about_to_proceed observer notification.
6381 * inferior.h (breakpoint_proceeded): Delete declaration.
6382 * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
6383 Notify the about_to_proceed observers.
6384 (struct inferior_status): Delete breakpoint_proceeded member.
6385 (save_inferior_status): Don't save it.
6386 (restore_inferior_status): Don't restore it.
6387 * mi-main.h (mi_proceeded): Declare.
6388 * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
6389 a command.
6390
6391 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6392
6393 * gdbthread.h (struct thread_info): Add in_infcall member.
6394 * infcall.c (run_inferior_call): Save, set and restore in_infcall.
6395 Remove reverences to suppress_resume_observer. Refresh
6396 `call_thread' after returning from `proceed'.
6397 * infcmd.c (suppress_resume_observer): Delete.
6398 * inferior.h (suppress_resume_observer): Delete declaration.
6399 * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
6400 inferior function.
6401 * thread.c (set_running): Remove references to
6402 suppress_resume_observer.
6403 * infrun.c (struct inferior_status): Add in_infcall member.
6404 (save_inferior_status): Save it.
6405 (restore_inferior_status): Restore it.
6406
6407 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6408
6409 * infcall.c (run_inferior_call): Remove references to
6410 suppress_stop_observer.
6411 * infcmd.c (suppress_stop_observer): Delete.
6412 (finish_command_continuation): Remove NOTE. Don't clear
6413 suppress_stop_observer anymore.
6414 (finish_command_continuation_free_arg): Likewise.
6415 (finish_forward): Remove references to suppress_stop_observer.
6416 Call normal_stop observer if we haven't already.
6417 * inferior.h (suppress_stop_observer): Delete.
6418 * infrun.c (normal_stop): When deciding to suppress the
6419 normal_stop observer, check for proceed_to_finish instead of
6420 suppress_stop_observer.
6421
6422 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6423
6424 * symfile.c (symfile_relocate_debug_section): Remove check for
6425 SEC_DEBUGGING.
6426
6427 2009-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6428 Jim Blandy <jimb@red-bean.com>
6429 Thiago Jung Bauermann <bauerman@br.ibm.com>
6430 Tom Tromey <tromey@redhat.com>
6431
6432 Miscellaneous fixes to the Python code.
6433 * python/python-cmd.c (cmdpy_init): Accept keyword
6434 arguments.
6435 * python/python-value.c (valpy_string): Accept keyword
6436 arguments.
6437 (valpy_binop): Use `break' to exit from the TRY_CATCH block.
6438 Do not call value_to_value_object on NULL RES_VAL.
6439 (value_object_methods): Change `string' entry to also accept
6440 keyword arguments.
6441 (convert_value_from_python): Return a copy of the value if obj is
6442 a gdb.Value object.
6443 (value_object_methods): Mark the `string' method as accepting
6444 keywords, and show method "prototype" in the doc string.
6445 * python/python.c (get_parameter): Don't return inside a
6446 TRY_CATCH.
6447
6448 2009-03-20 Tom Tromey <tromey@redhat.com>
6449
6450 Add support for convenience functions in Python.
6451 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
6452 (SUBDIR_PYTHON_SRCS): Add python-function.c.
6453 (python-function.o): New target.
6454 * eval.c: Include "python/python.h" and <ctype.h>.
6455 (evaluate_subexp_standard): Handle values of type
6456 TYPE_CODE_INTERNAL_FUNCTION.
6457 * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
6458 * parse.c (write_exp_string): Remove duplicate word in comment.
6459 * python/python-function.c: New file.
6460 * python/python-internal.h (gdbpy_initialize_functions): Add
6461 prototype.
6462 * python/python.c (_initialize_python): Call
6463 gdbpy_initialize_functions.
6464 * valprint.c (value_check_printable): Handle values of type
6465 TYPE_CODE_INTERNAL_FUNCTION.
6466 * value.c: Include "cli/cli-decode.h".
6467 (internal_function): New struct.
6468 (functionlist, internal_fn_type): New static variables.
6469 (lookup_only_internalvar,
6470 lookup_internalvar): Add const qualifier to name argument.
6471 (create_internalvar): Likewise. Initialize new field.
6472 (set_internal_var): Fix typo in comment. Don't allow assignment
6473 to canonical variable.
6474 (value_create_internal_function, value_internal_function_name,
6475 call_internal_function, function_command, function_destroyer,
6476 add_internal_function): New functions.
6477 (_initialize_values): Create `function' placeholder command.
6478 Initialize internal_fn_type.
6479 * value.h (lookup_only_internalvar, create_internalvar,
6480 lookup_internalvar): Add const qualifier to name argument.
6481 (internal_function_fn, add_internal_function, call_internal_function,
6482 value_internal_function_name): Add prototypes.
6483 (struct internalvar) <canonical>: New field.
6484
6485 2009-03-20 Tom Tromey <tromey@redhat.com>
6486
6487 * c-lang.c (evaluate_subexp_c): Call check_typedef.
6488
6489 2009-03-20 Tom Tromey <tromey@redhat.com>
6490 Julian Brown <julian@codesourcery.com>
6491
6492 PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
6493 PR i18n/9401, PR exp/9613:
6494 * NEWS: Update
6495 * value.h (value_typed_string): Declare.
6496 (val_print_string): Update.
6497 * valprint.h (print_char_chars): Update.
6498 * valprint.c (print_char_chars): Add type argument. Update.
6499 (val_print_string): Likewise.
6500 * valops.c (value_typed_string): New function.
6501 * utils.c (host_char_to_target): New function.
6502 (parse_escape): Use host_char_to_target, host_hex_value. Update.
6503 Remove '^' case.
6504 (no_control_char_error): Remove.
6505 * typeprint.c (print_type_scalar): Update.
6506 * scm-valprint.c (scm_scmval_print): Update.
6507 * scm-lang.h (scm_printchar, scm_printstr): Update.
6508 * scm-lang.c (scm_printchar): Add type argument.
6509 (scm_printstr): Likewise.
6510 * printcmd.c (print_formatted): Update.
6511 (print_scalar_formatted): Update.
6512 (printf_command) <wide_string_arg, wide_char_arg>: New constants.
6513 Handle '%lc' and '%ls'.
6514 * parser-defs.h (struct typed_stoken): New type.
6515 (struct stoken_vector): Likewise.
6516 (write_exp_string_vector): Declare.
6517 * parse.c (write_exp_string_vector): New function.
6518 * p-valprint.c (pascal_val_print): Update.
6519 * p-lang.h (is_pascal_string_type, pascal_printchar,
6520 pascal_printstr): Update.
6521 * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
6522 Add 'char_type' argument.
6523 (pascal_emit_char): Add type argument.
6524 (pascal_printchar): Likewise.
6525 (pascal_printstr): Likewise.
6526 * objc-lang.c (objc_emit_char): Add type argument.
6527 (objc_printchar): Likewise.
6528 (objc_printstr): Likewise.
6529 * macroexp.c (get_character_constant): Handle unicode characters.
6530 Use c_parse_escape.
6531 (get_string_literal): Handle unicode strings. Use
6532 c_parse_escape.
6533 * m2-valprint.c (print_unpacked_pointer): Update.
6534 (m2_print_array_contents): Update.
6535 (m2_val_print): Update.
6536 * m2-lang.c (m2_emit_char): Add type argument.
6537 (m2_printchar): Likewise.
6538 (m2_printstr): Likewise.
6539 * language.h (struct language_defn) <la_printchar>: Add type
6540 argument.
6541 <la_printstr, la_emitchar>: Likewise.
6542 (LA_PRINT_CHAR): Likewise.
6543 (LA_PRINT_STRING): Likewise.
6544 (LA_EMIT_CHAR): Likewise.
6545 * language.c (unk_lang_emit_char): Add type argument.
6546 (unk_lang_printchar): Likewise.
6547 (unk_lang_printstr): Likewise.
6548 * jv-valprint.c (java_val_print): Update.
6549 * jv-lang.c (java_emit_char): Add type argument.
6550 * f-valprint.c (f_val_print): Update.
6551 * f-lang.c (f_emit_char): Add type argument.
6552 (f_printchar): Likewise.
6553 (f_printstr): Likewise.
6554 * expprint.c (print_subexp_standard): Update.
6555 * charset.h (target_wide_charset): Declare.
6556 (c_target_char_has_backslash_escape, c_parse_backslash,
6557 host_char_print_literally, host_char_to_target,
6558 target_char_to_host, target_char_to_control_char): Remove.
6559 (enum transliterations): New type.
6560 (convert_between_encodings): Declare.
6561 (HOST_ESCAPE_CHAR): New define.
6562 (host_letter_to_control_character, host_hex_value): Declare.
6563 (enum wchar_iterate_result): New enum.
6564 (struct wchar_iterator): Declare.
6565 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
6566 wchar_push_back): Declare.
6567 * charset-list.h: New file.
6568 * c-valprint.c (textual_name): New function.
6569 (textual_element_type): Handle wide character types.
6570 (c_val_print): Pass original type to textual_element_type. Handle
6571 wide character types.
6572 (c_value_print): Use textual_element_type. Pass original type of
6573 value to val_print.
6574 * c-lang.h (enum c_string_type): New type.
6575 (c_printchar, c_printstr): Update.
6576 * c-lang.c (classify_type): New function.
6577 (print_wchar): Likewise.
6578 (c_emit_char): Add type argument. Handle wide characters.
6579 (c_printchar): Likewise.
6580 (c_printstr): Add type argument. Handle wide and multibyte
6581 character sets.
6582 (convert_ucn): New function.
6583 (emit_numeric_character): Likewise.
6584 (convert_octal): Likewise.
6585 (convert_hex): Likewise.
6586 (ADVANCE): New macro.
6587 (convert_escape): New function.
6588 (parse_one_string): Likewise.
6589 (evaluate_subexp_c): Likewise.
6590 (exp_descriptor_c): New global.
6591 (c_language_defn): Use exp_descriptor_c.
6592 (cplus_language_defn): Likewise.
6593 (asm_language_defn): Likewise.
6594 (minimal_language_defn): Likewise.
6595 (charset_for_string_type): New function.
6596 * c-exp.y (%union): Add 'svec' and 'tsval'.
6597 (CHAR): New token.
6598 (exp): Add CHAR production.
6599 (string_exp): Rewrite.
6600 (exp) <string_exp>: Rewrite.
6601 (tempbuf): Now global.
6602 (tempbuf_init): New global.
6603 (parse_string_or_char): New function.
6604 (yylex) <tempbuf>: Now global.
6605 <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
6606 Remove.
6607 Handle 'u', 'U', and 'L' prefixes. Call parse_string_or_char.
6608 (c_parse_escape): New function.
6609 * auxv.c (fprint_target_auxv): Update.
6610 * ada-valprint.c (ada_emit_char): Add type argument.
6611 (ada_printchar): Likewise.
6612 (ada_print_scalar): Update.
6613 (printstr): Add type argument. Update calls to ada_emit_char.
6614 (ada_printstr): Add type argument.
6615 (ada_val_print_array): Update.
6616 (ada_val_print_1): Likewise.
6617 * ada-lang.c (emit_char): Add type argument.
6618 * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
6619 type arguments.
6620 * gdb_locale.h: Include langinfo.h.
6621 * charset.c (_initialize_charset): Set default host charset from
6622 the locale. Don't register charsets. Add target-wide-charset
6623 commands. Call find_charset_names.
6624 (struct charset, struct translation): Remove.
6625 (GDB_DEFAULT_HOST_CHARSET): Remove.
6626 (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
6627 (target_wide_charset_name): New global.
6628 (show_host_charset_name): Handle "auto".
6629 (show_target_wide_charset_name): New function.
6630 (host_charset_enum, target_charset_enum): Remove.
6631 (charset_enum): New global.
6632 (all_charsets, register_charset, lookup_charset, all_translations,
6633 register_translation, lookup_translation): Remove.
6634 (simple_charset, ascii_print_literally, ascii_to_control): Remove.
6635 (iso_8859_print_literally, iso_8859_to_control,
6636 iso_8859_family_charset): Remove.
6637 (ebcdic_print_literally, ebcdic_to_control,
6638 ebcdic_family_charset): Remove.
6639 (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
6640 register_iconv_charsets): Remove.
6641 (target_wide_charset_be_name, target_wide_charset_le_name): New
6642 globals.
6643 (identity_either_char_to_other): Remove.
6644 (set_be_le_names, validate): New functions.
6645 (backslashable, backslashed, represented): Remove.
6646 (default_c_target_char_has_backslash_escape): Remove.
6647 (default_c_parse_backslash, iconv_convert): Remove.
6648 (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
6649 ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
6650 iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
6651 ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
6652 ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
6653 ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
6654 (table_convert_char, table_translation, simple_table_translation):
6655 Remove.
6656 (current_host_charset, current_target_charset,
6657 c_target_char_has_backslash_escape_func,
6658 c_target_char_has_backslash_escape_baton): Remove.
6659 (c_parse_backslash_func, c_parse_backslash_baton): Remove.
6660 (host_char_to_target_func, host_char_to_target_baton): Remove.
6661 (target_char_to_host_func, target_char_to_host_baton): Remove.
6662 (cached_iconv_host_to_target, cached_iconv_target_to_host):
6663 Remove.
6664 (lookup_charset_or_error, check_valid_host_charset): Remove.
6665 (set_host_and_target_charsets): Remove.
6666 (set_host_charset, set_target_charset): Remove.
6667 (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
6668 (set_target_wide_charset_sfunc): New function.
6669 (show_charset): Print target wide character set.
6670 (host_charset, target_charset): Rewrite.
6671 (target_wide_charset): New function.
6672 (c_target_char_has_backslash_escape): Remove.
6673 (c_parse_backslash): Remove.
6674 (host_letter_to_control_character): New function.
6675 (host_char_print_literally): Remove.
6676 (host_hex_value): New function.
6677 (target_char_to_control_char): Remove.
6678 (cleanup_iconv): New function.
6679 (convert_between_encodings): New function.
6680 (target_char_to_host): Remove.
6681 (struct wchar_iterator): Define.
6682 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
6683 wchar_push_back): New functions.
6684 (do_cleanup_iterator): New function.
6685 (char_ptr): New typedef.
6686 (charsets): New global.
6687 (add_one, find_charset_names): New functions.
6688 (default_charset_names): New global.
6689 (auto_host_charset_name): Likewise.
6690 * aclocal.m4, config.in, configure: Rebuild.
6691 * configure.ac: Call AM_LANGINFO_CODESET.
6692 (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
6693 (AM_ICONV): Invoke earlier.
6694 * acinclude.m4: Include codeset.m4. Subst LIBICONV_INCLUDE and
6695 LIBICONV_LIBDIR. Check for libiconv in build tree.
6696 * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
6697 (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
6698 (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
6699 * gdb_obstack.h (obstack_grow_wstr): New define.
6700 * gdb_wchar.h: New file.
6701 * defs.h: Include it.
6702
6703 2009-03-20 Tom Tromey <tromey@redhat.com>
6704 Jan Kratochvil <jan.kratochvil@redhat.com>
6705
6706 * dwarf2read.c (process_die): Handle DW_TAG_typedef.
6707 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
6708 typedef.
6709 * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
6710 SYMBOL_TYPE result.
6711 * ada-typeprint.c (print_array_type): Do the NULL check
6712 unconditionally.
6713
6714 2009-03-19 Tom Tromey <tromey@redhat.com>
6715
6716 * utils.c (do_obstack_free): New function.
6717 (make_cleanup_obstack_free): Likewise.
6718 * defs.h (make_cleanup_obstack_free): Declare.
6719
6720 2009-03-18 Doug Evans <dje@google.com>
6721
6722 * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
6723 int, not a long long.
6724 (linux_nat_info_proc_cmd): Store pid in long instead of long long.
6725
6726 * expprint.c (dump_raw_expression): Print note if non-NULL.
6727
6728 * printcmd.c (display_uses_solib_p): Redo loop, scan element list
6729 backwards.
6730
6731 2009-03-18 Nathan Sidwell <nathan@codesourcery.com>
6732
6733 * Makefile.in: Update license to GPLv3.
6734 * ada-exp.y: Update license to GPLv3.
6735 * ada-lex.l: Update license to GPLv3.
6736 * c-exp.y: Update license to GPLv3.
6737 * cp-name-parser.y: Update license to GPLv3.
6738 * darwin-nat-info.c: Update license to GPLv3.
6739 * f-exp.y: Update license to GPLv3.
6740 * gdb_thread_db.h: Update license to GPLv3.
6741 * hppanbsd-nat.c: Update license to GPLv3.
6742 * hppanbsd-tdep.c: Update license to GPLv3.
6743 * hppaobsd-tdep.c: Update license to GPLv3.
6744 * jv-exp.y: Update license to GPLv3.
6745 * m2-exp.y: Update license to GPLv3.
6746 * objc-exp.y: Update license to GPLv3.
6747 * p-exp.y: Update license to GPLv3.
6748 * reply_mig_hack.awk: Update license to GPLv3.
6749 * reverse.c: Update license to GPLv3.
6750 * xtensa-xtregs.c: Update license to GPLv3.
6751
6752 2009-03-18 Pedro Alves <pedro@codesourcery.com>
6753
6754 * remote.c (remote_close): Don't call generic_mourn_inferior.
6755 (remote_mourn_1): Call generic_mourn_inferior after closing the
6756 target.
6757
6758 2009-03-18 Pedro Alves <pedro@codesourcery.com>
6759
6760 * remote.c (remote_start_remote): Add missing call to
6761 init_wait_for_inferior in non-stop mode.
6762
6763 2009-03-18 Pedro Alves <pedro@codesourcery.com>
6764
6765 * breakpoint.c (bpstat_should_step): Only consider software
6766 watchpoints that have a location.
6767
6768 2009-03-17 Joel Brobecker <brobecker@adacore.com>
6769
6770 Add a target_ops parameter to the to_kill method in struct target_ops.
6771
6772 * target.h (struct target_ops): Add a "target_ops *" parameter to
6773 method to_kill.
6774 (target_kill): Remove macro. Add declaration.
6775 * target.c (debug_to_kill): Delete, no longer necessary.
6776 (target_kill): New function.
6777 (update_current_target): Stop inheriting the to_kill method.
6778 Do not de_fault it to no_process either.
6779 (setup_target_debug): Do not set current_target.to_kill.
6780 * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
6781 linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
6782 remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
6783 accordingly.
6784
6785 2009-03-17 Doug Evans <dje@google.com>
6786
6787 * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
6788 glibc 2.3.2 and earlier.
6789
6790 2009-03-17 Joel Brobecker <brobecker@adacore.com>
6791
6792 * frame.c (get_prev_frame_1): Do not perform the inner_frame
6793 sanity check if this_frame is not NORMAL.
6794 (frame_id_inner): Update the description of this function.
6795
6796 2009-03-17 Hui Zhu <teawater@gmail.com>
6797
6798 * stack.c: Change the introduce of "disassemble-next-line".
6799
6800 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6801
6802 * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
6803 declare as extern.
6804
6805 2009-03-17 Hui Zhu <teawater@gmail.com>
6806
6807 * stack.c: Include valprint.h.
6808 (disassemble_next_line): New enum.
6809 (show_disassemble_next_line): New function. Show the current
6810 value of disassemble-next-line.
6811 (gdb_disassembly_stub_args): New struct for argument passing
6812 between function do_gdb_disassembly and function
6813 gdb_disassembly_stub.
6814 (gdb_disassembly_stub): New function. Helper for
6815 gdb_disassembly.
6816 (do_gdb_disassembly): New function. Use TRY_CATCH to catch
6817 the exception from the gdb_disassembly because it will be
6818 broken by filter sometime.
6819 (print_frame_info): If disassemble-next-line is set to auto
6820 or on and doesn't have the line debug messages for $pc,
6821 output the next instruction.
6822 If disassemble-next-line is set to on and there is line debug
6823 messages, output assembly codes for next line.
6824 (_initialize_stack): Make the "set disassemble-next-line"
6825 command an auto-boolean command. Change its class to
6826 class_stack. Place it in the top level set list. Extend help
6827 to describe the auto mode.
6828
6829 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6830
6831 * infrun.c (normal_stop): Don't overwrite old_chain.
6832
6833 2009-03-16 Joel Brobecker <brobecker@adacore.com>
6834
6835 * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
6836 which is undefined, by call to regcache_invalidate, which should
6837 do what the original author wanted to do.
6838
6839 2009-03-16 Joel Brobecker <brobecker@adacore.com>
6840
6841 * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
6842 (mips_create_inferior): Likewise.
6843
6844 2009-03-16 Joel Brobecker <brobecker@adacore.com>
6845
6846 * go32-nat.c (go32_create_inferior): Add missing ops parameter.
6847
6848 2009-03-16 Joel Brobecker <brobecker@adacore.com>
6849
6850 * darwin-nat.c (darwin_resume): Fix a compiler warning when
6851 building on x86_64-darwin.
6852
6853 2009-03-16 Tristan Gingold <gingold@adacore.com>
6854
6855 * configure.tgt: Add handling for x86_64-darwin.
6856
6857 2009-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
6858
6859 * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
6860
6861 2009-03-15 Joel Brobecker <brobecker@adacore.com>
6862
6863 * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
6864 Use the ops parameter to get to the target beneath, rather than
6865 using the current_target global. Using the current_target global
6866 was an unintended accident.
6867
6868 2009-03-15 Joel Brobecker <brobecker@adacore.com>
6869
6870 Fix an error happening while loading symbols from a core file
6871 (on AIX).
6872
6873 * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
6874 to detect whether we're debugging a core file or not.
6875
6876 2009-03-15 Joel Brobecker <brobecker@adacore.com>
6877
6878 Modernize the aix-thread later by getting rid of the base_target
6879 global. This brings back to life the AIX port which was otherwise
6880 crashing all the time.
6881
6882 * aix-thread.c (base_target): Delete.
6883 (pd_enable): Do not set base_target.
6884 (aix_thread_attach): Use find_target_beneath instead of base_target.
6885 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6886 (aix_thread_fetch_registers, aix_thread_store_registers),
6887 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6888 (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
6889 (aix_thread_kill): Delete. Does not seem necessary.
6890 (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
6891
6892 2009-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6893
6894 * stack.c (return_command <retval_exp>): New variables retval_expr
6895 and old_chain. Inline parse_and_eval to initialize retval_expr. Check
6896 RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
6897 if RETURN_TYPE is NULL.
6898
6899 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6900
6901 * remote.c (PACKET_qAttached): New.
6902 (remote_query_attached): New.
6903 (remote_add_inferior): Add new `attached' argument. Handle it.
6904 (remote_notice_new_inferior, remote_start_remote): Adjust to pass
6905 -1 to remote_add_inferior in new parameter.
6906 (extended_remote_attach_1): Adjust to pass 1 to
6907 remote_add_inferior in the new parameter.
6908 (extended_remote_create_inferior_1): Adjust to pass 0 to
6909 remote_add_inferior in the new parameter.
6910 (_initialize_remote): Add "set/show remote query-attached-packet"
6911 commands.
6912
6913 2009-03-13 Tom Tromey <tromey@redhat.com>
6914
6915 * symtab.c (lookup_symbol_in_language): Use a cleanup.
6916
6917 2009-03-13 Doug Evans <dje@google.com>
6918
6919 * exceptions.h: Clean up some comments on catch_exceptions usage.
6920 * exceptions.c: Ditto. Plus mark catch_errors as superseded by
6921 catch_exceptions.
6922
6923 2009-02-17 Joel Brobecker <brobecker@adacore.com>
6924
6925 The following patch helps getting rid of a warning inside solib-som.c.
6926
6927 * source.c (source_full_path_of): Constify parameter filename.
6928 * defs.h (source_full_path_of): Update declaration accordingly.
6929
6930 2009-03-12 Joel Brobecker <brobecker@adacore.com>
6931
6932 * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
6933 BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
6934 Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
6935
6936 2009-03-12 Joel Brobecker <brobecker@adacore.com>
6937
6938 * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
6939 promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
6940
6941 2009-03-12 Joel Brobecker <brobecker@adacore.com>
6942
6943 * ada-tasks.c (ada_task_is_alive): Move up and make static.
6944 * ada-lang.h (ada_task_is_alive): Remove declaration.
6945
6946 2009-03-12 Jerome Guitton <guitton@adacore.com>
6947
6948 * ada-lang.c (ada_delta): Change the type of numerators and
6949 denominators to DOUBLEST, as they may not fit into a long.
6950 (scaling_factor): Ditto.
6951
6952 2009-03-12 Jerome Guitton <guitton@adacore.com>
6953
6954 * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
6955
6956 2009-03-12 Joel Brobecker <brobecker@adacore.com>
6957
6958 * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
6959 types, if we are unable to determine the actual symbol type
6960 from its tag, then use the static approximation instead.
6961
6962 2009-03-12 Joel Brobecker <brobecker@adacore.com>
6963
6964 Fix crash printing packed record with packed array.
6965
6966 * ada-lang.c (ada_modulus_from_name): New function.
6967 (ada_modulus): In the case where the type length is bigger than
6968 the size of the type used to hold the bounds, try determining
6969 the modulus from the type name.
6970 (ada_value_primitive_packed_val): Fix bug in the computation of
6971 ntarg causing an out-of-buffer invalid access.
6972
6973 2009-03-12 Joel Brobecker <brobecker@adacore.com>
6974
6975 Fix segfault when printing short_integer'last.
6976
6977 * ada-lang.c (ada_find_any_type): Search in the primitive types
6978 if a symbol could not be found.
6979
6980 2009-03-12 Joel Brobecker <brobecker@adacore.com>
6981
6982 * ada-tasks.c (task_states,long_task_states): Add new states
6983 Activating and Acceptor_Delay_Sleep. Update the description
6984 of state Acceptor_Sleep.
6985
6986 2009-03-12 Jonas Maebe <jonas.maebe@elis.ugent.be> (obvious change)
6987
6988 Fix a build failure on Darwin following some changes in
6989 the profile of some target_ops methods.
6990
6991 * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
6992 where missing.
6993 (darwin_stop_inferior, darwin_detach): Likewise.
6994
6995 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
6996
6997 Include token in ^running notification for CLI commands.
6998
6999 * mi/mi-main.c (mi_execute_command): Set current_token here.
7000 (mi_cmd_execute): Do not set current_token here.
7001
7002 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
7003
7004 Fix MI timings.
7005
7006 * mi/mi-main.c (mi_print_timing_maybe): New.
7007 (captured_mi_execute_command): Simplify. Output timings to
7008 CLI commands, too.
7009 (mi_execute_async_cli_command): Do not print timings.
7010 * mi/mi-main.h (mi_print_timing_maybe): Declare.
7011 * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
7012
7013 2009-03-12 Jerome Guitton <guitton@adacore.com>
7014
7015 * xcoffread.c (process_linenos): Check if the line in the
7016 include table refers to the main source file and, if so,
7017 add them to the main subfile.
7018
7019 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7020
7021 Fix a build failure on AIX introduced after a change in the profile
7022 of some of the "methods" in the target_ops structure.
7023 * aix-thread.c: Add missing target_ops parameter throughout.
7024
7025 Implement Ada task switching on AIX.
7026 * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
7027 (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
7028
7029 2009-03-11 Daniel Jacobowitz <dan@codesourcery.com>
7030
7031 * breakpoint.c (bpstat_check_breakpoint_conditions): Use
7032 value_mark and value_free_to_mark.
7033 * objfiles.c (free_objfile): Call objfile_free_data before
7034 freeing the BFD.
7035
7036 2009-03-10 Hui Zhu <teawater@gmail.com>
7037
7038 * disasm.c (gdb_disassembly): Remove unused argument
7039 "line_num".
7040 * disasm.h (gdb_disassembly): Ditto.
7041 * cli/cli-cmds.c (print_disassembly): Ditto.
7042 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
7043
7044 2009-03-09 Paul Pluzhnikov <ppluzhnikov@google.com>
7045
7046 * solib.c (solib_contains_address_p): New function.
7047 (solib_name_from_address): Use it.
7048 * printcmd.c (display_uses_solib_p): Use it.
7049 * solib.h (solib_contains_address_p): Declare it.
7050
7051 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7052
7053 * varobj.c (free_variable): Call value_free.
7054
7055 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7056
7057 PR gdb/9873:
7058 * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
7059 Move the variable `macinfo_type' out of the loop. Create a new
7060 processing pass before the current one to pre-create `current_file'.
7061 New complaint on misplaced zero/non-zero definitions/includes.
7062 Skip first DW_MACINFO_start_file with `at_commandline' set.
7063
7064 2008-03-09 Vladimir Prus <vladimir@codesourcery.com>
7065
7066 * solib.c (reload_shared_libraries): Give
7067 inferior a chance to reset solib breakpoint.
7068 Reinit frame cache.
7069
7070 2009-03-08 Christopher Faylor <me+cygwin@cgf.cx>
7071
7072 * windows-nat.c (dr): Redefine to use largest possible integer which
7073 holds a pointer.
7074 (cygwin_set_dr): Avoid coercion.
7075
7076 2009-03-08 Oswald Buddenhagen <oswald.buddenhagen@trolltech.de>
7077
7078 * windows-nat.c (windows_create_inferior): Implement --tty handling on
7079 non-cygwin.
7080
7081 2009-03-06 Paul Pluzhnikov <ppluzhnikov@google.com>
7082
7083 Rename solib_address to solib_name_from_address.
7084 * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
7085 (disable_breakpoints_in_unloaded_shlib): Update.
7086 * printcmd.c (display_uses_solib_p): Likewise.
7087 * stack.c (print_frame): Likewise.
7088 * solib.c: Rename.
7089 * solib.h: Rename.
7090
7091 2009-03-05 Paul Pluzhnikov <ppluzhnikov@google.com>
7092
7093 * printcmd.c (do_one_display): Reparse exp_string.
7094 (display_uses_solib_p): New function.
7095 (clear_dangling_display_expressions): New function.
7096 (_initialize_printcmd): Add observer.
7097 * solib.c (no_shared_libraries): Swap order of calls to
7098 clear_solib and objfile_purge_solibs.
7099
7100 2009-03-05 Joel Brobecker <brobecker@adacore.com>
7101
7102 Implement the target-specific part of Ada tasking support
7103 on Tru64.
7104
7105 * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
7106 (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
7107
7108 2009-03-05 Joel Brobecker <brobecker@adacore.com>
7109
7110 Get rid of the global "base_target" and use "find_target_beneath"
7111 to find the underlying target.
7112 * dec-thread.c (base_target): Delete.
7113 (enable_dec_thread): Remove assignement to base_target.
7114 (dec_thread_detach, dec_thread_wait, dec_thread_wait)
7115 (dec_thread_fetch_registers, dec_thread_store_registers)
7116 (dec_thread_mourn_inferior, dec_thread_pid_to_str):
7117 Update the function profile if necessary.
7118 Use find_target_beneath to call the same method but from
7119 the underlying target, removing the need for "base_target".
7120
7121 * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
7122 Fix a copy/paste error in a few debug traces...
7123
7124 * solib-osf.c (init_so): Use a simpler method for computing
7125 the size of lm_info structure. This also gets rid of warning
7126 emitted by the compiler.
7127
7128 2009-03-05 Pedro Alves <pedro@codesourcery.com>
7129
7130 * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
7131 duplicates of permanent breakpoints.
7132
7133 2009-03-04 Pedro Alves <pedro@codesourcery.com>
7134
7135 * inferior.h (notice_new_inferior): Declare.
7136 * infcmd.c (notice_new_inferior): New.
7137 * remote.c (remote_add_inferior, remote_add_thread): New.
7138 (notice_new_inferiors): Rename to...
7139 (remote_notice_new_inferior): ... this. Add RUNNING argument.
7140 Use remote_add_thread instead of add_thread, passing it the
7141 RUNNING argument. Add an inferior with remote_add_inferior. If
7142 we just learned about an inferior, call notice_new_inferior.
7143 (record_currthread): Adjust.
7144 (remote_threads_info): Adjust to use remote_notice_new_inferior.
7145 (remote_start_remote, extended_remote_attach_1): Use
7146 remote_add_inferior.
7147 (process_stop_reply): Adjust. Call remote_notice_new_inferior
7148 after handling expedited registers and watchpoint state.
7149 (extended_remote_create_inferior_1): Use remote_add_inferior.
7150
7151 2009-03-04 Aleksandar Ristovski <aristovski@qnx.com>
7152
7153 * infcmd.c (registers_info): Remove register number case.
7154
7155 2009-03-03 Pedro Alves <pedro@codesourcery.com>
7156
7157 * top.c (quit_target): Check for target_has_execution before
7158 killing or detaching from inferiors.
7159
7160 2009-03-02 Joel Brobecker <brobecker@adacore.com>
7161
7162 Remove some unused routines.
7163
7164 * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
7165 Delete.
7166 * ada-lang.c (ada_task_list_iterator_ftype)
7167 (iterate_over_live_ada_tasks): Delete.
7168 * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
7169 Delete.
7170
7171 2009-03-01 Doug Evans <dje@google.com>
7172
7173 * symtab.c: Remove trailing whitespace throughout the file.
7174 (expand_line_sal): Fix some typos and whitespace.
7175
7176 * Makefile.in (clean): rm -f $(DEPDIR)/*.
7177
7178 * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
7179 (init.c): signals/ -> common/.
7180 (signals.o): Update.
7181 * target.h (target_signal_to_string,target_signal_to_string)
7182 (target_signal_from_name,target_signal_to_host_p)
7183 (target_signal_from_host,target_signal_to_host): Move to ...
7184 * common/gdb_signals.h: ... here. New file.
7185 * common/signals.c: Moved here from signals/signals.c.
7186 #include gdb_signals.h, remove #include of target.h in gdb case.
7187 (target_signal_from_command,default_target_signal_to_host)
7188 (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
7189
7190 Include thread ID in target_wait debugging output.
7191 * infrun.c (print_target_wait_results): New function.
7192 (wait_for_inferior,fetch_inferior_event): Call it.
7193
7194 2009-02-27 Pedro Alves <pedro@codesourcery.com>
7195
7196 * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
7197 with a ptid_t field.
7198 * linux-thread-db.c (thread_get_info_callback): Build the ptid
7199 using the pid stored in proc_handle.ptid.
7200 (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
7201 (check_for_thread_db, thread_db_detach, check_event)
7202 (thread_db_mourn_inferior, find_new_threads_callback)
7203 (thread_db_find_new_threads_1): Adjust.
7204 * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
7205 (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
7206
7207 2009-02-27 Phil Muldoon <pmuldoon@redhat.com>
7208
7209 * valprint.c (read_string): Rework clean-up logic. Use
7210 free_current_contents to clean-up buffer.
7211
7212 2009-02-27 Andreas Schwab <schwab@linux-m68k.org>
7213
7214 * MAINTAINERS: Update e-mail address.
7215
7216 2009-02-26 Phil Muldoon <pmuldoon@redhat.com>
7217
7218 * python/python-utils.c (python_string_to_unicode): Always return
7219 a new reference.
7220 (python_string_to_target_string): Decrement transient python
7221 instance.
7222 (python_string_to_host_string): Likewise.
7223
7224 2007-02-26 Pedro Alves <pedro@codesourcery.com>
7225
7226 * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
7227 call to super_fetch_registers.
7228 (mips64_linux_store_registers): Pass `ops' to call to
7229 super_store_registers.
7230
7231 2009-02-25 Doug Evans <dje@google.com>
7232
7233 * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
7234 error message.
7235
7236 * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
7237 disabled_shlib_breaks, unused.
7238
7239 * printcmd.c (build_address_symbolic): Fix comment.
7240
7241 2009-02-25 Hui Zhu <teawater@gmail.com>
7242
7243 * cli/cli-script.c (define_command): Add _() to query.
7244 * gnu-nat.c (inf_validate_task_sc): Ditto.
7245 * infcmd.c (kill_if_already_running): Ditto.
7246 (jump_command): Ditto.
7247 (attach_command): Ditto.
7248 * inflow.c (kill_command): Ditto.
7249 * infrun.c (handle_command): Ditto.
7250 * maint.c (maintenance_dump_me): Ditto.
7251 * memattr.c (mem_delete_command): Ditto.
7252 * monitor.c (monitor_interrupt_query): Ditto.
7253 * nto-procfs.c (interrupt_query): Ditto.
7254 * printcmd.c (undisplay_command): Ditto.
7255 * remote-mips.c (mips_kill): Ditto.
7256 * remote.c (interrupt_query): Ditto.
7257 * solib-irix.c (irix_open_symbol_file_object): Ditto.
7258 * solib-osf.c (osf_open_symbol_file_object): Ditto.
7259 * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
7260 * solib-som.c (som_open_symbol_file_object): Ditto.
7261 * solib-svr4.c (open_symbol_file_object): Ditto.
7262 * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
7263 * target.c (kill_or_be_killed): Ditto.
7264 * tracepoint.c (delete_trace_command): Ditto.
7265 * top.c (quit_confirm): Add _() to s that will be used
7266 in query.
7267
7268 2009-02-24 Pierre Muller <muller@ics.u-strasbg.fr>
7269
7270 Fix windows-nat.c compilation failure.
7271
7272 * windows-nat.c (windows_thread_alive): Fix forward declaration.
7273 (get_windows_debug_event): Add ops parameter to call to windows_resume.
7274
7275 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7276
7277 * remote-sim.c (gdbsim_resume): Add target_ops* argument.
7278
7279 2009-02-23 Jay Krell <jay.krell@cornell.edu> (tiny change)
7280
7281 * symtab.c (find_line_symtab): Initialize exact to avoid
7282 a compiler warning.
7283
7284 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7285
7286 * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
7287 `ops' to recursive call.
7288
7289 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7290
7291 * corelow.c (get_core_registers): Adjust.
7292 (core_file_thread_alive): Rename to...
7293 (core_thread_alive): ... this.
7294 (core_pid_to_str): Try gdbarch_core_pid_to_str first.
7295 (init_core_ops): Adjust.
7296 (coreops_suppress_target): Delete.
7297 (_initialize_corelow): Unconditionally add core_ops.
7298 * procfs.c: Include "inf-child.h".
7299 (procfs_ops): Delete.
7300 (init_procfs_ops): Delete. Reimplement as...
7301 (procfs_target): ... this, inheriting from inf-child.
7302 (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
7303 (procfs_prepare_to_store): Delete.
7304 (procfs_store_registers, procfs_resume): Adjust.
7305 (procfs_open): Delete.
7306 (procfs_suppress_run): Delete.
7307 (procfs_can_run): Delete.
7308 (procfs_mourn_inferior): Adjust.
7309 (procfs_init_inferior): Add target_ops parameter. Adjust.
7310 (procfs_create_inferior): Don't pass procfs_init_inferior to
7311 fork_inferior. Instead call it after fork_inferior returns.
7312 (procfs_find_new_threads): Adjust.
7313 (_initialize_procfs): Adjust to use procfs_target instead of
7314 init_procfs_ops.
7315 * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
7316 (lwp_to_thread): Use target_thread_alive.
7317 (sol_thread_open): Delete.
7318 (sol_thread_attach): Delete.
7319 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7320 (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
7321 to use find_target_beneath.
7322 (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
7323 (sol_thread_xfer_partial): Adjust to use find_target_beneath.
7324 (sol_thread_files_info, sol_thread_kill_inferior): Delete.
7325 (check_for_thread_db): New.
7326 (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
7327 (sol_thread_new_objfile): Call check_for_thread_db.
7328 (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
7329 (sol_thread_can_run): Delete.
7330 (sol_thread_alive): Adjust to use find_target_beneath.
7331 (sol_thread_stop): Delete.
7332 (rw_common): Use target_write_memory or target_read_memory.
7333 (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
7334 (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
7335 (solaris_pid_to_str): Remove check for libthread_db initialization
7336 failing.
7337 (sol_find_new_threads): Remove check for libthread_db
7338 initialization failing, or for an invalid inferior_ptid. Adjust
7339 to use find_target_beneath.
7340 (sol_core_open, sol_core_close, sol_core_detach,
7341 sol_core_files_info, sol_find_memory_regions,
7342 sol_make_note_section, ignore): Delete.
7343 (init_sol_thread_ops): Make it a thread_stratum target. Remove
7344 unneeded callback settings.
7345 (init_sol_core_ops): Delete.
7346 (_initialize_sol_thread): No longer call init_sol_core_ops, set
7347 procfs_suppress_run, or hack with core_ops.
7348
7349 * target.h (struct target_ops): Add a target_ops * parameter to
7350 to_resume, to_fetch_registers, to_store_registers, to_thread_alive
7351 and to_find_new_threads.
7352 (target_fetch_registers, target_store_registers)
7353 (target_thread_alive, target_find_new_threads): Redeclare as
7354 function.
7355
7356 * target.c (update_current_target): Do not inherit or de_fault
7357 to_resume, to_fetch_registers, to_store_registers,
7358 to_thread_alive, to_find_new_threads.
7359 (target_resume): Adjust.
7360 (target_thread_alive, target_find_new_threads): New.
7361 (debug_to_resume, debug_to_fetch_registers): Delete.
7362 (target_fetch_registers): New.
7363 (debug_to_store_registers): Delete.
7364 (target_store_registers): New.
7365 (debug_to_thread_alive, debug_to_find_new_threads): Delete.
7366 (setup_target_debug): Adjust.
7367
7368 * gdbcore.h (core_ops): Delete declaration.
7369
7370 * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
7371 inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
7372 i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
7373 hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
7374 nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
7375 alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
7376 bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
7377 hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
7378 ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
7379 m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
7380 mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
7381 ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
7382 shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
7383 vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
7384
7385 * gdbarch.sh (core_pid_to_str): New gdbarch callback.
7386 * gdbarch.h, gdbarch.c: Regenerate.
7387
7388 * sol2-tdep.c: Include "inferior.h".
7389 (sol2_core_pid_to_str): New.
7390 * sol2-tdep.h (sol2_core_pid_to_str): Declare.
7391
7392 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
7393 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
7394 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
7395 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
7396
7397 2009-02-22 Doug Evans <dje@google.com>
7398
7399 * exec.c (exec_file_attach): Fix comment.
7400
7401 2009-02-22 Pedro Alves <pedro@codesourcery.com>
7402
7403 Silence a few -Wmissing-prototypes warnings.
7404
7405 PR build/9877:
7406 * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
7407 it static.
7408 * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
7409 * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
7410 * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
7411 (_initialize_amd64nbsd_tdep): ... this.
7412 * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
7413 (_initialize_arm_linux_tdep): Declare.
7414 * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
7415 * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
7416 * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
7417 * avr-tdep.c (avr_return_value): Make it static.
7418 (avr_frame_unwind_cache): Ditto.
7419 * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
7420 (bsd_uthread_solib_loaded): Ditto.
7421 (bsd_uthread_solib_unloaded): Ditto.
7422 (bsd_uthread_target): Ditto.
7423 (_initialize_bsd_uthread): Declare.
7424 * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
7425 (cris_frame_unwind_cache): Ditto.
7426 * frv-tdep.c (frv_return_value): Ditto.
7427 * h8300-tdep.c (h8300_use_struct_convention): Ditto.
7428 (h8300h_use_struct_convention): Ditto.
7429 * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
7430 Ditto.
7431 * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
7432 declarations.
7433 * hppabsd-tdep.c: Include hppabsd-tdep.h.
7434 (hppabsd_find_global_pointer): Make it static.
7435 * hppabsd-tdep.h: New.
7436 * hppanbsd-tdep.c: Include hppabsd-tdep.h.
7437 (hppabsd_init_abi): Remove declaration.
7438 (_initialize_hppabsd_tdep): Remove declaration.
7439 (_initialize_hppanbsd_tdep): Declare.
7440 * hppaobsd-tdep.c: Include hppabsd-tdep.h.
7441 (hppabsd_init_abi): Delete declaration.
7442 (hppaobsd_init_abi): Make it static.
7443 * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
7444 * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
7445 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
7446 * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
7447 * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
7448 * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
7449 (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
7450 (_initialize_m32c_tdep): Declare.
7451 * m32r-rom.c (_initialize_m32r_rom): Declare.
7452 * m32r-tdep.c (m32r_skip_prologue): Make it static.
7453 (m32r_return_value): Ditto.
7454 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
7455 (m68hc11_return_value): Ditto.
7456 * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
7457 * m88k-tdep.c (m88k_frame_cache): Make it static.
7458 * mep-tdep.c (mep_gdb_print_insn): Ditto.
7459 (mep_return_value): Ditto.
7460 (_initialize_mep_tdep): Declare.
7461 * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
7462 * mips-linux-tdep.c (supply_64bit_reg): Make it static.
7463 (mips_linux_syscall_next_pc): Ditto.
7464 (_initialize_mips_linux_tdep): Declare.
7465 * mips-tdep.c (mips_single_step_through_delay): Make it static.
7466 * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
7467 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
7468 * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
7469 * mt-tdep.c (_initialize_mt_tdep): Declare.
7470 * nbsd-tdep.c: Include nbsd-tdep.h.
7471 * nto-tdep.c (find_load_phdr): Make it static.
7472 (_initialize_nto_tdep): Declare.
7473 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
7474 static.
7475 (_initialize_ppc_linux_tdep): Declare.
7476 * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
7477 (m32r_insert_watchpoint, m32r_remove_watchpoint)
7478 (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
7479 static.
7480 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
7481 * rs6000-nat.c: Include xcoffread.h.
7482 (find_toc_address): Don't extern declare get_toc_offset. Adjust
7483 to call xcoff_get_to_offset.
7484 * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
7485 (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
7486 (rs6000_skip_trampoline_code): Make static.
7487 * s390-tdep.c (s390_regset_from_core_section): Ditto.
7488 * sh-tdep.c (sh_register_reggroup_p): Ditto.
7489 * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
7490 (_initialize_shnbsd_tdep): Declare.
7491 * solib-frv.c (displacement_from_map): Make static.
7492 (_initialize_frv_solib): Declare.
7493 * solib-irix.c (fetch_lm_info): Make static.
7494 (_initialize_irix_solib): Declare.
7495 * solib-som.c: Include solib-som.h.
7496 (som_solib_select): Line break.
7497 * sparc-tdep.c (sparc_regset_from_core_section): Make static.
7498 * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
7499 (_initialize_sparcnbsd_tdep): ... this.
7500 * spu-tdep.c (spu_software_single_step): Make it static.
7501 (_initialize_spu_tdep): Declare.
7502 * vax-tdep.c (vax_frame_cache): Make it static.
7503 * xcoffread.c: Include xcoffread.h.
7504 (get_toc_offset): Rename to ...
7505 (xcoff_get_toc_offset): ... this.
7506 (_initialize_xcoffread): Declare.
7507 * xcoffread.h: New.
7508 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
7509 * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
7510 static.
7511 (_initialize_xtensa_tdep): Declare.
7512
7513 2008-02-21 Pedro Alves <pedro@codesorcery.com>
7514
7515 Silence a few -Wmissing-prototypes warnings.
7516
7517 PR build/9877:
7518 * amd64-nat.c: Include "amd64-nat.h".
7519 * fork-child.c (_initialize_fork_child): Ditto.
7520 * gcore.c (_initialize_gcore): Ditto.
7521 * inf-ptrace.c: Include "inf-ptrace.h".
7522 (inf_ptrace_store_registers): Make it static.
7523 * linux-nat.c (linux_nat_terminal_ours): Make it static.
7524 (_initialize_linux_nat): Declare before definition.
7525 * linux-tdep.c: Include "linux-tdep.h".
7526 * linux-thread-db.c (_initialize_thread_db): Declare before
7527 definition.
7528 * proc-service.c (_initialize_proc_service): Ditto.
7529 * remote.c (remote_send_printf): Make it static.
7530 * solib.c: Include "solib.h".
7531 * symfile-mem.c (_initialize_symfile_mem): Declare before
7532 definition.
7533 * ada-lang.c (ada_la_decode, ada_match_name)
7534 (ada_suppress_symbol_printing, ada_is_array_type)
7535 (ada_value_ptr_subscript, ada_array_length)
7536 (ada_to_static_fixed_value): Make them static.
7537 (_initialize_ada_language): Declare before definition.
7538 * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
7539 (ada_task_list_changed, ada_new_objfile_observer): Make them
7540 static.
7541 (_initialize_tasks): Declare before definition.
7542 * addrmap.c (_initialize_addrmap): Declare before definition.
7543 * auxv.c (default_auxv_parse): Make it static.
7544 * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
7545 them static.
7546 * breakpoint.c (remove_sal): Add line break.
7547 (expand_line_sal_maybe): Make it static.
7548 * cp-name-parser.y: Include "cp-support.h".
7549 * cp-valprint.c (cp_find_class_member): Make it static.
7550 * eval.c (value_f90_subarray): Ditto.
7551 * exceptions.c (print_any_exception): Ditto.
7552 * findcmd.c (_initialize_mem_search): Declare before definition.
7553 * frame.c (frame_observer_target_changed): Make it static.
7554 * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
7555 * inf-child.c: Include "inf-child.h".
7556 * inferior.h (valid_inferior_id): Rename to ...
7557 (valid_gdb_inferior_id): ... this.
7558 * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
7559 Make them static.
7560 * jv-lang.c (java_language_arch_info): Make it static.
7561 * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
7562 * osdata.c (info_osdata_command): Make it static.
7563 * regcache.c (regcache_observer_target_changed): Make it static.
7564 * reverse.c (_initialize_reverse): Declare before definition.
7565 * stabsread.c (cleanup_undefined_types_noname)
7566 (cleanup_undefined_types_1): Make them static.
7567 * symfile.c (place_section): Make it static.
7568 * symtab.c (find_pc_sect_psymtab_closer): Make it static.
7569 * target-descriptions.c (_initialize_target_descriptions): Declare
7570 before definition.
7571 * target.c (default_get_ada_task_ptid, find_default_can_async_p)
7572 (find_default_is_async_p, find_default_supports_non_stop): Make
7573 them static.
7574 (target_supports_non_stop): Add prototype.
7575 (dummy_pid_to_str): Make it static.
7576 * utils.c (_initialize_utils): Declare before definition.
7577 * ada-exp.y (_initialize_ada_exp): Declare before definition.
7578 * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
7579 * target.h (struct target_ops): Add a prototype to the
7580 to_can_execute_reverse callback.
7581 * macroscope.c (_initialize_macroscope): Declare before definition.
7582 * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
7583 * python/python.c (_initialize_python): Declare before definition.
7584 * tui/tui-command.c: Include "tui/tui-command.h".
7585 * tui/tui-data.c (init_content_element, init_win_info): Make them
7586 static.
7587 * tui/tui-disasm.c: Include "tui/tui-disasm.h".
7588 * tui/tui-interp.c (_initialize_tui_interp): Declare before
7589 definition.
7590 * tui/tui-layout.c: Include "tui/tui-layout.h".
7591 (_initialize_tui_layout): Declare before definition.
7592 * tui/tui-regs.c: Include "tui/tui-regs.h".
7593 (tui_display_reg_element_at_line): Make it static.
7594 (_initialize_tui_regs): Declare before definition.
7595 * tui/tui-stack.c (_initialize_tui_stack): Declare before
7596 definition.
7597 * tui/tui-win.c: Include "tui/tui-win.h".
7598 (_initialize_tui_win): Declare before definition.
7599 (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
7600 * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
7601 (tui_get_cmd_list): Add a prototype.
7602 * tui/tui-windata.c: Include tui-windata.h.
7603 * tui/tui-wingeneral.c (box_win): Make it static.
7604 * cli/cli-logging.c (show_logging_command): Make it static.
7605 (_initialize_cli_logging): Declare before definition.
7606 * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
7607 definition.
7608
7609 2009-02-20 Pierre Muller <muller@ics.u-strasbg.fr>
7610
7611 Extend use of i386_use_watchpoints to all i386 native files
7612 using hardware watchpoints.
7613 * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
7614 * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
7615 * windows-nat.c (init_windows_ops): Ditto.
7616 * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
7617 * config/i386/nm-cygwin64.h: Ditto.
7618 * config/i386/nm-fbsd.h: Ditto.
7619 * config/i386/nm-go32.h: Ditto.
7620
7621 2009-02-19 Joel Brobecker <brobecker@adacore.com>
7622
7623 * ada-typeprint.c (ada_typedef_print): Remove. Unused.
7624
7625 2009-02-18 Vladimir Prus <vladimir@codesourcery.com>
7626
7627 * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
7628 (mi_interpreter_init): Register the above.
7629 * solib.c (clear_solib): Notify solib unload.
7630 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
7631 disable breakpoints on a.out targets.
7632
7633 2009-02-17 Vladimir Prus <vladimir@codesourcery.com>
7634
7635 * observer.c (observer_test_first_notification_function)
7636 (observer_test_second_notification_function)
7637 (observer_test_third_notification_function): Adjust prototype.
7638
7639 2009-02-17 Pedro Alves <pedro@codesourcery.com>
7640
7641 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
7642 (ALL_TARGET_OBS): Add dicos-tdep.o.
7643 (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
7644 * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
7645 gdb_target_obs.
7646 (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
7647 gdb_target_obs.
7648 * dicos-tdep.h, dicos-tdep.c: New.
7649 * amd64-dicos-tdep.c: New.
7650 * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
7651 inferior.h. Include dicos-tdep.h.
7652 (i386_dicos_init_abi): Call dicos_init_abi.
7653 (i386_dicos_bfd_has_symbol_p): Delete.
7654 (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
7655
7656 * NEWS: Mention x86-64 DICOS target support.
7657
7658 2009-02-16 Doug Evans <dje@google.com>
7659
7660 * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
7661 All callers updated.
7662 (amd64_get_insn_details): Handle more 3-byte opcode insns.
7663 (amd64_breakpoint_p): Delete.
7664 (amd64_displaced_step_fixup): When fixing up after stepping an int3,
7665 don't back up pc to the start of the int3.
7666 * i386-tdep.c: #include opcode/i386.h.
7667 (i386_skip_prefixes): New function.
7668 (i386_absolute_jmp_p): Constify argument.
7669 (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
7670 (i386_breakpoint_p): Delete.
7671 (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
7672 When fixing up after stepping an int3, don't back up pc to the start
7673 of the int3.
7674
7675 2009-02-16 Pedro Alves <pedro@codesourcery.com>
7676
7677 * corelow.c (core_close): Don't hardcode the core's pid.
7678 (core_open): Find core threads before calling
7679 post_create_inferior.
7680 (add_to_thread_list, get_core_register_section): Take into account
7681 systems where the regset section names encode the pid of the
7682 inferior.
7683
7684 * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
7685 * gdbarch.h, gdbarch.c: Regenerate.
7686
7687 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
7688 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
7689 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
7690 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
7691
7692 2009-02-14 Vladimir Prus <vladimir@codesourcery.com>
7693
7694 Include frame information for *stopped due to CLI commands.
7695
7696 * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
7697 * infcmd.c (finish_command_continuation): Pass '1' for
7698 'print_frame' parameter to the observer.
7699 * infrun.c (normal_stop): Don't print mi-specific information
7700 here. Pass 'stop_print_frame' to the 'print_frame' parameter
7701 of the observer.
7702 * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
7703 If we need to print frame, and current uiout is not the MI one,
7704 print frame again.
7705
7706 2009-02-13 Pierre Muller <muller@ics.u-strasbg.fr>
7707
7708 * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
7709 Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
7710
7711 2009-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7712
7713 PR fortran/9806
7714 * dwarf2read.c (process_die <DW_TAG_module>, read_module)
7715 (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
7716
7717 2009-02-11 Pierre Muller <muller@ics.u-strasbg.fr>
7718
7719 * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
7720 for DW_ATE_signed_char and DW_ATE_unsigned_char
7721 for pascal language.
7722
7723 2009-02-11 Jim Meyering <meyering@redhat.com>
7724 Jan Kratochvil <jan.kratochvil@redhat.com>
7725
7726 Avoid NULL dereference.
7727 * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
7728 New variable func_type.
7729
7730 2009-02-11 Pedro Alves <pedro@codesourcery.com>
7731
7732 * gdbarch.c: Regenerate.
7733
7734 2009-02-10 Pierre Muller <muller@ics.u-strasbg.fr>
7735
7736 * p-lang.c (is_pascal_string_type): Fix comment.
7737 Determine exact size of char elements for GPC
7738 strings.
7739 (pascal_printstr): Handle char width of 2 or 4.
7740 * p-valprint.c (pascal_val_print): Handle char
7741 of width 2 or 4.
7742
7743 2009-02-07 Daniel Jacobowitz <dan@codesourcery.com>
7744
7745 * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
7746 inside the loop. Only call addrmap_set_empty if the compilation unit
7747 had DW_AT_high_pc and DW_AT_low_pc. Update call to
7748 scan_partial_symbols.
7749 (scan_partial_symbols): Take NEED_PC argument and pass it along with
7750 LOWPC and HIGHPC.
7751 (add_partial_namespace): Take NEED_PC argument and pass it through.
7752 (add_partial_subprogram): Take NEED_PC argument. Update the addrmap
7753 if necessary.
7754
7755 2009-02-07 Pedro Alves <pedro@codesourcery.com>
7756
7757 * NEWS: Mention inspecting extra signal information, $_siginfo,
7758 and the qXfer:siginfo:read and qXfer:siginfo:write packets.
7759
7760 2009-02-07 Pedro Alves <pedro@codesourcery.com>
7761
7762 * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
7763 isn't defined.
7764
7765 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7766
7767 * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
7768 (compat_timer_t, compat_clock_t, struct compat_timeval)
7769 (compat_sigval_t, compat_siginfo_t): New types.
7770 (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
7771 (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
7772 (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
7773 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
7774 (amd64_linux_siginfo_fixup): New.
7775 * linux-nat.c (linux_nat_siginfo_fixup): New.
7776 (siginfo_fixup): New.
7777 (linux_xfer_siginfo): Use siginfo_fixup to convert between the
7778 siginfo layout expected by ptrace and the siginfo layout of the
7779 inferior.
7780 (linux_nat_set_siginfo_fixup): New.
7781 * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
7782
7783 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7784
7785 * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
7786 * infrun.c (siginfo_value_read, siginfo_value_write): New.
7787 (siginfo_value_funcs): New.
7788 (siginfo_make_value): New.
7789 (_initialize_infrun): Create the $_siginfo convenience variable.
7790 * gdbtypes.h (append_composite_type_field_aligned): Declare.
7791 * gdbtypes.c (append_composite_type_field): Rename to...
7792 (append_composite_type_field_aligned): ... this. Add ALIGNMENT
7793 argument. Handle it.
7794 (append_composite_type_field): Rewrite on top of
7795 append_composite_type_field_aligned.
7796 * value.h (internalvar_make_value): New typedef.
7797 (struct internalvar) <make_value>: New field.
7798 (create_internalvar_type_lazy): Declare.
7799 * value.c (create_internalvar): Clear make_value.
7800 (create_internalvar_type_lazy): New.
7801 (value_of_internalvar): If make_value is set use it.
7802 (preserve_values): Skip internal variables that don't have a
7803 value.
7804 * gdbarch.sh (get_siginfo_type): New.
7805 * gdbarch.h, gdbarch.c: Regenerate.
7806
7807 * linux-tdep.h, linux-tdep.c: New.
7808 * amd64-linux-tdep.c: Include "linux-tdep.h".
7809 (amd64_linux_init_abi): Register linux_get_siginfo_type and
7810 linux_get_siginfo_mapper.
7811 * i386-linux-tdep.c: Include "linux-tdep.h".
7812 (i386_linux_init_abi): Register linux_get_siginfo_type and
7813 linux_get_siginfo_mapper.
7814 * arm-linux-tdep.c: Include "linux-tdep.h".
7815 (i386_linux_init_abi): Register linux_get_siginfo_type and
7816 linux_get_siginfo_mapper.
7817
7818 * linux-nat.c (linux_xfer_siginfo): New.
7819 (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
7820 * remote.c (PACKET_qXfer_siginfo_read)
7821 (PACKET_qXfer_siginfo_write): New.
7822 (feature remote_protocol_features): Add "qXfer:siginfo:read" and
7823 "qXfer:siginfo:write" features.
7824 (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
7825 (_initialize_remote): Add "set/show remote read-siginfo-object"
7826 and "set/show remote write-siginfo-object" commands.
7827
7828 * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
7829 (HFILES_NO_SRCDIR): Add linux-tdep.h.
7830 (ALLDEPFILES): Add linux-tdep.c.
7831
7832 * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
7833 (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
7834 gdb_target_obs.
7835
7836 2009-02-06 Jim Blandy <jimb@codesourcery.com>
7837 Daniel Jacobowitz <dan@codesourcery.com>
7838 Vladimir Prus <vladimir@codesourcery.com>
7839 Pedro Alves <pedro@codesourcery.com>
7840
7841 * defs.h (enum lval_type): New value: lval_computed.
7842 * value.h (struct lval_funcs): New type.
7843 (allocate_computed_value, value_computed_funcs)
7844 (value_computed_closure): New declarations.
7845 * value.c (struct value): Add a structure to the location union
7846 for computed lvalues, containing 'funcs' and 'closure' members.
7847 (allocate_computed_value, value_computed_funcs)
7848 (value_computed_closure): New functions.
7849 (value_free): For computed lvalues, call the closure's
7850 'free_closure' function before freeing the value itself.
7851 (value_copy): If we're copying an lval_computed value, call the
7852 closure's 'copy_closure' function.
7853 (set_value_component_location): If the original value is a
7854 computed lvalue, then call the closure's 'copy_closure' function.
7855 (value_of_internalvar): If an internal variable's value is a
7856 computed lvalue, make retrieving its value produce an equivalent
7857 computed lvalue.
7858 * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
7859 their read function.
7860 (value_assign): Assign to computed lvalues by calling their write
7861 function.
7862
7863 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7864
7865 * linux-nat.c (linux_nat_wait): Adjust.
7866 (linux_nat_pid_to_str): Adjust. Remove call to thread_db_init.
7867 * linux-nat.h (thread_db_init): Delete declaration.
7868 * linux-thread-db.c (target_beneath): Delete.
7869 (thread_db_init): Delete.
7870 (thread_db_detach): Use find_target_beneath.
7871 (thread_db_wait): Adjust interface. Use find_target_beneath.
7872 (thread_db_mourn_inferior): Use find_target_beneath.
7873 (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
7874 (thread_db_async_mask): Delete.
7875 (thread_db_pid_to_str): Adjust interface. Use
7876 find_target_beneath.
7877 (thread_db_get_thread_local_address): Adjust interface. Use
7878 find_target_beneath.
7879 (init_thread_db_ops): Delete references to delete functions.
7880 * target.c (update_current_target): Don't inherit or default
7881 to_wait. Don't inherit to_pid_to_str and
7882 to_get_thread_local_address.
7883 (target_translate_tls_address): Look for a pushed target that
7884 implements to_get_thread_local_address, and use it instead of
7885 checking for target_get_thread_local_address_p.
7886 (target_wait, target_pid_to_str): Reimplement as functions.
7887 (dummy_pid_to_str): New.
7888 (init_dummy_target): Register it.
7889 (debug_to_wait): Delete.
7890 * target.h (struct target_ops): Make to_wait, to_pid_to_str and
7891 to_get_thread_local_address accept a pointer to struct target_ops.
7892 (target_wait): Delete macro, and declare as function.
7893 (target_pid_to_str): Likewise.
7894 (target_get_thread_local_address)
7895 (target_get_thread_local_address_p): Delete.
7896 (noprocess): Add NORETURN and ATTR_NORETURN tags.
7897 * inf-ptrace.c (inf_ptrace_wait): Adjust.
7898 (inf_ptrace_pid_to_str): New.
7899 (inf_ptrace_target): Use inf_ptrace_pid_to_str.
7900 * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
7901 * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
7902 * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
7903 Adjust.
7904 * corelow.c (core_pid_to_str): Adjust.
7905 * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
7906 * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
7907 * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
7908 * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
7909 * hpux-thread.c (hpux_thread_wait): Adjust.
7910 * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
7911 * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
7912 * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
7913 * procfs.c (procfs_pid_to_str): Adjust.
7914 * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
7915 * remote-mips.c (mips_wait): Adjust.
7916 * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
7917 * remote.c (remote_wait, remote_pid_to_str)
7918 (remote_get_thread_local_address): Adjust.
7919 * rs6000-nat.c (rs6000_wait): Adjust.
7920 * sol-thread.c (procfs_pid_to_str): Adjust declaration.
7921 (sol_thread_wait, solaris_pid_to_str): Adjust.
7922 * spu-linux-nat.c (spu_child_wait): Adjust.
7923 * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
7924
7925 2009-02-06 Tom Tromey <tromey@redhat.com>
7926
7927 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
7928 (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
7929 (python-cmd.o): New target.
7930 * cli/cli-decode.c (set_cmd_completer): Add self parameter to
7931 completer prototype.
7932 (add_cmd): Initialize destroyer member of cmd_list_element. Use
7933 make_symbol_completion_list_fn as completer.
7934 (delete_cmd): Call destroyer if one is set.
7935 * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
7936 completer member. Add destroyer member.
7937 (set_cmd_completer): Add self parameter to
7938 completer prototype.
7939 * command.h (set_cmd_completer): Add cmd parameter to
7940 completer prototype.
7941 * completer.c (noop_completer, filename_completer,
7942 location_completer, expression_completer, command_completer): Adapt
7943 to new completer prototype.
7944 (complete_line_internal): Pass new parameter to completer function.
7945 * completer.h (noop_completer, filename_completer,
7946 location_completer, expression_completer, command_completer): Adapt
7947 prototypes to new completer prototype.
7948 * interps.c (interpreter_completer): Adapt to new completer
7949 prototype.
7950 * python/python-cmd.c: New file.
7951 * python/python-internal.h (gdbpy_initialize_commands): Add
7952 prototype.
7953 (gdbpy_doc_cst): Add forward declaration.
7954 * python/python.c (gdbpy_doc_cst): Declare.
7955 (_initialize_python): Call gdbpy_initialize_commands. Initialize
7956 gdbpy_doc_cst.
7957 * symtab.c (make_symbol_completion_list_fn): New function.
7958 * symtab.h (make_symbol_completion_list_fn): Add prototype.
7959
7960 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7961
7962 * target.c (target_get_osdata): Check for equal or higher than
7963 process_stratum, not dummy_stratum.
7964
7965 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7966
7967 * remote.c (extended_remote_can_run): Delete.
7968 (init_remote_ops): Don't register it.
7969 * target.c (target_get_osdata): Don't check for target_can_run.
7970 Instead any target that has already been pushed, otherwise
7971 fallback to the default run target.
7972
7973 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7974
7975 * target.c (target_create_inferior, target_detach)
7976 (target_mourn_inferior, target_attach, target_close): Do target
7977 debug output.
7978 (debug_to_attach, debug_to_detach, debug_to_create_inferior)
7979 (debug_to_mourn_inferior, debug_to_close): Delete.
7980 (setup_target_debug): Adjust.
7981
7982 2009-02-05 Pedro Alves <pedro@codesourcery.com>
7983
7984 * target.h (target_stopped_data_address_p): Delete declaration,
7985 and don't define as macro.
7986 * target.c (target_stopped_data_address_p): Delete.
7987
7988 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
7989 Tom Tromey <tromey@redhat.com>
7990
7991 * python/python-utils.c (target_string_to_unicode): New function.
7992 * python/python-internal.h (target_string_to_unicode): New prototype.
7993 * python/python-value.c (valpy_string): New function.
7994 (value_object_methods): Add `string' entry.
7995
7996 2009-02-05 Pedro Alves <pedro@codesourcery.com>
7997
7998 * target.h (target_tid_to_str): Delete.
7999 * thread.c (print_thread_info, thread_apply_all_command)
8000 (thread_apply_command, thread_command, do_captured_thread_select):
8001 Use target_pid_to_str instead of target_tid_to_str.
8002 * linux-fork.c (delete_fork_command): Likewise.
8003
8004 2009-02-05 Pedro Alves <pedro@codesourcery.com>
8005
8006 * frame.c (has_stack_frames): Make public.
8007 (get_prev_frame): Don't allow a NULL this_frame anymore.
8008 * frame.h (has_stack_frames): Declare.
8009 * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
8010 to get_prev_frame, instead start at get_current_frame.
8011 (varobj_create): Check has_stack_frames before getting any frame;
8012 eliminate one usage of deprecated_safe_get_selected_frame.
8013
8014 2009-02-05 Tom Tromey <tromey@redhat.com>
8015 Thiago Jung Bauermann <bauerman@br.ibm.com>
8016
8017 * python/python.c (GdbMethods): Move to bottom of file.
8018 (get_parameter, execute_gdb_command, gdbpy_write,
8019 gdbpy_flush): Remove forward declarations.
8020 (eval_python_from_control_command): Fix error checking of function
8021 PyRun_SimpleString. Fix error string.
8022 (python_command): Likewise.
8023 (execute_gdb_command): Added from_tty argument.
8024
8025 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
8026
8027 * language.h (language_dfn): Add la_get_string member.
8028 (LA_GET_STRING): New macro.
8029 (default_get_string): New prototype.
8030 * language.c (default_get_string): New function.
8031 (unknown_language_defn, auto_language_defn, local_language_defn): Use
8032 default_get_string for la_get_string.
8033 * c-lang.c (c_get_string): New function.
8034 (c_language_defn, cplus_language_defn, asm_language_defn): Use
8035 c_get_string for la_get_string.
8036 (minimal_language_defn): Likewise
8037 * ada-lang.c (ada_language_defn): Likewise.
8038 * f-lang.c (f_language_defn): Use default_get_string for
8039 la_get_string.
8040 * jv-lang.c (java_language_defn): Likewise.
8041 * m2-lang.c (m2_language_defn): Likewise.
8042 * objc-lang.c (objc_language_defn): Likewise.
8043 * p-lang.c (p_language_defn): Likewise.
8044 * scm-lang.c (scm_language_defn): Likewise.
8045 * typeprint.c (type_to_string): New function.
8046 * value.h (type_to_string): New prototype.
8047 * valprint.c (val_print_string): Factor out code for reading string
8048 from the inferior into its own function. Put 2 spaces after period
8049 in comments.
8050 (read_string): New function.
8051 * valprint.h (read_string): New prototype.
8052
8053 2009-01-07 Pierre Muller <muller@ics.u-strasbg.fr>
8054 Tom Tromey <tromey@redhat.com>
8055
8056 PR breakpoints/8079:
8057 * breakpoint.c (print_one_breakpoint): Use exp_string field
8058 to display expression of watchpoints.
8059 (mention): Likewise.
8060 (watch_command_1): Remove trailing whitespace from expression.
8061 * printcmd.c (struct display) <exp_string>: New field.
8062 (display_command): Set exp_string.
8063 (free_display): Free exp_string.
8064 (clear_displays): Use free_display.
8065 (do_one_display): Print exp_string.
8066 (display_info): Likewise.
8067
8068 2009-02-04 Tom Tromey <tromey@redhat.com>
8069 Thiago Jung Bauermann <bauerman@br.ibm.com>
8070 Phil Muldoon <pmuldoon@redhat.com>
8071
8072 * python/python-internal.h (gdbpy_get_value_from_history): Rename
8073 prototype to gdbpy_history.
8074 (gdbpy_is_string): Declare.
8075 (python_string_to_host_string): Declare.
8076 * python/python-utils.c (gdbpy_is_string): New function.
8077 (unicode_to_encoded_string): New function.
8078 (unicode_to_target_string): Use it.
8079 (python_string_to_host_string): New function.
8080 * python/python-value.c (valpy_address): New function.
8081 (convert_value_from_python): Use gdbpy_is_string. Change to throw
8082 Python exception instead of a GDB exception on error. Properly check
8083 Python booleans.
8084 (valpy_getitem): Convert field name to host string. Handle array
8085 accesses. Adapt to new behaviour of convert_value_from_python.
8086 (valpy_new): Adapt to new behaviour of convert_value_from_python.
8087 (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
8088 VALPY_BITXOR, VALPY_BITOR>: New constants.
8089 (valpy_binop): Update. Adapt to new behaviour of
8090 convert_value_from_python.
8091 (valpy_invert): New function.
8092 (valpy_lsh): Likewise.
8093 (valpy_rsh): Likewise.
8094 (valpy_and): Likewise.
8095 (valpy_or): Likewise.
8096 (valpy_xor): Likewise.
8097 (valpy_richcompare): Call convert_value_from_python instead of doing
8098 conversions itself.
8099 (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
8100 (gdbpy_get_value_from_history): Rename
8101 function to gdbpy_history.
8102 (gdbpy_initialize_values): Don't set tp_new.
8103 (value_object_type): Add valpy_new.
8104 (value_object_methods): Add `address' entry.
8105 (value_object_as_number): Update for new methods.
8106 * python/python.c (GdbMethods): Rename entry from
8107 `get_value_from_history' to `history'.
8108
8109 2009-02-04 Jerome Guitton <guitton@adacore.com>
8110
8111 * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
8112 of type to guard against a crash.
8113
8114 2009-02-04 Jerome Guitton <guitton@adacore.com>
8115
8116 * value.c (value_from_contents_and_address): Always return
8117 a lval_memory value, even if address is null.
8118
8119 2009-02-04 Tristan Gingold <gingold@adacore.com>
8120
8121 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
8122 (amd64_darwin_sigcontext_addr): Ditto.
8123 (darwin_dwarf_signal_frame_p): Ditto.
8124 (i386_darwin_init_abi): Handle signal frames, use the const for
8125 sc_num_regs.
8126 (x86_darwin_init_abi_64): Ditto.
8127
8128 2009-02-04 Tristan Gingold <gingold@adacore.com>
8129
8130 * i386-tdep.c (i386_sigtramp_p): Make it public.
8131 * i386-tdep.h (i386_sigtramp_p): Declare.
8132
8133 2009-02-04 Tristan Gingold <gingold@adacore.com>
8134
8135 * machoread.c (macho_symfile_read): Read minsymtab also from
8136 shared libraries.
8137 (macho_symfile_read): Try to read dwarf2 frame info from main
8138 object file, but not from OSO files.
8139 (macho_symfile_offsets): Update section names for latest BFD
8140 changes.
8141 * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
8142 (x86_darwin_init_abi_64): Ditto.
8143 * solib-darwin.c: New file.
8144 * solib-darwin.h: New file.
8145 * configure.tgt: Add solib.o solib-darwin.o for Darwin.
8146
8147 2009-02-04 Tristan Gingold <gingold@adacore.com>
8148
8149 * solist.h (struct target_so_ops): Comment fallback behavior for
8150 operation same.
8151
8152 2009-02-03 Tom Tromey <tromey@redhat.com>
8153
8154 * completer.c (add_struct_fields): Check type_name against NULL
8155 before use.
8156
8157 2009-02-03 Joel Brobecker <brobecker@adacore.com>
8158
8159 * MAINTAINERS: Update Elena's email address.
8160
8161 2009-02-02 Joel Brobecker <brobecker@adacore.com>
8162
8163 * breakpoint (update_watchpoint): Minor comment adjustment.
8164
8165 2009-02-02 Tom Tromey <tromey@redhat.com>
8166
8167 PR gdb/9594:
8168 * completer.c (count_struct_fields): Count method names.
8169 (add_struct_fields): Add matching method names.
8170
8171 2009-02-02 Doug Evans <dje@google.com>
8172
8173 * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
8174 doing any further tcl/tk configury. Don't configure gdbtk if
8175 tcl or tk check fails.
8176 * aclocal.m4: Regenerate.
8177 * configure: Regenerate.
8178
8179 2009-02-02 Tom Tromey <tromey@redhat.com>
8180
8181 PR exp/9059:
8182 * valops.c (find_overload_match): Follow typedefs before taking
8183 address of object argument.
8184
8185 2009-02-01 Doug Evans <dje@google.com>
8186
8187 * target.h (target_waitstatus_to_string): Declare.
8188 * target.c (target_waitstatus_to_string): New function. Copied from
8189 debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
8190 TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
8191 TARGET_WAITKIND_NO_HISTORY.
8192 (debug_to_wait): Call it.
8193 * infrun.c (wait_for_inferior): If debug_infrun, print result of
8194 target_wait.
8195 (fetch_inferior_event): Ditto.
8196
8197 2009-01-30 Tom Tromey <tromey@redhat.com>
8198
8199 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
8200
8201 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
8202
8203 PR 8145.
8204 * thread.c (do_captured_list_thread_ids): Report the current
8205 thread id.
8206
8207 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
8208
8209 * breakpoint.c (create_breakpoint, create_breakpoints)
8210 (break_command_really, set_breakpoint): New parameter enabled.
8211 (create_breakpoint, break_command_really): Make breakpoint
8212 disabled if so requested.
8213 * breakpoint.h (set_breakpoint): New parameter enabled.
8214 * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
8215
8216 2009-01-28 Doug Evans <dje@google.com>
8217
8218 * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
8219 (amd64_displaced_step_fixup): Declare.
8220 * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
8221 (amd64_arch_regmap): Move out of amd64_analyze_stack_align
8222 and make static global.
8223 (amd64_arch_regmap_len): New static global.
8224 (amd64_arch_reg_to_regnum): New function.
8225 (struct amd64_insn): New struct.
8226 (struct displaced_step_closure): New struct.
8227 (onebyte_has_modrm,twobyte_has_modrm): New static globals.
8228 (rex_prefix_p,skip_prefixes)
8229 (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
8230 (amd64_insn_length,amd64_get_unused_input_int_reg)
8231 (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
8232 (amd64_displaced_step_copy_insn)
8233 (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
8234 (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
8235 (amd64_displaced_step_fixup): New functions.
8236 * amd64-linux-tdep.c: #include arch-utils.h.
8237 (amd64_linux_init_abi): Install displaced stepping support.
8238
8239 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
8240 Jerome Guitton <guitton@adacore.com>
8241
8242 * configure, config.in: Regenerated.
8243 * configure.ac: Add --with-system-gdbinit.
8244 * main.c (get_init_files): New.
8245 (captured_main): Use get_init_files. Load system gdbinit before
8246 $HOME/.gdbinit.
8247 (print_gdb_help): Print location of init files.
8248
8249 2009-01-28 Pedro Alves <pedro@codesourcery.com>
8250
8251 * corefile.c (generic_search): Delete disabled code.
8252 * gdbcore.h (generic_search): Delete declaration.
8253
8254 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8255
8256 * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
8257 parent to the child.
8258 * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
8259 * inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use
8260 remove_breakpoints to remove breakpoints from the parent.
8261
8262 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8263
8264 PR backtrace/9458, PR backtrace/8864:
8265 * frame.c (create_new_frame): Update the frame's cached PC before
8266 finding its unwinder. Use frame_id_build to build the new frame's
8267 id.
8268 * stack.c (parse_frame_specification_1): Correct setting ``addrs''
8269 array values from the ``args'' array values.
8270
8271 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8272
8273 * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
8274 (create_array_type, create_set_type, init_flags_type)
8275 (copy_type_recursive): Replace pairs of calls to XALLOC and memset
8276 with a call to XZALLOC or XCALLOC, and pairs of calls to
8277 obstack_alloc and memset with a call to OBSTACK_ZALLOC.
8278
8279 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8280
8281 Add "maint set|show internal-error|internal-warning quit|corefile
8282 ask|yes|no" commands.
8283
8284 PR gdb/7580:
8285 * utils.c (internal_problem_ask, internal_problem_yes)
8286 (internal_problem_no, internal_problem_modes): New.
8287 (struct internal_problem): Remove FIXME. Make should_quit and
8288 should_dump_core types to char *.
8289 (internal_vproblem, internal_error_problem)
8290 (internal_warning_problem): Adjust.
8291 (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
8292 functions.
8293 (add_internal_problem_command): New.
8294 (_initialize_utils): New.
8295
8296 2009-01-25 Pedro Alves <pedro@codesourcery.com>
8297
8298 * infcmd.c (program_info): Use paddress instead of casting stop_pc
8299 to unsigned long.
8300
8301 2009-01-24 Pedro Alves <pedro@codesourcery.com>
8302
8303 * infrun.c (normal_stop): Don't call
8304 deprecated_update_frame_pc_hack.
8305 * frame.c (deprecated_update_frame_pc_hack)
8306 (deprecated_update_frame_base_hack): Delete, and ...
8307 (create_new_frame): ... inline here.
8308 * frame.h (deprecated_update_frame_pc_hack)
8309 (deprecated_update_frame_base_hack): Delete declarations.
8310
8311 2009-01-23 Pedro Alves <pedro@codesourcery.com>
8312
8313 * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
8314 * cli/cli-setshow.c (do_setshow_command): Handle it.
8315 * command.h (enum var_types): Add var_zuinteger.
8316 (add_setshow_zuinteger_cmd): Declare.
8317
8318 * valprint.c (_initialize_valprint): Change the set input-radix
8319 and set output-radix commands to zuinteger type.
8320
8321 2009-01-23 Pedro Alves <pedro@codesourcery.com>
8322
8323 PR gdb/9664:
8324 * infrun.c (normal_stop): Tag threads as stopped, and run the
8325 hook-stop before printing the stack frame.
8326
8327 2009-01-22 Pedro Alves <pedro@codesourcery.com>
8328
8329 PR c++/9631:
8330 * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
8331 vbasetype.
8332
8333 2009-01-20 Kazu Hirata <kazu@codesourcery.com>
8334
8335 * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
8336 unsigned long.
8337
8338 2009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
8339
8340 PR gdb/9346
8341 * infcmd.c (signal_command): Do not specify a resume PC.
8342
8343 2009-01-19 Doug Evans <dje@google.com>
8344
8345 * dummy-frame.c (dummy_frame): Replace regcache member with
8346 caller_state.
8347 (dummy_frame_push): Replace caller_regcache arg with caller_state.
8348 All callers updated.
8349 (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
8350 (dummy_frame_pop): Rewrite. Verify requested frame is in the
8351 dummy frame stack. Restore program state.
8352 (cleanup_dummy_frames): Rewrite.
8353 (dummy_frame_sniffer): Update. Make static.
8354 * dummy-frame.h (regcache,frame_info): Delete forward decls.
8355 (inferior_thread_state): New forward decl.
8356 (dummy_frame_push): Update prototype.
8357 * frame.c (frame_pop): dummy_frame_pop now does all the work for
8358 DUMMY_FRAMEs.
8359 * infcall.c (breakpoint_auto_delete_contents): Delete.
8360 (get_function_name,run_inferior_call): New fns.
8361 (call_function_by_hand): Simplify by moving some code to
8362 get_function_name, run_inferior_call. Inferior function call wrapped
8363 in TRY_CATCH so there's less need for cleanups and all exits from
8364 proceed are handled similarily. Detect program exit.
8365 Detect program stopping in a different thread.
8366 Make error messages more consistent.
8367 * inferior.h (inferior_thread_state): Declare (opaque type).
8368 (save_inferior_thread_state,restore_inferior_thread_state,
8369 make_cleanup_restore_inferior_thread_state,
8370 discard_inferior_thread_state, get_inferior_thread_state_regcache):
8371 Declare.
8372 (save_inferior_status): Update prototype.
8373 * infrun.c: (normal_stop): When stopped for the completion of an
8374 inferior function call, verify the expected stack frame kind.
8375 (inferior_thread_state): New struct.
8376 (save_inferior_thread_state,restore_inferior_thread_state,
8377 do_restore_inferior_thread_state_cleanup,
8378 make_cleanup_restore_inferior_thread_state,
8379 discard_inferior_thread_state,
8380 get_inferior_thread_state_regcache): New functions.
8381 (inferior_status): Move stop_signal, stop_pc, registers to
8382 inferior_thread_state. Remove restore_stack_info.
8383 (save_inferior_status): Remove arg restore_stack_info.
8384 All callers updated. Remove saving of state now saved by
8385 save_inferior_thread_state.
8386 (restore_inferior_status): Remove restoration of state now done by
8387 restore_inferior_thread_state.
8388 (discard_inferior_status): Remove freeing of registers, now done by
8389 discard_inferior_thread_state.
8390
8391 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8392
8393 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
8394 at a time, times NUM_TO_SCROLL.
8395 * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
8396 fetch the selected frame if there is no stack.
8397
8398 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8399
8400 PR gdb/9747:
8401 * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
8402 Declare.
8403 * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
8404 * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
8405 is thrown while handling an event, finish the thread state.
8406 (normal_stop): Use finish_thread_state cleanup.
8407 * infcmd.c (run_command_1): If an error is thrown while starting
8408 the inferior, finish the thread state.
8409
8410 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8411
8412 * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
8413 skip breakpoints without a location (pending breakpoints).
8414
8415 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8416
8417 PR build/9186:
8418 * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
8419
8420 2009-01-18 Nick Roberts <nickrob@snap.net.nz>
8421
8422 * thread.c (thread_command): Move call to annotate_thread_changed
8423 to...
8424 (do_captured_thread_select): ... here, to avoid printing an
8425 annotation if the thread change generates an exception.
8426
8427 2009-01-16 Joel Brobecker <brobecker@adacore.com>
8428
8429 * NEWS: Document x86_64/MinGW as a new native configuration.
8430
8431 2009-01-16 Joel Brobecker <brobecker@adacore.com>
8432
8433 * NEWS: Move the documentation of "info os processes" to
8434 the appropriate section (documenting the new commands).
8435
8436 2009-01-15 Doug Evans <dje@google.com>
8437
8438 * target.h (target_signal_to_string): Make return type const char *.
8439 (target_signal_to_name): Ditto.
8440 (target_signal_from_name): Make arg const char *.
8441 * infrun.c (sig_print_info): Update.
8442 * signals/signals.c (signals): Make array and struct members const.
8443 (target_signal_to_string): Make return type const char *.
8444 (target_signal_to_name): Ditto.
8445 (target_signal_from_name): Make arg const char *.
8446
8447 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8448 Tristan Gingold <gingold@adacore.com>
8449
8450 * solist.h (struct target_so_ops): New member bfd_open.
8451 (solib_find): Add prototype.
8452 (solib_bfd_fopen): Add prototype.
8453 * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
8454 from solib_bfd_open.
8455 (solib_bfd_open): Use ops->bfd_open override if present. Call
8456 solib_find and solib_bfd_open otherwise.
8457
8458 * objfiles.h (OBJF_KEEPBFD): New define.
8459 * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
8460 objfile flag is set.
8461 * solib.c (symbol_add_stub): Do not allocate second BFD for
8462 shared library; use OBJF_KEEPBFD flag on solib objfile.
8463
8464 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8465
8466 * frame.c (get_frame_arch): Abort if called with NULL this_frame.
8467
8468 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8469
8470 * value.h (address_of_variable): Add prototype.
8471 (locate_var_value): Remove prototype.
8472
8473 * findvar.c (read_var_value): Do not attempt to default frame
8474 to selected frame.
8475 (locate_var_value): Remove function.
8476 * valops.c (value_of_variable): Retrieve selected frame for
8477 symbols that require a frame when called with NULL block.
8478 * valops.c (address_of_variable): New function.
8479
8480 * eval.c (evaluate_subexp_for_address): Call address_of_variable
8481 instead of calling locate_var_value.
8482 (evaluate_subexp_with_coercion): Likewise.
8483
8484 2009-01-14 Daniel Jacobowitz <dan@codesourcery.com>
8485
8486 * NEWS: Document "define" for prefixed commands.
8487 * cli/cli-cmds.c (show_user): Update calls to show_user_1. Call
8488 show_user_1 for prefix commands.
8489 * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
8490 * cli/cli-script.c (validate_comname): Rewrite to handle prefix
8491 commands. Return the containing command list.
8492 (define_command, document_command): Update to handle prefix commands.
8493 (show_user_1): Add prefix and name arguments. Handle prefix
8494 commands.
8495 * cli/cli-script.h (show_user_1): Update prototype.
8496
8497 2009-01-14 Kai Tietz <kai.tietz@onevision.com>
8498
8499 * ser-mingw.c (console_select_thread): Add return to make
8500 compiler happy.
8501 (pipe_select_thread): Likewise.
8502 (file_select_thread): Likewise.
8503
8504 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8505
8506 * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
8507 previous change.
8508
8509 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8510
8511 * remote.c (extended_remote_mourn_1): Invalidate our notion of
8512 current general thread.
8513
8514 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8515
8516 * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
8517 without a live selected thread.
8518
8519 2009-01-14 Joel Brobecker <brobecker@adacore.com>
8520
8521 Update the copyright notice of some of the files I missed
8522 in the previous copyright update.
8523
8524 2009-01-14 Joel Brobecker <brobecker@adacore.com>
8525
8526 * windows-nat.c (handle_unload_dll): Use %p to print the DLL
8527 base address instead of casting it to DWORD.
8528
8529 2009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
8530
8531 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
8532 for NULL frame pointers.
8533
8534 2009-01-13 Mark Kettenis <kettenis@gnu.org>
8535
8536 * utils.c (host_address_to_string): Reimplement in a way that
8537 avoids the cast of the address to long.
8538
8539 2009-01-13 Joel Brobecker <brobecker@adacore.com>
8540
8541 * mdebugread.c (parse_symbol): Save the symbol private data
8542 using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
8543 (psymtab_to_symtab_1): Likewise.
8544 (parse_procedure): Declare variable "e" only in the scope
8545 where it is used. Extract the symbol private data using
8546 SYMBOL_VALUE_BYTES.
8547
8548 2009-01-13 Jim Blandy <jimb@codesourcery.com>
8549
8550 Abstract out common code for copying value locations.
8551
8552 * value.h (set_value_component_location): New declaration.
8553 * value.c (set_value_component_location): New function.
8554 (value_primitive_field): Use it.
8555 * valarith.c (value_subscript, value_subscripted_rvalue): Same.
8556 * valops.c (search_struct_field, value_slice): Same.
8557 * ada-lang.c (coerce_unspec_val_to_type)
8558 (ada_value_primitive_packed_val): Same.
8559
8560 2009-01-13 Joel Brobecker <brobecker@adacore.com>
8561
8562 * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
8563
8564 2009-01-12 Christopher Faylor <me+cygwin@cgf.cx>
8565
8566 * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
8567 throughout.
8568 * i386-cygwin-tdep.c: Ditto.
8569 * i386-windows-nat.c: Ditto.
8570 * windows-nat.h: Ditto.
8571 * windows-tdep.c: Ditto.
8572 * windows-tdep.h: Ditto.
8573 * windows-nat.c: Ditto.
8574 (cygwin_load_start): Redefine as CORE_ADDR.
8575 (cygwin_load_end): Ditto.
8576 (windows_make_so): Coerce result of address arithmetic to uintptr_t
8577 before coercing to CORE_ADDR to avoid a compiler warning.
8578 (handle_exception): Define addr as CORE_ADDR and coerce
8579 ExceptionAddress to uintptr_t before assigining to avoid a compiler
8580 warning.
8581 * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
8582 files.
8583
8584 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
8585
8586 Fix linking with --enable-targets=all:
8587 * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
8588 (HFILES_NO_SRCDIR): Add windows-tdep.h.
8589 (ALLDEPFILES): Add windows-tdep.c.
8590
8591 2009-01-11 Chris Faylor <me.gdb@cgf.cx>
8592
8593 * win32-nat.h: Delete.
8594 * windows-nat.h: Rename from win32-nat.h.
8595 * win32-nat.c: Delete.
8596 * windows-nat.c: Rename from win32-nat.c.
8597 * win32-termcap.c: Delete.
8598 * windows-termcap.c: Rename from win32-termcap.c.
8599 * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
8600 * configure.ac: Handle rename from win32-termcap.c ->
8601 windows-termcap.c.
8602 * configure: Regenerate.
8603 * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
8604 -> windows-termcap.c.
8605 * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
8606 windows-tdep.h.
8607 * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
8608 * windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
8609 windows-tdep.h.
8610 (win32_make_so): Handle cygwin compiler warning due to change of
8611 load_addr from DWORD to LPVOID.
8612 (handle_load_dll): Use %p in format string to properly print address
8613 and avoid a compiler warning.
8614 (DEBUG_EXCEPTION_SIMPLE): Ditto.
8615 (handle_exception): Ditto.
8616 * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
8617 * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
8618 windows-nat.o.
8619 * config/i386/mingw.mh: Ditto.
8620 * config/i386/mingw64.mh: Ditto.
8621
8622 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
8623
8624 * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
8625 arrayprint_recurse_level to a parameter. Update all the callers. New
8626 comment at autovariables.
8627
8628 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
8629
8630 * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
8631 coding style.
8632
8633 2009-01-11 Joel Brobecker <brobecker@adacore.com>
8634
8635 * target.c (target_xfer_partial): Use host_address_to_string to
8636 print the address of readbuf and writebuf. Cast the address of
8637 elements inside the myaddr buffer into intptr_t.
8638 (deprecated_debug_xfer_memory): Use paddress to print memaddr.
8639 Cast the address of elements inside the myaddr buffer into
8640 intptr_t.
8641
8642 2009-01-11 Joel Brobecker <brobecker@adacore.com>
8643
8644 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
8645 * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
8646 * configure.host, configure.tgt: Add handling for x86_64/windows.
8647 * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
8648 and amd64-windows-tdep.c.
8649
8650 2009-01-11 Joel Brobecker <brobecker@adacore.com>
8651
8652 * win32-tdep.h, win32-tdep.c: New files.
8653 * i386-cygwin-tdep.h: Delete.
8654 * i386-cygwin-tdep.c: Include win32-tdep.h instead of
8655 i386-cygwin-tdep.h.
8656 (win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
8657 * win32-nat.c: Likewise.
8658 * configure.tgt: Add win32-tdep.o to the list of target object
8659 files for i386-cygwin and i386-mingw targets.
8660
8661 2009-01-11 Joel Brobecker <brobecker@adacore.com>
8662
8663 * win32-nat.h: New file.
8664 * win32-nat.c (mappings): Initialize to NULL.
8665 (win32_set_context_register_offsets): New function.
8666 * i386-windows-nat.c: New file.
8667 (mappings): Moved here from win32-nat.c.
8668 (_initialize_i386_windows_nat): New function.
8669 * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
8670 * config/i386/cygwin.mh (NATDEPFILES): Likewise.
8671
8672 2009-01-09 Andreas Schwab <schwab@suse.de>
8673
8674 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
8675
8676 2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8677
8678 * gdbtypes.c (append_composite_type_field): Correct the location of
8679 appended fields.
8680
8681 2009-01-09 Pedro Alves <pedro@codesourcery.com>
8682
8683 * defs.h (deprecated_error_hook): Delete declaration.
8684 * interps.c (clear_interpreter_hooks): Adjust.
8685 * remote-sim.c (gdb_os_error): Don't try to call
8686 deprecated_error_hook. No need to call exit anymore.
8687 * top.c (deprecated_error_hook): Delete.
8688
8689 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8690
8691 * arch-utils.c (gdbarch_update_p): Use host_address_to_string
8692 to print the address of the gdbarch pointer.
8693
8694 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8695
8696 * gdbarch.sh: Fix all the compilation errors on amd64-windows
8697 due to casting a pointer to a long when printing a function
8698 address. Instead, use host_address_to_string to convert our
8699 address to a string.
8700 * gdbarch.c: Regenerate.
8701
8702 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8703
8704 * event-top.c (async_disconnect, async_stop_sig): use "raise"
8705 instead of "kill" to raise a signal.
8706
8707 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8708
8709 * win32-nat.c (get_module_name): Change the type of parameter
8710 "base_address" to LPVOID. Remove unnecessary cast.
8711 (struct lm_info): Change type of load_addr to LPVOID.
8712 (win32_make_so): Change the type of parameter "load_addr"
8713 to LPVOID. Remove some unnecessary casts.
8714 (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
8715 (win32_xfer_shared_libraries): Add missing cast.
8716
8717 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8718
8719 * win32-nat.c (has_detach_ability, set_process_privilege):
8720 Cast the result of GetProcAddress to (void *) to avoid
8721 a compilation warning.
8722
8723 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8724
8725 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
8726 already defined.
8727
8728 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8729
8730 * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
8731 definition of local variable "done".
8732 (info_w32_command, handle_exception): Remove unnecessary cast.
8733
8734 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8735
8736 * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
8737 DebugSetProcessKillOnExit. Update all uses in this file.
8738 (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
8739 Update all uses in this file.
8740
8741 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8742
8743 * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
8744 and use it when pushing the target.
8745 (win32_attach, win32_create_inferior): Update call to
8746 do_initial_win32_stuff.
8747 (win32_detach, win32_mourn_inferior): Use our ops parameter
8748 instead of the global win32_ops to unpush the target.
8749
8750 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8751
8752 * ser-mingw.c (ser_windows_open): Use proper type when casting
8753 in call to _open_osfhandle.
8754
8755 2009-01-09 Kai Tietz <kai.tietz@onevision.com>
8756
8757 * coff-pe-read.c (read_pe_exported_syms): Fix typo.
8758
8759 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8760
8761 * CONTRIBUTE: Minor reformatting.
8762
8763 2009-01-08 Kai Tietz <kai.tietz@onevision.com>
8764
8765 * MAINTAINERS: Add myself to Write After Approval.
8766 * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
8767 export directory.
8768
8769 2009-01-08 Nathan Froyd <froydnj@codesourcery.com>
8770
8771 * remote-sim.c (gdb_os_error): Mark as a noreturn function.
8772 Call exit to make it obvious to GCC.
8773
8774 2009-01-08 Tom Tromey <tromey@redhat.com>
8775
8776 PR breakpoints/9350:
8777 * varobj.c (varobj_invalidate): Unconditionally free
8778 all_rootvarobj.
8779 * symfile.c (syms_from_objfile): Free local_addr when returning
8780 normally.
8781 * exec.c (exec_file_attach): Do cleanups before returning.
8782 (exec_file_command): Likewise.
8783 * corefile.c (reopen_exec_file): Do cleanups before returning.
8784 * breakpoint.c (insert_breakpoint_locations): Do cleanups before
8785 returning.
8786 (do_vec_free): New function.
8787 (update_global_location_list): Make a cleanup for old_locations.
8788 Do cleanups before returning. Remove unused variable 'e'.
8789 (find_condition_and_thread): Free result of parsing the
8790 expression.
8791 (print_it_typical): Do cleanups before returning.
8792 (breakpoint_re_set_one): Always free sals.sals.
8793
8794 2009-01-08 Joel Brobecker <brobecker@adacore.com>
8795 Emi Suzuki <emi-suzuki@tjsys.co.jp>
8796
8797 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
8798 watchpoints.
8799
8800 2009-01-07 Doug Evans <dje@google.com>
8801
8802 * top.c (gdb_prompt_string): Delete, unused.
8803
8804 2009-01-07 Pedro Alves <pedro@codesourcery.com>
8805
8806 Delete ONE_PROCESS_WRITETEXT leftovers.
8807
8808 * breakpoint.c (insert_bp_location): Delete process_warning
8809 argument. Adjust.
8810 (insert_breakpoint_locations): Adjust.
8811 (reattach_breakpoints): Adjust.
8812 * infrun.c (normal_stop): Drop "It might be running in another
8813 process" notice.
8814
8815 2009-01-07 Stan Shebs <stan@codesourcery.com>
8816
8817 * config/pa/linux.mh (XDEPFILES): Remove.
8818
8819 2009-01-07 Doug Evans <dje@google.com>
8820
8821 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
8822
8823 2009-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8824
8825 * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
8826 spacing, a regression from 2008-04-22.
8827
8828 2009-01-07 Joel Brobecker <brobecker@adacore.com>
8829
8830 * utils.c (gdb_print_host_address): Adjust implementation to
8831 reuse host_address_to_string. Move comment explaining the conversion
8832 from host address to string from here...
8833 (host_address_to_string): ... to there.
8834
8835 2009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
8836
8837 * MAINTAINERS: Add myself for write after approval privileges.
8838
8839 2009-01-06 Tom Tromey <tromey@redhat.com>
8840
8841 * value.c (set_internalvar): Use value_free, not xfree.
8842
8843 2009-01-06 Jim Blandy <jimb@red-bean.com>
8844
8845 Check return values of functions declared with warn_unused_result
8846 attribute in GLIBC 2.8.
8847 * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
8848 * inflow.c (check_syscall): New function.
8849 (new_tty): Use check_syscall to check return values from open and dup.
8850 * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
8851 * main.c (captured_main): Call cwd after setting up gdb_stderr;
8852 check for errors from getcwd.
8853 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
8854 * ui-file.c (stdio_file_write): Ignore return value from fwrite.
8855 (stdio_file_fputs): Same.
8856 * utils.c (internal_vproblem): abort if last-ditch error message
8857 write fails.
8858
8859 * top.c (gdb_init): Don't set the current directory here; that's
8860 already been done in captured_main.
8861
8862 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
8863
8864 * ser-tcp.c: Adjust includes.
8865 (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
8866 (tcp_auto_retry, tcp_retry_limit): Declare.
8867 (TIMEOUT): Remove, in favor of tcp_retry_limit.
8868 (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
8869 (wait_for_connect): New function.
8870 (net_open): Use it. Add auto-retry logic.
8871 (set_tcp_cmd, show_tcp_cmd): New functions.
8872 (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
8873 and "set/show tcp connect-timeout" commands.
8874 * NEWS: Document new commands.
8875
8876 2009-01-05 Tom Tromey <tromey@redhat.com>
8877
8878 * python/python-internal.h (Py_ssize_t): Define as int.
8879
8880 2009-01-05 Jim Blandy <jimb@red-bean.com>
8881
8882 * MAINTAINERS: Fix my e-mail address as steering committee member.
8883
8884 2009-01-03 Joel Brobecker <brobecker@adacore.com>
8885
8886 Updated copyright notices for most files.
8887
8888 2009-01-03 Joel Brobecker <brobecker@adacore.com>
8889
8890 * top.c (print_gdb_version): Update copyright year.
8891
8892 2009-01-03 Joel Brobecker <brobecker@adacore.com>
8893
8894 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
8895
8896 2009-01-01 Pedro Alves <pedro@codesourcery.com>
8897
8898 PR breakpoints/9681:
8899 * exceptions.h (enum errors): New error type, MEMORY_ERROR.
8900 * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
8901 * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
8902 retrow all other exceptions.
8903
8904 For older changes see ChangeLog-2008.
8905 \f
8906 Local Variables:
8907 mode: change-log
8908 left-margin: 8
8909 fill-column: 74
8910 version-control: never
8911 coding: utf-8
8912 End:
This page took 0.200201 seconds and 3 git commands to generate.