gdb
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2008-10-28 Tom Tromey <tromey@redhat.com>
2
3 * varobj.c (value_get_print_value): Include valprint.h.
4 (value_get_print_value): Use get_formatted_print_options.
5 * value.h (struct value_print_options): Declare.
6 (value_print, val_print, common_val_print, val_print_string):
7 Update.
8 * value.c: Include valprint.h.
9 (show_values): Use get_user_print_options.
10 (show_convenience): Likewise.
11 * valprint.h (prettyprint_arrays, prettyprint_structs): Don't
12 declare.
13 (struct value_print_options): New type.
14 (vtblprint, unionprint, addressprint, objectprint, print_max,
15 inspect_it, repeat_count_threshold, output_format,
16 stop_print_at_null): Don't declare.
17 (user_print_options, get_user_print_options,
18 get_raw_print_options, get_formatted_print_options): Declare.
19 (print_array_indexes_p): Don't declare.
20 (maybe_print_array_index, val_print_array_elements): Update.
21 * valprint.c (print_max): Remove.
22 (user_print_options): New global.
23 (get_user_print_options, get_raw_print_options,
24 get_formatted_print_options): New functions.
25 (print_array_indexes, repeat_count_threshold, stop_print_at_null,
26 prettyprint_structs, prettyprint_arrays, unionprint,
27 addressprint): Remove.
28 (val_print): Remove format, deref_ref, pretty arguments; add
29 options. Update.
30 (common_val_print): Likewise.
31 (print_array_indexes_p): Remove.
32 (maybe_print_array_index): Remove format, pretty arguments; add
33 options. Update.
34 (val_print_array_elements): Remove format, deref_ref, pretty
35 arguments; add options. Update.
36 (val_print_string): Add options argument. Update.
37 (_initialize_valprint): Use user_print_options.
38 (output_format): Remove.
39 (set_output_radix_1): Use user_print_options.
40 * typeprint.c: Include valprint.h.
41 (objectprint): Don't declare.
42 (whatis_exp): Use get_user_print_options.
43 * tui/tui-regs.c: Include valprint.h.
44 (tui_register_format): Use get_formatted_print_options.
45 * tracepoint.c: Include valprint.h.
46 (addressprint): Don't declare.
47 (trace_mention): Use get_user_print_options.
48 (tracepoints_info): Likewise.
49 * stack.c (print_frame_args): Use get_raw_print_options.
50 (print_frame_info): Use get_user_print_options.
51 (print_frame): Likewise.
52 * sh64-tdep.c: Include valprint.h
53 (sh64_do_register): Use get_formatted_print_options.
54 * scm-valprint.c (scm_inferior_print): Remove format, deref_ref,
55 pretty arguments; add options.
56 (scm_scmlist_print): Likewise. Update.
57 (scm_scmval_print): Likewise.
58 (scm_val_print): Likewise.
59 (scm_value_print): Remove format, pretty arguments; add options.
60 Update.
61 * scm-lang.h (scm_value_print, scm_val_print, scm_scmval_print):
62 Update.
63 * scm-lang.c (scm_printstr): Add options argument.
64 * python/python-value.c: Include valprint.h.
65 (valpy_str): Use get_user_print_options.
66 * printcmd.c: Include valprint.h.
67 (addressprint): Don't declare.
68 (inspect_it): Remove.
69 (print_formatted): Remove format option; add options. Update.
70 (print_scalar_formatted): Likewise.
71 (print_address_demangle): Use get_user_print_options.
72 (do_examine): Use get_formatted_print_options.
73 (print_command_1): Likewise.
74 (output_command): Use get_formatted_print_options.
75 (do_one_display): Likewise.
76 (print_variable_value): Use get_user_print_options.
77 * p-valprint.c (pascal_val_print): Remove format, deref_ref,
78 pretty arguments; add options. Update.
79 (pascal_value_print): Remove format, pretty arguments; add
80 options. Update.
81 (vtblprint, objectprint): Don't declare.
82 (pascal_static_field_print): Remove.
83 (pascal_object_print_value_fields): Remove format, pretty
84 arguments; add options. Update.
85 (pascal_object_print_static_field): Likewise.
86 (_initialize_pascal_valprint): Use user_print_options. Update.
87 * p-lang.h (pascal_val_print, pascal_value_print,
88 pascal_printstr, pascal_object_print_value_fields): Update.
89 (vtblprint, static_field_print): Don't declare.
90 * p-lang.c (pascal_printstr): Add options argument. Update.
91 * objc-lang.c (objc_printstr): Add options argument. Update.
92 * mt-tdep.c: Include valprint.h.
93 (mt_registers_info): Use get_raw_print_options.
94 * mips-tdep.c: Include valprint.h.
95 (mips_print_fp_register): Use get_formatted_print_options.
96 (mips_print_register): Likewise.
97 * mi/mi-main.c: Include valprint.h.
98 (get_register): Use get_user_print_options.
99 (mi_cmd_data_evaluate_expression): Likewise.
100 (mi_cmd_data_read_memory): Use get_formatted_print_options.
101 * mi/mi-cmd-stack.c: Include valprint.h.
102 (list_args_or_locals): Use get_raw_print_options.
103 * m2-valprint.c (print_function_pointer_address): Add addressprint
104 argument.
105 (m2_print_long_set): Remove format, pretty arguments.
106 (m2_print_unbounded_array): Remove format, deref_ref, pretty
107 arguments; add options. Update.
108 (print_unpacked_pointer): Remove format argument; add options.
109 Now static. Update.
110 (print_variable_at_address): Remove format, deref_ref, pretty
111 arguments; add options. Update.
112 (m2_print_array_contents): Likewise.
113 (m2_val_print): Likewise.
114 * m2-lang.h (m2_val_print): Update.
115 * m2-lang.c (m2_printstr): Add options argument. Update.
116 * language.h (struct value_print_options): Declare.
117 (struct language_defn) <la_printstr>: Add options argument.
118 <la_val_print>: Remove format, deref_ref, pretty argument; add
119 options.
120 <la_value_print>: Remove format, pretty arguments; add options.
121 <la_print_array_index>: Likewise.
122 (LA_VAL_PRINT, LA_VALUE_PRINT, LA_PRINT_STRING,
123 LA_PRINT_ARRAY_INDEX): Update.
124 (default_print_array_index): Update.
125 * language.c (default_print_array_index): Remove format, pretty
126 arguments; add options. Update.
127 (unk_lang_printstr): Add options argument.
128 (unk_lang_val_print): Remove format, deref_ref, pretty arguments;
129 add options.
130 (unk_lang_value_print): Remove format, pretty arguments; add
131 options.
132 * jv-valprint.c (java_value_print): Remove format, pretty
133 arguments; add options. Update.
134 (java_print_value_fields): Likewise.
135 (java_val_print): Remove format, deref_ref, pretty arguments; add
136 options. Update.
137 * jv-lang.h (java_val_print, java_value_print): Declare.
138 * infcmd.c: Include valprint.h.
139 (print_return_value): Use get_raw_print_options.
140 (default_print_registers_info): Use get_user_print_options,
141 get_formatted_print_options.
142 (registers_info): Use get_formatted_print_options.
143 * gdbtypes.h (struct value_print_options): Declare.
144 (print_scalar_formatted): Update.
145 * f-valprint.c (f77_print_array_1): Remove format, deref_ref,
146 pretty arguments; add options. Update.
147 (f77_print_array): Likewise.
148 (f_val_print): Likewise.
149 * f-lang.h (f_val_print): Update.
150 * f-lang.c (f_printstr): Add options argument. Update.
151 (c_value_print): Update declaration.
152 * expprint.c: Include valprint.h.
153 (print_subexp_standard): Use get_raw_print_options,
154 get_user_print_options.
155 * eval.c: Include valprint.h.
156 (objectprint): Don't declare.
157 (evaluate_subexp_standard): Use get_user_print_options.
158 * cp-valprint.c (vtblprint, objectprint, static_field_print):
159 Remove.
160 (cp_print_value_fields): Remove format, pretty arguments; add
161 options. Update.
162 (cp_print_value): Likewise.
163 (cp_print_static_field): Likewise.
164 (_initialize_cp_valprint): Use user_print_options. Update.
165 * c-valprint.c (print_function_pointer_address): Add addressprint
166 argument.
167 (c_val_print): Remove format, deref_ref, pretty arguments; add
168 options. Update.
169 (c_value_print): Add options argument. Update.
170 * c-lang.h (c_val_print, c_value_print, c_printstr): Update.
171 (vtblprint, static_field_print): Don't declare.
172 (cp_print_value_fields): Update.
173 * c-lang.c (c_printstr): Add options argument. Update.
174 * breakpoint.c: Include valprint.h.
175 (addressprint): Don't declare.
176 (watchpoint_value_print): Use get_user_print_options.
177 (print_one_breakpoint_location): Likewise.
178 (breakpoint_1, print_it_catch_fork, print_it_catch_vfork, mention,
179 print_exception_catchpoint): Likewise.
180 * auxv.c (fprint_target_auxv): Don't declare addressprint. Use
181 get_user_print_options.
182 * ada-valprint.c (struct ada_val_print_args): Remove format,
183 deref_ref, and pretty; add options.
184 (print_optional_low_bound): Add options argument.
185 (val_print_packed_array_elements): Remove format and pretty
186 arguments; add options. Update.
187 (printstr): Add options argument. Update.
188 (ada_printstr): Likewise.
189 (ada_val_print): Remove format, deref_ref, pretty arguments; add
190 options argument. Update.
191 (ada_val_print_stub): Update.
192 (ada_val_print_array): Remove format, deref_ref, pretty arguments;
193 add options. Update.
194 (ada_val_print_1): Likewise.
195 (print_variant_part): Likewise.
196 (ada_value_print): Remove format, pretty arguments; add options.
197 Update.
198 (print_record): Likewise.
199 (print_field_values): Likewise.
200 * ada-lang.h (ada_val_print, ada_value_print, ada_printstr):
201 Update.
202 * ada-lang.c (ada_print_array_index): Add options argument; remove
203 format and pretty arguments.
204 (print_one_exception): Use get_user_print_options.
205
206 2008-10-28 Tom Tromey <tromey@redhat.com>
207
208 * cli/cli-script.c (do_fclose_cleanup): Remove.
209 (script_from_file): Use make_cleanup_fclose.
210 * xml-tdesc.c (do_cleanup_fclose): Remove.
211 (fetch_xml_from_file): Use make_cleanup_fclose.
212 * tracepoint.c (tracepoint_save_command): Use
213 make_cleanup_fclose. Always free pathname.
214 * source.c (print_source_lines_base): Use make_cleanup_fclose.
215 * remote.c (fclose_cleanup): Remove.
216 (remote_file_put): Use make_cleanup_fclose.
217 (remote_file_get): Likewise.
218 * linux-nat.c (linux_nat_find_memory_regions): Use
219 make_cleanup_fclose.
220 (linux_nat_info_proc_cmd): Likewise.
221 (linux_proc_pending_signals): Likewise.
222 * fbsd-nat.c (fbsd_find_memory_regions): Use make_cleanup_fclose.
223 Free file name.
224 * cli/cli-dump.c (do_fclose_cleanup): Remove.
225 (make_cleanup_fclose): Remove.
226 * defs.h (make_cleanup_fclose): Declare.
227 * utils.c (do_fclose_cleanup): New function.
228 (make_cleanup_fclose): Likewise.
229
230 2008-10-27 Pedro Alves <pedro@codesourcery.com>
231
232 * inflow.c (kill_command): If the target claims there is still
233 execution, don't clear the thread list.
234
235 2008-10-27 Pedro Alves <pedro@codesourcery.com>
236
237 * cp-name-parser.y: Include defs.h instead of config.h.
238 (parse_escape): Rename to ...
239 (cp_parse_escape): ... this.
240 (yylex): Update.
241 (xfree) [TEST_CPNAMES]: New.
242
243 2008-10-27 Pedro Alves <pedro@codesourcery.com>
244
245 * CONTRIBUTE: Mention autoconf 2.59 and configure.ac instead of
246 2.13 and configure.in.
247
248 2008-10-27 Pedro Alves <pedro@codesourcery.com>
249
250 * target.h (struct target_ops) <to_supports_multi_process>: New
251 field.
252 (target_supports_multi_process): New define.
253 * target.c (update_current_target): Inherit and de_fault
254 to_supports_multi_process.
255 * infcmd.c (attach_command): Allow attaching to multiple processes
256 if the target supports it.
257 (detach_command): If the target claims there is still execution,
258 don't clear the thread list.
259 * remote.c (remote_supports_multi_process): New.
260 (init_remote_ops): Register remote_supports_multi_process.
261
262 2008-10-27 Pedro Alves <pedro@codesourcery.com>
263
264 * Makefile.in (.y.c, .l.c): sed free to xfree.
265
266 2008-10-27 Pedro Alves <pedro@codesourcery.com>
267
268 * Makefile.in (INSTALLED_LIBS, CLIBS): Remove reference to
269 $(TM_CLIBS).
270 (CDEPS): Remove reference to $(TM_CDEPS).
271
272 2008-10-26 Michael Snyder <msnyder@vmware.com>
273
274 * infrun.c (handle_inferior_event): Handle dynamic symbol
275 resolution in reverse.
276
277 2008-10-25 Joel Brobecker <brobecker@adacore.com>
278
279 * infrun.c: Minor comment reformatting.
280
281 2008-10-25 Pedro Alves <pedro@codesourcery.com>
282
283 * ada-exp.y (write_object_renaming): Use malloc instead of
284 xmalloc.
285 * p-exp.y (pop_current_type): Use free instead of xfree.
286
287 2008-10-24 Pedro Alves <pedro@codesourcery.com>
288
289 * fork-child.c (startup_inferior): Only set threads not-executing
290 after getting all the pending execs. On TARGET_WAITKIND_IGNORE,
291 keep waiting, don't resume. On all other cases but
292 TARGET_WAITKIND_SIGNALLED and TARGET_WAITKIND_EXITED, switch to
293 the event ptid.
294
295 2008-10-24 Pedro Alves <pedro@codesourcery.com>
296
297 Remote non-stop mode support.
298
299 * remote.c (pending_stop_reply): New.
300 (struct remote_state) <non_stop_aware, support_vCont_t>: New
301 fields.
302 (remote_async_inferior_event_token)
303 (remote_async_get_pending_events_token): New.
304 (notice_new_inferiors): New, abstracted out from record_currthread.
305 (record_currthread): Call it.
306 (remote_threads_info): Default threads to running in non-stop
307 mode. In non-stop mode, only qfThreadInfo is supported.
308 (remote_close): Discard all pending stop_replies. Close the event
309 sources.
310 (set_stop_requested_callback): New.
311 (remote_start_remote): Implement non-stop mode startup. In
312 all-stop, don't clear the thread list here.
313 (remote_non_stop_feature): New.
314 (remote_protocol_features): Add a "QNonStop" feature.
315 (remote_open_1): Clear cached_wait_status and non_stop_aware.
316 Clear the thread list here.
317 (remote_detach_1): Discard pending stop replies of the process we
318 detached from.
319 (extended_remote_attach_1): Implement non-stop mode.
320 (remote_vcont_probe): Recognize `vCont;t'.
321 (remote_vcont_resume): Implement non-stop mode.
322 (remote_resume): Don't set waiting_for_stop_reply in non-stop
323 mode.
324 (remote_stop_ns): New.
325 (remote_stop): Rename to ...
326 (remote_stop_as): ... this. If we have a cached wait status,
327 don't bother interrupting the remote.
328 (remote_stop): Reimplement as wrapper around remote_stop_as and
329 remote_stop_ns.
330 (interrupt_query): Don't query in async mode.
331 (struct cached_reg, cahed_reg_t): New.
332 (struct stop_reply): New.
333 (stop_reply_queue): New.
334 (stop_reply_xmalloc, stop_reply_xfree)
335 (discard_pending_stop_replies, do_stop_reply_xfree)
336 (queued_stop_reply, push_stop_reply, peek_stop_reply)
337 (remote_parse_stop_reply, remote_get_pending_stop_replies)
338 (process_stop_reply): New.
339 (remote_wait_ns): New.
340 (remote_wait_as): Use remote_parse_stop_reply. Invalidate the
341 notion of current general thread is a process exit was reported.
342 (remote_wait): Call remote_wait_ns in non-stop mode.
343 (handle_notification): New.
344 (putpkt_binary): Handle notifications. Don't care for
345 waiting_for_stop_reply in non-stop mode.
346 (getpkt_sane): Rename to ...
347 (getpkt_or_notif_sane_1): ... this. Add `expecting_notif'
348 argument. Handle it. Handle notifications.
349 (getpkt_sane): Reimplement as wrapper around getpkt_or_notif_sane_1.
350 (getpkt_or_notif_sane): New.
351 (select_new_thread_callback): Check for exited state instead of
352 comparing the ptid against minus_one_ptid.
353 (extended_remote_create_inferior_1): Query the remote about the
354 current thread.
355 (remote_supports_non_stop): New.
356 (init_remote_ops): Register it.
357 (remote_async_inferior_event_handler): New.
358 (remote_async_get_pending_events_handler): New.
359
360 * infcmd.c (proceed_thread_callback): Comment.
361 (proceed_after_attach_callback, proceed_after_attach): New.
362 (attach_command_post_wait): In background attach, resume all
363 threads, but only if they are unsignalled, and not explicitly
364 stopped. In foreground attach, in non-stop mode, make sure to
365 stop all threads of the just attached to process.
366 (attach_command): In non-stop mode: If doing a background attach,
367 stop at least one thread. If a foreground attach, stop all
368 threads.
369
370 2008-10-24 Pedro Alves <pedro@codesourcery.com>
371
372 * event-loop.h: Mention async_event_handlers.
373 (async_event_handler): Forward declare.
374 (async_event_handler_func): New typedef.
375 (create_async_event_handler, delete_async_event_handler)
376 (mark_async_event_handler): Declare.
377 * event-loop.c (event_data): New.
378 (event_handler_func): Take an event_data instead of an integer.
379 (struct gdb_event): Replace the integer file descriptor by a
380 generic event_data.
381 (async_event_handler): New.
382 (async_handler_ready): Delete.
383 (async_event_handler_list): New.
384 (create_event): New.
385 (create_file_event): Use it.
386 (process_event): Adjust.
387 (gdb_do_one_event): Poll from the event sources in round-robin
388 fashion across calls. Be sure to consult all sources before
389 blocking.
390 (handle_file_event): Take an event_data instead of an integer.
391 Adjust.
392 (gdb_wait_for_event): Add `block' argument. Handle it.
393 (mark_async_signal_handler): Remove unneeded cast.
394 (invoke_async_signal_handler): Rename to ...
395 (invoke_async_signal_handlres): ... this. Return true if any was
396 handled.
397 (check_async_ready): Delete
398 (create_async_event_handler): New.
399 (mark_async_event_handler): New.
400 (struct async_event_handler_data): New.
401 (invoke_async_event_handler): New.
402 (check_async_event_handlers): New.
403 (delete_async_event_handler): New.
404 (handle_timer_event): Adjust.
405
406 2008-10-24 Doug Evans <dje@google.com>
407
408 * dwarf2read.c (typename_concat): Don't segv if prefix or suffix
409 is NULL. Simplify obs == NULL case.
410
411 2008-10-24 Hui Zhu <teawater@gmail.com>
412 Pedro Alves <pedro@codesourcery.com>
413
414 * infrun.c (can_use_displaced_stepping): Change type to
415 const char pointer.
416 (can_use_displaced_stepping_auto): New string.
417 (can_use_displaced_stepping_on): New string.
418 (can_use_displaced_stepping_off): New string.
419 (can_use_displaced_stepping_enum): New array.
420 (show_can_use_displaced_stepping): In auto mode, also show
421 the current effect of the option.
422 (use_displaced_stepping): Return non-zero if displaced
423 stepping is auto, and can be used with GDBARCH, and in
424 non-stop mode. Return non-zero if displaced stepping is on,
425 and can be used with GDBARCH. Return zero otherwise.
426 (_initialize_infrun): Make the "set displaced-stepping"
427 command an enum command. Change its class to class_run.
428 Place it in the top level set list. Extend help to describe
429 the auto mode.
430
431 2008-10-23 Pedro Alves <pedro@codesourcery.com>
432
433 * defs.h: Mention ptid_is_pid.
434 * inferior.h (ptid_is_pid): Declare.
435 * gdbthread.h (struct thread_info) <stop_requested>: New field.
436 (set_stop_requested): Declare.
437 * infcmd.c (interrupt_target_1): Call set_stop_requested.
438 * infrun.c (clear_proceed_status): Clear stop_requested.
439 (infrun_thread_stop_requested_callback,
440 infrun_thread_stop_requested): New.
441 (handle_inferior_event): If a TARGET_SIGNAL_TRAP is reported on a
442 thread that had an explicit stop request, pretend we got a
443 TARGET_SIGNAL_0. Always stop if the thread had an explicit stop
444 request.
445 (print_stop_reason): In the SIGNAL_RECEIVED case, if we're not
446 outputting to MI, and we got a TARGET_SIGNAL_0, print "# Stopped",
447 instead of mentioning signal 0.
448 (ptid_is_pid): New.
449 * thread.c (set_stop_requested): New.
450
451 * linux-nat.c (queued_waitpid): Rename to ...
452 (queued_waitpid_1): ... this. Add `peek' argument. Handle it.
453 (queued_waitpid): New, as wrapper to queued_waitpid_1.
454 (push_waitpid): Push the SIGTRAP to the local event queue, to the
455 kernel's.
456 (send_sigint_callback): Delete.
457 (linux_nat_stop_lwp): New.
458 (linux_nat_stop): Use it.
459
460 2008-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
461
462 * python/python-value (valpy_getitem): Fix heap corruption.
463
464 2008-10-23 Aleksandar Ristovski <aristovski@qnx.com>
465
466 * nto-procfs.c (do_attach): Form proper ptid including pid and tid.
467 (procfs_create_inferior): Fetch list of threads.
468
469 2008-10-23 Aleksandar Ristovski <aristovski@qnx.com>
470
471 * nto-procfs.c (procfs_files_info): Fix a typo.
472 (procfs_create_inferior): Make attach_flag per-inferior.
473
474 2008-10-23 Tom Tromey <tromey@redhat.com>
475
476 * python/python-value.c (value_to_value_object): Initialize
477 owned_by_gdb field.
478 (valpy_new): Likewise.
479
480 2008-10-23 Jan Kratochvil <jan.kratochvil@redhat.com>
481 Joel Brobecker <brobecker@adacore.com>
482
483 * ada-tasks.c (task_states, long_task_states): Use constant N_()
484 initializer. Define the strings as const.
485 (short_task_info, info_task): Translate the strings above.
486
487 2008-10-22 Joel Brobecker <brobecker@adacore.com>
488
489 * NEWS: Add entry for new feature (Ada tasking support).
490
491 2008-10-22 Joel Brobecker <brobecker@adacore.com>
492
493 * configure.ac: On alpha-osf, error out if enable_tui is set to
494 "yes", and set enable_tui to "no" if previously set to "auto".
495 Check for waddstr only if TUI support was requested. Move the
496 part of the configure script that updates various Makefile
497 variables up, together with the check for waddstr.
498 * configure: Regenerate.
499
500 2008-10-22 Joel brobecker <brobecker@adacore.com>
501
502 * gdbtypes.c (copy_type): New function.
503 * gdbtypes.h (copy_type): Add declaration.
504 * ada-lang.c (ada_to_fixed_type_1): If there is a parallel XVZ
505 variable, then use it.
506
507 2008-10-22 Joel Brobecker <brobecker@adacore.com>
508
509 * target.h (struct target_ops): Add new field to_get_ada_task_ptid.
510 (target_get_ada_task_ptid): New macro.
511 * target.c (default_get_ada_task_ptid): New function.
512 (update_current_target): Inherit field default_get_ada_task_ptid.
513 (update_current_target): Make default_get_ada_task_ptid the default
514 value for field to_get_ada_task_ptid.
515 * ada-lang.h (struct task_control_block): Delete. Never used.
516 (struct task_ptid, task_ptid_t, struct task_entry, task_list):
517 Likewise.
518 (struct ada_task_info): New.
519 (ada_task_is_alive, ada_find_printable_frame)
520 (ada_task_list_iterator_ftype, iterate_over_live_ada_tasks): Add
521 declarations.
522 (ada_build_task_list): Update prototype.
523 (init_task_list, ada_is_exception_breakpoint): Remove prototypes.
524 * ada-lang.c (ada_find_printable_frame): Make non-static.
525 * ada-tasks.c: New file.
526 * Makefile.in (SFILES): Add ada-tasks.c.
527 (COMMON_OBS): Add ada-tasks.o.
528 * linux-thread-db.c (thread_db_find_thread_from_tid)
529 (thread_db_get_ada_task_ptid): New functions.
530 (init_thread_db_ops): Set thread_db_ops.to_get_ada_task_ptid.
531
532 2008-10-22 Tom Tromey <tromey@redhat.com>
533
534 PR gdb/2506:
535 * c-exp.y (string_exp): New production.
536 (exp): Use it.
537
538 2008-10-21 Jan Kratochvil <jan.kratochvil@redhat.com>
539
540 * mips-tdep.c (mips_n32n64_fp_arg_chunk_p): Update TYPE_FIELD_STATIC
541 removed before.
542
543 2008-10-20 Joel Brobecker <brobecker@adacore.com>
544
545 * NEWS: Add entry mentioning thread-support on Tru64
546
547 2008-10-19 Joel Brobecker <brobecker@adacore.com>
548
549 * dec-thread.c: New file.
550 * config/alpha/alpha-osf3.mh (NATDEPFILES): Add dec-thread.o.
551 (NAT_CLIBS): Define.
552
553 2008-10-19 Hui Zhu <teawater@gmail.com>
554
555 * infrun.c (handle_inferior_event): Set "stop_pc" when
556 TARGET_WAITKIND_NO_HISTORY.
557
558 2008-10-19 Pedro Alves <pedro@codesourcery.com>
559
560 * python/python-value.c (value_object_methods)
561 (value_object_as_number, value_object_as_mapping): Move to bottom
562 of file.
563 (valpy_dealloc, valpy_new, valpy_length, valpy_getitem)
564 (valpy_setitem, valpy_str, valpy_add, valpy_subtract)
565 (valpy_multiply, valpy_divide, valpy_remainder, valpy_power)
566 (valpy_negative, valpy_positive, valpy_absolute, valpy_nonzero)
567 (valpy_richcompare, valpy_dereference): Don't forward-declare.
568 (valpy_length) [HAVE_LIBPYTHON2_4]: Change return type to `int'.
569
570 2008-10-18 Pedro Alves <pedro@codesourcery.com>
571
572 * infrun.c (adjust_pc_after_break): Do nothing if executing in
573 reverse.
574
575 2008-10-17 Pedro Alves <pedro@codesourcery.com>
576
577 * infcmd.c (GO_USAGE): Delete.
578 (go_command): Adjust.
579
580 2008-10-17 Michael Snyder <msnyder@vmware.com>
581 Target interface for reverse debugging.
582 * target.h (enum target_waitkind):
583 Add new wait event, TARGET_WAITKIND_NO_HISTORY.
584 (struct target_ops): New method to_can_execute_reverse.
585 (target_can_execute_reverse): New macro.
586 * target.c (update_current_target): Inherit to_can_execute_reverse.
587
588 Remote interface for reverse debugging.
589 * remote.c (remote_can_execute_reverse): New target method.
590 (remote_resume): Check for reverse exec direction, and send
591 appropriate command to target.
592 (remote_wait_as): Check target response for NO_HISTORY status.
593 Also check for empty reply (target doesn't understand "bs" or "bc).
594 (remote_vcont_resume): Jump out if attempting reverse execution.
595
596 Event handling interface for reverse debugging.
597 * infrun.c (execution_direction): New state variable.
598 (enum inferior_stop_reason): Add NO_HISTORY reason.
599 (handle_inferior_event): Handle TARGET_WAITKIND_NO_HISTORY.
600 Handle stepping over a function call in reverse.
601 Handle stepping thru a line range in reverse.
602 Handle setting a step-resume breakpoint in reverse.
603 Handle stepping into a function in reverse.
604 Handle stepping between line ranges in reverse.
605 (print_stop_reason): Print reason for NO_HISTORY.
606 (step_into_function): Rename to handle_step_into_function.
607 (handle_step_into_function_backward): New function.
608 (set_exec_direction_func, show_exec_direction_func): New funcs.
609 (proceed): No need to singlestep over a breakpoint
610 when resuming in reverse.
611
612 * inferior.h (enum exec_direction_kind): New enum.
613 (execution_direction): Export new execution state variable.
614
615 * breakpoint.c (make_breakpoint_silent): New function.
616 * breakpoint.h (make_breakpoint_silent): Export.
617 * infcmd.c (finish_command): Check for reverse exec direction.
618 (finish_backward): New function, handle finish cmd in reverse.
619
620 User interface for reverse execution.
621 * Makefile.in (reverse.c): New file.
622 * reverse.c: New file. User interface for reverse execution.
623
624 2008-10-17 Pedro Alves <pedro@codesourcery.com>
625
626 * remote.c (record_currthread): Add inferior before child threads.
627 (remote_threads_info): Check for exited threads. Mention
628 notification order.
629
630 2008-10-16 Joel Brobecker <brobecker@adacore.com>
631
632 * breakpoint.h (enum bptype): New enum bp_catchpoint.
633 Delete bp_catch_fork and bp_catch_vfork.
634 (struct breakpoint_ops): Add new methods "insert", "remove"
635 and "breakpoint_hit".
636 * breakpoint.c (create_fork_vfork_event_catchpoint)
637 (create_fork_event_catchpoint, create_vfork_event_catchpoint): Remove.
638 (insert_catchpoint): Remove handling of bp_catch_fork and
639 bp_catch_vfork catchpoints, and handle them as bp_catchpoint
640 catchpoints instead.
641 (insert_bp_location, update_breakpoints_after_exec)
642 (remove_breakpoint, bpstat_check_location, bpstat_what)
643 (allocate_bp_location): Likewise.
644 (print_it_typical, print_one_breakpoint_location, mention): Remove
645 handling of bp_catch_fork and bp_catch_vfork breakpoints.
646 (ep_is_catchpoint, user_settable_breakpoint)
647 (breakpoint_address_is_meaningful, adjust_breakpoint_address)
648 (breakpoint_re_set_one, disable_command, enable_command):
649 Remove use of bp_catch_fork and bp_catch_vfork. Add handling of
650 bp_catchpoint breakpoints.
651 (insert_catch_fork, remove_catch_fork, breakpoint_hit_catch_fork)
652 (print_it_catch_fork, print_one_catch_fork, print_mention_catch_fork):
653 New functions.
654 (catch_fork_breakpoint_ops): New static constant.
655 (insert_catch_vfork, remove_catch_vfork, breakpoint_hit_catch_vfork)
656 (print_it_catch_vfork, print_one_catch_vfork)
657 (print_mention_catch_vfork): New functions.
658 (catch_vfork_breakpoint_ops): New static constant.
659 (create_catchpoint, create_fork_vfork_event_catchpoint): New functions.
660 (catch_fork_command_1): Use create_fork_vfork_event_catchpoint
661 to create the fork and vfork catchpoints.
662 (gnu_v3_exception_catchpoint_ops): Set new breakpoint_ops fields.
663 * ada-lang.c (catch_exception_breakpoint_ops): Set new breakpoint_ops
664 fields.
665 (catch_exception_unhandled_breakpoint_ops): Likewise.
666 (catch_assert_breakpoint_ops): Likewise.
667
668 2008-10-16 Pedro Alves <pedro@codesourcery.com>
669
670 * remote.c (set_general_process): New.
671 (remote_check_symbols): Use it.
672
673 2008-10-16 Pedro Alves <pedro@codesourcery.com>
674
675 * remote.c (push_remote_target): Delete.
676 * target.h (push_remote_target): Delete declaration.
677
678 2008-10-15 Pedro Alves <pedro@codesourcery.com>
679
680 * remote.c (remote_close): Unregister remote_desc from the event
681 loop. Always restore the SIGINT handler. Discard all inferiors
682 here.
683 (remote_detach_1, remote_disconnect): Don't unregister the file
684 descriptor from the event loop here.
685 (interrupt_query, readchar, getpkt_sane): Pop the target instead
686 of morning the current inferior.
687 (remote_kill): Don't unregister the file descriptor from the event
688 loop here.
689 (remote_mourn_1): Don't discard inferiors here.
690
691 2008-10-15 Pedro Alves <pedro@codesourcery.com>
692
693 * breakpoint.c (breakpoint_init_inferior): Clean up the moribund
694 locations list.
695 (moribund_breakpoint_here_p): Record the moribund
696 location in the moribund_locations vector.
697 * breakpoint.h (moribund_breakpoint_here_p): Declare.
698 (displaced_step_fixup): Check if the breakpoint the thread was
699 trying to step over has been removed since having been placed in
700 the displaced stepping queue.
701 (adjust_pc_after_break): In non-stop mode, check for a moribund
702 breakpoint at the stop pc.
703 (handle_inferior_event): Don't retire moribund breakpoints on
704 TARGET_WAITKIND_IGNORE.
705
706 2008-10-15 Pedro Alves <pedro@codesourcery.com>
707
708 * infrun.c (displaced_step_prepare): Switch thread temporarily
709 while we're here.
710 (displaced_step_fixup): Make sure target_resume sees ptid as
711 inferior_ptid. Add debug output.
712
713 2008-10-14 Pedro Alves <pedro@codesourcery.com>
714
715 Remove dead code.
716
717 * breakpoint.c (show_breakpoint_hit_counts): Delete.
718 (print_one_breakpoint_location): Adjust.
719 (breakpoint_clear_ignore_counts): Delete.
720 * breakpoint.h (breakpoint_clear_ignore_counts): Remove
721 declaration.
722 * target.c (generic_mourn_inferior): Don't clear ignore
723 counts (never reached).
724
725 2008-10-10 Doug Evans <dje@google.com>
726
727 * dwarf2read.c (comp_unit_head): Use unsigned int consistently
728 for dwarf section offsets and sizes.
729 (dwarf2_cu): Ditto.
730 (dwarf2_per_cu_data): Ditto.
731 (create_all_comp_units): Change offset to unsigned int.
732 (load_full_comp_unit,find_partial_die_in_comp_unit,find_partial_die,
733 dwarf2_find_containing_comp_unit,dwarf2_find_comp_unit): Ditto.
734
735 * dwarf2read.c (read_initial_length): Delete cu_header arg.
736 All callers updated.
737 (read_checked_initial_length_and_offset): New function.
738 (read_offset_1): New function.
739 (read_offset): Call it.
740 (dwarf_decode_line_header): Call read_checked_initial_length_and_offset
741 instead of read_initial_length. Call read_offset_1 instead of
742 read_offset.
743
744 * dwarf2read.c (dwarf2_get_ref_die_offset): Remove unused arg `cu'.
745 All callers updated.
746
747 * dwarf2read.c (dwarf_attr_name): Unconditionally support all
748 DW_AT_MIPS_* except DW_AT_MIPS_fde which collides with
749 DW_AT_HP_block_index.
750
751 2008-10-10 Pedro Alves <pedro@codesourcery.com>
752
753 * remote.c (remote_start_remote): Always tell the stub if we're in
754 extended-remote.
755
756 2008-10-09 Pedro Alves <pedro@codesourcery.com>
757
758 * remote.c (remote_wait): Rename to...
759 (remote_wait_as): ... this. Don't loop here. If the remote
760 didn't stop, return TARGET_WAITKIND_IGNORE.
761 (remote_wait): New, reimplemented on top of remote_wait_as.
762
763 2008-10-09 Thomas Schwinge <tschwinge@gnu.org>
764
765 * Makefile.in (gnu-nat.o): Revert the 2008-09-10 change, as the problem
766 is fixed upstream.
767
768 * reply_mig_hack.awk: Use the `BAD_TYPECHECK' macro.
769
770 * MAINTAINERS (Write After Approval): Add myself.
771
772 2008-10-09 Pedro Alves <pedro@codesourcery.com>
773
774 Make it compile without warnings.
775
776 * procfs.c (create_procinfo): Initialize `parent'.
777 (dead_procinfo): Pass a constant string as format to error.
778 (procfs_address_to_host_pointer): Add cast to gdb_type *.
779 (procfs_find_LDT_entry): Adjust format string to long int
780 ptid.tid.
781 (procfs_xfer_partial): Adjust prototype. Add gdb_byte* cast.
782 (procfs_xfer_memory): Adjust prototype.
783 (info_mappings_callback, info_proc_mappings): Adjust to not pass a
784 variable as printf_filtered format.
785 (procfs_make_note_section): Change type of auxv local to gdb_byte.
786 * Makefile.in: Remove special rule.
787
788 2008-10-09 Pedro Alves <pedro@codesourcery.com>
789 Daniel Jacobowitz <dan@codesourcery.com>
790
791 * remote.c (remote_open_1): Move acknowledging any pending ack,
792 querying supported features, activating noack mode, finding the
793 target description, enabling extended remote, and checking remote
794 symbols from here ...
795 (remote_start_remote): ... to here.
796 (remote_open_1): Don't pop the target if it is already gone.
797 * target.c (unpush_target): Check for the dummy target.
798
799 2008-10-09 Pedro Alves <pedro@codesourcery.com>
800
801 * ser-mingw.c: Include "command.h".
802 (pipe_windows_open): Declare locals at the beginning of the scope.
803
804 2008-10-08 Pedro Alves <pedro@codesourcery.com>
805
806 * remote.c (struct remote_state) <waiting_for_stop_reply>: New
807 field.
808 (remote_open_1): Clear waiting_for_stop_reply.
809 (remote_resume): Set waiting_for_stop_reply.
810 (remote_wait): Clear or set waiting_for_stop_reply accordingly.
811 (putpkt_binary): If we're in async mode and waiting for a stop
812 reply, bail out with an error.
813 (extended_remote_mourn_1): Clear waiting_for_stop_reply.
814
815 2008-10-08 Pedro Alves <pedro@codesourcery.com>
816
817 * remote.c (remote_get_thread_info): If the remote doesn't support
818 the query, bail out.
819
820 2008-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
821
822 Convert static_kind into loc_kind enum.
823 * gdbtypes.h (enum field_loc_kind): New.
824 (union field_location): New field dwarf_block.
825 (struct field): Rename static_kind as loc_kind.
826 (FIELD_STATIC_KIND): Rename to ...
827 (FIELD_LOC_KIND): ... here.
828 (TYPE_FIELD_STATIC_KIND): Rename to ...
829 (TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
830 (TYPE_FIELD_STATIC_HAS_ADDR): Remove.
831 (TYPE_FIELD_STATIC): Remove.
832 (TYPE_FIELD_BITPOS): Reformat.
833 (SET_FIELD_BITPOS): New.
834 (FIELD_PHYSADDR): Rename to ...
835 (FIELD_STATIC_PHYSADDR): ... here.
836 (TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
837 (SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
838 (FIELD_PHYSNAME): Rename to ...
839 (FIELD_STATIC_PHYSNAME): ... here.
840 (TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
841 (SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
842 (FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
843 (field_is_static): New declaration.
844 * gdbtypes.c (field_is_static): New function.
845 (copy_type_recursive): Update throughout.
846 * amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
847 eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
848 p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
849
850 2008-10-07 Thomas Schwinge <tschwinge@gnu.org>
851 Pedro Alves <pedro@codesourcery.com>
852
853 * gnu-nat.h: Rename `current_inferior' to `gnu_current_inf' to
854 avoid a name collision.
855 * gnu-nat.c: Likewise.
856 * i386gnu-nat.c: Likewise.
857
858 2008-10-07 Joel Brobecker <brobecker@adacore.com>
859
860 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_SIZE]: Add handling
861 of arguments that are references.
862
863 2008-10-06 Doug Evans <dje@google.com>
864
865 * dwarf2read.c (dwarf2_die_debug): New static global.
866 (dump_die_shallow): Renamed from dump_die, New args f, indent.
867 Print to specified file, indented by the specified amount.
868 (dump_die_for_error): New fn. Point all existing callers of
869 dump_die here.
870 (dump_die_die_1,dump_die): New fns, replaces ...
871 (dump_die_list): ... deleted.
872 (read_die_and_children_1): Old contents of read_die_and_children
873 moved here.
874 (read_die_and_children): Rewrite.
875 (read_die_and_siblings): Call read_die_and_children_1 instead of
876 read_die_and_children.
877 (_initialize_dwarf2_read): New option "debug dwarf2-die".
878 * gdbinit.in (pdie): New macro.
879
880 * dwarf2read.c (offset_in_cu_p): New function.
881 (find_partial_die,follow_die_ref): Use it.
882
883 * symmisc.c (maintenance_info_symtabs): Watch for ^c.
884 (maintenance_info_psymtabs): Ditto.
885
886 2008-10-05 Michael Snyder <msnyder@vmware.com>
887
888 * infrun.c (handle_inferior_event): Fix typo in comment.
889
890 2008-10-04 Vladimir Prus <vladimir@codesourcery.com>
891
892 * mi/mi-interp.c (mi_on_resume): Flush raw_stdout.
893
894 2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
895
896 PR gdb/2384:
897 * gdbtypes.c (get_vptr_fieldno): baseclass and basetype may have
898 different lifetimes.
899
900 2008-10-03 Joel Brobecker <brobecker@adacore.com>
901
902 * solib-osf.c: Include "solib.h".
903
904 2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
905
906 * utils.c, defs.h (gdb_buildargv): New fn. Wrap buildargv
907 and check for out-of-memory condition.
908 * exec.c (exec_file_command): Call it.
909 * infrun.c (handle_command, xdb_handle_command): Likewise.
910 * interps.c (interpreter_exec_cmd): Likewise.
911 * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
912 * procfs.c (info_proc_cmd): Likewise.
913 * remote-mips.c (common_open): Likewise.
914 * remote-sim.c (gdbsim_kill, gdbsim_create_inferior)
915 (gdbsim_open): Likewise.
916 * remote.c (extended_remote_run, remote_put_command)
917 (remote_get_command, remote_delete_command): Likewise.
918 * ser-mingw.c (pipe_windows_open): Likesise.
919 * source.c (add_path, show_substitute_path_command)
920 (unset_substitute_path_command, set_substitute_path_command):
921 Likewise.
922 * stack.c (backtrace_command): Likewise.
923 * symfile.c (symbol_file_command, generic_load)
924 (add_symbol_file_command): Likesise.
925 * symmisc.c (maintenance_print_symbols, maintenance_print_psymbols)
926 (maintenance_print_msymbols): Likewise.
927
928 2008-10-02 Jan Kratochvil <jan.kratochvil@redhat.com>
929
930 Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
931 * c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
932 (m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
933 valops.c (value_cast), varobj.c (c_number_of_children): Replace
934 TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
935 TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
936 * parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
937 * f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
938 (f77_get_upperbound): ... this function handling now only
939 TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
940 (f77_get_dynamic_lowerbound): Replace with ...
941 (f77_get_lowerbound): ... this function handling now only
942 TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
943 (f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
944 Update their callers.
945 * eval.c (evaluate_subexp_standard): Update their callers.
946 * f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
947 (f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
948 prototypes.
949 (BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
950 * f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
951 the lower_bound_was_default variable. Update the
952 f77_get_dynamic_upperbound, f77_get_upperbound and
953 TYPE_ARRAY_UPPER_BOUND_TYPE calls.
954 * gdbtypes.c (print_bound_type): Remove the function.
955 (recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
956 LOWER_BOUND_TYPE.
957 * gdbtypes.h (enum array_bound_type): Remove.
958 (struct main_type): Remove the fields upper_bound_type and
959 lower_bound_type. Comment the new overload of the field artificial.
960 (TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
961 (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
962 (TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
963 (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.
964
965 2008-10-02 Tom Tromey <tromey@redhat.com>
966
967 * Makefile.in (HFILES_NO_SRCDIR): Remove gdb-events.h, gstdint.h.
968
969 2008-10-02 Daniel Jacobowitz <dan@codesourcery.com>
970
971 * mips-linux-tdep.c (mips_linux_in_dynsym_resolve_code): Update
972 comments.
973 (mips_linux_skip_resolver): Also use glibc_skip_solib_resolver.
974 (mips_linux_init_abi): Do not override skip_trampoline_code.
975 * configure.tgt (mips*-*-linux*): Add glibc-tdep.o.
976 * mips-tdep.c (mips32_scan_prologue): Stop scanning at branches.
977 (mips_stub_frame_sniffer): Use the stub frame sniffer for PIC stubs.
978 (mips_skip_mips16_trampoline_code): Rename from
979 mips_skip_trampoline_code.
980 (mips_skip_pic_trampoline_code, mips_skip_trampoline_code): New.
981 * infrun.c (handle_inferior_event): Do not pass zero to
982 in_solib_dynsym_resolve_code.
983
984 2008-10-02 Pierre Muller <muller@ics.u-strasbg.fr>
985 Pedro Alves <pedro@codesourcery.com>
986
987 * win32-nat.c (do_initial_win32_stuff): Set inferior_ptid.
988
989
990 2008-10-01 Tom Tromey <tromey@redhat.com>
991
992 * symtab.c (search_symbols): Update.
993 * symtab.h (domain_enum_tag) <METHODS_DOMAIN>: Remove.
994
995 2008-10-01 Tom Tromey <tromey@redhat.com>
996
997 * symfile.c (syms_from_objfile): Update.
998 (reread_symbols): Update.
999 * objfiles.h (OBJF_SYMS): Remove.
1000 (OBJF_REORDERED): Renumber.
1001 (OBJF_SHARED): Likewise.
1002 (OBJF_READNOW): Likewise.
1003 (OBJF_USERLOADED): Likewise.
1004
1005 2008-10-01 Tom Tromey <tromey@redhat.com>
1006
1007 * symtab.c (find_pc_sect_psymtab): Use MSYMBOL_TYPE.
1008 (find_pc_sect_symtab): Likewise.
1009 * symmisc.c (dump_msymbols): Use MSYMBOL_TYPE.
1010 * solib-som.c (som_solib_desire_dynamic_linker_symbols): Use
1011 MSYMBOL_TYPE, not SYMBOL_TYPE.
1012 * parse.c (write_exp_msymbol): Use MSYMBOL_TYPE.
1013 * objc-lang.c (find_methods): Use MSYMBOL_TYPE.
1014 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Use
1015 MSYMBOL_TYPE.
1016 * m2-exp.y (yylex): Use SYMBOL_CLASS.
1017
1018 2008-10-01 Tom Tromey <tromey@redhat.com>
1019
1020 * xcoffread.c (RECORD_MINIMAL_SYMBOL): Update.
1021 (scan_xcoff_symtab): Update.
1022 * mdebugread.c (record_minimal_symbol): Update.
1023 (parse_partial_symbols): Update.
1024 * elfread.c (record_minimal_symbol): Update.
1025 * dbxread.c (record_minimal_symbol): Update.
1026 * coffread.c (record_minimal_symbol): Update.
1027 * sh64-tdep.c (MSYMBOL_IS_SPECIAL): Redefine.
1028 (sh64_elf_make_msymbol_special): Update.
1029 * mips-tdep.c (mips_elf_make_msymbol_special): Use
1030 MSYMBOL_TARGET_FLAG_1.
1031 (mips_elf_make_msymbol_special): Likewise.
1032 (msymbol_is_special): Likewise.
1033 * minsyms.c (prim_record_minimal_symbol_and_info): Update.
1034 (install_minimal_symbols): Likewise.
1035 (prim_record_minimal_symbol): Update.
1036 (prim_record_minimal_symbol_and_info): Remove 'info' argument.
1037 * m68hc11-tdep.c (MSYMBOL_SET_RTC): Redefine.
1038 (MSYMBOL_SET_RTI): Redefine.
1039 (MSYMBOL_IS_RTC): Redefine.
1040 (MSYMBOL_IS_RTI): Redefine.
1041 * arm-tdep.c (MSYMBOL_SET_SPECIAL): Redefine.
1042 (MSYMBOL_IS_SPECIAL): Redefine.
1043 * symtab.h (struct minimal_symbol) <info>: Remove.
1044 <target_flag_1, target_flag_2>: New fields.
1045 (MSYMBOL_INFO): Remove.
1046 (MSYMBOL_TARGET_FLAG_1): New macro.
1047 (MSYMBOL_TARGET_FLAG_2): Likewise.
1048 (prim_record_minimal_symbol_and_info): Update.
1049
1050 2008-09-30 Joel Brobecker <brobecker@adacore.com>
1051
1052 * ada-lang.c (is_digits_suffix): Delete unused function.
1053
1054 2008-09-30 Paul Hilfinger <hilfinger@adacore.com>
1055
1056 * ada-lang.c (ada_modulus): Correct to avoid sign problem with
1057 moduli >= 2**31.
1058
1059 2008-09-30 Paul Hilfinger <hilfinger@adacore.com>
1060
1061 * ada-lang.c (ada_lookup_struct_elt_type): Handle case of a "naked"
1062 variant branch.
1063 (empty_record): Use INIT_CPLUS_SPECIFIC, since this field is not
1064 supposed to be null. Fixes debugger segfaults.
1065 (is_unchecked_variant): New function.
1066 (to_fixed_variant_branch_type): Modify to leave unchecked unions
1067 untouched.
1068 (ada_template_to_fixed_record_type_1): Fix comment.
1069
1070 2008-09-30 Joel Brobecker <brobecker@adacore.com>
1071
1072 * ada-lang.c (standard_exc): New static constant.
1073 (ada_exception_catchpoint_cond_string): Add special handling
1074 for the predefined exceptions.
1075
1076 2008-09-30 Joel Brobecker <brobecker@adacore.com>
1077
1078 * ada-lang.c (ADA_RETAIN_DOTS): Delete this dead macro. Update
1079 the code accordingly.
1080
1081 2008-09-30 Joel Brobecker <brobecker@adacore.com>
1082
1083 * ada-lang.c (ada_evaluate_subexp) [UNOP_IND]: Remove strange
1084 treatment of expect_type. Return the correct type when dereferencing
1085 an integer.
1086
1087 2008-09-30 Tom Tromey <tromey@redhat.com>
1088
1089 PR gdb/2484:
1090 * symtab.c (struct add_macro_name_data): New struct.
1091 (add_macro_name): New function.
1092 (default_make_symbol_completion_list): Complete macro names.
1093 * scm-lang.c (scm_language_defn): Update.
1094 * p-lang.c (pascal_language_defn): Update.
1095 * objc-lang.c (objc_language_defn): Update.
1096 * macrotab.h (macro_callback_fn): Add user_data argument.
1097 (macro_for_each): Likewise.
1098 (macro_for_each_in_scope): Declare.
1099 * macrotab.c: (struct macro_for_each_data): New struct.
1100 (foreach_macro): Use it.
1101 (macro_for_each): Likewise.
1102 (foreach_macro_in_scope): New function.
1103 (macro_for_each_in_scope): Likewise.
1104 * macrocmd.c (print_one_macro): Add argument.
1105 (macro_list_command): Pass NULL to macro_for_each.
1106 * m2-lang.c (m2_language_defn): Update.
1107 * language.h (struct language_defn) <la_macro_expansion>: New
1108 field.
1109 (macro_expansion): New enum.
1110 * language.c (unknown_language_defn): Update. Fix order of
1111 initializers.
1112 (auto_language_defn): Likewise.
1113 (local_language_defn): Update.
1114 * jv-lang.c (java_language_defn): Update.
1115 * f-lang.c (f_language_defn): Update.
1116 * c-lang.c (c_language_defn): Update.
1117 (cplus_language_defn): Likewise.
1118 (asm_language_defn): Likewise.
1119 (minimal_language_defn): Likewise.
1120 * ada-lang.c (ada_language_defn): Update.
1121
1122 2008-09-30 Joel Brobecker <brobecker@adacore.com>
1123
1124 * dwarf2read.c (dwarf2_get_subprogram_pc_bounds): New function.
1125 (get_scope_pc_bounds): Use it.
1126
1127 2008-09-27 Tom Tromey <tromey@redhat.com>
1128
1129 * NEWS: Update.
1130 * macrocmd.c (extract_identifier): Add is_parameter argument.
1131 (macro_define_command): Update.
1132 (macro_undef_command): Likewise.
1133 * macroexp.c (stringify): New function.
1134 (find_parameter): Likewise.
1135 (gather_arguments): Add nargs argument. Handle varargs.
1136 (substitute_args): Add is_varargs and va_arg_name arguments.
1137 Handle varargs, splicing, stringification. Use find_parameter.
1138 (expand): Handle varargs.
1139
1140 2008-09-27 Tom Tromey <tromey@redhat.com>
1141
1142 * scm-lang.c (scm_language_defn): Update.
1143 * p-typeprint.c (pascal_print_typedef): New function.
1144 * p-lang.h: (pascal_print_typedef): Declare.
1145 * p-lang.c (pascal_language_defn): Update.
1146 * objc-lang.c (objc_language_defn): Update.
1147 * m2-typeprint.c (m2_print_typedef): New function.
1148 * m2-lang.h (m2_print_typedef): Declare.
1149 * m2-lang.c (m2_language_defn): Update.
1150 * language.h (_LANG_c, _LANG_m2, _LANG_fortran, _LANG_pascal):
1151 Remove.
1152 (struct language_defn) <la_print_typedef>: New field.
1153 (default_print_typedef): Declare.
1154 (LA_PRINT_TYPEDEF): New define.
1155 * language.c (unknown_language_defn): Update.
1156 (auto_language_defn): Update.
1157 (local_language_defn): Update.
1158 * jv-lang.c (java_language_defn): Update.
1159 * f-lang.c (f_language_defn): Update.
1160 * c-typeprint.c (c_print_typedef): New function.
1161 * c-lang.h (c_print_typedef): Declare.
1162 * c-lang.c (c_language_defn): Update.
1163 (cplus_language_defn): Update.
1164 (asm_language_defn): Update.
1165 (minimal_language_defn): Update.
1166 * ada-lang.c (ada_language_defn): Update.
1167 * typeprint.c (default_print_typedef): New function.
1168
1169 2008-09-27 Tom Tromey <tromey@redhat.com>
1170
1171 * jv-exp.y (insert_exp): Define using ISO syntax.
1172 (copy_exp): Likewise.
1173 (push_expression_name): Likewise.
1174 (push_fieldnames): Likewise.
1175 (java_type_from_name): Likewise.
1176 (yyerror): Likewise.
1177 (yylex): Likewise.
1178 (parse_number): Likewise.
1179
1180 2008-09-26 Joel Brobecker <brobecker@adacore.com>
1181
1182 * MAINTAINERS (GLOBAL MAINTAINERS): Add Pedro Alves.
1183
1184 2008-09-25 Stephan Springl <springl-gdb@bfw-online.de> (tiny change)
1185
1186 * stack.c (print_frame_args): Fix typos in comments.
1187
1188 2008-09-25 Sérgio Durigan Júnior <sergiodj@linux.vnet.ibm.com>
1189
1190 * linux-nat.c (get_pending_status): Fix argument to WIFSTOPPED.
1191
1192 2008-09-24 Vladimir Prus <vladimir@codesourcery.com>
1193
1194 * remote-sim.c (gdbsim_create_inferior): Fix missing parenthesis.
1195
1196 2008-09-24 Andreas Schwab <schwab@suse.de>
1197
1198 * frame.c (get_frame_register_bytes): Take pseudo registers into
1199 account. Avoid excessive function calls.
1200
1201 2008-09-23 Doug Evans <dje@google.com>
1202
1203 * dcache.c (state_chars): New static global.
1204 (ENTRY_INVALID,ENTRY_VALID): Renamed from ENTRY_BAD,ENTRY_OK.
1205 All uses updated.
1206 (dcache_info): Print cache state as mnemonically useful letters instead
1207 of magic numbers.
1208
1209 * dwarf2read.c (comp_unit_head): Reorganize for better packing.
1210
1211 2008-09-22 Tom Tromey <tromey@redhat.com>
1212
1213 * symfile.c (symbol_file_add_with_addrs_or_offsets): Don't use
1214 printf_filtered.
1215
1216 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1217
1218 * infrun.c (follow_exec): Don't do a generic mourn. Instead
1219 inline the required bits.
1220 * breakpoint.h (enum inf_context): Add inf_execd.
1221
1222 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1223
1224 * infrun.c (handle_inferior_event): In the follow exec case,
1225 context-switch before doing anything else.
1226
1227 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1228
1229 * top.c (any_thread_of, kill_or_detach): New functions.
1230 (quit_target): Iterate over all inferiors, killing or detaching
1231 accordingly.
1232
1233 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1234
1235 Remove the attach_flag global, and make it per-inferior.
1236
1237 * inferior.h (attach_flag): Delete.
1238 (inferior_process): Declare.
1239 * solib.c (update_solib_list): Adjust.
1240 * gnu-nat.c (gnu_create_inferior, gnu_attach): Adjust.
1241 * inf-ptrace.c (inf_ptrace_detach): Adjust.
1242 (inf_ptrace_files_info): Get it from the current inferior.
1243 * inf-ttrace.c (inf_ttrace_attach): Adjust.
1244 (inf_ttrace_files_info): Get it from the current
1245 inferior.
1246 * inflow.c (terminal_inferior, terminal_ours_1, set_sigint_trap)
1247 (clear_sigint_trap): Get it from the current process.
1248 * remote.c (extended_remote_attach_1)
1249 (extended_remote_create_inferior_1): Adjust.
1250 * top.c (quit_confirm, quit_target): Get it from the current inferior.
1251 * procfs.c (do_detach): Adjust.
1252 (procfs_wait): Get it from the event inferior.
1253 (procfs_files_info): Get it from the current inferior.
1254 * nto-procfs.c (procfs_files_info): Likewise.
1255 (procfs_attach): Adjust. Set the attach_flag here.
1256 (do_attach): Don't set it here.
1257 (procfs_detach): Don't clear it.
1258 (procfs_mourn_inferior): Don't clear it.
1259 * solib-osf.c (osf_solib_create_inferior_hook): Adjust.
1260 * target.c (attach_flag): Delete.
1261 (generic_mourn_inferior): Don't clear it.
1262 * win32-nat.c (get_win32_debug_event): Get it from the event
1263 process.
1264 (do_initial_win32_stuff): Add attaching argument. Set attach_flag
1265 in the inferior accordingly.
1266 (win32_attach): Don't set the attach_flag here. Pass 1 to
1267 do_intial_win32_stuff.
1268 (win32_files_info): Get it from the current inferior.
1269 (win32_create_inferior): Dont clear attach_flag here. Pass 0 to
1270 do_intial_win32_stuff.
1271
1272 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1273
1274 Make the stop_soon global be per-inferior instead.
1275
1276 * infcmd.c (attach_command_post_wait): Adjust.
1277 (attach_command): Likewise.
1278
1279 * inferior.h (stop_soon): Delete.
1280 (struct inferior): Add stop_soon member.
1281
1282 * infrun.c (stop_soon): Delete.
1283 (clear_proceed_status, start_remote)
1284 (fetch_inferior_event, handle_inferior_event): Adjust.
1285 (signal_stop_state): Don't check stop_soon here. Check in callers
1286 instead.
1287 (save_inferior_status, restore_inferior_status): Adjust.
1288
1289 * linux-nat.c (linux_nat_resume, linux_nat_wait): Always pass
1290 signals to common code if starting up the inferior.
1291
1292 * inferior.h (struct inferior_info): Added stop_soon member.
1293 * inferior.c (add_inferior) Clear stop_soon.
1294
1295 * mips-tdep.c (heuristic_proc_start): Adjust.
1296 * nto-procfs.c (procfs_create_inferior): Adjust.
1297 * solib-irix.c (irix_solib_create_inferior_hook): Adjust.
1298 * solib-osf.c (osf_solib_create_inferior_hook): Adjust.
1299 * solib-sunos.c (sunos_solib_create_inferior_hook): Adjust.
1300 * solib-svr4.c (svr4_solib_create_inferior_hook): Adjust.
1301
1302 * win32-nat.c (do_initial_win32_stuff): Adjust.
1303
1304 * alpha-tdep.c (alpha_heuristic_proc_start): Adjust.
1305
1306 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1307
1308 Implement remote multi-process extensions.
1309
1310 * remote.c (struct remote_state): Add extended and
1311 multi_process_aware fields.
1312 (remote_multi_process_p): New.
1313 (PACKET_vKill): New.
1314 (record_currthread): Use thread_change_ptid. Notice new
1315 inferiors.
1316 (set_thread, remote_thread_alive): Use write_ptid.
1317 (write_ptid, read_ptid): New.
1318 (remote_current_thread, remote_threads_extra_info): Use them.
1319 (remote_threads_info): Likewise. Detect new inferiors.
1320 (remote_start_remote): Add inferior to inferior list.
1321 (remote_multi_process_feature): New.
1322 (remote_protocol_features): Add "multiprocess" feature.
1323 (remote_query_supported): Pass "multiprocess+" as supported
1324 features.
1325 (remote_open_1): Clear multi_process_aware. Set extended
1326 accordingly.
1327 (remote_detach_1): Detach current process. Use extended packet
1328 format for extended-remote multi-process. Detach process from the
1329 inferior list. Only mourn after printing output.
1330 (extended_remote_attach_1): Add process to the inferior list.
1331 (remote_vcont_resume): Use write_ptid to pass the thread ids.
1332 (remote_wait): Use read_ptid. Implement the extended
1333 multi-process extension format of the 'W' and 'X' reply packets.
1334 Remove exited inferiors from inferior list.
1335 (remote_xfer_memory): Set general thread.
1336 (remote_vkill): New.
1337 (extended_remote_kill): New.
1338 (remote_mourn_1): Discard all inferiors.
1339 (select_new_thread_callback): New.
1340 (extended_remote_mourn_1): If there are more processes to debug,
1341 switch to a thread in another process, and don't pop the target.
1342 (extended_remote_create_inferior_1): Add the new process to the
1343 inferior list.
1344 (remote_stopped_by_watchpoint): Indenting.
1345 (remote_xfer_partial): Set the general thread.
1346 (remote_pid_to_str): If the remote is multi-process aware, print
1347 the process id as well as the thread id.
1348 (remote_get_thread_local_address): Use write_ptid.
1349 (init_extended_remote_ops): Register extended_remote_kill.
1350 (_initialize_remote): Register new packets. Change
1351 magic_null_ptid's, not_sent_ptid's and any_thread_ptid's pid
1352 member to 42000.
1353
1354 * thread.c (thread_change_ptid): Also account for the inferior pid
1355 changing.
1356
1357 * inferior.h (discard_all_inferiors): Declare.
1358 * inferior.c (discard_all_inferiors): New.
1359
1360 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1361
1362 * gnu-nat.c (gnu_attach): Add process to inferiors table.
1363 (gnu_detach): Remove it.
1364 * go32-nat.c (go32_create_inferior): Add process to gdb's inferior
1365 table.
1366 * inf-ptrace.c (inf_ptrace_follow_fork): Delete and add inferiors
1367 to inferior table accordingly.
1368 (inf_ptrace_attach): Add new process to inferior table.
1369 (inf_ptrace_detach): Remove it.
1370 * inf-ttrace.c (inf_ttrace_follow_fork): Delete and add inferiors
1371 to inferior table accordingly.
1372 (inf_ttrace_attach): Add process to inferior table.
1373 (inf_ttrace_detach): Remove it.
1374 * linux-fork.c (init_fork_list): Delete any left over inferior.
1375 (linux_fork_mourn_inferior, detach_fork_command): Also delete
1376 processes from inferior list.
1377 * monitor.c (monitor_open): Add process to inferior list.
1378 (monitor_close): Remove it.
1379 * nto-procfs.c (procfs_attach): Add process to inferior list.
1380 Find threads after pushing the target.
1381 (procfs_detach): Remove process from inferior list.
1382 (procfs_create_inferior): Add process to inferior list.
1383 * procfs.c (procfs_detach): Remove process from inferior list.
1384 (do_attach): Add process to inferior list.
1385 * remote-sim.c (sim_create_inferior): Add process to inferior list.
1386 (gdbsim_close): Remove it.
1387 * target.c (generic_mourn_inferior): If inferior_ptid is not
1388 null_ptid, remove the corresponding inferior from inferior list.
1389 * win32-nat.c (do_initial_win32_stuff): Add process to inferior list.
1390 (win32_detach): Remove it.
1391 * linux-nat.c (linux_child_follow_fork): Delete and add inferiors
1392 to inferior list accordingly.
1393 * fork-child.c (fork_inferior): Add process to inferior list.
1394 * corelow.c (CORELOW_PID): Define.
1395 (core_close): Remove core from inferior list.
1396 (core_open): Add it.
1397
1398 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1399
1400 * inferior.h: Forward declare struct ui_out.
1401 Forward declare struct private_inferior.
1402 (struct inferior): New.
1403 (init_inferior_list, add_inferior, add_inferior_silent)
1404 (delete_inferior, delete_inferior_silent, detach_inferior)
1405 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1406 (valid_inferior_id, find_inferior_pid): New functions.
1407 (inferior_callback_func): New typedef.
1408 (iterate_over_inferiors, print_inferior, have_inferiors)
1409 (current_inferior): New functions.
1410 * inferior.c: New file.
1411
1412 * Makefile.in (SFILES): Add inferior.c.
1413 (COMMON_OBS): Add inferior.o.
1414
1415 2008-09-22 Jonathan Larmour <jifl@eCosCentric.com>
1416
1417 * arm-tdep.c (arm_skip_prologue): Call skip_prologue_using_sal
1418 instead of determining symbol and line info directly.
1419 * MAINTAINERS: Update my email address.
1420
1421 2008-09-22 Daniel Jacobowitz <dan@codesourcery.com>
1422
1423 * symtab.c (skip_prologue_using_sal): Treat two consecutive lines
1424 at the same address as a prologue marker. Do not skip an entire
1425 function.
1426
1427 2008-09-22 Andrew Stubbs <ams@codesourcery.com>
1428
1429 * frame.c (get_frame_register_bytes): Comment improvments.
1430
1431 2008-09-22 Pedro Alves <pedro@codesourcery.com>
1432
1433 * linux-nat.c (linux_nat_wait): Only use set_ignore_sigint in
1434 all-stop mode.
1435
1436 2008-09-19 Andrew Stubbs <ams@codesourcery.com>
1437
1438 * MAINTAINERS: Update my email address.
1439
1440 2008-09-19 Andrew Stubbs <ams@codesourcery.com>
1441
1442 * frame.c (get_frame_register_bytes): Detect bad debug info.
1443
1444 2008-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
1445
1446 Fix a crash on uninitialized ECS->EVENT_THREAD for a newly found thread.
1447 * infrun.c (wait_for_inferior): Move this ECS->EVENT_THREAD
1448 initialization ...
1449 (fetch_inferior_event): ... and this ECS->EVENT_THREAD initialization
1450 ...
1451 (handle_inferior_event): ... here after the add_thread call together
1452 with the local adjust_pc_after_break and reinit_frame_cache calls.
1453
1454 2008-09-16 David Daney <ddaney@avtrex.com>
1455
1456 * breakpoint.c (bpstat_stop_status): Clear breakpoint_at for
1457 all hardware bpstats.
1458
1459 2008-09-16 Joel Brobecker <brobecker@adacore.com>
1460
1461 * gstdint.h: Delete.
1462
1463 2008-09-15 Mark Kettenis <kettenis@gnu.org>
1464
1465 * infcall.c (generic_push_dummy_code): Remove.
1466 (push_dummy_code): Unconditionally call gdbarch_push_dummy_code.
1467
1468 2008-09-15 Doug Evans <dje@google.com>
1469
1470 * dwarf2read.c (struct abbrev_info): Make members name, form 16 bits.
1471 (struct attribute): Ditto.
1472
1473 2008-09-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1474
1475 * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Record
1476 HPPA_IPSW_REGNUM and HPPA_SAR_REGNUM values.
1477
1478 * hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum): Remove surrounding
1479 "#if 0" "#endif". Fix mapping of DWARF DBX registers to GDB registers.
1480 Correct arguments and improve comments.
1481 (hppa_linux_init_abi): Call set_gdbarch_dwarf2_reg_to_regnum. Delete
1482 disabled code.
1483 * hppa-tdep.c (hppa64_dwarf_reg_to_regnum): Fix check for floating
1484 point DBX register, change error to warning, and improve comments.
1485
1486 2008-09-14 Doug Evans <dje@google.com>
1487
1488 * dwarf2read.c (struct die_info): Make members tag, num_attrs 16 bits.
1489
1490 2008-09-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1491
1492 * hppa-linux-tdep.c (hppa_linux_supply_fpregset): Correct iteration.
1493
1494 2008-09-13 Joel Brobecker <brobecker@adacore.com>
1495
1496 * defs.h (GCC_GENERATED_STDINT_H): Define.
1497
1498 2008-09-13 Tom Tromey <tromey@redhat.com>
1499
1500 * varobj.c (varobj_set_display_format): Use xfree.
1501 * tracepoint.c (stringify_collection_list): Use xfree.
1502 * remote-fileio.c (remote_fileio_reset): Use xfree.
1503 * mipsread.c (read_alphacoff_dynamic_symtab): Use xfree.
1504 * dfp.c (decimal_from_floating): Use xfree, xstrprintf. Don't use
1505 asprintf.
1506 * cp-support.c (mangled_name_to_comp): Use xfree.
1507
1508 2008-09-13 Joel Brobecker <brobecker@adacore.com>
1509
1510 * ada-lang.c (remove_extra_symbols): Remove stub symbols if
1511 the associated complete symbol is also in the list.
1512 (ada_add_local_symbols, ada_add_non_local_symbols): New functions,
1513 extracted out from ada_lookup_symbol_list.
1514 (ada_lookup_symbol_list): Use them. Remove the search through
1515 the minimal symbols.
1516
1517 2008-09-13 Joel Brobecker <brobecker@adacore.com>
1518
1519 * dwarf2read.c (add_partial_subprogram): New procedure.
1520 (scan_partial_symbols): Use it.
1521 (load_partial_dies): Read in children of subprogram and lexical
1522 blocks for Ada compilation units.
1523
1524 2008-09-13 Tom Tromey <tromey@redhat.com>
1525
1526 * symfile.c (build_id_verify): Free 'found'.
1527 (find_separate_debug_file): Use xfree, not free.
1528
1529 2008-09-12 Doug Evans <dje@google.com>
1530
1531 * corefile.c (write_memory): Remove unnecessary copying.
1532
1533 * sol-thread.c (_initialize_sol_thread): Add FIXME regarding
1534 order of _initialize_* fns.
1535
1536 * dwarf2read.c (comp_unit_head): Rename first_die_ptr to
1537 first_die_offset. All uses updated.
1538 Delete unused members cu_head_ptr, next.
1539 Move members base_known, base_address to ...
1540 (dwarf2_cu) ... here. All uses updated.
1541
1542 2008-09-12 Pedro Alves <pedro@codesourcery.com>
1543
1544 * Makefile.in (generated_files): Add $(NAT_GENERATED_FILES).
1545 * config/i386/i386gnu.mh (NAT_GENERATED_FILES): New.
1546
1547 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1548
1549 * fork-child.c (startup_inferior): Use target_wait and target_resume
1550 directly instead of calling wait_for_inferior / resume.
1551
1552 * infcmd.c (kill_if_already_running): Do not call no_shared_libraries
1553 or init_wait_for_inferior.
1554 (run_command_1): Call init_wait_for_inferior.
1555
1556 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1557
1558 * gdbtypes.h (builtin_type_void_data_ptr, builtin_type_void_func_ptr,
1559 builtin_type_CORE_ADDR, builtin_type_char, builtin_type_short,
1560 builtin_type_int, builtin_type_long, builtin_type_signed_char,
1561 builtin_type_unsigned_char, builtin_type_unsigned_short,
1562 builtin_type_unsigned_int, builtin_type_unsigned_long,
1563 builtin_type_float, builtin_type_double, builtin_type_long_double,
1564 builtin_type_complex, builtin_type_double_complex, builtin_type_string,
1565 builtin_type_bool, builtin_type_long_long,
1566 builtin_type_unsigned_long_long): Remove macros.
1567
1568 (builtin_type_f_character, builtin_type_f_integer,
1569 builtin_type_f_integer_s2, builtin_type_f_logical,
1570 builtin_type_f_logical_s1, builtin_type_f_logical_s2,
1571 builtin_type_f_real, builtin_type_f_real_s8, builtin_type_f_real_s16,
1572 builtin_type_f_complex_s8, builtin_type_f_complex_s16,
1573 builtin_type_f_complex_s32): Likewise.
1574
1575 (builtin_type_m2_char, builtin_type_m2_int, builtin_type_m2_card,
1576 builtin_type_m2_real, builtin_type_m2_bool): Likewise.
1577
1578 (struct builtin_f_type, builtin_f_type): Move to f-lang.h.
1579 (struct builtin_m2_type, builtin_m2_type): Move to m2-lang.h.
1580
1581 * f-lang.h (struct builtin_f_type, builtin_f_type): Move here.
1582 * m2-lang.h (struct builtin_m2_type, builtin_m2_type): Move here.
1583
1584 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1585
1586 * solib-svr4.c (LM_ADDR_FROM_LINK_MAP): Use builtin types of
1587 target_gdbarch instead of builtin_type_void_data_ptr.
1588 (LM_DYNAMIC_FROM_LINK_MAP, LM_NEXT, LM_NAME,
1589 IGNORE_FIRST_LINK_MAP_ENTRY, scan_dyntag, elf_locate_base,
1590 solib_svr4_r_map, solib_svr4_r_brk, solib_svr4_r_ldsomap,
1591 open_symbol_file_object): Likewise.
1592 * nto-tdep.c (LM_ADDR): Likewise.
1593
1594 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1595
1596 * bsd-uthread.c (bsd_uthread_read_memory_address): New function.
1597 (bsd_uthread_fetch_registers, bsd_uthread_store_registers,
1598 bsd_uthread_wait, bsd_uthread_find_new_threads): Use it.
1599
1600 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1601
1602 * procfs.c (procfs_address_to_host_pointer): Use target_gdbarch
1603 and its associated types to perform pointer conversion.
1604 (procfs_can_use_hw_breakpoint): Likewise.
1605 (procfs_auxv_parse): Remove unused variable.
1606
1607 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1608
1609 * auxv.c (default_auxv_parse): Use gdbarch_ptr_bit (target_gdbarch)
1610 instead of builtin_type_void_data_ptr.
1611 * target.c (default_region_ok_for_hw_watchpoint): Likewise.
1612
1613 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1614
1615 * expprint.c (print_subexp_standard): Compare against builtin type
1616 associated with exp->gdbarch instead of builtin_type_char.
1617
1618 * f-valprint.c (f_val_print): Use extract_unsigned_integer to
1619 extract values of arbitrary logical type. Handle arbitrary
1620 complex types.
1621
1622 * printcmd.c (float_type_from_length): New function.
1623 (print_scalar_formatted, printf_command): Use it.
1624
1625 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1626
1627 * valops.c: Include "objfiles.h" and "symtab.h".
1628 (find_function_in_inferior): New argument OBJF_P. Use it to return
1629 objfile where function is defined. Use per-objfile arch types
1630 instead of builtin_type_ to define default return type.
1631
1632 * linux-fork.c (checkpoint_command): Update calls. Use per-objfile
1633 architecture to define inferior call argument types.
1634 * gcore.c (derive_heap_segment): Likewise.
1635 * objc-lang.c (value_nsstring): Likewise.
1636 * scm-lang.c (scm_lookup_name): Likewise.
1637 * scm-valprint.c (scm_inferior_print): Likewise.
1638 * valops.c (value_allocate_space_in_inferior): Likewise.
1639
1640 * eval.c (evaluate_subexp_standard): Update calls.
1641 * objc-lang.c (lookup_objc_class, print_object_command): Likewise.
1642
1643 * linux-fork.c: Include "objfiles.h".
1644 * scm-lang.c: Include "objfiles.h".
1645 * scm-valprint.c: Include "objfiles.h".
1646
1647 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1648
1649 * gdbarch.sh (name_of_malloc): Remove.
1650 * gdbarch.c, gdbarch.h: Re-generate.
1651 * valops.c (value_allocate_space_in_inferior): Do not call
1652 gdbarch_name_of_malloc.
1653
1654 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1655
1656 * valarith.c (value_x_unop): Use builtin_type_int8 as type for
1657 UNOP_POSTINCREMENT/UNOP_POSTDECREMENT constant 0 argument.
1658 (value_bit_index): Use extract_unsigned_integer
1659 instead of unpack_long to read single byte.
1660
1661 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1662
1663 * infcall.c (value_arg_coerce): Add GDBARCH parameter. Use its
1664 associates types instead of builtin_type_ macros.
1665 (find_function_addr): Leave output VALUE_TYPE NULL if unknown.
1666 (call_function_by_hand): Use per-architecture "int" type as
1667 fall-back if find_function_addr returns NULL VALUE_TYPE.
1668 Update call to value_arg_coerce.
1669
1670 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1671
1672 * cp-abi.h (cplus_method_ptr_size): Add TO_TYPE parameter.
1673 (cplus_make_method_ptr): Add TYPE parameter.
1674 * cp-abi.c (cplus_method_ptr_size): Add TO_TYPE parameter. Pass it
1675 on to current_cp_abi.method_ptr_size callback.
1676 (cplus_make_method_ptr): Add TYPE parameter. Pass it on to
1677 current_cp_abi.make_method_ptr callback.
1678
1679 * gdbtypes.c (lookup_methodptr_type): Pass target type
1680 argument to cplus_method_ptr_size.
1681 * valops.c (value_cast): Pass type argument to cplus_make_method_ptr.
1682 (value_struct_elt_for_reference): Likewise.
1683
1684 * gnu-v3-abi.c (get_class_arch): New function.
1685 (vtable_address_point_offset): Add GDBARCH parameter. Use it
1686 instead of current_gdbarch. Update all callers.
1687 (gnuv3_get_vtable): Likewise.
1688 (gnuv3_get_virtual_fn): Likewise.
1689 (gnuv3_decode_method_ptr): Likewise.
1690 (gnuv3_rtti_type): Call get_class_arch to determine architecture.
1691 Use it instead of current_gdbarch.
1692 (gnuv3_virtual_fn_field): Likewise.
1693 (gnuv3_baseclass_offset): Likewise.
1694 (gnuv3_print_method_ptr): Likewise.
1695 (gnuv3_method_ptr_to_value): Likewise.
1696 (gnuv3_method_ptr_size): Add TYPE parameter. Use it to determine
1697 class architecture. Use architecture types instead of builtin types.
1698 (gnuv3_make_method_ptr): Likewise.
1699
1700 * cp-valprint.c (cp_print_class_member): Expect pointer type
1701 instead of class type. Use its length when extracting value.
1702 * c-valprint.c (c_val_print): Update call to cp_print_class_member.
1703
1704 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1705
1706 * stack.c (return_command): Use frame architecture to determine
1707 default integer return type.
1708
1709 * f-valprint.c (f77_get_dynamic_lowerbound): Use frame architecture
1710 to determine pointer types.
1711 (f77_get_dynamic_upperbound): Likewise.
1712
1713 * objc-lang.c (OBJC_FETCH_POINTER_ARGUMENT): Remove.
1714 (resolve_msgsend): Use architecture of current frame to determine
1715 pointer types. Inline OBJC_FETCH_POINTER_ARGUMENT.
1716 (resolve_msgsend_stret, resolve_msgsend_super,
1717 resolve_msgsend_super_stret): Likewise.
1718
1719 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1720
1721 * alpha-tdep.c (alpha_register_type): Use builtin_type (gdbarch)
1722 instead of builtin_type_ macros.
1723 * amd64-tdep.c (amd64_register_type): Likewise.
1724 (amd64_get_longjmp_target): Likewise.
1725 * arm-tdep.c (arm_register_type): Likewise.
1726 * avr-tdep.c (avr_register_type): Likewise.
1727 * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
1728 * frv-tdep.c (frv_register_type): Likewise.
1729 * h8300-tdep.c (h8300_register_type): Likewise.
1730 * hppa-tdep.c (hppa32_convert_from_func_ptr_addr,
1731 hppa_skip_trampoline_code): Likewise.
1732 * i386-tdep.c (i386_register_type): Likewise.
1733 (i386_unwind_pc, i386_sse_type): Likewise.
1734 * ia64-tdep.c (ia64_register_type): Likewise.
1735 * m32r-tdep.c (m32r_register_type): Likewise.
1736 * m68k-tdep.c (m68k_register_type, m68k_unwind_pc): Likewise.
1737 * m88k-tdep.c (m88k_register_type): Likewise.
1738 * mep-tdep.c (mep_register_type): Likewise.
1739 * mips-tdep.c (mips_pseudo_register_type): Likewise.
1740 * mn10300-tdep.c (mn10300_register_type): Likewise.
1741 * mt-tdep.c (mt_copro_register_type): Likewise.
1742 * rs6000-tdep.c (rs6000_builtin_type_vec64): Likewise.
1743 (rs6000_convert_register_p, rs6000_register_to_value,
1744 rs6000_value_to_register): Likewise.
1745 * s390-tdep.c (s390_register_type): Likewise.
1746 * sh64-tdep.c (sh64_register_type): Likewise.
1747 (sh64_build_float_register_type, sh64_do_fp_register): Likewise.
1748 * sh-tdep.c (sh_sh2a_register_type, sh_sh3e_register_type,
1749 sh_sh4_build_float_register_type, sh_sh4_register_type,
1750 sh_default_register_type): Likewise.
1751 * sparc64-tdep.c (sparc64_register_type): Likewise.
1752 * sparc-tdep.c (sparc32_register_type): Likewise.
1753 * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
1754 * v850-tdep.c (v850_register_type): Likewise.
1755 * vax-tdep.c (vax_register_type): Likewise.
1756 * xtensa-tdep.c (xtensa_register_type, xtensa_unwind_pc,
1757 xtensa_push_dummy_call): Likewise.
1758
1759 * std-regs.c (value_of_builtin_frame_fp_reg,
1760 value_of_builtin_frame_pc_reg): Likewise.
1761 * target-descriptions.c (tdesc_register_type): Likewise.
1762
1763 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1764
1765 * ada-lang.c (ada_coerce_to_simple_array_type): Use builtin_type_int32
1766 instead of builtin_type_int as default unspecified integral type.
1767 (ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
1768 assign_component, to_fixed_range_type): Likewise.
1769 * ada-typeprint.c (print_range, print_range_bound,
1770 print_range_type_named): Likewise.
1771 * ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
1772 * eval.c (evaluate_subexp_standard): Likewise.
1773 * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
1774 * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
1775 build_gdb_vtable_type): Likewise.
1776 * jv-lang.c (java_array_type): Likewise.
1777 * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
1778 * m2-valprint.c (m2_print_long_set): Likewise.
1779 * parse.c (follow_types): Likewise.
1780 * p-typeprint.c (pascal_type_print_base): Likewise.
1781 * valops.c (value_one, value_array, value_string,
1782 value_bitstring): Likewise.
1783 * value.c (allocate_repeat_value, value_from_string): Likewise.
1784 * varobj.c (c_describe_child): Likewise.
1785 * mt-tdep.c (mt_register_type): Likewise.
1786 * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
1787 * sh64-tdep.c (sh64_build_float_register_type): Likewise.
1788
1789 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1790
1791 * defs.h (struct gdbarch): Add forward declaration.
1792 (set_next_address): Add GDBARCH argument.
1793 * printcmd.c (set_next_address): Use it to find pointer type.
1794 * breakpoint.c (breakpoint_1): Update call.
1795 * source.c (line_info): Likewise.
1796 * findcmd.c (find_command): Use current_gdbarch to find pointer type.
1797
1798 * breakpoint.c (set_breakpoint_count): Use platform-neutral
1799 types for internal variable values.
1800 * infrun.c (handle_inferior_event): Likewise.
1801 * source.c (forward_search_command, reverse_search_command): Likewise.
1802 * tracepoint.c (set_tracepoint_count, set_traceframe_num,
1803 set_tracepoint_num, set_traceframe_context): Likewise.
1804
1805 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1806
1807 * gdbtypes.h (struct builtin_type): Remove builtin_true_char
1808 and builtin_true_unsigned_char.
1809 (builtin_type_true_char): Remove macro, add extern declaration.
1810 (builtin_type_true_unsigned_char): Add extern declaration.
1811 * gdbtypes.c (builtin_type_true_char): New global variable.
1812 (builtin_type_true_unsigned_char): Likewise.
1813 (_initialize_gdbtypes): Initialize them.
1814 (gdbtypes_post_init): Do not initialize builtin_true_char
1815 and builtin_true_unsigned_char members of struct builtin_type.
1816
1817 * printcmd.c (print_scalar_formatted): Do not use builtin_type;
1818 use builtin_type_true_unsigned_char instead.
1819
1820 * ada-valprint.c (ada_val_print_1): Use builtin_type_true_char
1821 instead of builtin_type_char for internal string.
1822
1823 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1824
1825 * gdbtypes.h (builtin_type_void): Remove macro, add declaration.
1826 (builtin_type_f_void): Remove macro.
1827 * gdbtypes.c (builtin_type_void): New global variable.
1828 (_initialize_gdbtypes): Initialize it.
1829
1830 * gnu-v3-abi.c (build_gdb_vtable_type): Do not call
1831 lookup_pointer_type or lookup_function_type on builtin_type_void.
1832 * printcmd.c (set_next_address): Likewise.
1833 * objc-lang.c (value_nsstring): Likewise.
1834 * mt-tdep.c (mt_copro_register_type): Likewise.
1835 * xtensa-tdep.c (xtensa_register_type): Likewise.
1836
1837 * symfile.c (syms_from_objfile): Remove special handling
1838 of builtin_type_void and builtin_type_char.
1839
1840 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1841
1842 * eval.c (evaluate_subexp_standard): Use exp->gdbarch types instead
1843 of builtin_type_ macros when handling OP_OBJC_ operations.
1844 * objc-lang.c (print_object_command): Likewise.
1845
1846 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1847
1848 * ada-valprint.c: Include "objfiles.h".
1849 (ada_val_print_1): Use the gdbarch associated with the objfile whether
1850 a System.Address type is defined to retrieve the proper pointer type
1851 to use to print it.
1852
1853 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1854
1855 * ada-lang.c (value_pos_atr): Add TYPE argument. Use it as
1856 result type instead of builtin_type_int.
1857 (value_subscript_packed): Use pos_atr instead of value_pos_atr.
1858 (ada_value_subscript): Update call to value_pos_atr.
1859 (ada_value_ptr_subscript): Likewise.
1860 (ada_evaluate_subexp): Likewise.
1861
1862 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1863
1864 * ada-lang.c (cast_to_fixed): Do not cast to builtin_type_double.
1865 (cast_from_fixed_to_double): Rename to ...
1866 (cast_from_fixed): ... this. Add TYPE parameter. Use it instead
1867 of builtin_type_double.
1868 (ada_value_cast): Use cast_from_fixed instead of casting result
1869 of cast_from_fixed_to_double.
1870 (ada_evaluate_subexp): Update calls to cast_from_fixed_to_double.
1871
1872 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1873
1874 * valops.c (value_ind): No longer allow dereferencing an
1875 integer type.
1876 * eval.c (evaluate_subexp_standard): Handle deferencing an
1877 integer type here.
1878 * ada-lang.c (ada_evaluate_subexp): Likewise.
1879
1880 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1881
1882 * ada-valprint.c (ada_val_print_1): When implicitly dereferencing
1883 a reference type, pass the reference type directly to unpack_pointer.
1884 * c-valprint.c (c_val_print): Likewise.
1885 * f-valprint.c (f_val_print): Likewise.
1886 * m2-valprint.c (print_variable_at_address, m2_val_print): Likewise.
1887 * p-valprint.c (pascal_val_print): Likewise.
1888
1889 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1890
1891 * eval.c (evaluate_subexp_standard): Use builtin_type_int8
1892 to construct the EVAL_SKIP dummy return value.
1893 * ada-lang.c (ada_evaluate_subexp): Likewise.
1894 * jv-lang.c (evaluate_subexp_java): Likewise.
1895 * m2-lang.c (evaluate_subexp_modula2): Likewise.
1896 * scm-lang.c (evaluate_exp): Likewise.
1897
1898 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1899
1900 * value.h (coerce_enum, coerce_number): Remove prototypes.
1901 * value.c (coerce_enum, coerce_number): Remove.
1902 * valarith.c (value_x_binop): Do not call coerce_enum.
1903 (value_x_unop): Likewise.
1904 (value_logical_not): Call coerce_array instead of coerce_number.
1905
1906 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1907
1908 * ax-gdb.c: Include "language.h".
1909 (gen_frame_args_address): Add GDBARCH parameter; use it
1910 instead of current_gdbarch.
1911 (gen_frame_locals_address): Likewise.
1912 (gen_var_ref): Add GDBARCH parameter. Update calls to
1913 gen_frame_args_address and gen_frame_locals_address. Use
1914 pointer type from gdbarch.
1915 (gen_usual_unary): Add EXP parameter. Use integer type
1916 from exp->gdbarch.
1917 (gen_usual_arithmetic): Likewise.
1918 (gen_integral_promotions): Likewise.
1919 (gen_add, gen_sub): Remove.
1920 (gen_ptradd, gen_ptrsub, gen_ptrdiff): New functions.
1921 (gen_logical_not): Use passed-in boolean result type
1922 instead of builtin_type_int.
1923 (gen_complement): Do not call gen_usual_unary or
1924 gen_integral_promotions.
1925 (gen_struct_ref): Call require_rvalue instead of gen_usual_unary.
1926 (gen_repeat): Add EXP parameter. Update call to gen_expr.
1927 Use builtin_type_int32 as internal range type.
1928 (gen_sizeof): Add EXP and SIZE_TYPE parameters. Use SIZE_TYPE
1929 as result type. Update call to gen_expr.
1930 (gen_expr): Add EXP parameter. Update calls to gen_expr,
1931 gen_repeat, gen_var_ref, gen_usual_unary, gen_usual_arithmetic,
1932 and gen_integral_promotions. Call gen_ptradd, gen_ptrsub,
1933 gen_ptrdiff, or gen_binop instead of gen_add or gen_sub.
1934 Use exp->gdbarch instead of current_gdbarch.
1935 Call language_bool_type to determine result type of UNOP_LOGICAL_NOT.
1936
1937 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1938
1939 * eval.c (evaluate_subexp_standard): Add calls to binop_promote
1940 and unop_promote before calling value_binop et. al.
1941 * ada-lang.c (ada_evaluate_subexp): Add calls to binop_promote
1942 and unop_promote before calling value_binop et. al.
1943
1944 * valarith.c (value_binop): Do not call binop_promote or unop_promote.
1945 (value_pos): Do not call unop_promote.
1946 (value_neg, value_complement): Likewise.
1947
1948 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1949
1950 * value.h (unop_promote, binop_promote): Add prototypes.
1951 * eval.c (unop_promote, binop_promote): New functions.
1952 * valarith.c (unop_result_type, binop_result_type): Remove.
1953 (value_binop): Call binop_promote or unop_promote.
1954 Inline remaining parts of binop_result_type. Remove special
1955 code to truncate integer values for unsigned operations.
1956 (value_pos): Call unop_promote. Inline remaining parts of
1957 unop_result_type.
1958 (value_neg, value_complement): Likewise.
1959
1960 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1961
1962 * value.h (value_add, value_sub): Remove.
1963 (value_ptradd, value_ptrsub, value_ptrdiff): Add prototypes.
1964 * valarith.c (value_add, value_sub): Remove.
1965 (value_ptradd, value_ptrsub, value_ptrdiff): New functions.
1966 (find_size_for_pointer_math): Add assertion. Update comment.
1967 (value_binop): Update comment.
1968
1969 * eval.c (ptrmath_type_p): New function.
1970 (evaluate_subexp_standard): Replace value_add and value_sub
1971 by value_ptradd, value_ptrsub, value_ptrdiff or value_binop.
1972 Use builtin_type_uint8 instead of builtin_type_char to hold
1973 the increment for BINOP_{PRE,POST}{IN,DE}CREMENT operations.
1974 * valarith.c (value_subscript): Replace value_add by
1975 value_ptradd. Replace value_sub by value_binop.
1976 * ada-lang.c (ada_value_ptr_subscript): Likewise.
1977 (ada_tag_name_2): Replace value_add by value_ptradd.
1978 (ada_evaluate_subexp): Replace value_add and value_sub by
1979 value_binop.
1980 * m2-lang.c (evaluate_subexp_modula2): Replace value_add
1981 by value_ptradd.
1982 * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
1983 * gnu-v3-abi.c (gnuv3_method_ptr_to_value): Likewise.
1984
1985 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1986
1987 * eval.c (evaluate_subexp_for_sizeof): Use builtin_int type of
1988 the expression architecture instead of builtin_type_int as the
1989 sizeof return type.
1990
1991 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
1992
1993 * expression.h (enum exp_opcode): Document OP_COMPLEX to take
1994 a type parameter as expression element.
1995 * eval.c (evaluate_subexp_standard) [OP_COMPLEX]: Retrieve result
1996 type as expression element.
1997 * f-exp.y: Pass in type when buildin OP_COMPLEX expression.
1998 * parse.c (operator_length_standard): Update length of OP_COMPLEX.
1999
2000 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
2001
2002 * language.h (struct language_arch_info): New members
2003 bool_type_default and bool_type_symbol.
2004 (lang_bool_type): Remove prototype.
2005 (LA_BOOL_TYPE): Remove macro.
2006 (language_bool_type): Add prototype.
2007 * language.c (lang_bool_type): Remove.
2008 (language_bool_type): New function.
2009
2010 * value.h (value_in): Change return value to int.
2011 * value.c (value_in): Return int instead of struct value *.
2012
2013 * eval.c (evaluate_subexp_standard): Call language_bool_type instead
2014 of using LA_BOOL_TYPE. Update call to value_in.
2015 * ada-lang.c (ada_evaluate_subexp): Call language_bool_type instead
2016 of using LA_BOOL_TYPE or builtin_type_int for boolean values.
2017
2018 * language.c (unknown_language_arch_info): Set bool_type_default member
2019 of struct language_arch_info.
2020 * ada-lang.c (ada_language_arch_info): Set bool_type_symbol and
2021 bool_type_default members of struct language_arch_info.
2022 * c-lang.c (c_language_arch_info): Set bool_type_default member
2023 of struct language_arch_info.
2024 (cplus_language_arch_info): Set bool_type_symbol and bool_type_default
2025 members of struct language_arch_info.
2026 * f-lang.c (f_language_arch_info): Set bool_type_symbol and
2027 bool_type_default members of struct language_arch_info.
2028 * jv-lang.c (java_language_arch_info): Set bool_type_symbol and
2029 bool_type_default members of struct language_arch_info.
2030 * m2-lang.c (m2_language_arch_info): Set bool_type_symbol and
2031 bool_type_default members of struct language_arch_info.
2032 * p-lang.c (p_language_arch_info): Set bool_type_symbol and
2033 bool_type_default members of struct language_arch_info.
2034
2035 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
2036
2037 * jv-lang.c (enum java_primitive_types): New type.
2038 (java_language_arch_info): New function.
2039 (java_language): Use it instead of c_language_arch_info.
2040
2041 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
2042
2043 * value.h (value_bitstring_subscript): New prototype.
2044 * valarith.h (value_bitstring_subscript): New function.
2045 (value_subscript): No longer handle TYPE_CODE_BITSTRING.
2046 * eval.c (evaluate_subexp_standard): Call value_bitstring_subscript
2047 instead of value_subscript to handle TYPE_CODE_BITSTRING.
2048
2049 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
2050
2051 * expression.h (struct expression): New member GDBARCH.
2052 * parse.c (parse_exp_in_context): Initialize it.
2053 * parser-def.h (parse_gdbarch, parse_language): New macros.
2054
2055 * ada-exp.y (parse_type): New macro.
2056 Replace builtin_type_ macros by using parse_type.
2057 Replace current_language by parse_language.
2058 * ada-lex.l (processInt): Replace current_gdbarch by parse_gdbarch.
2059 Replace builtin_type_ macros.
2060
2061 * c-exp.y (parse_type): New macro.
2062 Replace builtin_type_ macros by using parse_type.
2063 (parse_number): Replace current_gdbarch by parse_gdbarch.
2064 (yylex): Replace current_language by parse_language.
2065
2066 * f-exp.y (parse_type, parse_f_type): New macros.
2067 Replace builtin_type_ macros by using parse_{f_,}type.
2068 (parse_number): Replace current_gdbarch by parse_gdbarch.
2069 (yylex): Replace current_language by parse_language.
2070
2071 * jv-exp.y (parse_type): New macro.
2072 (parse_number): Replace builtin_type_ macros by using parse_type.
2073
2074 * m2-exp.y (parse_type, parse_m2_type): New macros.
2075 Replace builtin_type_ macros by using parse_{m2_,}type.
2076
2077 * objc-exp.y (parse_type): New macro.
2078 Replace builtin_type_ macros by using parse_type.
2079 (parse_number): Replace current_gdbarch by parse_gdbarch.
2080 (yylex): Replace current_language by parse_language.
2081
2082 * p-exp.y (parse_type): New macro.
2083 Replace builtin_type_ macros by using parse_type.
2084 (parse_number): Replace current_gdbarch by parse_gdbarch.
2085 (yylex): Replace current_language by parse_language.
2086
2087 2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
2088
2089 * parser-defs.h (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE
2090 and DATA_SYMBOL_TYPE arguments.
2091 * parse.c (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE and
2092 DATA_SYMBOL_TYPE arguments. Replace use of builtin_type_CORE_ADDR.
2093 (write_dollar_variable): Update call.
2094
2095 * ada-exp.y (write_var_or_type): Update call.
2096 * c-exp.y: Likewise.
2097 * f-exp.y: Likewise.
2098 * jv-exp.y: Likewise.
2099 * m2-exp.y: Likewise.
2100 * objc-exp.y: Likewise.
2101 * p-exp.y: Likewise.
2102
2103 2008-09-10 Joel Brobecker <brobecker@adacore.com>
2104
2105 * ada-lang.c (ada_parent_type): Add handling of the case where
2106 the _parent field is a pointer and/or has a parallel XVS type.
2107 (ada_evaluate_subexp) [OP_VAR_VALUE]: When doing an
2108 EVAL_AVOID_SIDE_EFFECTS evaluation of a tagged type, return
2109 the type of the tag instead of doing forcing an EVAL_NORMAL
2110 expression evaluation.
2111
2112 2008-09-10 Paul N. Hilfinger <hilfinger@adacore.com>
2113 Joel Brobecker <brobecker@adacore.com>
2114
2115 * ada-lang.c (is_digits_suffix): New function.
2116 (is_dot_digits_suffix): Remove.
2117 (ada_lookup_symbol_list): Remove digits suffix from minimal symbols
2118 before looking up in symbol table, and do not use wild matches on them.
2119 (wild_match): Reimplement for speed and to allow matching of operator
2120 symbols.
2121 (is_valid_name_for_wild_match): Return zero for names that do not
2122 follow the GNAT encoding.
2123
2124 (is_name_suffix): Fix typo in comment.
2125 (to_record_with_fixed_variant_part): Ditto.
2126
2127 2008-09-10 Pedro Alves <pedro@codesourcery.com>
2128
2129 * Makefile.in (gnu-nat.o): New rule.
2130
2131 2008-09-10 Joel Brobecker <brobecker@adacore.com>
2132
2133 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_SIZE]: Use
2134 archecture-neutral builtin_type_int32 instead of builtin_type_int.
2135
2136 2008-09-10 Joel Brobecker <brobecker@adacore.com>
2137
2138 * ada-lang.c (ada_evaluate_subexp) [BINOP_ADD, BINOP_SUB]:
2139 Add special handling for pointer types.
2140
2141 2008-09-10 Pedro Alves <pedro@codesourcery.com>
2142
2143 * inf-ttrace.c (inf_ttrace_follow_fork): Declare locals at the
2144 right scope level.
2145 (inf_ttrace_resume, inf_ttrace_wait): Typos.
2146
2147 2008-09-10 Ulrich Weigand <uweigand@de.ibm.com>
2148
2149 * ada-lang.c (ada_array_length): Use builtin_type_int32 instead
2150 of builtin_type_int.
2151 (ada_evaluate_subexp) [UNOP_IN_RANGE]: Use operand range type
2152 instead of builtin_type_int.
2153
2154 2008-09-09 Pedro Alves <pedro@codesourcery.com>
2155
2156 * infrun.c (normal_stop): Run hook-stop last.
2157
2158 2008-09-09 Pedro Alves <pedro@codesourcery.com>
2159
2160 * gnu-nat.c (gnu_pid_to_exec_file): Delete.
2161 (init_gnu_ops): Don't register it.
2162
2163 2008-09-09 Pedro Alves <pedro@codesourcery.com>
2164
2165 * gnu-nat.c (gnu_attach): Push target before fetching the list of
2166 threads.
2167
2168 2008-09-08 Daniel Jacobowitz <dan@codesourcery.com>
2169
2170 * valops.c (value_cast_structs): Return NULL for failure.
2171 (value_cast): Handle NULL from value_cast_structs.
2172 (value_fetch_lazy): Call check_typedef. Remove unused variable.
2173
2174 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2175
2176 * inferior.h (context_switch_to): Delete.
2177 * infrun.c (context_switch): Don't save and load infrun state.
2178 (context_switch_to): Delete.
2179
2180 * infcmd.c (proceed_thread_callback): Replace context_switch_to
2181 calls by switch_to_thread calls.
2182
2183 * gdbthread.h (save_infrun_state, load_infrun_state): Delete.
2184 * thread.c (main_thread_state, main_thread_executing): Delete.
2185 (inferior_thread): Delete references to them.
2186 (add_thread_silent): Fix case where we're adding a thread with the
2187 same ptid as an exited thread. Remove references to
2188 context-switching.
2189 (load_infrun_state, save_infrun_state): Delete.
2190 (thread_alive, is_thread_state, any_running, is_executing)
2191 (set_executing): Remove the special handling for targets that
2192 don't register any thread.
2193 (restore_current_thread, thread_apply_all_command)
2194 (do_captured_thread_select): Unconditionally call
2195 switch_to_thread.
2196
2197 * mi/mi-main.c (mi_cmd_execute): Check for exited threads.
2198 Call switch_to_thread instead of context_switch_to.
2199
2200 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2201
2202 Remove global continuations in favour of a per-thread
2203 continuations.
2204
2205 * gdbthread.h (struct thread_info): Add comments around
2206 continuations and intermediate_continuations.
2207 (save_infrun_state, load_infrun_state): Delete continuations and
2208 intermediate_continuations arguments.
2209 * infrun.c (context_switch): Don't context-switch the continuations.
2210 * thread.c (clear_thread_inferior_resources): Discard all
2211 continuations of the thread we're clearing.
2212 (save_infrun_state, load_infrun_state): Delete continuations and
2213 intermediate_continuations arguments, and the code referencing
2214 them.
2215 * utils.c: Include "gdbthread.h".
2216 (cmd_continuation, intermediate_continuation): Delete.
2217 (add_continuation): Add thread_info* argument. Install the
2218 continuation on it.
2219 (restore_thread_cleanup): New.
2220 (do_all_continuations_ptid, do_all_continuations_thread_callback):
2221 New.
2222 (do_all_continuations): Reimplement.
2223 (discard_all_continuations_thread_callback,
2224 discard_all_continuations_thread): New.
2225 (discard_all_continuations): Reimplement.
2226 (add_intermediate_continuation): Add thread_info* argument.
2227 Install the continuation on it.
2228 (do_all_intermediate_continuations_thread_callback)
2229 (do_all_intermediate_continuations_thread): New.
2230 (do_all_intermediate_continuations): Reimplement.
2231 (discard_all_intermediate_continuations_thread_callback): New.
2232 (discard_all_intermediate_continuations_thread): New.
2233 (discard_all_intermediate_continuations): Reimplement.
2234
2235 * breakpoint.c (until_break_command): Install the continuation on
2236 the current thread.
2237
2238 * defs.h (cmd_continuation, intermediate_continuation): Delete.
2239 (struct thread_info): Forward declare.
2240 (add_continuation, add_intermediate_continuation): Add
2241 thread_info* argument.
2242 (do_all_continuations_thread, discard_all_continuations_thread)
2243 (do_all_intermediate_continuations_thread)
2244 (discard_all_intermediate_continuations_thread): Declare.
2245 * inf-loop.c (inferior_event_handler): In non-stop only run
2246 continuations on the thread that stopped. In all-stop, run
2247 continuations on all threads.
2248 * infcmd.c (step_once, finish_command): Adjust.
2249
2250 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2251
2252 Remove the global stop_step in favour of a per-thread
2253 stop_step.
2254
2255 * inferior.h (stop_step): Delete.
2256
2257 * gdbthread.h (struct thread_info): Add comments to stop_step.
2258 (save_infrun_state, load_infrun_state): Remove stop_step argument.
2259 * thread.c (load_infrun_state, save_infrun_state): Remove
2260 stop_step argument, and references to it.
2261
2262 * infrun.c (clear_proceed_status): Clear stop_step.
2263 (fetch_inferior_event): Adjust.
2264 (context_switch): Don't context-switch stop_step.
2265 (handle_inferior_event): Adjust.
2266 (normal_stop): Adjust.
2267 (save_inferior_status, restore_inferior_status): Adjust.
2268
2269 * infcmd.c (stop_step): Delete.
2270 (step_1, step_1_continuation, step_once, until_next_command):
2271 Adjust.
2272
2273 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2274
2275 Remove the global step_multi in favour of a per-thread
2276 step_multi.
2277
2278 * inferior.h (step_multi): Delete.
2279 * gdbthread.h (struct thread_info): Add comments around
2280 step_multi.
2281 (save_infrun_state, load_infrun_state): Remove step_multi
2282 parameter.
2283 * thread.c (load_infrun_state, save_infrun_state): Remove
2284 step_multi argument, and references to it.
2285 * infcmd.c (step_multi): Delete.
2286 (step_1): Adjust.
2287 (step_1_continuation, until_next_command): Adjust.
2288 * infrun.c (fetch_inferior_event): Adjust.
2289 (context_switch): Don't context-switch step_multi.
2290 (print_stop_reason, normal_stop): Adjust.
2291
2292 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2293
2294 Remove the global stop_signal in favour of a per-thread
2295 stop_signal.
2296
2297 * inferior.h (stop_signal): Delete.
2298 * gdbthread.h (save_infrun_state, load_infrun_state): Remove
2299 stop_signal argument.
2300 * thread.c (load_infrun_state, save_infrun_state): Remove
2301 stop_signal argument. Don't reference it.
2302
2303 * infcmd.c (stop_signal): Delete.
2304 (program_info): Adjust.
2305 * infrun.c (resume): Clear stop_signal.
2306 (proceed): Adjust. Pass the last stop_signal to the thread we're
2307 resuming.
2308 (context_switch): Don't context-switch stop_signal.
2309 (handle_inferior_event, keep_going): Adjust.
2310 (save_inferior_status, restore_inferior_status): Adjust.
2311
2312 * fbsd-nat.c: Include "gdbthread.h".
2313 (find_signalled_thread, find_stop_signal): New.
2314 (fbsd_make_corefile_notes): Use it.
2315 * fork-child.c (startup_inferior): Adjust.
2316
2317 * linux-nat.c (get_pending_status): Adjust.
2318 (linux_nat_do_thread_registers): Adjust.
2319 (find_signalled_thread, find_stop_signal): New.
2320 (linux_nat_do_thread_registers): Add stop_signal parameter.
2321 (struct linux_nat_corefile_thread_data): Add stop_signal member.
2322 (linux_nat_corefile_thread_callback): Pass stop_signal.
2323 (linux_nat_do_registers): Delete.
2324 (linux_nat_make_corefile_notes): Use find_stop_signal. Assume
2325 there's always a thread.
2326
2327 * procfs.c (find_signalled_thread, find_stop_signal): New.
2328 (find_stop_signal): New.
2329 (procfs_do_thread_registers): Add stop_signal parameter.
2330 (struct procfs_corefile_thread_data): Add stop_signal member.
2331 (procfs_corefile_thread_callback): Pass args->stop_signal.
2332 (procfs_make_note_section): Find the last stop_signal.
2333
2334 * solib-irix.c: Include gdbthread.h.
2335 (irix_solib_create_inferior_hook): Adjust.
2336 * solib-osf.c: Include gdbthread.h.
2337 (osf_solib_create_inferior_hook): Adjust.
2338 * solib-sunos.c: Include gdbthread.h.
2339 (sunos_solib_create_inferior_hook): Adjust.
2340 * solib-svr4.c: Include gdbthread.h.
2341 (svr4_solib_create_inferior_hook): Adjust.
2342
2343 * win32-nat.c (do_initial_win32_stuff): Adjust.
2344
2345 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2346
2347 * gdbthread.h (struct thread_info): Add comments around
2348 proceed_to_finish.
2349 (save_infrun_state, load_infrun_state): Remove proceed_to_finish
2350 argument.
2351 * thread.c (load_infrun_state, save_infrun_state): Delete
2352 proceed_to_finish argument and references to it.
2353
2354 * infcall.c (call_function_by_hand): Adjust.
2355 * infcmd.c (finish_command): Adjust.
2356 * infrun.c (proceed_to_finish): Delete.
2357 (clear_proceed_status): Adjust.
2358 (context_switch): Don't context-switch proceed_to_finish.
2359 (normal_stop, save_inferior_status, restore_inferior_status):
2360 Adjust.
2361
2362 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2363
2364 * inferior.h (stop_bpstat): Delete.
2365
2366 * breakpoint.h (bpstat_do_actions): Remove bpstat* argument.
2367
2368 * breakpoint.c (bpstat_do_actions): Rename to ...
2369 (bpstat_do_actions_1): ... this. Make static. Change return type
2370 to int. Return true if a breakpoint proceeded.
2371 (bpstat_do_actions): New, as wrapper around bpstat_do_actions_1.
2372 (delete_breakpoint): Don't reference the global stop_bpstat; it's
2373 gone.
2374
2375 * gdbthread.h (struct thread_info): Add stop_bpstat.
2376 (save_infrun_state, load_infrun_state): Remove stop_bpstat
2377 argument.
2378 * thread.c (load_infrun_state, save_infrun_state): Remove
2379 stop_bpstat argument, and the code referencing it.
2380
2381 * infcall.c: Include "gdbthread.h".
2382 (call_function_by_hand): Adjust.
2383 * exceptions.c: Include "gdbthread.h".
2384 (throw_exception): Adjust.
2385 * infcmd.c (stop_bpstat): Delete.
2386 (continue_command): In all-stop, set the ignore count on the
2387 thread that reported the stop. In non-stop, set it on the current
2388 thread.
2389 (finish_command_continuation): Adjust.
2390 (program_info): Adjust.
2391 * infrun.c (clear_proceed_status): Adjust.
2392 (context_switch): Don't context-switch stop_bpstat.
2393 (handle_inferior_event): Adjust.
2394 (normal_stop): Adjust.
2395 (save_inferior_status, restore_inferior_status): Adjust.
2396
2397 * inf-loop.c (inferior_event_handler): Remove parameter to
2398 bpstat_do_actions call.
2399 * top.c (command_loop): Remove parameter to bpstat_do_actions
2400 call. Call it unconditionally.
2401 * event-top.c (command_handler): Ditto.
2402 * python/python.c (execute_gdb_command): Ditto.
2403
2404 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2405
2406 * inferior.h (step_over_calls): Delete.
2407
2408 * gdbthread.h (save_infrun_state, load_infrun_state): Remove
2409 step_over_calls argument.
2410 * thread.c (save_infrun_state, load_infrun_state): Remove
2411 step_over_calls argument. Adjust.
2412
2413 * infcmd.c (step_over_calls): Delete.
2414 (step_1): Adjust.
2415 * infrun.c (clear_proceed_status): Adjust.
2416 (context_switch): Don't context-switch step_over_calls.
2417 (handle_inferior_event, save_inferior_status)
2418 (restore_inferior_status): Adjust.
2419
2420 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2421
2422 Remove context switching in favour of accessing thread_info fields
2423 directly.
2424
2425 * infrun.c (stepping_over_breakpoint, step_resume_breakpoint):
2426 Delete.
2427 (struct thread_stepping_state): Delete.
2428 (gtss, tss): Delete.
2429 (follow_inferior_reset_breakpoints, follow_exec)
2430 (resume, clear_proceed_status): Adjust.
2431 (prev_pc): Delete.
2432 (proceed, start_remote, init_wait_for_inferior): Adjust.
2433 (struct execution_control_state): Add event_thread member.
2434 (delete_step_resume_breakpoint_callback)
2435 (delete_step_thread_step_resume_breakpoint)
2436 (delete_step_thread_step_resume_breakpoint_cleanup)
2437 (delete_step_thread_step_resume_breakpoint): New.
2438 (wait_for_inferior, init_execution_control_state): Use
2439 delete_step_thread_step_resume_breakpoint_cleanup.
2440 (wait_for_inferior): Set the event_thread.
2441 (fetch_inferior_event): Ditto. Delete the step-resume breakpoint
2442 with delete_step_thread_step_resume_breakpoint.
2443 (init_thread_stepping_state): Change parameter type to
2444 thread_info. Adjust.
2445 (context_switch): Don't context switch prev_pc,
2446 stepping_over_breakpoint, step_resume_breakpoint,
2447 step_range_start, step_range_end, step_frame_id,
2448 tss->stepping_over_breakpoint,
2449 tss->stepping_through_solib_after_catch,
2450 tss->stepping_through_solib_catchpoints, tss->current_line, or
2451 tss->current_symtab.
2452 (adjust_pc_after_break, handle_inferior_event)
2453 (currently_stepping, step_into_function)
2454 (insert_step_resume_breakpoint_at_sal)
2455 (insert_longjmp_resume_breakpoint, keep_going): Adjust.
2456 (clear_stepping_state): New.
2457 (normal_stop): Adjust.
2458 (save_inferior_status, restore_inferior_status): Adjust.
2459
2460 * gdbthread.h (struct thread_info): Comments describing the
2461 members moved here. Add step_after_step_resume_breakpoint.
2462 (delete_step_resume_breakpoint): Add thread_info argument.
2463 (save_infrun_state, load_infrun_state): Remove prev_pc,
2464 trap_expected, step_resume_breakpoint, step_range_start,
2465 step_range_end, step_frame_id, another_trap,
2466 stepping_through_solib_after_catch,
2467 stepping_through_solib_catchpoints, current_line and
2468 current_symtab function arguments.
2469 (inferior_thread): Declare.
2470
2471 * thread.c (inferior_thread): New.
2472 (delete_step_resume_breakpoint): Add a thread_info parameter and
2473 rewrite.
2474 (load_infrun_state, save_infrun_state): Remove prev_pc,
2475 trap_expected, step_resume_breakpoint, step_range_start,
2476 step_range_end, step_frame_id, stepping_over_breakpoint,
2477 stepping_through_solib_after_catch,
2478 stepping_through_solib_catchpoints, current_line and
2479 current_symtab args. Remove code referencing them.
2480
2481 * infcmd.c (step_range_start, step_range_end, step_frame_id):
2482 Delete.
2483 (step_1, step_once, until_next_command): Adjust.
2484
2485 * inferior.h (step_range_start, step_range_end, step_frame_id):
2486 Delete.
2487
2488 * linux-nat.c (linux_child_follow_fork): If following the child,
2489 move the step state to it. Adjust.
2490 * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
2491 * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
2492
2493 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2494
2495 * bsd-uthread.c (bsd_uthread_find_new_threads): Claim the main
2496 thread.
2497
2498 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2499
2500 * corelow.c (add_to_thread_list): If this is the first time we
2501 hear about thread info, update inferior_ptid.
2502 (core_open): Clear the thread list and set inferior_ptid before
2503 acknowledging a new inferior. Find threads before fetching
2504 register info. Give an upper target layer a chance to find and
2505 claim new threads. Print core generation and stop signal info
2506 after finding new threads.
2507 (get_core_register_section): Look at the lwp member of
2508 inferior_ptid for detecting if we have threads info, instead of
2509 the pid member.
2510 (core_pid_to_str): New.
2511 (init_core_ops): Register core_pid_to_str.
2512
2513 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2514
2515 * spu-linux-nat.c (spu_child_post_startup_inferior)
2516 (spu_child_post_attach): Don't add the main thread here.
2517
2518 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2519
2520 Use ptid_t.tid to store thread ids instead of ptid_t.pid.
2521
2522 * gnu-nat.c (inf_validate_procs): If this is the first time we're
2523 seeing a thread id, extend the main thread's ptid. If we still
2524 have pending execs, don't be verbose about new threads.
2525 (gnu_wait, gnu_resume, gnu_attach, gnu_thread_alive)
2526 (gnu_pid_to_str, cur_thread, sig_thread_cmd): Adjust.
2527 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers):
2528 Adjust.
2529
2530 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2531
2532 * procfs.c (to_attach): Create a procinfo for the current lwp.
2533 Add it to gdb's thread list.
2534 (procfs_fetch_registers, procfs_store_registers): Assume there's
2535 always an lwp.
2536 (procfs_wait): Don't add the main thread here.
2537 (procfs_init_inferior): Create a procinfo for the main lwp here.
2538 Change main thread's ptid with thread_change_ptid.
2539 (procfs_notice_thread): Check for exited threads.
2540 (procfs_corefile_thread_callback): Remove check for the main
2541 process.
2542 (procfs_make_note_section): Assume there is always a thread.
2543
2544 * sol-thread.c (sol_thread_attach): Clear sol_thread_active before
2545 attaching. Change the main thread ptid with thread_change_ptid.
2546 (sol_thread_detach): Clear sol_thread_active.
2547 (sol_thread_wait): Check for exited threads.
2548 (sol_thread_create_inferior): Clear sol_thread_active before
2549 creating a new inferior. Change the main thread ptid with
2550 thread_change_ptid.
2551 (sol_thread_mourn_inferior): Clear sol_thread_active.
2552 (sol_find_new_threads_callback): Check for exited threads.
2553
2554 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2555
2556 * inf-ttrace.c (inf_ttrace_wait): On TTEVT_LWP_CREATE and
2557 LWP_TERMINATE, resume the caller thread. On TTEVT_LWP_CREATE,
2558 TTEVT_LWP_EXIT and TTEVT_LWP_TERMINATE, don't stop the whole
2559 process, and return TARGET_WAITKIND_IGNORE.
2560
2561 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2562
2563 * inf-ttrace.c: Include <signal.h>
2564 (inf_ttrace_delete_dead_threads_callback): New.
2565 (inf_ttrace_resume_lwp): New.
2566 (inf_ttrace_resume_callback, inf_ttrace_resume): Rewrite. Don't
2567 delete dying threads until they are really dead.
2568 (inf_ttrace_wait): After stopping the whole process, delete any
2569 dying thread that is really dead by now.
2570 (inf_ttrace_thread_alive): Return 1.
2571 (inf_ttrace_extra_thread_info): New.
2572 (inf_ttrace_target): Register inf_ttrace_extra_thread_info.
2573
2574 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2575
2576 * inf-ttrace.c (inf_ttrace_follow_fork): Register the main thread
2577 of the child fork.
2578 (inf_ttrace_attach): Add the main thread.
2579 (inf_ttrace_resume_callback): Check for exited threads. Adjust
2580 for always a thread.
2581 (inf_ttrace_wait): Decorate the main thread's ptid with lwp info
2582 using thread_change_ptid, and set its private data. Don't add the
2583 main thread here.
2584 (inf_ttrace_pid_to_str): Adjust.
2585
2586 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2587
2588 * bsd-uthread.c (bsd_uthread_wait): Decorate the main thread with
2589 thread_change_ptid. Check for exited threads.
2590 (bsd_uthread_find_new_threads): Check for exited threads.
2591
2592 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2593
2594 * inf-ptrace.c: Include "gdbthread.h".
2595 (inf_ptrace_attach): Add the main thread here.
2596 * linux-nat.c (linux_nat_attach): Don't add the main thread here.
2597 Decorate the main thread id with the lwp id.
2598
2599 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2600
2601 * linux-nat.c (linux_nat_wait): Update inferior_ptid's ptid with
2602 thread_change_ptid. Don't add or mark the main thread as running
2603 and executing here.
2604 * fork-child.c (fork_inferior): Add the main thread here.
2605
2606 2008-09-08 Jerome Guitton <guitton@adacore.com>
2607
2608 * rs6000-tdep.c (rs6000_fetch_instruction)
2609 (rs6000_skip_stack_check): New functions.
2610 (skip_prologue): Skip stack check sequence.
2611
2612 2008-09-08 David Daney <ddaney@avtrex.com>
2613
2614 * dummy-frame.h (frame.h): Include it.
2615 (struct frame_id): Remove declaration.
2616
2617 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2618
2619 * spu-tdep.c (spu_push_dummy_code): New function.
2620 (spu_gdbarch_init): Install it.
2621
2622 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2623
2624 * gdbarch.sh (gdbarch_dump): Use core_addr_to_string_nz
2625 instead of paddr_nz.
2626 * gdbarch.c: Regenerate.
2627
2628 * target.c (target_xfer_partial, debug_print_register): Use
2629 core_addr_to_string_nz instead of paddr_nz.
2630
2631 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2632
2633 * rs6000-tdep.c (rs6000_gdbarch_init): Setup displaced stepping
2634 *before* calling gdbarch_init_osabi.
2635 (rs6000_aix_init_osabi): Disable displaced stepping.
2636
2637 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2638
2639 * target.c (update_current_target): Do not inherit to_open
2640 or to_close.
2641 (pop_target): Call target_close on target_stack instead
2642 of current_target.
2643 (pop_all_targets_above): Likewise.
2644
2645 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2646
2647 * gnu-v3-abi.c (gnuv3_decode_method_ptr): New function.
2648 (gnuv3_print_method_ptr): Use it.
2649 (gnuv3_method_ptr_to_value): Likewise.
2650
2651 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2652
2653 * nto-tdep.h (struct nto_target_ops): Add gdbarch parameter to
2654 register_area callback function.
2655 * i386-nto-tdep.c (i386nto_register_area): Add gdbarch parameter.
2656 Use it instead of current_gdbarch.
2657 * nto-procfs.c (procfs_store_registers): Update call.
2658
2659 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2660
2661 * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Use
2662 regcache architecture instead of current_gdbarch.
2663
2664 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2665
2666 * mep-tdep.c (struct mep_prologue): Add gdbarch member.
2667 (check_for_saved): Use it instead of current_gdbarch.
2668 (is_arg_spill): Add gdbarch paramter. Use it instead
2669 of current_gdbarch.
2670 (mep_analyze_prologue): Add gdbarch parameter. Pass it
2671 to is_arg_spill and check_for_saved.
2672 (mep_skip_prologue, mep_analyze_frame_prologue): Update calls.
2673
2674 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2675
2676 * hppa-tdep.c (internalize_unwinds): Use objfile architecture
2677 instead of current_gdbarch.
2678
2679 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2680
2681 * m68k-tdep.h (m68kbsd_fpreg_offset): Add gdbarch parameter.
2682 * m68kbsd-tdep.c (m68kbsd_fpreg_offset): Add gdbarch paramter.
2683 Use it instead of current_gdbarch.
2684 (m68kbsd_supply_fpregset): Update call.
2685 * m68kbsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2686 (m68kbsd_collect_fpregset): Likewise.
2687
2688 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2689
2690 * cris-tdep.c (cris_version, cris_mode): Remove.
2691 (crisv32_single_step_through_delay): Use tdep->cris_mode.
2692 (cris_breakpoint_from_pc): Likewise.
2693 (cris_frame_unwind_cache): Use tdep->cris_version.
2694 (crisv32_scan_prologue): Likewise.
2695 (cris_spec_reg_applicable): Add gdbarch argument.
2696 Use tdep->cris_version.
2697 (cris_register_size, cris_special_register_name): Update calls.
2698 (cris_special_register_name): Add gdbarch argument.
2699 (cris_register_name, crisv32_register_name): Update calls.
2700
2701 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2702
2703 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Use info->arch
2704 instead of current_gdbarch.
2705
2706 * sh64-tdep.c (gdb_print_insn_sh64): Remove.
2707 (sh64_gdbarch_init): Install print_insn_sh64 directly.
2708 * sh-tdep.c (gdb_print_insn_sh): Remove.
2709 (sh_gdbarch_init): Install print_insn_sh directly.
2710
2711 * mips-tdep.c (gdb_print_insn_mips): Do not check mips_abi
2712 from current_gdbarch.
2713 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): New functions.
2714 (mips_gdbarch_init): Install them instead of gdb_print_insn_mips
2715 depending on mips_abi.
2716
2717 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2718
2719 * gdbarch.sh (addr_bits_remove): Change type to 'm'.
2720 (smash_text_address): Likewise.
2721 * gdbarch.c, gdbarch.h: Regenerate.
2722
2723 * arch-utils.c (core_addr_identity): Add gdbarch parameter.
2724 * arch-utils.h (core_addr_identity): Likewise.
2725 * arm-tdep.c (arm_addr_bits_remove): Likewise.
2726 (arm_smash_text_address): Likewise.
2727 * hppa-tdep.c (hppa_smash_text_address): Likewise.
2728 * m88k-tdep.c (m88k_addr_bits_remove): Likewise.
2729 * s390-tdep.c (s390_addr_bits_remove): Likewise.
2730
2731 * mips-tdep.c (mips_addr_bits_remove): Add gdbarch parameter.
2732 Use it instead of current_gdbarch.
2733
2734 * arm-tdep.c (arm_prologue_prev_register, arm_unwind_pc,
2735 arm_dwarf2_prev_register): Update calls.
2736 * m88k-tdep.c (m88k_unwind_pc): Update call.
2737
2738 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2739
2740 * dwarf2expr.h (dwarf2_read_address): Add gdbarch argument.
2741 * dwarf2expr.c (dwarf2_read_address): Add gdbarch argument.
2742 Call gdbarch_integer_to_address directly instead of converting
2743 to value and back. Update comment.
2744 (execute_stack_op): Update call site.
2745 * dwarf2loc.c (find_location_expression): Likewise.
2746 (locexpr_describe_location): Update
2747
2748 * dwarf2expr.h (struct dwarf_expr_context): Add gdbarch member.
2749 * dwarf2-frame.c (execute_stack_op): Initialize ctx->gdbarch.
2750 * dwarf2loc. (dwarf2_evaluate_loc_desc): Likewise.
2751 (dwarf2_loc_desc_needs_frame): Likewise.
2752
2753 2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
2754
2755 * breakpoint.h (struct bp_location): Change type of section
2756 member to "struct obj_section *".
2757 * tracepoint.h (struct tracepoint): Likewise.
2758 * symtab.h (struct general_symbol_info): Replace bfd_section
2759 member with obj_section.
2760 (struct symtab_and_line): Change type of section member to
2761 "struct obj_section *".
2762 (SYMBOL_BFD_SECTION): Remove macro, replace by ...
2763 (SYMBOL_OBJ_SECTION): ... this.
2764
2765 * minsym.c (prim_record_minimal_symbol_and_info): Record symbol
2766 section as obj_section instead of bfd_section.
2767
2768 * ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
2769 directly instead of looking of obj_section from bfd_section.
2770
2771 * objfiles.h (find_pc_sect_section): Remove.
2772 * objfiles.c (find_pc_sect_section): Remove.
2773 (find_pc_section): Inline find_pc_sect_section code.
2774
2775 * symfile.h (find_pc_overlay): Return struct obj_section *.
2776 (find_pc_mapped_section): Likewise.
2777 (section_is_overlay, section_is_mapped): Change type of section
2778 argument to struct obj_section *.
2779 (pc_in_mapped_range, pc_in_unmapped_range): Likewise.
2780 (overlay_mapped_address, overlay_unmapped_address): Likewise.
2781 (symbol_overlayed_address): Likewise.
2782 * symtab.h (symbol_overlayed_address): Likewise.
2783 * symfile.c (overlay_is_mapped): Remove.
2784 (section_is_mapped): Inline overlay_is_mapped code. Update.
2785 (overlay_invalidate_all): Update.
2786 (section_is_overlay): Change section argument to type
2787 "struct obj_section *". Use bfd_ methods.
2788 (pc_in_unmapped_range): Likewise. Handle relocated sections.
2789 (pc_in_mapped_range): Likewise. Handle relocated sections.
2790 (sections_overlap): Likewise.
2791 (overlay_unmapped_address): Likewise.
2792 (overlay_mapped_address): Likewise.
2793 (symbol_overlayed_address): Likewise.
2794 (find_pc_overlay): Return struct obj_section *.
2795 (find_pc_mapped_section): Likewise.
2796 (list_overlays_command): Update.
2797 (map_overlay_command, unmap_overlay_command): Update.
2798 (simple_overlay_update): Update.
2799
2800 * block.h (blockvector_for_pc_sect): Change section argument
2801 to type "struct obj_section *".
2802 (block_for_pc_sect): Likewise.
2803 * block.c (blockvector_for_pc_sect): Change section argument
2804 to type "struct obj_section *".
2805 (block_for_pc_sect): Likewise.
2806 * symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
2807 find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
2808 lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
2809 (matching_bfd_sections): Rename to ...
2810 (matching_obj_sections): ... this. Update argument types.
2811 * blockframe.c (find_pc_sect_function): Likewise.
2812 * breakpoint.c (describe_other_breakpoints): Likewise.
2813 (breakpoint_has_pc, check_duplicates_for): Likewise.
2814 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
2815 (lookup_minimal_symbol_by_pc_section): Likewise.
2816 * symtab.c (find_pc_sect_psymtab_closer): Likewise.
2817 (find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
2818 find_pc_sect_line, find_function_start_pc): Likewise.
2819 (matching_bfd_sections): Rename to ...
2820 (matching_obj_sections): ... this. Update argument types.
2821
2822 * blockframe.c (find_pc_partial_function): Update to section
2823 type changes. No longer call find_pc_sect_section.
2824 (cache_pc_function_section): Change to type "struct obj_section *".
2825 * breakpoint.c (resolve_sal_pc): Update to section type changes.
2826 * exec.c (xfer_memory): Likewise.
2827 * findvar.c (read_var_value): Likewise.
2828 * infcmd.c (jump_command): Likewise.
2829 * linespec.c (minsym_found): Likewise.
2830 * maint.c (maintenance_translate_address): Likewise.
2831 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
2832 (lookup_solib_trampoline_symbol_by_pc): Likewise.
2833 * parse.c (write_exp_msymbol): Likewise.
2834 * printcmd.c (build_address_symbolic): Likewise.
2835 (address_info, sym_info): Likewise.
2836 * symmisc.c (dump_msymbols, print_symbol): Likewise.
2837 * symtab.c (fixup_section): Likewise.
2838 (fixup_symbol_section, fixup_psymbol_section): Likewise.
2839 (find_pc_line, find_function_start_sal): Likewise.
2840 * target.c (memory_xfer_partial): Likewise.
2841 * hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
2842 * spu-tdep.c (spu_overlay_update): Likewise.
2843
2844 2008-09-04 Doug Evans <dje@google.com>
2845
2846 * defs.h (plongest,pulongest): Renamed from paddr_u,paddr_d.
2847 Change argument of pulongest from CORE_ADDR to ULONGEST.
2848 All callers updated.
2849 * utils.c (plongest): Renamed from paddr_d.
2850 (pulongest): Renamed from paddr_u, change arg type to ULONGEST.
2851 * remote-mips.c (send_srec): Use paddr_nz instead of paddr_u in
2852 `CORE_ADDR addr' arg of error message.
2853
2854 2008-09-03 Angela Marie Thomas <angela@releasedominatrix.com>
2855
2856 * ser-tcp.c (ser_tcp_send_break): New function.
2857 (_initialize_ser_tcp): Use ser_tcp_send_break.
2858 * ser-tcp.h (ser_tcp_send_break): New prototype.
2859
2860 2008-09-03 Ulrich Weigand <uweigand@de.ibm.com>
2861
2862 * spu-tdep.c (spu_push_dummy_call): Update all stack pointer slots
2863 when allocating stack frame for inferior call.
2864
2865 2008-09-03 Ulrich Weigand <uweigand@de.ibm.com>
2866
2867 * spu-tdep.c (spu_frame_unwind_cache): Do not attempt to unwind
2868 SP or return address if we failed to find a valid frame.
2869
2870 2008-09-03 Aleksandar Ristovski <aristovski@qnx.com>
2871
2872 * breakpoint.c (breakpoint_init_inferior): Mark as not inserted only
2873 non-permanent breakpoints.
2874 (bpstat_stop_status): Change enable_state to bp_disabled only for
2875 non-permanent breakpoints.
2876 (bp_loc_is_permanent): New function.
2877 (create_breakpoint): Check if the location points to a permanent
2878 breakpoint and if it does, make breakpoint permanent.
2879 (update_breakpoint_locations): Make sure new locations of permanent
2880 breakpoints are properly initialized.
2881 * i386-tdep.c (i386_skip_permanent_breakpoint): New function.
2882 (i386_gdbarch_init): Set gdbarch_skip_permanent_breakpoint.
2883
2884 2008-09-02 Pedro Alves <pedro@codesourcery.com>
2885
2886 * breakpoint.c (insert_breakpoints, update_global_location_list):
2887 Check breakpoints_always_inserted_mode instead of
2888 always_inserted_mode directly.
2889
2890 2008-09-02 Andreas Schwab <schwab@suse.de>
2891
2892 * ia64-tdep.c (ia64_get_dyn_info_list): Use obj_section_addr.
2893
2894 2008-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2895
2896 Stay compatible after the GCC PR fortran/29635 fix.
2897 * dwarf2read.c (process_die <DW_TAG_imported_module>)
2898 (process_die <DW_TAG_imported_module>): Do not assert anything about
2899 these unsupported tags.
2900
2901 2008-08-29 Tom Tromey <tromey@redhat.com>
2902
2903 * maint.c (_initialize_maint_cmds): Fix typo.
2904
2905 2008-08-29 Tom Tromey <tromey@redhat.com>
2906
2907 * dwarf2read.c (dwarf2_build_psymtabs_hard): Copy dirname on
2908 obstack.
2909
2910 2008-08-27 Ulrich Weigand <uweigand@de.ibm.com>
2911
2912 * remote.c: Include "gdb_stat.h".
2913
2914 2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
2915
2916 * dummy-frame.h (dummy_frame_pop): Add prototype.
2917 * dummy-frame.c: Include "observer.h".
2918 (dummy_frame_push): Do not check for stale frames.
2919 (dummy_frame_pop): New function.
2920 (cleanup_dummy_frames): New function.
2921 (_initialize_dummy_frame): Install it as inferior_created observer.
2922
2923 * frame.h (struct frame_id): Update comments.
2924 (frame_id_inner): Remove prototype.
2925 * frame.c (frame_id_inner): Make static. Add comments.
2926 (frame_find_by_id): Update frame_id_inner safety net check to avoid
2927 false positives for targets using non-contiguous stack ranges.
2928 (get_prev_frame_1): Update frame_id_inner safety net check.
2929 (frame_pop): Call dummy_frame_pop when popping a dummy frame.
2930
2931 * stack.c (return_command): Directly pop the selected frame.
2932 * infrun.c (handle_inferior_event): Remove dead code.
2933 * i386-tdep.c (i386_push_dummy_call): Update comment.
2934
2935 2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
2936
2937 * breakpoint.c (remove_breakpoint): Do not fail if unable to remove
2938 breakpoint from shared library.
2939
2940 2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
2941
2942 * solib-svr4.c (read_program_header): New function.
2943 (scan_dyntag_auxv): New function.
2944 (elf_locate_base): Use it if scan_dyntag fails.
2945 (find_program_interpreter): New function.
2946 (enable_break): Use it instead of .interp section.
2947
2948 2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
2949
2950 * remote.h (remote_filename_p, remote_bfd_open): Add prototypes.
2951 * remote.c (remote_bfd_iovec_open, remote_bfd_iovec_close,
2952 remote_bfd_iovec_pread, remote_bfd_iovec_stat, remote_filename_p,
2953 remote_bfd_open): New functions.
2954 (remote_hostio_send_command): Fail safely if remote connection
2955 is not set up.
2956
2957 * solist.h (solib_open): Remove prototype.
2958 (solib_bfd_open): Add prototype.
2959 * solib.c: Include "remote.h".
2960 (solib_open): Remove, replace by ...
2961 (solib_bfd_open): ... this new function. Handle remote BFDs.
2962 (solib_map_sections): Replace solib_open by solib_bfd_open.
2963 * solib-frv.c: Include "exceptions.h".
2964 (enable_break2): Replace solib_open by solib_bfd_open.
2965 * solib-svr4.c: Include "exceptions.h".
2966 (enable_break): Replace solib_open by solib_bfd_open.
2967
2968 * symfile.c: Include "remote.h".
2969 (build_id_verify): Handle remote BFDs.
2970 (separate_debug_file_exists): Use BFD to access file. Handle
2971 remote BFDs.
2972 (symfile_bfd_open): Handle remote BFDs.
2973 (reread_symbols): Handle remote BFDs.
2974
2975 * NEWS: Mention "remote:" argument prefix to "set sysroot".
2976
2977 2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
2978
2979 * gdbarch.sh (target_gdbarch): New global variable.
2980 (deprecated_current_gdbarch_select_hack): Set it.
2981 * gdbarch.c, gdbarch.h: Regenerate.
2982
2983 * arch-utils.c (gdbarch_update_p): Use target_gdbarch instead
2984 of current_gdbarch.
2985 * target-descriptions.c (target_find_description): Likewise.
2986 * arm-tdep.c (arm_update_current_architecture): Likewise.
2987 (show_fp_model, arm_show_abi, arm_show_fallback_mode,
2988 arm_show_force_mode): Likewise.
2989 * mips-tdep.c (show_mask_address, show_mipsfpu_command,
2990 show_mips_abi): Likewise.
2991 * mep-tdep.c (me_module_register_set, current_me_module): Likewise.
2992
2993 * target.c (target_translate_tls_address): Use target_gdbarch
2994 instead of current_gdbarch.
2995 * remote.c (struct packet_reg): Likewise.
2996 (get_remote_arch_state, packet_reg_from_regnum,
2997 packet_reg_from_pnum, remote_check_symbols, remote_wait,
2998 remote_address_masked, remote_insert_breakpoint,
2999 remote_insert_hw_breakpoint, remote_read_description): Likewise.
3000 * remote-m32r-sdi.c (m32r_resume, m32r_wait): Likewise.
3001 * remote-mips.c (mips_open, mips_common_breakpoint): Likewise.
3002 * cris-tdep.c (cris_can_use_hardware_watchpoint): Likewise.
3003
3004 * solib.c (solib_open, solib_map_sections, solib_read_symbols,
3005 solib_add, info_sharedlibrary_command, solib_address,
3006 solib_create_inferior_hook, in_solib_dynsym_resolve_code,
3007 solib_global_lookup): Likewise.
3008 * solib-frv.c (enable_break2, frv_relocate_main_executable): Likewise.
3009 * solib-irix.c (irix_current_sos, irix_open_symbol_file_object):
3010 Likewise.
3011 * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
3012 * solib-svr4.c (exec_entry_point, enable_break, svr4_free_so,
3013 set_solib_svr4_fetch_link_map_offsets, svr4_fetch_link_map_offsets):
3014 Likewise.
3015 * nto-tdep.c (nto_find_and_open_solib, nto_init_solib_absolute_prefix,
3016 nto_truncate_ptr): Likewise.
3017 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Likewise.
3018
3019 2008-08-26 Luis Machado <luisgpm@br.ibm.com>
3020
3021 * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections) New structure.
3022 (ppc_linux_vmx_regset_sections): New structure.
3023 (ppc_linux_fp_regset_sections): New structure.
3024 (ppc_linux_init_abi): Select core-file regset based on target
3025 features.
3026
3027 2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
3028
3029 * target.c (debug_print_register): Use regcache_raw_collect
3030 instead of regcache_cooked_read. Only handle raw registers.
3031
3032 2008-08-25 Pedro Alves <pedro@codesourcery.com>
3033
3034 * cp-name-parser.y: Include config.h before system headers.
3035
3036 2008-08-25 Ulrich Weigand <uweigand@de.ibm.com>
3037
3038 * m88k-tdep.c: Update for unwinder changes.
3039
3040 2008-08-24 Tom Tromey <tromey@redhat.com>
3041
3042 * s390-tdep.c (s390_address_class_type_flags): Use
3043 TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1.
3044 (s390_address_class_type_flags_to_name): Likewise.
3045 (s390_address_class_name_to_type_flags): Likewise.
3046
3047 2008-08-24 Tom Tromey <tromey@redhat.com>
3048
3049 * rs6000-tdep.c (rs6000_builtin_type_vec128): Don't use
3050 TYPE_FLAGS.
3051 * features/rs6000/powerpc-vsx32l.c
3052 (initialize_tdesc_powerpc_vsx32l): Update.
3053 * features/rs6000/powerpc-vsx32.c
3054 (initialize_tdesc_powerpc_vsx32): Update.
3055 * features/rs6000/powerpc-vsx64.c
3056 (initialize_tdesc_powerpc_vsx64): Update.
3057 * features/rs6000/powerpc-vsx64l.c
3058 (initialize_tdesc_powerpc_vsx64l): Update.
3059 * target-descriptions.c (maint_print_c_tdesc_cmd): Emit
3060 TYPE_VECTOR, not TYPE_FLAGS.
3061
3062 2008-08-24 Tom Tromey <tromey@redhat.com>
3063
3064 * xml-tdesc.c (tdesc_end_union): Update.
3065 * stabsread.c (define_symbol): Update.
3066 (read_type): Update.
3067 (read_struct_type): Update.
3068 (read_enum_type): Update.
3069 * spu-tdep.c (spu_builtin_type_vec128): Update.
3070 * sh-tdep.c (sh_push_dummy_call_fpu): Update.
3071 (sh_push_dummy_call_nofpu): Update.
3072 * mdebugread.c (parse_symbol): Update.
3073 (parse_symbol): Update.
3074 (parse_symbol): Update.
3075 (upgrade_type): Update.
3076 * jv-lang.c (java_lookup_class): Update.
3077 * iq2000-tdep.c (iq2000_pointer_to_address): Update.
3078 * i386-tdep.c (i386_mmx_type): Update.
3079 (i386_sse_type): Update.
3080 * gdbtypes.h (enum type_flag_value): New enum.
3081 (enum type_instance_flag_value): New enum.
3082 (TYPE_FLAG_UNSIGNED, TYPE_FLAG_NOSIGN, TYPE_FLAG_STUB,
3083 TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC, TYPE_FLAG_PROTOTYPED,
3084 TYPE_FLAG_INCOMPLETE, TYPE_FLAG_VARARGS, TYPE_FLAG_VECTOR,
3085 TYPE_FLAG_FIXED_INSTANCE, TYPE_FLAG_STUB_SUPPORTED,
3086 TYPE_FLAG_NOTTEXT): Now enum constants.
3087 (TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_CODE_SPACE,
3088 TYPE_FLAG_DATA_SPACE, TYPE_FLAG_ADDRESS_CLASS_1,
3089 TYPE_FLAG_ADDRESS_CLASS_2): Remove.
3090 (TYPE_INSTANCE_FLAG_CONST, TYPE_INSTANCE_FLAG_VOLATILE,
3091 TYPE_INSTANCE_FLAG_CODE_SPACE, TYPE_INSTANCE_FLAG_DATA_SPACE,
3092 TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1,
3093 TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2): New constants.
3094 (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB, TYPE_TARGET_STUB,
3095 TYPE_STATIC, TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_VARARGS,
3096 TYPE_VECTOR, TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED,
3097 TYPE_NOTTEXT): Update.
3098 (TYPE_FLAG_ADDRESS_CLASS_ALL): Remove.
3099 (TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL): New define.
3100 (TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE,
3101 TYPE_ADDRESS_CLASS_1, TYPE_ADDRESS_CLASS_2,
3102 TYPE_ADDRESS_CLASS_ALL): Update.
3103 (struct main_type) <flags>: Remove.
3104 <flag_unsigned, flag_nosign, flag_stub, flag_target_stub,
3105 flag_static, flag_prototyped, flag_incomplete, flag_varargs,
3106 flag_vector, flag_stub_supported, flag_nottext,
3107 flag_fixed_instance>: New fields.
3108 <nfields, vptr_fieldno>: Move earlier.
3109 (TYPE_FLAGS): Remove.
3110 * gdbtypes.c (make_pointer_type): Update.
3111 (address_space_name_to_int): Update.
3112 (address_space_int_to_name): Update.
3113 (make_type_with_address_space): Update.
3114 (make_cv_type): Update.
3115 (create_range_type): Update.
3116 (get_discrete_bounds): Update.
3117 (create_set_type): Update.
3118 (make_vector_type): Update.
3119 (smash_to_method_type): Update.
3120 (check_typedef): Update.
3121 (check_stub_method): Update.
3122 (init_type): Individually assign flag fields.
3123 (recursive_dump_type): Don't print entire TYPE_FLAGS field. Do
3124 print TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED, and TYPE_NOTTEXT.
3125 (copy_type_recursive): Copy the entire main type. Don't use
3126 TYPE_FLAGS.
3127 * features/rs6000/powerpc-altivec64l.c
3128 (initialize_tdesc_powerpc_altivec64l): Update.
3129 * features/rs6000/powerpc-altivec64.c
3130 (initialize_tdesc_powerpc_altivec64): Update.
3131 * features/rs6000/powerpc-altivec32l.c
3132 (initialize_tdesc_powerpc_altivec32l): Update.
3133 * features/rs6000/powerpc-altivec32.c
3134 (initialize_tdesc_powerpc_altivec32): Update.
3135 * features/rs6000/powerpc-7400.c (initialize_tdesc_powerpc_7400):
3136 Update.
3137 * features/arm-with-iwmmxt.c (initialize_tdesc_arm_with_iwmmxt):
3138 Update.
3139 * dwarf2read.c (read_structure_type): Update.
3140 (read_enumeration_type): Likewise.
3141 (process_enumeration_scope): Likewise.
3142 (read_tag_pointer_type): Likewise.
3143 (read_subroutine_type): Likewise.
3144 (read_subroutine_type): Likewise.
3145 (read_base_type): Likewise.
3146 * coffread.c (coff_read_enum_type): Update.
3147 * ada-valprint.c (adjust_type_signedness): Update.
3148 * ada-typeprint.c (print_record_field_types): Update.
3149 * ada-lang.c (packed_array_type): Update.
3150 (empty_record): Don't reset TYPE_FLAGS.
3151 (ada_template_to_fixed_record_type_1): Update.
3152 (ada_template_to_fixed_record_type_1): Likewise.
3153 (template_to_static_fixed_type): Likewise.
3154 (to_record_with_fixed_variant_part): Likewise.
3155 (to_fixed_record_type): Likewise.
3156 (to_fixed_array_type): Likewise.
3157 (to_static_fixed_type): Likewise.
3158
3159 2008-08-23 Jim Blandy <jimb@redhat.com>
3160
3161 PR macros/607:
3162 * symmisc.c (print_symbol_bcache_statistics): Include statistics
3163 for the macro bcache.
3164
3165 2008-08-23 Tom Tromey <tromey@redhat.com>
3166
3167 * macrotab.h (struct macro_definition) <kind>: Shrink to one bit.
3168 (argc): Now 31 bits.
3169
3170 2008-08-22 Tom Tromey <tromey@redhat.com>
3171
3172 * NEWS: Move macro entries back under "New commands".
3173
3174 2008-08-22 Ulrich Weigand <uweigand@de.ibm.com>
3175
3176 * breakpoint.c (create_overlay_event_breakpoint): Rename to ...
3177 (create_overlay_event_breakpoint_1): ... this. Add OBJFILE parameter.
3178 (create_overlay_event_breakpoint): Loop over all objfiles to install
3179 multiple instances of the overlay event breakpoint if present.
3180
3181 2008-08-22 Ulrich Weigand <uweigand@de.ibm.com>
3182
3183 * spu-tdep.c (spu_overlay_new_objfile): Only consider SPU objfiles.
3184 (info_spu_event_command): Command only supported on SPU architecture.
3185 (info_spu_signal_command): Likewise.
3186 (info_spu_mailbox_command): Likewise.
3187 (info_spu_dma_command): Likewise.
3188 (info_spu_proxydma_command): Likewise.
3189
3190 2008-08-22 Ulrich Weigand <uweigand@de.ibm.com>
3191
3192 * infrun.c (adjust_pc_after_break): Do not call get_thread_regcache
3193 if the thread has already exited.
3194
3195 2008-08-22 Pedro Alves <pedro@codesourcery.com>
3196
3197 * infrun.c (proceed): Move back setting previous_inferior_ptid
3198 from here ...
3199 (wait_for_inferior): ... to here.
3200 (fetch_inferior_event): ... and here.
3201
3202 2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
3203
3204 * gdbarch.sh: Include "regcache.h" into gdbarch.c.
3205 (deprecated_current_gdbarch_select_hack): Call registers_changed
3206 instead of reinit_frame_cache.
3207 * gdbarch.c: Regenerate.
3208
3209 2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
3210
3211 * elfread.c (elf_symtab_read): Do not relocate thread-local symbols.
3212
3213 2008-08-21 Daniel Jacobowitz <dan@codesourcery.com>
3214
3215 * xcoffread.c (SYMNAME_ALLOC): Correct syntax.
3216
3217 2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
3218
3219 * findvar.c (locate_var_value): Do not call get_frame_arch
3220 with a NULL frame argument.
3221
3222 2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
3223
3224 * frame.h (frame_map_regnum_to_name): Remove prototype.
3225 (frame_map_name_to_regnum): Remove prototype.
3226 * frame.c (frame_map_regnum_to_name): Remove.
3227 (frame_map_name_to_regnum): Remove.
3228 (frame_unwind_register_value): Use user_reg_map_regnum_to_name
3229 instead of frame_map_regnum_to_name.
3230 * ax-gdb.c: Include "user-regs.h".
3231 (gen_expr): Use user_reg_map_name_to_regnum instead of
3232 frame_map_name_to_regnum.
3233 * eval.c: Include "user-regs.h".
3234 (evaluate_subexp_standard): Use user_reg_map_name_to_regnum
3235 instead of frame_map_name_to_regnum.
3236 * infcmd.c (registers_info): Likewise.
3237 * parse.c: Include "user-regs.h".
3238 (write_dollar_variable): Use user_reg_map_name_to_regnum
3239 instead of frame_map_name_to_regnum.
3240 * tracepoint.c: Include "user-regs.h".
3241 (encode_actions): Use user_reg_map_name_to_regnum
3242 instead of frame_map_name_to_regnum.
3243 * valops.c: Include "user-regs.h".
3244 (value_fetch_lazy): Use user_reg_map_regnum_to_name instead
3245 of frame_map_regnum_to_name.
3246
3247 2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
3248
3249 * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): Read
3250 and manually relocate .opd contents from BFD instead of reading
3251 them from target memory.
3252
3253 2008-08-21 Daniel Jacobowitz <dan@codesourcery.com>
3254
3255 * dwarf2read.c (processing_current_prefix): Delete static
3256 variable.
3257 (process_full_comp_unit): Do not set processing_current_prefix.
3258 (dwarf2_full_name): New function.
3259 (read_func_scope): Do not set processing_current_prefix. Use
3260 determine_prefix.
3261 (read_structure_type): Do not set processing_current_prefix. Remove
3262 unused inner cleanup.
3263 (process_structure_scope): Do not set processing_current_prefix.
3264 (read_enumeration_type): Use dwarf2_full_name.
3265 (determine_class_name): Return a const char *. Put the result
3266 on the objfile obstack. Use dwarf2_full_name.
3267 (read_namespace_type): New function.
3268 (read_namespace): Do not create the type here. Use
3269 determine_prefix.
3270 (read_typedef): Use dwarf2_full_name. Do not pass the name
3271 to init_type.
3272 (read_base_type): Do not pass the name to init_type. Handle
3273 TYPE_FLAG_NOSIGN.
3274 (read_unspecified_type): Do not pass the name to init_type.
3275 (new_symbol): Use dwarf2_full_name instead of
3276 processing_current_prefix.
3277 (read_type_die): Do not set processing_current_prefix. Handle
3278 DW_TAG_namespace.
3279 (determine_prefix): Handle specifications. Return the result
3280 on the objfile obstack. Handle unions correctly.
3281
3282 2008-08-21 Daniel Jacobowitz <dan@codesourcery.com>
3283
3284 * buildsym.c (add_symbol_to_list): Do not call
3285 cp_scan_for_anonymous_namespaces here.
3286 (finish_block): Do not call cp_set_block_scope here.
3287 * cp-namespace.c (processing_has_namespace_info)
3288 (processing_current_prefix): Delete.
3289 (cp_initialize_namespace): Do not initialize
3290 processing_has_namespace_info.
3291 (cp_scan_for_anonymous_namespaces): Use SYMBOL_DEMANGLED_NAME. Do
3292 not check processing_has_namespace_info.
3293 (cp_set_block_scope): Take prefix and namespace info flag as
3294 arguments. Honor namespaces regardless of a demangled name.
3295 * cp-support.h (processing_has_namespace_info)
3296 (processing_current_prefix): Delete declarations.
3297 (cp_set_block_scope): Update prototype.
3298 * dwarf2read.c (processing_has_namespace_info)
3299 (processing_current_prefix): New static variables.
3300 (read_file_scope): Initialize processing_has_namespace_info.
3301 (read_func_scope): Call cp_set_block_scope for C++.
3302 (new_symbol): Call cp_scan_for_anonymous_namespaces for C++.
3303 * symtab.c (symbol_demangled_name): Accept a const argument.
3304 * symtab.h (symbol_demangled_name): Update prototype.
3305
3306 2008-08-21 Daniel Jacobowitz <dan@codesourcery.com>
3307
3308 * ax-gdb.c (gen_var_ref): Use SYMBOL_LINKAGE_NAME.
3309 * blockframe.c (find_pc_partial_function): Likewise.
3310 * buildsym.c (find_symbol_in_list): Likewise.
3311 * c-valprint.c (c_val_print): Likewise.
3312 * coffread.c (patch_opaque_types, process_coff_symbol): Likewise.
3313 (coff_read_enum_type): Likewise. Use SYMBOL_SET_LINKAGE_NAME.
3314 * cp-support.c (cp_remove_params): Renamed from remove_params and
3315 made global.
3316 (overload_list_add_symbol): Update call to remove_params.
3317 * cp-support.h (cp_remove_params): Declare.
3318 * dwarf2read.c (process_enumeration_scope): Use SYMBOL_LINKAGE_NAME.
3319 (dwarf2_const_value): Use SYMBOL_PRINT_NAME.
3320 * expprint.c (dump_subexp_body_standard): Likewise.
3321 * f-valprint.c (info_common_command, there_is_a_visible_common_named):
3322 Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME
3323 for messages.
3324 * findvar.c (read_var_value): Use SYMBOL_LINKAGE_NAME.
3325 * gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise.
3326 * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
3327 (hppa_hpux_skip_trampoline_code): Use SYMBOL_LINKAGE_NAME to find
3328 symbols and SYMBOL_PRINT_NAME for messages.
3329 * jv-lang.c (add_class_symbol): Use SYMBOL_SET_LINKAGE_NAME.
3330 * linespec.c (decode_line_2): Use SYMBOL_LINKAGE_NAME.
3331 * mdebugread.c (parse_symbol): Use SYMBOL_LINKAGE_NAME and
3332 SYMBOL_SET_LINKAGE_NAME.
3333 (mylookup_symbol): Use SYMBOL_LINKAGE_NAME.
3334 * minsyms.c (add_minsym_to_demangled_hash_table): Use
3335 SYMBOL_SEARCH_NAME.
3336 (lookup_minimal_symbol): Use SYMBOL_LINKAGE_NAME or
3337 SYMBOL_MATCHES_SEARCH_NAME, depending on the pass.
3338 * objfiles.h (ALL_OBJFILE_MSYMBOLS): Use SYMBOL_LINKAGE_NAME.
3339 * printcmd.c (build_address_symbolic): Use SYMBOL_LINKAGE_NAME.
3340 (address_info): Use SYMBOL_PRINT_NAME for messages and
3341 SYMBOL_LINKAGE_NAME for lookups.
3342 * sol-thread.c (info_cb): Use SYMBOL_PRINT_NAME for messages.
3343 * stabsread.c (patch_block_stabs, define_symbol)
3344 (read_type, read_enum_type, common_block_end)
3345 (cleanup_undefined_types_1, scan_file_globals): Use
3346 SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, ALL_OBJFILE_MSYMBOLS,
3347 and SYMBOL_PRINT_NAME.
3348 * stack.c (print_frame_args): Use SYMBOL_LINKAGE_NAME.
3349 (print_frame, frame_info): Use SYMBOL_PRINT_NAME for output. Use
3350 cp_remove_params instead of cplus_demangle.
3351 (print_block_frame_labels, print_frame_arg_vars): Use
3352 SYMBOL_LINKAGE_NAME.
3353 * symmisc.c (dump_msymbols): Use ALL_OBJFILE_MSYMBOLS and
3354 SYMBOL_LINKAGE_NAME.
3355 (dump_symtab_1, print_symbol, print_partial_symbols)
3356 (maintenance_check_symtabs): Use SYMBOL_LINKAGE_NAME.
3357 * symtab.h (DEPRECATED_SYMBOL_NAME): Delete.
3358 (SYMBOL_SET_LINKAGE_NAME): New.
3359 (SYMBOL_SET_NAMES): Add a comment.
3360 * tracepoint.c (set_traceframe_context, validate_actionline)
3361 (collect_symbol, scope_info): Use SYMBOL_LINKAGE_NAME for
3362 lookups and SYMBOL_PRINT_NAME for output.
3363 * typeprint.c (typedef_print): Use SYMBOL_LINKAGE_NAME.
3364 * xcoffread.c (process_xcoff_symbol): Use SYMBOL_SET_LINKAGE_NAME.
3365
3366 2008-08-21 Pedro Alves <pedro@codesourcery.com>
3367
3368 * arm-tdep.c (arm_pc_is_thumb): Use obj_section_addr.
3369 * hppa-hpux-tdep.c (hppa_hpux_find_dummy_bpaddr): Likewise.
3370 * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Use
3371 obj_section_addr and obj_section_endaddr.
3372 * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Likewise.
3373 * hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise.
3374 * ia64-tdep.c (ia64_find_global_pointer): Likewise.
3375 (find_extant_func_descr): Likewise.
3376 * solib-frv.c (frv_relocate_main_executable): Use
3377 obj_section_addr.
3378 * xstormy16-tdep.c (xstormy16_find_jmp_table_entry): Use
3379 obj_section_addr and obj_section_endaddr.
3380
3381 2008-08-21 Paul N. Hilfinger <hilfinger@adacore.com>
3382
3383 * NEWS: Amplify last entry on boolean types in Ada.
3384
3385 2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
3386
3387 * dwarf2read.c (die_specification, dwarf2_extension, follow_die_ref):
3388 Make the dwarf2_cu * parameter output as well as input. Update it if
3389 we follow a reference to another CU.
3390 (read_func_scope, determine_class_name, namespace_name, dwarf2_attr)
3391 (die_type, die_containing_type): Update calls to changed functions.
3392 Use the returned CU along with the returned DIE.
3393 (read_namespace): Use dwarf2_attr instead of dwarf2_extension.
3394
3395 2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
3396
3397 * dwarf2read.c (queue_comp_unit): Take an objfile argument. Read
3398 in the DIEs here.
3399 (process_queue): Do not read in the DIEs here.
3400 (psymtab_to_symtab_1): Update call to queue_comp_unit.
3401 (read_full_die): Do not call queue_comp_unit from here.
3402 (maybe_queue_comp_unit): New function.
3403 (follow_die_ref): Use it.
3404
3405 2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
3406
3407 * dwarf2read.c (struct attribute): Move earlier.
3408 (struct die_info): Change attrs to a trailing array.
3409 (dwarf_alloc_die): Take the number of attributes. Allocate space
3410 for them.
3411 (read_full_die): Update call to dwarf_alloc_die. Do not manually
3412 allocate attributes.
3413
3414 2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
3415
3416 * dwarf2read.c (REF_HASH_SIZE): Delete.
3417 (struct dwarf2_cu): Replace die_ref_table with die_hash.
3418 (struct die_info): Remove next_ref.
3419 (store_in_ref_table): Remove offset argument. Rewrite to use
3420 htab_find_slot_with_hash.
3421 (die_hash, die_eq): New.
3422 (read_comp_unit): Allocate the die_hash.
3423 (read_die_and_children): Update call to store_die_ref.
3424 (follow_die_ref): Rewrite to use htab_find_with_hash.
3425
3426 2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
3427
3428 * dwarf2read.c (free_die_list, copy_die): Delete.
3429 (dwarf_alloc_die): Take a CU argument. Allocate the new DIE
3430 on the obstack.
3431 (read_full_die): Update call to dwarf_alloc_die. Allocate
3432 attributes on the CU obstack.
3433 (free_one_comp_unit): Do not call free_die_list.
3434
3435 2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
3436
3437 * dwarf2read.c (read_die_and_children): Ignore NULL DIEs.
3438 (read_die_and_siblings): Likewise. Do not add padding DIEs to the
3439 sibling list.
3440 (read_full_die): Do not allocate DIEs for abbrev 0.
3441 (follow_die_ref): Correct error message.
3442
3443 2008-08-20 Pedro Alves <pedro@codesourcery.com>
3444
3445 * linespec.c (symtab_from_filename): Also throw NOT_FOUND_ERROR if
3446 there are no symbols loaded, instead of throwing a generic error.
3447 (decode_variable): Likewise.
3448
3449 2008-08-20 Pedro Alves <pedro@codesourcery.com>
3450
3451 * objfiles.h (struct obj_section): Remove addr and endaddr fields.
3452 (obj_section_offset, obj_section_addr, obj_section_endaddr): New
3453 macros.
3454 * objfiles.c (add_to_objfile_sections): Don't set addr, endaddr
3455 and offset. Use size_t instead of unsigned long.
3456 (build_objfile_section_table): Use size_t instead of unsigned
3457 long.
3458 (objfile_relocate): Don't relocate s->addr and s->endaddr, they're
3459 gone.
3460 (find_pc_sect_section): Use obj_section_addr and
3461 obj_section_endaddr.
3462 * symfile.c (symfile.c): Remove code that maps sections
3463 offsets in "addr" to the object's sections.
3464 * blockframe.c (find_pc_partial_function): Use obj_section_endaddr.
3465 * gcore.c (gcore_create_callback): Use obj_section_addr and
3466 obj_section_endaddr.
3467 * maint.c (print_objfile_section_info): Likewise.
3468 * printcmd.c (sym_info): Use obj_section_addr and
3469 obj_section_endaddr.
3470 * symtab.c (fixup_section): Likewise.
3471
3472 2008-08-20 Mark Kettenis <kettenis@gnu.org>
3473
3474 * sparc-tdep.c: Make some comments catch up with reality.
3475
3476 2008-08-20 Vladimir Prus <vladimir@codesourcery.com>
3477
3478 * NEWS: Mention 'set target-async'
3479
3480 2008-08-19 Vladimir Prus <vladimir@codesourcery.com>
3481
3482 * infrun.c (resume): If the thread is placed to the deferred step
3483 queue, mark it as running.
3484
3485 2008-08-19 Vladimir Prus <vladimir@codesourcery.com>
3486
3487 Make sure target supports non-stop.
3488 * infcmd.c (run_command_1, attach_command): If non-stop mode
3489 is requested, verify the target supports it.
3490 * linux-nat.c (linux_nat_supports_non_stop): New.
3491 (linux_nat_add_target): Register the above.
3492 * target.c (find_default_supports_non_stop)
3493 (target_supports_non_stop): New.
3494 (init_dummy_target): Register find_default_supports_non_stop.
3495 * target.h (struct target_ops): New field to_supports_non_stop.
3496 (target_supports_non_stop): New.
3497
3498 2008-08-19 Pedro Alves <pedro@codesourcery.com>
3499 Vladimir Prus <vladimir@codesourcery.com>
3500
3501 * target.c (target_async_permitted, target_async_permitted_1)
3502 (set_maintenance_target_async_permitted)
3503 (show_maintenance_target_async_permitted): New.
3504 (initialize_targets): Register 'set target-async'.
3505 * target.h (target_async_permitted): Declare.
3506 * linux-nat.c (linux_nat_async_enabled)
3507 (linux_nat_async_permitted, set_maintenance_linux_async_permitted)
3508 (show_maintenance_linux_async_permitted): Remove.
3509 (sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
3510 (get_pending_events, linux_nat_async): Use target_async_permitted.
3511 (linux_nat_set_async_mode): Remove, moving the only used bits
3512 into...
3513 (linux_nat_setup_async): This.
3514 (_initialize_linux_nat): Do not register 'maint set linux-async'.
3515 Use linux_nat_setup_async.
3516 * remote.c (remote_async_permitted, remote_async_permitted_set)
3517 (set_maintenance_remote_async_permitted)
3518 (show_maintenance_remote_async_permitted): Remove.
3519 (remote_open_1, remote_terminal_inferior, remote_can_async_p)
3520 (remote_is_async_p): Use target_async_permitted.
3521 (_initialize_remote): Don't register 'main set remote-async'.
3522 * mi/mi-cmds.c (mi_cmds): Register -list-target-features.
3523 * mi/mi-cmds.h (mi_cmd_list_target_features): New.
3524 * mi/mi-main.c (mi_cmd_list_target_features): New.
3525
3526 2008-08-19 Vladimir Prus <vladimir@codesourcery.com>
3527
3528 * target.c (maybe_kill_then_attach)
3529 (maybe_kill_then_create_inferior): Remove.
3530 (update_current_target): Do not default to_attach,
3531 to_create_inferiour, to_is_async_p.
3532
3533 2008-08-19 Paul N. Hilfinger <hilfinger@adacore.com>
3534
3535 Changes for supporting boolean types in debugging data.
3536 * ada-lang.c (discrete_type_high_bound,discrete_type_low_bound): Change
3537 API to return LONGEST values rather than struct values.
3538 (ada_evaluate_subexp): Change to use new API of discrete_type_low_bound
3539 and discrete_type_high_bound.
3540 (to_fixed_range_type): Create a range type in cases where
3541 argument is base type and its limits are representable as ints.
3542 (ada_is_modular_type): Correct so that base type must be integral.
3543 * ada-lex.l (TRUEKEYWORD,FALSEKEYWORD): Make 'true' and 'false'
3544 keywords when they appear alone, since we are phasing out
3545 direct representation of these identifiers in debugging data.
3546 * ada-exp.y: Define 'true' and 'false' as primaries.
3547 (type_boolean): New function.
3548 (type_int,type_long,type_long_long,type_floattype_double)
3549 (type_long_double): Remove uses of current_gdbarch for consistency
3550 with type_boolean.
3551 (write_int): Change comment to indicate that it might write boolean
3552 constant as well.
3553 * ada-typeprint.c (ada_print_type): Print '(false, true)' for boolean
3554 type, since will no longer be represented as enumerated type in
3555 debugging data.
3556 * ada-valprint.c (print_optional_low_bound): Handle boolean case
3557 as well.
3558 * NEWS: Note support boolean types.
3559
3560 2008-08-18 Pedro Alves <pedro@codesourcery.com>
3561
3562 * bsd-uthread.c (bsd_uthread_close): New.
3563 (bsd_uthread_deactivate): Don't cleanup here, just unpush the
3564 target.
3565 (bsd_uthread_solib_loaded): Fix typo.
3566 (bsd_uthread_target): Register bsd_uthread_close.
3567
3568 2008-08-18 Pedro Alves <pedro@codesourcery.com>
3569
3570 * corelow.c (core_open): Assume there was no upper layer left
3571 behind from a previous inferior.
3572 * target.c (pop_all_targets): Rename to ...
3573 (pop_all_targets_above): ... this. Add a target stratum
3574 parameter. Use it instead of hardcoding the dummy_stratum.
3575 (pop_all_targets): New, defer to pop_all_targets_above.
3576 (target_preopen): Use pop_all_targets_above.
3577 * target.h (pop_all_targets_above): Declare.
3578
3579 2008-08-18 Pedro Alves <pedro@codesourcery.com>
3580
3581 * gdbthread.h (thread_change_ptid): Declare.
3582 * infrun.c (infrun_thread_ptid_changed): New.
3583 (_initialize_infrun): Attach infrun_thread_ptid_changed to the
3584 thread_ptid_changed observer.
3585 * regcache.c (regcache_thread_ptid_changed): New.
3586 (_initialize_regcache): Attach regcache_thread_ptid_changed to the
3587 thread_ptid_changed observer.
3588 * thread.c (thread_change_ptid): New.
3589
3590 2008-08-18 Tom Tromey <tromey@redhat.com>
3591
3592 * symfile.c (reread_symbols): Update.
3593 * solib-sunos.c (allocate_rt_common_objfile): Update.
3594 * objfiles.c (allocate_objfile): Update.
3595 * objfiles.h (struct objfile) <md, mmfd, deprecated_obj_private>:
3596 Remove.
3597
3598 2008-08-18 Tom Tromey <tromey@redhat.com>
3599
3600 * gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's
3601 obstack.
3602
3603 2008-08-18 Daniel Jacobowitz <dan@codesourcery.com>
3604
3605 * rs6000-tdep.c (struct rs6000_framedata): Add gpr_mask, used_bl,
3606 lr_register.
3607 (rs6000_in_function_epilogue_p): Check for bctr.
3608 (skip_prologue): Initialize lr_register. Set lr_reg to a register
3609 number. Set gpr_mask and used_bl. Continue scanning while some
3610 expected registers are not saved. Set lr_register if LR is not
3611 stored.
3612 (rs6000_frame_cache): Handle gpr_mask and lr_register.
3613
3614 2008-08-17 Tom Tromey <tromey@redhat.com>
3615
3616 PR gdb/1535:
3617 * breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): New macros.
3618 (ep_find_event_name_end): Remove.
3619 (catch_fork_temporary, catch_vfork_temporary,
3620 catch_fork_permanent, catch_vfork_permanent): New constants.
3621 (catch_vfork, catch_fork): Remove.
3622 (catch_fork_command_1): Add 'command' argument. Remove
3623 'fork_kind' and 'tempflag'. Handle NULL 'arg'. Update switch for
3624 all cases.
3625 (catch_exec_command_1): Add 'command' argument; remove
3626 'tempflag'. Handle NULL 'arg'.
3627 (catch_load_command_1): Likewise.
3628 (catch_unload_command_1): Likewise.
3629 (catch_ada_exception_command): Likewise.
3630 (catch_assert_command): Likewise.
3631 (catch_catch_command): New function.
3632 (catch_throw_command): Likewise.
3633 (catch_command_1): Remove.
3634 (catch_command): Just call error.
3635 (tcatch_command): Likewise.
3636 (catch_cmdlist): New global.
3637 (tcatch_cmdlist): Likewise.
3638 (add_catch_command): New function.
3639 (_initialize_breakpoint): Create "catch" and "tcatch" as prefix
3640 commands. Create all catch sub-commands.
3641
3642 2008-08-17 Pedro Alves <pedro@codesourcery.com>
3643
3644 * gdbthread.h: Add comments.
3645 * stack.c (get_selected_block): Return 0 on an exited thread.
3646 * top.c (execute_command): Check for is_stopped, not !is_running.
3647 * event-top.c (command_handler): Likewise.
3648
3649 2008-08-16 Pedro Alves <pedro@codesourcery.com>
3650
3651 * mi/mi-main.c (mi_cmd_exec_next, mi_cmd_exec_next_instruction)
3652 (mi_cmd_exec_step, mi_cmd_exec_step_instruction)
3653 (mi_cmd_exec_finish): Remove "return".
3654
3655 2008-08-16 Pedro Alves <pedro@codesourcery.com>
3656
3657 * target.h (pop_all_targets): Declare.
3658 * target.c (pop_all_targets): New.
3659 * top.c (quit_target): Pop all targets instead of just closing the
3660 current.
3661
3662 2008-08-16 Vladimir Prus <vladimir@codesourcery.com>
3663 Thiago Jung Bauermann <bauerman@br.ibm.com>
3664
3665 * cli-script.c (read_next_line): Add parse_commands argument.
3666 (recurse_read_control_structure): Adapt to new read_next_line
3667 signature.
3668 (read_command_lines): Add parse_commands argument.
3669 (define_command): Adapt to new read_command_lines signature.
3670 (document_command): Likewise.
3671 * breakpoint.c (commands_command): Likewise.
3672 * defs.h (read_command_lines): Adjust function prototype.
3673
3674 2008-08-16 Paul N. Hilfinger <hilfinger@adacore.com>
3675
3676 * ada-lang.c (pos_atr): Account for the possibility that the
3677 argument may be a reference.
3678
3679 2008-08-16 Paul N. Hilfinger <hilfingr@adacore.com>
3680
3681 * xcoffread.c (scan_xcoff_symtab): Do not include global symbols
3682 ('F' format) for @FIX names generated by the loader, retaining only
3683 the minimal symbols (and no partial symbol tables) for these names.
3684 Fixes warning messages about symbols that are found in partial
3685 symbol tables, but not full symbol tables.
3686
3687 2008-08-16 Pedro Alves <pedro@codesourcery.com>
3688
3689 * infrun.c (fetch_inferior_event): Only call normal_stop if not
3690 stopping quietly.
3691
3692 2008-08-15 Luis Machado <luisgpm@br.ibm.com>
3693
3694 * rs6000-tdep: Include "features/rs6000/powerpc-vsx32.c".
3695 Include "features/rs6000/powerpc-vsx64.c".
3696 (ppc_supply_vsxregset): New function.
3697 (ppc_collect_vsxregset): New function.
3698 (IS_VSX_PSEUDOREG): New macro.
3699 (IS_EFP_PSEUDOREG): New macro.
3700 (vsx_register_p): New function.
3701 (ppc_vsx_support_p): New function.
3702 (rs6000_builtin_type_vec128): New function.
3703 (rs6000_register_name): Hide upper halves of vs0~vs31. Return
3704 correct names for VSX registers and EFPR registers.
3705 (rs6000_pseudo_register_type): Return correct types for VSX
3706 and EFPR registers.
3707 (rs6000_pseudo_register_reggroup_p): Return correct group for
3708 VSX and EFPR registers.
3709 (ppc_pseudo_register_read): Rename to dfp_pseudo_register_read.
3710 (ppc_pseudo_register_write): Rename to dfp_pseudo_register_write.
3711 (vsx_pseudo_register_read): New function.
3712 (vsx_pseudo_register_write): New function.
3713 (efpr_pseudo_register_read): New function.
3714 (efpr_pseudo_register_write): New function.
3715 (rs6000_pseudo_register_read): Call new VSX and EFPR read functions.
3716 (rs6000_pseudo_register_write): Call new VSX and EFPR write functions.
3717 (rs6000_gdbarch_init): Declare have_vsx.
3718 Initialize new upper half VSX registers.
3719 Initialize VSX-related and EFPR-related pseudo-registers variables.
3720 Adjust the number of pseudo registers accordingly.
3721
3722 * ppc-linux-nat.c: Define PTRACE_GETVSXREGS, PTRACE_SETVSXREGS
3723 and SIZEOF_VSRREGS.
3724 (gdb_vsxregset_t): New type.
3725 (have_ptrace_getsetvsxregs): New variable.
3726 (fetch_vsx_register): New function.
3727 (fetch_register): Handle VSX registers.
3728 (fetch_vsx_registers): New function.
3729 (fetch_ppc_registers): Handle VSX registers.
3730 (store_ppc_registers): Handle VSX registers.
3731 (store_vsx_register): New function.
3732 (store_register): Handle VSX registers.
3733 (store_vsx_registers): New function.
3734 (ppc_linux_read_description): Handle VSX-enabled inferiors.
3735 (gdb_vsxregset_t): New type.
3736 (supply_vsxregset): New function.
3737 (fill_vsxregset): New function.
3738
3739 * ppc-tdep.h (vsx_register_p): New prototype.
3740 (vsx_support_p): New prototype.
3741 (ppc_vsr0_regnum): New variable.
3742 (ppc_vsr0_upper_regnum): Likewise.
3743 (ppc_efpr0_regnum): Likewise.
3744 (ppc_builtin_type_vec128): New type.
3745 (ppc_num_vsrs): New constant.
3746 (ppc_num_vshrs): New constant.
3747 (ppc_num_efprs): Likewise.
3748 Define POWERPC_VEC_VSX PPC_VSR0_UPPER_REGNUM and PPC_VSR31_UPPER_REGNUM.
3749 (ppc_supply_vsxregset): New prototype.
3750 (ppc_collect_vsxregset): New prototype.
3751
3752 * ppc-linux-tdep.c: Include "features/rs6000/powerpc-vsx32l.c"
3753 Include "features/rs6000/powerpc-vsx64l.c".
3754 (_initialize_ppc_linux_tdep): Initialize VSX-enabled targets.
3755 (ppc_linux_regset_sections): Add new ".reg-ppc-vsx" field.
3756 (ppc32_linux_vsxregset): New 32-bit VSX-enabled regset.
3757 (ppc_linux_regset_from_core_section): Handle VSX core section.
3758 (ppc_linux_core_read_description): Support VSX-enabled core files.
3759
3760 * ppc-linux-tdep.h: Declare *tdesc_powerpc_vsx32l
3761 Declare tdesc_powerpc_vsx64l
3762
3763 * corelow.c (get_core_register_section): Support VSX-enabled
3764 core files.
3765
3766 * features/rs6000/power-vsx.xml: New VSX descriptions.
3767 * features/rs6000/powerpc-vsx32.xml: New file.
3768 * features/rs6000/powerpc-vsx32l.xml: New file.
3769 * features/rs6000/powerpc-vsx64.xml: New file.
3770 * features/rs6000/powerpc-vsx64l.xml: New file.
3771 * features/rs6000/powerpc-vsx32.c: New file (generated).
3772 * features/rs6000/powerpc-vsx32l.c: New file (generated).
3773 * features/rs6000/powerpc-vsx64.c: New file (generated).
3774 * features/rs6000/powerpc-vsx64l.c: New file (generated).
3775 * features/Makefile: Updated with new descriptions.
3776 * regformats/rs6000/powerpc-vsx32l.dat: New file (generated).
3777 * regformats/rs6000/powerpc-vsx64l.dat: New file (generated).
3778
3779 2008-08-15 Vladimir Prus <vladimir@codesourcery.com>
3780
3781 * ia64-linux.nat (_initialize_ia64_linux_nat): Don't
3782 call linux_target twice.
3783
3784 2008-08-14 Aleksandar Ristovski <aristovski@qnx.com>
3785
3786 * nto-tdep.c (lm_info): Updated struct lm_info definition from
3787 solib-svr4.c
3788 (LM_ADDR): Use l_addr if available; if not, use link map and set
3789 l_addr.
3790
3791 2008-08-14 Tom Tromey <tromey@redhat.com>
3792
3793 * macrocmd.c (macro_define_command): Check for NULL argument.
3794 (macro_undef_command): Likewise.
3795
3796 2008-08-14 Pedro Alves <pedro@codesourcery.com>
3797
3798 * infcmd.c (continue_1): Add an ERROR_NO_INFERIOR call.
3799
3800 2008-08-13 Pedro Alves <pedro@codesourcery.com>
3801
3802 * breakpoint.c (always_inserted_auto, always_inserted_on)
3803 (always_inserted_off, always_inserted_enums): New.
3804 (always_inserted_mode): Change type to char* and point to
3805 always_inserted_auto.
3806 (show_always_inserted_mode): In auto mode, also show the current
3807 effect of the option.
3808 (breakpoints_always_inserted_mode): Adjust for the new auto mode.
3809 (_initialize_breakpoint): Make the "set breakpoints
3810 always-inserted" command an enum command. Extend help to describe
3811 the auto mode.
3812
3813 2008-08-13 Ulrich Weigand <uweigand@de.ibm.com>
3814
3815 * spu-tdep.c (info_spu_dma_command): Respect TSQV (tag status
3816 query valid) bit. Ignore bits outside the condition field.
3817 (info_spu_proxydma_command): Ignore bits outside the field.
3818
3819 2008-08-12 Michael Snyder <msnyder@vmware.com>
3820
3821 * MAINTAINERS: Update my email address.
3822
3823 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
3824
3825 * ppc-linux-nat.c (ppc_linux_get_hwcap): Really get AT_HWCAP.
3826
3827 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3828
3829 Add no-ack mode to the remote protocol --- optionally stop ACKing
3830 packets and responses when we have a reliable communication
3831 medium.
3832
3833 Based on Apple's GDB, by Jason Molenda <jmolenda@apple.com>
3834
3835 * remote.c (struct remote_state): Add noack_mode field.
3836 (PACKET_QStartNoAckMode): New.
3837 (remote_start_remote): Don't any outstanding packet here.
3838 (remote_open_1): Clear noack_mode. Ack any outstanding packet
3839 here. Activate noack mode if requested.
3840 (remote_protocol_features): Add QStartNoAckMode.
3841 (remote_open_1):
3842 (putpkt_binary): Don't send ack in noack mode.
3843 (read_frame): Don't recompute the checksum in noack mode.
3844 (getpkt_sane): Skip sending ack if in noack mode.
3845 (_initialize_remote): Add set/show remote noack mode.
3846 * NEWS: Note the new features.
3847
3848 2008-08-11 Kevin Buettner <kevinb@redhat.com>
3849
3850 * rs6000-tdep.c (BL_MASK, BL_INSTRUCTION, BL_DISPLACEMENT_MASK):
3851 New macros.
3852 (rs6000_skip_main_prologue): New function.
3853 (rs6000_gdb_arch_init): Register rs6000_skip_main_prologue.
3854
3855 2008-08-11 Sandra Loosemore <sandra@codesourcery.com>
3856
3857 * MAINTAINERS (Write After Approval): Add self.
3858
3859 2008-08-11 Stan Shebs <stan@codesourcery.com>
3860
3861 ARM BE8 support.
3862 * disasm.c (gdb_disassemble_info): Set endian_code.
3863 * gdbarch.sh (gdbarch_info): New field byte_order_for_code.
3864 * gdbarch.h, gdbarch.c: Regenerate.
3865 * arch-utils.c (initialize_current_architecture): Set the
3866 default byte_order_for_code.
3867 (gdbarch_info_init): Ditto.
3868 (gdbarch_info_fill): Ditto.
3869 * arm-tdep.c (SWAP_INT, SWAP_SHORT): New macros.
3870 (thumb_analyze_prologue): Swap halfword if code endianness is
3871 different from general endianness.
3872 (arm_skip_prologue): Similarly.
3873 (arm_scan_prologue): Ditto.
3874 (thumb_get_next_pc): Ditto.
3875 (arm_get_next_pc): Ditto.
3876 (arm_gdbarch_init): Set byte_order_for_code from BE8 flag,
3877 choose correct endianness for breakpoints.
3878
3879 2008-08-10 Pedro Alves <pedro@codesourcery.com>
3880
3881 * bsd-kvm.c: Include "gdbthread.h".
3882 (bsd_kvm_ptid): New.
3883 (bsd_kvm_open): Add a main thread.
3884 (bsd_kvm_close): Delete it.
3885 (bsd_kvm_thread_alive): New.
3886 (bsd_kvm_pid_to_str): New.
3887 (bsd_kvm_add_target): Register bsd_kvm_thread_alive and
3888 bsd_kvm_pid_to_str.
3889 (bsd_kvm_add_target): Initialize bsd_kvm_ptid.
3890
3891 2008-08-09 Pedro Alves <pedro@codesourcery.com>
3892
3893 * buildsym.c (start_subfile): Properly cast sentinel in concat
3894 call.
3895 * cp-name-parser.y: Include "config.h".
3896 * xml-tdesc.c (fetch_xml_from_file): Properly cast sentinel in
3897 concat call.
3898 * gdb_select.h: Include sys/time.h if sys/select.h is not
3899 available.
3900
3901 2008-08-09 Pedro Alves <pedro@codesourcery.com>
3902
3903 * go32-nat.c: Include "gdbthread.h".
3904 (go32_stop, go32_kill_inferior): Delete the main thread.
3905 (go32_create_inferior): Add it.
3906 (go32_thread_alive, go32_pid_to_str): New.
3907 (init_go32_ops): Register go32_thread_alive and go32_pid_to_str.
3908
3909 2008-08-09 Pedro Alves <pedro@codesourcery.com>
3910
3911 * go32-nat.c (fetch_register, store_register): Pass the regcache
3912 gdbarch to i386_fp_regnum_p and i386_fpc_regnum_p.
3913 (go32_xfer_memory): Change type of myaddr parameter to gdb_byte.
3914 (struct seg_descr, struct seg_descr): pack the whole struct
3915 instead of each member individually.
3916
3917 2008-08-09 Andreas Schwab <schwab@suse.de>
3918
3919 * python/python.c (_initialize_python): Use unabbreviated commands
3920 in prefix name.
3921
3922 2008-08-09 Daniel Jacobowitz <dan@codesourcery.com>
3923
3924 * Makefile.in (stamp-h): Also create .deps.
3925
3926 2008-08-09 Tom Tromey <tromey@redhat.com>
3927
3928 * Makefile.in (generated_files): Add GNULIB_H.
3929
3930 2008-08-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3931
3932 * solib-pa64.c (pa64_solib_create_inferior_hook): Don't set
3933 DT_HP_DEBUG_PRIVATE. Add warning if DT_HP_DEBUG_PRIVATE is not set.
3934 Revise comment.
3935 (pa64_current_sos): Remove map private warning warning.
3936 * solib-som.c: Include string.h and sys/utsname.h.
3937 (get_hpux_major_release): New function.
3938 (som_solib_create_inferior_hook): Read dynamic linker header. Warn
3939 about shared library private mapping on HP-UX 11 and later. Only force
3940 private mapping of shared libraries on HP-UX 10 and earlier.
3941 (link_map_start): Delete warning.
3942
3943 2008-08-09 Xuepeng Guo <xuepeng.guo@intel.com>
3944 H.J. Lu <hongjiu.lu@intel.com>
3945 Mark Kettenis <kettenis@gnu.org>
3946
3947 * amd64-tdep.c (amd64_frame_cache): Add saved_sp_reg.
3948 (amd64_init_frame_cache): Initialize saved_sp_reg.
3949 (amd64_analyze_stack_align): New.
3950 (amd64_analyze_prologue): Call it.
3951 (amd64_frame_cache): Use saved_sp_reg if it is invalid. Don't set
3952 %rip to 8 when halfway aligning the stack.
3953
3954 * amd64-tdep.h (amd64_regnum): Add AMD64_R9_REGNUM to
3955 AMD64_R14_REGNUM.
3956
3957 * i386-tdep.c (i386_frame_cache): Remove stack_align. Add
3958 saved_sp_reg.
3959 (i386_alloc_frame_cache): Remove stack_align. Initialize
3960 saved_sp_reg to -1.
3961 (i386_analyze_stack_align): Rewrite.
3962 (i386_frame_cache): Use saved_sp_reg if it is valid.
3963
3964 2008-08-09 Ulrich Weigand <uweigand@de.ibm.com>
3965
3966 * target.c: Include "solib.h".
3967 (target_pre_inferior): Call no_shared_libraries.
3968 * infcmd.c (run_command_1): Do not call objfile_purge_solibs
3969 or clear_solib.
3970 (attach_command): Do not call clear_solib.
3971
3972 2008-08-09 Mark Kettenis <kettenis@gnu.org>
3973
3974 * i386obsd-nat.c (i386obsd_supply_pcb): Supply the right bytes for
3975 the %eip register.
3976
3977 2008-08-08 Tom Tromey <tromey@redhat.com>
3978
3979 * Makefile.in (python.o): Remove dependencies. Use COMPILE and
3980 POSTCOMPILE.
3981 (python-utils.o): Likewise.
3982
3983 2008-08-08 Andreas Schwab <schwab@suse.de>
3984
3985 * corefile.c (_initialize_core): Remove spurious paren from set
3986 gnutarget doc string.
3987
3988 2008-08-08 Luis Machado <luisgpm@br.ibm.com>
3989
3990 * ppc-linux-nat.c: Include "auxv.h" and "elf/common.h".
3991 Define PPC_FEATURE_BOOKE.
3992 (ppc_linux_get_hwcap): New function.
3993 (ppc_linux_region_ok_for_hw_watchpoint): Handle PowerPC 440
3994 4-bytes alignment restrictions.
3995 (ppc_linux_insert_watchpoint): Handle PowerPC 440-specific
3996 positioning of the read/write flags.
3997 (ppc_linux_watchpoint_addr_within_range): Handle PowerPC 440
3998 4-bytes alignment.
3999
4000 2008-08-08 Pedro Alves <pedro@codesourcery.com>
4001
4002 Use ptid_t.tid to store thread ids instead of ptid_t.pid.
4003
4004 * win32-nat.c (win32_add_thread): Change thread argument type to
4005 ptid_t. Adjust.
4006 (win32_add_thread): Adjust.
4007 (win32_delete_thread): Change thread argument type to ptid_t.
4008 Adjust.
4009 (win32_fetch_inferior_registers, win32_store_inferior_registers)
4010 (win32_resume, get_win32_debug_event, get_win32_debug_event)
4011 (win32_wait, win32_pid_to_exec_file, win32_pid_to_str): Adjust.
4012 (init_win32_ops): Put to_magic last.
4013 (win32_win32_thread_alive): Adjust.
4014
4015 2008-08-08 Pedro Alves <pedro@codesourcery.com>
4016
4017 * remote-m32r-sdi.c (m32r_thread_alive, m32r_pid_to_str): New.
4018 (init_m32r_ops): Register m32r_thread_alive and m32r_pid_to_str.
4019
4020 2008-08-08 Pedro Alves <pedro@codesourcery.com>
4021
4022 * remote-m32r-sdi.c: Include "gdbthread.h".
4023 (remote_m32r_ptid): New.
4024 (m32r_close): Delete the main thread.
4025 (m32r_resume): Set inferior_ptid toA remote_m32r_ptid. Add the
4026 main thread.
4027 (m32r_kill, m32r_load, sdireset_command): Delete the main thread.
4028 (_initialize_remote_m32r): Initialize remote_m32r_ptid.
4029
4030 2008-08-07 Tom Tromey <tromey@redhat.com>
4031 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4032
4033 * aclocal.m4, configure: Rebuild.
4034 * configure.in: Call ZW_CREATE_DEPDIR,
4035 ZW_PROG_COMPILER_DEPENDENCIES, AC_PROG_MAKE_SET.
4036 (MAKE, GMAKE): New substs.
4037 * acinclude.m4: Include depstand.m4.
4038 * Makefile.in (DEPMODE, DEPDIR, COMPILE.post, COMPILE.pre,
4039 COMPILE, POSTCOMPILE, depcomp): New variables.
4040 Remove all _h variables.
4041 Remove many .o targets.
4042 ($(srcdir)/copying.c): avoid backslash-newline after comment
4043 sign (@maintainer_mode_true@).
4044 (HFILES_NO_SRCDIR): Regenerate.
4045 (generated_files): New variable.
4046 (all_gdbtk_cflags): Likewise.
4047 (.c.o): Rewrote.
4048 (init.o, version.o, copying.o): Remove.
4049 (distclean): Remove DEPDIR.
4050 (test-cp-name-parser.o, hpux-thread.o, main.o, monitor.o,
4051 printcmd.o, procfs.o, v850ice.o): Rewrite.
4052 (cli-cmds.o, cli-decode.o, cli-dump.o, cli-interp.o, cli-logging.o,
4053 cli-script.o, cli-setshow.o, cli-utils.o): Likewise.
4054 (gdbtk.o, gdbtk-bp.o, gdbtk-cmds.o, gdbtk-hooks.o, gdbtk-interp.o,
4055 gdbtk-main.o, gdbtk-register.o, gdbtk-stack.o, gdbtk-varobj.o,
4056 gdbtk-wrapper.o): Likewise.
4057 (mi-cmd-break.o, mi-cmd-disas.o, mi-cmd-env.o, mi-cmd-file.o,
4058 mi-cmds.o, mi-cmd-stack.o, mi-cmd-target.o, mi-cmd-var.o,
4059 mi-console.o, mi-getopt.o, mi-interp.o, mi-main.o, mi-out.o,
4060 mi-parse.o, mi-symbol-cmds.o, mi-common.o, signals.o, tui.o,
4061 tui-command.o, tui-data.o, tui-disasm.o, tui-file.o, tui-hooks.o,
4062 tui-interp.o, tui-io.o, tui-layout.o, tui-main.o, tui-out.o,
4063 tui-regs.o, tui-source.o, tui-stack.o, tui-win.o, tui-windata.o,
4064 tui-wingeneral.o, tui-winsource.o): Likewise.
4065 (all_object_files): New variable.
4066 ($(all_object_files)): New target.
4067 Include dependency files, when using GNU Make.
4068
4069 2008-08-07 Ulrich Weigand <uweigand@de.ibm.com>
4070
4071 * spu-tdep.c (info_spu_dma_cmdlist): Only show entries with
4072 the valid bit set. Ensure display order respects partial
4073 order defined by dependency bits.
4074
4075 2008-08-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4076
4077 * solib-pa64.c (read_dld_descriptor): Return zero if load map is not
4078 setup.
4079
4080 2008-08-06 Mark Kettenis <kettenis@gnu.org>
4081
4082 * i386obsd-nat.c (i386obsd_supply_pcb): Adjust for changes in
4083 OpenBSD 4.3.
4084
4085 2008-08-06 Vladimir Prus <vladimir@codesourcery.com>
4086 Tom Tromey <tromey@redhat.com>
4087 Thiago Jung Bauermann <bauerman@br.ibm.com>
4088 Doug Evans <dje@google.com>
4089
4090 * Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
4091 SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
4092 PYTHON_CFLAGS): New.
4093 (python_h, python_internal_h): New.
4094 (cli-script.o): Depend on python.h
4095 (python.o, python-utils.o): New.
4096 * cli/cli-script.c (print_command_lines): Handle python_control.
4097 (execute_control_command): Handle python_control.
4098 (execute_control_command_untraced): New function.
4099 (while_command): Call execute_control_command_untraced.
4100 (if_command): Likewise.
4101 (get_command_line): Remove static attribute.
4102 (read_next_line): Handle "python".
4103 (recurse_read_control_structure): Handle python_control.
4104 (read_command_lines): Handle python_control.
4105 Include python.h.
4106 * cli/cli-script.h (get_command_line): Add prototype.
4107 (execute_control_command_untraced): Likewise.
4108 * configure.ac: Add --with-python.
4109 * defs.h (enum command_control_type) <python_control>: New
4110 constant.
4111 * python/python-internal.h: New file.
4112 * python/python.c: New file.
4113 * python/python.h: New file.
4114 * python/python-utils.c: New file.
4115 * NEWS: Mention Python scripting support and its new commands.
4116
4117 2008-08-06 Ulrich Weigand <uweigand@de.ibm.com>
4118
4119 * spu-tdep.c (spu_gdbarch_init): Call set_gdbarch_frame_red_zone_size.
4120
4121 2008-08-06 Phil Muldoon <pmuldoon@redhat.com>
4122
4123 * MAINTAINERS (Write After Approval): Add self.
4124
4125 2008-08-06 Phil Muldoon <pmuldoon@redhat.com>
4126
4127 * breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled.
4128 (insert_breakpoint_locations): Likewise.
4129
4130 2008-08-05 Phil Muldoon <pmuldoon@redhat.com>
4131
4132 * breakpoint.c (create_longjmp_breakpoint): Remove unused struct
4133 breakpoint.
4134 (set_longjmp_breakpoint): Likewise.
4135
4136 2008-08-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4137
4138 PR build/2490
4139 * solib-pa64.c: Only compile if both HAVE_ELF_HP_H and __LP64__ are
4140 defined.
4141
4142 2008-08-05 Tom Tromey <tromey@redhat.com>
4143
4144 * bcache.c (deprecated_bcache_added): Initialize obstack.
4145 (bcache_xmalloc): Don't initialize obstack.
4146 (bcache_xfree): Conditionally free obstack.
4147 (bcache_memory_used): Update.
4148
4149 2008-08-05 Tom Tromey <tromey@redhat.com>
4150
4151 * symfile.c (add_psymbol_to_bcache): Return a const pointer. Use
4152 bcache_full.
4153 (append_psymbol_to_list): Accept a const pointer.
4154 (add_psymbol_to_list): Fix const correctness.
4155 * bcache.h: (deprecated_bcache_added, deprecated_bcache): Remove.
4156 (bcache_full): Declare.
4157 * bcache.c (bcache_data, deprecated_bcache): Remove.
4158 (bcache): Use bcache_full.
4159 (bcache_full): Rename from deprecated_bcache_added. Change return
4160 type.
4161
4162 2008-08-04 Stan Shebs <stan@codesourcery.com>
4163
4164 * solib-svr4.c (BKPT_AT_SYMBOL): Remove, always defined.
4165 (bkpt_names): Remove SOLIB_BKPT_NAME, never defined.
4166 (enable_break): Remove test of BKPT_AT_SYMBOL.
4167
4168 2008-08-02 Keith Seitz <keiths@redhat.com>
4169
4170 * acinclude.m4: Include ../config/tcl.m4 to pick up
4171 standard Tcl configury bits.
4172 Remove all Tcl, Tk, Itcl, Itk, etc definitions.
4173 * configure.ac: Don't check if ../itcl exists when building
4174 gdbtk. It could be installed.
4175 Rewrite gdbtk configury to allow for using system-supplied
4176 Tcl and Tk. Gdbtk no longer requires build-time access to
4177 itcl and itk.
4178 * Makefile.in: Remove everything related to itcl and itk.
4179 Rewrite the Tcl bits for gdbtk to correspond to rewrite of
4180 configure.ac.
4181 Remove v850ice.o build rule.
4182 (ALL_TCL_CFLAGS): New convenience defintion. Change all
4183 gdbtk sources to use it.
4184 * configure: Regenerate.
4185
4186 2008-07-31 Stan Shebs <stan@codesourcery.com>
4187
4188 * coffread.c (coff_symtab_read): Remove FUNCTION_EPILOGUE_SIZE.
4189
4190 2008-07-30 Stan Shebs <stan@codesourcery.com>
4191
4192 * objfiles.c (TARGET_KEEP_SECTION): Remove.
4193 (add_to_objfile_sections): Remove use.
4194
4195 2008-07-29 Tom Tromey <tromey@redhat.com>
4196
4197 * cli/cli-decode.c (lookup_cmd_1): Use memcpy.
4198 (lookup_cmd_composition): Likewise.
4199
4200 2008-07-29 Tom Tromey <tromey@redhat.com>
4201
4202 * cli/cli-cmds.c (edit_command): Remove unused variables. Delete
4203 dead code. Fix indentation.
4204
4205 2008-07-29 Stan Shebs <stan@codesourcery.com>
4206
4207 * main.c (captured_main): Remove long-unused #if 0 blocks.
4208
4209 2008-07-28 Tom Tromey <tromey@redhat.com>
4210
4211 * annotate.h (deprecated_annotate_starting_hook): Remove.
4212 (deprecated_annotate_stopped_hook): Remove.
4213 (deprecated_annotate_exited_hook): Remove.
4214 * Makefile.in (annotate.o): Depend on observer_h.
4215 * top.c (deprecated_delete_breakpoint_hook): Remove.
4216 (deprecated_create_breakpoint_hook): Likewise.
4217 (deprecated_modify_breakpoint_hook): Likewise.
4218 * interps.c (clear_interpreter_hooks): Update for removed hooks.
4219 * breakpoint.c (mention): Don't call removed hook.
4220 (delete_breakpoint): Likewise.
4221 (disable_breakpoint): Likewise.
4222 (do_enable_breakpoint): Likewise.
4223 * annotate.c: Include observer.h.
4224 (breakpoint_changed): Change type of argument.
4225 (_initialize_annotate): Register observers.
4226 (deprecated_annotate_starting_hook): Remove.
4227 (deprecated_annotate_stopped_hook): Remove.
4228 (deprecated_annotate_exited_hook): Remove.
4229 (annotate_starting): Update for hook removal.
4230 (annotate_stopped): Likewise.
4231 (annotate_exited): Likewise.
4232 * defs.h (deprecated_delete_breakpoint_hook): Remove.
4233 (deprecated_create_breakpoint_hook): Likewise.
4234 (deprecated_modify_breakpoint_hook): Likewise.
4235
4236 2008-07-28 Tom Tromey <tromey@redhat.com>
4237
4238 * main.c (captured_main): Don't use BEFORE_MAIN_LOOP_HOOK.
4239
4240 2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
4241
4242 * configure.ac: Check for the GNU/Linux ptrace signature.
4243 * configure: Regenerated.
4244
4245 2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
4246
4247 * linux-nat.c (resume_callback): Add more debugging output.
4248 (linux_nat_has_pending_sigint): New function, based on
4249 linux_nat_has_pending.
4250 (set_ignore_sigint, maybe_clear_ignore_sigint): New functions.
4251 (stop_wait_callback): Remove flush_mask handling. Honor
4252 ignore_sigint. Call maybe_clear_ignore_sigint. Pass NULL
4253 to recursive calls.
4254 (linux_nat_has_pending, flush_callback): Remove.
4255 (linux_nat_filter_event): Check for ignore_sigint.
4256 (linux_nat_wait): Remove flush_mask support and call to
4257 flush_callback. Use set_ignore_sigint and maybe_clear_ignore_sigint.
4258 * linux-nat.h (struct lwp_info): Add ignore_sigint field.
4259
4260 2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
4261
4262 * linux-nat.c (count_events_callback, select_event_lwp_callback): Only
4263 report events from resumed threads.
4264
4265 2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
4266
4267 * mips-linux-tdep.c (mips_linux_syscall_next_pc): New function.
4268 (mips_linux_init_abi): Set tdep->syscall_next_pc.
4269 * mips-tdep.c (enum mips_fpu_type, struct gdbarch_tdep): Move to
4270 mips-tdep.h.
4271 (mips32_next_pc): Handle the syscall instruction.
4272 * mips-tdep.h (enum mips_fpu_type, struct gdbarch_tdep): New,
4273 from mips-tdep.c. Add syscall_next_pc to gdbarch_tdep.
4274
4275 2008-07-26 Tom Tromey <tromey@redhat.com>
4276
4277 PR gdb/1158:
4278 * valops.c (value_struct_elt): Treat function-valued field as a
4279 static method.
4280
4281 2008-07-26 Tom Tromey <tromey@redhat.com>
4282
4283 PR gdb/1136:
4284 * macroexp.c (get_punctuator) <punctuators>: Rearrange to put
4285 longer tokens first.
4286
4287 2008-07-26 Vladimir Prus <vladimir@codesourcery.com>
4288
4289 Kill cmd_async_ok.
4290 * cli/cli-decode.h (CMD_ASYNC_OK, set_cmd_async_ok)
4291 (get_cmd_async_ok): Remove.
4292 * cli/cli-decode.c (set_cmd_async_ok, get_cmd_async_ok): Remove.
4293 * cli/cli-cmds.c (init_cli_cmds): Don't use set_cmd_async_ok.
4294 * infcmd.c (_initialize_infcmd): Likewise.
4295 * thread.c (_initialize_thread): Likewise.
4296
4297 2008-07-25 Joseph Myers <joseph@codesourcery.com>
4298
4299 * mips-tdep.c (mips_n32n64_push_dummy_call): Handle passing
4300 128-bit long doubles in even-odd pairs of FPRs. Do not
4301 right-align float arguments for big-endian.
4302 (mips_n32n64_return_value): Apply return value convention for
4303 structs containing one or two floating-point values to soft-float
4304 as well as hard-float. Handle 128-bit long doubles in such
4305 structs.
4306 (mips_o32_push_dummy_call): Only skip one integer register for a
4307 float argument passed in an FPR.
4308
4309 2008-07-25 Tom Tromey <tromey@redhat.com>
4310
4311 * tui/tui-hooks.c: Include observer.h.
4312 (tui_event_default, tui_old_event_hooks, tui_event_hooks):
4313 Remove.
4314 (tui_bp_created_observer, tui_bp_deleted_observer,
4315 tui_bp_modified_observer): New globals.
4316 (tui_install_hooks): Use observers, not events.
4317 (tui_remove_hooks): Likewise.
4318 * mi/mi-cmd-break.c: Include observer.h, not gdb-events.h.
4319 (mi_breakpoint_observers_installed, mi_can_breakpoint_notify): New
4320 globals.
4321 (breakpoint_notify): Check mi_can_breakpoint_notify.
4322 (breakpoint_hooks): Remove.
4323 (mi_cmd_break_insert): Attach observers. Don't use events.
4324 * tracepoint.c: Include observer.h, not gdb-events.h.
4325 (tracepoint_operation, trace_pass_command): Notify observer.
4326 * interps.c: Don't include gdb-events.h.
4327 (clear_interpreter_hooks): Don't call clear_gdb_event_hooks.
4328 * gdbarch.c: Rebuild.
4329 * gdbarch.sh: Emit include for observer.h, not gdb-events.h.
4330 (deprecated_current_gdbarch_select_hack): Notify observer.
4331 * breakpoint.h: Don't include gdb-events.h.
4332 * breakpoint.c: Don't include gdb-events.h.
4333 (condition_command): Notify observer.
4334 (commands_command): Likewise.
4335 (commands_from_control_command): Likewise.
4336 (mention, delete_breakpoint, set_ignore_count): Likewise.
4337 (disable_breakpoint, do_enable_breakpoint): Likewise.
4338 * Makefile.in (gdb_events_h): Remove.
4339 (breakpoint_h): Update.
4340 (COMMON_OBS): Remove gdb-events.o.
4341 (gdb-events.o): Remove.
4342 (breakpoint.o, gdbarch.o, interps.o, tracepoint.o, gdbtk-bp.o,
4343 gdbtk-hooks.o, mi-cmd-break.o, tui-hooks.o): Update.
4344 * gdb-events.c: Remove.
4345 * gdb-events.h: Remove.
4346 * gdb-events.sh: Remove.
4347
4348 2008-07-24 Pedro Alves <pedro@codesourcery.com>
4349
4350 * remote.c (remote_threads_extra_info): Don't query the remote
4351 server about info on the internally added main thread.
4352
4353 2008-07-24 Aleksandar Ristovski <aristovski@qnx.com>
4354
4355 * nto-procfs.c (procfs_attach): Populate initial thread list.
4356 (procfs_wait): Return new pid, built from the inferior status.
4357
4358 2008-07-23 Thiago Jung Bauermann <bauerman@br.ibm.com>
4359
4360 * configure.ac (CONFIG_INITS): Delete long obsoleted variable.
4361 * configure: Regenerate.
4362
4363 2008-07-23 Aleksandar Ristovski <aristovski@qnx.com>
4364
4365 * nto-procfs.c (procfs_xfer_memory): Changed signature.
4366 (procfs_resume): Workaround for dereferencing type-punned pointer
4367 warning.
4368 * nto-tdep.c (nto_parse_redirection): Change signature to be const
4369 correct.
4370 * nto-tdep.h (nto_parse_redirection): Likewise.
4371
4372 2008-07-21 Stan Shebs <stan@codesourcery.com>
4373
4374 Scrub remnants of IN_SOLIB_DYNSYM_RESOLVE_CODE.
4375 * gdbarch.sh: Adjust comment to refer to
4376 in_solib_dynsym_resolve_code().
4377 * gdbarch.h, gdbarch.c: Update.
4378 * solib-osf.c: Ditto.
4379 * infrun.c: Ditto.
4380 (handle_inferior_event): Use in_solib_dynsym_resolve_code
4381 unconditionally.
4382 * config/mips/nm-irix5.h: Remove undef of
4383 IN_SOLIB_DYNSYM_RESOLVE_CODE.
4384
4385 2008-07-21 Tom Tromey <tromey@redhat.com>
4386
4387 * symfile.c (reread_symbols): Don't pass argument to observer.
4388 * exec.c (exec_file_attach): Don't pass argument to observer.
4389 * ada-lang.c (ada_executable_changed_observer): Remove argument.
4390 * symtab.c (symtab_observer_executable_changed): Remove argument.
4391 * observer.sh: Handle functions with no arguments.
4392
4393 2008-07-20 Sergei Poselenov <sposelenov@emcraft.com>
4394 Chris Demetriou <cgd@google.com>
4395
4396 * elfread.c (elf_symfile_segments): Fix the check that each loadable
4397 section fits within an ELF segment to handle ELF segments that hit
4398 the end of the address space.
4399
4400 2008-07-20 Chris Demetriou <cgd@google.com>
4401
4402 * MAINTAINERS (Write After Approval): Add self.
4403
4404 2008-07-18 Tom Tromey <tromey@redhat.com>
4405
4406 PR gdb/855:
4407 * NEWS: Add entry for macro commands.
4408 * Makefile.in (macrocmd.o): Add gdb_string.h.
4409 * macroscope.h (user_macro_scope): Declare.
4410 (default_macro_scope): Update documentation.
4411 (macro_user_macros): Declare.
4412 * c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
4413 Use user_macro_scope.
4414 (null_macro_lookup): Remove.
4415 * macrotab.h (macro_callback_fn): Declare.
4416 (macro_for_each): Likewise.
4417 (macro_allow_redefinitions): Likewise.
4418 * macrotab.c (foreach_macro): New function
4419 (macro_for_each): Likewise.
4420 (struct macro_table) <redef_ok>: New field.
4421 (macro_allow_redefinitions): New function.
4422 (new_macro_table): Update.
4423 (macro_define_function): Likewise.
4424 (macro_define_object): Likewise.
4425 * macroscope.c (user_macro_scope): New function.
4426 (default_macro_scope): Use it.
4427 (macro_user_macros): New global.
4428 (standard_macro_lookup): Look in macro_user_macros.
4429 (_initialize_macroscope): New function.
4430 * macroexp.h (macro_is_whitespace, macro_is_digit,
4431 macro_is_identifier_nondigit): Declare.
4432 * macroexp.c (macro_is_whitespace): Rename. No longer static.
4433 (macro_is_digit): Likewise.
4434 (macro_is_identifier_nondigit): Likewise.
4435 (get_identifier): Update.
4436 (get_pp_number): Likewise.
4437 (get_token): Likewise.
4438 * macrocmd.c (skip_ws): New function.
4439 (extract_identifier): Likewise.
4440 (free_macro_definition_ptr): Likewise.
4441 (user_macros): Remove.
4442 (macro_define_command): Implement.
4443 (_initialize_macrocmd): Update.
4444 (macro_undef_command): Implement.
4445 (print_one_macro): New function.
4446 (macro_list_command): Implement.
4447
4448 2008-07-18 Joseph Myers <joseph@codesourcery.com>
4449
4450 * configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
4451 in BFD ELF check.
4452 * configure: Regenerate.
4453
4454 2008-07-17 Paul Pluzhnikov <ppluzhnikov@google.com>
4455
4456 * auxv.c (fprint_target_auxv): Stop at AT_NULL.
4457
4458 2008-07-15 Andreas Schwab <schwab@suse.de>
4459
4460 * valops.c (value_cast_pointers): Follow typedefs when checking
4461 result of coercion.
4462
4463 2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
4464
4465 * block.c (block_function): Renamed to ...
4466 (block_linkage_function): ... this. All callers changed.
4467 * block.h (block_function): Renamed to ...
4468 (block_linkage_function): ... this.
4469
4470 2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
4471
4472 * mn10300-tdep.c (set_reg_offsets): Use get_frame_register_unsigned.
4473
4474 2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
4475
4476 * frame.c (frame_sp_unwind): Delete.
4477 (get_frame_sp): Do not use it.
4478 * frame.h (frame_sp_unwind): Delete prototype.
4479
4480 2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
4481
4482 * ia64-tdep.c (ia64_dummy_id): Use get_frame_pc.
4483
4484 2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
4485
4486 * dwarf2-frame.c (dwarf2_frame_cache): Update comment.
4487 * frame.c (frame_unwind_address_in_block): Delete.
4488 (get_frame_address_in_block): Do not use it. Check the type
4489 of the next frame first.
4490 (frame_cleanup_after_sniffer): Update comment.
4491 * frame.h (frame_unwind_address_in_block): Delete prototype.
4492 * hppa-tdep.c (hppa_find_unwind_entry_in_block): Update comment.
4493
4494 2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
4495
4496 * frame.c (frame_func_unwind): Delete.
4497 (get_frame_func): Do not use it.
4498 * frame.h (frame_func_unwind): Delete prototype.
4499 * hppa-tdep.c (hppa_frame_cache): Update comment.
4500 * rs6000-tdep.c (rs6000_frame_cache): Update comment.
4501
4502 2008-07-14 Stan Shebs <stan@codesourcery.com>
4503
4504 * remote-sim.c (init_gdbsim_ops): Remove
4505 TARGET_REDEFINE_DEFAULT_OPS.
4506
4507 2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
4508
4509 * findvar.c (read_var_value): Remove unused variable.
4510
4511 2008-07-15 Luis Machado <luisgpm@br.ibm.com>
4512
4513 * infrun.c (handle_inferior_event): Tag threads as stopped
4514 before inserting breakpoints.
4515
4516 2008-07-15 Hui Zhu <teawater@gmail.com>
4517
4518 * MAINTAINERS: Added myself to section Write After Approval.
4519
4520 2008-07-14 Paul Pluzhnikov <ppluzhnikov@google.com>
4521
4522 PR gdb/2477
4523 * cp-abi.c (value_virtual_fn_field): Handle invalid pointers.
4524
4525 2008-07-14 Pedro Alves <pedro@codesourcery.com>
4526
4527 * i386-dicos-tdep.c (i386_dicos_frame_align): Delete.
4528 (i386_dicos_push_dummy_code): New.
4529 (i386_dicos_init_abi): Don't register i386_dicos_frame_align.
4530 Register i386_dicos_push_dummy_code.
4531
4532 2008-07-14 Markus Deuling <deuling@de.ibm.com>
4533
4534 * mips-tdep.c (fp_register_arg_p): Add gdbarch as paramter.
4535 (mips_n32n64_push_dummy_call, mips_o64_return_value)
4536 (mips_eabi_push_dummy_call): Update call to fp_register_arg_p.
4537
4538 (MIPS_FPU_TYPE): Add gdbarch as parameter and replace current_gdbarch.
4539 (fp_register_arg_p, mips_dump_tdep, show_mipsfpu_command)
4540 (mips_n32n64_fp_arg_chunk_p): Update caller.
4541
4542 (mips_n32n64_fp_arg_chunk_p): Add gdbarch as paramter.
4543 (mips_n32n64_push_dummy_call): Update caller.
4544
4545 (MIPS_LAST_ARG_REGNUM): Add gdbarch as parameter and replace
4546 current_gdbarch.
4547 (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
4548 (mips_o32_push_dummy_call, mips_o64_push_dummy_call): Update caller.
4549
4550
4551 (MIPS_LAST_FP_ARG_REGNUM): Add gdbarch as parameter and replace
4552 current_gdbarch.
4553 (mips_eabi_push_dummy_call, mips_o32_push_dummy_call)
4554 (mips_o64_push_dummy_call): Update caller.
4555
4556 (MIPS_EABI): Add gdbarch as parameter and replace current_gdbarch.
4557 (fp_register_arg_p, mips_dump_tdep): Update caller.
4558
4559 (set_reg_offset): Add gdbarch as parameter and replace current_gdbarch.
4560 (mips16_scan_prologue, mips32_scan_prologue): Update caller.
4561
4562 (reset_saved_regs): Make static. Add gdbarch as parameter. Replace
4563 current_gdbarch.
4564 (mips32_scan_prologue): Update caller.
4565
4566 (heuristic_proc_start): Add gdbarch as parameter. Replace
4567 current_gdbarch.
4568 (mips_insn16_frame_cache, mips_insn32_frame_cache): Update caller.
4569
4570 * mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
4571 (mipsnbsd_store_inferior_registers): Use get_regcache_arch to get at
4572 the current architecture. Update call to getregs_supplies.
4573 (getregs_supplies): Add gdbarch as parameter and replace
4574 current_gdbarch.
4575
4576 * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use get_frame_arch to
4577 get at the current architecture. Update call to NBSD_MIPS_JB_OFFSET and
4578 NBSD_MIPS_JB_ELEMENT_SIZE.
4579 (NBSD_MIPS_JB_ELEMENT_SIZE, NBSD_MIPS_JB_OFFSET): Add gdbarch and
4580 replace current_gdbarch.
4581
4582 * remote-mips.c (mips_map_regno): Add gdbarch as parameter and replace
4583 current_gdbarch.
4584 (mips_fetch_registers, mips_store_registers): Update call
4585 to mips_map_regno.
4586 (mips_load): Use get_regcache_arch to get at the current_architecture
4587 and replace current_gdbarch.
4588
4589 2008-07-13 Pedro Alves <pedro@codesourcery.com>
4590
4591 * thread.c (restore_selected_frame): On fail to restore, select
4592 the innermost frame, and don't crash when warning the user.
4593
4594 2008-07-13 Hui Zhu <teawater@gmail.com>
4595
4596 * symtab.c (expand_line_sal): Fix a memory leak.
4597
4598 2008-07-13 Pedro Alves <pedro@codesourcery.com>
4599
4600 * utils.c (struct continuation): Define as inheriting struct
4601 cleanup.
4602 (add_continuation, do_all_continuations)
4603 (discard_all_continuations, add_intermediate_continuation)
4604 (do_all_intermediate_continuations)
4605 (discard_all_intermediate_continuations): Adjust.
4606
4607 2008-07-13 Vladimir Prus <vladimir@codesourcery.com>
4608
4609 Skip varobj in running threads.
4610 * mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's
4611 thread is not stopped, skip the varobj.
4612 * Makefile.in: Update dependencies.
4613
4614 2008-07-13 Vladimir Prus <vladimir@codesourcery.com>
4615
4616 Enable all commands while inferiour is running
4617 * mi/mi-main.c (mi_cmd_execute): Don't check if
4618 inferiour is executing.
4619
4620 2008-07-13 Vladimir Prus <vladimir@codesourcery.com>
4621
4622 Allow all CLI command even if target is executing.
4623 * gdb/top.c (execute_command_1): Don't check if the inferiour
4624 is running.
4625
4626 2008-07-13 Vladimir Prus <vladimir@codesourcery.com>
4627
4628 * mi/mi-main.c (mi_cmd_execute): Remove unused variable.
4629 Fix printing of frame, when frame is wrong.
4630
4631 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4632
4633 * spu-tdep.c (spu_frame_unwind_cache): Do not error if
4634 backchain is unreadable.
4635
4636 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4637
4638 * spu-linux-nat.c: Include "gdbthread.h".
4639 (spu_child_post_startup_inferior): Register main thread.
4640 (spu_child_post_attach): Likewise.
4641 * Makefile.in (spu-linux-nat.o): Update dependencies.
4642
4643 2008-07-12 Pedro Alves <pedro@codesourcery.com>
4644
4645 Rewrite continuations internals on top of cleanups and plug
4646 continuation arguments leaks.
4647
4648 * defs.h (struct continuation): Make it opaque.
4649 (add_continuation, add_intermediate_continuation): Drop the int
4650 argument of the continuation hook argument. Add
4651 continuation_free_args argument.
4652 (do_all_continuations, do_all_intermediate_continuations): Drop
4653 the error_p argument.
4654
4655 * utils.c (add_continuation): Drop the int argument of the
4656 continuation hook argument. Add continuation_free_args argument.
4657 Reimplement on top of cleanups.
4658 (do_all_continuations): Drop error argument. Reimplement on top
4659 of cleanups.
4660 (discard_all_continuations): Reimplement on top of cleanups.
4661 (add_intermediate_continuation): Drop the int argument of the
4662 continuation hook argument. Add continuation_free_args argument.
4663 Reimplement on top of cleanups.
4664 (do_all_intermediate_continuations): Drop error argument.
4665 Reimplement on top of cleanups.
4666 (discard_all_intermediate_continuations): Reimplement on top of
4667 cleanups.
4668
4669 * breakpoint.c (until_break_command_continuation): Drop error
4670 argument. Add xfree as continuation argument deleter.
4671
4672 * inf-loop.c (inferior_event_handler): On error, discard all
4673 continuations. Adjust to new do_all_intermediate_continuations
4674 and do_all_continuations interfaces.
4675
4676 * infcmd.c (step_1_continuation): Drop error_p argument. Adjust.
4677 Pass xfree as continuation argument deleter.
4678 (finish_command_continuation): Drop error_p argument. Adjust.
4679 (finish_command_continuation_free_arg): New.
4680 (finish_command): Pass finish_command_continuation_free_arg as
4681 continuation argument deleter. Adjust to new do_all_continuations
4682 interfaces.
4683 (attach_command_continuation): Drop error_p argument.
4684 (attach_command_continuation_free_args): New.
4685 (attach_command): Pass attach_command_continuation_free_args as
4686 continuation argument deleter.
4687
4688 * interps.c (interp_set): Adjust to new do_all_continuations
4689 interfaces.
4690
4691 * event-top.c (stdin_event_handler): In error, also discard the
4692 intermediate continuations.
4693
4694 2008-07-12 Pedro Alves <pedro@codesourcery.com>
4695
4696 Replace struct continuation_args by void* and per command structs.
4697
4698 * top.c (execute_command): Remove unused arg1 and arg2 locals.
4699
4700 * breakpoint.c (struct until_break_command_continuation_args):
4701 New.
4702 (until_break_command_continuation): Take a void* instead of a
4703 continuations_arg. Adjust.
4704 (until_break_command): Adjust to use struct
4705 until_break_command_continuation_args instead of struct
4706 continuation_arg.
4707
4708 * infcmd.c (struct step_1_continuation_args): New.
4709 (step_1_continuation): Take a void* instead of a
4710 continuations_arg. Adjust to use struct step_1_continuation_args.
4711 (step_once): Adjust to use struct step_1_continuation_args.
4712
4713 (struct finish_command_continuation_args): New.
4714 (finish_command_continuation): Take a void* instead of a
4715 continuations_arg. Adjust to use struct
4716 finish_command_continuation_args.
4717 (finish_command): Adjust to use struct
4718 finish_command_continuation_args.
4719 (struct attach_command_continuation_args): New.
4720 (attach_command_continuation): Take a void* instead of a
4721 continuations_arg. Adjust to use struct
4722 attach_command_continuation_args.
4723 (attach_command): Adjust to use struct
4724 attach_command_continuation_args.
4725
4726 * defs.h (struct continuation_arg): Delete.
4727 (struct continuation): Replace the struct continuation_arg*
4728 parameter of continuation_hook by a void*. Replace "arg_list"
4729 member by a new "args" member with void* type.
4730 (add_continuation, add_intermediate_continuation): Replace struct
4731 continuation_arg type usages by void* usages.
4732
4733 * utils.c (add_continuation, do_all_continuations)
4734 (add_intermediate_continuation)
4735 (do_all_intermediate_continuations): Replace struct
4736 continuation_arg type usages by void* usages. Pass "args" instead
4737 of "arg_list".
4738
4739 2008-07-12 Pedro Alves <pedro@codesourcery.com>
4740
4741 * infrun.c (struct thread_stepping_state): Delete sal member.
4742 (init_thread_stepping_state): Add local sal. Use it instead of
4743 tss->sal.
4744 (handle_inferior_event): New local stop_pc_sal. Use it instead of
4745 tss->sal.
4746 (step_into_function): Add local stop_func_sal. Use it instead of
4747 tss->sal.
4748
4749 2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
4750
4751 Implement -exec-continue/-exec-interrupt --all.
4752 * infcmd.c (continue_1): New, extracted from
4753 (continue_command): ...here.
4754 (interrupt_target_1): New, extracted from
4755 (interrupt_target_command): ...here.
4756 * inferior.h (continue_1, interrupt_target_1): New.
4757 * mi/mi-main.c (mi_cmd_exec_continue)
4758 (mi_cmd_exec_interrupt): Handle --all.
4759
4760 2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
4761
4762 Implement --thread and --frame.
4763 * gdbthread.h (find_thread_id): Declare.
4764 * thread.c (find_thread_id): Make non-static.
4765 * mi/mi-main.c (mi_cmd_execute): Switch to the right
4766 thread and frame, if necessary.
4767 * mi/mi-parse.c (mi_parse): Handle --thread and --frame.
4768 * mi/mi-parse.h (strcut mi_parse): New fields thread and frame.
4769
4770 2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
4771
4772 * infrun.c (resume): Discard cleanups on early exit path.
4773
4774 2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
4775
4776 * infrun.c (normal_stop): For MI, report which threads
4777 were stopped.
4778
4779 2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
4780
4781 Report thread state in -thread-info output.
4782 * thread.c (print_thread_info): Add new field "state".
4783
4784 2008-07-11 Pedro Alves <pedro@codesourcery.com>
4785
4786 * infrun.c (handle_inferior_event): Also ignore a
4787 TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
4788
4789 2008-07-11 Tom Tromey <tromey@redhat.com>
4790
4791 * completer.c (complete_line_internal): New function, from
4792 complete_line. Add 'for_help' parameter.
4793 (complete_line): Use it.
4794 (command_completer): Move later. Rewrite.
4795
4796 2008-07-11 Pedro Alves <pedro@codesourcery.com>
4797
4798 * thread.c (thread_apply_command): Move making the cleanup out of
4799 the loop.
4800
4801 2008-07-11 Pedro Alves <pedro@codesourcery.com>
4802
4803 Exited threads.
4804
4805 * thread.c (enum thread_state): New.
4806 (thread_state main_thread_running): Delete, in favor of...
4807 (thread_state main_thread_state): ... this. Update throughout.
4808 (clear_thread_inferior_resources): New, split from free_thread.
4809 (free_thread): Call clear_thread_inferior_resources.
4810 (init_thread_list): Set main thread to stopped state.
4811 (add_thread_silent): Take care of PTID reuses.
4812 (delete_thread): If deleting inferior_ptid or a thread with
4813 refcount > 0, mark it as exited, but still keep it in the list.
4814 Only notify of thread exits, if we haven't done so yet.
4815 (iterate_over_threads): Make it safe to delete threads while
4816 iterating over them.
4817 (do_captured_list_thread_ids): Don't account for exited threads.
4818 (thread_alive): Check for the THREAD_EXITED state, and don't set
4819 ptid to -1 on exited threads.
4820 (set_running): Update to account for extra possible states.
4821 (is_thread_state): New.
4822 (is_stopped, is_exited): New.
4823 (is_running): Implement in terms of is_thread_state.
4824 (any_running): Update.
4825 (print_thread_info): Update. Account for exited threads. Don't
4826 warn about missed frame restoring here, its done in the cleanup.
4827 (switch_to_thread): Don't read from a thread that has gone.
4828 (restore_current_thread): In non-stop mode, do a full context
4829 switch.
4830 (restore_selected_frame): Add a frame_level argument. Rewrite.
4831 (struct current_thread_cleanup): Add selected_frame_level and
4832 was_stopped members.
4833 (do_restore_current_thread_cleanup): Check if thread was stopped
4834 and still is, and if the target has registers, stack and memory
4835 before restoring the selected frame. Don't delete the cleanup
4836 argument here.
4837 (restore_current_thread_cleanup_dtor): New.
4838 (make_cleanup_restore_current_thread): Remove all arguments.
4839 Rewrite.
4840 (thread_apply_all_command): Update. Prune threads.
4841 (thread_apply_command): Update.
4842 (thread_command): Account for currently selected exited thread.
4843 (do_captured_thread_select): Check for a running thread. Prune
4844 threads.
4845 (_initialize_thread): Make "info threads", "thread", "thread
4846 apply", and "thread apply all" appliable without a selected thread.
4847 * gdbthread.h (struct thread_info): Replace running_ by state_.
4848 Add refcount.
4849 (is_exited, is_stopped): Declare.
4850 (make_cleanup_restore_current_thread): Remove all arguments.
4851 * infrun.c: Include "event-top.h".
4852 (fetch_inferior_event): In non-stop mode, restore selected thread
4853 and frame after handling the event and running breakpoint
4854 commands. Display GDB prompt if needed.
4855 (normal_stop): In non-stop mode, don't print thread switching
4856 notice.
4857 * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
4858 (get_cmd_no_selected_thread_ok): New.
4859 * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): New.
4860 (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
4861 Declare.
4862 * cli/cli-cmds.c: Set "pwd", "help", "info", "show" as
4863 no-selected-thread ok.
4864 * top.c (execute_command): Check for non no-selected-thread-ok
4865 commands.
4866 * linux-nat.c (struct saved_ptids, threads_to_delete)
4867 (record_dead_thread, prune_lwps): Delete.
4868 (exit_lwp): Unconditionally delete thread.
4869 (linux_nat_resume): Remove prune_lwps call.
4870 * infcmd.c (proceed_thread_callback): Check if !is_stopped instead
4871 of is_running. Adjust to make_cleanup_restore_current_thread
4872 interface change.
4873 * mi/mi-main.c (mi_cmd_execute): Only allow a few commands if the
4874 selected thread has exited.
4875 * inf-loop.c (inferior_event_handler): Don't display the prompt
4876 here.
4877 * varobj.c (c_value_of_root): Update.
4878 * defs.h (make_cleanup_dtor): Declare.
4879 * utils.c (make_cleanup_dtor): New.
4880
4881 * Makefile.in (infrun.o): Depend on $(event_top_h).
4882
4883 2008-07-11 Pedro Alves <pedro@codesourcery.com>
4884
4885 Add "continue -a" and "interrupt -a" options for non-stop mode.
4886
4887 * infcmd.c (proceed_thread_callback, do_context_switch_to): New.
4888 (continue_command): Add "-a" option.
4889 (interrupt_target_command): Add "-a" option.
4890 (_initialize_infcmd): Add extend help of continue and interrupt
4891 command to mention the new "-a" option. Mark "continue" async ok.
4892
4893 2008-07-10 Doug Evans <dje@google.com>
4894
4895 Add "set print symbol-loading on|off".
4896 * NEWS: Document new option.
4897 * symfile.h (print_symbol_loading): Declare.
4898 * symfile.c (print_symbol_loading): New global.
4899 (symbol_file_add_with_addrs_or_offsets): Only print "Reading symbols
4900 from ..." if print_symbol_loading.
4901 (_initialize_symfile): Add set/show print symbol-loading.
4902 * solib.c (solib_read_symbols): Only print "Loaded symbols for ..."
4903 if print_symbol_loading.
4904
4905 2008-07-10 Pedro Alves <pedro@codesourcery.com>
4906
4907 Non-stop linux native.
4908
4909 * linux-nat.c (linux_test_for_tracefork): Block events while we're
4910 here.
4911 (get_pending_status): Implement non-stop mode.
4912 (linux_nat_detach): Stop threads before detaching.
4913 (linux_nat_resume): In non-stop mode, always resume only a single
4914 PTID.
4915 (linux_handle_extended_wait): On a clone event, in non-stop mode,
4916 add new lwp to GDB's thread table, and mark as running, executing
4917 and stopped appropriately.
4918 (linux_nat_filter_event): Don't assume there are other running
4919 threads when a thread exits.
4920 (linux_nat_wait): Mark the main thread as running and executing.
4921 In non-stop mode, don't stop all lwps.
4922 (linux_nat_kill): Stop lwps before killing them.
4923 (linux_nat_thread_alive): Use signal 0 to detect if a thread is
4924 alive.
4925 (send_sigint_callback): New.
4926 (linux_nat_stop): New.
4927 (linux_nat_add_target): Set to_stop to linux_nat_stop.
4928
4929 * linux-nat.h (thread_db_attach_lwp): Declare.
4930
4931 * linux-thread-db.c (thread_get_info_callback): Check for new
4932 threads if we have none.
4933 (thread_from_lwp, enable_thread_event): Set proc_handle.pid to the
4934 stopped lwp. Check for new threads if we have none.
4935 (thread_db_attach_lwp): New.
4936 (thread_db_init): Set proc_handle.pid to inferior_ptid.
4937 (check_event): Set proc_handle.pid to the stopped lwp.
4938 (thread_db_find_new_threads): Set proc_handle.pid to any stopped
4939 lwp available, bail out if there is none.
4940
4941 * linux-fork.c (linux_fork_killall): Use SIGKILL instead of
4942 PTRACE_KILL.
4943
4944 2008-07-10 Kevin Buettner <kevinb@redhat.com>
4945
4946 * rs6000-tdep.c (ppc_displaced_step_fixup): Change type of
4947 `current_pc' from CORE_ADDR to ULONGEST.
4948
4949 * remote-sim.c (gdbsim_cntrl_c): Pass remote_sim_ptid to
4950 gdbsim_stop().
4951
4952 2008-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4953
4954 * NEWS (New commands): Mention "set disable-randomization".
4955 * configure.ac: Add check for HAVE_PERSONALITY and
4956 HAVE_DECL_ADDR_NO_RANDOMIZE.
4957 * configure, config.in: Regenerate.
4958 * linux-nat.c [HAVE_PERSONALITY]: New include <sys/personality.h>.
4959 [HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
4960 ADDR_NO_RANDOMIZE.
4961 (disable_randomization, show_disable_randomization)
4962 (set_disable_randomization): New.
4963 (linux_nat_create_inferior) [HAVE_PERSONALITY]: New variables
4964 PERSONALITY_ORIG and PERSONALITY_SET. Disable randomization upon the
4965 variable DISABLE_RANDOMIZATION.
4966 (_initialize_linux_nat): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
4967 DISABLE_RANDOMIZATION.
4968
4969 2008-07-09 Pedro Alves <pedro@codesourcery.com>
4970
4971 Adjust all targets to new target_stop interface.
4972
4973 * gnu-nat.c (gnu_stop): Add ptid argument.
4974 * go32-nat.c (go32_stop): Add ptid argument.
4975 (go32_create_inferior): Pass inferior_ptid to go32_stop.
4976 * hpux-thread.c (hpux_thread_stop): Add ptid argument.
4977 * monitor.c (monitor_stop): Add ptid argument.
4978 (monitor_open): Pass inferior_ptid to monitor_stop.
4979 (monitor_interrupt): Pass inferior_ptid to target_stop.
4980 (monitor_stop): Add ptid argument.
4981 * nto-procfs.c (nto_interrupt): Pass inferior_ptid to target_stop.
4982 (procfs_create_inferior): Add ptid argument.
4983 * procfs.c (procfs_stop): Add ptid argument.
4984 * remote-m32r-sdi.c (m32r_stop): Add ptid argument.
4985 * remote-sim.c (gdbsim_stop): Add ptid argument.
4986 * sol-thread.c (sol_thread_stop): Add ptid argument.
4987 * win32-nat.c (win32_stop): Add ptid argument.
4988
4989 2008-07-09 Pedro Alves <pedro@codesourcery.com>
4990
4991 Non-stop inferior control.
4992
4993 * infrun.c (resume): In non-stop mode, always resume just one
4994 thread.
4995 (proceed): Don't call prepare_to_proceed in non-stop mode.
4996 (fetch_inferior_event): In non-stop mode, switch context before
4997 handling the event.
4998 (error_is_running, ensure_not_running): New.
4999 (handle_inferior_event): In non-stop mode: Mark only the event
5000 thread as stopped. Require that the target module manages adding
5001 threads to the thread list. Assert that there isn't a
5002 deferred_step_ptid set. Don't switch to infwait_thread_hop_state.
5003 (normal_stop): Only mark not-running if inferior hasn't exited.
5004 In non-stop mode, only mark the event thread.
5005
5006 * thread.c:Include "cli/cli-decode.h".
5007 (print_thread_info): Don't read from a running thread.
5008 Output "(running)" if thread is running.
5009 (switch_to_thread): Don't read stop_pc if thread is executing.
5010 (do_restore_current_thread_cleanup): Don't write to a running
5011 thread.
5012 (thread_apply_all_command): Don't read from a running thread. In
5013 non-stop mode, do a full context-switch instead of just switching
5014 threads.
5015 (thread_apply_command): In non-stop mode, do a full context-switch
5016 instead of just switching threads.
5017 (do_captured_thread_select): Likewise. Inform user if selected
5018 thread is running.
5019 (_initialize_thread): Mark "info threads" and "thread" and
5020 async_ok.
5021
5022 * inf-loop.c (inferior_event_handler): In non-stop mode, don't
5023 unregister the target from the event loop.
5024
5025 * infcmd.c (continue_command, step_1, jump_command)
5026 (signal_command): Ensure the selected thread isn't running.
5027 (interrupt_target_command): In non-stop mode, interrupt only the
5028 selected thread.
5029
5030 * inferior.h (error_is_running, ensure_not_running): Declare.
5031
5032 * target.h (struct target_ops): Add ptid argument to the to_stop
5033 member.
5034 (target_stop): Add ptid_t argument.
5035
5036 * target.c (update_current_target): Add ptid argument to to_stop's
5037 type.
5038 (debug_to_stop): Add ptid_t argument.
5039 (debug_to_rcmd): Set to_stop_ptid.
5040
5041 * remote.c (remote_stop): Add ptid_t argument.
5042 (async_remote_interrupt): Add inferior_ptid to target_stop.
5043 * inf-ptrace.c (inf_ptrace_stop): Add ptid argument.
5044
5045 * Makefile.in (thread.o): Depend on $(cli_decode_h).
5046
5047 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5048
5049 Don't rely on ecs->wait_for_more.
5050
5051 * infrun.c (proceed): Clear the stepping state, set
5052 previous_inferior_ptid and clear infwait state.
5053 (wait_for_inferior): Don't clear the stepping state, set
5054 previous_inferior_ptid, or clear the infwait state here.
5055 (fetch_inferior_event): Don't clear the stepping state, set
5056 previous_inferior_ptid, or clear the infwait state here. Don't
5057 condition on wait_for_more.
5058
5059 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5060
5061 Refactor infrun a bit.
5062
5063 * infrun.c (currently_stepping): Take a struct
5064 thread_stepping_state instead of an execution_control_state.
5065 (struct thread_stepping_state): New, split from
5066 execution_control_state.
5067 (gtss, tss): New globals.
5068 (proceed): Clear the stepping state, set previous_inferior_ptid
5069 and clear infwait state.
5070 (init_wait_for_inferior): Clear the stepping state,
5071 previous_inferior_ptid and infwait state.
5072 (waiton_ptid, infwait_state): New, split from
5073 execution_control_state.
5074 (struct execution_control_state): Members that persist through
5075 events moved out to either struct thred_stepping_state or made
5076 global. Deleted unneeded wp, saved_inferior_ptid, tmpstatus.
5077 (wait_for_inferior, fetch_inferior_event): Use local
5078 execution_control_state. Update to execution_control_state split.
5079 (init_execution_control_state): Adjust.
5080 (init_thread_stepping_state): New, extracted from
5081 init_execution_control_state.
5082 (context_switch): Take a ptid instead of an
5083 execution_control_state.
5084 (context_switch_to): Adjust.
5085 (adjust_pc_after_break): Adjust.
5086 (init_infwait_state): New.
5087 (handle_inferior_event): Adjust.
5088
5089 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5090 Vladimir Prus <vladimir@codesourcery.com>
5091
5092 Per-thread commands.
5093
5094 * gdbthread.h: Remove unneeded forward declarations.
5095 Include "inferior.h".
5096 (struct thread_info): Add continuations,
5097 intermediate_continuations, proceed_to_finish, step_over_calls,
5098 stop_step, step_multi and stop_signal members.
5099 (save_infrun_state): Add continuations,
5100 intermediate_continuations, proceed_to_finish, step_over_calls,
5101 stop_step, step_multi, stop_signal and stop_bpstat parameters.
5102 (load_infrun_state): Add continuations,
5103 intermediate_continuations, proceed_to_finish, step_over_calls,
5104 stop_step, step_multi, stop_signal and stop_bpstat parameters.
5105
5106 * thread.c (load_infrun_state): In non-stop mode, load
5107 continuations, intermediate_continuations, proceed_to_finish,
5108 step_over_calls, stop_step, step_multi and stop_signal.
5109 (save_infrun_state): Store continuations,
5110 intermediate_continuations, proceed_to_finish, step_over_calls,
5111 stop_step, step_multi, stop_signal and stop_bpstat.
5112 (save_infrun_state): Store continuations,
5113 intermediate_continuations, proceed_to_finish, step_over_calls,
5114 stop_step, step_multi, stop_signal and stop_bpstat.
5115 (free_thread): Clear The thread's stop_bpstat.
5116
5117 * inferior.h (context_switch_to): Declare.
5118
5119 * infrun.c (ecss): New global.
5120 (context_switch): Context switch continuations,
5121 intermediate_continuations, proceed_to_finish, step_over_calls,
5122 stop_step, step_multi, stop_signal and stop_bpstat.
5123 (wait_for_inferior): Use global ecss.
5124 (async_ecss, async_ecs): Delete.
5125 (fetch_inferior_event): Use global ecss.
5126 (context_switch_to): New.
5127
5128 * top.c (execute_command): In non-stop, only check if the current
5129 thread is running, in all-stop, check if there's any thread
5130 running.
5131
5132 * breakpoint.c (bpstat_remove_breakpoint): New.
5133 (bpstat_remove_breakpoint_callback): New.
5134 (delete_breakpoint): Clear the stop_bpstats of all threads.
5135
5136 * mi/mi-main.c (mi_cmd_execute): In non-stop, only check if the
5137 current thread is running, in all-stop, check if there's any
5138 thread running.
5139
5140 * Makefile.in (gdbthread_h): Depend on $(inferior_h).
5141
5142 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5143
5144 Add non_stop global.
5145
5146 * inferior.h (non_stop): Declare.
5147 * infrun.c (non_stop, non_stop_1): New.
5148 (set_non_stop, show_non_stop): New.
5149 (_initialize_infrun): Add "set/show non-stop" command.
5150
5151 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5152
5153 Adjust fork/vfork/exec to pass ptids around.
5154
5155 * target.h (struct target_waitstatus): Store related_pid as a ptid.
5156 (inferior_has_forked, inferior_has_vforked, inferior_has_execd):
5157 Take a ptid_t.
5158 * breakpoint.h (struct breakpoint): Change forked_inferior_pid
5159 type to ptid.
5160 * breakpoint.c (print_it_typical, bpstat_check_location)
5161 (print_one_breakpoint_location, set_raw_breakpoint_without_location)
5162 (create_fork_vfork_event_catchpoint): Adjust.
5163 * infrun.c (fork_event): Change parent_pid and child_pid types to
5164 ptid.
5165 (follow_exec, inferior_has_forked, inferior_has_vforked)
5166 (inferior_has_execd): Take a ptid_t and don't trim it.
5167 * linux-thread-db.c (thread_db_wait): Don't trim the returned ptid.
5168 * linux-nat.c (linux_child_follow_fork): Adjust.
5169 * inf-ptrace.c (inf_ptrace_wait): Adjust.
5170 * inf-ttrace.c (inf_ttrace_wait): Adjust.
5171 * win32-nat.c (get_win32_debug_event): Don't set related_pid.
5172
5173 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5174
5175 Add "executing" property to threads.
5176
5177 * inferior.h (target_executing): Delete.
5178 * gdbthread.h (struct thread_info): Add executing_ field.
5179 (set_executing, is_executing): New.
5180 * thread.c (main_thread_executing): New.
5181 (init_thread_list): Clear it and also main_thread_running.
5182 (is_running): Return false if target has no execution.
5183 (any_running, is_executing, set_executing): New.
5184
5185 * top.c: Include "gdbthread.h".
5186 (target_executing): Delete.
5187 (execute_command): Replace target_executing check by any_running.
5188 * event-top.c: Include "gdbthread.h".
5189 (display_gdb_prompt, command_handler): Replace target_executing by
5190 is_running.
5191 * inf-loop.c: Include "gdbthread.h". Don't mark as not executing
5192 here. Replace target_executing by is_running.
5193 * infrun.c (handle_inferior_event): Mark all threads as
5194 not-executing.
5195 * linux-nat.c (linux_nat_resume): Don't mark thread as executing
5196 here.
5197 * stack.c (get_selected_block): Return null if inferior is
5198 executing.
5199 * target.c (target_resume): Mark resumed ptid as executing.
5200 * breakpoint.c (until_break_command): Replace target_executing
5201 check by is_executing.
5202 * remote.c (remote_async_resume): Don't mark inferior as executing
5203 here.
5204 * mi/mi-interp.c (mi_cmd_interpreter_exec): Replace target_executing
5205 by any_running.
5206
5207 * mi/mi-main.c (mi_cmd_exec_interrupt, mi_cmd_execute)
5208 (mi_execute_async_cli_command): Replace target_executing by
5209 is_running.
5210
5211 * frame.c (get_current_frame): Error out if the current thread is
5212 executing.
5213 (has_stack_frames): New.
5214 (get_selected_frame, deprecated_safe_get_selected_frame): Check
5215 has_stack_frames.
5216
5217 * Makefile.in (event-top.o, frame.o, inf-loop.o, top.o): Depend on
5218 $(gdbthread_h).
5219
5220 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5221
5222 * symfile.c (load_command): Reopen the exec file and reread
5223 symbols before anything else.
5224
5225 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5226
5227 * remote-sim.c: Include gdbthread.h.
5228 (remote_sim_ptid): New global.
5229 (gdbsim_create_inferior): Silently add the main task to GDB's
5230 thread list.
5231 (gdbsim_close, gdbsim_mourn_inferior): Silently delete the main
5232 task from GDB's thread list.
5233 (gdbsim_resume): Adjust to use remote_sim_ptid.
5234 (gdbsim_thread_alive, gdbsim_pid_to_str): New.
5235 (init_gdbsim_ops): Register gdbsim_thread_alive and
5236 gdbsim_pid_to_str.
5237 (_initialize_remote_sim): Initialize remote_sim_ptid.
5238 * Makefile.in (remote-sim.o): Depend on $(gdbthread_h).
5239
5240 2008-07-09 Pedro Alves <pedro@codesourcery.com>
5241
5242 * monitor (monitor_ptid): New global.
5243 (monitor_open): Silently add the main task to GDB's thread list.
5244 (monitor_close, monitor_mourn_inferior): Silently delete the main
5245 task from GDB's thread list.
5246 (monitor_thread_alive, monitor_pid_to_str): New.
5247 (init_base_monitor_ops): Register monitor_thread_alive and
5248 monitor_pid_to_str.
5249 (_initialize_remote_monitors): Initialize monitor_ptid.
5250
5251 * gdbthread.h (delete_thread_silent): Declare.
5252 * thread.c (delete_thread): Rename to ...
5253 (delete_thread_1): ... this. Add "silent" parameter. If silent,
5254 don't do exit notifications.
5255 (delete_thread, delete_thread_silent): New, as wrappers to
5256 delete_thread_1.
5257
5258 2008-07-08 Pedro Alves <pedro@codesourcery.com>
5259
5260 * breakpoint.c (update_global_location_list): Add boolean
5261 "should_insert" argument. Only insert locations if caller told it
5262 too.
5263 (update_global_location_list_nothrow): Add boolean "should_insert"
5264 argument. Pass it to update_global_location_list.
5265 (insert_breakpoints, create_longjmp_breakpoint)
5266 (create_overlay_event_breakpoint, enable_overlay_breakpoints)
5267 (create_thread_event_breakpoint, create_solib_event_breakpoint)
5268 (create_fork_vfork_event_catchpoint, create_exec_event_catchpoint)
5269 (enable_watchpoints_after_interactive_call_stop)
5270 (set_momentary_breakpoint, create_breakpoints)
5271 (break_command_really, watch_command_1)
5272 (create_ada_exception_breakpoint, update_breakpoint_locations)
5273 (do_enable_breakpoint, enable_command): Pass true to
5274 update_global_location_list.
5275 (bpstat_stop_status, disable_overlay_breakpoints)
5276 (disable_watchpoints_before_interactive_call_start)
5277 (delete_breakpoint, disable_breakpoint, disable_command): Pass
5278 false to update_global_location_list.
5279 (update_breakpoints_after_exec): Don't temporarily disable
5280 always-inserted mode.
5281
5282 2008-07-08 Pedro Alves <pedro@codesourcery.com>
5283
5284 * breakpoint.c (mark_breakpoints_out): Make public.
5285 (update_breakpoints_after_exec): Don't call mark_breakpoints_out
5286 here. Update comment.
5287 * breakpoint.h (mark_breakpoints_out): Declare.
5288
5289 * linux-nat.c (linux_handle_extended_wait): On
5290 TARGET_WAITKIND_EXECD, call mark_breakpoints_out.
5291 * inf-ttrace.c (inf_ttrace_wait): Likewise.
5292
5293 2008-07-08 Pedro Alves <pedro@codesourcery.com>
5294
5295 * infrun.c (follow_exec): Reset shared libraries before adding the
5296 main exec file.
5297
5298 2008-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5299
5300 * breakpoint.c (bpstat_copy): Call RELEASE_VALUE on the new OLD_VAL.
5301
5302 2008-07-07 Pedro Alves <pedro@codesourcery.com>
5303
5304 * i386-dicos-tdep.c: Include "inferior.h".
5305 (i386_dicos_frame_align): New.
5306 (i386_dicos_init_abi): Register i386_dicos_frame_align. Set call
5307 dummy location ON_STACK.
5308 * Makefile.in (i386-dicos-tdep.o): Depend on $(inferior_h).
5309
5310 2008-07-07 Joel Brobecker <brobecker@adacore.com>
5311
5312 * gstdint.h: New file.
5313
5314 2008-07-05 Vladimir Prus <vladimir@codesourcery.com>
5315
5316 * mi/mi-interp.c (mi_on_resume): Don't try to report
5317 resumed thread it the thread list is empty.
5318
5319 2008-07-05 Pierre Muller <muller@ics.u-strasbg.fr>
5320
5321 * cli/cli-decode.c (add_setshow_optional_filename_cmd): Set
5322 completer for set to filename_completer.
5323
5324 NEWS: Mention it.
5325
5326 2008-07-04 Vladimir Prus <vladimir@codesourcery.com>
5327
5328 Implement -target-attach.
5329 * mi/mi-cmds.c (mi_cmds): Forward -target-attach to CLI attach.
5330
5331 2008-06-21 Hui Zhu <teawater@gmail.com>
5332
5333 * target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak.
5334
5335 2008-07-03 Pedro Alves <pedro@codesourcery.com>
5336
5337 * config/i386/nm-cygwin.h (ATTACH_NO_WAIT): Delete.
5338 * config/i386/nm-i386gnu.h (ATTACH_NO_WAIT): Delete.
5339
5340 * target.h (struct target_ops): Add to_attach_no_wait member.
5341 (target_attach_no_wait): New.
5342 * target.c (update_current_target): Inherit to_attach_no_wait.
5343
5344 * infcmd.c: Replace ATTACH_NO_WAIT compile time check by
5345 target_attach_no_wait runtime check.
5346
5347 * gnu-nat.c (init_gnu_ops): Set to_attach_no_wait in gnu_ops.
5348 * win32-nat.c (init_win32_ops): Set to_attach_no_wait in
5349 win32_ops.
5350
5351 2008-07-03 Pedro Alves <pedro@codesourcery.com>
5352
5353 * i386-tdep.c (i386_displaced_step_fixup): Condition log printing
5354 on debug_displaced being set.
5355
5356 2008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
5357
5358 * frame.c (get_prev_frame_1): Call frame_unwind_find_by_frame
5359 directly instead of get_frame_id.
5360
5361 2008-06-30 Luis Machado <luisgpm@br.ibm.com>
5362
5363 * rs6000-tdep.c (ppc_displaced_step_fixup): New function.
5364 (deal_with_atomic_sequence): Update BC masks.
5365 (rs6000_gdbarch_init): Init displaced stepping infra-structure.
5366 Define BRANCH_MASK, B_INSN, BC_INSN, BXL_INSN, BP_MASK and BP_INSN.
5367
5368 2008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
5369
5370 * cris-tdep.c (crisv32_single_step_through_delay): Get this frame's
5371 register, not the previous frame's.
5372
5373 2008-06-30 Luis Machado <luisgpm@br.ibm.com>
5374
5375 * source.c (select_source_symtab): Make sure we skip namespace
5376 symtabs when showing cpp source code.
5377
5378 2008-06-30 Hans-Peter Nilsson <hp@axis.com>
5379
5380 * MAINTAINERS (Authorized committers): Fix my email address.
5381
5382 2008-06-28 Vladimir Prus <vladimir@codesourcery.com>
5383
5384 * mi/mi-cmds.c (mi_cmds): Route -exec-run, -exec-until,
5385 -target-download and -target-select via CLI, so that
5386 the quoting rules are the same as they were (unfortunately)
5387 in all prior gdb releases.
5388 * mi/mi-cmds.h (mi_cmd_exec_run, mi_cmd_exec_until)
5389 (mi_cmd_target_download, mi_cmd_target_select): Remove.
5390 * mi/mi-main.c (mi_cmd_exec_run, mi_cmd_exec_until)
5391 (mi_cmd_target_download, mi_cmd_target_select): Remove.
5392 (mi_cmd_execute): Set current_token even for commands
5393 routed via CLI.
5394
5395 2008-06-28 Ulrich Weigand <uweigand@de.ibm.com>
5396
5397 * alphafbsd-tdep.c: Update for unwinder changes.
5398 * alpha-linux-tdep.c: Likewise.
5399 * alphanbsd-tdep.c: Likewise.
5400 * alphaobsd-tdep.c: Likewise.
5401 * avr-tdep.c: Likewise.
5402 * cris-tdep.c: Likewise.
5403 * frv-linux-tdep.c: Likewise.
5404 * frv-tdep.c: Likewise.
5405 * h8300-tdep.c: Likewise.
5406 * hppa-linux-tdep.c: Likewise.
5407 * iq2000-tdep.c: Likewise.
5408 * m32c-tdep.c: Likewise.
5409 * m32r-linux-tdep.c: Likewise.
5410 * m32r-tdep.c: Likewise.
5411 * m68hc11-tdep.c: Likewise.
5412 * mep-tdep.c: Likewise.
5413 * mn10300-tdep.c: Likewise.
5414 * mt-tdep.c: Likewise.
5415 * score-tdep.c: Likewise.
5416 * sh64-tdep.c: Likewise.
5417 * sh-tdep.c: Likewise.
5418 * sparc64fbsd-tdep.c: Likewise.
5419 * sparc64nbsd-tdep.c: Likewise.
5420 * sparc64obsd-tdep.c: Likewise.
5421 * v850-tdep.c: Likewise.
5422 * vaxobsd-tdep.c: Likewise.
5423 * vax-tdep.c: Likewise.
5424 * xstormy16-tdep.c: Likewise.
5425
5426 2008-06-28 Vladimir Prus <vladimir@codesourcery.com>
5427
5428 * mi/mi-main.c (enum captured_mi_execute_command_actions)
5429 (captured_mi_execute_command_args): Remove.
5430 (captured_mi_execute_command): Cast the closure to mi_parse
5431 pointer, not to captured_mi_execute_command_args, and don't
5432 set the action field thereof.
5433 (mi_execute_command): Pass struct mi_parse, not
5434 captured_mi_execute_command_args to captured_mi_execute_command.
5435 (mi_execute_command): Remove (dead) code for suppressing
5436 printing prompt.
5437
5438 2008-06-28 Pedro Alves <pedro@codesourcery.com>
5439
5440 * linux-nat.c (enum sigchld_state): New.
5441 (linux_nat_async_events_state): Renamed from
5442 linux_nat_async_events_enabled.
5443 (linux_nat_event_pipe_push, my_waitpid): Adjust.
5444 (sigchld_default_action): New.
5445 (lin_lwp_attach_lwp): Adjust. Call linux_nat_async_events
5446 unconditionally.
5447 (linux_nat_create_inferior): Set events state to sigchld_default
5448 state.
5449 (linux_nat_resume): Adjust.
5450 (linux_nat_wait): Call linux_nat_async_events unconditionally.
5451 (sigchld_handler): Adjust.
5452 (linux_nat_async_mask): Don't set SIGCHLD actions here.
5453 (get_pending_events): Adjust.
5454 (linux_nat_async_events): Rewrite to handle enum sigchld_state
5455 instead of a boolean.
5456 (linux_nat_async): Adjust.
5457 (_initialize_linux_nat): Capture default SIGCHLD action into
5458 sigchld_default_action.
5459
5460 2008-06-28 Vladimir Prus <vladimir@codesourcery.com>
5461
5462 * breakpoint.c (moribund_locations): New.
5463 (bpstat_stop_status): Process moribund locations.
5464 (update_global_location_list): Add removed
5465 locations to moribund_locations.
5466 (breakpoint_retire_moribund): New.
5467 * breakpoint.h (struct bp_location): New field
5468 events_till_retirement.
5469 (breakpoint_retire_moribund): Declare.
5470 * thread.c (thread_count): New.
5471 * infrun.c (handle_inferior_event): Call
5472 breakpoint_retire_moribund.
5473 * gdbthread.h (thread_count): Declare.
5474
5475 2008-06-27 Joseph Myers <joseph@codesourcery.com>
5476
5477 * dfp.c (decimal_convert): Call match_endianness before and after
5478 conversion.
5479
5480 2008-06-27 Jonathan Larmour <jifl@eCosCentric.com>
5481
5482 * remote.c (remote_insert_breakpoint): Ensure that if Z0
5483 unsupported and we fall back to memory_insert_breakpoint, we
5484 use the unmodified requested address.
5485
5486 2008-06-27 Joel Brobecker <brobecker@adacore.com>
5487
5488 * dwarf2read.c (read_attribute_value): Issue a complaint when
5489 adjusting size attribute values of 0xffffffff as zero.
5490
5491 2008-06-27 Joseph Myers <joseph@codesourcery.com>
5492
5493 * i386-tdep.c (i386_16_byte_align_p): New.
5494 (i386_push_dummy_call): Determine stack space required for
5495 arguments going forwards allowing for 16-byte alignment, then push
5496 arguments going forwards.
5497
5498 2008-06-27 Pedro Alves <pedro@codesourcery.com>
5499
5500 * infrun.c (start_remote): Don't clear thread list here.
5501 * monitor.c (monitor_open): Include "gdbthread.h". Clear thread
5502 list here.
5503 * remote.c (record_currthread): Upgrade the main thread and its
5504 entry in the thread list if this is the first time we hear about
5505 threads.
5506 (remote_thread_alive): Consider magic_null_ptid or a ptid without
5507 a tid member always alive.
5508 (remote_find_new_threads): Don't update the main thread here.
5509 (remote_start_remote): Clear thread list here. Always add the
5510 main thread.
5511 (extended_remote_attach_1): Add the main thread here.
5512 (extended_remote_mourn_1): Re-add the main thread here.
5513 (extended_remote_create_inferior_1): Add a main thread.
5514
5515 * Makefile.in (monitor.o): Depend on $(gdbthread_h).
5516
5517 2008-06-27 Pedro Alves <pedro@codesourcery.com>
5518
5519 Use ptid_t.tid to store thread ids instead of ptid_t.pid.
5520
5521 * remote.c (magic_null_ptid, not_sent_ptid, any_thread_ptid): New
5522 globals.
5523 (general_thread, continue_thread): Change type to ptid_t.
5524 (record_currthread): Take a ptid_t parameter instead of an
5525 integer.
5526 (MAGIC_NULL_PID): Delete.
5527 (set_thread): Take a ptid_t parameter and adjust.
5528 (set_general_thread, set_continue_thread): New.
5529 (remote_thread_alive, remote_newthread_step)
5530 (remote_current_thread, remote_find_new_threads)
5531 (remote_threads_info, remote_start_remote, remote_vcont_resume)
5532 (remote_resume_1, remote_wait, extended_remote_create_inferior_1)
5533 (threadalive_test, remote_pid_to_str)
5534 (remote_get_thread_local_address): Adjust.
5535 (_initialize_remote): Initialize magic_null_ptid, not_sent_ptid
5536 and any_thread_ptid.
5537
5538 2008-06-26 Jan Kratochvil <jan.kratochvil@redhat.com>
5539
5540 * configure.ac (--enable-tui): AC_MSG_ERROR for explicit --enable-tui.
5541 * configure: Regenerated.
5542
5543 2008-06-26 Joel Brobecker <brobecker@adacore.com>
5544
5545 * dwarf2read.c (read_attribute_value): Treat size attribute
5546 values of 0xffffffff as if the attribute value was zero.
5547
5548 2008-06-26 Vladimir Prus <vladimir@codesourcery.com>
5549
5550 * linux-nat.c: Add description of overall logic.
5551
5552 2008-06-26 Daniel Jacobowitz <dan@codesourcery.com>
5553
5554 * Makefile.in (GNULIB_H): Use GNULIB_STDINT_H.
5555 (gdb_stdint_h, gdb_stdint.h, stamp-int): Delete. Remove
5556 all dependencies on $(gdb_stdint_h).
5557 (distclean): Do not delete gdb_stdint.h.
5558 * acinclude.m4: Do not use stdint.m4.
5559 * configure.ac: Set GNULIB_STDINT_H. Remove tests for stdint.h,
5560 uintptr_t, and gdb_stdint.h.
5561 * defs.h: Include <stdint.h>.
5562 * gdb_thread_db.h: Assume stdint.h is already included.
5563 * breakpoint.c, findcmd.c, hppa-tdep.c, inf-ptrace.c, proc-service.c,
5564 rs6000-nat.c, spu-linux-nat.c, target.c, win32-nat.c: Do not
5565 include gdb_stdint.h.
5566 * configure, config.in: Regenerate.
5567
5568 2008-06-26 Joseph Myers <joseph@codesourcery.com>
5569
5570 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Handle passing
5571 decimal floating-point values in GPRs for soft-float.
5572 (do_ppc_sysv_return_value): Handle returning decimal
5573 floating-point values in GPRs for soft-float.
5574
5575 2008-06-26 Vladimir Prus <vladimir@codesourcery.com>
5576
5577 * target.c (target_read_until_error): New.
5578 * target.h (target_read_until_error): Declare.
5579 * mi/mi-main.c (mi_cmd_data_read_memory): Use
5580 target_read_until_error.
5581
5582 2008-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5583
5584 Fix a memory leak found by Hui Zhu <teawater@gmail.com>.
5585 * c-exp.y (parse_number): Move the S and SAVED_CHAR initialization
5586 after the DECFLOAT detection to fix a memory leak. Remove the
5587 redundant NUM initialization. Protect the DECFLOAT detection memory
5588 access before the P block. Restore the P memory content for the
5589 DECFLOAT detection.
5590
5591 2008-06-25 Vladimir Prus <vladimir@codesourcery.com>
5592
5593 Kill the return value for all MI command functions.
5594 * mi/mi-cmds.h (enum mi_cmd_result): Remove.
5595 (mi_cmd_argv_ftype): Change return type to void.
5596
5597 * mi/mi-main.c: Adjust all function that implement
5598 MI commands to return nothing.
5599 (struct captured_mi_execute_command_actions):
5600 Remove the rc field.
5601 (mi_cmd_execute): Return nothing.
5602 (mi_execute_async_cli_command): Return nothing.
5603 (mi_cmd_exec_interrupt): Don't print ^done here.
5604 (mi_cmd_target_select): Don't print ^connected here.
5605 (captured_mi_execute_command): Don't check for MI_CMD_DONE.
5606 Special-case -target-select and output ^connected, not ^done.
5607
5608 * mi/mi-cmd-break.c: Adjust.
5609 * mi/mi-cmd-disas.c: Adjust.
5610 * mi/mi-cmd-env.c: Adjust.
5611 * mi/mi-cmd-file.c: Adjust.
5612 * mi/mi-cmd-stack.c: Adjust.
5613 * mi/mi-cmd-target.c: Adjust.
5614 * mi/mi-cmd-var.c: Adjust.
5615 * mi/mi-interp.c: Adjust.
5616 * mi/mi-symbol-cmds.c: Adjust.
5617
5618 2008-06-25 Vladimir Prus <vladimir@codesourcery.com>
5619
5620 Emit ^running via observer.
5621 * mi/mi-interp.c (mi_cmd_interpreter_exec): Do no print
5622 ^running here.
5623 (mi_on_resume): Print ^running if not previously output.
5624 * mi/mi-main.c (running_result_record_printed): New.
5625 (captured_mi_execute_command): Reset
5626 running_result_record_printed. Use running_result_record_printed
5627 to decide if we should skip ^done.
5628 (mi_execute_async_cli_command): Don't print ^running here.
5629 * mi/mi-main.h (current_token, running_result_record_printed):
5630 Declare.
5631
5632 2008-06-24 Michael Snyder <msnyder@specifix.com>
5633
5634 * infrun.c (_initialize_infrun): White space and typo fix.
5635
5636 2008-06-23 Christopher Faylor <me.gdb.changelog@cgf.cx>
5637
5638 * win32-nat.c (safe_symbol_file_add_stub): Remove unused variable.
5639 (do_initial_win32_stuff): Fix problem with inability to set breakpoints
5640 when first loading DLL with "dll" command.
5641
5642 2008-06-19 Pierre Muller <muller@ics.u-strasbg.fr>
5643
5644 * gnu-nat.c (proc_string): Use capital T for "Thread".
5645
5646 2008-06-19 Pierre Muller <muller@ics.u-strasbg.fr>
5647
5648 * win32-nat.c (win32_pid_to_str): Use capital T for "Thread".
5649
5650 2008-06-18 Joel Brobecker <brobecker@adacore.com>
5651
5652 * solib-osf.c (osf_solib_create_inferior_hook): Do nothing if
5653 the target cannot run.
5654
5655 2008-06-18 Joel Brobecker <brobecker@adacore.com>
5656
5657 * solib-osf.c (osf_solib_create_inferior_hook): Do nothing if
5658 we're attaching to a running process.
5659
5660 2008-06-18 Pierre Muller <muller@ics.u-strasbg.fr>
5661
5662 * win32-nat.c (handle_load_dll): Give dll name and load address
5663 if debug_events is on.
5664 (handle_unload_dll): Likewise.
5665
5666 2008-06-14 Vladimir Prus <vladimir@codesourcery.com>
5667
5668 Don't suppress *running when doing finish.
5669 * infcall.c (call_function_by_hand): Set both
5670 suppress_resume_observer and suppress_stop_observer.
5671 * infcmd.c (suppress_run_stop_observers): Split into...
5672 (suppress_resume_observer, suppress_stop_observer): ...those.
5673 (finish_command_continuation): Clear suppress_stop_observer.
5674 (finish_command): Set suppress_stop_observer.
5675 * inferior.h (suppress_run_stop_observers): Split into...
5676 (suppress_resume_observer, suppress_stop_observer): ...those.
5677 * infrun.c (normal_stop): Check for suppress_stop_observer.
5678 * thread.c (set_running): Check for suppress_resume_observer.
5679
5680 2008-06-12 Pedro Alves <pedro_alves@portugalmail.pt>
5681 Pierre Muller <muller@ics.u-strasbg.fr>
5682
5683 * gdbarch.sh (gdbarch_skip_main_prologue): New.
5684 * gdbarch.h, gdbarch.c: Regenerate.
5685 * i386-tdep.h (i386_skip_main_prologue): Declare.
5686 * i386-tdep.c (i386_skip_main_prologue): New.
5687 * i386-cygwin-tdep.c (i386_cygwin_init_abi): Register
5688 i386_skip_main_prologue as gdbarch_skip_main_prologue gdbarch callback.
5689 * symtab.c (find_function_start_sal): When pc points at the "main"
5690 function, call gdbarch_skip_main_prologue.
5691
5692 2008-06-11 Daniel Jacobowitz <dan@codesourcery.com>
5693
5694 * value.c (value_primitive_field): Fetch lazy register values.
5695
5696 2008-06-11 Pedro Alves <pedro@codesourcery.com>
5697
5698 * NEWS: Mention support removal of undocumented S AA p PID stop
5699 reply packet.
5700
5701 * remote.c (remote_wait): Remove undocumented S AA p PID support.
5702
5703 2008-06-10 Stan Shebs <stan@codesourcery.com>
5704
5705 * MAINTAINERS: Update my affiliation and address.
5706
5707 2008-06-10 Andreas Schwab <schwab@suse.de>
5708
5709 * top.c (print_gdb_version): Don't print final newline.
5710
5711 2008-06-10 Vladimir Prus <vladimir@codesourcery.com>
5712
5713 Implement *running.
5714 * Makefile.in: Update dependencies.
5715 * gdbthread.h (struct thread_info): New field
5716 running_.
5717 (set_running, is_running): New.
5718 * thread.c (set_running, is_running): New.
5719 * inferior.h (suppress_normal_stop_observer): Rename to...
5720 (suppress_run_stop_observers): ..this.
5721 * infcmd.c (suppress_normal_stop_observer): Rename to...
5722 (suppress_run_stop_observers): ..this.
5723 (finish_command_continuation, finish_command): Adjust.
5724 * infcall.c (call_function_by_hand): Adjust.
5725 * infrun.c (normal_stop): Call set_running.
5726 * target.c (target_resume): New. Call set_running.
5727 * target.h (target_resume): Convert from macro to
5728 a function.
5729
5730 * mi/mi-interp.c (mi_on_resume): New.
5731 (mi_interpreter_init): Register mi_on_resume.
5732
5733 2008-06-10 Vladimir Prus <vladimir@codesourcery.com>
5734
5735 Use observers to report stop events in MI.
5736 * mi/mi-interp.c (mi_on_normal_stop): New.
5737 (mi_interpreter_init): Register mi_on_normal_stop.
5738 (mi_interpreter_exec_continuation): Remove.
5739 (mi_cmd_interpreter_exec): Don't register the above.
5740 * mi/mi-main.c (captured_mi_execute_command): Don't care
5741 about sync_execution.
5742 (mi_execute_async_cli_command): Don't install continuation. Don't
5743 print *stopped.
5744 (mi_exec_async_cli_cmd_continuation): Remove.
5745
5746 2008-06-10 Vladimir Prus <vladimir@codesourcery.com>
5747
5748 Suppress normal stop observer when it's problematic.
5749 * inferior.h (suppress_normal_stop_observer): New.
5750 * infcall.c (call_function_by_hand): Disable stop events when
5751 doing function calls.
5752 * infmcd.c (suppress_normal_stop_observer): New.
5753 (finish_command_continuation): Call normal_stop observer
5754 explicitly.
5755 (finish_command): Disable stop events inside proceed.
5756 * infrun.c (normal_stop): Don't call normal stop observer if
5757 suppressed of if multi-step is in progress.
5758
5759 2008-06-10 Vladimir Prus <vladimir@codesourcery.com>
5760
5761 Remove stale code.
5762 * infrun.c (finish_command): Don't pass cleanup
5763 to continuation.
5764 (finish_command_continuation): Don't grab cleanup from
5765 the passed data, as we don't use, and cannot, use it anyway.
5766
5767 2008-06-10 Vladimir Prus <vladimir@codesourcery.com>
5768
5769 Introduce common cleanup for restoring integers.
5770 * defs.h (make_cleanup_restore_integer): New declaration.
5771 (struct cleanup): New field free_arg.
5772 (make_my_cleanup_2): New.
5773 * utils.c (restore_integer_closure, restore_integer)
5774 (make_cleanup_restore_integer): New.
5775 (make_my_cleanup): Initialize the free_arg field and
5776 renamed to make_my_cleanup_2.
5777 (do_my_cleanups): Call free_arg.
5778 (discard_cleanups): Call free_arg.
5779 * breakpoint.c (restore_always_inserted_mode): Remove.
5780 (update_breakpoints_after_exec): Use make_cleanup_restore_integer.
5781
5782 2008-06-09 Doug Evans <dje@google.com>
5783
5784 * remote.c (remote_wait): Include beginning of malformed packet
5785 in error output.
5786
5787 2008-06-09 Tom Tromey <tromey@redhat.com>
5788
5789 * completer.c (complete_line): Don't special-case
5790 expression_completer.
5791 (expression_completer): Only pass last word to
5792 location_completer.
5793 * c-exp.y (yylex): Check 'token', not 'operator'.
5794
5795 2008-06-09 Daniel Jacobowitz <dan@codesourcery.com>
5796
5797 * configure.ac (build_warnings): Add -Wno-format for mingw.
5798 * configure: Regenerated.
5799
5800 2008-06-07 Daniel Jacobowitz <dan@codesourcery.com>
5801
5802 * NEWS: Make indentation consistent. Move exec tracing entry out
5803 of remote packet list.
5804
5805 2008-06-06 Tom Tromey <tromey@redhat.com>
5806
5807 * value.h (evaluate_subexpression_type, extract_field_op):
5808 Declare.
5809 * printcmd.c (_initialize_printcmd): Use expression_completer for
5810 'p', 'inspect', 'call'.
5811 * parser-defs.h (parse_field_expression): Declare.
5812 * parse.c: Include exceptions.h.
5813 (in_parse_field, expout_last_struct): New globals.
5814 (mark_struct_expression): New function.
5815 (prefixify_expression): Return int.
5816 (prefixify_subexp): Return int. Use expout_last_struct.
5817 (parse_exp_1): Update.
5818 (parse_exp_in_context): Add 'out_subexp' argument. Handle
5819 in_parse_field.
5820 (parse_field_expression): New function.
5821 * expression.h (parse_field_expression): Declare.
5822 (in_parse_field): Likewise.
5823 * eval.c (evaluate_subexpression_type): New function.
5824 (extract_field_op): Likewise.
5825 * completer.h (expression_completer): Declare.
5826 * completer.c (expression_completer): New function.
5827 (count_struct_fields, add_struct_fields): New functions.
5828 * c-exp.y (yyparse): Redefine.
5829 (COMPLETE): New token.
5830 (exp): New productions.
5831 (saw_name_at_eof, last_was_structop): New globals.
5832 (yylex): Return COMPLETE when needed. Recognize in_parse_field.
5833 (c_parse): New function.
5834 * breakpoint.c (_initialize_breakpoint): Use expression_completer
5835 for watch, awatch, and rwatch.
5836 * Makefile.in (parse.o): Depend on exceptions_h.
5837
5838 2008-06-06 Paul Pluzhnikov <ppluzhnikov@google.com>
5839
5840 PR gdb/1147
5841 * gdb/valopts.c (find_overload_match): Handle references
5842 to pointers.
5843
5844 2008-06-06 Paul N. Hilfinger <hilfinger@adacore.com>
5845
5846 * ada-lang.c (ada_value_assign): Correct big-endian case to take into
5847 account the bitsize of the 'from' operand.
5848
5849 2008-06-06 Pedro Alves <pedro@codesourcery.com>
5850
5851 * annotate.h (annotate_thread_changed): Declare.
5852
5853 2008-06-06 Nick Roberts <nickrob@snap.net.nz>
5854
5855 * annotate.c (annotate_thread_changed): New function.
5856 * thread.c (thread_command) : Use it.
5857 * infrun.c (normal_stop): Use it.
5858
5859 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
5860 Nathan Sidwell <nathan@codesourcery.com>
5861 Joseph Myers <joseph@codesourcery.com>
5862
5863 * acinclude.m4: Include ../config/acx.m4.
5864 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5865 * configure, config.in: Regenerate.
5866 * main.c (print_gdb_help): Use REPORT_BUGS_TO for bug-reporting
5867 address.
5868 * top.c (print_gdb_version): Use PKGVERSION and REPORT_BUGS_TO.
5869
5870 2008-06-05 Pedro Alves <pedro@codesourcery.com>
5871
5872 Replace 'target async' by 'maintenance set remote-async' and
5873 'target remote' combination.
5874
5875 * remote.c (remote_async_wait): Merge into remote_wait, and
5876 remove.
5877 (remote_async_permitted, remote_async_permitted_set): New
5878 variables.
5879 (set_maintenance_remote_async_permitted)
5880 (show_maintenance_remote_async_permitted): New functions.
5881 (remote_async_ops, extended_async_remote_ops): Delete.
5882 (remote_async_open, extended_remote_async_open): Delete.
5883 (remote_open_1): Drop async_p parameter. Update callers. Replace
5884 async_p with remote_async_permitted checks.
5885 (extended_async_remote_attach): Delete.
5886 (remote_resume, remote_async_resume): Merge and leave remote_resume.
5887 (remote_async_terminal_inferior): Rename to...
5888 (remote_terminal_inferior): ... this, and add
5889 remote_async_termitted check.
5890 (remote_async_terminal_ours): Rename to...
5891 (remote_terminal_ours): ... this, and add remote_async_termitted
5892 check.
5893 (remote_wait, remote_async_wait): Merge and leave remote_wait
5894 only.
5895 (remote_kill, remote_async_kill): Merge and leave remote_kill
5896 only.
5897 (remote_async_mourn, extended_async_remote_mourn): Delete.
5898 (extended_remote_create_inferior_1): Drop async_p parameter.
5899 Update callers. Always use extended_remote_ops.
5900 (extended_remote_async_create_inferior): Delete.
5901 (remote_return_zero): Delete.
5902 (init_remote_ops): Register remote_can_async_p, remote_async,
5903 remote_async_mask, remote_terminal_inferior and
5904 remote_terminal_ours.
5905 (remote_can_async_p, remote_is_async_p): Check for
5906 remote_async_permitted.
5907 (init_remote_async_ops, init_extended_async_remote_ops): Remove.
5908 (set_remote_cmd): Don't add async and extended-async targets.
5909 (_initialize_remote): Add set/show remote-async maintenance
5910 commands.
5911
5912 2008-06-05 Pedro Alves <pedro@codesourcery.com>
5913
5914 * remote.c (kill_kludge): Delete.
5915 (remote_wait, remote_async_wait): Don't set it.
5916 (remote_kill, remote_async_kill): Don't do anything with it.
5917
5918 2008-06-05 Pedro Alves <pedro@codesourcery.com>
5919
5920 * linux-thread-db.c (thread_db_wait): Don't trim event ptid.
5921
5922 2008-06-05 Aleksandar Ristovski <aristovski@qnx.com>
5923
5924 * bcache.c (bcache_data): Call deprecated_bcache_added function.
5925 (deprecated_bcache_added): New function name. Body of function
5926 bcache_data is used here with the addition of 'added' argument.
5927 * bcache.h (deprecated_bcache_added): New function.
5928 * symfile.c (add_psymbol_to_bcache): New helper function, takes part of
5929 work from add_psymbol_to_list - initialises partial symbol and stashes
5930 it in objfile's cache.
5931 (append_psymbol_to_list): New helper function, takes other part of
5932 work from add_psymbol_to_list - adds partial symbol to the given list.
5933 (add_psymbol_to_list): Call helper functions instead of doing work
5934 here. If adding to global list, do not duplicate partial symbols in the
5935 partial symtab.
5936
5937 2008-06-05 Aleksandar Ristovski <aristovski@qnx.com>
5938
5939 * breakpoint.c (print_exception_catchpoint): Put 'exception' back to
5940 'exception caught|thrown' message.
5941
5942 2008-06-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5943
5944 * Makefile.in: Update dependencies.
5945 * dwarf2expr.c: New include "gdb_assert.h".
5946 (new_dwarf_expr_context): Initialize MAX_RECURSION_DEPTH.
5947 (dwarf_expr_eval): Sanity check the RECURSION_DEPTH count.
5948 (execute_stack_op): Error out on too large RECURSION_DEPTH.
5949 Increase/decrease RECURSION_DEPTH around the function.
5950
5951 2008-06-05 Daniel Jacobowitz <dan@codesourcery.com>
5952
5953 * remote.c (get_offsets): Handle a single segment.
5954 * symfile.c (symfile_map_offsets_to_segments): Allow more bases
5955 than segments.
5956
5957 2008-06-03 Daniel Jacobowitz <dan@codesourcery.com>
5958
5959 * solib-svr4.c (struct lm_info): Add lm_addr.
5960 (main_lm_addr): New.
5961 (svr4_default_sos): Set lm_addr.
5962 (svr4_current_sos): Set lm_addr and main_lm_addr.
5963 (svr4_fetch_objfile_link_map): Rewrite.
5964 (svr4_clear_solib): Clear main_lm_addr.
5965
5966 2008-06-03 Michael Snyder <msnyder@redhat.com>
5967 Joseph Myers <joseph@codesourcery.com>
5968
5969 * mips-tdep.c (mips_eabi_return_value): Replace stub that always
5970 returned RETURN_VALUE_STRUCT_CONVENTION with a real function.
5971
5972 2008-06-02 Roman Zippel <zippel@linux-m68k.org>
5973
5974 * m68klinux-tdep.c (m68k_linux_pc_in_sigtramp): Fix incorrect test.
5975
5976 2008-06-02 Roman Zippel <zippel@linux-m68k.org>
5977
5978 * m68k-tdep.c (m68k_analyze_prologue): Fix length of lea insn.
5979
5980 2008-06-01 Joel Brobecker <brobecker@adacore.com>
5981
5982 * rs6000-aix-tdep.c (rs6000_convert_from_func_ptr_addr): Do not
5983 treat pointers in data space as function descriptors if the
5984 target address is also in the data space.
5985
5986 2008-05-30 Joel Brobecker <brobecker@adacore.com>
5987
5988 * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): Set
5989 the trad-frame register value for the SP register.
5990
5991 2008-05-29 Mark Kettenis <kettenis@gnu.org>
5992
5993 * sparcnbsd-tdep.c, sparcobsd-tdep.c: Update for unwinder changes.
5994
5995 2008-05-28 Joel Brobecker <brobecker@adacore.com>
5996
5997 * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Improve the heuristic
5998 that identifies function descriptors outside of the .opd section.
5999
6000 2008-05-28 Aleksandar Ristovski <aristovski@qnx.com>
6001
6002 * breakpoint.c (print_exception_catchpoint): In CLI add 'Temporary' for
6003 temporary catchpoints. In MI add missing fields 'reason', 'disp',
6004 'bkptno'.
6005 (print_mention_exception_catchpoint): Add 'Temporary' for temporary
6006 catchpoints.
6007 (handle_gnu_v3_exceptions): Use tempflag.
6008
6009 2008-05-28 Vladimir Prus <vladimir@codesourcery.com>
6010
6011 Refactor varobj_update interface.
6012 * varobj.c (varobj_update): Report changes as vector. Also
6013 return not just a list of varobj, but a list of special structures
6014 that tell what exactly has changed.
6015 * varobj.h (enum varobj_update_error): Rename to
6016 varobj_scope_status.
6017 (struct varobj_update_result_t): New.
6018 (varobj_update): Adjust prototype.
6019 * mi/mi-cmd-var.c: Adjust for changes.
6020
6021 2008-05-28 Vladimir Prus <vladimir@codesourcery.com>
6022
6023 * varobj.c (varobj_update): Fix comment typo.
6024 Fix indentation.
6025
6026 2008-05-26 Joel Brobecker <brobecker@adacore.com>
6027
6028 Set the symtab field of symbols read from ECOFF debugging entries.
6029 * mdebugread.c (add_symbol): Add new parameter symtab.
6030 (parse_symbol): Update calls to add_symbol throughout.
6031
6032 2008-05-27 Andreas Schwab <schwab@suse.de>
6033
6034 * symtab.h (enum address_class): Remove LOC_REGPARM and
6035 LOC_COMPUTED_ARG.
6036 (struct symbol): Add is_argument.
6037 (SYMBOL_IS_ARGUMENT): Define.
6038
6039 * ada-lang.c (ada_add_block_symbols): Use SYMBOL_IS_ARGUMENT.
6040 * buildsym.c (finish_block): Likewise.
6041 * stack.c (print_frame_args, print_block_frame_locals)
6042 (print_frame_arg_vars): Likewise.
6043 * symtab.c (lookup_block_symbol): Likewise.
6044 * tracepoint.c (add_local_symbols): Likewise.
6045 * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
6046
6047 * coffread.c (process_coff_symbol): Set SYMBOL_IS_ARGUMENT.
6048 * dwarf2read.c (new_symbol): Likewise.
6049 * mdebugread.c (parse_symbol): Likewise.
6050 * stabsread.c (define_symbol): Likewise.
6051
6052 * ada-exp.y (select_possible_type_sym): Don't handle LOC_REGPARM
6053 and LOC_COMPUTED_ARG.
6054 * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
6055 * ax-gdb.c (gen_var_ref): Likewise.
6056 * eval.c (evaluate_subexp_for_address): Likewise.
6057 * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
6058 * m2-exp.y (yylex): Likewise.
6059 * printcmd.c (address_info): Likewise.
6060 * symmisc.c (print_symbol, print_partial_symbols): Likewise.
6061 * tracepoint.c (collect_symbol, scope_info): Likewise.
6062
6063 2008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
6064
6065 * gdbarch.sh: Added new gdbarch struct
6066 core_regset_sections.
6067 * gdbarch.c: Refreshed.
6068 * gdbarch.h: Refreshed.
6069 * regset.h (core_regset_section): Declared.
6070 * linux-nat.c (linux_nat_do_thread_registers): Added
6071 support for the new gdbarch struct core_regset_sections.
6072 * utils.c (host_address_to_string): New function.
6073 * defs.h (host_address_to_string): New prototype.
6074 * i386-linux-tdep.c (i386_regset_rections): New register
6075 sections list for i386.
6076 (i386_linux_init_abi): Initialized new gdbarch struct
6077 core_regset_sections.
6078 * Makefile.in: Updated to reflect dependency changes.
6079 * ppc-linux-tdep.c (ppc_regset_sections): Register
6080 sections list for ppc.
6081 (ppc_linux_init_abi): Initialized new gdbarch struct
6082 core_regset_sections
6083
6084 2008-05-24 Andreas Schwab <schwab@suse.de>
6085
6086 * linespec.c (decode_objc): Save current language around call to
6087 get_selected_block.
6088
6089 2008-05-23 Joel Brobecker <brobecker@adacore.com>
6090
6091 * valprint.h (get_array_bounds): Renames get_array_low_bound.
6092 * valprint.c (get_array_bounds): Renames get_array_low_bound.
6093 Return the proper bound value if the array index type is an
6094 enumerated type. Compute the high bound if requested.
6095 (val_print_array_elements): Handle the case when the array
6096 element has a null size.
6097 * ada-valprint.c (print_optional_low_bound): Add handling
6098 for empty arrays or arrays of zero-size elements.
6099 (ada_val_print_array): New function, extracted out from
6100 ada_val_print_1 case TYPE_CODE_ARRAY, and enhanced to
6101 handle empty arrays and arrays of zero-size elements.
6102 (ada_val_print_1)[case TYPE_CODE_ARRAY]: Replace extracted-out
6103 code by call to ada_val_print_array.
6104 (ada_value_print): Remove handling of null array. The handling
6105 was incomplete and is now better handled by ada_val_print_array.
6106
6107 2008-05-23 Markus Deuling <deuling@de.ibm.com>
6108
6109 * annotate.c (annotate_source, annotate_frame_begin): Replace
6110 deprecated_print_address_numeric with paddress.
6111 * cli/cli-cmds.c (list_command, edit_command): Likewise.
6112 * tui/tui-stack.c (tui_make_status_line): Likewise.
6113
6114 * defs.h (deprecated_print_address_numeric): Remove.
6115 * printcmd.c (deprecated_print_address_numeric): Remove.
6116 * maint.c (maint_print_section_info): Fix comment.
6117
6118 2008-05-23 Markus Deuling <deuling@de.ibm.com>
6119
6120 * valprint.c (print_hex_chars, print_octal_chars, print_decimal_chars,
6121 print_binary_chars, print_char_chars): Add byte_order parameter and
6122 replace gdbarch_byte_order.
6123 (print_decimal_chars): Replace START_P, NOT_END_P and NEXT_P by their
6124 expressions and remove them. Remove unused TWO_TO_FOURTH.
6125 (val_print_type_code_int): Introduce gdbarch_byte_order to get at the
6126 endianness. Update call to print_hex_chars.
6127 * valprint.h (print_hex_chars, print_octal_chars, print_decimal_chars,
6128 print_binary_chars, print_char_chars): Add byte_order parameter.
6129 * printcmd.c (print_scalar_formatted): Introduce gdbarch_byte_order to
6130 get at the endianness. Update print_*_char calls to use byte_order.
6131
6132 2008-05-22 Ulrich Weigand <uweigand@de.ibm.com>
6133
6134 * symtab.h (struct symbol): Make "aux_value" member a void pointer
6135 instead of a union.
6136 (SYMBOL_LOCATION_BATON): Update.
6137
6138 2008-05-22 Ulrich Weigand <uweigand@de.ibm.com>
6139
6140 * symtab.h (enum address_class): Remove LOC_BASEREG and
6141 LOC_BASEREG_ARG.
6142 (struct symbol): Remove "basereg" member of "aux_value" union.
6143 (SYMBOL_BASEREG): Remove.
6144
6145 * ada-exp.y (select_possible_type_sym): Do not handle LOC_BASEREG
6146 or LOC_BASEREG_ARG.
6147 * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
6148 (ada_add_block_symbols): Likewise.
6149 * ax-gdb.c (gen_var_ref): Likewise.
6150 * buildsym.c (finish_block): Likewise.
6151 * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
6152 * m2-exp.y (yylex): Likewise.
6153 * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
6154 * printcmd.c (address_info): Likewise.
6155 * stack.c (print_frame_args, print_block_frame_locals): Likewise.
6156 (print_frame_arg_vars): Likewise.
6157 * symmisc.c (print_symbol): Likewise.
6158 * symtab.c (lookup_block_symbol): Likewise.
6159 * tracepoint.c (collect_symbol, add_local_symbols): Likewise.
6160 (scope_info): Likewise.
6161
6162 2008-05-22 Ulrich Weigand <uweigand@de.ibm.com>
6163
6164 * symtab.h (enum address_class): Remove LOC_LOCAL_ARG.
6165
6166 * ada-exp.y (select_possible_type_sym): Do not handle LOC_LOCAL_ARG.
6167 * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
6168 (ada_add_block_symbols): Likewise.
6169 * ax-gdb.c (gen_var_ref): Likewise.
6170 * buildsyms.c (finish_block): Likewise.
6171 * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
6172 * m2-exp.y (yylex): Likewise.
6173 * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
6174 * printcmd.c (address_info): Likewise.
6175 * stack.c (print_frame_args, print_frame_arg_vars): Likewise.
6176 * symmisc.c (print_symbol, print_partial_symbols): Likewise.
6177 * symtab.c (lookup_block_symbol): Likewise.
6178 * tracepoint.c (collect_symbol, add_local_symbols): Likewise.
6179 (scope_info): Likewise.
6180
6181 2008-05-22 Ulrich Weigand <uweigand@de.ibm.com>
6182
6183 * symtab.h (enum address_class): Remove LOC_INDIRECT and
6184 LOC_HP_THREAD_LOCAL_STATIC.
6185
6186 * findvar.c (symbol_read_needs_frame, read_var_value): Do not
6187 handle LOC_INDIRECT or LOC_HP_THREAD_LOCAL_STATIC.
6188 (read_var_value): Likewise.
6189 * buildsym.c (finish_block): Likewise.
6190 * objfiles.c (objfile_relocate): Likewise.
6191 * printcmd.c (address_info): Likewise.
6192 * symmisc.c (print_symbol, print_partial_symbols): Likewise.
6193 * tracepoint.c (scope_info): Likewise.
6194
6195 2008-05-21 Markus Deuling <deuling@de.ibm.com>
6196 Maxim Grigoriev <maxim2405@gmail.com>
6197
6198 * xtensa-tdep.c (xtensa_read_register): Remove.
6199 (xtensa_frame_cache): Get rid of xtensa_read_register. Pass extra
6200 argument litbase to call0_frame_cache().
6201 (call0_track_op, call0_analyze_prologue)
6202 (call0_frame_cache): Use extra argument litbase.
6203
6204 2008-05-21 Joel Brobecker <brobecker@adacore.com>
6205
6206 * infcmd.c (_initialize_infcmd): Add new "fin" alias for "finish".
6207
6208 2008-05-21 Ulrich Weigand <uweigand@de.ibm.com>
6209
6210 * frame.h (SIZEOF_FRAME_SAVED_REGS): Remove.
6211
6212 2008-05-21 Ulrich Weigand <uweigand@de.ibm.com>
6213
6214 * alpha-mdebug-tdep.c: Include "trad-frame.h".
6215 (struct alpha_mdebug_unwind_cache): Change type of SAVED_REGS to
6216 struct trad_frame_saved_reg *.
6217 (alpha_mdebug_frame_unwind_cache): Allocate SAVED_REGS using
6218 trad_frame_alloc_saved_regs. Update accesses. Record previous
6219 value of SP as being vfp.
6220 (alpha_mdebug_frame_prev_register): Use trad_frame_get_prev_register.
6221 * Makefile.in (alpha-mdebug-tdep.o): Update dependencies.
6222
6223 2008-05-21 Markus Deuling <deuling@de.ibm.com>
6224
6225 * score-tdep.c (score_print_insn): Get the current endianess from
6226 disassemble_info instead of gdbarch_byte_order.
6227
6228 2008-05-21 Pedro Alves <pedro@codesourcery.com>
6229
6230 * frame.c (get_prev_frame_1): Build frame id before setting
6231 this_frame->prev_p, not after.
6232
6233 2008-05-21 Nick Roberts <nickrob@snap.net.nz>
6234
6235 * annotate.c (annotate_new_thread): New function for new-thread
6236 annotation.
6237 * annotate.h: (annotate_new_thread): New extern.
6238 * thread.c (add_thread_with_info): Use it.
6239 * Makefile.in (thread.o): Add dependency on annotate.h.
6240
6241 2008-05-20 Joel Brobecker <brobecker@adacore.com>
6242
6243 * win32-nat.c (win32_wait): Block the control-c event while
6244 waiting for a debug event.
6245
6246 2008-05-19 Pedro Alves <pedro@codesourcery.com>
6247
6248 * symtab.h (lookup_symbol_in_language): Update comment.
6249 * symtab.c (lookup_symbol_aux_block): Update comment.
6250 * ada-lang.c (ada_lookup_symbol_list): Update comment.
6251
6252 2008-05-19 Ulrich Weigand <uweigand@de.ibm.com>
6253
6254 * symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter.
6255 (lookup_symbol): Likewise.
6256 * symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter.
6257 (lookup_symbol): Likewise.
6258 (search_symbols): Update.
6259
6260 * linespec.c (find_methods, collect_methods): Update.
6261 (add_matching_methods, add_constructors): Update.
6262 (decode_compound, decode_dollar, decode_variable): Update.
6263 (lookup_prefix_sym): Update.
6264
6265 (symbol_found): Remove SYM_SYMTAB parameter.
6266 Use SYMBOL_SYMTAB (sym) instead.
6267
6268 * gdbtypes.c (lookup_typename): Update.
6269 (lookup_struct, lookup_union, lookup_enum): Update.
6270 (lookup_template_type): Update.
6271 (check_typedef): Update.
6272 * language.c (lang_bool_type): Update.
6273 * mdebugread.c (parse_procedure): Update.
6274 * mi/mi-cmd-stack.c (list_args_or_locals): Update.
6275 * parse.c (write_dollar_variable): Update.
6276 * printcmd.c (address_info): Update.
6277 * source.c (select_source_symtab): Update.
6278 * stack.c (print_frame_args, print_frame_arg_vars): Update.
6279 * valops.c (find_function_in_inferior): Update.
6280 (value_struct_elt_for_reference): Update.
6281 * value.c (value_static_field, value_fn_field): Update.
6282
6283 * alpha-mdebug-tdep.c (find_proc_desc): Update.
6284 * arm-tdep.c (arm_skip_prologue): Update.
6285 * mt-tdep.c (mt_skip_prologue): Update.
6286 * xstormy16-tdep.c (xstormy16_skip_prologue): Update.
6287
6288 * ada-lang.h (struct ada_symbol_info): Remove SYMTAB member.
6289 * ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter.
6290 (add_defn_to_vec): Likewise.
6291 (ada_add_block_symbols): Likewise.
6292 (lookup_cached_symbol, cache_symbol): Likewise.
6293 (standard_lookup): Update.
6294 (ada_lookup_symbol_list): Update.
6295
6296 * c-valprint.c (c_val_print): Update.
6297 * cp-support.c (cp_lookup_rtti_type): Update.
6298 * jv-lang.c (java_lookup_class, get_java_object_type): Update.
6299 * objc-lang.c (lookup_struct_typedef, find_imps): Update.
6300 * p-valprint.c (pascal_val_print): Update.
6301 * scm-lang.c (scm_lookup_name): Update.
6302
6303 * c-exp.y: Update.
6304 * f-exp.y: Update.
6305 * jv-exp.y: Update.
6306 * m2-exp.y: Update.
6307 * objc-exp.y: Update.
6308 * p-exp.y: Update.
6309
6310 2008-05-19 Ulrich Weigand <uweigand@de.ibm.com>
6311
6312 * language.h (struct language_defn): Remove SYMTAB parameter from
6313 la_lookup_symbol_nonlocal callback function pointer.
6314
6315 * ada-lang.h (ada_lookup_encoded_symbol): Remove SYMTAB parameter.
6316 (ada_lookup_encoded_symbol): Likewise.
6317 * ada-lang.c (ada_lookup_encoded_symbol): Remove SYMTAB parameter.
6318 Always call fixup_symbol_section.
6319 (ada_lookup_symbol): Remove SYMTAB parameter.
6320 (ada_lookup_symbol_nonlocal): Likewise.
6321 * ada-exp.y (write_object_renaming): Update.
6322 (find_primitive_type): Likewise.
6323
6324 * cp-support.h (cp_lookup_symbol_nonlocal): Remove SYMTAB parameter.
6325 (cp_lookup_symbol_namespace): Likewise.
6326 * cp-namespace.c (lookup_namespace_scope): Remove SYMTAB parameter.
6327 (lookup_symbol_file): Likewise.
6328 (lookup_possible_namespace_symbol): Likewise.
6329 (cp_lookup_symbol_nonlocal): Likewise.
6330 (cp_lookup_symbol_namespace): Likewise.
6331 (cp_lookup_nested_type): Update.
6332
6333 * scm-valprint.c (scm_inferior_print): Update.
6334 * valops.c (value_maybe_namespace_elt): Update.
6335
6336 * solist.h (struct target_so_ops): Remove SYMTAB parameter from
6337 lookup_lib_global_symbol callback function pointer.
6338 (solib_global_lookup): Remove SYMTAB parameter.
6339 * solib.c (solib_global_lookup): Remove SYMTAB parameter.
6340 * solib-svr4.c (elf_lookup_lib_symbol): Likewise.
6341
6342 * symtab.h (basic_lookup_symbol_nonlocal): Remove SYMTAB parameter.
6343 (lookup_symbol_static): Likewise.
6344 (lookup_symbol_global): Likewise.
6345 (lookup_symbol_aux_block): Likewise.
6346 (lookup_global_symbol_from_objfile): Likewise.
6347 * symtab.c (lookup_symbol_aux): Remove SYMTAB parameter.
6348 (lookup_symbol_aux_local): Likewise.
6349 (lookup_symbol_aux_block): Likewise.
6350 (lookup_symbol_aux_symtabs): Likewise.
6351 (lookup_symbol_aux_psymtabs): Likewise.
6352 (lookup_global_symbol_from_objfile): Likewise.
6353 (basic_lookup_symbol_nonlocal): Likewise.
6354 (lookup_symbol_static): Likewise.
6355 (lookup_symbol_global): Likewise.
6356
6357 (lookup_symbol_in_language): Do not pass SYMTAB to lookup_symbol_aux.
6358
6359 2008-05-17 Pedro Alves <pedro@codesourcery.com>
6360
6361 * remote.c (init_extended_remote_ops): Fix typo.
6362
6363 2008-05-16 Pedro Alves <pedro@codesourcery.com>
6364
6365 * NEWS: Mention new DICOS x86 target configuration.
6366
6367 2008-05-16 Pedro Alves <pedro@codesourcery.com>
6368 Ulrich Weigand <uweigand@de.ibm.com>
6369
6370 * minsyms.c (lookup_minimal_symbol_by_pc_name): New function.
6371 * symtab.h (lookup_minimal_symbol_by_pc_name): Add prototype.
6372
6373 * symtab.c (fixup_section): Remove prototype. Add ADDR parameter;
6374 use it instead of ginfo->value.address. Look up minimal symbol by
6375 address and name. Assume OBJFILE is non-NULL.
6376 (fixup_symbol_section): Ensure we always have an objfile to look
6377 into. Extract and pass to fixup_section the symbol's address that
6378 will match the minimal symbol's address.
6379 (fixup_psymbol_section): Likewise.
6380
6381 (find_pc_sect_psymtab): Fall back to non-addrmap case when debugging
6382 overlays and the addrmap returned the wrong section.
6383
6384 * dwarf2read.c (var_decode_location): Set SYMBOL_CLASS before
6385 calling fixup_symbol_section.
6386
6387 2008-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6388
6389 * minsyms.c: Include "target.h".
6390 (find_solib_trampoline_target): Handle minimal symbols pointing
6391 to function descriptors as well.
6392 * Makefile.in (minsyms.o): Update dependencies.
6393
6394 * ppc-linux-tdep.c (ppc64_standard_linkage): Rename to ...
6395 (ppc64_standard_linkage1): ... this. Fix optional instructions.
6396 (PPC64_STANDARD_LINKAGE_LEN): Rename to ...
6397 (PPC64_STANDARD_LINKAGE1_LEN): ... this.
6398 (ppc64_standard_linkage2, ppc64_standard_linkage3): New.
6399 (PPC64_STANDARD_LINKAGE2_LEN, PPC64_STANDARD_LINKAGE3_LEN): New.
6400 (ppc64_standard_linkage_target): Rename to ...
6401 (ppc64_standard_linkage1_target): ... this.
6402 (ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): New.
6403 (ppc64_skip_trampoline_code): Support three variants of standard
6404 linkage stubs. Call find_solib_trampoline_target to handle
6405 glink stubs.
6406
6407 2008-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6408
6409 * ppc-linux-tdep.c (ppc_linux_init_abi): Do not install
6410 ppc64_sysv_abi_adjust_breakpoint_address.
6411 * ppc-sysv-tdep.c (ppc64_sysv_abi_adjust_breakpoint_address): Remove.
6412 * ppc-tdep.h (ppc64_sysv_abi_adjust_breakpoint_address): Remove.
6413
6414 2008-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6415
6416 * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Remove.
6417 (ppc_linux_init_abi): Install find_solib_trampoline_target instead
6418 of ppc_linux_skip_trampoline_code.
6419
6420 2008-05-15 Daniel Jacobowitz <dan@codesourcery.com>
6421
6422 * gdbarch.sh: Delete dwarf_reg_to_regnum.
6423 * gdbarch.c, gdbarch.h: Regenerated.
6424 * amd64-tdep.c, arm-tdep.c, h8300-tdep.c, hppa-linux-tdep.c,
6425 hppa-tdep.c, i386-tdep.c, m32c-tdep.c, m68k-tdep.c, mips-tdep.c,
6426 s390-tdep.c, xtensa-tdep.c: Do not set dwarf_reg_to_regnum.
6427
6428 2008-05-15 Pedro Alves <pedro@codesourcery.com>
6429
6430 * linux-nat.c (trap_ptid): Delete.
6431 (linux_nat_detach, linux_nat_wait, linux_nat_mourn_inferior):
6432 Adjust.
6433 * linux-thread-db.c (thread_db_wait): Adjust.
6434
6435 2008-05-15 Joel Brobecker <brobecker@adacore.com>
6436
6437 * linespec.c (decode_line_1): Fix a couple of comments.
6438
6439 2008-05-15 Alan Modra <amodra@bigpond.net.au>
6440
6441 * dbxread.c: Formatting.
6442 (INTERNALIZE_SYMBOL): Init n_other.
6443 (set_namestring): Take pointer to nlist arg rather than struct
6444 copy. Update all callers.
6445
6446 2008-05-15 Andreas Schwab <schwab@suse.de>
6447
6448 * Makefile.in (dwarf2loc.o): Remove $(addrmap_h).
6449 (dwarf2read.o): Add $(addrmap_h).
6450
6451 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
6452
6453 * ppc-linux-tdep.c (ppc_linux_convert_from_func_ptr_addr): Rename ...
6454 (ppc64_linux_convert_from_func_ptr_addr): ... to this. No longer try
6455 to handle ppc32 PLT entries.
6456 (ppc_linux_init_abi): Install ppc64_linux_convert_from_func_ptr_addr
6457 only on ppc64.
6458
6459 2008-05-14 Daniel Jacobowitz <dan@codesourcery.com>
6460
6461 * elfread.c (elf_symtab_read): Create trampolines for @plt symbols.
6462 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Renamed from
6463 lookup_minimal_symbol_by_pc_section. Prefer trampolines if requested.
6464 (lookup_minimal_symbol_by_pc_section): Use
6465 lookup_minimal_symbol_by_pc_section_1.
6466 (lookup_solib_trampoline_symbol_by_pc): Likewise.
6467
6468 2008-05-13 Joel Brobecker <brobecker@adacore.com>
6469
6470 * findcmd.c: Add #include "gdb_stdint.h".
6471 * Makefile.in (findcmd.o): Update dependencies.
6472
6473 2008-05-11 David S. Miller <davem@davemloft.net>
6474
6475 * sparc-linux-tdep.c (sparc32_linux_init_abi): Remove
6476 long double size override, Linux does use 128-bit now.
6477
6478 * sparc-linux-tdep.c (PSR_SYSCALL): Define.
6479 (sparc_linux_write_pc): New function.
6480 (sparc32_linux_init_abi): Register it.
6481 * sparc64-linux-tdep.c (TSTATE_SYSCALL): Define.
6482 (sparc64_linux_write_pc): New function.
6483 (sparc64_linux_init_abi): Register it.
6484
6485 * sparc-linux-tdep.c, sparc64-linux-tdep.c: Use
6486 dwarf2_append_unwinders(), not dwarf2_frame_sniffer.
6487
6488 2008-05-11 Ulrich Weigand <uweigand@de.ibm.com>
6489
6490 * rs6000-tdep.c (rs6000_gdbarch_init): Set up info.target_desc
6491 and info.tdep_info before calling gdbarch_init_osabi.
6492
6493 2008-05-09 Joel Brobecker <brobecker@adacore.com>
6494
6495 * ada-lang.c (ada_evaluate_subexp) [BINOP_ASSIGN]: Do not force
6496 the type of the right hand side of the assignment to the type
6497 of the left hand side if the left hand side is a convenience
6498 variable.
6499
6500 2008-05-09 Ulrich Weigand <uweigand@de.ibm.com>
6501
6502 * NEWS: Mention gdbserver bi-arch capability.
6503
6504 2008-05-09 Doug Evans <dje@google.com>
6505
6506 New "find" command.
6507 * NEWS: Document find command and qSearch:memory packet.
6508 * Makefile.in (SFILES): Add findcmd.c.
6509 (COMMON_OBJS): Add findcmd.o.
6510 (findcmd.o): New rule.
6511 * findcmd.c: New file.
6512 * target.h (target_ops): New member to_search_memory.
6513 (simple_search_memory): Declare.
6514 (target_search_memory): Declare.
6515 * target.c (simple_search_memory): New fn.
6516 (target_search_memory): New fn.
6517 * remote.c (PACKET_qSearch_memory): New packet kind.
6518 (remote_search_memory): New fn.
6519 (init_remote_ops): Init to_search_memory.
6520 (init_extended_remote_ops): Ditto.
6521 (_initialize_remote): Add qSearch:memory packet config command.
6522
6523 2008-05-09 Eli Zaretskii <eliz@gnu.org>
6524
6525 * thread.c (_initialize_thread): Don't use commas and periods in
6526 first line of doc string of "set/show print thread-events".
6527
6528 2008-05-08 Joel Brobecker <brobecker@adacore.com>
6529
6530 * alpha-mdebug-tdep.c, alpha-osf1-tdep.c, alpha-tdep.c:
6531 Update for unwinder changes.
6532
6533 2008-05-08 Joel Brobecker <brobecker@adacore.com>
6534
6535 * frame.c (get_frame_base_address, get_frame_locals_address)
6536 (get_frame_args_address): Pass the correct frame when calling
6537 frame_base_find_by_frame.
6538
6539 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6540
6541 * remote.c (extended_remote_attach_1): Call target_find_description.
6542
6543 2008-05-08 Daniel Jacobowitz <dan@codesourcery.com>
6544
6545 * remote.c (extended_remote_create_inferior_1): Clean up
6546 before marking the target running.
6547
6548 2008-05-08 Joel Brobecker <brobecker@adacore.com>
6549
6550 * hppa-tdep.h, hppa-tdep.c, hppa-hpux-tdep.c: Update for unwinder
6551 changes.
6552
6553 2008-05-07 Joel Brobecker <brobecker@adacore.com>
6554
6555 * sparc-tdep.c, sparc-tdep.h, sparc-sol2-tdep.c, sparc64-tdep.c,
6556 sparc64-sol2-tdep.c: Update for unwinder changes.
6557
6558 2008-05-07 Daniel Jacobowitz <dan@codesourcery.com>
6559
6560 * cp-support.c (mangled_name_to_comp): Initialize storage.
6561 (unqualified_name_from_comp): Likewise.
6562
6563 2008-05-07 Jie Zhang <jie.zhang@analog.com>
6564
6565 * remote.c (remote_insert_breakpoint): Call get_remote_state
6566 after gdbarch_breakpoint_from_pc is called.
6567 (remote_insert_hw_breakpoint): Likewise.
6568
6569 2008-05-06 Joel Brobecker <brobecker@adacore.com>
6570
6571 * valprint.c (val_print): Add new language parameter and use it
6572 instead of using the current_language. Update calls to val_print
6573 throughout.
6574 (common_val_print): Add new langauge parameter and pass it to
6575 val_print.
6576 * value.h (struct language_defn): Add opaque declaration.
6577 (val_print, common_val_print): Update declarations.
6578 * stack.c (print_frame_args): Update call to common_val_print
6579 using the appropriate language.
6580 * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
6581 * c-valprint, f-valprint.c, m2-valprint.c, mt-tdep.c, infcmd.c,
6582 mi/mi-main.c, jv-valprint.c, ada-valprint.c, varobj.c, p-valprint.c,
6583 scm-valprint.c, cp-valprint.c, sh64-tdep.c, printcmd.c:
6584 #include "language.h" if necessary.
6585 Update calls to val_print and common_val_print.
6586 * Makefile.in (mt-tdep.o, sh64-tdep.o, mi-cmds.o, mi-main.o):
6587 Update dependencies.
6588
6589 2008-05-06 Joel Brobecker <brobecker@adacore.com>
6590
6591 * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Treat addresses
6592 pointing inside a non-executable section as function descriptors.
6593
6594 2008-05-06 Pedro Alves <pedro@codesourcery.com>
6595
6596 * inf-loop.c (inferior_event_handler): Run all continuations and
6597 print any language change before running the breakpoint commands.
6598
6599 2008-05-06 Joel Brobecker <brobecker@adacore.com>
6600
6601 * frame-unwind.c (frame_unwind_got_bytes): New function.
6602 * frame-unwind.h (frame_unwind_got_bytes): Add declaration.
6603 * libunwind-frame.h, libunwind-frame.c, ia64-tdep.c: Update
6604 for unwinder changes.
6605
6606 2008-05-05 Doug Evans <dje@google.com>
6607
6608 * NEWS: Mention new /m modifier for disassemble command.
6609 * cli/cli-cmds.c (print_disassembly): New function.
6610 (disassemble_current_function): New function
6611 (disassemble_command): Recognize /m modifier, print mixed
6612 source+assembly.
6613 (init_cli_cmds): Update disassemble help text.
6614
6615 2008-05-05 Maxim Grigoriev <maxim2405@gmail.com>
6616
6617 * xtensa-tdep.c: Update for unwinder changes.
6618
6619 2008-05-05 Andreas Schwab <schwab@suse.de>
6620
6621 Update m68k port for unwinder changes.
6622 * m68k-tdep.c (m68k_frame_cache): Expect this_frame.
6623 (m68k_frame_this_id, m68k_frame_prev_register): Update signature.
6624 (m68k_frame_unwind): Use default_frame_sniffer.
6625 (m68k_frame_sniffer): Remove.
6626 (m68k_frame_base_address): Expect this_frame.
6627 (m68k_dummy_id): Renamed from m68k_unwind_dummy_id. Expect
6628 this_frame.
6629 (m68k_gdbarch_init): Use set_gdbarch_dummy_id,
6630 dwarf2_append_unwinders, and frame_unwind_append_unwinder.
6631 * m68klinux-tdep.c (m68k_linux_pc_in_sigtramp): Expect frame_info
6632 parameter instead of pc value.
6633 (m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
6634 Expect this_frame.
6635 (m68k_linux_sigtramp_frame_this_id)
6636 (m68k_linux_sigtramp_frame_prev_register)
6637 (m68k_linux_sigtramp_frame_sniffer): Update signature.
6638 (m68k_linux_sigtramp_frame_unwind): Use
6639 m68k_linux_sigtramp_frame_sniffer.
6640 (m68k_linux_init_abi): Use frame_unwind_append_unwinder.
6641
6642 * m68klinux-nat.c (store_register): Fix typo.
6643
6644 2008-05-05 Pedro Alves <pedro@codesourcery.com>
6645
6646 * infcmd.c (step_1): Put thread id on the stack to avoid possible
6647 NULL dereferencing.
6648
6649 2008-05-05 Luis Machado <luisgpm@br.ibm.com>
6650
6651 * symfile.c (reread_symbols): Update objfile's entry point.
6652
6653 2008-05-05 Aleksandar Ristovski <aristovski@qnx.com>
6654 Joel Brobecker <brobecker@adacore.com>
6655
6656 * ada-lang.c: Update throughout to use symbol_matches_domain
6657 instead of matching the symbol domain explictly.
6658 * dwarf2read.c (add_partial_symbol): Do not add new psym for
6659 STRUCT_DOMAIN. Make sure you recognize c++ struct and java and ada
6660 class as typedefs. See lookup_partial_symbol function.
6661 (new_symbol): Similar to add_partial_symbol, do not create
6662 symbol for the typedef. See lookup_block_symbol.
6663 * symtab.c (symbol_matches_domain): New function, takes care
6664 of dual meaning of STRUCT_DOMAIN symbol for c++, ada and java.
6665 (lookup_partial_symbol): Use symbol_matches_domain to see if the
6666 found psym domain matches the given domain.
6667 (lookup_block_symbol): Likewise.
6668
6669 2008-05-05 Vladimir Prus <vladimir@codesourcery.com>
6670
6671 * top.c (command_line_handler_continuation): Remove.
6672 (execute_command): Do not install the above.
6673
6674 2008-05-05 Vladimir Prus <vladimir@codesourcery.com>
6675
6676 * inf-loop.c (inferior_event_handler): Call bpstat_do_action,
6677 and catch all exceptions from it.
6678 * top.c (command_line_handler_continuation): Don't
6679 call bpstat_do_action here.
6680
6681 2008-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6682
6683 * dwarf2read.c (struct dwarf2_cu): Add type_hash.
6684 (struct die_info): Remove type.
6685 (read_type_die, read_typedef, read_base_type, read_subrange_type)
6686 (read_structure_type, read_enumeration_type, read_array_type)
6687 (read_tag_pointer_type, read_tag_ptr_to_member_type)
6688 (read_tag_reference_type, read_tag_const_type, read_tag_volatile_type)
6689 (read_tag_string_type, read_subroutine_type, read_set_type)
6690 (read_unspecified_type): Delete prototypes. Remove check for
6691 already-loaded type. Return the new type.
6692 (set_die_type): Return the new type.
6693 (reset_die_and_siblings_types): Delete.
6694 (load_comp_unit, load_full_comp_unit): Set type_hash.
6695 (process_queue): Remove call to reset_die_and_siblings_types.
6696 (process_die): Do not read most types here. Use read_type_die
6697 for others.
6698 (read_func_scope, dwarf2_add_member_fn): Use read_type_die.
6699 (quirk_gcc_member_function_pointer): Return the new type.
6700 (process_structure_scope, process_enumeration_scope): Use
6701 get_die_type and read the DIE's type.
6702 (read_full_die): Do not initialize die->type.
6703 (tag_type_to_type): Use read_type_die.
6704 (read_type_die): Check for already defined types. Return the
6705 type.
6706 (determine_prefix): Use get_die_type.
6707 (set_die_type): Return the type.
6708 (get_die_type): Take a CU argument. Check for no type_hash.
6709
6710 2008-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6711
6712 * dwarf2read.c (dwarf2_ranges_read, read_partial_die): Initialize
6713 locals.
6714
6715 2008-05-04 Pedro Alves <pedro@codesourcery.com>
6716
6717 * breakpoint.c (update_breakpoints_after_exec): Delete bp_longjmp
6718 and bp_longjmp_resume breakpoints.
6719 (breakpoint_address_is_meaningful): Claim bp_longjmp_resume as
6720 meaningful.
6721 (create_longjmp_breakpoint): Don't create bp_longjmp_resume
6722 breakpoints. Create bp_longjmp breakpoints as momentary
6723 breakpoints.
6724 (enable_longjmp_breakpoint): Delete.
6725 (set_longjmp_breakpoint): New.
6726 (disable_longjmp_breakpoint): Delete.
6727 (delete_longjmp_breakpoint): New.
6728 (set_longjmp_resume_breakpoint): Delete.
6729 (set_momentary_breakpoint_at_pc): New.
6730 (breakpoint_re_set_one): Don't delete bp_longjmp and
6731 bp_longjmp_resume breakpoints.
6732 (breakpoint_re_set): Don't create longjmp and longjmp-resume
6733 breakpoints.
6734
6735 * infrun.c (step_resume_breakpoint): Add comment.
6736 (struct execution_control_state): Delete handling_longjmp member.
6737 (init_execution_control_state). Don't clear handling_longjmp.
6738 (context_switch): Don't context switch handling_longjmp.
6739 (handle_inferior_event): If handling a bp_longjmp breakpoint,
6740 create a bp_longjmp_resume breakpoint, and set it as current
6741 step_resume_breakpoint, then step over the longjmp breakpoint. If
6742 handling a bp_longjmp_resume breakpoint, don't delete the longjmp
6743 breakpoint, delete the longjmp-resume breakpoint, and stop
6744 stepping.
6745 (currently_stepping): Remove handling_longjmp from expression.
6746 (insert_step_resume_breakpoint_at_sal): Update comment.
6747 (insert_longjmp_resume_breakpoint): New.
6748
6749 * breakpoint.h (set_momentary_breakpoint_at_pc): Declare.
6750 (enable_longjmp_breakpoint, disable_longjmp_breakpoint): Delete
6751 declarations.
6752 (set_longjmp_breakpoint, delete_longjmp_breakpoint): Declare.
6753 (set_longjmp_resume_breakpoint): Delete declaration.
6754
6755 * gdbthread.h (save_infrun_state): Remove handling_longjmp
6756 parameter.
6757 (load_infrun_state): Delete *handling_longjmp parameter.
6758 * thread.c (save_infrun_state): Remove handling_longjmp parameter.
6759 Update body.
6760 (load_infrun_state): Delete *handling_longjmp parameter. Update
6761 body.
6762
6763 * infcmd.c (disable_longjmp_breakpoint_cleanup): Delete.
6764 (delete_longjmp_breakpoint_cleanup): New.
6765 (step_1): Call set_longjmp_breakpoint instead of
6766 enable_longjmp_breakpoint. Use delete_longjmp_breakpoint_cleanup
6767 instead of disable_longjmp_breakpoint_cleanup when making cleanup.
6768 (step_1_continuation): Pass thread id in the continuation args to
6769 step_once.
6770 (step_once): Add thread parameter. Pass thread id the the
6771 continuation.
6772
6773 2008-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6774
6775 Set CU BASE_ADDRESS already from partial DIEs.
6776 * dwarf2read.c (read_partial_die): New variables BASE_ADDRESS and
6777 BASE_ADDRESS_TYPE. Set these variables from DW_AT_LOW_PC and
6778 DW_AT_ENTRY_PC. Set CU->HEADER.BASE_KNOWN and CU->HEADER.BASE_ADDRESS
6779 from these variables if it was still unset.
6780
6781 * Makefile.in: Update dependencies.
6782 * dwarf2read.c: Include "addrmap.h"
6783 (struct dwarf2_cu): New fields RANGES_OFFSET and HAS_RANGES_OFFSET.
6784 (dwarf2_ranges_read): New prototype.
6785 (dwarf2_build_psymtabs_hard): Initialize and prepare PSYMTABS_ADDRMAP.
6786 Add discontiguous range to PSYMTABS_ADDRMAP by DWARF2_RANGES_READ on
6787 HAS_RANGES_OFFSET, otherwise add there the contiguous range.
6788 (dwarf2_ranges_read): New parameter RANGES_PST, update the function
6789 comment for it. Add the found ranges to RANGES_PST. New variable
6790 BASEADDR, initialize it the common way.
6791 (dwarf2_get_pc_bounds): Update the caller for the new parameter.
6792 (read_partial_die): `DW_AT_ranges' now only sets RANGES_OFFSET and
6793 HAS_RANGES_OFFSET for the later processing.
6794 * objfiles.h (struct objfile): New field PSYMTABS_ADDRMAP.
6795 * symtab.c: Include "addrmap.h"
6796 (find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
6797 Move the psymtab locator into ...
6798 (find_pc_sect_psymtab_closer): ... a new function.
6799
6800 2008-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6801
6802 * arch-utils.c (gdbarch_update_p): Use default values for
6803 info.abfd and info.target_desc if they are NULL.
6804 (gdbarch_from_bfd): Remove assertion.
6805 (set_gdbarch_from_file): Call gdbarch_find_by_info directly,
6806 using the current target description.
6807 (gdbarch_info_fill): Do not use default values for info->abfd
6808 and info->target_desc.
6809
6810 2008-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6811
6812 * symfile.c (reread_symbols): Reload EXEC_BFD on its change.
6813
6814 2008-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6815
6816 * inferior.h (read_pc_pid, write_pc_pid): Remove.
6817 * regcache.h (regcache_read_pc, regcache_write_pc): Add prototypes.
6818
6819 * regcache.c (read_pc_pid): Remove, replace by ...
6820 (regcache_read_pc): ... this function.
6821 (write_pc_pid): Remove, replace by ...
6822 (regcache_write_pc): ... this function.
6823 (read_pc, write_pc): Update.
6824
6825 * infrun.c (displaced_step_prepare): Replace read_pc_pid and
6826 write_pc_pid by regcache_read_pc and regcache_write_pc.
6827 (displaced_step_fixup): Likewise.
6828 (resume): Likewise. Use regcache arch instead of current_gdbarch.
6829 (prepare_to_proceed): Likewise.
6830 (proceed): Likewise.
6831 (adjust_pc_after_break): Likewise.
6832 (handle_inferior_event): Likewise.
6833
6834 * linux-nat.c (cancel_breakpoint): Likewise.
6835 * linux-thread-db.c (check_event): Likewise.
6836 * aix-thread.c (aix_thread_wait): Likewise.
6837 * tracepoint.c (trace_dump_command): Likewise.
6838
6839 2008-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6840
6841 * dwarf2loc.c (dwarf_expr_frame_base): Error out on missing
6842 SYMBOL_LOCATION_BATON.
6843
6844 2008-05-04 Vladimir Prus <vladimir@codesourcery.com>
6845
6846 * target.h (struct target_ops): New field to_auxv_parse.
6847 * auxv.c (default_auxv_parse): New, renamed from previous
6848 target_auxv_parse.
6849 (target_auxv_parse): Try to call target method. Fallback to
6850 default_auxv_parse if not found.
6851 * procfs.c (procfs_auxv_parse): New.
6852 (init_procfs_ops): On Solaris, in 64-bit mode, install
6853 procfs_auxv_parse.
6854
6855 2008-05-03 Adam Nemet <anemet@caviumnetworks.com>
6856
6857 * symfile.c (add_symbol_file_command): Use paddress rather than
6858 hex_string to print the address.
6859
6860 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6861
6862 * rs6000-tdep.c (rs6000_frame_this_id): If info->base is 0,
6863 return the null frame ID to terminate the backtrace.
6864
6865 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6866
6867 * rs6000-tdep.c: Do not include "rs6000-tdep.h".
6868 (rs6000_find_toc_address_hook): Move to rs6000-aix-tdep.c.
6869 (SIG_FRAME_PC_OFFSET): Likewise.
6870 (SIG_FRAME_LR_OFFSET): Likewise.
6871 (SIG_FRAME_FP_OFFSET): Likewise.
6872 (rs6000_push_dummy_call): Likewise.
6873 (rs6000_return_value): Likewise.
6874 (rs6000_convert_from_func_ptr_addr): Likewise.
6875 (branch_dest, rs6000_software_single_step): Likewise.
6876 (deal_with_atomic_sequence): Rename to ...
6877 (ppc_deal_with_atomic_sequence): ... this. Adapt all callers.
6878 Do not call branch_dest; inline required parts of that function.
6879 (rs6000_skip_trampoline_code): Replace DEPRECATED_SYMBOL_NAME
6880 with SYMBOL_LINKAGE_NAME.
6881 (struct reg, regsize): Delete.
6882 (read_memory_addr): Delete; inline into callers.
6883 (rs6000_skip_prologue): Move after skip_prologue.
6884 (skip_prologue): Remove prototype.
6885 (rs6000_gdbarch_init): Remove sysv_abi variable; perform all
6886 initialization as if this variable were true. Do not install
6887 ppc64_sysv_abi_adjust_breakpoint_address.
6888
6889 * rs6000-aix-tdep.c: Include "gdb_assert.h", "gdbtypes.h",
6890 "gdbcore.h", "target.h", "value.h", "infcall.h", "objfiles.h",
6891 and "breakpoint.h".
6892 (rs6000_find_toc_address_hook): Move here from rs6000-tdep.c.
6893 (SIG_FRAME_PC_OFFSET): Likewise.
6894 (SIG_FRAME_LR_OFFSET): Likewise.
6895 (SIG_FRAME_FP_OFFSET): Likewise.
6896 (rs6000_push_dummy_call): Likewise.
6897 (rs6000_return_value): Likewise.
6898 (rs6000_convert_from_func_ptr_addr): Likewise.
6899 (branch_dest, rs6000_software_single_step): Likewise. Replace
6900 tdep->text_segment_base by AIX_TEXT_SEGMENT_BASE.
6901 (rs6000_aix_init_osabi): Install rs6000_push_dummy_call,
6902 rs6000_return_value, and rs6000_convert_from_func_ptr_addr.
6903 Call set_gdbarch_long_double_bit and set_gdbarch_frame_red_zone_size.
6904 Set tdep->lr_frame_offset. Do not set tdep->text_segment_base.
6905
6906 * rs6000-tdep.h (rs6000_software_single_step): Remove prototype.
6907 (AIX_TEXT_SEGMENT_BASE): New macro.
6908 * rs6000-nat.c (exec_one_dummy_insn): Replace tdep->text_segment_base
6909 by AIX_TEXT_SEGMENT_BASE.
6910
6911 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Add prototype.
6912 (struct gdbarch_tdep): Remove text_segment_base member.
6913 * ppc-linux-tdep.c (ppc_linux_init_abi): On 64-bit, install
6914 ppc64_sysv_abi_adjust_breakpoint_address.
6915
6916 * Makefile.in (rs6000-tdep.o): Update dependencies.
6917 (rs6000-aix-tdep.o): Likewise.
6918
6919 2008-05-03 Luis Machado <luisgpm@br.ibm.com>
6920 Thiago Jung Bauermann <bauerman@br.ibm.com>
6921
6922 * cli/cli-decode.c (lookup_cmd_1): Fix indentation.
6923 * doublest.c (convert_typed_floating): Fix typo in comment.
6924 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
6925 * frame-unwind.h (frame_sniffer_ftype): Likewise.
6926 * frame.c (frame_unwind_address_in_block): Likewise.
6927 * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Likewise.
6928 * symtab.h (struct symbol): Likewise.
6929 * tramp-frame.h (struct trad_frame_cache): Likewise.
6930 * value.c (allocate_repeat_value): Likewise.
6931
6932 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6933
6934 * infrun.c (handle_inferior_event): Do not insert breakpoints at
6935 TARGET_WAITKIND_LOADED events during startup (i.e. in the shell).
6936
6937 2008-05-03 Pedro Alves <pedro@codesourcery.com>
6938
6939 * parse.c (parse_exp_in_context): Don't override
6940 expression_context_pc if get_selected_block returned a valid
6941 block.
6942
6943 2008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
6944
6945 * alpha-tdep.h (ALPHA_REGISTER_BYTES): Delete.
6946 * arm-tdep.h (STATUS_REGISTER_SIZE): Delete.
6947 * breakpoint.c (args_for_catchpoint_enable, current_exception_event):
6948 Delete.
6949 * c-typeprint.c (c_type_print_base): Delete handling of template
6950 instantiations.
6951 * cp-support.h (METHOD_PTR_IS_VIRTUAL, METHOD_PTR_FROM_VOFFSET)
6952 (METHOD_PTR_TO_VOFFSET): Delete.
6953 * defs.h (QUIT_FIXME): Delete.
6954 * f-lang.h (DEFAULT_DOTMAIN_NAME_IN_MF77, DEFAULT_MAIN_NAME_IN_MF77)
6955 (DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY, DEFAULT_DOTMAIN_NAME_IN_XLF): Delete.
6956 * gdbtypes.h (struct cplus_struct_type): Delete is_inlined,
6957 ninstantiations, and instantiations.
6958 (TYPE_INSTANTIATIONS, TYPE_NINSTANTIATIONS, TYPE_INSTANTIATION)
6959 (TYPE_FN_FIELD_INLINED): Delete.
6960 * srec.h (SREC_BINARY): Delete.
6961 * symtab.c (symbol_init_demangled_name): Delete.
6962 * symtab.h (SYMBOL_INIT_DEMANGLED_NAME, symbol_init_demangled_name)
6963 (SYMBOL_OBJFILE, struct exception_event_record, CURRENT_EXCEPTION_KIND)
6964 (CURRENT_EXCEPTION_CATCH_SAL, CURRENT_EXCEPTION_CATCH_LINE)
6965 (CURRENT_EXCEPTION_CATCH_FILE, CURRENT_EXCEPTION_CATCH_PC)
6966 (CURRENT_EXCEPTION_THROW_SAL, CURRENT_EXCEPTION_THROW_LINE)
6967 (CURRENT_EXCEPTION_THROW_FILE, CURRENT_EXCEPTION_THROW_PC): Delete.
6968 * target.h (enum thread_control_capabilities): Delete tc_switch.
6969 (target_can_switch_threads): Delete.
6970
6971 2008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
6972
6973 * Makefile.in (objfiles.o): Update.
6974 * exec.c (exec_set_section_address): Support p->addr != 0.
6975 * objfiles.c (objfile_relocate): Update exec_ops section
6976 addresses.
6977 * symfile.c (place_section): Move exec_set_section_address call...
6978 (default_symfile_offsets): ...to here.
6979
6980 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6981
6982 * Makefile.in (ppc_linux_tdep_h): New macro.
6983 (powerpc_32l_c, powerpc_altivec32_c, powerpc_altivec32l_c): Likewise.
6984 (powerpc_64l_c, powerpc_altivec64_c, powerpc_altivec64l_c): Likewise.
6985 (powerpc_e500l_c): Likewise.
6986 (ppc-linux-nat.o): Update dependencies.
6987 (ppc-linux-tdep.o): Update dependencies.
6988 (rs6000-tdep.o): Update dependencies.
6989
6990 * ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Remove.
6991 (ppc_linux_svr4_fetch_link_map_offsets): Remove.
6992 (ppc_linux_gregset, ppc_linux_fpregset): Move to ppc-linux-tdep.h
6993 (ppc_supply_reg, ppc_collect_reg): Add prototypes.
6994 (tdesc_powerpc_e500): Remove.
6995
6996 * rs6000.c: Include "features/rs6000/powerpc-altivec32.c"
6997 and "features/rs6000/powerpc-altivec64.c".
6998 (ppc_supply_reg, ppc_collect_reg): Make global.
6999 (variants): Use tdesc_powerpc_32 for "powerpc" and
7000 tdesc_powerpc_altivec64 for "powerpc64".
7001 (_initialize_rs6000_tdep): Initialize AltiVec descriptions.
7002
7003 * ppc-linux-tdep.h: New file.
7004
7005 * ppc-linux-tdep.c: Include "ppc-linux-tdep.c".
7006 Include "features/rs6000/powerpc-32l.c".
7007 Include "features/rs6000/powerpc-altivec32l.c".
7008 Include "features/rs6000/powerpc-64l.c".
7009 Include "features/rs6000/powerpc-altivec64l.c".
7010 Include "features/rs6000/powerpc-e500l.c".
7011 (ppc_linux_supply_gregset): New function.
7012 (ppc_linux_collect_gregset): Handle orig_r3 and trap registers.
7013 (ppc32_linux_gregset): Use ppc_linux_supply_gregset.
7014 (ppc64_linux_gregset): Likewise.
7015 (ppc_linux_sigtramp_cache): Handle orig_r3 and trap registers.
7016 (ppc_linux_trap_reg_p): New function.
7017 (ppc_linux_write_pc): New function.
7018 (ppc_linux_core_read_description): New function.
7019 (ppc_linux_init_abi): Install ppc_linux_write_pc and
7020 ppc_linux_core_read_description. Install orig_r3 and trap
7021 registers if present in the target description.
7022 (_initialize_ppc_linux_tdep): Initialize Linux target descriptions.
7023
7024 * ppc-linux-nat.c: Include "ppc-linux-tdep.h".
7025 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7026 (ppc_register_u_addr): Handle orig_r3 and trap registers.
7027 (fetch_ppc_registers): Likewise.
7028 (store_ppc_registers): Likewise.
7029 (store_register): Likewise.
7030 (ppc_linux_read_description): Check whether AltiVec is supported.
7031 Check whether inferior is 32-bit or 64-bit. Return the appropriate
7032 Linux target description.
7033
7034 * features/Makefile (WHICH): Use rs6000/powerpc-32l and
7035 rs6000/powerpc-altivec32l instead of rs6000/powerpc-32.
7036 Use rs6000/powerpc-64l and rs6000/powerpc-altivec64l instead
7037 of rs6000/powerpc-64. Use rs6000/powerpc-e500l instead of
7038 rs6000/powerpc-e500. Update -expedite variables accordingly.
7039
7040 * features/rs6000/power-spe.xml: Use regnum 73 for "acc".
7041 * features/rs6000/powerpc-32.xml: Do not include power-altivec.xml.
7042 * features/rs6000/powerpc-64.xml: Do not include power-altivec.xml.
7043 * features/rs6000/powerpc-e500.c: Regenerate.
7044 * features/rs6000/powerpc-32.c: Regenerate.
7045 * features/rs6000/powerpc-64.c: Regenerate.
7046
7047 * features/rs6000/power-linux.xml: New file.
7048 * features/rs6000/power64-linux.xml: New file.
7049 * features/rs6000/powerpc-32l.xml: New file.
7050 * features/rs6000/powerpc-altivec32l.xml: New file.
7051 * features/rs6000/powerpc-64l.xml: New file.
7052 * features/rs6000/powerpc-altivec64l.xml: New file.
7053 * features/rs6000/powerpc-e500l.xml: New file.
7054 * features/rs6000/powerpc-32l.c: New (generated) file.
7055 * features/rs6000/powerpc-altivec32l.c: New (generated) file.
7056 * features/rs6000/powerpc-64l.c: New (generated) file.
7057 * features/rs6000/powerpc-altivec64l.c: New (generated) file.
7058 * features/rs6000/powerpc-e500l.xml: New (generated) file.
7059
7060 * regformats/reg-ppc.dat: Remove.
7061 * regformats/reg-ppc64.dat: Remove.
7062 * regformats/rs6000/powerpc-32.dat: Remove.
7063 * regformats/rs6000/powerpc-64.dat: Remove.
7064 * regformats/rs6000/powerpc-e500.dat: Remove.
7065 * regformats/rs6000/powerpc-32l.dat: New (generated) file.
7066 * regformats/rs6000/powerpc-altivec32l.dat: New (generated) file.
7067 * regformats/rs6000/powerpc-64l.dat: New (generated) file.
7068 * regformats/rs6000/powerpc-altivec64l.dat: New (generated) file.
7069 * regformats/rs6000/powerpc-e500l.dat: New (generated) file.
7070
7071 2008-05-03 Pedro Alves <pedro@codesourcery.com>
7072
7073 * thread.c (delete_thread): Call observer_notify_thread_exit.
7074 * mi/mi-interp.c (mi_interpreter_init): Register mi_thread_exit as
7075 thread_exit observer.
7076 (mi_thread_exit): New.
7077
7078 2008-05-03 Thiago Jung Bauermann <bauerman@br.ibm.com>
7079
7080 * breakpoint.c (create_exception_catchpoint): Remove prototype
7081 for already deleted function.
7082 * breakpoint.h (ep_is_exception_catchpoint): Likewise.
7083 * frame.h (show_stack_frame): Remove prototype.
7084 * stack.c (show_stack_frame): Remove empty, unused function.
7085 * source.c (symtab_to_fullname, print_source_lines): Small fix
7086 in comment.
7087 * value.c (show_values): Update comments to mention "show values"
7088 command instead of "info history".
7089
7090 2008-05-02 Ulrich Weigand <uweigand@de.ibm.com>
7091
7092 * linespec.c: Include "target.h".
7093 (minsym_found): Handle minimal symbols pointing to function
7094 descriptors. Use find_function_start_pc.
7095 * minsyms.c (msymbol_objfile): New function.
7096 * parse.c (write_exp_msymbol): Handle minimal symbols pointing
7097 to function descriptors.
7098 * symtab.c (fixup_section): Only use minimal symbol at the same
7099 address to determine section of a symbol.
7100 (find_function_start_pc): New function.
7101 (find_function_start_sal): Use it.
7102 * symtab.h (msymbol_objfile): Add prototype.
7103 (find_function_start_pc): Likewise.
7104 * value.c: Include "objfiles.h".
7105 (value_fn_field): Handle minimal symbols pointing to function
7106 descriptors.
7107 * Makefile.in (linespec.o): Update dependencies.
7108 (value.o): Likewise.
7109
7110 2008-05-02 Joel Brobecker <brobecker@adacore.com>
7111
7112 * ada-lang.c (unwrap_value): Handle the case where the "F" field
7113 inside a PAD type is a bitfield.
7114
7115 2008-05-02 Ulrich Weigand <uweigand@de.ibm.com>
7116
7117 * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Handle
7118 TYPE_CODE_BOOL and TYPE_CODE_CHAR the same as TYPE_CODE_INT.
7119 Handle TYPE_CODE_REF the same as TYPE_CODE_PTR.
7120 Handle TYPE_CODE_METHOD the same as TYPE_CODE_FUNC.
7121 Allow typedefs when checking for function pointer arguments.
7122 Right-align small structs passed on the stack.
7123 (ppc64_sysv_abi_return_value): Handle TYPE_CODE_BOOL and
7124 TYPE_CODE_CHAR the same as TYPE_CODE_INT.
7125 Handle TYPE_CODE_REF the same as TYPE_CODE_PTR.
7126
7127 2008-05-02 Daniel Jacobowitz <dan@codesourcery.com>
7128
7129 * Makefile.in (arm-tdep.o): Update.
7130 * arm-tdep.c (arm_objfile_data_key, struct arm_mapping_symbol)
7131 (struct arm_per_objfile, arm_compare_mapping_symbols): New.
7132 (arm_pc_is_thumb): Use mapping symbols.
7133 (arm_objfile_data_cleanup, arm_record_special_symbol): New.
7134 (arm_gdbarch_init): Call set_gdbarch_record_special_symbol.
7135 (_initialize_arm_tdep): Initialize arm_objfile_data_key.
7136 * elfread.c (elf_symtab_read): Use gdbarch_record_special_symbol.
7137 * gdbarch.sh: Add record_special_symbol.
7138 * gdbarch.c, gdbarch.h: Regenerated.
7139 * objfiles.c (struct objfile_data): Add cleanup member.
7140 (register_objfile_data_with_cleanup): New function, from
7141 register_objfile_data.
7142 (register_objfile_data): Use it.
7143 (objfile_free_data): Call clear_objfile_data.
7144 (clear_objfile_data): Call cleanup functions.
7145 * objfiles.h (register_objfile_data_with_cleanup): Declare.
7146
7147 2008-05-02 Daniel Jacobowitz <dan@codesourcery.com>
7148
7149 * objfiles.c (init_entry_point_info): Handle shared libraries.
7150
7151 2008-05-02 Daniel Jacobowitz <dan@codesourcery.com>
7152
7153 * arm-tdep.c (arm_prologue_this_id): Compare pc, not func, to
7154 lowest_pc.
7155
7156 2008-05-02 Jim Blandy <jimb@codesourcery.com>
7157 Pedro Alves <pedro@codesourcery.com>
7158
7159 Implement displaced stepping.
7160
7161 * gdbarch.sh (max_insn_length): New 'variable'.
7162 (displaced_step_copy, displaced_step_fixup)
7163 (displaced_step_free_closure, displaced_step_location): New
7164 functions.
7165 (struct displaced_step_closure): Add forward declaration.
7166 * gdbarch.c, gdbarch.h: Regenerated.
7167
7168 * arch-utils.c: #include "objfiles.h".
7169 (simple_displaced_step_copy_insn)
7170 (simple_displaced_step_free_closure)
7171 (displaced_step_at_entry_point): New functions.
7172 * arch-utils.h (simple_displaced_step_copy_insn)
7173 (simple_displaced_step_free_closure)
7174 (displaced_step_at_entry_point): New prototypes.
7175
7176 * i386-tdep.c (I386_MAX_INSN_LEN): Rename to...
7177 (I386_MAX_MATCHED_INSN_LEN): ... this.
7178 (i386_absolute_jmp_p, i386_absolute_call_p)
7179 (i386_ret_p, i386_call_p, i386_breakpoint_p, i386_syscall_p)
7180 (i386_displaced_step_fixup): New functions.
7181 (struct i386_insn, i386_match_insn): Update.
7182 (i386_gdbarch_init): Set gdbarch_max_insn_length.
7183 * i386-tdep.h (I386_MAX_INSN_LEN): New.
7184 (i386_displaced_step_fixup): New prototype.
7185 * i386-linux-tdep.c (i386_linux_init_abi): Include "arch-utils.h".
7186 Register gdbarch_displaced_step_copy,
7187 gdbarch_displaced_step_fixup, gdbarch_displaced_step_free_closure,
7188 and gdbarch_displaced_step_location functions.
7189
7190 * infrun.c (debug_displaced): New variable.
7191 (show_debug_displaced): New function.
7192 (struct displaced_step_request): New struct.
7193 (displaced_step_request_queue, displaced_step_ptid)
7194 (displaced_step_gdbarch, displaced_step_closure)
7195 (displaced_step_original, displaced_step_copy)
7196 (displaced_step_saved_copy, can_use_displaced_stepping): New
7197 variables.
7198 (show_can_use_displaced_stepping, use_displaced_stepping)
7199 (displaced_step_clear, cleanup_displaced_step_closure)
7200 (displaced_step_dump_bytes, displaced_step_prepare)
7201 (displaced_step_clear_cleanup, write_memory_ptid)
7202 (displaced_step_fixup): New functions.
7203 (resume): Call displaced_step_prepare.
7204 (proceed): Call read_pc once, and remember the value. If using
7205 displaced stepping, don't remove breakpoints.
7206 (handle_inferior_event): Call displaced_step_fixup. Add some
7207 debugging output. When we try to step over a breakpoint, but get
7208 a signal to deliver to the thread instead, ensure the step-resume
7209 breakpoint is actually inserted. If a thread hop is needed, and
7210 displaced stepping is enabled, don't remove breakpoints.
7211 (init_wait_for_inferior): Call displaced_step_clear.
7212 (_initialize_infrun): Add "set debug displaced" command. Add
7213 "maint set can-use-displaced-stepping" command. Clear
7214 displaced_step_ptid.
7215 * inferior.h (debug_displaced): Declare variable.
7216 (displaced_step_dump_bytes): Declare function.
7217
7218 * Makefile.in (arch-utils.o, i386-linux-tdep.o): Update
7219 dependencies.
7220
7221 2008-05-02 Daniel Jacobowitz <dan@codesourcery.com>
7222
7223 * arm-tdep.c (arm_mode_strings, arm_fallback_mode_string)
7224 (arm_force_mode_string, arm_show_fallback_mode)
7225 (arm_show_force_mode): New.
7226 (arm_pc_is_thumb): Honor fallback-mode and force-mode. Use
7227 arm_frame_is_thumb.
7228 (_initialize_arm_tdep): Add "set arm fallback-mode"
7229 and "set arm force-mode".
7230 * NEWS: Document new commands.
7231
7232 2008-05-02 Andrew Stubbs <andrew.stubbs@st.com>
7233
7234 * main.h (batch_silent): Declare.
7235 * event-top.c: Include main.h.
7236 (gdb_setup_readline): Remove extern batch_silent declaration.
7237 * infrun.c (normal_stop): Don't print source location when running in
7238 --batch-silent mode.
7239 * Makefile.in (event-top.o): Add main.h dependency.
7240
7241 2008-05-02 Andreas Schwab <schwab@suse.de>
7242
7243 * target.h (struct target_ops): Add
7244 to_watchpoint_addr_within_range.
7245 (target_watchpoint_addr_within_range): New function.
7246 * target.c (update_current_target): Inherit
7247 to_watchpoint_addr_within_range, defaulting to
7248 default_watchpoint_addr_within_range.
7249 (default_watchpoint_addr_within_range): New function.
7250 (debug_to_watchpoint_addr_within_range): New function.
7251 (setup_target_debug): Set to_watchpoint_addr_within_range.
7252 * ppc-linux-nat.c (ppc_linux_watchpoint_addr_within_range):
7253 New function.
7254 (_initialize_ppc_linux_nat): Set to_watchpoint_addr_within_range.
7255 * breakpoint.c (watchpoints_triggered): Use
7256 target_watchpoint_addr_within_range.
7257
7258 2008-05-01 Pedro Alves <pedro@codesourcery.com>
7259
7260 * configure.tgt: Add i[34567]86-*-dicos* and x86_64-*-dicos*.
7261 (i[34567]86-*-dicos*, x86_64-*-dicos*):
7262 Set gdb_osabi to GDB_OSABI_DICOS.
7263
7264 * defs.h (enum gdb_osabi): Add GDB_OSABI_DICOS.
7265 * osabi.c (gdb_osabi_name): Add "DICOS".
7266
7267 * i386-dicos-tdep.c: New file.
7268
7269 * Makefile.in (ALL_TARGET_OBS): Add i386-dicos-tdep.o.
7270 (ALLDEPFILES): Add i386-dicos-tdep.c.
7271 (i386-dicos-tdep.o): New rule.
7272
7273 2008-05-01 Pedro Alves <pedro@codesourcery.com>
7274
7275 * linux-nat.c (linux_nat_switch_fork): Reinit GDB's thread list
7276 and register the fork's PTID as a thread.
7277
7278 2008-05-01 Aleksandar Ristovski <aristovski@qnx.com>
7279
7280 PR gdb/1665
7281 * breakpoint.c (create_breakpoint): Add breakpoint_ops argument and
7282 assign its value to the breakpoint created.
7283 (create_breakpoints): Add breakpoint_ops argument and pass it
7284 to create_breakpoint call.
7285 (break_command_really): Add breakpoint_ops argument and pass/assign
7286 appropriately.
7287 (break_command_1): Pass NULL as ops argument.
7288 (set_breakpoint): Pass NULL as ops argument.
7289 (print_one_exception_catchpoint): Print <PENDING> if no loc available.
7290 (handle_gnu_v3_exceptions): Call generic breakpoint code to insert
7291 catch and throw catchpoints.
7292
7293 2008-05-01 Aleksandar Ristovski <aristovski@qnx.com>
7294
7295 PR gdb/2343
7296 * corelow.c (core_open): Use gdbarch_target_signal_from_host to
7297 translate signal numeric value from the target to GDB's enum
7298 target_signal.
7299 * gdbarch.c, gdbarch.h: Regenerated.
7300 * gdbarch.sh: Added two new functions target_signal_from_host and
7301 target_signal_to_host.
7302 * target.h (default_target_signal_from_host,
7303 default_target_signal_to_host): New functions - declarations.
7304 * signals/signals.c (struct gdbarch): New declaration.
7305 (default_target_signal_to_host, default_target_signal_from_host): New
7306 functions.
7307
7308 2008-05-01 Daniel Jacobowitz <dan@codesourcery.com>
7309 Pedro Alves <pedro@codesourcery.com>
7310
7311 Based on work by Jan Kratochvil <jan.kratochvil@redhat.com> and Jeff
7312 Johnston <jjohnstn@redhat.com>.
7313
7314 * NEWS: Mention attach to stopped process fix.
7315 * infcmd.c (detach_command, disconnect_command): Discard the thread
7316 list.
7317 * infrun.c (handle_inferior_event): Do not ignore non-SIGSTOP while
7318 attaching. Use signal_stop_state.
7319 (signal_stop_state): Check stop_soon.
7320 * linux-nat.c (kill_lwp): Declare earlier.
7321 (pid_is_stopped, linux_nat_post_attach_wait): New.
7322 (lin_lwp_attach_lwp): Use linux_nat_post_attach_wait. Update
7323 comments.
7324 (linux_nat_attach): Use linux_nat_post_attach_wait.
7325 (detach_callback, linux_nat_detach): Improve handling for signalled
7326 processes.
7327 (linux_nat_pid_to_str): Always print out the LWP ID if it differs
7328 from the process ID.
7329 * Makefile.in (infcmd.o): Update.
7330
7331 2008-05-01 Daniel Jacobowitz <dan@codesourcery.com>
7332
7333 * arm-linux-tdep.h (ARM_CPSR_REGNUM): Delete definition.
7334 * arm-tdep.c (arm_frame_is_thumb): New.
7335 (arm_pc_is_thumb): Clarify comment.
7336 (thumb_analyze_prologue): Remove PC special case.
7337 (thumb_scan_prologue): Take a block_addr argument. Use it for
7338 find_pc_partial_function. Remove unused variables.
7339 (arm_scan_prologue): Use arm_frame_is_thumb. Use the block address
7340 for find_pc_partial_function. Remove PC special case.
7341 (arm_prologue_prev_register): Add special handling for PC and CPSR.
7342 (arm_dwarf2_prev_register, arm_dwarf2_frame_init_reg): New.
7343 (arm_get_next_pc): Use arm_frame_is_thumb.
7344 (arm_write_pc): Use CPSR_T instead of 0x20.
7345 (arm_gdbarch_init): Call dwarf2_frame_set_init_reg.
7346 * arm-tdep.h (enum gdb_regnum): Add ARM_CPSR_REGNUM.
7347 (CPSR_T): Define.
7348 * dwarf2-frame.c (dwarf2_frame_prev_register): Handle
7349 DWARF2_FRAME_REG_FN.
7350 * dwarf2-frame.h (enum dwarf2_frame_reg_rule): Add
7351 DWARF2_FRAME_REG_FN.
7352 (struct dwarf2_frame_state_reg): Add FN to loc union.
7353
7354 2008-05-01 Nick Roberts <nickrob@snap.net.nz>
7355
7356 * exec.c (print_section_info): Add missing '\n'.
7357
7358 2008-05-01 Vladimir Prus <vladimir@codesourcery.com>
7359
7360 * thread.c (add_thread): Move observer call to ...
7361 (add_thread_silent): ... here.
7362
7363 2008-04-30 Ulrich Weigand <uweigand@de.ibm.com>
7364
7365 * rs6000-tdep.c: Update for unwinder changes.
7366 * ppcobsd-tdep.c: Likewise.
7367
7368 2008-04-30 Ulrich Weigand <uweigand@de.ibm.com>
7369
7370 * s390-tdep.c: Update for unwinder changes.
7371
7372 2008-04-30 Ulrich Weigand <uweigand@de.ibm.com>
7373
7374 * spu-tdep.c: Update for unwinder changes.
7375
7376 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7377
7378 * hppanbsd-tdep.c, m68kbsd-tdep.c, mn10300-linux-tdep.c,
7379 ppc-linux-tdep.c, ppcnbsd-tdep.c, sparc-linux-tdep.c,
7380 sparc64-linux-tdep.c: Update for unwinder changes.
7381
7382 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7383
7384 * mipsnbsd-tdep.c, mips64obsd-tdep.c, mips-linux-tdep.c: Update
7385 for unwinder changes.
7386 * mips-tdep.c: Likewise.
7387 (mips_stub_frame_cache): Unwind the ABI stack pointer, not the
7388 raw one.
7389
7390 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7391
7392 * arm-linux-tdep.c, arm-tdep.c, armobsd-tdep.c: Update for
7393 unwinder changes.
7394
7395 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7396
7397 Update i386 and amd64 ports for unwinder changes.
7398
7399 * amd64-tdep.c (amd64_frame_cache): Expect this_frame.
7400 (amd64_frame_this_id, amd64_frame_prev_register): Update signature.
7401 (amd64_frame_unwind): Use default_frame_sniffer.
7402 (amd64_frame_sniffer): Delete.
7403 (amd64_sigtramp_frame_cache): Expect this_frame.
7404 (amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register)
7405 (amd64_sigtramp_frame_sniffer): Update signature.
7406 (amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer.
7407 (amd64_frame_base_address): Expect this_frame.
7408 (amd64_dummy_id): Renamed from amd64_unwind_dummy_id. Expect
7409 this_frame.
7410 (amd64_init_abi): Use set_gdbarch_dummy_id and
7411 frame_unwind_append_unwinder.
7412 * i386-tdep.c (i386_frame_cache): Expect this_frame.
7413 (i386_frame_this_id, i386_frame_prev_register): Update signature.
7414 (i386_frame_unwind): Use default_frame_sniffer.
7415 (i386_frame_sniffer): Delete.
7416 (i386_sigtramp_frame_cache): Expect this_frame.
7417 (i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register)
7418 (i386_sigtramp_frame_sniffer): Update signature.
7419 (i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer.
7420 (i386_frame_base_address): Update signature.
7421 (i386_dummy_id): Rename from i386_unwind_dummy_id. Expect this_frame.
7422 (i386_push_dummy_call): Update comment.
7423 (i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr):
7424 Expect this_frame.
7425 (i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders,
7426 and frame_unwind_append_unwinder.
7427 * amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c,
7428 amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c,
7429 i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c,
7430 i386nbsd-tdep.c: Update for unwinder changes.
7431
7432 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7433
7434 * trad-frame.c (struct trad_frame_cache): Rename next_frame to this_frame.
7435 (trad_frame_cache_zalloc, trad_frame_alloc_saved_regs): Expect
7436 this_frame.
7437 (trad_frame_get_prev_register, trad_frame_get_register): Update signature.
7438 * trad-frame.h (trad_frame_cache_zalloc, trad_frame_get_register)
7439 (trad_frame_alloc_saved_regs, trad_frame_get_prev_register): Update
7440 signature.
7441 * tramp-frame.c (tramp_frame_cache, tramp_frame_start): Expect
7442 this_frame.
7443 (tramp_frame_this_id, tramp_frame_prev_register, tramp_frame_sniffer):
7444 Update signature.
7445 * tramp-frame.h (struct tramp_frame): Update signature of init.
7446 * Makefile.in (trad-frame.o): Update.
7447
7448 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7449
7450 * dwarf2-frame.c (read_reg): Expect this_frame in the baton.
7451 (execute_stack_op): Put this_frame in the baton.
7452 (execute_cfa_program): Take this_frame.
7453 (struct dwarf2_frame_ops): Update comment for signal_frame_p.
7454 (dwarf2_frame_default_init_reg, dwarf2_frame_init_reg)
7455 (dwarf2_frame_signal_frame_p, dwarf2_frame_cache)
7456 (dwarf2_frame_this_id): Adjust to work on this_frame.
7457 (dwarf2_signal_frame_this_id): Delete.
7458 (dwarf2_frame_prev_register): Update signature. Use new frame
7459 unwind methods.
7460 (dwarf2_frame_sniffer): Update signature. Expect this_frame.
7461 (dwarf2_frame_unwind, dwarf2_signal_frame_unwind): Add
7462 dwarf2_frame_sniffer.
7463 (dwarf2_append_unwinders): New.
7464 (dwarf2_frame_base_address, dwarf2_frame_base_sniffer): Expect
7465 this_frame.
7466 * sparc-tdep.c (sparc32_dwarf2_struct_return_p)
7467 (sparc32_dwarf2_frame_init_reg): Expect this_frame.
7468 * cris-tdep.c (cris_dwarf2_frame_init_reg): Likewise.
7469 * rs6000-tdep.c (ppc_dwarf2_frame_init_reg): Likewise.
7470 * s390-tdep.c (s390_dwarf2_frame_init_reg): Likewise.
7471 * sh-tdep.c (sh_dwarf2_frame_init_reg): Likewise.
7472 * sparc64-tdep.c (sparc64_dwarf2_frame_init_reg): Likewise.
7473 * dwarf2-frame.h (dwarf2_frame_sniffer): Delete declaration.
7474 (dwarf2_append_unwinders): Declare.
7475 (dwarf2_frame_base_sniffer): Update declaration.
7476 * i386-linux-tdep.c (i386_linux_dwarf_signal_frame_p): Expect
7477 this_frame.
7478
7479 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7480
7481 Convert frame unwinders to use the current frame and
7482 "struct value".
7483
7484 * frame.c (frame_debug): Make global.
7485 (get_frame_id): Pass this frame to unwinder routines.
7486 (frame_pc_unwind): Remove unused unwind->prev_pc support.
7487 (do_frame_register_read): Do not discard the return value of
7488 frame_register_read.
7489 (frame_register_unwind): Remove debug messages. Use
7490 frame_unwind_register_value.
7491 (frame_unwind_register_value, get_frame_register_value): New
7492 functions.
7493 (create_new_frame, get_frame_base_address, get_frame_locals_address)
7494 (get_frame_args_address, get_frame_type): Pass this frame to
7495 unwinder routines.
7496 (frame_cleanup_after_sniffer, frame_prepare_for_sniffer): New
7497 functions.
7498 * frame.h: Update comments.
7499 (frame_debug, frame_unwind_register_value, get_frame_register_value)
7500 (frame_prepare_for_sniffer): Declare.
7501 * frame-unwind.h: Update comments and parameter names.
7502 (default_frame_sniffer): Declare.
7503 (frame_prev_register_ftype): Return a struct value *.
7504 (struct frame_unwind): Remove prev_pc member.
7505 (frame_unwind_sniffer_ftype, frame_unwind_append_sniffer): Delete.
7506 (frame_unwind_append_unwinder, frame_unwind_got_optimized)
7507 (frame_unwind_got_register, frame_unwind_got_memory)
7508 (frame_unwind_got_constant, frame_unwind_got_address): Declare.
7509 * frame-base.h: Update comments and parameter names.
7510 * valops.c (value_fetch_lazy): Use get_frame_register_value. Iterate
7511 if necessary. Add debugging output.
7512 * sentinel-frame.c (sentinel_frame_prev_register)
7513 (sentinel_frame_this_id): Update for new signature.
7514 (sentinel_frame_prev_pc): Delete.
7515 (sentinel_frame_unwinder): Remove prev_pc.
7516 * ia64-tdep.c (ia64_libunwind_frame_unwind): Do not initialize
7517 prev_pc.
7518 * libunwind-frame.c (libunwind_frame_unwind): Likewise.
7519 * frame-unwind.c (struct frame_unwind_table_entry): Remove sniffer.
7520 (frame_unwind_append_sniffer): Delete.
7521 (frame_unwind_append_unwinder): New function.
7522 (frame_unwind_find_by_frame): Take this frame. Only use sniffers
7523 from unwinders. Use frame_prepare_for_sniffer.
7524 (default_frame_sniffer, frame_unwind_got_optimized)
7525 (frame_unwind_got_register, frame_unwind_got_memory)
7526 (frame_unwind_got_constant, frame_unwind_got_address): New functions.
7527 * dummy-frame.c (dummy_frame_sniffer): Use gdbarch_dummy_id.
7528 (dummy_frame_prev_register, dummy_frame_this_id): Update for new
7529 signature.
7530 * gdbarch.sh: Replace unwind_dummy_id with dummy_id.
7531 * gdbarch.c, gdbarch.c: Regenerated.
7532 * frame-base.c (default_frame_base_address)
7533 (default_frame_locals_address, default_frame_args_address): Update
7534 for new signature.
7535 (frame_base_find_by_frame): Pass this frame to unwinder routines.
7536 * infcall.c (call_function_by_hand): Update comments.
7537 * Makefile.in (frame-unwind.o): Update dependencies.
7538
7539 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7540
7541 * ada-lang.c (ada_value_primitive_packed_val): Only check
7542 value_lazy for memory lvals.
7543 * findvar.c (value_of_register_lazy): New function.
7544 (locate_var_value): Only check value_lazy for memory lvals.
7545 * valarith.c (value_subscripted_rvalue): Likewise.
7546 * valops.c (value_fetch_lazy): Handle both memory and register
7547 lvals.
7548 (search_struct_field, value_slice): Only check value_lazy for memory
7549 lvals.
7550 * value.c (struct value): Update comment for lazy.
7551 (value_primitive_field): Only check value_lazy for memory lvals.
7552 * value.h (value_lazy): Update comment.
7553 (value_of_register_lazy): Declare.
7554
7555 2008-04-30 Daniel Jacobowitz <dan@codesourcery.com>
7556
7557 * corefile.c (reopen_exec_file): Close any open files.
7558
7559 2008-04-29 Joel Brobecker <brobecker@adacore.com>
7560
7561 * ia64-tdep.c (ia64_memory_remove_breakpoint): Set
7562 show_memory_breakpoints to 1 while reading the instruction bundle.
7563
7564 2008-04-29 Joel Brobecker <brobecker@adacore.com>
7565
7566 * gdbarch.sh: Document the return_value method. Explain that
7567 the FUNCTYPE parameter might be NULL.
7568 * gdbarch.h: Regenerated.
7569 * sparc-tdep.c (sparc32_push_dummy_code): Do not pass the function
7570 type when calling using_struct_return, as this is unnecessary
7571 on this target.
7572
7573 2008-04-28 Joel Brobecker <brobecker@adacore.com>
7574
7575 * terminal.h (create_tty_session): Fix return type.
7576
7577 2008-04-26 Vladimir Prus <vladimir@codesourcery.com>
7578
7579 * mi/mi-interp.c (mi_new_thread): Quote the thread id.
7580
7581 2008-04-26 Joel Brobecker <brobecker@adacore.com>
7582
7583 * breakpoint.c (condition_command, commands_from_control_command)
7584 (break_command_really): Minor reformatting.
7585
7586 2008-04-25 Pedro Alves <pedro@codesourcery.com>
7587
7588 * dwarf2read.c (dwarf2_const_value): Handle DW_FORM_strp.
7589
7590 2008-04-25 Pedro Alves <pedro@codesourcery.com>
7591
7592 * amd64-tdep.c (amd64_get_longjmp_target): New.
7593 (amd64_init_abi): Register amd64_get_longjmp_target as
7594 gdbarch_get_longjmp_target callback.
7595 * i386-tdep.c (i386_get_longjmp_target): Remove 64-bit handling.
7596
7597 2008-04-25 Pedro Alves <pedro@codesourcery.com>
7598
7599 * breakpoint.h (enum bpstat_what_main_action): Delete
7600 BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE.
7601
7602 * breakpoint.c (clrs): Delete.
7603 (bpstat_what): Update table.
7604
7605 * infrun.c (handle_inferior_event): Remove
7606 BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE handling.
7607
7608 2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
7609
7610 * mi/mi-cmds.h (mi_cmd_args_ftype): Remove.
7611 Adjust all prototypes using mi_cmd_args_ftype to use
7612 mi_cmd_argv_ftype.
7613 (struct mi_cmd): Remove the args_func field.
7614 * mi/mi-cmds.c: Don't provide value for the args_func field.
7615 * mi/mi-main.c (mi_execute_async_cli_command)
7616 (mi_cmd_exec_run, mi_cmd_exec_next, mi_cmd_exec_next_instruction)
7617 (mi_cmd_exec_step, mi_cmd_exec_step_instruction)
7618 (mi_cmd_exec_finish, mi_cmd_exec_until, mi_cmd_exec_return)
7619 (mi_cmd_exec_continue, mi_cmd_exec_interrupt)
7620 (mi_cmd_target_download): Adjust.
7621 (mi_cmd_target_select): Adjust. Pass 0 for from_tty parameter.
7622 (mi_cmd_execute): Do not check for args_func.
7623 (mi_execute_async_cli_command): Adjust.
7624 * mi/mi-parse.c: Don't check for args_func.
7625
7626 2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
7627
7628 * breakpoint.c (bpstat_check_location)
7629 (bpstat_check_watchpoint, bpstat_check_breakpoint_conditions):
7630 New, extracted from bpstat_stop_status.
7631 (bpstat_stop_status): Use the above.
7632
7633 2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
7634
7635 * mi/mi-main.c (last_async_command): Rename to current_token.
7636 (previous_async_command): Remove.
7637 (mi_cmd_gdb_exit): Adjust.
7638 (mi_cmd_exec_interrupt): Don't dance with previous_async_command.
7639 (mi_cmd_target_select): Adjust.
7640 (mi_cmd_execute): Don't set previous_async_command. Free token
7641 here even in async mode.
7642 (mi_execute_async_cli_command): Adjust.
7643 (mi_exec_async_cli_cmd_continuation): Adjust. Do not free the
7644 token.
7645 (mi_load_progress): Adjust.
7646
7647 2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
7648
7649 * infcmd.c (step_1_continuation): Always disable longjmp
7650 breakpoint if we're not going to do another step.
7651
7652 2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
7653
7654 exec_cleanup murder.
7655 * breakpoint.c (until_break_command_continuation): Add
7656 the 'error' parameter. Directly delete the breakoint as
7657 opposed to running cleanups.
7658 (until_break_command): Install continuation only
7659 after starting the target. Don't use exec cleanups,
7660 use ordinary cleanups. Discard cleanups is successfully
7661 started the target in async mode.
7662 (make_cleanup_delete_breakpoint): Remove.
7663 * breakpoint.h (make_cleanup_delete_breakpoint): Remove
7664 declaration.
7665 * defs.h (do_exec_cleanups, make_exec_cleanup): Remove
7666 declarations.
7667 (struct continations): Add the 'error' parameter to the
7668 continuation_hook field.
7669 (add_continuation, do_all_continuations)
7670 (add_intermediate_continuation)
7671 (do_all_intermediate_continuations): Add the 'error' parameter.
7672 * exceptions.c (throw_exception): Don't call do_exec_cleanups.
7673 * inf-loop.c (inferior_event_handler): Instead of calling
7674 discard_all_continuations, use do_all_continuations with 1 as
7675 'error' parameter. Pass 0 as 'error' parameter in existing uses
7676 of discard_all_continuations.
7677 * infcmd.c (step_1): Do not use exec cleanup. For async case, discard
7678 cleanups.
7679 (step_once): Install continuation only after resuming the target.
7680 (step_1_continuation): Disable longjmp breakpoint on error.
7681 (finish_command_continuation): Add the error parameter. Delete
7682 the finish breakpoint directly, do not use cleanups.
7683 (finish_command): Do not use exec_cleanups. Always setup
7684 continuation. For sync case, immediately run them.
7685 (attach_command_continuation): Add the error parameter.
7686 * infrun.c (fetch_inferior_event): Do not use exec cleanups to
7687 remove step_resume_breakpoint -- adjust delete it directly.
7688 * interps.c (interp_set): Adjust call to do_all_continations.
7689 * mi/mi-interp.c (mi_interpreter_exec_continuation): Do not
7690 do exec cleanups.
7691 * mi/mi-main.c (mi_cmd_target_select): Do not do exec
7692 cleanups.
7693 (mi_cmd_execute): Do not use exec_cleanup.
7694 (mi_execute_async_cli_command): Simplify the string concatenation
7695 logic. Do no use exec cleanup.
7696 (mi_exec_async_cli_cmd_continuation): New parameter error.
7697 Free last_async_command.
7698 * top.c (command_line_handler_continuation): New parameter error.
7699 * utils.c (exec_cleanup_chain, make_exec_cleanup)
7700 (do_exec_cleanups): Remove.
7701 (add_continuation, do_all_continations)
7702 (add_intermediate_continuation)
7703 (do_all_intermediate_continuations): New parameter error.
7704
7705 2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
7706
7707 * breakpoint.h (bp_location_p): New typedef.
7708 Register a vector of bp_location_p.
7709 * breakpoint.c (always_inserted_mode)
7710 (show_always_inserted_mode): New.
7711 (unlink_locations_from_global_list): Remove.
7712 (update_global_location_list)
7713 (update_global_location_list_nothrow): New.
7714 (update_watchpoint): Don't free locations.
7715 (should_insert_location): New.
7716 (insert_bp_location): Use should_insert_location.
7717 (insert_breakpoint_locations): Copied from
7718 insert_breakpoints.
7719 (insert_breakpoint): Use insert_breakpoint_locations.
7720 (bpstat_stop_status): Call update_global_location_list
7721 when disabling breakpoint.
7722 (allocate_bp_location): Don't add to bp_location_chain.
7723 (set_raw_breakpoint)
7724 (create_longjmp_breakpoint, enable_longjmp_breakpoint)
7725 (disable_longjmp_breakpoint, create_overlay_event_breakpoint)
7726 (enable_overlay_breakpoints, disable_overlay_breakpoints)
7727 (set_longjmp_resume_breakpoint)
7728 (enable_watchpoints_after_interactive_call_stop)
7729 (disable_watchpoints_before_interactive_call_start)
7730 (create_internal_breakpoint)
7731 (create_fork_vfork_event_catchpoint)
7732 (create_exec_event_catchpoint, set_momentary_breakpoint)
7733 (create_breakpoints, break_command_1, watch_command_1)
7734 (create_exception_catchpoint)
7735 (handle_gnu_v3_exceptions)
7736 (disable_breakpoint, breakpoint_re_set_one)
7737 (create_thread_event_breakpoint, create_solib_event_breakpoint)
7738 (create_ada_exception_breakpoint): : Don't call check_duplicates.
7739 Call update_global_location_list.
7740 (delete_breakpoint): Don't remove locations and don't
7741 try to reinsert them. Call update_global_location_list.
7742 (update_breakpoint_locations): Likewise.
7743 (restore_always_inserted_mode): New.
7744 (update_breakpoints_after_exec): Temporary disable
7745 always inserted mode.
7746 * Makefile.in: Update dependencies.
7747
7748 * infrun.c (proceed): Remove breakpoints while stepping
7749 over breakpoint.
7750 (handle_inferior_event): Don't remove or insert
7751 breakpoints.
7752 * linux-fork.c (checkpoint_command): Remove breakpoints
7753 before fork and insert after.
7754 (linux_fork_context): Remove breakpoints before switch
7755 and insert after.
7756 * target.c (target_disconnect, target_detach): Remove
7757 breakpoints from target.
7758
7759
7760 2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
7761
7762 * breakpoint.c (print_one_breakpoint_location): In MI
7763 mode, report the location string the breakpoint was
7764 originally created with.
7765
7766 2008-04-23 Maxim Grigoriev <maxim2405@gmail.com>
7767
7768 * Makefile.in (xtensa-tdep.o): Update dependencies.
7769 * configure.tgt (xtensa*): Update dependencies.
7770 * xtensa-tdep.c (arreg_number): Renamed from areg_number.
7771 Local variable areg renamed to arreg.
7772 (areg_number): New function.
7773 (xtensa_pseudo_register_read, xtensa_pseudo_register_write)
7774 (xtensa_extract_return_value, xtensa_store_return_value): areg_number
7775 replaced by arreg_number.
7776 (xtensa_windowed_frame_cache, struct xtensa_frame_cache): New comments.
7777 (xtensa_alloc_frame_cache): Initialize cache->wd.ws.
7778 (xtensa_scan_prologue): New function.
7779 (xtensa_frame_cache): New local fp_regnum. Handle separately the case,
7780 when ENTRY instraction hasn't been executed yet. Get the frame pointer
7781 value based on prologue analysis. Fix the bugs preventing WS and
7782 AR4-AR7/A11 registers from getting right values for intermediate frames,
7783 whose registers have been already spilled.
7784 (xtensa_frame_prev_register): Fix WS register value. Use are_number
7785 and arreg_number appropriately.
7786 (xtensa_gdbarch_init): Set solib_svr4_fetch_link_map_offsets to
7787 svr4_ilp32_fetch_link_map_offsets.
7788
7789 2008-04-23 Andrew Stubbs <andrew.stubbs@st.com>
7790
7791 * printcmd.c: Define USE_PRINTF_I64 and PRINTF_HAS_LONG_LONG on MinGW.
7792 (printf_command): Convert %lld to %I64d when USE_PRINTF_I64 set.
7793
7794 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7795
7796 * acinclude.m4: Add override.m4.
7797 * configure: Regenerate.
7798
7799 2008-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
7800
7801 * ada-lang.c (get_selections): Variable PROMPT made non-const and
7802 initialized with a trailing space now. Use PROMPT_ARG of
7803 COMMAND_LINE_INPUT instead of printing it ourselves.
7804
7805 2008-04-22 Joel Brobecker <brobecker@adacore.com>
7806
7807 * NEWS: Document support for 64-bit core file.
7808
7809 2008-04-22 Corinna Vinschen <vinschen@redhat.com>
7810
7811 * NEWS: Add information on calling convention and new SH CLI options.
7812
7813 * sh-tdep.c (sh_cc_gcc): New static string.
7814 (sh_cc_renesas): Ditto.
7815 (sh_cc_enum): New static string array.
7816 (sh_active_calling_convention): New static string pointer denoting
7817 active user chosen ABI.
7818 (sh_is_renesas_calling_convention): New function to return function
7819 specific ABI, or user choice if necessary.
7820 (sh_use_struct_convention): Rename first argument and turn around its
7821 meaning. Check for renesas ABI and return accordingly.
7822 (sh_use_struct_convention_nofpu): New function.
7823 (sh_next_flt_argreg): Get function type as third parameter. Check
7824 for renesas ABI and choose floating registers accordingly.
7825 (sh_push_dummy_call_fpu): Check for ABI and choose argument slot and
7826 struct return slot accordingly.
7827 (sh_push_dummy_call_nofpu): Ditto.
7828 (sh_return_value_nofpu): Call sh_use_struct_convention_nofpu from here.
7829 Evaluate ABI and give to sh_use_struct_convention_nofpu.
7830 (sh_return_value_fpu): Evaluate ABI and give to
7831 sh_use_struct_convention.
7832 (show_sh_command): New function.
7833 (set_sh_command): Ditto.
7834 (_initialize_sh_tdep): Initialize `set/show sh calling-convention
7835 CLI command.
7836
7837 * gdbarch.sh (return_value): Add func_type argument.
7838 * gdbarch.c: Regenerate.
7839 * gdbarch.h: Ditto.
7840 * eval.c (evaluate_subexp_standard): Rename local variable value_type to
7841 val_type so as not to collide with value_type function. Call
7842 using_struct_return with additional function type argument.
7843 * infcall.c (call_function_by_hand): Call using_struct_return and
7844 gdbarch_return_value with additional function type argument.
7845 * infcmd.c (print_return_value): Take addition func_type argument.
7846 Call gdbarch_return_value with additional function type argument.
7847 (finish_command_continuation): Call print_return_value with additional
7848 function type argument.
7849 (finish_command): Ditto.
7850 * sparc-tdep.c (sparc32_push_dummy_code): Call using_struct_return with
7851 additional function type argument.
7852 * stack.c (return_command): Call using_struct_return and
7853 gdbarch_return_value with additional function type argument.
7854 * value.c (using_struct_return): Take additional function type argument.
7855 * value.h (using_struct_return): Accommodate declaration.
7856 * alpha-tdep.c (alpha_return_value): Add func_type argument.
7857 * amd64-tdep.c (amd64_return_value): Ditto.
7858 * arm-tdep.c (arm_return_value): Ditto.
7859 * avr-tdep.c (avr_return_value): Ditto.
7860 * cris-tdep.c (cris_return_value): Ditto.
7861 * frv-tdep.c (frv_return_value): Ditto.
7862 * h8300-tdep.c (h8300_return_value): Ditto.
7863 (h8300h_return_value): Ditto.
7864 * hppa-tdep.c (hppa32_return_value): Ditto.
7865 (hppa64_return_value): Ditto.
7866 * i386-tdep.c (i386_return_value): Ditto.
7867 * ia64-tdep.c (ia64_return_value): Ditto.
7868 * iq2000-tdep.c (iq2000_return_value): Ditto.
7869 * m32c-tdep.c (m32c_return_value): Ditto.
7870 * m32r-tdep.c (m32r_return_value): Ditto.
7871 * m68hc11-tdep.c (m68hc11_return_value): Ditto.
7872 * m68k-tdep.c (m68k_return_value): Ditto.
7873 (m68k_svr4_return_value): Ditto.
7874 * m88k-tdep.c (m88k_return_value): Ditto.
7875 * mep-tdep.c (mep_return_value): Ditto.
7876 * mips-tdep.c (mips_eabi_return_value): Ditto.
7877 (mips_n32n64_return_value): Ditto.
7878 (mips_o32_return_value): Ditto.
7879 (mips_o64_return_value): Ditto.
7880 * mn10300-tdep.c (mn10300_return_value): Ditto.
7881 * mt-tdep.c (mt_return_value): Ditto.
7882 * ppc-linux-tdep.c (ppc_linux_return_value): Ditto.
7883 * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Ditto.
7884 (ppc_sysv_abi_broken_return_value): Ditto.
7885 (ppc64_sysv_abi_return_value): Ditto.
7886 * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto.
7887 (ppc_sysv_abi_broken_return_value): Ditto.
7888 (ppc64_sysv_abi_return_value): Ditto.
7889 * ppcnbsd-tdep.c (ppcnbsd_return_value): Ditto.
7890 * rs6000-tdep.c (rs6000_return_value): Ditto.
7891 * s390-tdep.c (s390_return_value): Ditto.
7892 * score-tdep.c (score_return_value): Ditto.
7893 * sh-tdep.c (sh_return_value_nofpu): Ditto.
7894 (sh_return_value_fpu): Ditto.
7895 * sh64-tdep.c (sh64_return_value): Ditto.
7896 * sparc-tdep.c (sparc32_return_value): Ditto.
7897 * sparc64-tdep.c (sparc64_return_value): Ditto.
7898 * spu-tdep.c (spu_return_value): Ditto.
7899 * v850-tdep.c (v850_return_value): Ditto.
7900 * vax-tdep.c (vax_return_value): Ditto.
7901 * xstormy16-tdep.c (xstormy16_return_value): Ditto.
7902 * xtensa-tdep.c (xtensa_return_value): Ditto.
7903
7904 * gdbtypes.h (struct type): Add calling_convention member.
7905 * dwarf2read.c (read_subroutine_type): Add calling convention read
7906 from DW_AT_calling_convention attribute to function type.
7907
7908 2008-04-22 Markus Deuling <deuling@de.ibm.com>
7909
7910 * eval.c (evaluate_subexp_standard): Use value_subscripted_rvalue for
7911 multi_f77_subscript to support values from registers.
7912 * valarith.c (value_subscripted_rvalue): Remove prototype and static.
7913 * value.h (value_subscripted_rvalue): Add prototype.
7914
7915 * f-typeprint.c (f_type_print_base): Add support for TYPE_CODE_UNION.
7916 Fix output.
7917 * f-valprint.c (f_val_print): Likewise.
7918
7919 2008-04-21 Craig Silverstein <csilvers@google.com>
7920
7921 * dwarf2read.c (zlib_decompress_section): Define abfd in the
7922 !HAVE_ZLIB_H case.
7923
7924 2008-04-21 Pedro Alves <pedro@codesourcery.com>
7925
7926 * symfile.c (syms_from_objfile): Don't warn if lowest loadable
7927 section is not a code section.
7928
7929 2008-04-19 Craig Silverstein <csilvers@google.com>
7930
7931 * NEWS: Add information on compressed debug sections.
7932
7933 2008-04-19 Vladimir Prus <vladimir@codesourcery.com>
7934
7935 * mi/mi-cmd-var.c (varobj_update_one): Print new
7936 value for variable objects that changed type.
7937
7938 2008-04-19 Vladimir Prus <vladimir@codesourcery.com>
7939
7940 * varobj.c (varobj_invalidate): Don't touch floating
7941 varobjs.
7942
7943 2008-04-19 Mark Kettenis <kettenis@gnu.org>
7944
7945 * symtab.c: (multiple_symbols_modes, multiple_symbols_ask)
7946 (multiple_symbols_cancel): Remove extra const.
7947 * symtab.h: Likewise.
7948
7949 2008-04-19 Nick Roberts <nickrob@snap.net.nz>
7950
7951 * interps.c (top_level_interpreter): Rename static variable...
7952 (top_level_interpreter_ptr): ...to this.
7953 (top_level_interpreter): New function.
7954
7955 * interps.h: New extern for top_level_interpreter.
7956
7957 * linespec.c: Include interps.h and mi/mi-cmds.h.
7958 (decode_line_2): When using MI, always set all breakpoints in menu.
7959
7960 * Makefile.in (linespec.o, mi-interp.o): Add dependencies.
7961
7962 2008-04-18 Craig Silverstein <csilvers@google.com>
7963
7964 * configure.ac (AC_SEARCH_LIBS): Add check for zlib.
7965 * config.in, configure: Regenerate.
7966 * dwarf2read.c: Include zlib.h if present.
7967 Modified *_SECTION macros.
7968 (section_is_p): New.
7969 (dwarf2_locate_sections): Use section_is_p instead of strcmp
7970 (dwarf2_resize_section): New.
7971 to determine whether a given section has a given name.
7972 (zlib_decompress_section): New.
7973 (dwarf2_read_section): Read the compressed section if present
7974 in the binary.
7975 * MAINTAINERS: Added myself to section Write After Approval.
7976
7977 2008-04-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7978
7979 * defs.h (exec_set_section_offsets): Remove prototype.
7980 * exec.c (exec_set_section_offsets): Remove function.
7981
7982 2008-04-18 Joel Brobecker <brobecker@adacore.com>
7983
7984 * stabsread.c (cleanup_undefined_types_1): Add instance flags check
7985 in the search for the matching symbol.
7986
7987 2008-04-17 Marc Khouzam <marc.khouzam@ericsson.com>
7988
7989 * breakpoint.c (update_watchpoint): Always reparse
7990 condition.
7991
7992 2008-04-17 Joel Brobecker <brobecker@adacore.com>
7993
7994 * breakpoint.c (print_one_breakpoint_location): Make sure to print
7995 the breakpoint address only once.
7996
7997 2008-04-17 Dennis Roberts <dennis.roberts@sunquestinfo.com>
7998
7999 * rs6000-tdep.c (rs6000_gdbarch_init): Use the BFD architecture,
8000 rather than a hard-coded architecture, for xcoff executables.
8001
8002 2008-04-17 Doug Evans <dje@google.com>
8003
8004 * buildsym.c (watch_main_source_file_lossage): New fn.
8005 (end_symtab): Call it.
8006
8007 * source.c (find_and_open_source): Add some comments clarifying
8008 handling of FULLNAME argument. Make static. Remove pointless
8009 xstrdup/xfree.
8010
8011 2008-04-17 Pedro Alves <pedro@codesourcery.com>
8012
8013 * inf-loop.c (inferior_event_handler): Also run the intermediate
8014 continuations in the INF_EXEC_COMPLETE case.
8015
8016 2008-04-16 Tom Tromey <tromey@redhat.com>
8017
8018 * cli/cli-decode.h (CMD_ASYNC_OK): New define.
8019 (set_cmd_async_ok, get_cmd_async_ok): Declare.
8020 * cli/cli-decode.c (set_cmd_async_ok): New function.
8021 (get_cmd_async_ok): New function.
8022 * cli/cli-cmds.c (init_cli_cmds): Mark "pwd", "help", "info", and
8023 "show" as async-ok.
8024 * top.c (execute_command): Use get_cmd_async_ok.
8025 * infcmd.c: Include cli/cli-decode.h.
8026 (_initialize_infcmd): Mark "interrupt" as async-ok.
8027 * Makefile.in (infcmd.o): Depend on cli_decode_h.
8028
8029 2008-04-16 Daniel Jacobowitz <dan@codesourcery.com>
8030
8031 PR gdb/2445
8032 * exec.c: Correct "arch-utils.h" include.
8033
8034 2008-04-15 Aleksandar Ristovski <aristovski@qnx.com>
8035
8036 PR gdb/2424
8037 * infrun.c (normal_stop) Move breakpoint_auto_delete further down
8038 to allow printing to 'see' real reason of stop. This fixes PR 2424.
8039 * breakpoint.c (bpdisp_texst): New function. The function takes over
8040 the role of bpstats static array in print_one_breakpoint_location.
8041 (print_it_typical): Print "Temporary breakpoint" instead
8042 of just "Breakpoint" when breakpoint is, well, temporary. For mi-like
8043 protocols, print disp field.
8044 (print_one_breakpoint_location): Removed bpdisps static definition.
8045 Call new bpstat_text function to get value for 'disp' field.
8046 (mention): Print "Temporary breakpoint" instead of just "Breakpoint".
8047
8048 2008-04-15 Daniel Jacobowitz <dan@codesourcery.com>
8049
8050 * gnulib/Makefile.am, gnulib/m4/gnulib-cache.m4,
8051 gnulib/aux/link-warning.h, gnulib/extra/link-warning.h: Adjust
8052 by rerunning gnulib-tool with --aux-dir=gnulib/extra.
8053 * gnulib/Makefile.in: Regenerate.
8054
8055 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8056
8057 * Makefile.in (GNULIB_H): New. Trigger all-lib.
8058 (defs_h): Use $(GNULIB_H).
8059 (all-lib): Depend on gnulib/Makefile.
8060 (gnulib/Makefile): Regenerate gnulib/Makefile and gnulib/.deps.
8061 * config.in, gnulib/Makefile.in: Regenerated.
8062
8063 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8064
8065 * Makefile.in (LIBGNU, INCGNU): Define.
8066 (INTERNAL_CFLAGS_BASE): Add INCGNU.
8067 (INTERNAL_LIBS, CLIBS, CDEPS): Add LIBGNU.
8068 (CLEANDIRS): New.
8069 ($(LIBGNU), all-lib): New rules.
8070 (clean, distclean, do-maintainer-clean): Use CLEANDIRS.
8071 * configure.ac: Use gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE.
8072 Simplify AC_CONFIG_AUX_DIR. Generate gnulib/Makefile.
8073 * gnulib: New directory, from gnulib-tool.
8074 * configure, aclocal.m4: Regenerated.
8075
8076 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8077
8078 * linux-thread-db.c (have_threads_callback): Check thread->private.
8079
8080 2008-04-13 Nick Roberts <nickrob@snap.net.nz>
8081 Vladimir Prus <vladimir@codesourcery.com>
8082
8083 Fix @-varobjs.
8084 * varobj.c (value_of_root): Update the expression for
8085 floating varobjs.
8086 * mi/mi-cmd-var.c (varobj_update_one): If type has changed,
8087 report that.
8088
8089 2008-04-09 Marc Khouzam <marc.khouzam@ericsson.com>
8090
8091 * mi/mi-cmd-var.c: Include "mi-getopt.h".
8092 (mi_parse_format): New. Factored out from mi_cmd_var_set_format.
8093 (mi_cmd_var_set_format): Use new mi_parse_format.
8094 (mi_cmd_var_evaluate_expression): Support for -f option to specify
8095 format.
8096 * Makefile.in (mi-cmd-var.o): Update dependencies.
8097
8098 * varobj.h (varobj_get_formatted_value): Declare.
8099 * varobj.c (my_value_of_variable): Added format parameter.
8100 (cplus_value_of_variable): Likewise.
8101 (java_value_of_variable): Likewise.
8102 (c_value_of_variable): Likewise. Evaluate expression based
8103 on format parameter.
8104 (struct language_specific): Add format parameter to function member
8105 *value_of_variable.
8106 (varobj_get_formatted_value): New.
8107 (varobj_get_value): Added format parameter to method call.
8108
8109 2008-04-08 Joel Brobecker <brobecker@adacore.com>
8110
8111 * stabsread.c (cleanup_undefined_types_noname): Manually set the
8112 instance flags of the undefined type before calling replace_type.
8113
8114 2008-04-08 Vladimir Prus <vladimir@codesourcery.com>
8115
8116 * target.h (enum strata): Remove the download_stratum.
8117
8118 2008-04-07 Doug Evans <dje@google.com>
8119
8120 * buildsym.h (last_source_file): Add dwarf info to comment.
8121 (last_source_start_addr): Ditto.
8122
8123 2008-04-07 Pedro Alves <pedro@codesourcery.com>
8124
8125 * alphanbsd-tdep.c: Include "target.h".
8126 * mn10300-tdep.c: Include "target.h".
8127 * Makefile.in (alphanbsd-tdep.o, mn10300-tdep.o): Update.
8128
8129 2008-04-06 Vladimir Prus <vladimir@codesourcery.com>
8130
8131 Fix breakpoint condition that use member variables.
8132 * valops.c (check_field): Remove.
8133 (check_field_in): Rename to check_field.
8134 (value_of_this): Use la_name_of_this.
8135 * value.h (check_field): Adjust prototype.
8136
8137 * language.h (la_value_of_this): Rename to la_name_of_this.
8138 * language.c (unknown_language_defn): Specify "this" for
8139 name_of_this.
8140 (auto_language_defn): Likewise.
8141 (local_language_defn): Likewise.
8142 * ada-lang.c (ada_language_defn): Adjust comment.
8143 * c-lang.c (c_language_defn): Adjust comment.
8144 (cplus_language_defn): Specify "this" for name_of_this.
8145 (asm_language_defn): Adjust comment.
8146 (minimal_language_defn): Adjust comment.
8147 * f-lang.c (f_language_defn): Specify NULL for name_of_this.
8148 * jv-lang.c (java_language_defn): Specify "this" for name_of_this.
8149 * m2-lang.c (m2_language_defn): Specify "this" for name_of_this.
8150 * objc-lang.c (objc_language_defn): Specify "self" for
8151 name_of_this.
8152 * p-lang.c (pascal_language_defn): Specify "this" for
8153 name_of_this.
8154 * scm-lang.c (scm_language_defn): Specify NULL for name_of_this.
8155
8156 * symtab.c (lookup_symbol_aux): Lookup "this" in the
8157 proper scope, and check for field in type of "this", without
8158 trying to create a value.
8159
8160 2008-04-04 Pedro Alves <pedro@codesourcery.com>
8161
8162 * mi/mi-cmds.h (enum mi_cmd_result): Delete MI_CMD_ERROR.
8163 (mi_error_message): Delete declaration.
8164 * mi/mi-interp.c (mi_cmd_interpreter_exec): Call error instead of
8165 returning MI_CMD_ERROR.
8166 * mi/mi-main.c (mi_error_message): Delete.
8167 (mi_cmd_exec_interrupt):
8168 (mi_cmd_thread_select, mi_cmd_thread_list_ids)
8169 (mi_cmd_thread_info): Call error instead of returning
8170 MI_CMD_ERROR.
8171 (mi_cmd_data_list_register_values): Call error instead of
8172 returning MI_CMD_ERROR. Adapt to new get_register interface.
8173 (get_register): Change return typo to void. Call error instead of
8174 returning MI_CMD_ERROR.
8175 (mi_cmd_data_write_register_values): Call error instead of
8176 returning MI_CMD_ERROR.
8177 (mi_cmd_list_features): Return MI_CMD_DONE.
8178 (captured_mi_execute_command): Remove MI_CMD_ERROR handling.
8179 (mi_execute_command): Always print exceptions with -error.
8180
8181 2008-04-04 Joel Brobecker <brobecker@adacore.com>
8182
8183 * NEWS: Mention new commands set/show multiple-symbols.
8184
8185 2008-04-03 Joel Brobecker <brobecker@adacore.com>
8186
8187 * symtab.c (multiple_symbols_ask, multiple_symbols_all)
8188 (multiple_symbols_cancel): New constants.
8189 (multiple_symbols_modes, multiple_symbols_mode): New static globals.
8190 (multiple_symbols_select_mode): New function.
8191 (_initialize_symtab): Add new set/show multiple-symbols commands.
8192 * symtab.h (multiple_symbols_ask, multiple_symbols_all)
8193 (multiple_symbols_cancel, multiple_symbols_select_mode): Declare.
8194 * ada-lang.c (user_select_syms): Add handling of new multiple-symbols
8195 setting.
8196 * linespec.c (decode_line_2): Likewise.
8197
8198 2008-04-03 Doug Evans <dje@sebabeach.org>
8199
8200 * symtab.h (enum free_code): Delete free_contents, unused.
8201 * symmisc.c (free_symtab_block): Delete.
8202 (free_symtab, case free_code): Delete.
8203
8204 2008-04-01 Aleksandar Ristovski <aristovski@qnx.com>
8205
8206 * valops.c (value_cast_structs): New function. Cast related
8207 STRUCT types up/down and return cast value. The body of this
8208 function comes mostly from value_cast_pointers.
8209 (value_cast_pointers): Code for actual cast STRUCT-STRUCT moved
8210 to value_cast_structs. Now value_cast_pointers needs only create
8211 appropriate reference after using value_cast_structs for actual
8212 casting.
8213 (value_cast): Handle references.
8214
8215 2008-04-01 Marc Khouzam <marc.khouzam@ericsson.com>
8216
8217 * MAINTAINERS: Added myself to section Write After Approval.
8218
8219 2008-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8220
8221 * ia64-tdep.c (examine_prologue): Correct array access.
8222
8223 2008-03-28 Aleksandar Ristovski <aristovski@qnx.com>
8224
8225 * cp-support.c (first_component_command): Return if no arguments.
8226
8227 2008-03-28 Carlos O'Donell <carlos@codesourcery.com>
8228
8229 * ser-mingw.c (ser_windows_open): Open requested name.
8230
8231 2008-03-28 Aleksandar Ristovski <aristovski@qnx.com>
8232
8233 * MAINTAINERS: Added myself.
8234
8235 2008-03-28 Pedro Alves <pedro@codesourcery.com>
8236
8237 * target.c (find_default_run_target): Allow a NULL `do_mesg'
8238 parameter. If it is NULL, don't call error.
8239 (find_default_can_async_p, find_default_is_async_p): Pass NULL as
8240 `do_mesg' parameter to find_default_run_target. If no target was
8241 found, return 0.
8242
8243 2008-03-28 Daniel Jacobowitz <dan@codesourcery.com>
8244
8245 * mips-linux-tdep.c: Update N32/N64 signal frame comments.
8246 (N64_SIGCONTEXT_LO, N64_SIGCONTEXT_PC, N64_SIGCONTEXT_FPCSR): Update.
8247 (N64_SIGCONTEXT_FIR, N64_SIGCONTEXT_CAUSE, N64_SIGCONTEXT_BADVADDR):
8248 Delete.
8249 (mips_linux_n32n64_sigframe_init): Do not record cause or badvaddr.
8250
8251 2008-03-27 Joel Brobecker <brobecker@adacore.com>
8252
8253 GDB 6.8 released.
8254
8255 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8256
8257 * features/Makefile (%.dat): Set xmltarget to the base filename
8258 of the XML source, without subdirectory.
8259 * regformats/rs6000/powerpc-32.dat: Regenerate.
8260 * regformats/rs6000/powerpc-64.dat: Regenerate.
8261 * regformats/rs6000/powerpc-e500.dat: Regenerate.
8262
8263 2008-03-27 Markus Deuling <deuling@de.ibm.com>
8264
8265 * xcoffread.c (scan_xcoff_symtab): Replace current_gdbarch by
8266 objfile arch.
8267
8268 2008-03-27 Nick Roberts <nickrob@snap.net.nz>
8269
8270 * mi/mi-main.c (enum captured_mi_execute_command_actions):
8271 Spell suppress in EXECUTE_COMMAND_SUPPRESS_PROMPT correctly.
8272
8273 2008-03-26 Ulrich Weigand <uweigand@de.ibm.com>
8274
8275 * objfiles.h (struct objfile): New GDBARCH member.
8276 (get_objfile_arch): Add prototype.
8277 * objfiles.c: Include "arch-utils.h".
8278 (allocate_objfile): Look up gdbarch associated with bfd.
8279 (get_objfile_arch): New function.
8280 * Makefile (objfiles.o): Update dependencies.
8281
8282 * dwarf2-frame.c (decode_frame_entry_1): Replace current_gdbarch
8283 by objfile arch.
8284 * dwarf2loc.c (dwarf_expr_read_reg): Replace current_gdbarch
8285 by frame arch.
8286 (locexpr_describe_location): Replace current_gdbarch by
8287 objfile arch.
8288 * dwarf2read.c (die_type): Replace current_gdbarch by objfile arch.
8289 (dwarf2_add_field): Likewise.
8290 (read_tag_pointer_type): Likewise.
8291 (read_base_type): Likewise.
8292 (new_symbol): Likewise.
8293
8294 * coffread.c (decode_type): Add OBJFILE argument. Update callers.
8295 (decode_base_type, decode_function_type): Likewise.
8296 (coff_read_struct_type, coff_read_enum_type): Likewise.
8297 (coff_symtab_read): Replace current_gdbarch by objfile arch.
8298 (decode_base_type): Likewise.
8299 (coff_read_enum_type): Likewise.
8300 (coff_read_struct_type): Replace current_objfile by OBJFILE argument.
8301 (coff_read_enum_type): Likewise.
8302
8303 * dbxread.c (read_dbx_symtab): Replace current_gdbarch by objfile arch.
8304 (end_psymtab): Likewise.
8305 (process_one_symbol): Likewise.
8306
8307 * mdebugread.c (parse_symbol): Replace current_gdbarch by objfile arch.
8308 (parse_procedure): Likewise.
8309 (parse_partial_symbols): Likewise.
8310
8311 * somread.c (som_symtab_read): Replace current_gdbarch by objfile arch.
8312
8313 * stabsread.c (define_symbol): Replace current_gdbarch by objfile arch.
8314 Replace static pcc_promotion_type and pcc_unsigned_promotion_type by
8315 built-in types.
8316 (read_range_type): Replace current_gdbarch by objfile arch. Replace
8317 static range_index_type by built-in type.
8318 (read_one_struct_field): Replace current_gdbarch by objfile arch.
8319 (read_enum_type): Likewise.
8320
8321 * xcoffread.c (read_xcoff_symtab): Replace current_gdbarch by
8322 objfile arch.
8323
8324 2008-03-26 Vladimir Prus <vladimir@codesourcery.com>
8325
8326 * varobj.h (varobj_floating_p): Declare.
8327 * varobj.c (varobj_floating_p): New.
8328 * mi/mi-cmd-var.c (mi_cmd_var_update): When passed
8329 '@' as the name, update all floating varobjs.
8330
8331 2008-03-26 Vladimir Prus <vladimir@codesourcery.com>
8332
8333 * varobj.c (struct varobj_root): Rename use_selected_frame to
8334 floating, and clarify the meaning.
8335 (varobj_create, varobj_update, new_root_variable): Adjust.
8336 (value_of_root): Don't use type_changed as in variable,
8337 adjust comment.
8338 (c_value_of_root): Adjust.
8339
8340 2008-03-25 Pedro Alves <pedro@codesourcery.com>
8341
8342 * linux-nat.c (linux_nat_attach): Add the pid we attached to, to
8343 gdb's thread list.
8344 (linux_nat_wait): Add main lwp to gdb's thread list.
8345 * linux-thread-db.c (find_new_threads_callback): Also attach to
8346 already listed threads which thread_db didn't know about yet.
8347
8348 2008-03-25 Pedro Alves <pedro@codesourcery.com>
8349
8350 * linux-nat.c (drain_queued_events): Fix comment typo.
8351 (linux_nat_attach): In async mode, don't rely on storing a pending
8352 status. Instead place the wait status on the pipe.
8353 (linux_nat_resume): Remove unreacheable shortcut code in async
8354 mode.
8355 (stop_wait_callback): In async mode, don't store pending status.
8356 Instead, cancel breakpoints or resend the signal appropriatelly.
8357 (cancel_breakpoint): New, refactored from
8358 cancel_breakpoints_callback.
8359 (cancel_breakpoints_callback): Call cancel_breakpoint.
8360 (pipe_to_local_event_queue): Remove special token processing.
8361 (linux_nat_wait): Issue an internal error if a pending status is
8362 found in async mode.
8363
8364 2008-03-24 Daniel Jacobowitz <dan@codesourcery.com>
8365
8366 * inflow.c (gdb_has_a_terminal): Guard access to our_process_group.
8367
8368 2008-03-24 Nick Roberts <nickrob@snap.net.nz>
8369 Vladimir Prus <vladimir@codesourcery.com>
8370
8371 * varobj.c (struct varobj_root): New component thread_id.
8372 (varobj_get_thread_id, check_scope): New functions.
8373 (c_value_of_root): Use check_scope. Switch to the
8374 proper thread if necessary.
8375
8376 * varobj.h (varobj_get_thread_id): New extern.
8377
8378 * mi/mi-cmd-var.c (print_varobj): Add thread-id field.
8379
8380 2008-03-23 Daniel Jacobowitz <dan@codesourcery.com>
8381
8382 PR gdb/544
8383 * top.c: Revert 2008-03-21 changes.
8384
8385 2008-03-23 Vladimir Prus <vladimir@codesourcery.com>
8386
8387 * thread.c (make_cleanup_restore_current_thread): Make it
8388 globally visible.
8389 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8390 * varobj.c (varobj_update): Don't save/restore frame.
8391 (c_value_of_root): Save/restore thread and frame here,
8392 using make_cleanup_restore_current_thread.
8393 * Makefile.in: Update dependecies.
8394
8395 2008-03-23 Vladimir Prus <vladimir@codesourcery.com>
8396
8397 * varobj.c (struct varobj_root): Clarify
8398 comment on the frame field.
8399 (varobj_create): Don't set frame if we have no
8400 block.
8401
8402 2008-03-21 Daniel Jacobowitz <dan@codesourcery.com>
8403
8404 PR gdb/544
8405 Suggested by Jan Kratochvil:
8406 * top.c (gdb_rl_operate_and_get_next_completion): Call
8407 rl_redisplay_function.
8408 (gdb_rl_redisplay): New.
8409 (init_main): Set rl_redisplay_function.
8410
8411 2008-03-21 Thomas Mittelstaedt <T.Mittelstaedt@cadenas.de> (tiny change)
8412
8413 * aix-thread.c (pdc_read_regs): Fix compiler warning.
8414 (pdc_write_regs, aix_thread_resume, fetch_regs_kernel_thread)
8415 (store_regs_kernel_thread): Likewise.
8416
8417 2008-03-21 Pedro Alves <pedro@codesourcery.com>
8418
8419 Linux native async support.
8420
8421 * target.h (struct target_ops): Delete to_async_mask_value and add
8422 to_async_mask.
8423 (target_is_async_p, target_async): Formatting.
8424 (target_async_mask_value): Delete.
8425 (target_async_mask): Delete function declaration, and add new
8426 target macro with the same name.
8427
8428 * target.c (update_current_target): Replace to_async_mask_value by
8429 to_async_mask. Default to_async_mask to return_one.
8430 (target_async_mask): Delete.
8431 (find_default_can_async_p, find_default_is_async_p): New.
8432 (init_dummy_target): register find_default_can_async_p and
8433 find_default_is_async_p on the dummy target.
8434
8435 * linux-nat.c: Include inf-loop.h, event-loop.h and event-top.h.
8436 (debug_linux_nat_async): New global.
8437 (show_debug_linux_nat_async): New function.
8438 (linux_nat_async_enabled, linux_nat_async_mask_value)
8439 (linux_nat_event_pipe, linux_nat_num_queued_events)
8440 (linux_nat_async_events_enabled): New globals.
8441 (struct waitpid_result): New struct.
8442 (waitpid_queue): New global.
8443 (queued_waitpid, push_waitpid, drain_queued_events): New.
8444 (my_waitpid): Call queued_waitpid.
8445 (linux_child_follow_fork): Disable async events during the call.
8446 (blocked_mask): Delete.
8447 (sync_sigchld_action, async_sigchld_action): New globals.
8448 (lin_lwp_attach_lwp): In sync mode, don't reblock SIGCHLD. In
8449 async mode, block events during the call.
8450 (linux_nat_create_inferior): New.
8451 (linux_nat_attach): In sync mode, restore the mask states. In
8452 async mode, wake the event loop immediatelly.
8453 (detach_callback): Drain all queued events of the lwp we're
8454 detaching from.
8455 (linux_nat_detach): Block async mode, and drain events of the main
8456 process.
8457 (linux_nat_resume): If in async mode, mask async events during the
8458 call. If short circuiting, force event loop to wake up. If
8459 resuming, set target_executing, and register target events in the
8460 event loop.
8461 (pipe_to_local_event_queue, local_event_queue_to_pipe): New.
8462 (linux_nat_wait): In async mode, block events during the call.
8463 Only enable/disable passing SIGINT to the inferior in sync mode.
8464 Get events from local waitpid queue. If no interesting events was
8465 found, return to events loop. Reregister target events in the
8466 event loop on exit. In sync mode, no need to reblock SIGCHLD.
8467 (linux_nat_kill): Disable events on entry.
8468 (linux_nat_mourn_inferior): In sync mode, don't restore the masks
8469 here. Detach async mode from the event loop if there are no more
8470 forks available, otherwise leave it on.
8471 (sigchld_handler): Assure this is called only in sync mode.
8472 (linux_async_permitted, linux_async_permitted_1): New globals.
8473 (set_maintenance_linux_async_permitted)
8474 (show_maintenance_linux_async_permitted): New functions.
8475 (linux_nat_is_async_p, linux_nat_can_async_p)
8476 (linux_nat_async_mask): New.
8477 (linux_nat_event_pipe_pop, linux_nat_event_pipe_push): New.
8478 (get_pending_events, async_sigchld_handler): New.
8479 (linux_nat_async_events): New.
8480 (async_terminal_is_ours): New global.
8481 (linux_nat_terminal_inferior, linux_nat_terminal_ours): New.
8482 (async_client_callback, async_client_context): New.
8483 (linux_nat_async_file_handler, linux_nat_async)
8484 (linux_nat_disable_async, linux_nat_enable_async): New.
8485 (linux_nat_add_target): Register linux_nat_create_inferior,
8486 linux_nat_can_async_p, linux_nat_is_async_p, linux_nat_async,
8487 linux_nat_async_mask, linux_nat_terminal_inferior and
8488 linux_nat_terminal_ours.
8489 (_initialize_linux_nat): Remove local action variable, and update
8490 code that used it to use sync_sigchld_action. Add new
8491 "lin-lwp-async" debug set/show command. Put the "lin-lwp" debug
8492 set/show command in the maintenance class. Add new "linux-async"
8493 maintenance set/show command. Block SIGCHLD by default. Setup
8494 async_sichld_action, and sync_sigchld_action. Install the default
8495 async mode.
8496 (lin_thread_get_thread_signals): Use a local sigset_t for blocking
8497 the cancel signals.
8498
8499 * linux-thread-db.c (re_check_for_thread_db): New.
8500 (clear_lwpid_callback): Handle TARGET_WAITKIND_IGNORE.
8501 (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
8502 (thread_db_async_mask): New.
8503 (init_thread_db_ops): Register thread_db_can_async_p,
8504 thread_db_is_async_p, thread_db_async and thread_db_async_mask.
8505
8506 * remote.c (remote_async_mask_value): New.
8507 (remote_return_zero): New.
8508 (init_remote_ops): Register remote_return_zero as callbacks of
8509 to_can_async_p and to_is_async_p.
8510 (remote_can_async_p, remote_is_async_p, remote_async): Update to
8511 use remote_async_mask_value.
8512 (remote_async_mask): New.
8513 (init_remote_async_ops): Remove to_async_mask_value setting and
8514 register remote_async_mask as to_async_mask callback in
8515 remote_async_ops.
8516
8517 * Makefile.in (linux-nat.o): Update.
8518
8519 2008-03-21 Daniel Jacobowitz <dan@codesourcery.com>
8520
8521 * gdbthread.h (add_thread_with_info): New.
8522 * linux-thread-db.c: Add some documentation.
8523 (GET_LWP, GET_PID, GET_THREAD, is_lwp, is_thread, BUILD_LWP): Delete.
8524 (struct private_thread_info): Remove th_valid and ti_valid.
8525 Replace ti with tid.
8526 (thread_get_info_callback): Do not add TID to the new ptid. Do
8527 not cache th or ti.
8528 (thread_db_map_id2thr, lwp_from_thread): Delete functions.
8529 (thread_from_lwp): Assert that the LWP is set. Do not add TID to the
8530 new PTID.
8531 (attach_thread): Handle an already-existing thread. Use
8532 add_thread_with_info. Cache the th and tid.
8533 (detach_thread): Verify that private was set. Remove verbose
8534 argument and printing. Update caller.
8535 (thread_db_detach): Do not adjust inferior_ptid.
8536 (clear_lwpid_callback, thread_db_resume, thread_db_kill): Delete.
8537 (check_event, find_new_threads_callback): Do not add TID to the new PTID.
8538 (thread_db_wait): Do not use lwp_from_thread.
8539 (thread_db_pid_to_str): Use the cached TID.
8540 (thread_db_extra_thread_info): Check that private is set.
8541 (same_ptid_callback): Delete.
8542 (thread_db_get_thread_local_address): Do not use it or check
8543 is_thread. Check that private is set. Assume that the thread
8544 handle is already cached.
8545 (init_thread_db_ops): Remove to_resume and to_kill.
8546 * thread.c (add_thread_with_info): New.
8547 (add_thread): Use it.
8548 * linux-nat.c (find_thread_from_lwp): Delete.
8549 (exit_lwp): Do not use it. Check print_thread_events. Print before
8550 deleting the thread.
8551 (GET_PID, GET_LWP, BUILD_LWP, is_lwp): Move to...
8552 * linux-nat.h (GET_PID, GET_LWP, BUILD_LWP, is_lwp): ...here.
8553 * inf-ttrace.c (inf_ttrace_wait): Use print_thread_events and
8554 printf_unfiltered for thread exits.
8555 * procfs.c (procfs_wait): Likewise.
8556
8557 2008-03-21 Chris Demetriou <cgd@google.com>
8558
8559 * symtab.c (rbreak_command): Quote symbol name before passing
8560 it to break_command.
8561
8562 2008-03-21 Daniel Jacobowitz <dan@codesourcery.com>
8563
8564 * eval.c (evaluate_subexp_for_address): Clarify error message.
8565 Use value_must_coerce_to_target.
8566 * infcall.c (value_arg_coerce): Call value_coerce_to_target.
8567 * valops.c (value_assign): Call value_coerce_to_target when
8568 assigning to anything but internalvars. Leave GDB-side arrays
8569 as arrays when assigning to internalvars.
8570 (value_must_coerce_to_target, value_coerce_to_target): New.
8571 (value_coerce_array, value_addr): Call value_coerce_to_target.
8572 (value_array): Create the array in GDB's memory instead of
8573 the inferior's.
8574 * value.h (value_must_coerce_to_target, value_coerce_to_target):
8575 Declare.
8576
8577 2008-03-21 Daniel Jacobowitz <dan@codesourcery.com>
8578
8579 * top.c (quit_confirm): Warn that we will kill the program.
8580
8581 2008-03-19 Pedro Alves <pedro@codesourcery.com>
8582
8583 * inflow.c (terminal_ours_1): Guard access to
8584 inferior_process_group with #ifdef PROCESS_GROUP_TYPE.
8585
8586 2008-03-18 Ulrich Weigand <uweigand@de.ibm.com>
8587 Jim Blandy <jimb@codesourcery.com>
8588 Daniel Jacobowitz <drow@false.org>
8589
8590 * dwarf2expr.h (struct dwarf_expr_context): Add ADDR_SIZE member.
8591 (dwarf2_read_address): Update prototype.
8592
8593 * dwarf2expr.c (unsigned_address_type): Add ADDR_SIZE parameter.
8594 (signed_address_type): Likewise.
8595 (dwarf2_read_address): Replace BYTES_READ parameter with ADDR_SIZE.
8596 (execute_stack_op): Update calls to unsigned_address_type,
8597 signed_address_type and dwarf2_read_address. Fix implementation
8598 of DW_OP_deref_size.
8599
8600 * dwarf2loc.h (dwarf2_per_cu_objfile): Add prototype.
8601 (dwarf2_per_cu_addr_size): Likewise.
8602 (struct dwarf2_locexpr_baton): Replace OBJFILE with PER_CU.
8603 (struct dwarf2_loclist_baton): Likewise.
8604
8605 * dwarf2loc.c (find_location_expression): Update calls to
8606 dwarf2_read_address. Use dwarf2_per_cu_objfile and
8607 dwarf2_per_cu_addr_size to retrieve PER_CU parameters.
8608 (locexpr_describe_location): Likewise.
8609 (dwarf2_evaluate_loc_desc): Replace OBJFILE with PER_CU parameter.
8610 Set ctx->addr_size to dwarf2_per_cu_addr_size (per_cu).
8611 (dwarf2_loc_desc_needs_frame): Add PER_CU parameter. Set ctx->addr_size
8612 to dwarf2_per_cu_addr_size (per_cu).
8613 (locexpr_read_variable): Update dwarf2_evaluate_loc_desc call.
8614 (loclist_read_variable): Likewise.
8615 (locexpr_read_needs_frame): Update dwarf2_loc_desc_needs_frame call.
8616
8617 * dwarf2read.c (dwarf2_symbol_mark_computed): Set baton->per_cu
8618 instead of baton->objfile.
8619 (dwarf2_per_cu_obfile): New function.
8620 (dwarf2_per_cu_addr_size): Likewise.
8621
8622 * dwarf2-frame.c (struct comp_unit): Move higher.
8623 (struct dwarf2_cie): Add UNIT and ADDR_SIZE members.
8624 (execute_stack_op): Add ADDR_SIZE parameter; set ctx->addr_size.
8625 (execute_cfa_program): Add FDE parameter. Replace EH_FRAME_P
8626 parameter by using fde->eh_frame_p. Use read_encoded_value
8627 to implement DW_CFA_set_loc.
8628 (struct dwarf2_frame_cache): Add ADDR_SIZE member.
8629 (dwarf2_frame_cache): Set cache->addr_size. Update calls to
8630 execute_stack_op and execute_cfa_program.
8631 (dwarf2_frame_prev_register): Update calls to execute_stack_op.
8632 (size_of_encoded_value): Remove.
8633 (read_encoded_value): Add PTR_LEN and FUNC_BASE parameters.
8634 Remove call to size_of_encoded_value. Implement DW_EH_PE_funcrel.
8635 (add_cie): Set cie->unit backlink.
8636 (decode_frame_entry_1): Set cie->addr_size. Update calls to
8637 read_encoded_value.
8638 (dwarf2_build_frame_info): Allocate UNIT on objfile obstack.
8639
8640 2008-03-17 Markus Deuling <deuling@de.ibm.com>
8641
8642 * i386-tdep.c (i386_print_insn): Remove unnecessary call to
8643 gdbarch_bfd_arch_info.
8644
8645 2008-03-17 Joel Brobecker <brobecker@adacore.com>
8646
8647 * aix-thread.c (pdc_read_regs): Minor reformatting.
8648
8649 2008-03-17 Vladimir Prus <vladimir@codesourcery.com>
8650
8651 * thread.c (print_thread_info): Don't insist
8652 on having current thread if there are no
8653 threads at all.
8654
8655 2008-03-17 Pedro Alves <pedro@codesourcery.com>
8656
8657 * infcmd.c (attach_command_post_wait)
8658 (attach_command_continuation): New.
8659 (attach_command): Support background async execution, and async
8660 execution in synchronous mode.
8661
8662 2008-03-17 Daniel Jacobowitz <dan@codesourcery.com>
8663
8664 * stack.c (print_stack_frame, print_frame): Use RETURN_MASK_ERROR.
8665 * symmisc.c (dump_symtab_1): Likewise.
8666 * wrapper.c (gdb_value_struct_elt): Likewise.
8667
8668 2008-03-17 Pedro Alves <pedro@codesourcery.com>
8669
8670 * linux-nat.c (linux_nat_filter_event): Fix comment typo.
8671
8672 2008-03-17 Pedro Alves <pedro@codesourcery.com>
8673
8674 * linux-nat.c (linux_nat_filter_event): New, refactored from
8675 linux_nat_wait.
8676 (linux_nat_wait): Call linux_nat_filter_event.
8677
8678 2008-03-17 Ulrich Weigand <uweigand@de.ibm.com>
8679
8680 * top.c (execute_command): Fix uninitialized variable error.
8681
8682 2008-03-16 Nick Hudson <nick.hudson@dsl.pipex.com>
8683
8684 * Makefile.in (amd64nbsd-nat.o): New dependency.
8685 * amd64nbsd-nat.c: Include "nbsd-nat.h".
8686 (_initialize_amd64nbsd_nat): Update target vector to use
8687 nbsd_pid_to_exec_file.
8688 * config/i386/nbsd64.mh (NATDEPFILES): Add nbsd-nat.o.
8689
8690 2008-03-15 Vladimir Prus <vladimir@codesourcery.com>
8691
8692 Remove ignoring leading exec events code.
8693 * fork-child.c (startup_inferior): Do not set
8694 inferior_ignoring_leading_exec_events.
8695 * inf-child.c (inf_child_reported_exec_events_per_exec_call): Remove.
8696 (inf_child_target): Do not set to_reported_exec_events_per_exec_call.
8697 * infrun.c (inferior_ignoring_leading_exec_events): Remove.
8698 (handle_inferior_event): Remove code for ignoring leading exec
8699 events.
8700 * target.c (update_current_target): Do not inherit, or default,
8701 to_reported_exec_events_per_exec_call.
8702 (debug_to_reported_exec_events_per_exec_call): Remove.
8703 (setup_target_debug): Do not set to_reported_exec_events_per_exec_call.
8704 * target.h (target_reported_exec_events_per_exec_call): Remove.
8705 (struct target): Remove the to_reported_exec_events_per_exec_call
8706 field.
8707
8708 2008-03-15 Vladimir Prus <vladimir@codesourcery.com>
8709
8710 Implement -thread-info.
8711 * gdbthread.h (print_thread_info): Declare.
8712
8713 * thread.c (print_thread_info): New, extracted
8714 from info_threads_command and adjusted to
8715 work for CLI and MI.
8716 (info_threads_command): Use print_thread_info.
8717 * Makefile.in: Update dependencies.
8718
8719 * mi/mi-cmds.c (mi_cmds): Specify a handler
8720 for -thread-info.
8721 * mi/mi-cmds.h (mi_cmd_thread_info): Declare.
8722 * mi/mi-main.c (mi_cmd_thread_info): New.
8723 (mi_cmd_list_features): Include 'thread-info'.
8724
8725 2008-03-14 Kevin Buettner <kevinb@redhat.com>
8726
8727 * mips-tdep.c (mips32_scan_prologue): Use the ABI register size
8728 to decide whether to match instruction patterns using "sw" and "sd".
8729
8730 2008-03-14 Pedro Alves <pedro@codesourcery.com>
8731
8732 * infcmd.c (jump_command): Postpone disabling stdin until after
8733 the possible query.
8734
8735 2008-03-14 Pedro Alves <pedro@codesourcery.com>
8736
8737 * inflow.c (gdb_getpgrp): New.
8738 (gdb_has_a_terminal): Use get_getpgrp.
8739 (terminal_ours_1): If attach_flag is set, don't refetch
8740 inferior_process_group.
8741
8742 2008-03-14 Pedro Alves <pedro@codesourcery.com>
8743
8744 * features/library-list.dtd: Allow "section" elements as children
8745 of "library". Add "section" element and describe its attributes.
8746
8747 * solib-target.c (struct lm_info): Add section_bases member.
8748 (library_list_start_segment): Error out if seen a section element.
8749 (library_list_start_section): New.
8750 (library_list_end_library): New.
8751 (solib_target_free_library_list): Free section_bases.
8752 (section_attributes): New.
8753 (library_children): Make "segment" optional. Add "section" child.
8754 (library_list_children): Register library_list_end_library.
8755 (solib_target_relocate_section_addresses): Handle section bases.
8756
8757 * NEWS: Mention new qXfer:libraries:read section offsets support.
8758
8759 2008-03-14 Vladimir Prus <vladimir@codesourcery.com>
8760
8761 * defs.h (do_exec_error_cleanups, discard_exec_error_cleanups)
8762 (make_exec_error_cleanup): Remove declarations.
8763 * utils.c (exec_error_cleanup_chain): Remove.
8764 (do_exec_error_cleanups, discard_exec_error_cleanups)
8765 (make_exec_error_cleanup): Remove.
8766 * event-loop.c (start_event_loop): Adjust call to
8767 async_enable_stdin.
8768 * event-top.c (async_enable_stdin): Remove the paramater dummy.
8769 (async_disable_stdin): Don't register async_enable_stdin via
8770 cleanup.
8771 * inf-loop.c (inferior_event_handler): Don't
8772 call do_exec_error_cleanups. Call async_enable_stdin instead.
8773 * event-loop.c (start_event_loop): Adjust call to
8774 async_enable_stdin.
8775 * tui/tui-interp.c (tui_command_loop): Adjust call to
8776 async_enable_stdin.
8777
8778 2008-03-14 Vladimir Prus <vladimir@codesourcery.com>
8779
8780 Async mode fixes.
8781 * Makefile.in (infcmd.o, inf-loop.o): Update dependencies.
8782 * breakpoint.c (bpstat_do_actions): In async mode,
8783 don't jump to top expecting stop_bpstat to be already
8784 updated.
8785 * event-loop.c (start_event_loop): Call async_enable_stdin
8786 on exception.
8787 * event-top.c (async_enable_stdin): Do nothing if sync_execution
8788 is not set.
8789 (command_handler): Do not setup continuation here.
8790 (command_line_handler_continuation): Move to...
8791 * top.c (command_line_handler_continuation): ... here.
8792 (execute_command): In async mode, register continuation.
8793 Don't check frame's language in running in async mode.
8794 * exceptions.c (throw_exception): Don't do exec_error_cleanups.
8795 * inf-loop.c (complete_execution): Inline into...
8796 (inferior_event_handler): ... here. Clear target_executing before
8797 doing any cleanups. Don't try to show prompt if the target was
8798 resumed.
8799 * infcmd.c (signal_command): Add support for async mode.
8800 (finish_command): Only add continuation if the target was
8801 successfully resumed.
8802 * remote.c (init_async_opts): Register to_get_thread_local_address
8803 handler.
8804 * mi/mi-interp.c (mi_cmd_interpreter_exec): Don't mess
8805 with sync_execution.
8806 * tui/tui-interp.c (tui_command_loop): Call async_enable_stdin
8807 on exception.
8808
8809 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
8810
8811 * corefile.c (reopen_exec_file): Use exec_bfd_mtime.
8812 * exec.c (exec_bfd_mtime): Define.
8813 (exec_close): Clear it.
8814 (exec_file_attach): Set it.
8815 * gdbcore.h (exec_bfd_mtime): Declare.
8816 * source.c (find_source_lines): Do not use bfd_get_mtime.
8817
8818 2008-03-14 Vladimir Prus <vladimir@codesourcery.com>
8819
8820 * top.c (simplified_command_loop): Remove.
8821
8822 2008-03-14 Vladimir Prus <vladimir@codesourcery.com>
8823
8824 Remove unused remote.c hooks.
8825 * remote.c (deprecated_target_resume_hook)
8826 (deprecated_target_wait_loop_hook): Remove.
8827 (remote_resume): Do not call deprecated_target_resume_hook.
8828 (remote_wait): Do not call deprecated_target_wait_loop_hook.
8829 (remote_async_wait): Likewise.
8830
8831 2008-03-14 Vladimir Prus <vladimir@codesourcery.com>
8832
8833 Implement MI notification for new threads.
8834 * doc/observer.texi (new_thread): Document.
8835 * observer.sh: Forward declare struct thread_info.
8836 * thread.c (add_thread): Notify observer.
8837
8838 * interps.h (interp_init_ftype): New parameter
8839 top_level.
8840 (interp_set): Likewise.
8841 (top_level_interpreter_data): Declare.
8842 * interps.c (interp_set): New parameter top_level.
8843 Pass it to interpreter's init function. Remember
8844 top level interpreter.
8845 (interpreter_exec_cmd): Adjust.
8846 (top_level_interpreter_data): New.
8847 * main.c (captured_main): Pass 1 for top_level
8848 parameter of interp_set.
8849 * cli/cli-interp.c (cli_interpreter_init): New
8850 parameter top_level.
8851 * tui/tui-interp.c (tui_init): New parameter top_level.
8852
8853 * mi/mi-interp.c (mi_new_thread): New.
8854 (mi_interpreter_init): If top level, register
8855 observer for new threads.
8856
8857 * Makefile.in (mi-interp.o, thread.o): Update dependencies.
8858
8859 2008-03-14 Pedro Alves <pedro@codesourcery.com>
8860
8861 * top.c (execute_command): Disable break and stop
8862 commands in async mode.
8863
8864 2008-03-14 Pedro Alves <pedro@codesourcery.com>
8865
8866 revert:
8867 2008-03-14 Pedro Alves <pedro@codesourcery.com>
8868 * inf-loop.c (inferior_event_handler): Don't include remote.h.
8869 Call target_stop in the INF_QUIT_REQ case.
8870 * Makefile.in (inf-loop.o): Update.
8871
8872 2008-03-14 Pedro Alves <pedro@codesourcery.com>
8873
8874 * inf-loop.c (inferior_event_handler): Don't include remote.h.
8875 Call target_stop in the INF_QUIT_REQ case.
8876 * Makefile.in (inf-loop.o): Update.
8877
8878 2008-03-14 Pedro Alves <pedro@codesourcery.com>
8879
8880 * top.c (execute_command): Enable break, info and interrupt
8881 commands in async mode.
8882
8883 2008-03-13 Vladimir Prus <vladimir@codesourcery.com>
8884 Daniel Jacobowitz <dan@codesourcery.com>
8885
8886 * breakpoint.h (breakpoint_restore_shadows): New
8887 declaration.
8888 * breakpoint.c (breakpoint_restore_shadows): New.
8889 (read_memory_nobpt): Delete.
8890 * gdbcore.h (read_memory_nobpt): Delete declaration.
8891 * target.c (memory_xfer_partial): Call
8892 breakpoint_restore_shadows.
8893 (restore_show_memory_breakpoints)
8894 (make_show_memory_breakpoints_cleanup): New.
8895 (show_memory_breakpoints): New.
8896 * target.h (make_show_memory_breakpoints_cleanup): Declare.
8897 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
8898 Make sure we see memory breakpoints when checking if
8899 breakpoint is still there.
8900 * alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
8901 hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
8902 m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
8903 sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
8904
8905 2008-03-12 Pedro Alves <pedro@codesourcery.com>
8906
8907 * thread.c (add_thread): Use printf_unfiltered to print.
8908
8909 2008-03-12 Joel Brobecker <brobecker@gnat.com>
8910
8911 * sol-thread.c: Replace use of TM_I386SOL2_H by an expression
8912 that is true only on x86-solaris and x86_64-solaris.
8913 * procfs.c: Likewise. Move procfs_find_LDT_entry up together
8914 with proc_get_LDT_entry.
8915
8916 2008-03-12 Thiago Jung Bauermann <bauerman@br.ibm.com>
8917
8918 * configure.ac (AC_CHECK_FUNCS): Add check for setsid.
8919 * config.in, configure: Regenerate.
8920 * fork-child.c (fork_inferior): Call create_tty_session.
8921 * inflow.c (new_tty): Set controlling terminal with TIOCSCTTY.
8922 (create_tty_session): New function.
8923 * terminal.h: Declare create_tty_session.
8924
8925 2008-03-12 Alan Modra <amodra@bigpond.net.au>
8926
8927 PR 5900
8928 * elfread.c (elf_symtab_read): Make shndx an unsigned int.
8929 * mipsread.c: Include elf/internal.h.
8930 (read_alphacoff_dynamic_symtab): Map external reserved sym_shndx
8931 to internal range.
8932
8933 2008-03-11 Markus Deuling <deuling@de.ibm.com>
8934
8935 * win32-nat.c (do_win32_fetch_inferior_registers): Use get_regcache_arch
8936 to get at the current architecture and at the target specific vector.
8937 Add target specific vector to I387_FISEG_REGNUM and I387_FOP_REGNUM and
8938 remove define of I387_ST0_REGNUM.
8939
8940 * amd64-tdep.c (I387_ST0_REGNUM): Remove define.
8941
8942 (amd64_supply_fxsave, amd64_collect_fxsave): Use get_regcache_arch to
8943 get at the current architecture
8944 (I387_FISEG_REGNUM, I387_FOSEG_REGNUM): Add target specific vector as
8945 parameter.
8946
8947 * i386-tdep.c: Remove various define's and undef's of I387_ST0_REGNUM,
8948 I387_NUM_XMM_REGS and I387_MM0_REGNUM.
8949
8950 (I387_NUM_XMM_REGS, I387_XMM0_REGNUM, I387_MXCSR_REGNUM,
8951 I387_ST0_REGNUM, I387_FCTRL_REGNUM, I387_MM0_REGNUM,
8952 (I387_FSTAT_REGNUM): Add target specific vector as parameter.
8953
8954 (i386_register_name, i386_dbx_reg_to_regnum): Use gdbarch_tdep to get
8955 at the target specific vector.
8956
8957 (i386_get_longjmp_target): Use get_frame_arch to get at the current
8958 architecture. Use gdbarch_tdep to get at the target specific vector.
8959
8960 (i386_fp_regnum_p, i386_fpc_regnum_p): Add gdbarch as parameter and
8961 update caller. Use gdbarch_tdep to get at the target specific vector.
8962
8963 (i386_register_to_value: Use get_frame_arch to get at the current
8964 architecture.
8965
8966 * i386-tdep.h (i386_fp_regnum_p, i386_fpc_regnum_p): Add gdbarch as
8967 parameter.
8968
8969 * i387-tdep.c (I387_FCTRL_REGNUM, I387_FSTAT_REGNUM, I387_FTAG_REGNUM,
8970 I387_FISEG_REGNUM, I387_FIOFF_REGNUM, I387_FOSEG_REGNUM
8971 I387_FOOFF_REGNUM, I387_FOP_REGNUM, I387_ST0_REGNUM, FSAVE_ADDR,
8972 FXSAVE_ADDR, I387_XMM0_REGNUM): Add target specific vector as parameter.
8973
8974 (I387_ST0_REGNUM, I387_NUM_XMM_REGS): Remove various define's and
8975 undef's.
8976
8977 (i387_convert_register_p, i387_register_to_value,
8978 i387_value_to_register): Update call for i386_fp_regnum_p.
8979
8980 * i387-tdep.h: Remove comment.
8981 (I387_ST0_REGNUM, I387_NUM_XMM_REGS, I387_MM0_REGNUM): Add define.
8982 (I387_FCTRL_REGNUM, I387_FSTAT_REGNUM, I387_FTAG_REGNUM,
8983 I387_FISEG_REGNUM, I387_FIOFF_REGNUM, I387_FOSEG_REGNUM,
8984 I387_FOOFF_REGNUM, I387_FOP_REGNUM, I387_XMM0_REGNUM,
8985 I387_MXCSR_REGNUM): Add target specific vector as parameter.
8986
8987 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8988
8989 * Makefile.in (fork-child.o): Update.
8990 * NEWS: Document "set exec-wrapper" and the gdbserver --wrapper
8991 argument. Gather all gdbserver features together.
8992 * fork-child.c (exec_wrapper): New variable.
8993 (fork_inferior): Use it.
8994 (startup_inferior): Skip an extra trap if using "set exec-wrapper".
8995 (unset_exec_wrapper_command, _initialize_fork_child): New.
8996
8997 2008-03-10 Hidetaka Takano <hidetaka.takano@glb.toshiba.co.jp>
8998
8999 * source.c (directory_command): Modify the determination of
9000 condition of terminal "from_tty".
9001
9002 2008-03-10 Matt Rice <ratmice@gmail.com>
9003
9004 * dwarf2read.c (set_cu_language): Add DW_LANG_ObjC.
9005
9006 2008-03-10 Hidetaka Takano <hidetaka.takano@glb.toshiba.co.jp>
9007
9008 * spu-tdep.c (info_spu_event_command): Insert a '\0' to the end
9009 of the data passing to strtoulst function.
9010 (info_spu_signal_command): Likewise.
9011
9012 2008-03-08 Vladimir Prus <vladimir@codesourcery.com>
9013
9014 * mi/mi-interp.c (mi_command_loop): Remove
9015 commented-out code.
9016
9017 2008-03-07 Joel Brobecker <brobecker@adacore.com>
9018
9019 * remote.c (extended_remote_attach_1): Make local variable pid an int
9020 instead of a pid_t.
9021
9022 2008-03-07 Joel Brobecker <brobecker@adacore.com>
9023
9024 * solib-svr4.c (svr4_same_1): New function, originally extracted
9025 from svr4_same and expanded to handle the sparc64 case.
9026 (svr4_same): Move up and reimplement using svr4_same_1.
9027 (enable_break): Use svr4_same_1 to do shared library name comparisons.
9028
9029 2008-03-07 Ramana Radhakrishnan <ramana.r@gmail.com>
9030
9031 * MAINTAINERS: Move self to Paper trail.
9032
9033 2008-03-05 Daniel Jacobowitz <dan@codesourcery.com>
9034
9035 * Makefile.in (mingw-hdep.o, posix-hdep.o, remote-fileio.o): Update.
9036 * event-loop.c (call_async_signal_handler): New.
9037 * event-loop.h (call_async_signal_handler)
9038 (gdb_call_async_signal_handler): Declare.
9039 (mark_async_signal_handler): Add comments.
9040 * event-top.c (handle_sigint): Use gdb_call_async_signal_handler.
9041 * mingw-hdep.c (sigint_event, sigint_handler): New.
9042 (gdb_select): Use them. Wait for the readline signal handler
9043 to finish.
9044 (gdb_call_async_signal_handler, _initialize_mingw_hdep): New functions.
9045 * posix-hdep.c (gdb_call_async_signal_handler): New function.
9046 * remote-fileio.c (sigint_fileio_token, async_remote_fileio_interrupt):
9047 New.
9048 (remote_fileio_ctrl_c_signal_handler): Use
9049 gdb_call_async_signal_handler.
9050 (initialize_remote_fileio): Initialize sigint_fileio_token.
9051 * remote.c (initialize_sigint_signal_handler, handle_remote_sigint): Do
9052 not initialize tokens here.
9053 (handle_remote_sigint_twice): Likewise. Reinstall
9054 handle_remote_sigint.
9055 (async_remote_interrupt_twice): Just call interrupt_query.
9056 (cleanup_sigint_signal_handler): Do not delete tokens.
9057 (remote_interrupt, remote_interrupt_twice): Use
9058 gdb_call_async_signal_handler.
9059 (interrupt_query): Reinstall the default signal handler.
9060 (_initialize_remote): Initialize tokens here.
9061
9062 2008-03-04 Joel Brobecker <brobecker@adacore.com>
9063
9064 * features/rs6000/power-core.xml, features/rs6000/power64-core.xml,
9065 features/rs6000/powerpc-601.xml, features/rs6000/rs6000.xml:
9066 Change the type of the lr register to code_ptr.
9067 * features/rs6000/powerpc-32.c, features/rs6000/powerpc-403.c,
9068 features/rs6000/powerpc-403gc.c, features/rs6000/powerpc-505.c,
9069 features/rs6000/powerpc-601.c, features/rs6000/powerpc-602.c,
9070 features/rs6000/powerpc-603.c, features/rs6000/powerpc-604.c,
9071 features/rs6000/powerpc-64.c, features/rs6000/powerpc-7400.c,
9072 features/rs6000/powerpc-750.c, features/rs6000/powerpc-860.c,
9073 features/rs6000/powerpc-e500.c, features/rs6000/rs6000.c: Regenerate.
9074
9075 2008-03-03 James E. Wilson <wilson@tuliptree.org>
9076
9077 * MAINTAINERS: Update my email address.
9078
9079 2008-03-03 Keith Seitz <keiths@redhat.com>
9080
9081 From Dave Murphy <davem@devkitpro.org>:
9082 * configure.ac: Set tcl configdir to win under mingw.
9083 * configure: Regenerate.
9084
9085 2008-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9086
9087 * breakpoint.c (fetch_watchpoint_value): New function.
9088 (update_watchpoint): Set and clear val_valid. Use
9089 fetch_watchpoint_value. Handle unreadable values on the
9090 value chain. Correct check for user-requested array watchpoints.
9091 (breakpoint_init_inferior): Clear val_valid.
9092 (watchpoint_value_print): New function.
9093 (print_it_typical): Use it. Do not free or clear old_val. Print
9094 watchpoints even if old_val == NULL.
9095 (watchpoint_check): Use fetch_watchpoint_value. Check for values
9096 becoming readable or unreadable.
9097 (watch_command_1): Use fetch_watchpoint_value. Set val_valid.
9098 (do_enable_watchpoint): Likewise.
9099 * breakpoint.h (struct breakpoint): Update comment for val. Add
9100 val_valid.
9101 * NEWS: Mention watchpoints on inaccessible memory.
9102
9103 2007-02-29 Daniel Jacobowitz <dan@codesourcery.com>
9104
9105 * Makefile.in (i386-nat.o): Update.
9106 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Call
9107 i386_use_watchpoints.
9108 * i386-linux-nat.c (_initialize_i386_linux_nat): Call
9109 i386_use_watchpoints.
9110 * i386-nat.c (i386_stopped_data_address): Take two arguments.
9111 (i386_stopped_by_watchpoint): Update call.
9112 (i386_can_use_hw_breakpoint, i386_use_watchpoints): New.
9113 * config/i386/nm-i386.h: Conditionalize definitions on
9114 ! I386_WATCHPOINTS_IN_TARGET_VECTOR.
9115 (i386_use_watchpoints): Declare.
9116 (i386_stopped_data_address): Update.
9117 * config/i386/nm-linux.h (I386_WATCHPOINTS_IN_TARGET_VECTOR): Define.
9118 * config/i386/nm-linux64.h (I386_WATCHPOINTS_IN_TARGET_VECTOR): Define.
9119
9120 2008-02-29 Joel Brobecker <brobecker@adacore.com>
9121
9122 GDB 6.8 branch created (branch timestamp: 2008-02-26 10:00 UTC)
9123 * version.in: Bump version to 6.8.50.20080229-cvs.
9124
9125 2008-02-28 Markus Deuling <deuling@de.ibm.com>
9126
9127 * f-typeprint.c (f_print_type): Handle NULL pointer in VARSTRING
9128 properly.
9129
9130 2008-02-28 Tom Tromey <tromey@redhat.com>
9131
9132 * infcmd.c (notice_args_read): Print result of get_inferior_args.
9133
9134 2008-02-28 Daniel Jacobowitz <dan@codesourcery.com>
9135
9136 * infcmd.c (kill_if_already_running): Make static. Use
9137 target_require_runnable.
9138 * target.c (target_require_runnable): New.
9139 * target.h (target_require_runnable): Declare.
9140
9141 2008-02-28 Daniel Jacobowitz <dan@codesourcery.com>
9142
9143 * frame.c (reinit_frame_cache): Only annotate if frames were
9144 previously valid.
9145
9146 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9147
9148 * regformats/reg-ppc.dat: Rename "ps" to "msr".
9149 * regformats/reg-ppc64.dat: Likewise.
9150
9151 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9152
9153 * features/Makefile (%.dat): Emit xmltarget statement.
9154
9155 * regformats/regdat.sh: Support xmltarget and xmlarch statments.
9156 Generate code to set gdbserver_xmltarget in init_registers_${name}.
9157
9158 * regformats/arm-with-iwmmxt.dat: Regenerate.
9159 * regformats/mips64-linux.dat: Regenerate.
9160 * regformats/mips-linux.dat: Regenerate.
9161 * regformats/rs6000/powerpc-32.dat: Regenerate.
9162 * regformats/rs6000/powerpc-64.dat: Regenerate.
9163 * regformats/rs6000/powerpc-e500.dat: Regenerate.
9164
9165 * regformats/reg-arm.dat: Add xmlarch statement.
9166 * regformats/reg-i386.dat: Likewise.
9167 * regformats/reg-i386-linux.dat: Likewise.
9168 * regformats/reg-x86-64-linux.dat: Likewise.
9169 * regformats/reg-spu.dat: Likewise.
9170
9171 2008-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9172
9173 * remote.c (remote_wait, remote_async_wait): Stop if we receive
9174 an error.
9175
9176 2008-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9177
9178 * utils.c (debug_timestamp): New.
9179 (vfprintf_unfiltered): Print timestamps if requested.
9180 (show_debug_timestamp): New.
9181 (initialize_utils): Register "set debug timestamp".
9182 * NEWS: Mention "set debug timestamp". Add GDB 6.8 section.
9183
9184 2008-02-27 Joel Brobecker <brobecker@adacore.com>
9185
9186 * breakpoint.c (skip_prologue_sal): New function.
9187 (resolve_sal_pc): Adjust SAL past prologue if the SAL was
9188 computed from a line number.
9189
9190 2008-02-27 Joel Brobecker <brobecker@adacore.com>
9191
9192 * features/rs6000/power-core.xml, features/rs6000/power64-core.xml
9193 features/rs6000/powerpc-601.xml, features/rs6000/rs6000.xml:
9194 Set PC register type to "code_ptr".
9195 * features/rs6000/powerpc-32.c, features/rs6000/powerpc-403.c,
9196 features/rs6000/powerpc-403gc.c, features/rs6000/powerpc-505.c,
9197 features/rs6000/powerpc-601.c, features/rs6000/powerpc-602.c,
9198 features/rs6000/powerpc-603.c, features/rs6000/powerpc-604.c,
9199 features/rs6000/powerpc-64.c, features/rs6000/powerpc-7400.c,
9200 features/rs6000/powerpc-750.c, features/rs6000/powerpc-860.c,
9201 features/rs6000/powerpc-e500.c, features/rs6000/rs6000.c:
9202 Regenerate.
9203
9204 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9205
9206 * regformats/regdat.sh: Rename init_registers function in
9207 generated file to init_registers_${name}.
9208
9209 * regformats/reg-crisv32.dat: Set "name" to crisv32.
9210 * regformats/reg-ppc64.dat: Set "name" to ppc64.
9211 * regformats/reg-s390x.dat: Set "name" to s390x.
9212
9213 2008-02-26 Greg Law <glaw@undo-software.com>
9214
9215 * regcache.c (registers_changed): Call reinit_frame_cache.
9216
9217 2008-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9218
9219 * configure.tgt (sh-*-linux*): Match sh*. Add glibc-tdep.o.
9220 * sh-linux-tdep.c (sh_linux_init_abi): Use glibc_skip_solib_resolver
9221 and svr4_fetch_objfile_link_map.
9222 * Makefile.in (sh-linux-tdep.o): Update.
9223
9224 2008-02-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
9225
9226 * amd64-tdep.c (amd64_classify): Add support for decimal float
9227 types.
9228 * i386-tdep.c (i386_return_value): Make 128-bit decimal float
9229 use the struct return convention.
9230
9231 2008-02-26 Nick Roberts <nickrob@snap.net.nz>
9232
9233 * breakpoint.c (print_one_breakpoint_location): Revert Enb field
9234 to old format. Discard breakpoint address if shared library is
9235 unloaded.
9236 (breakpoint_1): Adjust formatting of table header accordingly.
9237
9238 2008-02-25 Vladimir Prus <vladimir@codesourcery.com>
9239
9240 * remote.c (remote_get_threadlist): If the response
9241 is empty, don't try to parse it.
9242
9243 2008-02-23 Vladimir Prus <vladimir@codesourcery.com>
9244
9245 Unbreak 'target async'.
9246 * serial.c (serial_async): Set the
9247 handler function before enabling async
9248 mode.
9249
9250 2008-02-22 Daniel Jacobowitz <dan@codesourcery.com>
9251
9252 * solib-svr4.c (enable_break): Convert r_brk to a code address.
9253
9254 2008-02-21 Pedro Alves <pedro@codesourcery.com>
9255
9256 * remote.c (extended_remote_attach_1): Set attach_flag.
9257 (extended_remote_create_inferior_1): Clear attach_flag.
9258
9259 2008-02-20 Daniel Jacobowitz <dan@codesourcery.com>
9260
9261 * mipsnbsd-tdep.c (mipsnbsd_ilp32_fetch_link_map_offsets): Set
9262 r_brk_offset.
9263 (mipsnbsd_lp64_fetch_link_map_offsets): Likewise.
9264 * solib-svr4.c (solib_svr4_r_brk): New.
9265 (open_symbol_file_object, svr4_current_sos): Always check the
9266 debug base.
9267 (svr4_fetch_objfile_link_map): Do not set debug_base.
9268 (enable_break): Use r_brk if it is set.
9269 (svr4_ilp32_fetch_link_map_offsets): Set r_brk_offset.
9270 (svr4_lp64_fetch_link_map_offsets): Likewise.
9271 * solib-svr4.h (struct link_map_offsets): Add r_brk_offset.
9272
9273 2008-02-20 Markus Deuling <deuling@de.ibm.com>
9274 Mark Kettenis <kettenis@gnu.org>
9275
9276 * alpha-tdep.c (alpha_heuristic_unwind_cache): Replace saved_regs by
9277 trad_frame_saved_reg.
9278 (trad-frame.h): New include.
9279
9280 (alpha_heuristic_frame_unwind_cache): Use trad_frame_alloc_saved_regs
9281 instead of frame_obstack_zalloc.
9282 (alpha_heuristic_frame_prev_register): Use trad_frame_get_prev_register.
9283
9284 * Makefile.in (alpha-tdep.o): Add dependency to trad_frame_h.
9285
9286 2008-02-20 Markus Deuling <deuling@de.ibm.com>
9287
9288 * rs6000-tdep.c (gdb_print_insn_powerpc): Get the current endianess
9289 from disassemble_info instead of gdbarch_byte_order.
9290
9291 * mips-tdep.c (gdb_print_insn_mips): Likewise.
9292 * arm-tdep.c (gdb_print_insn_arm): Likewise.
9293
9294 2008-02-20 Markus Deuling <deuling@de.ibm.com>
9295
9296 * gdbarch.sh (memory_insert_breakpoint, memory_remove_breakpoint): Add
9297 gdbarch as parameter.
9298
9299 * gdbarch.{c,h}: Regenerate.
9300
9301 * ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Add gdbarch as
9302 parameter.
9303 * mem-break.c (default_memory_insert_breakpoint)
9304 (default_memory_remove_breakpoint): Likewise.
9305 * target.h (default_memory_remove_breakpoint)
9306 (default_memory_insert_breakpoint): Likewise.
9307
9308 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Add gdbarch as
9309 parameter. Replace current_gdbarch by gdbarch.
9310 * m32r-tdep.c (m32r_memory_insert_breakpoint)
9311 (m32r_memory_remove_breakpoint): Likewise.
9312
9313 2008-02-19 Daniel Jacobowitz <dan@codesourcery.com>
9314
9315 * MAINTAINERS: Add Vladimir Prus as MI maintainer.
9316
9317 2008-02-19 Joel Brobecker <brobecker@adacore.com>
9318
9319 * NEWS: Add entry describing Add support improvements.
9320
9321 2008-02-18 Markus Deuling <deuling@de.ibm.com>
9322
9323 * m68klinux-nat.c (getfpregs_supplies): Replace gdbarch_fp0_regnum by
9324 M68K_FP0_REGNUM.
9325
9326 2008-02-18 Markus Deuling <deuling@de.ibm.com>
9327
9328 * sentinel-frame.c (sentinel_frame_prev_register): Do not call
9329 register_offset_hack anymore.
9330
9331 * regcache.{c,h} (register_offset_hack): Remove.
9332
9333 2008-02-18 Markus Deuling <deuling@de.ibm.com>
9334
9335 * hppa-tdep.h (find_global_pointer): Add gdbarch as parameter.
9336
9337 * hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer): Likewise. Replace
9338 current_gdbarch by gdbarch.
9339 (hppa64_hpux_find_global_pointer): Likewise.
9340 * hppa-tdep.c (hppa_find_global_pointer): Likewise.
9341 (hppa32_push_dummy_call, hppa64_push_dummy_call): Update call for
9342 find_global_pointer.
9343
9344 * hppabsd-tdep.c (hppabsd_find_global_pointer): Add gdbarch as
9345 parameter.
9346 * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Likewise.
9347
9348 * hppa-linux-nat.c (hppa_linux_register_addr): Use ARRAY_SIZE instead
9349 of gdbarch_num_regs.
9350
9351 * hppa-hpux-tdep.c (hppa_hpux_sr_for_addr): Add gdbarch as parameter and
9352 replace current_gdbarch by gdbarch.
9353 (hppa_hpux_push_dummy_code): Update call for hppa_hpux_sr_for_addr.
9354
9355 2008-02-18 Markus Deuling <deuling@de.ibm.com>
9356
9357 * rs6000-nat.c (exec_one_dummy_insn, regmap): Add gdbarch as parameter
9358 and replace current_gdbarch by gdbarch.
9359
9360 (store_register): Update call for exec_one_dummy_insn.
9361 (fetch_register, store_register): Update call of regmap.
9362
9363 * ppcnbsd-nat.c (getregs_supplies, getfpregs_supplies): Add gdbarch as
9364 parameter and replace current_gdbarch by gdbarch.
9365
9366 (ppcnbsd_store_inferior_registers): Use get_regcache_arch to get at
9367 the current architecture. Update call for getregs_supplies and
9368 getfpregs_supplies.
9369 (ppcnbsd_fetch_inferior_registers): Likewise.
9370
9371 * ppcobsd-nat.c (getfpregs_supplies): Add gdbarch as parameter and
9372 replace current_gdbarch by gdbarch.
9373 (ppcobsd_fetch_registers, ppcobsd_store_registers): Use
9374 get_regcache_arch to get at the current architecture. Update call for
9375 getfpregs_supplies.
9376
9377 2008-02-18 Markus Deuling <deuling@de.ibm.com>
9378
9379 * arch-utils.c (gdbarch_from_bfd): Remove unnecessary {old,new}_gdbarch
9380 variables.
9381
9382 2008-02-15 Markus Deuling <deuling@de.ibm.com>
9383
9384 * mips-linux-tdep.c (mips_linux_init_abi): Remove internal error.
9385
9386 2008-02-14 Vladimir Prus <vladimir@codesourcery.com>
9387
9388 * NEWS: Mention pending breakpints in MI.
9389
9390 2008-02-14 Markus Deuling <deuling@de.ibm.com>
9391
9392 * Makefile.in (ALL_TARGET_OBS): Remove dependency to xtensa-linux-nat.o.
9393
9394 2008-02-13 Markus Deuling <deuling@de.ibm.com>
9395
9396 Add script to build and test GDB using enable-targets=all.
9397
9398 * gdb_buildall.sh: New file.
9399
9400 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9401
9402 * NEWS (New native configurations): Xtensa GNU/Linux.
9403 (New targets): Xtensa GNU/Linux.
9404 * Makefile.in (ALL_TARGET_OBS): Add xtensa-linux-nat.o and
9405 xtensa-linux-tdep.o
9406 (ALLDEPFILES): Add xtensa-linux-tdep.c and xtensa-linux-nat.c
9407 (xtensa-linux-nat.o, xtensa-linux-tdep.o): New dependencies.
9408 * configure.tgt (xtensa*-*-linux*): New entry.
9409 * xtensa-config.c (xtensa_tdep): New variable.
9410 (xtensa_config_byte_order, xtensa_config_tdep): Removed.
9411 (rmap): Change format based on new macro XTREG.
9412 (XTENSA_CONFIG_INSTANTIATE): Use new macro defined in xtensa-tdep.h.
9413 * xtensa-linux-nat.c: New.
9414 * xtensa-linux-tdep.c: New.
9415 * xtensa-xtregs.c: New.
9416 * xtensa-tdep.h (xtensa_elf_gregset_t): Update.
9417 (XTENSA_ELF_NGREG, XTREG, XTREG_END, XTENSA_GDBARCH_TDEP_INSTANTIATE)
9418 (XCHAL_NUM_CONTEXTS, XCHAL_HAVE_EXCEPTIONS): New macros.
9419 (xtensa_register_t): New field coprocessor.
9420 (XTENSA_REGISTER_FLAGS_PRIVILEGED): Name spelling corrected.
9421 * xtensa-tdep.c (xtensa_config_tdep, xtensa_config_byte_order): Removed.
9422 (xtensa_pseudo_register_read, xtensa_pseudo_register_write):
9423 Update to handle privileged registers.
9424 (xtensa_supply_gregset) Remove exccause and excvaddr registers.
9425 (xtensa_push_dummy_call): Set windowstart register correctly.
9426 (call0_analyze_prologue): Initialize xtensa_default_isa.
9427 (xtensa_derive_tdep): New.
9428 (xtensa_gdbarch_init): Get rid of xtensa_config_byte_order and
9429 xtensa_config_tdep, use XCHAL_HAVE_BE and xtensa_tdep instead.
9430 Call xtensa_derive_tdep().
9431 * config/xtensa/linux.mh: New.
9432 * regformats/reg-xtensa.dat: New.
9433
9434 2008-02-09 Aleksandar Ristovski <aristovski@qnx.com> (tiny change)
9435
9436 * corelow.c (core_open): Use IS_ABSOLUTE_PATH.
9437 (filenames.h): New include.
9438 * Makefile.in (corelow.o): Add dependency for filenames.h.
9439
9440 2008-02-08 Doug Evans <dje@google.com>
9441
9442 * source.c (find_and_open_source): Always rewrite absolute filenames.
9443
9444 2008-02-07 Doug Evans <dje@google.com>
9445
9446 * breakpoint.c: #include "hashtab.h".
9447 (ambiguous_names_p): New fn.
9448 (update_breakpoint_locations): When restoring bp enable status, don't
9449 compare function names if any functions have same name.
9450 * Makefile.in (breakpoint.o): Add hashtab.h dependency.
9451
9452 2008-02-07 Joel Brobecker <brobecker@adacore.com>
9453
9454 * ada-lang.c (symbol_completion_add): Make SV parameter a VEC**
9455 instead of just a VEC*. Update use of SV.
9456 (ada_make_symbol_completion_list): Update symbol_completion_add calls.
9457
9458 2007-02-07 Joel Brobecker <brobecker@adacore.com>
9459
9460 * NEWS: Put all new commands since gdb-6.7 together.
9461
9462 2007-02-07 Joel Brobecker <brobecker@adacore.com>
9463
9464 * ada-lang.c: #include "vec.h".
9465 (struct string_vector, new_string_vector, string_vector_append):
9466 Delete.
9467 (char_ptr): New typedef.
9468 (DEF_VEC_P (char_ptr)): New VEC type.
9469 (symbol_completion_add): Update profile to take the new VEC type
9470 instead of the old string_vector structure. Update code accordingly.
9471 (ada_make_symbol_completion_list): Use the new VEC type instead of
9472 the old string_vector structure, and update the code accordingly.
9473 * Makefile.in (ada-lang.o): Add dependency on vec.h.
9474
9475 2008-02-06 Pierre Muller <muller@ics.u-strasbg.fr>
9476
9477 * p-exp.y: Set current_type in missing places.
9478 (leftdiv_is_integer): New static variable.
9479 Typecast right operand of BINOP_DIV to long_double if both operands
9480 are integers.
9481
9482 2008-02-06 Maciej W. Rozycki <macro@mips.com>
9483
9484 * remote-mips.c (set_breakpoint): Rename to...
9485 (mips_set_breakpoint): ... this.
9486 (clear_breakpoint): Rename to...
9487 (mips_clear_breakpoint): ... this.
9488 (common_breakpoint): Rename to...
9489 (mips_common_breakpoint): ... this.
9490 (check_lsi_error): Rename to...
9491 (mips_check_lsi_error): ... this.
9492
9493 2007-02-05 Joel Brobecker <brobecker@adacore.com>
9494
9495 * language.h (struct language_defn): Add new field
9496 la_make_symbol_completion_list.
9497 * symtab.c (default_make_symbol_completion_list): Renames
9498 make_symbol_completion_list.
9499 (make_symbol_completion_list): New function.
9500 * symtab.h (default_make_symbol_completion_list): Add declaration.
9501 * langauge.c (unknown_language): Set la_make_symbol_completion_list.
9502 (auto_language, local_language): Likewise.
9503 * objc-lang.c (objc_language_defn): Likewise.
9504 * scm-lang.c (scm_language_defn): Likewise.
9505 * m2-lang.c (m2_language_defn): Likewise.
9506 * f-lang.c (f_language_defn): Likewise.
9507 * jv-lang.c (java_language_defn): Likewise.
9508 * p-lang.c (pascal_language_defn): Likewise.
9509 * c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn)
9510 (minimal_language_defn): Likewise.
9511 * ada-lang.c (struct string_vector): New structure.
9512 (new_string_vector, string_vector_append, ada_unqualified_name)
9513 (add_angle_brackets, symbol_completion_match, symbol_completion_add)
9514 (ada_make_symbol_completion_list): New functions.
9515 (ada_language_defn): Set la_make_symbol_completion_list.
9516 * ada-lang.h (ada_make_symbol_completion_list): Remove declaration,
9517 this function is static.
9518
9519 2008-02-05 Kevin Buettner <kevinb@redhat.com>
9520
9521 * mn10300-tdep.c (mn10300_push_dummy_call): Adjust stack pointer
9522 to account for call site optimizations.
9523
9524 2008-02-05 Andrzej Zaborowski <balrogg@gmail.com>
9525
9526 * tracepoint.c (read_actions): Handle end-of-text indicator
9527 in action list properly. (Committed by Jim Blandy)
9528
9529 2008-02-05 Jim Blandy <jimb@red-bean.com>
9530
9531 * ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a
9532 pseudoregister, not an internal error.
9533 Reported by: Andrzej Zaborowski
9534
9535 2008-02-04 Vladimir Prus <vladimir@codesourcery.com>
9536
9537 * varobj.c (c_value_of_variable): Use xstrdup.
9538
9539 2008-02-04 Vladimir Prus <vladimir@codesourcery.com>
9540
9541 Update stored rendition of varobj value when format changes.
9542 * varobj.c (varobj_set_display_format): Recomputed
9543 print_value.
9544 (c_value_of_variable): Return print_value.
9545
9546 2008-02-03 Doug Evans <dje@google.com>
9547
9548 * eval.c (evaluate_subexp_standard): Fix type of result of mixed
9549 integer/float division operations when EVAL_AVOID_SIDE_EFFECTS.
9550 * valops.c (value_one): New function.
9551 * value.h (value_one): Declare.
9552
9553 Fix argument promotion for binary arithmetic ops for C.
9554 * valarith.c (unop_result_type): New fn.
9555 (binop_result_type): New fn.
9556 (value_binop): Move result type computation to binop_result_type.
9557 (value_pos, value_neg, value_complement): Move result type
9558 computation to unop_result_type.
9559
9560 PR 2384
9561 * gdbtypes.c (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
9562 Return basetype, fieldno if found. All callers updated.
9563 Don't cache TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE if from different
9564 objfile.
9565 * gdbtypes.h (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
9566 * symfile.h (fill_in_vptr_fieldno): Delete.
9567
9568 2008-02-02 Doug Evans <dje@google.com>
9569
9570 * valarith.c (value_binop): Handle unsigned BINOP_REM division by zero.
9571
9572 * typeprint.c (*): Whitespace cleanup.
9573
9574 2008-02-02 Mark Kettenis <kettenis@gnu.org>
9575 Luis Machado <luisgpm@br.ibm.com>
9576 Thiago Jung Bauermann <bauerman@br.ibm.com>
9577
9578 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Pass floats that
9579 don't fit into registerson the stack the way GCC does.
9580
9581 2008-02-01 Joel Brobecker <brobecker@adacore.com>
9582
9583 * symtab.c (symbol_set_names): Do not add an entry in the demangling
9584 hash table for Ada symbols. Just store the linkage name as is,
9585 and leave the demangled_name as NULL.
9586
9587 2007-02-01 Joel Brobecker <brobecker@adacore.com>
9588
9589 * dwarf2read.c (add_partial_symbol): Always store all Ada subprograms
9590 in the global scope.
9591 (new_symbol): Likewise.
9592
9593 2008-02-01 Vladimir Prus <vladimir@codesourcery.com>
9594
9595 * breakpoint.c (break_command_1): Return void.
9596 (break_command_really): Return void. Rethrow
9597 exceptions instead of returning.
9598 (gdb_breakpoint): Remove the error_message parameter.
9599 Return void. Rename to set_breakpoint.
9600 * gdb.h (gdb_breakpoint): Rename and move to...
9601 * breakpoint.h (set_breakpoint): ...here.
9602 * mi/mi-cmb-break.c (mi_cmd_break_insert): Restore
9603 event hooks even if exception is thrown. Adjust to
9604 gdb_breakpoint interface changes.
9605
9606
9607 2008-02-01 Thiago Jung Bauermann <bauerman@br.ibm.com>
9608
9609 * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Write 32-bit
9610 float in both first and second word in the doubleword, to support
9611 old and new ABIs.
9612
9613 2008-02-01 Vladimir Prus <vladimir@codesourcery.com>
9614
9615 Properly rethrow exception. This fixes errors
9616 about non-existent functions for -break-insert.
9617 * breakpoint.c (break_command_really): Use throw_exception
9618 for rethrowing. If rethrowing, don't print the exception.
9619
9620 2008-01-31 Thiago Jung Bauermann <bauerman@br.ibm.com>
9621
9622 * NEWS: Mention Decimal Floating Point support.
9623
9624 2008-01-31 Joel Brobecker <brobecker@adacore.com>
9625
9626 * std-regs.c (value_of_builtin_frame_pc_reg): Change the returned
9627 value type to builtin_type_void_func_ptr.
9628
9629 2008-01-31 Andreas Krebbel <krebbel1@de.ibm.com>
9630
9631 * s390-tdep.c (is_float_singleton, is_float_like,
9632 alignment_of, s390_return_value): Make checks for
9633 TYPE_CODE_FLT to match TYPE_CODE_DECFLOAT as well.
9634
9635 2008-01-31 Luis Machado <luisgpm@br.ibm.com>
9636 Thiago Jung Bauermann <bauerman@br.ibm.com>
9637
9638 * infcmd.c (default_print_registers_info): Also print hex
9639 raw contents for TYPE_CODE_DECFLOAT registers.
9640 * ppc-tdep.h (gdbarch_tdep): Add ppc_dl0_regnum member.
9641 * rs6000-tdep.c (IS_DFP_PSEUDOREG): New macro.
9642 (rs6000_register_name): Add support for DFP pseudo-registers.
9643 (rs6000_pseudo_register_type): Likewise.
9644 rs6000_pseudo_register_reggroup_p): Likewise.
9645 (ppc_pseudo_register_read): New function.
9646 (ppc_pseudo_register_write): Likewise.
9647 (rs6000_pseudo_register_read): Likewise.
9648 (rs6000_pseudo_register_write): Likewise.
9649 (e500_pseudo_register_read): Move checks to
9650 rs6000_pseudo_register_read.
9651 (e500_pseudo_register_write): Move checks to
9652 rs6000_pseudo_register_write.
9653 (rs6000_gdbarch_init): Initialize tdep->ppc_dl0_regnum. Install
9654 rs6000_pseudo_register_read and rs6000_pseudo_register_write
9655 in gdbarch if SPE or DFP is available. Adjust gdbarch's
9656 num_pseudo_regs to account for DFP pseudo regs.
9657
9658 2008-01-31 Thiago Jung Bauermann <bauerman@br.ibm.com>
9659
9660 * ppc-tdep.h (struct gdbarch_tdep): Remove ppc_ev31_regnum member.
9661 * rs6000-tdep.c (IS_SPE_PSEUDOREG): New macro.
9662 (spe_register_p, rs6000_register_name, rs6000_pseudo_register_type,
9663 rs6000_pseudo_register_reggroup_p, e500_move_ev_register,
9664 e500_pseudo_register_read, e500_pseudo_register_write): Use
9665 IS_SPE_PSEUDOREG macro.
9666 (rs6000_frame_cache): Remove use of tdep->ppc_ev31_regnum.
9667 (rs6000_gdbarch_init): Remove unnecessary num_sprs local variable.
9668 Remove initialization of tdep->ppc_ev31_regnum.
9669
9670 2008-01-08 Paul Hilfinger <hilfinger@adacore.com>
9671
9672 * printcmd.c (print_formatted): Handle references as for unformatted
9673 prints.
9674
9675 2008-01-30 Joel Brobecker <brobecker@adacore.com>
9676
9677 * eval.c (evaluate_subexp_standard): Add handling of user
9678 registers when in EVAL_AVOID_SIDE_EFFECTS mode.
9679
9680 2008-01-30 Pierre Muller <muller@ics.u-strasbg.fr>
9681
9682 * eval.c (evaluate_subexp_standard): Support
9683 BINOP_INTDIV opcode.
9684
9685 2008-01-30 Paul N. Hilfinger <hilfinger@adacore.com>
9686
9687 * valarith.c (value_binop): Add floating-point BINOP_MIN and
9688 BINOP_MAX cases.
9689 For BINOP_EXP, use length and signedness of left operand only for
9690 result, as for shifts.
9691 For integral operands to BINOP_EXP, use new integer_pow and
9692 uinteger_pow functions so as to get full range of results.
9693 (integer_pow): New function.
9694 (uinteger_pow): New function.
9695
9696 2008-01-30 Vladimir Prus <vladimir@codesourcery.com>
9697
9698 Use vector for varobj_list_children interface.
9699 * gdb/varobj.c (varobj_list_children): Return vector
9700 of varobjs.
9701 * gdb/varobj.h (varobj_list_children): Adjust
9702 prototype.
9703 (varobj_p): Declare. Declare vector thereof.
9704 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust
9705 for varobj_list_children change.
9706 * Makefile.in (varobj_h): Update dependencies.
9707
9708 2008-01-30 Thiago Jung Bauermann <bauerman@br.ibm.com>
9709
9710 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Add support for
9711 TYPE_CODE_DECFLOAT arguments.
9712 (ppc64_sysv_abi_push_dummy_call) Likewise.
9713 (get_decimal_float_return_value): New function.
9714 (do_ppc_sysv_return_value): Add support for TYPE_CODE_DECFLOAT return
9715 values by calling get_decimal_float_return_value.
9716 (ppc64_sysv_abi_return_value): Likewise.
9717
9718 2008-01-30 Nick Roberts <nickrob@snap.net.nz>
9719
9720 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Add field
9721 for preprocessor macro information. Formatting changes.
9722
9723 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9724
9725 * remote.c (struct remote_state): Add cached_wait_status.
9726 (remote_exec_file): New variable.
9727 (PACKET_vAttach, PACKET_vRun): New constants.
9728 (extended_remote_restart): Do not query for status.
9729 (struct start_remote_args): New.
9730 (remote_start_remote): Take it as a second argument. Check
9731 whether the target is running. Issue an error for non-running
9732 non-extended targets. Cache the wait status. Set inferior_ptid
9733 here.
9734 (remote_open_1): Prompt to disconnect non-running targets. Make
9735 sure the target is marked running. Do not set inferior_ptid here.
9736 Update call to remote_start_remote. Do not call remote_check_symbols
9737 if the target is not running.
9738 (remote_detach_1): Rename from remote_detach. Take an EXTENDED
9739 argument. Handle a non-running target.
9740 (remote_detach): Use it.
9741 (extended_remote_detach): New.
9742 (remote_disconnect): Fix typo. Use remoute_mourn_1.
9743 (extended_remote_attach_1, extended_remote_attach)
9744 (extended_async_remote_attach): New.
9745 (remote_vcont_resume): Remove unused variable.
9746 (remote_wait, remote_async_wait): Use any cached wait status.
9747 (putpkt_binary, getpkt): Clear any cached wait status.
9748 (extended_remoute_mourn_1): New.
9749 (extended_remote_mourn): Use it.
9750 (extended_async_remote_mourn, extended_remote_run): New.
9751 (extended_remote_create_inferior_1): New.
9752 (extended_remote_create_inferior): Use it.
9753 (extended_remote_async_create_inferior): Likewise.
9754 (remote_xfer_partial): Skip for non-executing targets.
9755 (init_extended_remote_ops): Set to_detach and to_attach.
9756 (init_extended_async_remote_ops): Likewise. Use
9757 extended_async_remote_mourn.
9758 (_initialize_remote): Register vAttach, vRun, and
9759 set remote exec-file.
9760 * NEWS: Mention vAttach, vRun, and gdbserver extended-remote support.
9761
9762 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9763
9764 * Makefile.in (symfile.o): Update.
9765 * NEWS: Mention exec tracing support.
9766 * inf-ttrace.c (inf_ttrace_wait): Return TARGET_WAITKIND_EXECD for
9767 exec events.
9768 * infcmd.c (kill_if_already_running, detach_command)
9769 (disconnect_command): Replace SOLIB_RESTART with no_shared_libraries.
9770 * infrun.c (MAY_FOLLOW_EXEC, may_follow_exec): Delete.
9771 (follow_exec): Do not check may_follow_exec. Do not mourn and push
9772 targets. Apply the sysroot path to the loaded executable. Use
9773 no_shared_libraries.
9774 * linux-nat.c (linux_child_follow_fork): Print fork following
9775 messages if verbose.
9776 (kill_wait_callback): Kill again before waiting a second time.
9777 * symfile.c (symbol_file_clear): Replace SOLIB_RESTART with
9778 no_shared_libraries.
9779
9780 2008-01-29 Joel Brobecker <brobecker@adacore.com>
9781
9782 * amd64-tdep.c (amd64_classify): Add handling of TYPE_CODE_CHAR.
9783
9784 2008-01-29 Joel Brobecker <brobecker@adacore.com>
9785
9786 * nto-tdep.h: Remove #include "defs.h".
9787 * nto-tdep.c: Add #include "defs.h".
9788 * Makefile.in (nto_tdep_h): Update dependencies.
9789 (nto-tdep.o): Likewise.
9790
9791 2008-01-29 Joel Brobecker <brobecker@adacore.com>
9792
9793 * infrun.c (wait_for_inferior): Add treat_exec_as_sigtrap parameter
9794 and use it.
9795 (proceed, start_remote): Update call to wait_for_inferior.
9796 * inferior.h (wait_for_inferior): Update declaration.
9797 * fork-child.c, infcmd.c, solib-irix.c, solib-osf.c, solib-sunos.c,
9798 solib-svr4.c, win32-nat.c: Update calls to wait_for_inferior.
9799 * inf-ttrace.c (inf_ttrace_wait): Report TTEVT_EXEC events as
9800 TARGET_WAITKIND_EXECD instead of TARGET_WAITKIND_STOPPED.
9801
9802 2008-01-29 Aleksandar Ristovski <aristovski@qnx.com>
9803
9804 * varobj (adjust_value_for_child_access): Added checking for
9805 returned value from gdb_value_ind.
9806 (c_describe_child): Likewise.
9807 (cplus_describe_child): Fixed a typo.
9808
9809 2008-01-29 Jim Blandy <jimb@red-bean.com>
9810
9811 * MAINTAINERS: Update my info.
9812
9813 2008-01-29 Vladimir Prus <vladimir@codesourcery.com>
9814
9815 Use multiple locations for hardware watchpoints.
9816 This eliminates the need to traverse value chain, doing
9817 various checks, in three different places.
9818
9819 * breakpoint.h (struct bp_location): New fields
9820 lengths and watchpoint_type.
9821 (struct breakpoint): Remove the val_chain field.
9822 * breakpoint.c (is_hardware_watchpoint): New.
9823 (free_valchain): Remove.
9824 (update_watchpoint): New.
9825 (insert_bp_location): For hardware watchpoint, just
9826 directly insert it.
9827 (insert_breakpoints): Call update_watchpoint_locations
9828 on all watchpoints. If we have failed to insert
9829 any location of a hardware watchpoint, remove all inserted
9830 locations.
9831 (remove_breakpoint): For hardware watchpoints, directly
9832 remove location.
9833 (watchpoints_triggered): Iterate over locations.
9834 (bpstat_stop_status): Use only first location of
9835 a resource watchpoint.
9836 (delete_breakpoint): Don't call free_valchain.
9837 (print_one_breakpoint): Don't print all
9838 locations for watchpoints.
9839 (breakpoint_re_set_one): Use update_watchpoint for
9840 watchpoints.
9841
9842 2008-01-29 Vladimir Prus <vladimir@codesourcery.com>
9843
9844 Don't reset watchpoint block on solib load.
9845
9846 * breakpoint.c (insert_bp_location): For watchpoints,
9847 recompute condition.
9848 (breakpoint_re_set_one): Instead of recomputing value
9849 and condition for watchpoints, just reset value and
9850 let insert_breakpoints/insert_bp_location recompute it.
9851 Don't do anything about disabled watchpoint.
9852
9853 2008-01-29 Pierre Muller <muller@ics.u-strasbg.fr>
9854
9855 * valarith.c (value_binop): Handle unsigned integer
9856 division by zero.
9857
9858 2008-01-28 Kevin Buettner <kevinb@redhat.com>
9859
9860 * mn10300-tdep.c (mn10300_analyze_prologue): Check for an
9861 instruction pattern that appears frequently in position
9862 independent code. Fix bug in code which looks for "fmov" and
9863 backtracks if no "fmov" is found.
9864
9865 2008-01-28 Doug Evans <dje@google.com>
9866
9867 * dbxread.c (read_dbx_symtab): Fix indentation.
9868 Reformat comments to 80 columns.
9869 Move local var def closer to only use.
9870
9871 2008-01-28 Daniel Jacobowitz <dan@codesourcery.com>
9872
9873 * fork-child.c (SHELL_FILE): Remove #ifndef.
9874 (fork_inferior): Remove SHELL_COMMAND_CONCAT.
9875
9876 2008-01-25 Pierre Muller <muller@ics.u-strasbg.fr>
9877
9878 * i386-tdep.c (i386_skip_noop): New function.
9879 (i386_analyze_prologue): Call i386_skip_noop function.
9880
9881 2008-01-24 Michael Snyder <msnyder@specifix.com>
9882
9883 * procfs.c (procfs_xfer_partial): Comment, cut/paste error.
9884 * win32-nat.c (win32_xfer_partial): Ditto.
9885 * target.c (default_xfer_partial): Minor whitespace adjustment.
9886
9887 2008-01-24 Pedro Alves <pedro@codesourcery.com>
9888
9889 * arm-tdep.c (arm_addr_bits_remove): In non 26-bit mode, don't
9890 strip bit 1 even if pc doesn't point to thumb code.
9891
9892 2008-01-23 Daniel Jacobowitz <dan@codesourcery.com>
9893
9894 * remote.c (remote_wait): Handle SIGINT between packets.
9895 (remote_async_wait): Likewise.
9896
9897 2008-01-23 Vladimir Prus <vladimir@codesourcery.com>
9898 Chris Demetriou <cgd@google.com>
9899
9900 * thread.c (add_thread_silent): Renamed
9901 from add_thread.
9902 (print_thread_events): New variable definition.
9903 (show_print_thread_events): New function.
9904 (_initialize_thread): Add "set print thread-events" and
9905 "show print thread-events" commands.
9906 (add_thread): Announce new thread.
9907 * gdbthread.h (add_thread_silent): Declare.
9908 (print_thread_events): New variable declaration.
9909 * inf-ttrace.c (inf_ttrace_wait): Don't
9910 inform about new thread, as add_thread is always
9911 called too, and will take care of that.
9912 * infrun.c (handle_inferior_event): Likewise.
9913 * procfs.c (procfs_wait): Likewise.
9914 * remote.c (remote_currthread): Likewise.
9915 * sol-thread.c (sol_thread_wait): Likewise.
9916 * win32-nat.c (get_win32_debug_event): Likewise.
9917 * linux-thread-db.c (attach_thread): Likewise.
9918 Remove the verbose parameter.
9919 (check_event): Make detach_thread be verbose
9920 only if print_thread_events is set.
9921 * linux-nat.c (lin_lwp_attach_lwp): Don't inform
9922 about new thread. This is called only from
9923 linux-thread-db.c:attach_thread, which will take care.
9924 Remove the verbose parameter.
9925 * linux-nat.h (lin_lwp_attach_lwp): Adjust prototype.
9926
9927 2008-01-23 Nick Roberts <nickrob@snap.net.nz>
9928
9929 * mi/mi-cmd-var.c (mi_cmd_var_set_format): Add value field to output.
9930
9931 2008-01-22 Vladimir Prus <vladimir@codesourcery.com>
9932
9933 * breakpoint.c (break_command_really): New parameter
9934 ignore_count.
9935 (break_command_1): Pass 0 as
9936 ignore_count to break_command_really.
9937 (gdb_breakpoint): Pass ignore_count to
9938 break_command_really.
9939
9940 2008-01-21 Kevin Buettner <kevinb@redhat.com>
9941
9942 * mn10300-linux-tdep.c (am33_linux_sigframe_cache_init): Find
9943 sigcontext struct via pointer.
9944 (struct sigframe comment): Update to show new field `psc'.
9945
9946 2008-01-21 Vladimir Prus <vladimir@codesourcery.com>
9947
9948 * infrun.c (handle_inferior_event): If
9949 we failed to remove breakpoints, error,
9950 don't try to increment PC by hand.
9951
9952 2008-01-18 Nick Hudson <nick.hudson@dsl.pipex.com>
9953
9954 Add NetBSD/hppa target and host support.
9955
9956 * hppabsd-tdep.c (hppabsd_supply_gregset): Move to ...
9957 (hppabsd_gregset): Move to ...
9958 (hppabsd_regset_from_core_section): Rename
9959 hppaobsd_regset_from_core_section and move to ...
9960 (hppabsd_find_global_pointer): Update comment.
9961 (hppabsd_init_abi): Make global. Do not register
9962 hppabsd_regset_from_core_section.
9963 (hppabsd_core_osabi_sniffer): Rename hppaobsd_core_osabi_sniffer and
9964 move to ...
9965 (_initialize_hppabsd_tdep): Move to ...
9966 * hppaobsd-tdep.c: ... here. New file.
9967 * hppnbsd-tdep.c: New file.
9968 * hppnbsd-nat.c: New file.
9969 * Makefile.in (ALL_TARGET_OBS): Add hppanbsd-tdep.o and hppaobsd-tdep.o.
9970 (ALLDEPFILES): Add hppabsd-nat.c and hppabsd-tdep.c.
9971 (hppabsd-nat.o, hppabsd-tdep.o): New dependencies.
9972 (hppabsd-tdep.o, hppaobsd-tdep.o): Update dependencies.
9973 * configure.host (hppa*-*-netbsd*): New entry.
9974 * configure.tgt (hppa*-*-netbsd*): New entry.
9975 (hppa*-*-openbsd*): Update.
9976 * NEWS (New native configuration): Mention NetBSD/hppa.
9977 (New targets): Mention NetBSD/hppa.
9978
9979 2008-01-18 Markus Deuling <deuling@de.ibm.com>
9980
9981 * gdbarch.sh (function_list): Add new property bits_big_endian to
9982 gdbarch structure.
9983 * gdbarch.{c,h}: Regenerate.
9984
9985 * value.c (struct value): Replace BITS_BIG_ENDIAN by
9986 gdbarch_bits_big_endian (comment).
9987 (unpack_field_as_long, modify_field): Likewise.
9988 * value.h: Likewise (comment).
9989 * valops.c (value_slice): Likewise.
9990 * valarith.c (value_subscript, value_bit_index): Likewise.
9991 * gdbtypes.h (field): Likewise (comment).
9992 * eval.c (evaluate_subexp_standard): Likewise.
9993 * dwarf2read.c (dwarf2_add_field): Likewise.
9994 * ada-lang.c (decode_packed_array, ada_value_primitive_packed_val)
9995 (move_bits, ada_value_assign, value_assign_to_component): Likewise.
9996
9997 * defs.h (BITS_BIG_ENDIAN): Remove.
9998
9999 2008-01-18 Markus Deuling <deuling@de.ibm.com>
10000
10001 * jv-exp.y (yylex): Replace DEPRECATED_STREQN with the appropriate
10002 function calls.
10003 * m2-exp.y (yylex): Likewise.
10004 * objc-exp.y (yylex): Likewise.
10005
10006 * defs.h (DEPRECATED_STREQN): Remove.
10007
10008 2008-01-17 H.J. Lu <hjl.tools@gmail.com>
10009
10010 * MAINTAINERS: Update my email address.
10011
10012 2008-01-17 Jim Blandy <jimb@codesourcery.com>
10013
10014 * README: Mention gdbserver/README.
10015
10016 2008-01-17 Pierre Muller <muller@ics.u-strasbg.fr>
10017
10018 * valarith.c (value_binop): Handle BINOP_INTDIV
10019 for unsigned and signed integers.
10020
10021 2008-01-17 Ulrich Weigand <uweigand@de.ibm.com>
10022
10023 * s390-tdep.c (s390_gdbarch_init): Set default long double
10024 type to 128-bit IEEE quad.
10025
10026 2008-01-17 Joel Brobecker <brobecker@adacore.com>
10027
10028 * hpux-thread.c (hpux_thread_resume): Delete commented-out code.
10029
10030 2008-01-16 Mark Kettenis <kettenis@gnu.org>
10031
10032 * auxv.c (fprint_target_auxv): Add support for AT_SUN_AUXFLAGS.
10033
10034 * dfp.c, dfp.h: Rename decimal_to_double to decimal_to_doublest.
10035 * value.c: All callers changed.
10036
10037 2008-01-16 Markus Deuling <deuling@de.ibm.com>
10038
10039 * rs6000-nat.c (add_vmap, vmap_ldinfo, vmap_exec): Replace
10040 DEPRECATED_STREQ by its expression.
10041 * coffread.c (coff_locate_sections, coff_symtab_read): Likewise.
10042 * xcoffread.c (read_xcoff_symtab, read_symbol_lineno, find_linenos)
10043 (scan_xcoff_symtab): Likewise.
10044 * hppa-hpux-tdep.c (hppa_hpux_skip_trampoline_code): Likewise.
10045 * f-lang.c (find_common_for_function): Likewise.
10046 * objc-exp.y (parse_number): Likewise.
10047
10048 * defs.h (DEPRECATED_STREQ): Remove.
10049
10050 2008-01-16 Markus Deuling <deuling@de.ibm.com>
10051
10052 * mn10300-tdep.h (AM33_MODE): Add gdbarch as parameter.
10053 * mn10300-tdep.c (set_reg_offsets, mn10300_analyze_prologue): Use
10054 get_frame_arch to get at the current_architecture. Update AM33_MODE
10055 call.
10056 (mn10300_analyze_prologue): Add gdbarch as parameter. Update caller.
10057 (mn10300_frame_unwind_cache): Use get_frame_arch to get at the current
10058 architecture.
10059 (set_reg_offsets, mn10300_analyze_prologue): Fix indentation.
10060
10061 2008-01-16 Markus Deuling <deuling@de.ibm.com>
10062
10063 * amd64-nat.h (amd64_native_gregset_supplies_p): Add gdbarch as
10064 parameter.
10065 * amd64-nat.c (amd64_native_gregset_supplies_p): Likewise.
10066
10067 (amd64_native_gregset_reg_offset): Add gdbarch as parameter. Replace
10068 current_gdbarch by gdbarch. Update caller.
10069
10070 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers)
10071 (amd64_linux_store_inferior_registers): Use get_regcache_arch to get at
10072 the current architecture. Update calls of
10073 amd64_native_gregset_supplies_p.
10074 * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers)
10075 (amd64bsd_store_inferior_registers): Likewise.
10076
10077 2008-01-16 Markus Deuling <deuling@de.ibm.com>
10078
10079 * ppc-linux-nat.c (ppc_register_u_addr): Add gdbarch as parameter.
10080 Replace current_gdbarch by gdbarch. Update caller.
10081
10082 2008-01-16 Markus Deuling <deuling@de.ibm.com>
10083
10084 * dbxread.c (repeated_header_complaint, dbx_symfile_init)
10085 (read_dbx_dynamic_symtab, function_outside_compilation_unit_complaint)
10086 (read_dbx_symtab, end_psymtab, dbx_psymtab_to_symtab_1)
10087 (dbx_psymtab_to_symtab, read_ofile_symtab, process_one_symbol)
10088 (stabsect_build_psymtabs): Fix indentation.
10089
10090 2008-01-15 Michael Snyder <msnyder@specifix.com>
10091
10092 * corelow.c (core_xfer_partial): Comment, cut/paste error.
10093
10094 2008-01-14 Pierre Muller <muller@ics.u-strasbg.fr>
10095
10096 * win32-nat.c (win32_create_inferior): Restore code calling
10097 CloseHandle on ProcessInformation structure.
10098
10099 2008-01-13 Nick Hudson <nick.hudson@dsl.pipex.com>
10100
10101 * configure.ac: Check for void * as 3 argument of ptrace.
10102 * configure: regenerate.
10103
10104 2008-01-11 Markus Deuling <deuling@de.ibm.com>
10105
10106 * alpha-tdep.c (alpha_heuristic_proc_start)
10107 (alpha_sigtramp_register_address): Add gdbarch as parameter. Replace
10108 current_gdbarch by gdbarch.
10109
10110 (alpha_heuristic_frame_unwind_cache): Use get_frame_arch to get at the
10111 current architecture by frame_info. Update alpha_heuristic_proc_start
10112 call.
10113
10114 (alpha_sigtramp_frame_this_id, alpha_sigtramp_frame_prev_register): Use
10115 get_frame_arch to get at the current architecture by frame_info. Update
10116 alpha_sigtramp_register_address call.
10117
10118 * arm-tdep.c (thumb_scan_prologue): Add gdbarch as parameter and replace
10119 current_gdbarch by gdbarch. Update caller.
10120 (convert_to_extended, convert_from_extended): Add endianess parameter
10121 for comparison. Update caller.
10122 (arm_extract_return_value, arm_store_return_value): Use
10123 get_regcache_arch to get at the current architecture.
10124
10125 * cris-tdep.c (cris_register_size): Add gdbarch as parameter. Replace
10126 current_gdbarch by gdbarch. Update caller.
10127 (cris_gdb_func, move_to_preg_op, none_reg_mode_move_from_preg_op): Add
10128 gdbarch as parameter. Update caller. Replace current_gdbarch by gdbarch.
10129
10130 * h8300-tdep.c (E_PSEUDO_CCR_REGNUM, E_PSEUDO_EXR_REGNUM, BINWORD): Add
10131 gdbarch as parameter. Update caller.
10132 (h8300_init_frame_cache): Add gdbarch as parameter. Replace
10133 current_gdbarch by gdbarch. Update caller.
10134
10135 * hppa-tdep.c (skip_prologue_hard_way): Add gdbarch as parameter and
10136 update caller. Replace current_gdbarch by gdbarch.
10137
10138 * m32c-tdep.c (m32c_skip_trampoline_code): Use get_frame_arch to get at
10139 the current architecture. Replace current_gdbarch by gdbarch.
10140 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
10141 (STACK_CORRECTION, USE_PAGE_REGISTER): Replace M6811_TDEP by its
10142 expression. Add gdbarch as parameter and replace current_gdbarch with
10143 it. Update caller.
10144 (M6811_TDEP): Remove.
10145 (m68hc11_frame_prev_register): Use get_frame_arch to get at the current
10146 architecture.
10147 (m68hc11_scan_prologue): Add gdbarch as parameter. Replace
10148 current_gdbarch by gdbarch. Update caller.
10149
10150 * m68k-tdep.c (m68k_analyze_prologue): Add gdbarch as parameter and
10151 update caller.
10152 (m68k_analyze_register_saves): Likewise. Also replace current_gdbarch
10153 by gdbarch.
10154
10155 * rs6000-tdep.c (skip_prologue): Add gdbarch as parameter and update
10156 caller. Relace current_gdbarch by gdbarch.
10157 (altivec_register_p, spe_register_p): Likewise.
10158 * ppc-tdep.h (altivec_register_p, spe_register_p): Add gdbarch as
10159 parameter.
10160 * ppc-linux-nat.c (fetch_register, store_register): Update caller of
10161 altivec_register_p and spe_register_p.
10162
10163 * score-tdep.c (score_fetch_inst): Add gdbarch as parameter. Update
10164 caller. Replace current_gdbarch by gdbarch.
10165 (score_analyze_prologue): use get_frame_arch to get at the current
10166 architecture.
10167
10168 * sparc-tdep.h (sparc_analyze_prologue): Add gdbarch as parameter.
10169 * sparc-tdep.c (sparc_analyze_prologue): Likewise. Replace
10170 current_gdbarch by gdbarch. Update caller.
10171 (sparc_frame_cache): Use get_frame_arch to get at the current
10172 architecture.
10173 * sparce64-tdep.c (sparc64_skip_prologue): Update call of
10174 sparc_analyze_prologue.
10175
10176 * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Add gdbarch as
10177 parameter.
10178
10179 2008-01-11 Markus Deuling <deuling@de.ibm.com>
10180
10181 * exec.c: #include "arch-utils.h"
10182 (print_section_info): Use gdbarch_from_bfd to get at the
10183 current architecture. Replace current_gdbarch. Fix indention. Replace
10184 deprecated_print_address_numeric by paddress.
10185 * Makefile.in (exec.o) Add dependency to arch-utils.h.
10186
10187 * valprint.c (val_print_string): Replace
10188 deprecated_print_address_numeric.
10189 * tracepoint.c (trace_mention, scope_info): Likewise.
10190 * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol)
10191 (print_symbol, print_partial_symbols, maintenance_info_psymtabs)
10192 (maintenance_check_symtabs): Likewise.
10193 * symfile.c (list_overlays_command): Likewise.
10194 * stack.c (frame_info, print_block_frame_labels): Likewise.
10195 * printcmd.c (print_address, print_address_demangle)
10196 (address_info): Likewise.
10197 * corefile.c (memory_error): Likewise.
10198 * infcmd.c (jump_command): Likewise.
10199 * breakpoint.c (insert_bp_location, describe_other_breakpoints)
10200 (mention, delete_breakpoint): Likewise.
10201 * c-valprint.c (print_function_pointer_address, c_val_print): Likewise.
10202 * dwarf2read.c (dump_die): Likewise.
10203 * ada-valprint.c (ada_val_print_1): Likewise.
10204 * f-valprint.c (f_val_print): Likewise.
10205 * linux-fork.c (info_forks_command): Likewise.
10206 * m32r-com.c (m32r_load_section, m32r_load)
10207 (m32r_upload_command): Likewise.
10208
10209 * ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.
10210
10211 2008-01-11 Markus Deuling <deuling@de.ibm.com>
10212
10213 * gdbarch.sh (skip_prologue): Add gdbarch
10214 as parameter.
10215 * gdbarch.{c,h}: Regenerate.
10216
10217 * alpha-tdep.c (alpha_skip_prologue): Add gdbarch as parameter.
10218 * amd64-tdep.c (amd64_skip_prologue): Likewise.
10219 * avr-tdep.c (avr_skip_prologue): Likewise.
10220 * cris-tdep.c (cris_skip_prologue): Likewise.
10221 * frv-tdep.c (frv_skip_prologue): Likewise.
10222 * h8300-tdep.c (h8300_skip_prologue): Likewise.
10223 * hppa-tdep.c (hppa_skip_prologue): Likewise.
10224 * i386-tdep.c (i386_skip_prologue): Likewise.
10225 * ia64-tdep.c (ia64_skip_prologue): Likewise.
10226 * iq2000-tdep.c (iq2000_skip_prologue): Likewise.
10227 * m32r-tdep.c (m32r_skip_prologue): Likewise.
10228 * m68hc11-tdep.c (m68hc11_skip_prologue): Likewise.
10229 * m68k-tdep.c (m68k_skip_prologue): Likewise.
10230 * m88k-tdep.c (m88k_skip_prologue): Likewise.
10231 * mep-tdep.c (mep_skip_prologue): Likewise.
10232 * mips-tdep.c (mips_skip_prologue): Likewise.
10233 * mn10300-tdep.c (mn10300_skip_prologue): Likewise.
10234 * mt-tdep.c (mt_skip_prologue): Likewise.
10235 * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
10236 * score-tdep.c (score_skip_prologue): Likewise.
10237 * sh64-tdep.c (sh64_skip_prologue): Likewise.
10238 * sh-tdep.c (sh_skip_prologue): Likewise.
10239 * sparc64-tdep.c (sparc64_skip_prologue): Likewise.
10240 * sparc-tdep.c (sparc32_skip_prologue): Likewise.
10241 * spu-tdep.c (spu_skip_prologue): Likewise.
10242 * v850-tdep.c (v850_skip_prologue): Likewise.
10243 * vax-tdep.c (vax_skip_prologue): Likewise.
10244 * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise.
10245 * xtensa-tdep.c (xtensa_skip_prologue): Likewise.
10246
10247 * arm-tdep.c (arm_skip_prologue): Add gdbarch as parameter. Replace
10248 current_gdbarch by gdbarch.
10249 * m32c-tdep.c (m32c_skip_prologue): Likewise.
10250 * s390-tdep.c (s390_skip_prologue): Likewise.
10251
10252 2008-01-10 Doug Evans <dje@google.com>
10253
10254 * defs.h (struct continuation_arg): Fix typo in comment.
10255 * target.c (target_translate_tls_address): Fix comment spelling error.
10256
10257 2008-01-09 Thiago Jung Bauermann <bauerman@br.ibm.com>
10258
10259 * doublest.h (DOUBLEST_PRINT_FORMAT): Remove % from string.
10260 (DOUBLEST_SCAN_FORMAT): Likewise.
10261 * dfp.c (decimal_from_floating): Use DOUBLEST_PRINT_FORMAT.
10262 * ada-lex.l (processReal): Prepend "%" to use of DOUBLEST_SCAN_FORMAT.
10263 * c-exp.y (parse_number): Likewise.
10264 * jv-exp.y (parse_number): Likewise.
10265 * objc-exp.y (parse_number): Likewise.
10266 * p-exp.y (parse_number): Likewise.
10267
10268 2008-01-09 Joel Brobecker <brobecker@adacore.com>
10269
10270 * gdbtypes.c (create_array_type): Add handling of null Ada arrays.
10271 (check_typedef): Likewise.
10272
10273 2008-01-09 Luis Machado <luisgpm@br.ibm.com>
10274
10275 * printcmd.c (printf_command): Add seen_big_h, seen_big_d and
10276 seen_double_big_d, treat the new H, D, and DD modifiers as length
10277 modifiers.
10278
10279 2008-01-08 Joel Brobecker <brobecker@adacore.com>
10280
10281 * dwarf2read.c (read_enumeration_type): Add comment.
10282
10283 2008-01-08 Thiago Jung Bauermann <bauerman@br.ibm.com>
10284
10285 * config.in: Regenerate.
10286
10287 2008-01-08 Joel Brobecker <brobecker@adacore.com>
10288
10289 * ada-lang.c (ada_convert_actual): Renames convert_actual.
10290 Make non-static.
10291 (ada_convert_actuals): Delete.
10292 * ada-lang.h (ada_convert_actual): Add declaration.
10293 (ada_convert_actuals): Remove declaration.
10294 * infcall.c: #include "ada-lang.h".
10295 (value_arg_coerce): Add new parameter sp. Update function
10296 documetnation. Add handling of Ada function call parameters.
10297 * Makefile.in (infcall.o): Update dependencies.
10298
10299 2008-01-08 Paul Hilfinger <hilfinger@adacore.com>
10300
10301 * ada-lang.c (ensure_lval): Fix value lval kind.
10302 (convert_actual): Add handling for arguments passed by reference.
10303
10304 2008-01-08 Doug Evans <dje@google.com>
10305
10306 * dbxread.c (read_dbx_symtab): Fix indentation.
10307
10308 2008-01-07 Thiago Jung Bauermann <bauerman@br.ibm.com>
10309
10310 * Makefile.in (dfp.o): Depend on expression.h, gdbtypes.h and value.h.
10311 (valarith.o): Depend on dfp.h.
10312 (valops.o): Likewise.
10313 * dfp.c: Include expression.h, gdbtypes.h, value.h and dfp.h.
10314 (set_decnumber_context): New function.
10315 (decimal_check_errors): Likewise.
10316 (decimal_from_number): Likewise.
10317 (decimal_to_number): Likewise.
10318 (decimal_from_string): Use set_decnumber_context and
10319 decimal_check_errors.
10320 (decimal_from_integral): New function.
10321 (decimal_from_floating): Likewise.
10322 (decimal_to_double): Likewise.
10323 (promote_decimal): Likewise.
10324 (decimal_binop): Likewise.
10325 (decimal_is_zero): Likewise.
10326 (decimal_compare): Likewise.
10327 (decimal_convert): Likewise.
10328 * dfp.h (decimal_from_integral): New prototype.
10329 (decimal_from_floating): Likewise.
10330 (decimal_to_double): Likewise.
10331 (decimal_binop): Likewise.
10332 (decimal_is_zero): Likewise.
10333 (decimal_compare): Likewise.
10334 (decimal_convert): Likewise.
10335 * eval.c (evaluate_subexp_standard): Remove expect_type argument from
10336 call to value_from_decfloat.
10337 * valarith.c: Include dfp.h.
10338 (value_args_as_decimal): New function.
10339 (value_binop): Add if block to handle TYPE_CODE_DECFLOAT values.
10340 (value_logical_not): Likewise.
10341 (value_equal): Likewise.
10342 (value_less): Likewise.
10343 (value_pos): Likewise.
10344 (value_neg): Formatting fix.
10345 * valops.c: Include dfp.h.
10346 (value_cast): Add if block to handle TYPE_CODE_DECFLOAT values.
10347 * value.c (unpack_long): Add case to handle TYPE_CODE_DECFLOAT.
10348 (unpack_double): Add if block to handle TYPE_CODE_DECFLOAT.
10349 (value_from_decfloat): Remove expect_type argument.
10350 * value.h (value_from_decfloat): Update prototype.
10351
10352 2008-01-07 Vladimir Prus <vladimir@codesourcery.com>
10353
10354 Ignore change in name of dynamic linker during
10355 execution on Solaris. This also unbreaks pending breakpoints.
10356
10357 * solist.h (struct target_so_ops): New field same.
10358 * solib-svr4.c (svr4_same): New.
10359 (_initialize_svr4_solib): Register svr4_same.
10360 * solib.c (update_solib_list): Use ops->same, if available.
10361
10362 2008-01-06 Christopher Faylor <me+cygwin@cgf.cx>
10363
10364 * win32-nat.c (win32_make_so): Use cygwin-style path to avoid warnings
10365 when using MS-DOS paths.
10366
10367 2008-01-05 Pedro Alves <pedro@codesourcery.com>
10368
10369 * NEWS: Mention --pid and --core command line behaviour changes.
10370
10371 2008-01-05 Pedro Alves <pedro@codesourcery.com>
10372
10373 * main.c (captured_main): Remove 'count' varible and the
10374 ALIGN_STACK_ON_ENTRY block that used it. Error out if --core and
10375 --pid options were issued simultaneously. If an explicit pid
10376 option was passed, don't fallback to core file. Detect extra
10377 arguments better in the presence of explicit pid or core
10378 arguments.
10379
10380 2008-01-05 Joel Brobecker <brobecker@adacore.com>
10381
10382 * ada-lang.c (ada_which_variant_applies): Correctly compute
10383 the value of the discriminant when the variant record is packed.
10384
10385 2008-01-04 Joel Brobecker <brobecker@adacore.com>
10386
10387 * ada-lang.c (is_name_suffix): Handle middle-name numeric suffixes
10388 that are used to differentiate homonyms.
10389
10390 2008-01-04 Jerome Guitton <guitton@adacore.com>
10391
10392 * ada-lang.c (decode_packed_array_type): Avoid a seg fault
10393 when the type is an anonymous pointer type.
10394 (ada_check_typedef): Avoid a seg fault when the type is null.
10395 * ada-typeprint.c (print_array_type): Add support for pointer
10396 to packed arrays.
10397
10398 2008-01-04 Paul N. Hilfinger <hilfinger@adacore.com>
10399
10400 * ada-exp.y: Allow '{type} ADDRESS' notation on left of assignment.
10401
10402 2008-01-04 Joel Brobecker <brobecker@adacore.com>
10403
10404 * ada-lang.c (ada_evaluate_subexp): Evaluate tagged types in
10405 EVAL_NORMAL mode when noside is EVAL_AVOID_SIDE_EFFECTS.
10406
10407 2008-01-04 Joel Brobecker <brobecker@adacore.com>
10408
10409 * ada-exp.y (chop_separator): New function.
10410 (write_selectors): Rewrite to re-use chop_separator.
10411 (ada_nget_field_index, get_symbol_field_type): New functions.
10412 (write_var_or_type): Add support for "ptype TYPENAME.FIELD"
10413 expressions.
10414
10415 2008-01-03 Thiago Jung Bauermann <bauerman@br.ibm.com>
10416
10417 * symtab.c (find_pc_sect_line): Use SYMBOL_VALUE_ADDRESS instead
10418 of SYMBOL_VALUE when working with function symbols.
10419
10420 2008-01-03 Joel Brobecker <brobecker@adacore.com>
10421
10422 * ada-lang.c (resolve_subexp): Add handling of OP_REGISTER
10423 expressions. These expressions do not need to be rewriten.
10424
10425 2008-01-03 Joel Brobecker <brobecker@adacore.com>
10426
10427 * dwarf2read.c (read_enumeration_type): Flag type as stub if
10428 the given die is a declaration.
10429
10430 2008-01-03 Joel Brobecker <brobecker@adacore.com>
10431
10432 * ada-lang.c (ada_array_bound_from_type): Make non-static.
10433 Handle properly the case when the index type is an enumerated type.
10434 Do not return the subtype of the bounds type, just return the
10435 bounds type directly - this is not needed and is more consistent
10436 with what we do for arrays when no XA parallel type exists.
10437
10438 2008-01-03 Joel Brobecker <brobecker@adacore.com>
10439
10440 * ada-lang.c (static_unwrap_type): Add forward declaration.
10441 (template_to_static_fixed_type): Fields of dynamic types sometimes
10442 also need to be unwrapped. Take this into account.
10443 (ada_to_fixed_type_1): Renamed from ada_to_fixed_type.
10444 (ada_to_fixed_type): New wrapper around ada_to_fixed_type_1.
10445 * ada-typeprint.c (ada_print_type): Get the typename from
10446 the original type, not the base type.
10447
10448 2008-01-03 Jerome Guitton <guitton@adacore.com>
10449
10450 * ada-lang.c (ada_value_struct_elt, to_fixed_array_type)
10451 (to_fixed_array_type, ada_to_fixed_value_create, unwrap_value):
10452 Update calls to ada_to_fixed_type.
10453 (ada_template_to_fixed_record_type_1): Ditto, but without looking
10454 for the tag.
10455 (ada_to_fixed_type): Add check_tag parameter; do not look for
10456 tag if null. When looking for a tag, use a fixed record type.
10457 * ada-lang.h (ada_to_fixed_type): Add check_tag parameter.
10458 * ada-valprint.c (printable_val_type, ada_value_print): Update
10459 calls to ada_to_fixed_type.
10460
10461 2008-01-03 Luis Machado <luisgpm@br.ibm.com>
10462
10463 * doublest.c (convert_floatformat_to_doublest): Call
10464 floatformat_to_doublest instead of floatformat_to_double and use
10465 DOUBLEST variables.
10466 (convert_doublest_to_floatformat): Call floatformat_from_doublest
10467 instead of floatformat_from_double and use DOUBLEST variables.
10468
10469 2008-01-03 Nick Hudson <nick.hudson@dsl.pipex.com>
10470
10471 * MAINTAINERS (Write After Approval): Add self.
10472
10473 2008-01-03 Joel Brobecker <brobecker@adacore.com>
10474
10475 * symfile.c (set_initial_language): Make non-static.
10476 * symfile.h (set_initial_language): Add declaration.
10477 * language.c: #include "symfile.h".
10478 (set_language): Call set_initial_language if the frame language
10479 could not be determined.
10480
10481 2008-01-03 Paul N. Hilfinger <hilfinger@adacore.com>
10482
10483 * eval.c (evaluate_subexp_for_address): Provide frame address to
10484 locate_var_value only if it will be needed.
10485
10486 2008-01-02 Jan Kratochvil <jan.kratochvil@redhat.com>
10487
10488 * linux-nat.c (linux_child_follow_fork): Call also CHECK_FOR_THREAD_DB.
10489
10490 2008-01-02 Joel Brobecker <brobecker@adacore.com>
10491
10492 * ada-lang.c (ada_evaluate_subexp): Modify the value returned
10493 when noside is EVAL_AVOID_SIDE_EFFECTS to be an lval_memory.
10494 This is needed to make sure that any other treatment applied
10495 to the resulting value does not fail for spurious reason,
10496 such as trying to take the address of this value.
10497
10498 2008-01-02 Joel Brobecker <brobecker@adacore.com>
10499
10500 * ada-lang.c (ada_value_equal): Dereference reference types when
10501 comparing arrays.
10502
10503 2008-01-01 Daniel Jacobowitz <dan@codesourcery.com>
10504
10505 Updated copyright notices for most files.
10506
10507 2008-01-01 Christopher Faylor <me+gdb@cgf.cx>
10508
10509 * win32-nat.c (psapi_module_handle): Remove static.
10510 (get_module_name): Rename from psapi_get_dll_name. Revamp slightly to
10511 return first module found if base_address is zero. Don't initialize
10512 psapi function pointers here. Convert to cygwin paths when
10513 appropriate.
10514 (win32_pid_to_exec_file): Use Cygwin's /proc interface to determine
10515 executable name. Use get_module_name when that fails or when
10516 !__CYGWIN__.
10517 (_initialize_psapi): New function. Initialize psapi stuff before it is
10518 needed or issue a warning if it is not found. Move psapi_module_handle
10519 here.
10520
10521 2008-01-01 Joel Brobecker <brobecker@adacore.com>
10522
10523 * ada-lang.c (ada_remove_trailing_digits): New function.
10524 (ada_remove_po_subprogram_suffix): New function.
10525 (ada_decode): Improve. Move the description of the algorithm
10526 directly inside the code, instead of in the function global
10527 description.
10528
10529 2008-01-01 Joel Brobecker <brobecker@adacore.com>
10530
10531 * ada-valprint.c (ada_val_print_1) [TYPE_CODE_REF]: Ignore deref_ref
10532 and always print the dereferenced value.
10533
10534 2008-01-01 Joel Brobecker <brobecker@adacore.com>
10535
10536 * ada-lang.c (ada_evaluate_subexp, case BINOP_SUB): Add handling
10537 of the case where the first argument is a reference.
10538 (ada_evaluate_subexp, case BINOP_ADD): Likewise.
10539
10540 2008-01-01 Joel Brobecker <brobecker@adacore.com>
10541
10542 Implement support for Ada interface types.
10543
10544 * ada-lang.c (ada_is_dispatch_table_ptr_type): New function.
10545 (ada_is_ignored_field): Ignore fields that are a dispatch table
10546 of a tagged type.
10547
10548 2008-01-01 Joel Brobecker <brobecker@adacore.com>
10549
10550 * top.c (print_gdb_version): Update copyright year.
10551
10552 2008-01-01 Joel Brobecker <brobecker@adacore.com>
10553
10554 * ChangeLog-2007: New ChangeLog rotation.
10555 * ChangeLog: Reset for 2008.
10556 * config/djgpp/fnchange.lst: Add entries for ChangeLog-2006 and
10557 ChangeLog-2007.
10558
10559 For older changes see ChangeLog-2007.
10560 \f
10561 Local Variables:
10562 mode: change-log
10563 left-margin: 8
10564 fill-column: 74
10565 version-control: never
10566 coding: utf-8
10567 End:
This page took 0.248865 seconds and 4 git commands to generate.