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