gdb
[external/binutils.git] / gdb / ChangeLog
1 2008-12-11  Tom Tromey  <tromey@redhat.com>
2
3         * macroexp.c (get_pp_number): Require digit after leading ".".
4         Correctly handle suffixes.
5
6 2008-12-11  Tom Tromey  <tromey@redhat.com>
7
8         * macrocmd.c (macro_define_command): Skip whitespace after
9         macro name.
10         (print_one_macro): Print space after macro name.
11
12 2008-12-12  Pedro Alves  <pedro@codesourcery.com>
13
14         * infrun.c (handle_inferior_event): Correctly tag non-executing
15         threads in multi-process.
16         (normal_stop): Correctly tag stopped threads in multi-process.
17
18 2008-12-12  Pedro Alves  <pedro@codesourcery.com>
19
20         * remote.c (extended_remote_mourn_1): Always call
21         generic_mourn_inferior.
22
23 2008-12-12  Pedro Alves  <pedro@codesourcery.com>
24
25         * remote.c (remote_detach_1): Don't delete the inferior here.
26         (process_stop_reply): Ditto.
27         (extended_remote_kill): Ditto.
28
29 2008-12-12  Pedro Alves  <pedro@codesourcery.com>
30
31         * remote.c (read_ptid): If we don't know about any inferior yet,
32         use the pid of magic_null_ptid.
33         (remote_start_remote): In the non-stop mode case, don't set
34         inferior_ptid to magic_null_ptid here.
35
36 2008-12-11  Daniel Jacobowitz  <dan@codesourcery.com>
37             Pedro Alves  <pedro@codesourcery.com>
38
39         * infcmd.c (step_1): Use step_once in the synchronous case too.
40         (step_1_continuation): Wrap line.
41         (step_once): Adjust comment.  Only install the continuation in
42         async mode.
43
44 2008-12-11  Pedro Alves  <pedro@codesourcery.com>
45
46         * infrun.c (handle_inferior_event): On a TARGET_WAITKIND_EXITED or
47         TARGET_WAITKIND_SIGNALLED, switch inferior_ptid to the event ptid.
48         * linux_thread_db.c (thread_db_wait): On a TARGET_WAITKIND_EXITED
49         or TARGET_WAITKIND_SIGNALLED, return the ptid the beneath target
50         returned.
51         * inf-ptrace.c (inf_ptrace_wait): Return inferior_ptid instead of
52         minus_one_ptid if the inferior disappeared.
53         * rs6000-nat.c (rs6000_wait): Likewise.
54         * spu-linux-nat.c (spu_child_wait): Likewise.
55
56 2008-12-11  Tom Tromey  <tromey@redhat.com>
57
58         PR macros/2564:
59         * c-exp.y (macro_original_text, expansion_obstack,
60         expression_macro_scope): New globals.
61         (scan_macro_expansion): New function.
62         (scanning_macro_expansion): Likewise.
63         (finished_macro_expansion): Likewise.
64         (scan_macro_cleanup): Likewise.
65         (c_parse): Find macro scope.  Initialize obstack.
66         * c-lang.h (scan_macro_expansion, scanning_macro_expansion,
67         finished_macro_expansion, expression_macro_lookup_func,
68         expression_macro_lookup_baton): Remove.
69         * c-lang.c (scan_macro_expansion, scanning_macro_expansion,
70         finished_macro_expansion, expression_macro_lookup_func,
71         expression_macro_lookup_baton): Remove.
72         (macro_original_text, macro_expanded_text,
73         c_preprocess_and_parse): Remove.
74         (c_language_defn, cplus_language_defn, asm_language_defn,
75         minimal_language_defn): Use c_parse.
76
77 2008-12-10  Pedro Alves  <pedro@codesourcery.com>
78
79         * infcmd.c (until_next_command, finish_backward): Use get_frame_pc
80         instead of read_pc.
81
82 2008-12-09  Tom Tromey  <tromey@redhat.com>
83
84         PR gdb/1815:
85         * cli/cli-decode.c (delete_cmd): Forward declare.
86         (delete_cmd): Now static.  Change return type.  Remove command
87         from alias chain.  Rewrite.
88         (add_cmd): Initialize new fields.  Update cmd_pointer on all
89         aliases.
90         (add_alias_cmd): Put command on alias chain.
91         * command.h (delete_cmd): Don't declare.
92         * cli/cli-decode.h (delete_cmd): Don't declare.
93         (struct cmd_list_element) <aliases, alias_chain>: New fields.
94
95 2008-12-09  Tom Tromey  <tromey@redhat.com>
96
97         * config.in, configure: Rebuild.
98         * configure.ac: Check for locale.h, setlocale.  Call
99         AM_LC_MESSAGES.
100         * acinclude.m4: Include lcmessage.m4.
101
102 2008-12-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
103
104         * remote.c (remote_parse_stop_reply): Use REG only after its NULL check.
105
106 2008-12-08  Joel Brobecker  <brobecker@adacore.com>
107
108         * python/python-value.c (values_in_python): Add specific initialization
109         to NULL to work-around a MacOS linker bug.
110
111 2008-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
112
113         Fix loc_type of `bp_location's created by update_watchpoint.
114         * breakpoint.c (allocate_bp_location): Remove the bp_type parameter.
115         Replace bp_type by bpt->type.  Update prototype.  All callers updated.
116         (add_location_to_breakpoint):  Remove the bp_type parameter.
117         Replace bp_type by b->type.  All callers updated.
118         (set_breakpoint_location_function): Replace bptype by b->type.
119
120 2008-12-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
121
122         * breakpoint.c (update_global_location_list): Fix the comment.
123
124 2008-12-05  Pedro Alves  <pedro@codesourcery.com>
125
126         * infcmd.c (step_1, step_once): Look up the stepping range based
127         on the current frame's PC, not on stop_pc.
128
129 2008-12-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
130
131         Fix compilation on 32-bit host configurations.
132         * ia64-tdep.c (ia64_breakpoint_from_pc): Suffix a constant by `LL'.
133
134 2008-12-05  Tristan Gingold  <gingold@adacore.com>
135
136         * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn): New function.
137         (amd64_darwin_sstep_at_sigreturn): New function.
138         (darwin_set_sstep): The sigreturn is a special case: the trace flag
139         must be set in the mcontext structure.
140
141 2008-12-05  Pedro Alves  <pedro@codesourcery.com>
142
143         * infcmd.c (step_once): Remove dead code.
144
145 2008-12-04  Doug Evans  <dje@google.com>
146
147         * infcall.c (call_function_by_hand): Clean up use of local dummy_addr.
148
149 2008-12-02  Doug Evans  <dje@google.com>
150
151         * infrun.c (handle_inferior_event): Remove redundant resetting of
152         stepping_past_singlestep_breakpoint.
153
154 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
155
156         * target.h (target_get_osdata): Describe.
157         * osdata.h (make_cleanup_osdata_free): Declare.
158         * osdata.c (osdata_item_clear): Define even if HAVE_LIBEXPAT is
159         not defined.
160         (osdata_free_cleanup): New.
161         (make_cleanup_osdata_free): New.
162         (get_osdata): Fix leak.
163         (info_osdata_command): Use make_cleanup_osdata_free.
164         (info_processes_command): Delete.
165         (_initialize_osdata): Drop undocumented "info processes" alias.
166         * mi/mi-main.c (mi_cmd_list_thread_groups): Fix leak.
167
168 2008-12-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
169
170         Fix resolving external references to TLS variables.
171         * findvar.c: Include `objfiles.h'.
172         (read_var_value <LOC_UNRESOLVED>): New variable `obj_section'.  Handle
173         SEC_THREAD_LOCAL variables.
174         * printcmd.c (address_info <LOC_UNRESOLVED>): Handle SEC_THREAD_LOCAL
175         variables.
176
177 2008-12-02  Doug Evans  <dje@google.com>
178
179         * infrun.c (handle_inferior_event): Delete unused local tp.
180
181 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
182             Vladimir Prus  <vladimir@codesourcery.com>
183
184         Implement -list-thread-groups --available
185
186         * Makefile.in (XMLFILES): Add osdata.dtd.
187         (SFILES): Add osdata.c.
188         (COMMON_OBS): Add osdata.o.
189         * linux-nat.c: Include pwd.h, sys/types.h, gdb_dirent.h and xml-support.h.
190         (linux_nat_xfer_osdata): New function.
191         (linux_xfer_partial): Handle TARGET_OBJECT_OSDATA.
192         * osdata.c: New file.
193         * osdata.h: New file.
194         * remote.c (PACKET_qXfer_osdata): New packet enum.
195         (remote_protocol_features): Add "qXfer:osdata:read".
196         (remote_read_qxfer): Handle TARGET_OBJECT_OSDATA.
197         (extended_remote_can_run): New.
198         (init_extended_remote_ops): Set to_can_run to
199         extended_remote_can_run.
200         (_initialize_remote): Add packet config command for
201         "qXfer:osdata:read".
202         * xml-support.c (obstack_xml_printf): New function.
203         * xml-support.h (obstack_xml_printf): Declare.
204         * target.c (target_get_osdata): New function.
205         * target.h (enum target_object): Add TARGET_OBJECT_OSDATA.
206         (target_os_data): Declare.
207         * features/osdata.dtd: New file.
208         * mi/mi-main.c (mi_list_thread_groups): Handle the --available
209         option.
210
211 2008-12-01  Doug Evans  <dje@google.com>
212
213         * infrun.c (proceed): Delete unused local stop_signal.
214
215 2008-11-27  Tristan Gingold  <gingold@adacore.com>
216
217         * NEWS: Add entry for new native configuration: Darwin.
218         * configure.host: Add Darwin host.
219         * configure.tgt: Add Darwin target.
220         * defs.h (enum gdb_osabi): Add GDB_OSABI_DARWIN.
221         * osabi.c (gdb_osabi_names): Add name for Darwin abi.
222         * i386-darwin-nat.c: New file.
223         * i386-darwin-tdep.c: New file.
224         * machoread.c: New file.
225         * darwin-nat-info.c: New file.
226         * darwin-nat.c: New file.
227         * darwin-nat.h: New file.
228         * darwin.defs: New file.
229         * config/i386/darwin.mh: New file.
230
231 2008-11-26  Tristan Gingold  <gingold@adacore.com>
232
233         * MAINTAINERS: Add myself for write after approval privileges.
234
235 2008-11-26  Jerome Guitton  <guitton@adacore.com>
236
237         * value.h (allocate_value_lazy): New function declaration.
238         (value_free): Remove macro, make it a function.
239         * value.c (value): Move actual content outside of the memory space
240         of the struct; add a pointer to this actual content.
241         (allocate_value_lazy, allocate_value_contents): New function.
242         (allocate_value): Reimplement using these two new functions.
243         (value_contents_raw, value_contents_all_raw): If no memory
244         has been allocated yet for the actual content, allocate it.
245         (value_contents_all): Resync with struct value's changes.
246         (value_free): New function.
247         (value_copy, value_primitive_field): Use new function
248         allocate_value_lazy to allocate lazy values.
249         (value_change_enclosing_type): Resync with struct value's changes.
250         As the value is not reallocated, remove the special handling for
251         the value chain (now obsolete).
252         * valops.c (value_at_lazy): Use new function allocate_value_lazy.
253         (value_fetch_lazy): Allocate value content. Use allocate_value_lazy
254         to allocate lazy values.
255         (value_slice): Use allocate_value_lazy to allocate lazy values.
256
257 2008-11-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
258
259         Fix automatic restoration of breakpoints memory for ia64.
260         * ia64-tdep.c: New #if check on BREAKPOINT_MAX vs. BUNDLE_LEN.  
261         (ia64_memory_insert_breakpoint): New comment part for SHADOW_CONTENTS
262         content.  Remove variable instr.  New variable cleanup.  Disable
263         automatic breakpoints restoration.  PLACED_SIZE and SHADOW_LEN are now
264         set larger, to BUNDLE_LEN - 2.  Variable `bundle' type update.  Return
265         error if even just final target_write_memory has failed.
266         (ia64_memory_remove_breakpoint): Rename variables bundle to bundle_mem
267         and instr to instr_saved.  New variables bundle_saved and
268         instr_breakpoint.  Comment new reasons why we need to disable automatic
269         restoration of breakpoints.  Assert PLACED_SIZE and SHADOW_LEN.  New
270         check of the original memory content.  Return error if even just final
271         target_write_memory has failed.
272         (ia64_breakpoint_from_pc): Implement the emulation of permanent
273         breakpoints compatible with current bp_loc_is_permanent.
274         (template_encoding_table): Make it `const'.
275         * breakpoint.c (bp_loc_is_permanent): Support unsupported software
276         breakpoints.  New variables `cleanup' and `retval'.
277
278 2008-11-24  Tom Tromey  <tromey@redhat.com>
279
280         * ada-lang.c (value_from_contents_and_address): Move...
281         * value.c: ... here.
282         * ada-lang.h (value_from_contents_and_address): Move
283         declaration...
284         * value.h: ... here.
285
286 2008-11-24  Paul Pluzhnikov  <ppluzhnikov@google.com>
287
288         * valprint.c (val_print_array_elements): Pass correct
289         element address to val_print.
290         
291 2008-11-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
292
293         Fix access of an already freed memory.
294         * parse.c (parse_field_expression): Call xstrdup on `*name'.
295         * completer.c (expression_completer): Free fieldname.
296
297 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
298
299         PR gdb/2474
300         * remote.c (remote_read_description_p): New function.
301         (remote_start_remote): Try to fetch the target description
302         before adding shared libraries.  Try again later if the
303         target is running but stopped.
304         (remote_open_1): Mark extended targets as exited by default.
305         (remote_read_description): Check target_has_execution.
306
307 2008-11-24  Jerome Guitton  <guitton@adacore.com>
308
309         * alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Use
310         the frame address in block instead of the return address to
311         locate the mdebug PDR of the frame.
312
313 2008-11-21  Joel Brobecker  <brobecker@adacore.com>
314
315         Remove the unused BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
316
317         * breakpoint.h (enum bpstat_what_main_action): Remove
318         BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
319         * breakpoint.c (bpstat_what): Delete catch_shlib_event from enum class.
320         Remove the BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK column from
321         variable table.
322         * infrun.c (wait_for_inferior): Remove handling of
323         BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
324
325 2008-11-21  Tom Tromey  <tromey@redhat.com>
326
327         * configure: Rebuild.
328         * configure.ac: Merge calls to AC_CHECK_FUNCS, AC_CHECK_HEADERS,
329         AC_CHECK_DECLS, and AC_CHECK_MEMBERS.
330
331 2008-11-21  Tom Tromey  <tromey@redhat.com>
332
333         * python/python-internal.h (PyGILState_Ensure): New define.
334         (PyGILState_Release): Likewise.
335         (PyEval_InitThreads): Likewise.
336         (PyThreadState_Swap): Likewise.
337         (PyEval_InitThreads): Likewise.
338         * python/python.c (_initialize_python): Initialize threads.
339         Release GIL.
340         (eval_python_from_control_command): Acquire GIL.
341         (python_command): Likewise.
342         * python/python-internal.h (make_cleanup_py_restore_gil):
343         Declare.
344         * python/python-utils.c (py_gil_restore): New function.
345         (make_cleanup_py_restore_gil): Likewise.
346
347 2008-11-20  Doug Evans  <dje@google.com>
348
349         * frame.c (frame_debug_got_null_frame): Remove file arg.
350         All callers updated.
351
352 2008-11-20  Pedro Alves  <pedro@codesourcery.com>
353
354         * infrun.c (resume): If following a fork, also reset regcache,
355         gdbarch and pc.
356
357 2008-11-20  Doug Evans  <dje@google.com>
358
359         * printcmd.c (sym_info): Don't print the offset if it's zero.
360
361 2008-11-20  Pedro Alves  <pedro@codesourcery.com>
362
363         * infrun.c (resume): If following a fork, reread the current
364         thread.  Avoid dereferencing a possibly dangling pointer.
365
366 2008-11-19  Doug Evans  <dje@google.com>
367
368         * inferior.h (proceed_to_finish): Delete, unused.
369         (stop_registers): Tweak comment.
370         * infrun.c (stop_registers): Tweak comment.
371
372 2008-11-19  Kevin Buettner  <kevinb@redhat.com>
373
374         * frv-tdep.c (frv_skip_main_prologue): New function.
375         (frv_gdbarch_init): Register frv_skip_main_prologue.
376         * solib-frv.c (fetch_loadmap): Return early when no segments are
377         found.
378         (frv_relocate_main_executable): Return early when both interpreter
379         and executable loadmap addresses are zero.
380
381 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
382         
383         * xtensa-config.c (rmap): Remove entries for ar32 through ar63.  Add
384         threadptr, scompare1, mmid, epc5, epc6, epc7, eps5, eps6, eps7,
385         excsave5, excsave6, excsave7, cpenable, and vecbase registers.
386         (xtensa_submask0, xtensa_submask1, xtensa_submask2)
387         (xtensa_submask3, xtensa_submask4, xtensa_submask5, xtensa_submask6)
388         (xtensa_submask7, xtensa_submask8, xtensa_submask9, xtensa_submask10)
389         (xtensa_submask11, xtensa_submask12, xtensa_submask13, xtensa_submask14)
390         (xtensa_submask15): Adjust register numbers.
391         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
392         (xtensa_regmap_table): Add entry for scompare1.
393         * regformats/reg-xtensa.dat: Remove ar32 through ar63.  Add threadptr
394         and scompare1.
395         
396 2008-11-19  Pedro Alves  <pedro@codesourcery.com>
397
398         * remote.c (escape_buffer): New.
399         (putpkt_binary, read_frame, getpkt_or_notif_sane_1): Use it.  Make
400         sure debug output printing a packet buffer goes through a single
401         fprintf_unfiltered call.
402         * utils.c (vfprintf_unfiltered): If outputting timestamps, end
403         output with a newline if it wasn't going to already.
404
405 2008-11-18  Paul Pluzhnikov  <ppluzhnikov@google.com>
406
407         * maint.c (maintenance_translate_address): Fix a buglet.
408         
409 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
410
411         * features/Makefile (rs6000/powerpc-isa205-32l-expedite,
412         rs6000/powerpc-isa205-altivec32l-expedite,
413         powerpc-isa205-vsx32l-expedite, rs6000/powerpc-isa205-64l-expedite,
414         rs6000/powerpc-isa205-altivec64l-expedite,
415         powerpc-isa205-vsx64l-expedite): New variables.
416         * regformats/rs6000/powerpc-isa205-32l.dat: Generate.
417         * regformats/rs6000/powerpc-isa205-altivec32l.dat: Generate.
418         * regformats/rs6000/powerpc-isa205-vsx32l.dat: Generate.
419         * regformats/rs6000/powerpc-isa205-64l.dat: Generate.
420         * regformats/rs6000/powerpc-isa205-altivec64l.dat: Generate.
421         * regformats/rs6000/powerpc-isa205-vsx64l.dat: Generate.
422
423 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
424
425         * ppc-linux-nat.c (ppc_register_u_addr): Add special case to return
426         offset for full 64-bit slot of FPSCR when in 32-bits.
427         (ppc_linux_read_description): Return target description with 64-bit
428         FPSCR when inferior is running on an ISA 2.05 or later processor.
429         * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Call
430         initialize_tdec_powerpc_isa205_32l,
431         initialize_tdec_powerpc_isa205_altivec32l,
432         initialize_tdec_powerpc_isa205_vsx32l,
433         initialize_tdec_powerpc_isa205_64l,
434         initialize_tdec_powerpc_isa205_altivec64l and
435         initialize_tdec_powerpc_isa205_vsx64l.
436         * ppc-linux-tdep.h: Add external declaration for
437         tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l,
438         tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_64l,
439         tdesc_powerpc_isa205_altivec64l and tdesc_powerpc_isa205_vsx64l.
440         * features/rs600/powerpc-fpu-isa205.xml: New file.
441         * features/rs600/powerpc-isa205-32l.xml: New file.
442         * features/rs600/powerpc-isa205-64l.xml: New file.
443         * features/rs600/powerpc-isa205-altivec32l.xml: New file.
444         * features/rs600/powerpc-isa205-altivec64l.xml: New file.
445         * features/rs600/powerpc-isa205-vsx32l.xml: New file.
446         * features/rs600/powerpc-isa205-vsx64l.xml: New file.
447         * features/rs600/powerpc-isa205-32l.c: Generate.
448         * features/rs600/powerpc-isa205-64l.c: Generate.
449         * features/rs600/powerpc-isa205-altivec32l.c: Generate.
450         * features/rs600/powerpc-isa205-altivec64l.c: Generate.
451         * features/rs600/powerpc-isa205-vsx32l.c: Generate.
452         * features/rs600/powerpc-isa205-vsx64l.c: Generate.
453
454 2008-11-18  Paul Pluzhnikov  <ppluzhnikov@google.com>
455
456         * objfiles.h: New MULTI_OBJFILE_P macro.
457         * printcmd.c (sym_info): Print object name.
458         * maint.c (maintenance_translate_address): Likewise.
459         
460 2008-11-18  Joel Brobecker  <brobecker@adacore.com>
461
462         * NEWS: Document the removal of "catch load" and "catch unload".
463
464 2008-11-17  Doug Evans  <dje@google.com>
465
466         * infcall.c (call_function_by_hand): Fix punctuation and capitalization
467         on error messages.
468
469 2008-11-17  Ulrich Weigand  <uweigand@de.ibm.com>
470
471         PR gdb/2250
472         * infrun.c (clear_proceed_status_thread): New function.
473         (clear_proceed_status_callback): New function.
474         (clear_proceed_status): In all-stop mode, clear per-thread
475         proceed status of *all* threads, not only the current.
476         (handle_inferior_event): In all-stop mode, if we're stepping
477         one thread, but got some inferior event in another thread
478         that does not cause GDB to break to the user interface,
479         ensure the interrupted stepping operation continues in the
480         original thread.
481         (currently_stepping): Move thread-related tests to ...
482         (currently_stepping_thread): ... this new function.
483         (currently_stepping_callback): New function.
484
485 2008-11-17  Vladimir Prus  <vladimir@codesourcery.com>
486
487         Implement =thread-selected notification.
488
489         * mi/mi-common.h (struct mi_interp): New, moved from ...
490         * mi/mi-interp.c: ...here.
491         * mi/mi-main.c (mi_execute_command): If the thread changed
492         as result of command, report that.
493
494 2008-11-17  Vladimir Prus  <vladimir@codesourcery.com>
495
496         Implement continue/interrupt of thread groups.
497
498         * mi/mi-main.c (proceed_thread_callback): New.
499         (mi_cmd_exec_continue): If --thread-group is specified, resume all
500         threads in that group.
501         (interrupt_thread_callback): New.
502         (mi_cmd_exec_interrupt): If --thread-group is specified, interrupt
503         all threads in that group.
504
505 2008-11-17  Vladimir Prus  <vladimir@codesourcery.com>
506
507         Implement '-target-detach pid'.
508
509         * infcmd.c (detach_command): Make nonstatic.
510         * inferior.h (detach_command): Declare.
511         * mi/mi-cmds.c (mi_cmds): Don't route -target-detach via CLI.
512         * mi/mi-cmds.h (mi_cmd_target_detach): Declare.
513         * mi/mi-main.c (find_thread_of_process, mi_cmd_target_detach): New.
514
515 2008-11-17  Vladimir Prus  <vladimir@codesourcery.com>
516
517         Include group-id in thread-created notification.
518
519         * mi/mi-interp.c (mi_new_thread, mi_thread_exit): Include
520         group id in the output.
521
522 2008-11-17  Vladimir Prus  <vladimir@codesourcery.com>
523
524         Notification for attach/detach.
525
526         * inferior.c: Call the process observers.
527         * mi/mi-interp.c (mi_new_inferior, mi_inferior_exit): New.
528         (mi_interpreter_init): Register the above.
529
530 2008-11-17  Vladimir Prus  <vladimir@codesourcery.com>
531
532         Implement -list-thread-groups.
533
534         * thread.c (print_thread_info): New parameter pid, to print
535         threads of specific process.
536         * gdbthread.h (print_thread_info): New parameter pid.
537         * mi/mi-cmds.c (mi_cmds): Register -list-thread-groups.
538         * mi/mi-cmds.h (mi_cmd_list_thread_groups): New.
539         * mi/mi-main.c (mi_cmd_thread_info): Adjust.
540         (print_one_process, mi_cmd_list_thread_groups): New.
541
542 2008-11-16  Joel Brobecker  <brobecker@adacore.com>
543
544         Remove some unused macros related to the old load/unload catchpoints.
545
546         * breakpoint.c (SOLIB_LOADED_LIBRARY_PATHNAME)
547         (SOLIB_UNLOADED_LIBRARY_PATHNAME, SOLIB_CREATE_CATCH_LOAD_HOOK)
548         (SOLIB_CREATE_CATCH_UNLOAD_HOOK): Delete. No longer used.
549
550 2008-11-16  Joel Brobecker  <brobecker@adacore.com>
551
552         Remove support for catch load and catch unload commands.
553
554         * breakpoint.h (enum bptype): Remove bp_catch_load and bp_catch_unload.
555         (struct breakpoint): Remove fields dll_pathname and
556         triggered_dll_pathname.
557         (bpstat_get_triggered_catchpoints, ep_is_shlib_catchpoint): Delete.
558         * breakpoint.c (ep_is_catchpoint): Remove handling of
559         bp_catch_load and bp_catch_unload.
560         (print_it_typical, bpstat_check_location, bpstat_what)
561         (print_one_breakpoint_location, print_one_breakpoint_location)
562         (user_settable_breakpoint, allocate_bp_location)
563         (set_raw_breakpoint_without_location, mention, delete_breakpoint,
564         (breakpoint_re_set_one, disable_command, enable_command): Likewise.
565         (ep_is_shlib_catchpoint, bpstat_get_triggered_catchpoints)
566         (catch_load_command_1, catch_unload_command_1): Delete.
567         (_initialize_breakpoint): Remove the "catch load" and "catch unload"
568         command creation.
569         * infrun.c (handle_inferior_event): Remove the handling of
570         load/unload catchpoint events.
571
572 2008-11-15  Joel Brobecker  <brobecker@adacore.com>
573
574         From  Jerome Guitton  <guitton@adacore.com>
575         * dwarf2read.c (dwarf2_debug_line_missing_end_sequence_complaint):
576         New function.
577         (dwarf_decode_lines): Detect null file numbers. Detect the end of
578         the line program sequence when no end sequence is emitted.
579
580 2008-11-15  Joel Brobecker  <brobecker@adacore.com>
581
582         * ada-lang.c (ada_evaluate_subexp): Improve handling of integer
583         type dereferencing.
584
585 2008-11-15  Daniel Jacobowitz  <dan@codesourcery.com>
586
587         * NEWS: Mention sparc64-linux-gnu gdbserver support.
588
589 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
590
591         * configure.tgt (sparc64-*-linux*): Added gdbserver support.
592         * regformats/reg-sparc64.dat: New file.
593
594 2008-11-14  Tom Tromey  <tromey@redhat.com>
595
596         PR mi/2549:
597         * mi/mi-main.c (get_register): Use get_formatted_print_options.
598
599 2008-11-13  Joel Brobecker  <brobecker@adacore.com>
600
601         * printcmd.c: define PRINTF_HAS_LONG_LONG only if not yet defined.
602
603 2008-11-13  Ulrich Weigand  <uweigand@de.ibm.com>
604
605         * auxv.c (fprint_target_auxv): Handle AT_BASE_PLATFORM and
606         AT_EXECFN.  Re-sort AT_SECURE.
607
608 2008-11-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
609
610         * monitor.c (monitor_insert_breakpoint): Remove unused variable `bp'.
611
612 2008-11-13  Joel Brobecker  <brobecker@adacore.com>
613
614         * ia64-tdep.c: Remove commented out #define.
615
616 2008-11-12  Joel Brobecker  <brobecker@adacore.com>
617
618         From Joel Sherrill  <joel.sherrill@oarcorp.com>
619         * remote-sim.c (gdbsim_mourn_inferior): Use "target" parameter
620         instead of the "gdbsim_ops" global.
621
622 2008-11-11  Doug Evans  <dje@google.com>
623
624         * infcall.c (call_function_by_hand): Handle inferior exit.
625
626 2008-11-11  Thiago Jung Bauermann  <bauerman@br.ibm.com>
627
628         * remote-sim.c (gdbsim_create_inferior, gdbsim_mourn_inferior): Add
629         missing struct target_ops argument.
630
631 2008-11-11  Joel Sherrill <joel.sherrilL@oarcorp.com>
632
633         * MAINTAINERS: Add myself for write after approval privileges.
634
635 2008-11-10  Tom Tromey  <tromey@redhat.com>
636
637         * gdbtypes.c (copy_type_recursive): Clear new fields.
638
639 2008-11-10  Tom Tromey  <tromey@redhat.com>
640
641         * cli/cli-cmds.c (source_script): Clean up full_pathname.  Run
642         cleanups on early return.
643
644 2008-11-09  Vladimir Prus  <vladimir@codesourcery.com>
645
646         Kill pthread_ops_hack
647
648         * target.h (struct target_ops): Make to_attach, to_detach,
649         to_create_inferior and to_mourn_inferior accept a pointer
650         to struct target_ops.
651         (target_attach, target_create_inferior, target_create_inferior):
652         Convert from macros to function.  Find the right target to
653         invoke a method of.
654         (find_default_attach, find_default_create_inferior): New parameter
655         ops.
656         * corefile.c (core_file_command): Pass target to to_detach.
657         * corelow.c (core_detach): Add 'ops' parameter.
658         * fork-child.c (fork_inferior): Return the pid.  Allow
659         init_trace_fun to be NULL.
660         * inf-ptrace (ptrace_ops_hack): Remove.
661         (inf_ptrace_him): Remove, moving all logic into....
662         (inf_ptrace_create_inferior): ... here.  Push the target
663         passed as parameter.
664         (inf_ptrace_mourn_inferior, inf_ptrace_attach, inf_ptrace_detach):
665         Push/pop target passed as parameter, no ptrace_ops_hack.
666         (inf_ptrace_target): Don't remember result.
667         * inferior.h (fork_inferior): Adjust prototype.
668         * linux-nat.c (linux_nat_create_inferior, linux_nat_attach)
669         (linux_nat_detach, linux_nat_mourn_inferior): New parameter ops.
670         Pass it to linux_ops target.
671         * linux-thread-db.c (thread_db_detach, thread_db_mourn_inferior):
672         New parameter ops. Pass it to the target beneath.
673         * remote.c (remote_mourn, extended_remote_mourn, remote_detach)
674         (extended_remote_create_inferior): New parameter ops. Pass it
675         further.
676         * target.c (debug_to_attach, debug_to_detach)
677         (debug_to_mourn_inferior): New parameter ops.
678         (target_create_inferior): New.
679         (update_current_target): Do not inherit to_attach, to_detach,
680         to_create_inferiour, to_mourn_inferior.  Do not default
681         to_detach and to_mourn_inferior.
682         (target_detach): Find the right target to use.
683         (target_mourn_inferior): New.
684         (find_default_attach, find_default_create_inferior): New parameter
685         ops.  Pass the found target when calling its method.
686         (init_dummy_target): Provide fallback definition of to_detach.
687         (target_attach): New.
688         (debug_to_attach, debug_to_detach, debug_to_create_inferior)
689         (debug_to_mourn_inferiour): New parameter ops.
690         * aix-thread.c: Adjust.
691         * bsd-uthread.c: Adjust.
692         * gnu-nat.c: Adjust.
693         * go32-nat.c: Adjust.
694         * hpux-thread.c: Adjust.
695         * inf-ttrace.c: Ajust.
696         * monitor.c: Adjust.
697         * nto-procfs.c: Adjust.
698         * procfs.c: Adjust.
699         * remote-m32r-sdi.c: Adjust.
700         * remote-mips.c: Adjust.
701         * remote-sim.c: Adjust.
702         * rs6000-nat.c: Adjust.
703         * sol-thread.c: Adjust.
704         * win32-nat.c: Adjust.
705         * dec-thread.c: Adjust.
706
707 2008-11-09  Vladimir Prus  <vladimir@codesourcery.com>
708
709         * thread.c (print_thread_info): Eliminate now useless checks
710         for exited threads.
711
712 2008-11-06  Pedro Alves  <pedro@codesourcery.com>
713
714         * i386-dicos-tdep.c (i386_dicos_init_abi): Set decr_pc_after_break
715         to 0.
716
717 2008-11-05  Pedro Alves  <pedro@codesourcery.com>
718
719         * remote.c (notice_new_inferiors): Add a new inferior only when
720         we're going to add a new thread.
721
722 2008-11-05  Pedro Alves  <pedro@codesourcery.com>
723
724         * defs.h (add_inferior_continuation)
725         (do_all_inferior_continuations)
726         (discard_all_inferior_continuations): Declare.
727         * utils.c (add_inferior_continuation)
728         (do_all_inferior_continuations)
729         (discard_all_inferior_continuations): New.
730         * inferior.h (struct inferior) <continuations>: New field.
731         * inferior.c (free_inferior): Discard all the inferior
732         continuations.
733         * inf-loop.c (inferior_event_handler): Do all current inferior
734         continuations.
735         * infcmd.c (attach_command): Register an inferior continuation
736         instead of a thread continuation.
737         * infrun.c (handle_inferior_event): If stop_soon is
738         STOP_QUIETLY_NO_SIGSTOP, also expect a TARGET_SIGNAL_0.
739
740 2008-11-04  Pedro Alves  <pedro@codesourcery.com>
741
742         * inf-loop.c (inferior_event_handler): On INF_ERROR and
743         INF_REG_EVENT throwing, don't call target_async or pop_target.
744         Call pop_all_targets_above.
745         * remote.c (remote_close): Call remote_terminal_ours.  Don't call
746         signal or target_async.
747
748 2008-11-04  Daniel Jacobowitz  <dan@codesourcery.com>
749
750         * eval.c (evaluate_subexp_standard): Assert that there is at
751         least one array dimension.
752
753 2008-11-03  Vladimir Prus  <vladimir@codesourcery.com>
754
755         Make attach_command exception-safe
756         * infcmd.c (attach_command): Call async_enable_stdin
757         if exception is thrown.
758
759 2008-11-03  Pedro Alves  <pedro@codesourcery.com>
760
761         * gdbarch.sh (has_global_solist): Mention global breakpoints.
762         * gdbarch.h: Regenerate.
763
764 2008-11-03  Pedro Alves  <pedro@codesourcery.com>
765
766         * remote.c (remote_start_remote): If the solib list is global,
767         fetch libraries and insert breakpoints after connecting.
768         * infcmd.c (post_create_inferior): If the solist is shared between
769         inferiors, no need to refetch it on every new inferior.
770         (detach_command): If the shared library list is shared between
771         inferiors, then don't clear it on every inferior detach.
772         * gdbarch.sh (has_global_solist): New.
773         * i386-dicos-tdep.c (i386_dicos_init_abi): Set
774         gdbarch_has_global_solist.
775         * target.c (target_pre_inferior): If the shared library list is
776         shared between inferiors, then don't clear it here, neither
777         invalidate the memory regions or clear the target description.
778         (target_detach): If the shared library list is shared between
779         inferiors, then don't remove breakpoints from the target here.
780         (target_disconnect): Comment.
781         * solib.c (update_solib_list): Check for null_ptid.
782         * breakpoint.c (insert_breakpoints, update_global_location_list):
783         If the shared library list is shared between inferiors, insert
784         breakpoints even if there's no execution.
785         (breakpoint_init_inferior): If the shared library list is shared
786         between inferiors, don't delete breakpoints or mark them
787         uninserted here.
788
789         * gdbarch.c, gdbarch.h: Regenerate.
790
791 2008-10-31  Pedro Alves  <pedro@codesourcery.com>
792
793         * inferior.h (inferior_ignoring_leading_exec_events): Delete
794         declaration.
795
796 2008-10-31  Pedro Alves  <pedro@codesourcery.com>
797
798         * inferior.h (write_inferior_status_register): Delete.
799         * infrun.c (write_inferior_status_register): Delete.
800
801 2008-10-30  Tom Tromey  <tromey@redhat.com>
802
803         * value.c (coerce_array): Use check_typedef.
804
805 2008-10-30  Tom Tromey  <tromey@redhat.com>
806
807         * cli/cli-logging.c (handle_redirections): Make a cleanup.
808         * reggroups.c (maintenance_print_reggroups): Make a cleanup.
809         * regcache.c (regcache_print): Make a cleanup.
810         * maint.c (maintenance_print_architecture): Make a cleanup.
811         * dummy-frame.c (maintenance_print_dummy_frames): Make a cleanup.
812
813 2008-10-30  Tom Tromey  <tromey@redhat.com>
814
815         * utils.c (make_cleanup_close): Use make_cleanup_dtor.
816         (do_close_cleanup): Don't free 'fd'.
817
818 2008-10-30  Tom Tromey  <tromey@redhat.com>
819
820         * source.c (symtab_to_fullname): Test 'r >= 0'.
821         (psymtab_to_fullname): Likewise.
822         (get_filename_and_charpos): Make a cleanup.
823         (forward_search_command): Likewise.
824         (reverse_search_command): Likewise.
825         * exec.c (exec_file_attach): Close scratch_chan on failure.
826         * nto-procfs.c (procfs_open): Make a cleanup.
827         (procfs_pidlist): Likewise.
828         (do_closedir_cleanup): New function.
829
830 2008-10-30  Andreas Schwab  <schwab@suse.de>
831
832         * infcmd.c (construct_inferior_arguments): Handle newlines
833         specially.
834
835 2008-10-30  Joel Brobecker  <brobecker@adacore.com>
836
837         * breakpoint.h (enum bptype): Delete bp_catch_exec.
838         * breakpoint.c (insert_catchpoint): Remove handling for
839         bp_catch_exec breakpoint kinds.
840         (insert_bp_location, update_breakpoints_after_exec, remove_breakpoint)
841         (ep_is_catchpoint, print_it_typical, bpstat_check_location),
842         (bpstat_check_location, bpstat_what, print_one_breakpoint_location)
843         (print_one_breakpoint_location, user_settable_breakpoint)
844         (breakpoint_address_is_meaningful, adjust_breakpoint_address)
845         (allocate_bp_location, mention, breakpoint_re_set_one)
846         (disable_command, enable_command): Likewise.
847         (create_exec_event_catchpoint): Delete.
848         (insert_catch_exec, remove_catch_exec, breakpoint_hit_catch_exec)
849         (print_it_catch_exec, print_one_catch_exec, print_mention_catch_exec):
850         New functions.
851         (catch_exec_breakpoint_ops): New static global.
852         (catch_exec_command_1): Use create_catchpoint instead of
853         create_exec_event_catchpoint to create the exec catchpoint.
854
855 2008-10-28  Tom Tromey  <tromey@redhat.com>
856
857         * Makefile.in (SUBDIR_CLI_OBS): Don't mention cli-utils.o.
858         (SUBDIR_CLI_DEPS): Don't mention cli-utils.c.
859         (HFILES_NO_SRCDIR): Don't mention cli-utils.h.
860         (cli-utils.o): Remove.
861         * cli/cli-utils.c: Remove.
862         * cli/cli-utils.h: Remove.
863
864 2008-10-28  Tom Tromey  <tromey@redhat.com>
865
866         * varobj.c (value_get_print_value): Include valprint.h.
867         (value_get_print_value): Use get_formatted_print_options.
868         * value.h (struct value_print_options): Declare.
869         (value_print, val_print, common_val_print, val_print_string):
870         Update.
871         * value.c: Include valprint.h.
872         (show_values): Use get_user_print_options.
873         (show_convenience): Likewise.
874         * valprint.h (prettyprint_arrays, prettyprint_structs): Don't
875         declare.
876         (struct value_print_options): New type.
877         (vtblprint, unionprint, addressprint, objectprint, print_max,
878         inspect_it, repeat_count_threshold, output_format,
879         stop_print_at_null): Don't declare.
880         (user_print_options, get_user_print_options,
881         get_raw_print_options, get_formatted_print_options): Declare.
882         (print_array_indexes_p): Don't declare.
883         (maybe_print_array_index, val_print_array_elements): Update.
884         * valprint.c (print_max): Remove.
885         (user_print_options): New global.
886         (get_user_print_options, get_raw_print_options,
887         get_formatted_print_options): New functions.
888         (print_array_indexes, repeat_count_threshold, stop_print_at_null,
889         prettyprint_structs, prettyprint_arrays, unionprint,
890         addressprint): Remove.
891         (val_print): Remove format, deref_ref, pretty arguments; add
892         options.  Update.
893         (common_val_print): Likewise.
894         (print_array_indexes_p): Remove.
895         (maybe_print_array_index): Remove format, pretty arguments; add
896         options.  Update.
897         (val_print_array_elements): Remove format, deref_ref, pretty
898         arguments; add options.  Update.
899         (val_print_string): Add options argument.  Update.
900         (_initialize_valprint): Use user_print_options.
901         (output_format): Remove.
902         (set_output_radix_1): Use user_print_options.
903         * typeprint.c: Include valprint.h.
904         (objectprint): Don't declare.
905         (whatis_exp): Use get_user_print_options.
906         * tui/tui-regs.c: Include valprint.h.
907         (tui_register_format): Use get_formatted_print_options.
908         * tracepoint.c: Include valprint.h.
909         (addressprint): Don't declare.
910         (trace_mention): Use get_user_print_options.
911         (tracepoints_info): Likewise.
912         * stack.c (print_frame_args): Use get_raw_print_options.
913         (print_frame_info): Use get_user_print_options.
914         (print_frame): Likewise.
915         * sh64-tdep.c: Include valprint.h
916         (sh64_do_register): Use get_formatted_print_options.
917         * scm-valprint.c (scm_inferior_print): Remove format, deref_ref,
918         pretty arguments; add options.
919         (scm_scmlist_print): Likewise.  Update.
920         (scm_scmval_print): Likewise.
921         (scm_val_print): Likewise.
922         (scm_value_print): Remove format, pretty arguments; add options.
923         Update.
924         * scm-lang.h (scm_value_print, scm_val_print, scm_scmval_print):
925         Update.
926         * scm-lang.c (scm_printstr): Add options argument.
927         * python/python-value.c: Include valprint.h.
928         (valpy_str): Use get_user_print_options.
929         * printcmd.c: Include valprint.h.
930         (addressprint): Don't declare.
931         (inspect_it): Remove.
932         (print_formatted): Remove format option; add options.  Update.
933         (print_scalar_formatted): Likewise.
934         (print_address_demangle): Use get_user_print_options.
935         (do_examine): Use get_formatted_print_options.
936         (print_command_1): Likewise.
937         (output_command): Use get_formatted_print_options.
938         (do_one_display): Likewise.
939         (print_variable_value): Use get_user_print_options.
940         * p-valprint.c (pascal_val_print): Remove format, deref_ref,
941         pretty arguments; add options.  Update.
942         (pascal_value_print): Remove format, pretty arguments; add
943         options.  Update.
944         (vtblprint, objectprint): Don't declare.
945         (pascal_static_field_print): Remove.
946         (pascal_object_print_value_fields): Remove format, pretty
947         arguments; add options.  Update.
948         (pascal_object_print_static_field): Likewise.
949         (_initialize_pascal_valprint): Use user_print_options.  Update.
950         * p-lang.h (pascal_val_print, pascal_value_print,
951         pascal_printstr, pascal_object_print_value_fields): Update.
952         (vtblprint, static_field_print): Don't declare.
953         * p-lang.c (pascal_printstr): Add options argument.  Update.
954         * objc-lang.c (objc_printstr): Add options argument.  Update.
955         * mt-tdep.c: Include valprint.h.
956         (mt_registers_info): Use get_raw_print_options.
957         * mips-tdep.c: Include valprint.h.
958         (mips_print_fp_register): Use get_formatted_print_options.
959         (mips_print_register): Likewise.
960         * mi/mi-main.c: Include valprint.h.
961         (get_register): Use get_user_print_options.
962         (mi_cmd_data_evaluate_expression): Likewise.
963         (mi_cmd_data_read_memory): Use get_formatted_print_options.
964         * mi/mi-cmd-stack.c: Include valprint.h.
965         (list_args_or_locals): Use get_raw_print_options.
966         * m2-valprint.c (print_function_pointer_address): Add addressprint
967         argument.
968         (m2_print_long_set): Remove format, pretty arguments.
969         (m2_print_unbounded_array): Remove format, deref_ref, pretty
970         arguments; add options.  Update.
971         (print_unpacked_pointer): Remove format argument; add options.
972         Now static.  Update.
973         (print_variable_at_address): Remove format, deref_ref, pretty
974         arguments; add options.  Update.
975         (m2_print_array_contents): Likewise.
976         (m2_val_print): Likewise.
977         * m2-lang.h (m2_val_print): Update.
978         * m2-lang.c (m2_printstr): Add options argument. Update.
979         * language.h (struct value_print_options): Declare.
980         (struct language_defn) <la_printstr>: Add options argument.
981         <la_val_print>: Remove format, deref_ref, pretty argument; add
982         options.
983         <la_value_print>: Remove format, pretty arguments; add options.
984         <la_print_array_index>: Likewise.
985         (LA_VAL_PRINT, LA_VALUE_PRINT, LA_PRINT_STRING,
986         LA_PRINT_ARRAY_INDEX): Update.
987         (default_print_array_index): Update.
988         * language.c (default_print_array_index): Remove format, pretty
989         arguments; add options.  Update.
990         (unk_lang_printstr): Add options argument.
991         (unk_lang_val_print): Remove format, deref_ref, pretty arguments;
992         add options.
993         (unk_lang_value_print): Remove format, pretty arguments; add
994         options.
995         * jv-valprint.c (java_value_print): Remove format, pretty
996         arguments; add options.  Update.
997         (java_print_value_fields): Likewise.
998         (java_val_print): Remove format, deref_ref, pretty arguments; add
999         options.  Update.
1000         * jv-lang.h (java_val_print, java_value_print): Declare.
1001         * infcmd.c: Include valprint.h.
1002         (print_return_value): Use get_raw_print_options.
1003         (default_print_registers_info): Use get_user_print_options,
1004         get_formatted_print_options.
1005         (registers_info): Use get_formatted_print_options.
1006         * gdbtypes.h (struct value_print_options): Declare.
1007         (print_scalar_formatted): Update.
1008         * f-valprint.c (f77_print_array_1): Remove format, deref_ref,
1009         pretty arguments; add options.  Update.
1010         (f77_print_array): Likewise.
1011         (f_val_print): Likewise.
1012         * f-lang.h (f_val_print): Update.
1013         * f-lang.c (f_printstr): Add options argument.  Update.
1014         (c_value_print): Update declaration.
1015         * expprint.c: Include valprint.h.
1016         (print_subexp_standard): Use get_raw_print_options,
1017         get_user_print_options.
1018         * eval.c: Include valprint.h.
1019         (objectprint): Don't declare.
1020         (evaluate_subexp_standard): Use get_user_print_options.
1021         * cp-valprint.c (vtblprint, objectprint, static_field_print):
1022         Remove.
1023         (cp_print_value_fields): Remove format, pretty arguments; add
1024         options.  Update.
1025         (cp_print_value): Likewise.
1026         (cp_print_static_field): Likewise.
1027         (_initialize_cp_valprint): Use user_print_options.  Update.
1028         * c-valprint.c (print_function_pointer_address): Add addressprint
1029         argument.
1030         (c_val_print): Remove format, deref_ref, pretty arguments; add
1031         options.  Update.
1032         (c_value_print): Add options argument.  Update.
1033         * c-lang.h (c_val_print, c_value_print, c_printstr): Update.
1034         (vtblprint, static_field_print): Don't declare.
1035         (cp_print_value_fields): Update.
1036         * c-lang.c (c_printstr): Add options argument.  Update.
1037         * breakpoint.c: Include valprint.h.
1038         (addressprint): Don't declare.
1039         (watchpoint_value_print): Use get_user_print_options.
1040         (print_one_breakpoint_location): Likewise.
1041         (breakpoint_1, print_it_catch_fork, print_it_catch_vfork, mention,
1042         print_exception_catchpoint): Likewise.
1043         * auxv.c (fprint_target_auxv): Don't declare addressprint.  Use
1044         get_user_print_options.
1045         * ada-valprint.c (struct ada_val_print_args): Remove format,
1046         deref_ref, and pretty; add options.
1047         (print_optional_low_bound): Add options argument.
1048         (val_print_packed_array_elements): Remove format and pretty
1049         arguments; add options.  Update.
1050         (printstr): Add options argument.  Update.
1051         (ada_printstr): Likewise.
1052         (ada_val_print): Remove format, deref_ref, pretty arguments; add
1053         options argument.  Update.
1054         (ada_val_print_stub): Update.
1055         (ada_val_print_array): Remove format, deref_ref, pretty arguments;
1056         add options.  Update.
1057         (ada_val_print_1): Likewise.
1058         (print_variant_part): Likewise.
1059         (ada_value_print): Remove format, pretty arguments; add options.
1060         Update.
1061         (print_record): Likewise.
1062         (print_field_values): Likewise.
1063         * ada-lang.h (ada_val_print, ada_value_print, ada_printstr):
1064         Update.
1065         * ada-lang.c (ada_print_array_index): Add options argument; remove
1066         format and pretty arguments.
1067         (print_one_exception): Use get_user_print_options.
1068
1069 2008-10-28  Tom Tromey  <tromey@redhat.com>
1070
1071         * cli/cli-script.c (do_fclose_cleanup): Remove.
1072         (script_from_file): Use make_cleanup_fclose.
1073         * xml-tdesc.c (do_cleanup_fclose): Remove.
1074         (fetch_xml_from_file): Use make_cleanup_fclose.
1075         * tracepoint.c (tracepoint_save_command): Use
1076         make_cleanup_fclose.  Always free pathname.
1077         * source.c (print_source_lines_base): Use make_cleanup_fclose.
1078         * remote.c (fclose_cleanup): Remove.
1079         (remote_file_put): Use make_cleanup_fclose.
1080         (remote_file_get): Likewise.
1081         * linux-nat.c (linux_nat_find_memory_regions): Use
1082         make_cleanup_fclose.
1083         (linux_nat_info_proc_cmd): Likewise.
1084         (linux_proc_pending_signals): Likewise.
1085         * fbsd-nat.c (fbsd_find_memory_regions): Use make_cleanup_fclose.
1086         Free file name.
1087         * cli/cli-dump.c (do_fclose_cleanup): Remove.
1088         (make_cleanup_fclose): Remove.
1089         * defs.h (make_cleanup_fclose): Declare.
1090         * utils.c (do_fclose_cleanup): New function.
1091         (make_cleanup_fclose): Likewise.
1092
1093 2008-10-27  Pedro Alves  <pedro@codesourcery.com>
1094
1095         * inflow.c (kill_command): If the target claims there is still
1096         execution, don't clear the thread list.
1097
1098 2008-10-27  Pedro Alves  <pedro@codesourcery.com>
1099
1100         * cp-name-parser.y: Include defs.h instead of config.h.
1101         (parse_escape): Rename to ...
1102         (cp_parse_escape): ... this.
1103         (yylex): Update.
1104         (xfree) [TEST_CPNAMES]: New.
1105
1106 2008-10-27  Pedro Alves  <pedro@codesourcery.com>
1107
1108         * CONTRIBUTE: Mention autoconf 2.59 and configure.ac instead of
1109         2.13 and configure.in.
1110
1111 2008-10-27  Pedro Alves  <pedro@codesourcery.com>
1112
1113         * target.h (struct target_ops) <to_supports_multi_process>: New
1114         field.
1115         (target_supports_multi_process): New define.
1116         * target.c (update_current_target): Inherit and de_fault
1117         to_supports_multi_process.
1118         * infcmd.c (attach_command): Allow attaching to multiple processes
1119         if the target supports it.
1120         (detach_command): If the target claims there is still execution,
1121         don't clear the thread list.
1122         * remote.c (remote_supports_multi_process): New.
1123         (init_remote_ops): Register remote_supports_multi_process.
1124
1125 2008-10-27  Pedro Alves  <pedro@codesourcery.com>
1126
1127         * Makefile.in (.y.c, .l.c): sed free to xfree.
1128
1129 2008-10-27  Pedro Alves  <pedro@codesourcery.com>
1130
1131         * Makefile.in (INSTALLED_LIBS, CLIBS): Remove reference to
1132         $(TM_CLIBS).
1133         (CDEPS): Remove reference to $(TM_CDEPS).
1134
1135 2008-10-26  Michael Snyder  <msnyder@vmware.com>
1136
1137         * infrun.c (handle_inferior_event): Handle dynamic symbol
1138         resolution in reverse.
1139
1140 2008-10-25  Joel Brobecker  <brobecker@adacore.com>
1141
1142         * infrun.c: Minor comment reformatting.
1143
1144 2008-10-25  Pedro Alves  <pedro@codesourcery.com>
1145
1146         * ada-exp.y (write_object_renaming): Use malloc instead of
1147         xmalloc.
1148         * p-exp.y (pop_current_type): Use free instead of xfree.
1149
1150 2008-10-24  Pedro Alves  <pedro@codesourcery.com>
1151
1152         * fork-child.c (startup_inferior): Only set threads not-executing
1153         after getting all the pending execs.  On TARGET_WAITKIND_IGNORE,
1154         keep waiting, don't resume.  On all other cases but
1155         TARGET_WAITKIND_SIGNALLED and TARGET_WAITKIND_EXITED, switch to
1156         the event ptid.
1157
1158 2008-10-24  Pedro Alves  <pedro@codesourcery.com>
1159
1160         Remote non-stop mode support.
1161
1162         * remote.c (pending_stop_reply): New.
1163         (struct remote_state) <non_stop_aware, support_vCont_t>: New
1164         fields.
1165         (remote_async_inferior_event_token)
1166         (remote_async_get_pending_events_token): New.
1167         (notice_new_inferiors): New, abstracted out from record_currthread.
1168         (record_currthread): Call it.
1169         (remote_threads_info): Default threads to running in non-stop
1170         mode.  In non-stop mode, only qfThreadInfo is supported.
1171         (remote_close): Discard all pending stop_replies.  Close the event
1172         sources.
1173         (set_stop_requested_callback): New.
1174         (remote_start_remote): Implement non-stop mode startup.  In
1175         all-stop, don't clear the thread list here.
1176         (remote_non_stop_feature): New.
1177         (remote_protocol_features): Add a "QNonStop" feature.
1178         (remote_open_1): Clear cached_wait_status and non_stop_aware.
1179         Clear the thread list here.
1180         (remote_detach_1): Discard pending stop replies of the process we
1181         detached from.
1182         (extended_remote_attach_1): Implement non-stop mode.
1183         (remote_vcont_probe): Recognize `vCont;t'.
1184         (remote_vcont_resume): Implement non-stop mode.
1185         (remote_resume): Don't set waiting_for_stop_reply in non-stop
1186         mode.
1187         (remote_stop_ns): New.
1188         (remote_stop): Rename to ...
1189         (remote_stop_as): ... this.  If we have a cached wait status,
1190         don't bother interrupting the remote.
1191         (remote_stop): Reimplement as wrapper around remote_stop_as and
1192         remote_stop_ns.
1193         (interrupt_query): Don't query in async mode.
1194         (struct cached_reg, cahed_reg_t): New.
1195         (struct stop_reply): New.
1196         (stop_reply_queue): New.
1197         (stop_reply_xmalloc, stop_reply_xfree)
1198         (discard_pending_stop_replies, do_stop_reply_xfree)
1199         (queued_stop_reply, push_stop_reply, peek_stop_reply)
1200         (remote_parse_stop_reply, remote_get_pending_stop_replies)
1201         (process_stop_reply): New.
1202         (remote_wait_ns): New.
1203         (remote_wait_as): Use remote_parse_stop_reply.  Invalidate the
1204         notion of current general thread is a process exit was reported.
1205         (remote_wait): Call remote_wait_ns in non-stop mode.
1206         (handle_notification): New.
1207         (putpkt_binary): Handle notifications.  Don't care for
1208         waiting_for_stop_reply in non-stop mode.
1209         (getpkt_sane): Rename to ...
1210         (getpkt_or_notif_sane_1): ... this.  Add `expecting_notif'
1211         argument.  Handle it.  Handle notifications.
1212         (getpkt_sane): Reimplement as wrapper around getpkt_or_notif_sane_1.
1213         (getpkt_or_notif_sane): New.
1214         (select_new_thread_callback): Check for exited state instead of
1215         comparing the ptid against minus_one_ptid.
1216         (extended_remote_create_inferior_1): Query the remote about the
1217         current thread.
1218         (remote_supports_non_stop): New.
1219         (init_remote_ops): Register it.
1220         (remote_async_inferior_event_handler): New.
1221         (remote_async_get_pending_events_handler): New.
1222
1223         * infcmd.c (proceed_thread_callback): Comment.
1224         (proceed_after_attach_callback, proceed_after_attach): New.
1225         (attach_command_post_wait): In background attach, resume all
1226         threads, but only if they are unsignalled, and not explicitly
1227         stopped.  In foreground attach, in non-stop mode, make sure to
1228         stop all threads of the just attached to process.
1229         (attach_command): In non-stop mode: If doing a background attach,
1230         stop at least one thread.  If a foreground attach, stop all
1231         threads.
1232
1233 2008-10-24  Pedro Alves  <pedro@codesourcery.com>
1234
1235         * event-loop.h: Mention async_event_handlers.
1236         (async_event_handler): Forward declare.
1237         (async_event_handler_func): New typedef.
1238         (create_async_event_handler, delete_async_event_handler)
1239         (mark_async_event_handler): Declare.
1240         * event-loop.c (event_data): New.
1241         (event_handler_func): Take an event_data instead of an integer.
1242         (struct gdb_event): Replace the integer file descriptor by a
1243         generic event_data.
1244         (async_event_handler): New.
1245         (async_handler_ready): Delete.
1246         (async_event_handler_list): New.
1247         (create_event): New.
1248         (create_file_event): Use it.
1249         (process_event): Adjust.
1250         (gdb_do_one_event): Poll from the event sources in round-robin
1251         fashion across calls.  Be sure to consult all sources before
1252         blocking.
1253         (handle_file_event): Take an event_data instead of an integer.
1254         Adjust.
1255         (gdb_wait_for_event): Add `block' argument.  Handle it.
1256         (mark_async_signal_handler): Remove unneeded cast.
1257         (invoke_async_signal_handler): Rename to ...
1258         (invoke_async_signal_handlres): ... this.  Return true if any was
1259         handled.
1260         (check_async_ready): Delete
1261         (create_async_event_handler): New.
1262         (mark_async_event_handler): New.
1263         (struct async_event_handler_data): New.
1264         (invoke_async_event_handler): New.
1265         (check_async_event_handlers): New.
1266         (delete_async_event_handler): New.
1267         (handle_timer_event): Adjust.
1268
1269 2008-10-24  Doug Evans  <dje@google.com>
1270
1271         * dwarf2read.c (typename_concat): Don't segv if prefix or suffix
1272         is NULL.  Simplify obs == NULL case.
1273
1274 2008-10-24  Hui Zhu  <teawater@gmail.com>
1275             Pedro Alves  <pedro@codesourcery.com>
1276
1277         * infrun.c (can_use_displaced_stepping): Change type to
1278         const char pointer.
1279         (can_use_displaced_stepping_auto): New string.
1280         (can_use_displaced_stepping_on): New string.
1281         (can_use_displaced_stepping_off): New string.
1282         (can_use_displaced_stepping_enum): New array.
1283         (show_can_use_displaced_stepping): In auto mode, also show
1284         the current effect of the option.
1285         (use_displaced_stepping): Return non-zero if displaced
1286         stepping is auto, and can be used with GDBARCH, and in
1287         non-stop mode.  Return non-zero if displaced stepping is on,
1288         and can be used with GDBARCH.  Return zero otherwise.
1289         (_initialize_infrun): Make the "set displaced-stepping"
1290         command an enum command.  Change its class to class_run.
1291         Place it in the top level set list.  Extend help to describe
1292         the auto mode.
1293
1294 2008-10-23  Pedro Alves  <pedro@codesourcery.com>
1295
1296         * defs.h: Mention ptid_is_pid.
1297         * inferior.h (ptid_is_pid): Declare.
1298         * gdbthread.h (struct thread_info) <stop_requested>: New field.
1299         (set_stop_requested): Declare.
1300         * infcmd.c (interrupt_target_1): Call set_stop_requested.
1301         * infrun.c (clear_proceed_status): Clear stop_requested.
1302         (infrun_thread_stop_requested_callback,
1303         infrun_thread_stop_requested): New.
1304         (handle_inferior_event): If a TARGET_SIGNAL_TRAP is reported on a
1305         thread that had an explicit stop request, pretend we got a
1306         TARGET_SIGNAL_0.  Always stop if the thread had an explicit stop
1307         request.
1308         (print_stop_reason): In the SIGNAL_RECEIVED case, if we're not
1309         outputting to MI, and we got a TARGET_SIGNAL_0, print "# Stopped",
1310         instead of mentioning signal 0.
1311         (ptid_is_pid): New.
1312         * thread.c (set_stop_requested): New.
1313
1314         * linux-nat.c (queued_waitpid): Rename to ...
1315         (queued_waitpid_1): ... this.  Add `peek' argument.  Handle it.
1316         (queued_waitpid): New, as wrapper to queued_waitpid_1.
1317         (push_waitpid): Push the SIGTRAP to the local event queue, to the
1318         kernel's.
1319         (send_sigint_callback): Delete.
1320         (linux_nat_stop_lwp): New.
1321         (linux_nat_stop): Use it.
1322
1323 2008-10-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1324
1325         * python/python-value (valpy_getitem): Fix heap corruption.
1326         
1327 2008-10-23  Aleksandar Ristovski  <aristovski@qnx.com>
1328
1329         * nto-procfs.c (do_attach): Form proper ptid including pid and tid.
1330         (procfs_create_inferior): Fetch list of threads.
1331
1332 2008-10-23  Aleksandar Ristovski  <aristovski@qnx.com>
1333
1334         * nto-procfs.c (procfs_files_info): Fix a typo.
1335         (procfs_create_inferior): Make attach_flag per-inferior.
1336
1337 2008-10-23  Tom Tromey  <tromey@redhat.com>
1338
1339         * python/python-value.c (value_to_value_object): Initialize
1340         owned_by_gdb field.
1341         (valpy_new): Likewise.
1342         
1343 2008-10-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1344             Joel Brobecker  <brobecker@adacore.com>
1345
1346         * ada-tasks.c (task_states, long_task_states): Use constant N_()
1347         initializer.  Define the strings as const.
1348         (short_task_info, info_task): Translate the strings above.
1349
1350 2008-10-22  Joel Brobecker  <brobecker@adacore.com>
1351
1352         * NEWS: Add entry for new feature (Ada tasking support).
1353
1354 2008-10-22  Joel Brobecker  <brobecker@adacore.com>
1355
1356         * configure.ac: On alpha-osf, error out if enable_tui is set to
1357         "yes", and set enable_tui to "no" if previously set to "auto".
1358         Check for waddstr only if TUI support was requested. Move the
1359         part of the configure script that updates various Makefile
1360         variables up, together with the check for waddstr.
1361         * configure: Regenerate.
1362
1363 2008-10-22  Joel brobecker  <brobecker@adacore.com>
1364
1365         * gdbtypes.c (copy_type): New function.
1366         * gdbtypes.h (copy_type): Add declaration.
1367         * ada-lang.c (ada_to_fixed_type_1): If there is a parallel XVZ
1368         variable, then use it.
1369
1370 2008-10-22  Joel Brobecker  <brobecker@adacore.com>
1371
1372         * target.h (struct target_ops): Add new field to_get_ada_task_ptid.
1373         (target_get_ada_task_ptid): New macro.
1374         * target.c (default_get_ada_task_ptid): New function.
1375         (update_current_target): Inherit field default_get_ada_task_ptid.
1376         (update_current_target): Make default_get_ada_task_ptid the default
1377         value for field to_get_ada_task_ptid.
1378         * ada-lang.h (struct task_control_block): Delete. Never used.
1379         (struct task_ptid, task_ptid_t, struct task_entry, task_list):
1380         Likewise.
1381         (struct ada_task_info): New.
1382         (ada_task_is_alive, ada_find_printable_frame)
1383         (ada_task_list_iterator_ftype, iterate_over_live_ada_tasks): Add
1384         declarations.
1385         (ada_build_task_list): Update prototype.
1386         (init_task_list, ada_is_exception_breakpoint): Remove prototypes.
1387         * ada-lang.c (ada_find_printable_frame): Make non-static.
1388         * ada-tasks.c: New file.
1389         * Makefile.in (SFILES): Add ada-tasks.c.
1390         (COMMON_OBS): Add ada-tasks.o.
1391         * linux-thread-db.c (thread_db_find_thread_from_tid)
1392         (thread_db_get_ada_task_ptid): New functions.
1393         (init_thread_db_ops): Set thread_db_ops.to_get_ada_task_ptid.
1394
1395 2008-10-22  Tom Tromey  <tromey@redhat.com>
1396
1397         PR gdb/2506:
1398         * c-exp.y (string_exp): New production.
1399         (exp): Use it.
1400
1401 2008-10-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1402
1403         * mips-tdep.c (mips_n32n64_fp_arg_chunk_p): Update TYPE_FIELD_STATIC
1404         removed before.
1405
1406 2008-10-20  Joel Brobecker  <brobecker@adacore.com>
1407
1408         * NEWS: Add entry mentioning thread-support on Tru64
1409
1410 2008-10-19  Joel Brobecker  <brobecker@adacore.com>
1411
1412         * dec-thread.c: New file.
1413         * config/alpha/alpha-osf3.mh (NATDEPFILES): Add dec-thread.o.
1414         (NAT_CLIBS): Define.
1415
1416 2008-10-19  Hui Zhu  <teawater@gmail.com>
1417
1418         * infrun.c (handle_inferior_event): Set "stop_pc" when
1419         TARGET_WAITKIND_NO_HISTORY.
1420
1421 2008-10-19  Pedro Alves  <pedro@codesourcery.com>
1422
1423         * python/python-value.c (value_object_methods)
1424         (value_object_as_number, value_object_as_mapping): Move to bottom
1425         of file.
1426         (valpy_dealloc, valpy_new, valpy_length, valpy_getitem)
1427         (valpy_setitem, valpy_str, valpy_add, valpy_subtract)
1428         (valpy_multiply, valpy_divide, valpy_remainder, valpy_power)
1429         (valpy_negative, valpy_positive, valpy_absolute, valpy_nonzero)
1430         (valpy_richcompare, valpy_dereference): Don't forward-declare.
1431         (valpy_length) [HAVE_LIBPYTHON2_4]: Change return type to `int'.
1432
1433 2008-10-18  Pedro Alves  <pedro@codesourcery.com>
1434
1435         * infrun.c (adjust_pc_after_break): Do nothing if executing in
1436         reverse.
1437
1438 2008-10-17  Pedro Alves  <pedro@codesourcery.com>
1439
1440         * infcmd.c (GO_USAGE): Delete.
1441         (go_command): Adjust.
1442
1443 2008-10-17  Michael Snyder  <msnyder@vmware.com>
1444         Target interface for reverse debugging.
1445         * target.h (enum target_waitkind): 
1446         Add new wait event, TARGET_WAITKIND_NO_HISTORY.
1447         (struct target_ops): New method to_can_execute_reverse.
1448         (target_can_execute_reverse): New macro.
1449         * target.c (update_current_target): Inherit to_can_execute_reverse.
1450
1451         Remote interface for reverse debugging.
1452         * remote.c (remote_can_execute_reverse): New target method.
1453         (remote_resume): Check for reverse exec direction, and send 
1454         appropriate command to target.
1455         (remote_wait_as): Check target response for NO_HISTORY status.
1456         Also check for empty reply (target doesn't understand "bs" or "bc).
1457         (remote_vcont_resume): Jump out if attempting reverse execution.
1458
1459         Event handling interface for reverse debugging.
1460         * infrun.c (execution_direction): New state variable.
1461         (enum inferior_stop_reason): Add NO_HISTORY reason.
1462         (handle_inferior_event): Handle TARGET_WAITKIND_NO_HISTORY.
1463         Handle stepping over a function call in reverse.
1464         Handle stepping thru a line range in reverse.
1465         Handle setting a step-resume breakpoint in reverse.
1466         Handle stepping into a function in reverse.
1467         Handle stepping between line ranges in reverse.
1468         (print_stop_reason): Print reason for NO_HISTORY.
1469         (step_into_function): Rename to handle_step_into_function.
1470         (handle_step_into_function_backward): New function.
1471         (set_exec_direction_func, show_exec_direction_func): New funcs.
1472         (proceed): No need to singlestep over a breakpoint
1473         when resuming in reverse.
1474         
1475         * inferior.h (enum exec_direction_kind): New enum.
1476         (execution_direction): Export new execution state variable.
1477
1478         * breakpoint.c (make_breakpoint_silent): New function.
1479         * breakpoint.h (make_breakpoint_silent): Export.
1480         * infcmd.c (finish_command): Check for reverse exec direction.
1481         (finish_backward): New function, handle finish cmd in reverse.
1482
1483         User interface for reverse execution.
1484         * Makefile.in (reverse.c): New file.
1485         * reverse.c: New file.  User interface for reverse execution.
1486
1487 2008-10-17  Pedro Alves  <pedro@codesourcery.com>
1488
1489         * remote.c (record_currthread): Add inferior before child threads.
1490         (remote_threads_info): Check for exited threads.  Mention
1491         notification order.
1492
1493 2008-10-16  Joel Brobecker  <brobecker@adacore.com>
1494
1495         * breakpoint.h (enum bptype): New enum bp_catchpoint.
1496         Delete bp_catch_fork and bp_catch_vfork.
1497         (struct breakpoint_ops): Add new methods "insert", "remove"
1498         and "breakpoint_hit".
1499         * breakpoint.c (create_fork_vfork_event_catchpoint)
1500         (create_fork_event_catchpoint, create_vfork_event_catchpoint): Remove.
1501         (insert_catchpoint): Remove handling of bp_catch_fork and
1502         bp_catch_vfork catchpoints, and handle them as bp_catchpoint
1503         catchpoints instead.
1504         (insert_bp_location, update_breakpoints_after_exec)
1505         (remove_breakpoint, bpstat_check_location, bpstat_what)
1506         (allocate_bp_location): Likewise.
1507         (print_it_typical, print_one_breakpoint_location, mention): Remove
1508         handling of bp_catch_fork and bp_catch_vfork breakpoints.
1509         (ep_is_catchpoint, user_settable_breakpoint)
1510         (breakpoint_address_is_meaningful, adjust_breakpoint_address)
1511         (breakpoint_re_set_one, disable_command, enable_command):
1512         Remove use of bp_catch_fork and bp_catch_vfork.  Add handling of
1513         bp_catchpoint breakpoints.
1514         (insert_catch_fork, remove_catch_fork, breakpoint_hit_catch_fork)
1515         (print_it_catch_fork, print_one_catch_fork, print_mention_catch_fork):
1516         New functions.
1517         (catch_fork_breakpoint_ops): New static constant.
1518         (insert_catch_vfork, remove_catch_vfork, breakpoint_hit_catch_vfork)
1519         (print_it_catch_vfork, print_one_catch_vfork)
1520         (print_mention_catch_vfork): New functions.
1521         (catch_vfork_breakpoint_ops): New static constant.
1522         (create_catchpoint, create_fork_vfork_event_catchpoint): New functions.
1523         (catch_fork_command_1): Use create_fork_vfork_event_catchpoint
1524         to create the fork and vfork catchpoints.
1525         (gnu_v3_exception_catchpoint_ops): Set new breakpoint_ops fields.
1526         * ada-lang.c (catch_exception_breakpoint_ops): Set new breakpoint_ops
1527         fields.
1528         (catch_exception_unhandled_breakpoint_ops): Likewise.
1529         (catch_assert_breakpoint_ops): Likewise.
1530
1531 2008-10-16  Pedro Alves  <pedro@codesourcery.com>
1532
1533         * remote.c (set_general_process): New.
1534         (remote_check_symbols): Use it.
1535
1536 2008-10-16  Pedro Alves  <pedro@codesourcery.com>
1537
1538         * remote.c (push_remote_target): Delete.
1539         * target.h (push_remote_target): Delete declaration.
1540
1541 2008-10-15  Pedro Alves  <pedro@codesourcery.com>
1542
1543         * remote.c (remote_close): Unregister remote_desc from the event
1544         loop.  Always restore the SIGINT handler.  Discard all inferiors
1545         here.
1546         (remote_detach_1, remote_disconnect): Don't unregister the file
1547         descriptor from the event loop here.
1548         (interrupt_query, readchar, getpkt_sane): Pop the target instead
1549         of morning the current inferior.
1550         (remote_kill): Don't unregister the file descriptor from the event
1551         loop here.
1552         (remote_mourn_1): Don't discard inferiors here.
1553
1554 2008-10-15  Pedro Alves  <pedro@codesourcery.com>
1555
1556         * breakpoint.c (breakpoint_init_inferior): Clean up the moribund
1557         locations list.
1558         (moribund_breakpoint_here_p): Record the moribund
1559         location in the moribund_locations vector.
1560         * breakpoint.h (moribund_breakpoint_here_p): Declare.
1561         (displaced_step_fixup): Check if the breakpoint the thread was
1562         trying to step over has been removed since having been placed in
1563         the displaced stepping queue.
1564         (adjust_pc_after_break): In non-stop mode, check for a moribund
1565         breakpoint at the stop pc.
1566         (handle_inferior_event): Don't retire moribund breakpoints on
1567         TARGET_WAITKIND_IGNORE.
1568
1569 2008-10-15  Pedro Alves  <pedro@codesourcery.com>
1570
1571         * infrun.c (displaced_step_prepare): Switch thread temporarily
1572         while we're here.
1573         (displaced_step_fixup): Make sure target_resume sees ptid as
1574         inferior_ptid.  Add debug output.
1575
1576 2008-10-14  Pedro Alves  <pedro@codesourcery.com>
1577
1578         Remove dead code.
1579
1580         * breakpoint.c (show_breakpoint_hit_counts): Delete.
1581         (print_one_breakpoint_location): Adjust.
1582         (breakpoint_clear_ignore_counts): Delete.
1583         * breakpoint.h (breakpoint_clear_ignore_counts): Remove
1584         declaration.
1585         * target.c (generic_mourn_inferior): Don't clear ignore
1586         counts (never reached).
1587
1588 2008-10-10  Doug Evans  <dje@google.com>
1589
1590         * dwarf2read.c (comp_unit_head): Use unsigned int consistently
1591         for dwarf section offsets and sizes.
1592         (dwarf2_cu): Ditto.
1593         (dwarf2_per_cu_data): Ditto.
1594         (create_all_comp_units): Change offset to unsigned int.
1595         (load_full_comp_unit,find_partial_die_in_comp_unit,find_partial_die,
1596         dwarf2_find_containing_comp_unit,dwarf2_find_comp_unit): Ditto.
1597
1598         * dwarf2read.c (read_initial_length): Delete cu_header arg.
1599         All callers updated.
1600         (read_checked_initial_length_and_offset): New function.
1601         (read_offset_1): New function.
1602         (read_offset): Call it.
1603         (dwarf_decode_line_header): Call read_checked_initial_length_and_offset
1604         instead of read_initial_length.  Call read_offset_1 instead of
1605         read_offset.
1606
1607         * dwarf2read.c (dwarf2_get_ref_die_offset): Remove unused arg `cu'.
1608         All callers updated.
1609
1610         * dwarf2read.c (dwarf_attr_name): Unconditionally support all
1611         DW_AT_MIPS_* except DW_AT_MIPS_fde which collides with
1612         DW_AT_HP_block_index.
1613
1614 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
1615
1616         * remote.c (remote_start_remote): Always tell the stub if we're in
1617         extended-remote.
1618
1619 2008-10-09  Pedro Alves  <pedro@codesourcery.com>
1620
1621         * remote.c (remote_wait): Rename to...
1622         (remote_wait_as): ... this.  Don't loop here.  If the remote
1623         didn't stop, return TARGET_WAITKIND_IGNORE.
1624         (remote_wait): New, reimplemented on top of remote_wait_as.
1625
1626 2008-10-09  Thomas Schwinge  <tschwinge@gnu.org>
1627
1628         * Makefile.in (gnu-nat.o): Revert the 2008-09-10 change, as the problem
1629         is fixed upstream.
1630
1631         * reply_mig_hack.awk: Use the `BAD_TYPECHECK' macro.
1632
1633         * MAINTAINERS (Write After Approval): Add myself.
1634
1635 2008-10-09  Pedro Alves  <pedro@codesourcery.com>
1636
1637         Make it compile without warnings.
1638
1639         * procfs.c (create_procinfo): Initialize `parent'.
1640         (dead_procinfo): Pass a constant string as format to error.
1641         (procfs_address_to_host_pointer): Add cast to gdb_type *.
1642         (procfs_find_LDT_entry): Adjust format string to long int
1643         ptid.tid.
1644         (procfs_xfer_partial): Adjust prototype.  Add gdb_byte* cast.
1645         (procfs_xfer_memory): Adjust prototype.
1646         (info_mappings_callback, info_proc_mappings): Adjust to not pass a
1647         variable as printf_filtered format.
1648         (procfs_make_note_section): Change type of auxv local to gdb_byte.
1649         * Makefile.in: Remove special rule.
1650
1651 2008-10-09  Pedro Alves  <pedro@codesourcery.com>
1652             Daniel Jacobowitz  <dan@codesourcery.com>
1653
1654         * remote.c (remote_open_1): Move acknowledging any pending ack,
1655         querying supported features, activating noack mode, finding the
1656         target description, enabling extended remote, and checking remote
1657         symbols from here ...
1658         (remote_start_remote): ... to here.
1659         (remote_open_1): Don't pop the target if it is already gone.
1660         * target.c (unpush_target): Check for the dummy target.
1661
1662 2008-10-09  Pedro Alves  <pedro@codesourcery.com>
1663
1664         * ser-mingw.c: Include "command.h".
1665         (pipe_windows_open): Declare locals at the beginning of the scope.
1666
1667 2008-10-08  Pedro Alves  <pedro@codesourcery.com>
1668
1669         * remote.c (struct remote_state) <waiting_for_stop_reply>: New
1670         field.
1671         (remote_open_1): Clear waiting_for_stop_reply.
1672         (remote_resume): Set waiting_for_stop_reply.
1673         (remote_wait): Clear or set waiting_for_stop_reply accordingly.
1674         (putpkt_binary): If we're in async mode and waiting for a stop
1675         reply, bail out with an error.
1676         (extended_remote_mourn_1): Clear waiting_for_stop_reply.
1677
1678 2008-10-08  Pedro Alves  <pedro@codesourcery.com>
1679
1680         * remote.c (remote_get_thread_info): If the remote doesn't support
1681         the query, bail out.
1682
1683 2008-10-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
1684
1685         Convert static_kind into loc_kind enum.
1686         * gdbtypes.h (enum field_loc_kind): New.
1687         (union field_location): New field dwarf_block.
1688         (struct field): Rename static_kind as loc_kind.
1689         (FIELD_STATIC_KIND): Rename to ...
1690         (FIELD_LOC_KIND): ... here.
1691         (TYPE_FIELD_STATIC_KIND): Rename to ...
1692         (TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
1693         (TYPE_FIELD_STATIC_HAS_ADDR): Remove.
1694         (TYPE_FIELD_STATIC): Remove.
1695         (TYPE_FIELD_BITPOS): Reformat.
1696         (SET_FIELD_BITPOS): New.
1697         (FIELD_PHYSADDR): Rename to ...
1698         (FIELD_STATIC_PHYSADDR): ... here.
1699         (TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
1700         (SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
1701         (FIELD_PHYSNAME): Rename to ...
1702         (FIELD_STATIC_PHYSNAME): ... here.
1703         (TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
1704         (SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
1705         (FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
1706         (field_is_static): New declaration.
1707         * gdbtypes.c (field_is_static): New function.
1708         (copy_type_recursive): Update throughout.
1709         * amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
1710         eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
1711         p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
1712
1713 2008-10-07  Thomas Schwinge  <tschwinge@gnu.org>
1714             Pedro Alves  <pedro@codesourcery.com>
1715
1716         * gnu-nat.h: Rename `current_inferior' to `gnu_current_inf' to
1717         avoid a name collision.
1718         * gnu-nat.c: Likewise.
1719         * i386gnu-nat.c: Likewise.
1720
1721 2008-10-07  Joel Brobecker  <brobecker@adacore.com>
1722
1723         * ada-lang.c (ada_evaluate_subexp) [OP_ATR_SIZE]: Add handling
1724         of arguments that are references.
1725
1726 2008-10-06  Doug Evans  <dje@google.com>
1727
1728         * dwarf2read.c (dwarf2_die_debug): New static global.
1729         (dump_die_shallow): Renamed from dump_die, New args f, indent.
1730         Print to specified file, indented by the specified amount.
1731         (dump_die_for_error): New fn.  Point all existing callers of
1732         dump_die here.
1733         (dump_die_die_1,dump_die): New fns, replaces ...
1734         (dump_die_list): ... deleted.
1735         (read_die_and_children_1): Old contents of read_die_and_children
1736         moved here.
1737         (read_die_and_children): Rewrite.
1738         (read_die_and_siblings): Call read_die_and_children_1 instead of
1739         read_die_and_children.
1740         (_initialize_dwarf2_read): New option "debug dwarf2-die".
1741         * gdbinit.in (pdie): New macro.
1742
1743         * dwarf2read.c (offset_in_cu_p): New function.
1744         (find_partial_die,follow_die_ref): Use it.
1745
1746         * symmisc.c (maintenance_info_symtabs): Watch for ^c.
1747         (maintenance_info_psymtabs): Ditto.
1748
1749 2008-10-05  Michael Snyder  <msnyder@vmware.com>
1750
1751         * infrun.c (handle_inferior_event): Fix typo in comment.
1752
1753 2008-10-04  Vladimir Prus  <vladimir@codesourcery.com>
1754
1755         * mi/mi-interp.c (mi_on_resume): Flush raw_stdout.
1756
1757 2008-10-03  Paul Pluzhnikov  <ppluzhnikov@google.com>
1758
1759         PR gdb/2384:
1760         * gdbtypes.c (get_vptr_fieldno): baseclass and basetype may have
1761         different lifetimes.
1762         
1763 2008-10-03  Joel Brobecker  <brobecker@adacore.com>
1764
1765         * solib-osf.c: Include "solib.h".
1766
1767 2008-10-03  Paul Pluzhnikov  <ppluzhnikov@google.com>
1768         
1769         * utils.c, defs.h (gdb_buildargv): New fn. Wrap buildargv
1770         and check for out-of-memory condition.
1771         * exec.c (exec_file_command): Call it.
1772         * infrun.c (handle_command, xdb_handle_command): Likewise.
1773         * interps.c (interpreter_exec_cmd): Likewise.
1774         * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
1775         * procfs.c (info_proc_cmd): Likewise.
1776         * remote-mips.c (common_open): Likewise.
1777         * remote-sim.c (gdbsim_kill, gdbsim_create_inferior)
1778         (gdbsim_open): Likewise.
1779         * remote.c (extended_remote_run, remote_put_command)
1780         (remote_get_command, remote_delete_command): Likewise.
1781         * ser-mingw.c (pipe_windows_open): Likesise.
1782         * source.c (add_path, show_substitute_path_command)
1783         (unset_substitute_path_command, set_substitute_path_command):
1784         Likewise.
1785         * stack.c (backtrace_command): Likewise.
1786         * symfile.c (symbol_file_command, generic_load)
1787         (add_symbol_file_command): Likesise.
1788         * symmisc.c (maintenance_print_symbols, maintenance_print_psymbols)
1789         (maintenance_print_msymbols): Likewise.
1790
1791 2008-10-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
1792
1793         Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
1794         * c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
1795         (m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
1796         valops.c (value_cast), varobj.c (c_number_of_children): Replace
1797         TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
1798         TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
1799         * parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
1800         * f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
1801         (f77_get_upperbound): ... this function handling now only
1802         TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
1803         (f77_get_dynamic_lowerbound): Replace with ...
1804         (f77_get_lowerbound): ... this function handling now only
1805         TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
1806         (f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
1807         Update their callers.
1808         * eval.c (evaluate_subexp_standard): Update their callers.
1809         * f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
1810         (f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
1811         prototypes.
1812         (BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
1813         * f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
1814         the lower_bound_was_default variable.  Update the
1815         f77_get_dynamic_upperbound, f77_get_upperbound and
1816         TYPE_ARRAY_UPPER_BOUND_TYPE calls.
1817         * gdbtypes.c (print_bound_type): Remove the function.
1818         (recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
1819         LOWER_BOUND_TYPE.
1820         * gdbtypes.h (enum array_bound_type): Remove.
1821         (struct main_type): Remove the fields upper_bound_type and
1822         lower_bound_type.  Comment the new overload of the field artificial.
1823         (TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
1824         (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
1825         (TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
1826         (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.
1827
1828 2008-10-02  Tom Tromey  <tromey@redhat.com>
1829
1830         * Makefile.in (HFILES_NO_SRCDIR): Remove gdb-events.h, gstdint.h.
1831
1832 2008-10-02  Daniel Jacobowitz  <dan@codesourcery.com>
1833
1834         * mips-linux-tdep.c (mips_linux_in_dynsym_resolve_code): Update
1835         comments.
1836         (mips_linux_skip_resolver): Also use glibc_skip_solib_resolver.
1837         (mips_linux_init_abi): Do not override skip_trampoline_code.
1838         * configure.tgt (mips*-*-linux*): Add glibc-tdep.o.
1839         * mips-tdep.c (mips32_scan_prologue): Stop scanning at branches.
1840         (mips_stub_frame_sniffer): Use the stub frame sniffer for PIC stubs.
1841         (mips_skip_mips16_trampoline_code): Rename from
1842         mips_skip_trampoline_code.
1843         (mips_skip_pic_trampoline_code, mips_skip_trampoline_code): New.
1844         * infrun.c (handle_inferior_event): Do not pass zero to
1845         in_solib_dynsym_resolve_code.
1846
1847 2008-10-02  Pierre Muller  <muller@ics.u-strasbg.fr>
1848             Pedro Alves  <pedro@codesourcery.com>
1849
1850         * win32-nat.c (do_initial_win32_stuff): Set inferior_ptid.
1851
1852
1853 2008-10-01  Tom Tromey  <tromey@redhat.com>
1854
1855         * symtab.c (search_symbols): Update.
1856         * symtab.h (domain_enum_tag) <METHODS_DOMAIN>: Remove.
1857
1858 2008-10-01  Tom Tromey  <tromey@redhat.com>
1859
1860         * symfile.c (syms_from_objfile): Update.
1861         (reread_symbols): Update.
1862         * objfiles.h (OBJF_SYMS): Remove.
1863         (OBJF_REORDERED): Renumber.
1864         (OBJF_SHARED): Likewise.
1865         (OBJF_READNOW): Likewise.
1866         (OBJF_USERLOADED): Likewise.
1867
1868 2008-10-01  Tom Tromey  <tromey@redhat.com>
1869
1870         * symtab.c (find_pc_sect_psymtab): Use MSYMBOL_TYPE.
1871         (find_pc_sect_symtab): Likewise.
1872         * symmisc.c (dump_msymbols): Use MSYMBOL_TYPE.
1873         * solib-som.c (som_solib_desire_dynamic_linker_symbols): Use
1874         MSYMBOL_TYPE, not SYMBOL_TYPE.
1875         * parse.c (write_exp_msymbol): Use MSYMBOL_TYPE.
1876         * objc-lang.c (find_methods): Use MSYMBOL_TYPE.
1877         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Use
1878         MSYMBOL_TYPE.
1879         * m2-exp.y (yylex): Use SYMBOL_CLASS.
1880
1881 2008-10-01  Tom Tromey  <tromey@redhat.com>
1882
1883         * xcoffread.c (RECORD_MINIMAL_SYMBOL): Update.
1884         (scan_xcoff_symtab): Update.
1885         * mdebugread.c (record_minimal_symbol): Update.
1886         (parse_partial_symbols): Update.
1887         * elfread.c (record_minimal_symbol): Update.
1888         * dbxread.c (record_minimal_symbol): Update.
1889         * coffread.c (record_minimal_symbol): Update.
1890         * sh64-tdep.c (MSYMBOL_IS_SPECIAL): Redefine.
1891         (sh64_elf_make_msymbol_special): Update.
1892         * mips-tdep.c (mips_elf_make_msymbol_special): Use
1893         MSYMBOL_TARGET_FLAG_1.
1894         (mips_elf_make_msymbol_special): Likewise.
1895         (msymbol_is_special): Likewise.
1896         * minsyms.c (prim_record_minimal_symbol_and_info): Update.
1897         (install_minimal_symbols): Likewise.
1898         (prim_record_minimal_symbol): Update.
1899         (prim_record_minimal_symbol_and_info): Remove 'info' argument.
1900         * m68hc11-tdep.c (MSYMBOL_SET_RTC): Redefine.
1901         (MSYMBOL_SET_RTI): Redefine.
1902         (MSYMBOL_IS_RTC): Redefine.
1903         (MSYMBOL_IS_RTI): Redefine.
1904         * arm-tdep.c (MSYMBOL_SET_SPECIAL): Redefine.
1905         (MSYMBOL_IS_SPECIAL): Redefine.
1906         * symtab.h (struct minimal_symbol) <info>: Remove.
1907         <target_flag_1, target_flag_2>: New fields.
1908         (MSYMBOL_INFO): Remove.
1909         (MSYMBOL_TARGET_FLAG_1): New macro.
1910         (MSYMBOL_TARGET_FLAG_2): Likewise.
1911         (prim_record_minimal_symbol_and_info): Update.
1912
1913 2008-09-30  Joel Brobecker  <brobecker@adacore.com>
1914
1915         * ada-lang.c (is_digits_suffix): Delete unused function.
1916
1917 2008-09-30  Paul Hilfinger  <hilfinger@adacore.com>
1918
1919         * ada-lang.c (ada_modulus): Correct to avoid sign problem with
1920         moduli >= 2**31.
1921
1922 2008-09-30  Paul Hilfinger  <hilfinger@adacore.com>
1923
1924         * ada-lang.c (ada_lookup_struct_elt_type): Handle case of a "naked"
1925         variant branch.
1926         (empty_record): Use INIT_CPLUS_SPECIFIC, since this field is not
1927         supposed to be null.  Fixes debugger segfaults.
1928         (is_unchecked_variant): New function.
1929         (to_fixed_variant_branch_type): Modify to leave unchecked unions
1930         untouched.
1931         (ada_template_to_fixed_record_type_1): Fix comment.
1932
1933 2008-09-30  Joel Brobecker  <brobecker@adacore.com>
1934
1935         * ada-lang.c (standard_exc): New static constant.
1936         (ada_exception_catchpoint_cond_string): Add special handling
1937         for the predefined exceptions.
1938
1939 2008-09-30  Joel Brobecker  <brobecker@adacore.com>
1940
1941         * ada-lang.c (ADA_RETAIN_DOTS): Delete this dead macro.  Update
1942         the code accordingly.
1943
1944 2008-09-30  Joel Brobecker  <brobecker@adacore.com>
1945
1946         * ada-lang.c (ada_evaluate_subexp) [UNOP_IND]: Remove strange
1947         treatment of expect_type. Return the correct type when dereferencing
1948         an integer.
1949
1950 2008-09-30  Tom Tromey  <tromey@redhat.com>
1951
1952         PR gdb/2484:
1953         * symtab.c (struct add_macro_name_data): New struct.
1954         (add_macro_name): New function.
1955         (default_make_symbol_completion_list): Complete macro names.
1956         * scm-lang.c (scm_language_defn): Update.
1957         * p-lang.c (pascal_language_defn): Update.
1958         * objc-lang.c (objc_language_defn): Update.
1959         * macrotab.h (macro_callback_fn): Add user_data argument.
1960         (macro_for_each): Likewise.
1961         (macro_for_each_in_scope): Declare.
1962         * macrotab.c: (struct macro_for_each_data): New struct.
1963         (foreach_macro): Use it.
1964         (macro_for_each): Likewise.
1965         (foreach_macro_in_scope): New function.
1966         (macro_for_each_in_scope): Likewise.
1967         * macrocmd.c (print_one_macro): Add argument.
1968         (macro_list_command): Pass NULL to macro_for_each.
1969         * m2-lang.c (m2_language_defn): Update.
1970         * language.h (struct language_defn) <la_macro_expansion>: New
1971         field.
1972         (macro_expansion): New enum.
1973         * language.c (unknown_language_defn): Update.  Fix order of
1974         initializers.
1975         (auto_language_defn): Likewise.
1976         (local_language_defn): Update.
1977         * jv-lang.c (java_language_defn): Update.
1978         * f-lang.c (f_language_defn): Update.
1979         * c-lang.c (c_language_defn): Update.
1980         (cplus_language_defn): Likewise.
1981         (asm_language_defn): Likewise.
1982         (minimal_language_defn): Likewise.
1983         * ada-lang.c (ada_language_defn): Update.
1984
1985 2008-09-30  Joel Brobecker  <brobecker@adacore.com>
1986
1987         * dwarf2read.c (dwarf2_get_subprogram_pc_bounds): New function.
1988         (get_scope_pc_bounds): Use it.
1989
1990 2008-09-27  Tom Tromey  <tromey@redhat.com>
1991
1992         * NEWS: Update.
1993         * macrocmd.c (extract_identifier): Add is_parameter argument.
1994         (macro_define_command): Update.
1995         (macro_undef_command): Likewise.
1996         * macroexp.c (stringify): New function.
1997         (find_parameter): Likewise.
1998         (gather_arguments): Add nargs argument.  Handle varargs.
1999         (substitute_args): Add is_varargs and va_arg_name arguments.
2000         Handle varargs, splicing, stringification.  Use find_parameter.
2001         (expand): Handle varargs.
2002
2003 2008-09-27  Tom Tromey  <tromey@redhat.com>
2004
2005         * scm-lang.c (scm_language_defn): Update.
2006         * p-typeprint.c (pascal_print_typedef): New function.
2007         * p-lang.h: (pascal_print_typedef): Declare.
2008         * p-lang.c (pascal_language_defn): Update.
2009         * objc-lang.c (objc_language_defn): Update.
2010         * m2-typeprint.c (m2_print_typedef): New function.
2011         * m2-lang.h (m2_print_typedef): Declare.
2012         * m2-lang.c (m2_language_defn): Update.
2013         * language.h (_LANG_c, _LANG_m2, _LANG_fortran, _LANG_pascal):
2014         Remove.
2015         (struct language_defn) <la_print_typedef>: New field.
2016         (default_print_typedef): Declare.
2017         (LA_PRINT_TYPEDEF): New define.
2018         * language.c (unknown_language_defn): Update.
2019         (auto_language_defn): Update.
2020         (local_language_defn): Update.
2021         * jv-lang.c (java_language_defn): Update.
2022         * f-lang.c (f_language_defn): Update.
2023         * c-typeprint.c (c_print_typedef): New function.
2024         * c-lang.h (c_print_typedef): Declare.
2025         * c-lang.c (c_language_defn): Update.
2026         (cplus_language_defn): Update.
2027         (asm_language_defn): Update.
2028         (minimal_language_defn): Update.
2029         * ada-lang.c (ada_language_defn): Update.
2030         * typeprint.c (default_print_typedef): New function.
2031
2032 2008-09-27  Tom Tromey  <tromey@redhat.com>
2033
2034         * jv-exp.y (insert_exp): Define using ISO syntax.
2035         (copy_exp): Likewise.
2036         (push_expression_name): Likewise.
2037         (push_fieldnames): Likewise.
2038         (java_type_from_name): Likewise.
2039         (yyerror): Likewise.
2040         (yylex): Likewise.
2041         (parse_number): Likewise.
2042
2043 2008-09-26  Joel Brobecker  <brobecker@adacore.com>
2044
2045         * MAINTAINERS (GLOBAL MAINTAINERS): Add Pedro Alves.
2046
2047 2008-09-25  Stephan Springl  <springl-gdb@bfw-online.de> (tiny change)
2048
2049         * stack.c (print_frame_args): Fix typos in comments.
2050
2051 2008-09-25  Sérgio Durigan Júnior  <sergiodj@linux.vnet.ibm.com>
2052
2053         * linux-nat.c (get_pending_status): Fix argument to WIFSTOPPED.
2054
2055 2008-09-24  Vladimir Prus  <vladimir@codesourcery.com>
2056
2057         * remote-sim.c (gdbsim_create_inferior): Fix missing parenthesis.
2058         
2059 2008-09-24  Andreas Schwab  <schwab@suse.de>
2060
2061         * frame.c (get_frame_register_bytes): Take pseudo registers into
2062         account.  Avoid excessive function calls.
2063
2064 2008-09-23  Doug Evans  <dje@google.com>
2065
2066         * dcache.c (state_chars): New static global.
2067         (ENTRY_INVALID,ENTRY_VALID): Renamed from ENTRY_BAD,ENTRY_OK.
2068         All uses updated.
2069         (dcache_info): Print cache state as mnemonically useful letters instead
2070         of magic numbers.
2071
2072         * dwarf2read.c (comp_unit_head): Reorganize for better packing.
2073
2074 2008-09-22  Tom Tromey  <tromey@redhat.com>
2075
2076         * symfile.c (symbol_file_add_with_addrs_or_offsets): Don't use
2077         printf_filtered.
2078
2079 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2080
2081         * infrun.c (follow_exec): Don't do a generic mourn.  Instead
2082         inline the required bits.
2083         * breakpoint.h (enum inf_context): Add inf_execd.
2084
2085 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2086
2087         * infrun.c (handle_inferior_event): In the follow exec case,
2088         context-switch before doing anything else.
2089
2090 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2091
2092         * top.c (any_thread_of, kill_or_detach): New functions.
2093         (quit_target): Iterate over all inferiors, killing or detaching
2094         accordingly.
2095
2096 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2097
2098         Remove the attach_flag global, and make it per-inferior.
2099
2100         * inferior.h (attach_flag): Delete.
2101         (inferior_process): Declare.
2102         * solib.c (update_solib_list): Adjust.
2103         * gnu-nat.c (gnu_create_inferior, gnu_attach): Adjust.
2104         * inf-ptrace.c (inf_ptrace_detach): Adjust.
2105         (inf_ptrace_files_info): Get it from the current inferior.
2106         * inf-ttrace.c (inf_ttrace_attach): Adjust.
2107         (inf_ttrace_files_info): Get it from the current
2108         inferior.
2109         * inflow.c (terminal_inferior, terminal_ours_1, set_sigint_trap)
2110         (clear_sigint_trap): Get it from the current process.
2111         * remote.c (extended_remote_attach_1)
2112         (extended_remote_create_inferior_1): Adjust.
2113         * top.c (quit_confirm, quit_target): Get it from the current inferior.
2114         * procfs.c (do_detach): Adjust.
2115         (procfs_wait): Get it from the event inferior.
2116         (procfs_files_info): Get it from the current inferior.
2117         * nto-procfs.c (procfs_files_info): Likewise.
2118         (procfs_attach): Adjust.  Set the attach_flag here.
2119         (do_attach): Don't set it here.
2120         (procfs_detach): Don't clear it.
2121         (procfs_mourn_inferior): Don't clear it.
2122         * solib-osf.c (osf_solib_create_inferior_hook): Adjust.
2123         * target.c (attach_flag): Delete.
2124         (generic_mourn_inferior): Don't clear it.
2125         * win32-nat.c (get_win32_debug_event): Get it from the event
2126         process.
2127         (do_initial_win32_stuff): Add attaching argument.  Set attach_flag
2128         in the inferior accordingly.
2129         (win32_attach): Don't set the attach_flag here.  Pass 1 to
2130         do_intial_win32_stuff.
2131         (win32_files_info): Get it from the current inferior.
2132         (win32_create_inferior): Dont clear attach_flag here.  Pass 0 to
2133         do_intial_win32_stuff.
2134
2135 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2136
2137         Make the stop_soon global be per-inferior instead.
2138
2139         * infcmd.c (attach_command_post_wait): Adjust.
2140         (attach_command): Likewise.
2141
2142         * inferior.h (stop_soon): Delete.
2143         (struct inferior): Add stop_soon member.
2144
2145         * infrun.c (stop_soon): Delete.
2146         (clear_proceed_status, start_remote)
2147         (fetch_inferior_event, handle_inferior_event): Adjust.
2148         (signal_stop_state): Don't check stop_soon here.  Check in callers
2149         instead.
2150         (save_inferior_status, restore_inferior_status): Adjust.
2151
2152         * linux-nat.c (linux_nat_resume, linux_nat_wait): Always pass
2153         signals to common code if starting up the inferior.
2154         
2155         * inferior.h (struct inferior_info): Added stop_soon member.
2156         * inferior.c (add_inferior) Clear stop_soon.
2157
2158         * mips-tdep.c (heuristic_proc_start): Adjust.
2159         * nto-procfs.c (procfs_create_inferior): Adjust.
2160         * solib-irix.c (irix_solib_create_inferior_hook): Adjust.
2161         * solib-osf.c (osf_solib_create_inferior_hook): Adjust.
2162         * solib-sunos.c (sunos_solib_create_inferior_hook): Adjust.
2163         * solib-svr4.c (svr4_solib_create_inferior_hook): Adjust.
2164
2165         * win32-nat.c (do_initial_win32_stuff): Adjust.
2166
2167         * alpha-tdep.c (alpha_heuristic_proc_start): Adjust.
2168
2169 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2170
2171         Implement remote multi-process extensions.
2172
2173         * remote.c (struct remote_state): Add extended and
2174         multi_process_aware fields.
2175         (remote_multi_process_p): New.
2176         (PACKET_vKill): New.
2177         (record_currthread): Use thread_change_ptid.  Notice new
2178         inferiors.
2179         (set_thread, remote_thread_alive): Use write_ptid.
2180         (write_ptid, read_ptid): New.
2181         (remote_current_thread, remote_threads_extra_info): Use them.
2182         (remote_threads_info): Likewise.  Detect new inferiors.
2183         (remote_start_remote): Add inferior to inferior list.
2184         (remote_multi_process_feature): New.
2185         (remote_protocol_features): Add "multiprocess" feature.
2186         (remote_query_supported): Pass "multiprocess+" as supported
2187         features.
2188         (remote_open_1): Clear multi_process_aware.  Set extended
2189         accordingly.
2190         (remote_detach_1): Detach current process.  Use extended packet
2191         format for extended-remote multi-process.  Detach process from the
2192         inferior list.  Only mourn after printing output.
2193         (extended_remote_attach_1): Add process to the inferior list.
2194         (remote_vcont_resume): Use write_ptid to pass the thread ids.
2195         (remote_wait): Use read_ptid.  Implement the extended
2196         multi-process extension format of the 'W' and 'X' reply packets.
2197         Remove exited inferiors from inferior list.
2198         (remote_xfer_memory): Set general thread.
2199         (remote_vkill): New.
2200         (extended_remote_kill): New.
2201         (remote_mourn_1): Discard all inferiors.
2202         (select_new_thread_callback): New.
2203         (extended_remote_mourn_1): If there are more processes to debug,
2204         switch to a thread in another process, and don't pop the target.
2205         (extended_remote_create_inferior_1): Add the new process to the
2206         inferior list.
2207         (remote_stopped_by_watchpoint): Indenting.
2208         (remote_xfer_partial): Set the general thread.
2209         (remote_pid_to_str): If the remote is multi-process aware, print
2210         the process id as well as the thread id.
2211         (remote_get_thread_local_address): Use write_ptid.
2212         (init_extended_remote_ops): Register extended_remote_kill.
2213         (_initialize_remote): Register new packets.  Change
2214         magic_null_ptid's, not_sent_ptid's and any_thread_ptid's pid
2215         member to 42000.
2216
2217         * thread.c (thread_change_ptid): Also account for the inferior pid
2218         changing.
2219
2220         * inferior.h (discard_all_inferiors): Declare.
2221         * inferior.c (discard_all_inferiors): New.
2222
2223 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2224
2225         * gnu-nat.c (gnu_attach): Add process to inferiors table.
2226         (gnu_detach): Remove it.
2227         * go32-nat.c (go32_create_inferior): Add process to gdb's inferior
2228         table.
2229         * inf-ptrace.c (inf_ptrace_follow_fork): Delete and add inferiors
2230         to inferior table accordingly.
2231         (inf_ptrace_attach): Add new process to inferior table.
2232         (inf_ptrace_detach): Remove it.
2233         * inf-ttrace.c (inf_ttrace_follow_fork): Delete and add inferiors
2234         to inferior table accordingly.
2235         (inf_ttrace_attach): Add process to inferior table.
2236         (inf_ttrace_detach): Remove it.
2237         * linux-fork.c (init_fork_list): Delete any left over inferior.
2238         (linux_fork_mourn_inferior, detach_fork_command): Also delete
2239         processes from inferior list.
2240         * monitor.c (monitor_open): Add process to inferior list.
2241         (monitor_close): Remove it.
2242         * nto-procfs.c (procfs_attach): Add process to inferior list.
2243         Find threads after pushing the target.
2244         (procfs_detach): Remove process from inferior list.
2245         (procfs_create_inferior): Add process to inferior list.
2246         * procfs.c (procfs_detach): Remove process from inferior list.
2247         (do_attach): Add process to inferior list.
2248         * remote-sim.c (sim_create_inferior): Add process to inferior list.
2249         (gdbsim_close): Remove it.
2250         * target.c (generic_mourn_inferior): If inferior_ptid is not
2251         null_ptid, remove the corresponding inferior from inferior list.
2252         * win32-nat.c (do_initial_win32_stuff): Add process to inferior list.
2253         (win32_detach): Remove it.
2254         * linux-nat.c (linux_child_follow_fork): Delete and add inferiors
2255         to inferior list accordingly.
2256         * fork-child.c (fork_inferior): Add process to inferior list.
2257         * corelow.c (CORELOW_PID): Define.
2258         (core_close): Remove core from inferior list.
2259         (core_open): Add it.
2260
2261 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2262
2263         * inferior.h: Forward declare struct ui_out.
2264         Forward declare struct private_inferior.
2265         (struct inferior): New.
2266         (init_inferior_list, add_inferior, add_inferior_silent)
2267         (delete_inferior, delete_inferior_silent, detach_inferior)
2268         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2269         (valid_inferior_id, find_inferior_pid): New functions.
2270         (inferior_callback_func): New typedef.
2271         (iterate_over_inferiors, print_inferior, have_inferiors)
2272         (current_inferior): New functions.
2273         * inferior.c: New file.
2274
2275         * Makefile.in (SFILES): Add inferior.c.
2276         (COMMON_OBS): Add inferior.o.
2277
2278 2008-09-22  Jonathan Larmour  <jifl@eCosCentric.com>
2279
2280         * arm-tdep.c (arm_skip_prologue): Call skip_prologue_using_sal
2281         instead of determining symbol and line info directly.
2282         * MAINTAINERS: Update my email address.
2283
2284 2008-09-22  Daniel Jacobowitz  <dan@codesourcery.com>
2285
2286         * symtab.c (skip_prologue_using_sal): Treat two consecutive lines
2287         at the same address as a prologue marker.  Do not skip an entire
2288         function.
2289
2290 2008-09-22  Andrew Stubbs  <ams@codesourcery.com>
2291
2292         * frame.c (get_frame_register_bytes): Comment improvments.
2293
2294 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
2295
2296         * linux-nat.c (linux_nat_wait): Only use set_ignore_sigint in
2297         all-stop mode.
2298
2299 2008-09-19  Andrew Stubbs  <ams@codesourcery.com>
2300
2301         * MAINTAINERS: Update my email address.
2302
2303 2008-09-19  Andrew Stubbs  <ams@codesourcery.com>
2304
2305         * frame.c (get_frame_register_bytes): Detect bad debug info.
2306
2307 2008-09-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
2308
2309         Fix a crash on uninitialized ECS->EVENT_THREAD for a newly found thread.
2310         * infrun.c (wait_for_inferior): Move this ECS->EVENT_THREAD
2311         initialization ...
2312         (fetch_inferior_event): ... and this ECS->EVENT_THREAD initialization
2313         ...
2314         (handle_inferior_event): ... here after the add_thread call together
2315         with the local adjust_pc_after_break and reinit_frame_cache calls.
2316
2317 2008-09-16  David Daney  <ddaney@avtrex.com>
2318
2319         * breakpoint.c (bpstat_stop_status): Clear breakpoint_at for
2320         all hardware bpstats.
2321
2322 2008-09-16  Joel Brobecker  <brobecker@adacore.com>
2323
2324         * gstdint.h: Delete.
2325
2326 2008-09-15  Mark Kettenis  <kettenis@gnu.org>
2327
2328         * infcall.c (generic_push_dummy_code): Remove.
2329         (push_dummy_code): Unconditionally call gdbarch_push_dummy_code.
2330
2331 2008-09-15  Doug Evans  <dje@google.com>
2332
2333         * dwarf2read.c (struct abbrev_info): Make members name, form 16 bits.
2334         (struct attribute): Ditto.
2335
2336 2008-09-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2337
2338         * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Record
2339         HPPA_IPSW_REGNUM and HPPA_SAR_REGNUM values.
2340
2341         * hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum): Remove surrounding
2342         "#if 0" "#endif".  Fix mapping of DWARF DBX registers to GDB registers.
2343         Correct arguments and improve comments.
2344         (hppa_linux_init_abi): Call set_gdbarch_dwarf2_reg_to_regnum.  Delete
2345         disabled code.
2346         * hppa-tdep.c (hppa64_dwarf_reg_to_regnum): Fix check for floating
2347         point DBX register, change error to warning, and improve comments.
2348
2349 2008-09-14  Doug Evans  <dje@google.com>
2350
2351         * dwarf2read.c (struct die_info): Make members tag, num_attrs 16 bits.
2352
2353 2008-09-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2354
2355         * hppa-linux-tdep.c (hppa_linux_supply_fpregset): Correct iteration.
2356
2357 2008-09-13  Joel Brobecker  <brobecker@adacore.com>
2358
2359         * defs.h (GCC_GENERATED_STDINT_H): Define.
2360
2361 2008-09-13  Tom Tromey  <tromey@redhat.com>
2362
2363         * varobj.c (varobj_set_display_format): Use xfree.
2364         * tracepoint.c (stringify_collection_list): Use xfree.
2365         * remote-fileio.c (remote_fileio_reset): Use xfree.
2366         * mipsread.c (read_alphacoff_dynamic_symtab): Use xfree.
2367         * dfp.c (decimal_from_floating): Use xfree, xstrprintf.  Don't use
2368         asprintf.
2369         * cp-support.c (mangled_name_to_comp): Use xfree.
2370
2371 2008-09-13  Joel Brobecker  <brobecker@adacore.com>
2372
2373         * ada-lang.c (remove_extra_symbols): Remove stub symbols if
2374         the associated complete symbol is also in the list.
2375         (ada_add_local_symbols, ada_add_non_local_symbols): New functions,
2376         extracted out from ada_lookup_symbol_list.
2377         (ada_lookup_symbol_list): Use them.  Remove the search through
2378         the minimal symbols.
2379
2380 2008-09-13  Joel Brobecker  <brobecker@adacore.com>
2381
2382         * dwarf2read.c (add_partial_subprogram): New procedure.
2383         (scan_partial_symbols): Use it.
2384         (load_partial_dies): Read in children of subprogram and lexical
2385         blocks for Ada compilation units.
2386
2387 2008-09-13  Tom Tromey  <tromey@redhat.com>
2388
2389         * symfile.c (build_id_verify): Free 'found'.
2390         (find_separate_debug_file): Use xfree, not free.
2391
2392 2008-09-12  Doug Evans  <dje@google.com>
2393
2394         * corefile.c (write_memory): Remove unnecessary copying.
2395
2396         * sol-thread.c (_initialize_sol_thread): Add FIXME regarding
2397         order of _initialize_* fns.
2398
2399         * dwarf2read.c (comp_unit_head): Rename first_die_ptr to
2400         first_die_offset.  All uses updated.
2401         Delete unused members cu_head_ptr, next.
2402         Move members base_known, base_address to ...
2403         (dwarf2_cu) ... here.  All uses updated.
2404
2405 2008-09-12  Pedro Alves  <pedro@codesourcery.com>
2406
2407         * Makefile.in (generated_files): Add $(NAT_GENERATED_FILES).
2408         * config/i386/i386gnu.mh (NAT_GENERATED_FILES): New.
2409
2410 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2411
2412         * fork-child.c (startup_inferior): Use target_wait and target_resume
2413         directly instead of calling wait_for_inferior / resume.
2414
2415         * infcmd.c (kill_if_already_running): Do not call no_shared_libraries
2416         or init_wait_for_inferior.
2417         (run_command_1): Call init_wait_for_inferior.
2418
2419 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2420
2421         * gdbtypes.h (builtin_type_void_data_ptr, builtin_type_void_func_ptr,
2422         builtin_type_CORE_ADDR, builtin_type_char, builtin_type_short,
2423         builtin_type_int, builtin_type_long, builtin_type_signed_char,
2424         builtin_type_unsigned_char, builtin_type_unsigned_short,
2425         builtin_type_unsigned_int, builtin_type_unsigned_long,
2426         builtin_type_float, builtin_type_double, builtin_type_long_double,
2427         builtin_type_complex, builtin_type_double_complex, builtin_type_string,
2428         builtin_type_bool, builtin_type_long_long,
2429         builtin_type_unsigned_long_long): Remove macros.
2430
2431         (builtin_type_f_character, builtin_type_f_integer,
2432         builtin_type_f_integer_s2, builtin_type_f_logical,
2433         builtin_type_f_logical_s1, builtin_type_f_logical_s2,
2434         builtin_type_f_real, builtin_type_f_real_s8, builtin_type_f_real_s16,
2435         builtin_type_f_complex_s8, builtin_type_f_complex_s16,
2436         builtin_type_f_complex_s32): Likewise.
2437
2438         (builtin_type_m2_char, builtin_type_m2_int, builtin_type_m2_card,
2439         builtin_type_m2_real, builtin_type_m2_bool): Likewise.
2440
2441         (struct builtin_f_type, builtin_f_type): Move to f-lang.h.
2442         (struct builtin_m2_type, builtin_m2_type): Move to m2-lang.h.
2443
2444         * f-lang.h (struct builtin_f_type, builtin_f_type): Move here.
2445         * m2-lang.h (struct builtin_m2_type, builtin_m2_type): Move here.
2446
2447 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2448
2449         * solib-svr4.c (LM_ADDR_FROM_LINK_MAP): Use builtin types of
2450         target_gdbarch instead of builtin_type_void_data_ptr.
2451         (LM_DYNAMIC_FROM_LINK_MAP, LM_NEXT, LM_NAME,
2452         IGNORE_FIRST_LINK_MAP_ENTRY, scan_dyntag, elf_locate_base,
2453         solib_svr4_r_map, solib_svr4_r_brk, solib_svr4_r_ldsomap,
2454         open_symbol_file_object): Likewise.
2455         * nto-tdep.c (LM_ADDR): Likewise.
2456
2457 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2458
2459         * bsd-uthread.c (bsd_uthread_read_memory_address): New function.
2460         (bsd_uthread_fetch_registers, bsd_uthread_store_registers,
2461         bsd_uthread_wait, bsd_uthread_find_new_threads): Use it.
2462
2463 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2464
2465         * procfs.c (procfs_address_to_host_pointer): Use target_gdbarch
2466         and its associated types to perform pointer conversion.
2467         (procfs_can_use_hw_breakpoint): Likewise.
2468         (procfs_auxv_parse): Remove unused variable.
2469
2470 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2471
2472         * auxv.c (default_auxv_parse): Use gdbarch_ptr_bit (target_gdbarch)
2473         instead of builtin_type_void_data_ptr.
2474         * target.c (default_region_ok_for_hw_watchpoint): Likewise.
2475
2476 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2477
2478         * expprint.c (print_subexp_standard): Compare against builtin type
2479         associated with exp->gdbarch instead of builtin_type_char.
2480
2481         * f-valprint.c (f_val_print): Use extract_unsigned_integer to
2482         extract values of arbitrary logical type.  Handle arbitrary
2483         complex types.
2484
2485         * printcmd.c (float_type_from_length): New function.
2486         (print_scalar_formatted, printf_command): Use it.
2487
2488 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2489
2490         * valops.c: Include "objfiles.h" and "symtab.h".
2491         (find_function_in_inferior): New argument OBJF_P.  Use it to return
2492         objfile where function is defined.  Use per-objfile arch types
2493         instead of builtin_type_ to define default return type.
2494
2495         * linux-fork.c (checkpoint_command): Update calls.  Use per-objfile
2496         architecture to define inferior call argument types.
2497         * gcore.c (derive_heap_segment): Likewise.
2498         * objc-lang.c (value_nsstring): Likewise.
2499         * scm-lang.c (scm_lookup_name): Likewise.
2500         * scm-valprint.c (scm_inferior_print): Likewise.
2501         * valops.c (value_allocate_space_in_inferior): Likewise.
2502
2503         * eval.c (evaluate_subexp_standard): Update calls.
2504         * objc-lang.c (lookup_objc_class, print_object_command): Likewise.
2505
2506         * linux-fork.c: Include "objfiles.h".
2507         * scm-lang.c: Include "objfiles.h".
2508         * scm-valprint.c: Include "objfiles.h".
2509
2510 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2511
2512         * gdbarch.sh (name_of_malloc): Remove.
2513         * gdbarch.c, gdbarch.h: Re-generate.
2514         * valops.c (value_allocate_space_in_inferior): Do not call
2515         gdbarch_name_of_malloc.
2516
2517 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2518
2519         * valarith.c (value_x_unop): Use builtin_type_int8 as type for
2520         UNOP_POSTINCREMENT/UNOP_POSTDECREMENT constant 0 argument.
2521         (value_bit_index): Use extract_unsigned_integer
2522         instead of unpack_long to read single byte.
2523
2524 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2525
2526         * infcall.c (value_arg_coerce): Add GDBARCH parameter.  Use its
2527         associates types instead of builtin_type_ macros.
2528         (find_function_addr): Leave output VALUE_TYPE NULL if unknown.
2529         (call_function_by_hand): Use per-architecture "int" type as
2530         fall-back if find_function_addr returns NULL VALUE_TYPE.
2531         Update call to value_arg_coerce.
2532
2533 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2534
2535         * cp-abi.h (cplus_method_ptr_size): Add TO_TYPE parameter.
2536         (cplus_make_method_ptr): Add TYPE parameter.
2537         * cp-abi.c (cplus_method_ptr_size): Add TO_TYPE parameter.  Pass it
2538         on to current_cp_abi.method_ptr_size callback.
2539         (cplus_make_method_ptr): Add TYPE parameter.  Pass it on to
2540         current_cp_abi.make_method_ptr callback.
2541
2542         * gdbtypes.c (lookup_methodptr_type): Pass target type
2543         argument to cplus_method_ptr_size.
2544         * valops.c (value_cast): Pass type argument to cplus_make_method_ptr.
2545         (value_struct_elt_for_reference): Likewise.
2546
2547         * gnu-v3-abi.c (get_class_arch): New function.
2548         (vtable_address_point_offset): Add GDBARCH parameter.  Use it
2549         instead of current_gdbarch.  Update all callers.
2550         (gnuv3_get_vtable): Likewise.
2551         (gnuv3_get_virtual_fn): Likewise.
2552         (gnuv3_decode_method_ptr): Likewise.
2553         (gnuv3_rtti_type): Call get_class_arch to determine architecture.
2554         Use it instead of current_gdbarch.
2555         (gnuv3_virtual_fn_field): Likewise.
2556         (gnuv3_baseclass_offset): Likewise.
2557         (gnuv3_print_method_ptr): Likewise.
2558         (gnuv3_method_ptr_to_value): Likewise.
2559         (gnuv3_method_ptr_size): Add TYPE parameter.  Use it to determine
2560         class architecture.  Use architecture types instead of builtin types.
2561         (gnuv3_make_method_ptr): Likewise.
2562
2563         * cp-valprint.c (cp_print_class_member): Expect pointer type
2564         instead of class type.  Use its length when extracting value.
2565         * c-valprint.c (c_val_print): Update call to cp_print_class_member.
2566
2567 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2568
2569         * stack.c (return_command): Use frame architecture to determine
2570         default integer return type.
2571
2572         * f-valprint.c (f77_get_dynamic_lowerbound): Use frame architecture
2573         to determine pointer types.
2574         (f77_get_dynamic_upperbound): Likewise.
2575
2576         * objc-lang.c (OBJC_FETCH_POINTER_ARGUMENT): Remove.
2577         (resolve_msgsend): Use architecture of current frame to determine
2578         pointer types.  Inline OBJC_FETCH_POINTER_ARGUMENT.
2579         (resolve_msgsend_stret, resolve_msgsend_super,
2580         resolve_msgsend_super_stret): Likewise.
2581
2582 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2583
2584         * alpha-tdep.c (alpha_register_type): Use builtin_type (gdbarch)
2585         instead of builtin_type_ macros.
2586         * amd64-tdep.c (amd64_register_type): Likewise.
2587         (amd64_get_longjmp_target): Likewise.
2588         * arm-tdep.c (arm_register_type): Likewise.
2589         * avr-tdep.c (avr_register_type): Likewise.
2590         * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
2591         * frv-tdep.c (frv_register_type): Likewise.
2592         * h8300-tdep.c (h8300_register_type): Likewise.
2593         * hppa-tdep.c (hppa32_convert_from_func_ptr_addr, 
2594         hppa_skip_trampoline_code): Likewise.
2595         * i386-tdep.c (i386_register_type): Likewise.
2596         (i386_unwind_pc, i386_sse_type): Likewise.
2597         * ia64-tdep.c (ia64_register_type): Likewise.
2598         * m32r-tdep.c (m32r_register_type): Likewise.
2599         * m68k-tdep.c (m68k_register_type, m68k_unwind_pc): Likewise.
2600         * m88k-tdep.c (m88k_register_type): Likewise.
2601         * mep-tdep.c (mep_register_type): Likewise.
2602         * mips-tdep.c (mips_pseudo_register_type): Likewise.
2603         * mn10300-tdep.c (mn10300_register_type): Likewise.
2604         * mt-tdep.c (mt_copro_register_type): Likewise.
2605         * rs6000-tdep.c (rs6000_builtin_type_vec64): Likewise.
2606         (rs6000_convert_register_p, rs6000_register_to_value,
2607         rs6000_value_to_register): Likewise.
2608         * s390-tdep.c (s390_register_type): Likewise.
2609         * sh64-tdep.c (sh64_register_type): Likewise.
2610         (sh64_build_float_register_type, sh64_do_fp_register): Likewise.
2611         * sh-tdep.c (sh_sh2a_register_type, sh_sh3e_register_type,
2612         sh_sh4_build_float_register_type, sh_sh4_register_type,
2613         sh_default_register_type): Likewise.
2614         * sparc64-tdep.c (sparc64_register_type): Likewise.
2615         * sparc-tdep.c (sparc32_register_type): Likewise.
2616         * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
2617         * v850-tdep.c (v850_register_type): Likewise.
2618         * vax-tdep.c (vax_register_type): Likewise.
2619         * xtensa-tdep.c (xtensa_register_type, xtensa_unwind_pc,
2620         xtensa_push_dummy_call): Likewise.
2621
2622         * std-regs.c (value_of_builtin_frame_fp_reg,
2623         value_of_builtin_frame_pc_reg): Likewise.
2624         * target-descriptions.c (tdesc_register_type): Likewise.
2625
2626 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2627
2628         * ada-lang.c (ada_coerce_to_simple_array_type): Use builtin_type_int32
2629         instead of builtin_type_int as default unspecified integral type.
2630         (ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
2631         assign_component, to_fixed_range_type): Likewise.
2632         * ada-typeprint.c (print_range, print_range_bound,
2633         print_range_type_named): Likewise.
2634         * ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
2635         * eval.c (evaluate_subexp_standard): Likewise.
2636         * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
2637         * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
2638         build_gdb_vtable_type): Likewise.
2639         * jv-lang.c (java_array_type): Likewise.
2640         * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
2641         * m2-valprint.c (m2_print_long_set): Likewise.
2642         * parse.c (follow_types): Likewise.
2643         * p-typeprint.c (pascal_type_print_base): Likewise.
2644         * valops.c (value_one, value_array, value_string,
2645         value_bitstring): Likewise.
2646         * value.c (allocate_repeat_value, value_from_string): Likewise.
2647         * varobj.c (c_describe_child): Likewise.
2648         * mt-tdep.c (mt_register_type): Likewise.
2649         * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
2650         * sh64-tdep.c (sh64_build_float_register_type): Likewise.
2651
2652 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2653
2654         * defs.h (struct gdbarch): Add forward declaration.
2655         (set_next_address): Add GDBARCH argument.
2656         * printcmd.c (set_next_address): Use it to find pointer type.
2657         * breakpoint.c (breakpoint_1): Update call.
2658         * source.c (line_info): Likewise.
2659         * findcmd.c (find_command): Use current_gdbarch to find pointer type.
2660
2661         * breakpoint.c (set_breakpoint_count): Use platform-neutral
2662         types for internal variable values.
2663         * infrun.c (handle_inferior_event): Likewise.
2664         * source.c (forward_search_command, reverse_search_command): Likewise.
2665         * tracepoint.c (set_tracepoint_count, set_traceframe_num,
2666         set_tracepoint_num, set_traceframe_context): Likewise.
2667
2668 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2669
2670         * gdbtypes.h (struct builtin_type): Remove builtin_true_char
2671         and builtin_true_unsigned_char.
2672         (builtin_type_true_char): Remove macro, add extern declaration.
2673         (builtin_type_true_unsigned_char): Add extern declaration.
2674         * gdbtypes.c (builtin_type_true_char): New global variable.
2675         (builtin_type_true_unsigned_char): Likewise.
2676         (_initialize_gdbtypes): Initialize them.
2677         (gdbtypes_post_init): Do not initialize builtin_true_char
2678         and builtin_true_unsigned_char members of struct builtin_type.
2679
2680         * printcmd.c (print_scalar_formatted): Do not use builtin_type;
2681         use builtin_type_true_unsigned_char instead.
2682
2683         * ada-valprint.c (ada_val_print_1): Use builtin_type_true_char
2684         instead of builtin_type_char for internal string.
2685
2686 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2687
2688         * gdbtypes.h (builtin_type_void): Remove macro, add declaration.
2689         (builtin_type_f_void): Remove macro.
2690         * gdbtypes.c (builtin_type_void): New global variable.
2691         (_initialize_gdbtypes): Initialize it.
2692
2693         * gnu-v3-abi.c (build_gdb_vtable_type): Do not call
2694         lookup_pointer_type or lookup_function_type on builtin_type_void.
2695         * printcmd.c (set_next_address): Likewise.
2696         * objc-lang.c (value_nsstring): Likewise.
2697         * mt-tdep.c (mt_copro_register_type): Likewise.
2698         * xtensa-tdep.c (xtensa_register_type): Likewise.
2699
2700         * symfile.c (syms_from_objfile): Remove special handling
2701         of builtin_type_void and builtin_type_char.
2702
2703 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2704
2705         * eval.c (evaluate_subexp_standard): Use exp->gdbarch types instead
2706         of builtin_type_ macros when handling OP_OBJC_ operations.
2707         * objc-lang.c (print_object_command): Likewise.
2708
2709 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2710
2711         * ada-valprint.c: Include "objfiles.h".
2712         (ada_val_print_1): Use the gdbarch associated with the objfile whether
2713         a System.Address type is defined to retrieve the proper pointer type
2714         to use to print it.
2715
2716 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2717
2718         * ada-lang.c (value_pos_atr): Add TYPE argument.  Use it as
2719         result type instead of builtin_type_int.
2720         (value_subscript_packed): Use pos_atr instead of value_pos_atr.
2721         (ada_value_subscript): Update call to value_pos_atr.
2722         (ada_value_ptr_subscript): Likewise.
2723         (ada_evaluate_subexp): Likewise.
2724
2725 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2726
2727         * ada-lang.c (cast_to_fixed): Do not cast to builtin_type_double.
2728         (cast_from_fixed_to_double): Rename to ...
2729         (cast_from_fixed): ... this.  Add TYPE parameter.  Use it instead
2730         of builtin_type_double.
2731         (ada_value_cast): Use cast_from_fixed instead of casting result
2732         of cast_from_fixed_to_double.
2733         (ada_evaluate_subexp): Update calls to cast_from_fixed_to_double. 
2734
2735 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2736
2737         * valops.c (value_ind): No longer allow dereferencing an
2738         integer type.
2739         * eval.c (evaluate_subexp_standard): Handle deferencing an
2740         integer type here.
2741         * ada-lang.c (ada_evaluate_subexp): Likewise.
2742
2743 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2744
2745         * ada-valprint.c (ada_val_print_1): When implicitly dereferencing
2746         a reference type, pass the reference type directly to unpack_pointer.
2747         * c-valprint.c (c_val_print): Likewise.
2748         * f-valprint.c (f_val_print): Likewise.
2749         * m2-valprint.c (print_variable_at_address, m2_val_print): Likewise.
2750         * p-valprint.c (pascal_val_print): Likewise.
2751
2752 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2753
2754         * eval.c (evaluate_subexp_standard): Use builtin_type_int8
2755         to construct the EVAL_SKIP dummy return value.
2756         * ada-lang.c (ada_evaluate_subexp): Likewise.
2757         * jv-lang.c (evaluate_subexp_java): Likewise.
2758         * m2-lang.c (evaluate_subexp_modula2): Likewise.
2759         * scm-lang.c (evaluate_exp): Likewise.
2760
2761 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2762
2763         * value.h (coerce_enum, coerce_number): Remove prototypes.
2764         * value.c (coerce_enum, coerce_number): Remove.
2765         * valarith.c (value_x_binop): Do not call coerce_enum.
2766         (value_x_unop): Likewise.
2767         (value_logical_not): Call coerce_array instead of coerce_number.
2768
2769 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2770
2771         * ax-gdb.c: Include "language.h".
2772         (gen_frame_args_address): Add GDBARCH parameter; use it
2773         instead of current_gdbarch.
2774         (gen_frame_locals_address): Likewise.
2775         (gen_var_ref): Add GDBARCH parameter.  Update calls to
2776         gen_frame_args_address and gen_frame_locals_address.  Use
2777         pointer type from gdbarch.
2778         (gen_usual_unary): Add EXP parameter.  Use integer type
2779         from exp->gdbarch.
2780         (gen_usual_arithmetic): Likewise.
2781         (gen_integral_promotions): Likewise.
2782         (gen_add, gen_sub): Remove.
2783         (gen_ptradd, gen_ptrsub, gen_ptrdiff): New functions.
2784         (gen_logical_not): Use passed-in boolean result type
2785         instead of builtin_type_int.
2786         (gen_complement): Do not call gen_usual_unary or
2787         gen_integral_promotions.
2788         (gen_struct_ref): Call require_rvalue instead of gen_usual_unary.
2789         (gen_repeat): Add EXP parameter.  Update call to gen_expr.
2790         Use builtin_type_int32 as internal range type.
2791         (gen_sizeof): Add EXP and SIZE_TYPE parameters.  Use SIZE_TYPE
2792         as result type.  Update call to gen_expr.
2793         (gen_expr): Add EXP parameter.  Update calls to gen_expr,
2794         gen_repeat, gen_var_ref, gen_usual_unary, gen_usual_arithmetic,
2795         and gen_integral_promotions.  Call gen_ptradd, gen_ptrsub,
2796         gen_ptrdiff, or gen_binop instead of gen_add or gen_sub.
2797         Use exp->gdbarch instead of current_gdbarch.
2798         Call language_bool_type to determine result type of UNOP_LOGICAL_NOT.
2799
2800 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2801
2802         * eval.c (evaluate_subexp_standard): Add calls to binop_promote
2803         and unop_promote before calling value_binop et. al.
2804         * ada-lang.c (ada_evaluate_subexp): Add calls to binop_promote
2805         and unop_promote before calling value_binop et. al.
2806
2807         * valarith.c (value_binop): Do not call binop_promote or unop_promote.
2808         (value_pos): Do not call unop_promote.
2809         (value_neg, value_complement): Likewise.
2810
2811 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2812
2813         * value.h (unop_promote, binop_promote): Add prototypes.
2814         * eval.c (unop_promote, binop_promote): New functions.
2815         * valarith.c (unop_result_type, binop_result_type): Remove.
2816         (value_binop): Call binop_promote or unop_promote.
2817         Inline remaining parts of binop_result_type.  Remove special
2818         code to truncate integer values for unsigned operations.
2819         (value_pos): Call unop_promote.  Inline remaining parts of
2820         unop_result_type.
2821         (value_neg, value_complement): Likewise.
2822
2823 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2824
2825         * value.h (value_add, value_sub): Remove.
2826         (value_ptradd, value_ptrsub, value_ptrdiff): Add prototypes.
2827         * valarith.c (value_add, value_sub): Remove.
2828         (value_ptradd, value_ptrsub, value_ptrdiff): New functions.
2829         (find_size_for_pointer_math): Add assertion.  Update comment.
2830         (value_binop): Update comment.
2831
2832         * eval.c (ptrmath_type_p): New function.
2833         (evaluate_subexp_standard): Replace value_add and value_sub
2834         by value_ptradd, value_ptrsub, value_ptrdiff or value_binop.
2835         Use builtin_type_uint8 instead of builtin_type_char to hold
2836         the increment for BINOP_{PRE,POST}{IN,DE}CREMENT operations.
2837         * valarith.c (value_subscript): Replace value_add by
2838         value_ptradd.  Replace value_sub by value_binop.
2839         * ada-lang.c (ada_value_ptr_subscript): Likewise.
2840         (ada_tag_name_2): Replace value_add by value_ptradd.
2841         (ada_evaluate_subexp): Replace value_add and value_sub by
2842         value_binop.
2843         * m2-lang.c (evaluate_subexp_modula2): Replace value_add
2844         by value_ptradd.
2845         * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
2846         * gnu-v3-abi.c (gnuv3_method_ptr_to_value): Likewise.
2847
2848 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2849
2850         * eval.c (evaluate_subexp_for_sizeof): Use builtin_int type of
2851         the expression architecture instead of builtin_type_int as the
2852         sizeof return type.
2853
2854 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2855
2856         * expression.h (enum exp_opcode): Document OP_COMPLEX to take
2857         a type parameter as expression element.
2858         * eval.c (evaluate_subexp_standard) [OP_COMPLEX]: Retrieve result
2859         type as expression element.
2860         * f-exp.y: Pass in type when buildin OP_COMPLEX expression.
2861         * parse.c (operator_length_standard): Update length of OP_COMPLEX.
2862
2863 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2864
2865         * language.h (struct language_arch_info): New members
2866         bool_type_default and bool_type_symbol.
2867         (lang_bool_type): Remove prototype.
2868         (LA_BOOL_TYPE): Remove macro.
2869         (language_bool_type): Add prototype.
2870         * language.c (lang_bool_type): Remove.
2871         (language_bool_type): New function.
2872
2873         * value.h (value_in): Change return value to int.
2874         * value.c (value_in): Return int instead of struct value *.
2875
2876         * eval.c (evaluate_subexp_standard): Call language_bool_type instead
2877         of using LA_BOOL_TYPE.  Update call to value_in.
2878         * ada-lang.c (ada_evaluate_subexp): Call language_bool_type instead
2879         of using LA_BOOL_TYPE or builtin_type_int for boolean values.
2880
2881         * language.c (unknown_language_arch_info): Set bool_type_default member
2882         of struct language_arch_info.
2883         * ada-lang.c (ada_language_arch_info): Set bool_type_symbol and
2884         bool_type_default members of struct language_arch_info.
2885         * c-lang.c (c_language_arch_info): Set bool_type_default member
2886         of struct language_arch_info.
2887         (cplus_language_arch_info): Set bool_type_symbol and bool_type_default
2888         members of struct language_arch_info.
2889         * f-lang.c (f_language_arch_info): Set bool_type_symbol and
2890         bool_type_default members of struct language_arch_info.
2891         * jv-lang.c (java_language_arch_info): Set bool_type_symbol and
2892         bool_type_default members of struct language_arch_info.
2893         * m2-lang.c (m2_language_arch_info): Set bool_type_symbol and
2894         bool_type_default members of struct language_arch_info.
2895         * p-lang.c (p_language_arch_info): Set bool_type_symbol and
2896         bool_type_default members of struct language_arch_info.
2897
2898 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2899
2900         * jv-lang.c (enum java_primitive_types): New type.
2901         (java_language_arch_info): New function.
2902         (java_language): Use it instead of c_language_arch_info.
2903
2904 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2905
2906         * value.h (value_bitstring_subscript): New prototype.
2907         * valarith.h (value_bitstring_subscript): New function.
2908         (value_subscript): No longer handle TYPE_CODE_BITSTRING.
2909         * eval.c (evaluate_subexp_standard): Call value_bitstring_subscript
2910         instead of value_subscript to handle TYPE_CODE_BITSTRING.
2911
2912 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2913
2914         * expression.h (struct expression): New member GDBARCH.
2915         * parse.c (parse_exp_in_context): Initialize it.
2916         * parser-def.h (parse_gdbarch, parse_language): New macros.
2917
2918         * ada-exp.y (parse_type): New macro.
2919         Replace builtin_type_ macros by using parse_type.
2920         Replace current_language by parse_language.
2921         * ada-lex.l (processInt): Replace current_gdbarch by parse_gdbarch.
2922         Replace builtin_type_ macros.
2923
2924         * c-exp.y (parse_type): New macro.
2925         Replace builtin_type_ macros by using parse_type.
2926         (parse_number): Replace current_gdbarch by parse_gdbarch.
2927         (yylex): Replace current_language by parse_language.
2928
2929         * f-exp.y (parse_type, parse_f_type): New macros.
2930         Replace builtin_type_ macros by using parse_{f_,}type.
2931         (parse_number): Replace current_gdbarch by parse_gdbarch.
2932         (yylex): Replace current_language by parse_language.
2933
2934         * jv-exp.y (parse_type): New macro.
2935         (parse_number): Replace builtin_type_ macros by using parse_type.
2936
2937         * m2-exp.y (parse_type, parse_m2_type): New macros.
2938         Replace builtin_type_ macros by using parse_{m2_,}type.
2939
2940         * objc-exp.y (parse_type): New macro.
2941         Replace builtin_type_ macros by using parse_type.
2942         (parse_number): Replace current_gdbarch by parse_gdbarch.
2943         (yylex): Replace current_language by parse_language.
2944
2945         * p-exp.y (parse_type): New macro.
2946         Replace builtin_type_ macros by using parse_type.
2947         (parse_number): Replace current_gdbarch by parse_gdbarch.
2948         (yylex): Replace current_language by parse_language.
2949
2950 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
2951
2952         * parser-defs.h (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE
2953         and DATA_SYMBOL_TYPE arguments.
2954         * parse.c (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE and
2955         DATA_SYMBOL_TYPE arguments.  Replace use of builtin_type_CORE_ADDR.
2956         (write_dollar_variable): Update call.
2957
2958         * ada-exp.y (write_var_or_type): Update call.
2959         * c-exp.y: Likewise.
2960         * f-exp.y: Likewise.
2961         * jv-exp.y: Likewise.
2962         * m2-exp.y: Likewise.
2963         * objc-exp.y: Likewise.
2964         * p-exp.y: Likewise.
2965
2966 2008-09-10  Joel Brobecker  <brobecker@adacore.com>
2967
2968         * ada-lang.c (ada_parent_type): Add handling of the case where
2969         the _parent field is a pointer and/or has a parallel XVS type.
2970         (ada_evaluate_subexp) [OP_VAR_VALUE]: When doing an
2971         EVAL_AVOID_SIDE_EFFECTS evaluation of a tagged type, return
2972         the type of the tag instead of doing forcing an EVAL_NORMAL
2973         expression evaluation.
2974
2975 2008-09-10  Paul N. Hilfinger  <hilfinger@adacore.com> 
2976             Joel Brobecker  <brobecker@adacore.com>
2977
2978         * ada-lang.c (is_digits_suffix): New function.
2979         (is_dot_digits_suffix): Remove.
2980         (ada_lookup_symbol_list): Remove digits suffix from minimal symbols
2981         before looking up in symbol table, and do not use wild matches on them.
2982         (wild_match): Reimplement for speed and to allow matching of operator
2983         symbols.
2984         (is_valid_name_for_wild_match): Return zero for names that do not
2985         follow the GNAT encoding.
2986
2987         (is_name_suffix): Fix typo in comment.
2988         (to_record_with_fixed_variant_part): Ditto.
2989
2990 2008-09-10  Pedro Alves  <pedro@codesourcery.com>
2991
2992         * Makefile.in (gnu-nat.o): New rule.
2993
2994 2008-09-10  Joel Brobecker  <brobecker@adacore.com>
2995
2996         * ada-lang.c (ada_evaluate_subexp) [OP_ATR_SIZE]: Use
2997         archecture-neutral builtin_type_int32 instead of builtin_type_int.
2998
2999 2008-09-10  Joel Brobecker  <brobecker@adacore.com>
3000
3001         * ada-lang.c (ada_evaluate_subexp) [BINOP_ADD, BINOP_SUB]:
3002         Add special handling for pointer types.
3003
3004 2008-09-10  Pedro Alves  <pedro@codesourcery.com>
3005
3006         * inf-ttrace.c (inf_ttrace_follow_fork): Declare locals at the
3007         right scope level.
3008         (inf_ttrace_resume, inf_ttrace_wait): Typos.
3009
3010 2008-09-10  Ulrich Weigand  <uweigand@de.ibm.com>
3011
3012         * ada-lang.c (ada_array_length): Use builtin_type_int32 instead
3013         of builtin_type_int.
3014         (ada_evaluate_subexp) [UNOP_IN_RANGE]: Use operand range type
3015         instead of builtin_type_int.
3016
3017 2008-09-09  Pedro Alves  <pedro@codesourcery.com>
3018
3019         * infrun.c (normal_stop): Run hook-stop last.
3020
3021 2008-09-09  Pedro Alves  <pedro@codesourcery.com>
3022
3023         * gnu-nat.c (gnu_pid_to_exec_file): Delete.
3024         (init_gnu_ops): Don't register it.
3025
3026 2008-09-09  Pedro Alves  <pedro@codesourcery.com>
3027
3028         * gnu-nat.c (gnu_attach): Push target before fetching the list of
3029         threads.
3030
3031 2008-09-08  Daniel Jacobowitz  <dan@codesourcery.com>
3032
3033         * valops.c (value_cast_structs): Return NULL for failure.
3034         (value_cast): Handle NULL from value_cast_structs.
3035         (value_fetch_lazy): Call check_typedef.  Remove unused variable.
3036
3037 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3038
3039         * inferior.h (context_switch_to): Delete.
3040         * infrun.c (context_switch): Don't save and load infrun state.
3041         (context_switch_to): Delete.
3042
3043         * infcmd.c (proceed_thread_callback): Replace context_switch_to
3044         calls by switch_to_thread calls.
3045
3046         * gdbthread.h (save_infrun_state, load_infrun_state): Delete.
3047         * thread.c (main_thread_state, main_thread_executing): Delete.
3048         (inferior_thread): Delete references to them.
3049         (add_thread_silent): Fix case where we're adding a thread with the
3050         same ptid as an exited thread.  Remove references to
3051         context-switching.
3052         (load_infrun_state, save_infrun_state): Delete.
3053         (thread_alive, is_thread_state, any_running, is_executing)
3054         (set_executing): Remove the special handling for targets that
3055         don't register any thread.
3056         (restore_current_thread, thread_apply_all_command)
3057         (do_captured_thread_select): Unconditionally call
3058         switch_to_thread.
3059
3060         * mi/mi-main.c (mi_cmd_execute): Check for exited threads.
3061         Call switch_to_thread instead of context_switch_to.
3062
3063 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3064
3065         Remove global continuations in favour of a per-thread
3066         continuations.
3067
3068         * gdbthread.h (struct thread_info): Add comments around
3069         continuations and intermediate_continuations.
3070         (save_infrun_state, load_infrun_state): Delete continuations and
3071         intermediate_continuations arguments.
3072         * infrun.c (context_switch): Don't context-switch the continuations.
3073         * thread.c (clear_thread_inferior_resources): Discard all
3074         continuations of the thread we're clearing.
3075         (save_infrun_state, load_infrun_state): Delete continuations and
3076         intermediate_continuations arguments, and the code referencing
3077         them.
3078         * utils.c: Include "gdbthread.h".
3079         (cmd_continuation, intermediate_continuation): Delete.
3080         (add_continuation): Add thread_info* argument.  Install the
3081         continuation on it.
3082         (restore_thread_cleanup): New.
3083         (do_all_continuations_ptid, do_all_continuations_thread_callback):
3084         New.
3085         (do_all_continuations): Reimplement.
3086         (discard_all_continuations_thread_callback,
3087         discard_all_continuations_thread): New.
3088         (discard_all_continuations): Reimplement.
3089         (add_intermediate_continuation): Add thread_info* argument.
3090         Install the continuation on it.
3091         (do_all_intermediate_continuations_thread_callback)
3092         (do_all_intermediate_continuations_thread): New.
3093         (do_all_intermediate_continuations): Reimplement.
3094         (discard_all_intermediate_continuations_thread_callback): New.
3095         (discard_all_intermediate_continuations_thread): New.
3096         (discard_all_intermediate_continuations): Reimplement.
3097
3098         * breakpoint.c (until_break_command): Install the continuation on
3099         the current thread.
3100
3101         * defs.h (cmd_continuation, intermediate_continuation): Delete.
3102         (struct thread_info): Forward declare.
3103         (add_continuation, add_intermediate_continuation): Add
3104         thread_info* argument.
3105         (do_all_continuations_thread, discard_all_continuations_thread)
3106         (do_all_intermediate_continuations_thread)
3107         (discard_all_intermediate_continuations_thread): Declare.
3108         * inf-loop.c (inferior_event_handler): In non-stop only run
3109         continuations on the thread that stopped.  In all-stop, run
3110         continuations on all threads.
3111         * infcmd.c (step_once, finish_command): Adjust.
3112
3113 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3114
3115         Remove the global stop_step in favour of a per-thread
3116         stop_step.
3117
3118         * inferior.h (stop_step): Delete.
3119
3120         * gdbthread.h (struct thread_info): Add comments to stop_step.
3121         (save_infrun_state, load_infrun_state): Remove stop_step argument.
3122         * thread.c (load_infrun_state, save_infrun_state): Remove
3123         stop_step argument, and references to it.
3124
3125         * infrun.c (clear_proceed_status): Clear stop_step.
3126         (fetch_inferior_event): Adjust.
3127         (context_switch): Don't context-switch stop_step.
3128         (handle_inferior_event): Adjust.
3129         (normal_stop): Adjust.
3130         (save_inferior_status, restore_inferior_status): Adjust.
3131
3132         * infcmd.c (stop_step): Delete.
3133         (step_1, step_1_continuation, step_once, until_next_command):
3134         Adjust.
3135
3136 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3137
3138         Remove the global step_multi in favour of a per-thread
3139         step_multi.
3140
3141         * inferior.h (step_multi): Delete.
3142         * gdbthread.h (struct thread_info): Add comments around
3143         step_multi.
3144         (save_infrun_state, load_infrun_state): Remove step_multi
3145         parameter.
3146         * thread.c (load_infrun_state, save_infrun_state): Remove
3147         step_multi argument, and references to it.
3148         * infcmd.c (step_multi): Delete.
3149         (step_1): Adjust.
3150         (step_1_continuation, until_next_command): Adjust.
3151         * infrun.c (fetch_inferior_event): Adjust.
3152         (context_switch): Don't context-switch step_multi.
3153         (print_stop_reason, normal_stop): Adjust.
3154
3155 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3156
3157         Remove the global stop_signal in favour of a per-thread
3158         stop_signal.
3159
3160         * inferior.h (stop_signal): Delete.
3161         * gdbthread.h (save_infrun_state, load_infrun_state): Remove
3162         stop_signal argument.
3163         * thread.c (load_infrun_state, save_infrun_state): Remove
3164         stop_signal argument.  Don't reference it.
3165
3166         * infcmd.c (stop_signal): Delete.
3167         (program_info): Adjust.
3168         * infrun.c (resume): Clear stop_signal.
3169         (proceed): Adjust.  Pass the last stop_signal to the thread we're
3170         resuming.
3171         (context_switch): Don't context-switch stop_signal.
3172         (handle_inferior_event, keep_going): Adjust.
3173         (save_inferior_status, restore_inferior_status): Adjust.
3174
3175         * fbsd-nat.c: Include "gdbthread.h".
3176         (find_signalled_thread, find_stop_signal): New.
3177         (fbsd_make_corefile_notes): Use it.
3178         * fork-child.c (startup_inferior): Adjust.
3179
3180         * linux-nat.c (get_pending_status): Adjust.
3181         (linux_nat_do_thread_registers): Adjust.
3182         (find_signalled_thread, find_stop_signal): New.
3183         (linux_nat_do_thread_registers): Add stop_signal parameter.
3184         (struct linux_nat_corefile_thread_data): Add stop_signal member.
3185         (linux_nat_corefile_thread_callback): Pass stop_signal.
3186         (linux_nat_do_registers): Delete.
3187         (linux_nat_make_corefile_notes): Use find_stop_signal.  Assume
3188         there's always a thread.
3189
3190         * procfs.c (find_signalled_thread, find_stop_signal): New.
3191         (find_stop_signal): New.
3192         (procfs_do_thread_registers): Add stop_signal parameter.
3193         (struct procfs_corefile_thread_data): Add stop_signal member.
3194         (procfs_corefile_thread_callback): Pass args->stop_signal.
3195         (procfs_make_note_section): Find the last stop_signal.
3196
3197         * solib-irix.c: Include gdbthread.h.
3198         (irix_solib_create_inferior_hook): Adjust.
3199         * solib-osf.c: Include gdbthread.h.
3200         (osf_solib_create_inferior_hook): Adjust.
3201         * solib-sunos.c: Include gdbthread.h.
3202         (sunos_solib_create_inferior_hook): Adjust.
3203         * solib-svr4.c: Include gdbthread.h.
3204         (svr4_solib_create_inferior_hook): Adjust.
3205
3206         * win32-nat.c (do_initial_win32_stuff): Adjust.
3207
3208 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3209
3210         * gdbthread.h (struct thread_info): Add comments around
3211         proceed_to_finish.
3212         (save_infrun_state, load_infrun_state): Remove proceed_to_finish
3213         argument.
3214         * thread.c (load_infrun_state, save_infrun_state): Delete
3215         proceed_to_finish argument and references to it.
3216
3217         * infcall.c (call_function_by_hand): Adjust.
3218         * infcmd.c (finish_command): Adjust.
3219         * infrun.c (proceed_to_finish): Delete.
3220         (clear_proceed_status): Adjust.
3221         (context_switch): Don't context-switch proceed_to_finish.
3222         (normal_stop, save_inferior_status, restore_inferior_status):
3223         Adjust.
3224
3225 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3226
3227         * inferior.h (stop_bpstat): Delete.
3228
3229         * breakpoint.h (bpstat_do_actions): Remove bpstat* argument.
3230         
3231         * breakpoint.c (bpstat_do_actions): Rename to ...
3232         (bpstat_do_actions_1): ... this.  Make static.  Change return type
3233         to int.  Return true if a breakpoint proceeded.
3234         (bpstat_do_actions): New, as wrapper around bpstat_do_actions_1.
3235         (delete_breakpoint): Don't reference the global stop_bpstat; it's
3236         gone.
3237
3238         * gdbthread.h (struct thread_info): Add stop_bpstat.
3239         (save_infrun_state, load_infrun_state): Remove stop_bpstat
3240         argument.
3241         * thread.c (load_infrun_state, save_infrun_state): Remove
3242         stop_bpstat argument, and the code referencing it.
3243
3244         * infcall.c: Include "gdbthread.h".
3245         (call_function_by_hand): Adjust.
3246         * exceptions.c: Include "gdbthread.h".
3247         (throw_exception): Adjust.
3248         * infcmd.c (stop_bpstat): Delete.
3249         (continue_command): In all-stop, set the ignore count on the
3250         thread that reported the stop.  In non-stop, set it on the current
3251         thread.
3252         (finish_command_continuation): Adjust.
3253         (program_info): Adjust.
3254         * infrun.c (clear_proceed_status): Adjust.
3255         (context_switch): Don't context-switch stop_bpstat.
3256         (handle_inferior_event): Adjust.
3257         (normal_stop): Adjust.
3258         (save_inferior_status, restore_inferior_status): Adjust.
3259
3260         * inf-loop.c (inferior_event_handler): Remove parameter to
3261         bpstat_do_actions call.
3262         * top.c (command_loop): Remove parameter to bpstat_do_actions
3263         call.  Call it unconditionally.
3264         * event-top.c (command_handler): Ditto.
3265         * python/python.c (execute_gdb_command): Ditto.
3266
3267 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3268
3269         * inferior.h (step_over_calls): Delete.
3270
3271         * gdbthread.h (save_infrun_state, load_infrun_state): Remove
3272         step_over_calls argument.
3273         * thread.c (save_infrun_state, load_infrun_state): Remove
3274         step_over_calls argument.  Adjust.
3275
3276         * infcmd.c (step_over_calls): Delete.
3277         (step_1): Adjust.
3278         * infrun.c (clear_proceed_status): Adjust.
3279         (context_switch): Don't context-switch step_over_calls.
3280         (handle_inferior_event, save_inferior_status)
3281         (restore_inferior_status): Adjust.
3282
3283 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3284
3285         Remove context switching in favour of accessing thread_info fields
3286         directly.
3287
3288         * infrun.c (stepping_over_breakpoint, step_resume_breakpoint):
3289         Delete.
3290         (struct thread_stepping_state): Delete.
3291         (gtss, tss): Delete.
3292         (follow_inferior_reset_breakpoints, follow_exec)
3293         (resume, clear_proceed_status): Adjust.
3294         (prev_pc): Delete.
3295         (proceed, start_remote, init_wait_for_inferior): Adjust.
3296         (struct execution_control_state): Add event_thread member.
3297         (delete_step_resume_breakpoint_callback)
3298         (delete_step_thread_step_resume_breakpoint)
3299         (delete_step_thread_step_resume_breakpoint_cleanup)
3300         (delete_step_thread_step_resume_breakpoint): New.
3301         (wait_for_inferior, init_execution_control_state): Use
3302         delete_step_thread_step_resume_breakpoint_cleanup.
3303         (wait_for_inferior): Set the event_thread.
3304         (fetch_inferior_event): Ditto.  Delete the step-resume breakpoint
3305         with delete_step_thread_step_resume_breakpoint.
3306         (init_thread_stepping_state): Change parameter type to
3307         thread_info.  Adjust.
3308         (context_switch): Don't context switch prev_pc,
3309         stepping_over_breakpoint, step_resume_breakpoint,
3310         step_range_start, step_range_end, step_frame_id,
3311         tss->stepping_over_breakpoint,
3312         tss->stepping_through_solib_after_catch,
3313         tss->stepping_through_solib_catchpoints, tss->current_line, or
3314         tss->current_symtab.
3315         (adjust_pc_after_break, handle_inferior_event)
3316         (currently_stepping, step_into_function)
3317         (insert_step_resume_breakpoint_at_sal)
3318         (insert_longjmp_resume_breakpoint, keep_going): Adjust.
3319         (clear_stepping_state): New.
3320         (normal_stop): Adjust.
3321         (save_inferior_status, restore_inferior_status): Adjust.
3322
3323         * gdbthread.h (struct thread_info): Comments describing the
3324         members moved here.  Add step_after_step_resume_breakpoint.
3325         (delete_step_resume_breakpoint): Add thread_info argument.
3326         (save_infrun_state, load_infrun_state): Remove prev_pc,
3327         trap_expected, step_resume_breakpoint, step_range_start,
3328         step_range_end, step_frame_id, another_trap,
3329         stepping_through_solib_after_catch,
3330         stepping_through_solib_catchpoints, current_line and
3331         current_symtab function arguments.
3332         (inferior_thread): Declare.
3333
3334         * thread.c (inferior_thread): New.
3335         (delete_step_resume_breakpoint): Add a thread_info parameter and
3336         rewrite.
3337         (load_infrun_state, save_infrun_state): Remove prev_pc,
3338         trap_expected, step_resume_breakpoint, step_range_start,
3339         step_range_end, step_frame_id, stepping_over_breakpoint,
3340         stepping_through_solib_after_catch,
3341         stepping_through_solib_catchpoints, current_line and
3342         current_symtab args.  Remove code referencing them.
3343
3344         * infcmd.c (step_range_start, step_range_end, step_frame_id):
3345         Delete.
3346         (step_1, step_once, until_next_command): Adjust.
3347
3348         * inferior.h (step_range_start, step_range_end, step_frame_id):
3349         Delete.
3350
3351         * linux-nat.c (linux_child_follow_fork): If following the child,
3352         move the step state to it.  Adjust.
3353         * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
3354         * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
3355
3356 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3357
3358         * bsd-uthread.c (bsd_uthread_find_new_threads): Claim the main
3359         thread.
3360
3361 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3362
3363         * corelow.c (add_to_thread_list): If this is the first time we
3364         hear about thread info, update inferior_ptid.
3365         (core_open): Clear the thread list and set inferior_ptid before
3366         acknowledging a new inferior.  Find threads before fetching
3367         register info.  Give an upper target layer a chance to find and
3368         claim new threads.  Print core generation and stop signal info
3369         after finding new threads.
3370         (get_core_register_section): Look at the lwp member of
3371         inferior_ptid for detecting if we have threads info, instead of
3372         the pid member.
3373         (core_pid_to_str): New.
3374         (init_core_ops): Register core_pid_to_str.
3375
3376 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3377
3378         * spu-linux-nat.c (spu_child_post_startup_inferior)
3379         (spu_child_post_attach): Don't add the main thread here.
3380
3381 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3382
3383         Use ptid_t.tid to store thread ids instead of ptid_t.pid.
3384
3385         * gnu-nat.c (inf_validate_procs): If this is the first time we're
3386         seeing a thread id, extend the main thread's ptid.  If we still
3387         have pending execs, don't be verbose about new threads.
3388         (gnu_wait, gnu_resume, gnu_attach, gnu_thread_alive)
3389         (gnu_pid_to_str, cur_thread, sig_thread_cmd): Adjust.
3390         * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers):
3391         Adjust.
3392
3393 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3394
3395         * procfs.c (to_attach): Create a procinfo for the current lwp.
3396         Add it to gdb's thread list.
3397         (procfs_fetch_registers, procfs_store_registers): Assume there's
3398         always an lwp.
3399         (procfs_wait): Don't add the main thread here.
3400         (procfs_init_inferior): Create a procinfo for the main lwp here.
3401         Change main thread's ptid with thread_change_ptid.
3402         (procfs_notice_thread): Check for exited threads.
3403         (procfs_corefile_thread_callback): Remove check for the main
3404         process.
3405         (procfs_make_note_section): Assume there is always a thread.
3406
3407         * sol-thread.c (sol_thread_attach): Clear sol_thread_active before
3408         attaching.  Change the main thread ptid with thread_change_ptid.
3409         (sol_thread_detach): Clear sol_thread_active.
3410         (sol_thread_wait): Check for exited threads.
3411         (sol_thread_create_inferior): Clear sol_thread_active before
3412         creating a new inferior.  Change the main thread ptid with
3413         thread_change_ptid.
3414         (sol_thread_mourn_inferior): Clear sol_thread_active.
3415         (sol_find_new_threads_callback): Check for exited threads.
3416
3417 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3418
3419         * inf-ttrace.c (inf_ttrace_wait): On TTEVT_LWP_CREATE and
3420         LWP_TERMINATE, resume the caller thread.  On TTEVT_LWP_CREATE,
3421         TTEVT_LWP_EXIT and TTEVT_LWP_TERMINATE, don't stop the whole
3422         process, and return TARGET_WAITKIND_IGNORE.
3423
3424 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3425
3426         * inf-ttrace.c: Include <signal.h>
3427         (inf_ttrace_delete_dead_threads_callback): New.
3428         (inf_ttrace_resume_lwp): New.
3429         (inf_ttrace_resume_callback, inf_ttrace_resume): Rewrite.  Don't
3430         delete dying threads until they are really dead.
3431         (inf_ttrace_wait): After stopping the whole process, delete any
3432         dying thread that is really dead by now.
3433         (inf_ttrace_thread_alive): Return 1.
3434         (inf_ttrace_extra_thread_info): New.
3435         (inf_ttrace_target): Register inf_ttrace_extra_thread_info.
3436
3437 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3438
3439         * inf-ttrace.c (inf_ttrace_follow_fork): Register the main thread
3440         of the child fork.
3441         (inf_ttrace_attach): Add the main thread.
3442         (inf_ttrace_resume_callback): Check for exited threads.  Adjust
3443         for always a thread.
3444         (inf_ttrace_wait): Decorate the main thread's ptid with lwp info
3445         using thread_change_ptid, and set its private data.  Don't add the
3446         main thread here.
3447         (inf_ttrace_pid_to_str): Adjust.
3448
3449 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3450
3451         * bsd-uthread.c (bsd_uthread_wait): Decorate the main thread with
3452         thread_change_ptid.  Check for exited threads.
3453         (bsd_uthread_find_new_threads): Check for exited threads.
3454
3455 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3456
3457         * inf-ptrace.c: Include "gdbthread.h".
3458         (inf_ptrace_attach): Add the main thread here.
3459         * linux-nat.c (linux_nat_attach): Don't add the main thread here.
3460         Decorate the main thread id with the lwp id.
3461
3462 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
3463
3464         * linux-nat.c (linux_nat_wait): Update inferior_ptid's ptid with
3465         thread_change_ptid.  Don't add or mark the main thread as running
3466         and executing here.
3467         * fork-child.c (fork_inferior): Add the main thread here.
3468
3469 2008-09-08  Jerome Guitton  <guitton@adacore.com>
3470
3471         * rs6000-tdep.c (rs6000_fetch_instruction)
3472         (rs6000_skip_stack_check): New functions.
3473         (skip_prologue): Skip stack check sequence.
3474         
3475 2008-09-08  David Daney  <ddaney@avtrex.com>
3476
3477         * dummy-frame.h (frame.h): Include it.
3478         (struct frame_id): Remove declaration.
3479
3480 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3481
3482         * spu-tdep.c (spu_push_dummy_code): New function.
3483         (spu_gdbarch_init): Install it.
3484
3485 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3486
3487         * gdbarch.sh (gdbarch_dump): Use core_addr_to_string_nz
3488         instead of paddr_nz.
3489         * gdbarch.c: Regenerate.
3490
3491         * target.c (target_xfer_partial, debug_print_register): Use
3492         core_addr_to_string_nz instead of paddr_nz.
3493
3494 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3495
3496         * rs6000-tdep.c (rs6000_gdbarch_init): Setup displaced stepping
3497         *before* calling gdbarch_init_osabi.
3498         (rs6000_aix_init_osabi): Disable displaced stepping.
3499
3500 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3501
3502         * target.c (update_current_target): Do not inherit to_open
3503         or to_close.
3504         (pop_target): Call target_close on target_stack instead
3505         of current_target.
3506         (pop_all_targets_above): Likewise.
3507
3508 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3509
3510         * gnu-v3-abi.c (gnuv3_decode_method_ptr): New function.
3511         (gnuv3_print_method_ptr): Use it.
3512         (gnuv3_method_ptr_to_value): Likewise.
3513
3514 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3515
3516         * nto-tdep.h (struct nto_target_ops): Add gdbarch parameter to
3517         register_area callback function.
3518         * i386-nto-tdep.c (i386nto_register_area): Add gdbarch parameter.
3519         Use it instead of current_gdbarch.
3520         * nto-procfs.c (procfs_store_registers): Update call.
3521
3522 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3523
3524         * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Use
3525         regcache architecture instead of current_gdbarch.
3526
3527 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3528
3529         * mep-tdep.c (struct mep_prologue): Add gdbarch member.
3530         (check_for_saved): Use it instead of current_gdbarch.
3531         (is_arg_spill): Add gdbarch paramter.  Use it instead
3532         of current_gdbarch.
3533         (mep_analyze_prologue): Add gdbarch parameter.  Pass it
3534         to is_arg_spill and check_for_saved.
3535         (mep_skip_prologue, mep_analyze_frame_prologue): Update calls.
3536
3537 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3538
3539         * hppa-tdep.c (internalize_unwinds): Use objfile architecture
3540         instead of current_gdbarch.
3541
3542 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3543
3544         * m68k-tdep.h (m68kbsd_fpreg_offset): Add gdbarch parameter.
3545         * m68kbsd-tdep.c (m68kbsd_fpreg_offset): Add gdbarch paramter.
3546         Use it instead of current_gdbarch.
3547         (m68kbsd_supply_fpregset): Update call.
3548         * m68kbsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3549         (m68kbsd_collect_fpregset): Likewise.
3550
3551 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3552
3553         * cris-tdep.c (cris_version, cris_mode): Remove.
3554         (crisv32_single_step_through_delay): Use tdep->cris_mode.
3555         (cris_breakpoint_from_pc): Likewise.
3556         (cris_frame_unwind_cache): Use tdep->cris_version.
3557         (crisv32_scan_prologue): Likewise.
3558         (cris_spec_reg_applicable): Add gdbarch argument.
3559         Use tdep->cris_version.
3560         (cris_register_size, cris_special_register_name): Update calls.
3561         (cris_special_register_name): Add gdbarch argument.
3562         (cris_register_name, crisv32_register_name): Update calls.
3563
3564 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3565
3566         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Use info->arch
3567         instead of current_gdbarch.
3568
3569         * sh64-tdep.c (gdb_print_insn_sh64): Remove.
3570         (sh64_gdbarch_init): Install print_insn_sh64 directly.
3571         * sh-tdep.c (gdb_print_insn_sh): Remove.
3572         (sh_gdbarch_init): Install print_insn_sh directly.
3573
3574         * mips-tdep.c (gdb_print_insn_mips): Do not check mips_abi
3575         from current_gdbarch.
3576         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): New functions.
3577         (mips_gdbarch_init): Install them instead of gdb_print_insn_mips
3578         depending on mips_abi.
3579
3580 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3581
3582         * gdbarch.sh (addr_bits_remove): Change type to 'm'.
3583         (smash_text_address): Likewise.
3584         * gdbarch.c, gdbarch.h: Regenerate.
3585
3586         * arch-utils.c (core_addr_identity): Add gdbarch parameter.
3587         * arch-utils.h (core_addr_identity): Likewise.
3588         * arm-tdep.c (arm_addr_bits_remove): Likewise.
3589         (arm_smash_text_address): Likewise.
3590         * hppa-tdep.c (hppa_smash_text_address): Likewise.
3591         * m88k-tdep.c (m88k_addr_bits_remove): Likewise.
3592         * s390-tdep.c (s390_addr_bits_remove): Likewise.
3593
3594         * mips-tdep.c (mips_addr_bits_remove): Add gdbarch parameter.
3595         Use it instead of current_gdbarch.
3596
3597         * arm-tdep.c (arm_prologue_prev_register, arm_unwind_pc,
3598         arm_dwarf2_prev_register): Update calls.
3599         * m88k-tdep.c (m88k_unwind_pc): Update call.
3600
3601 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3602
3603         * dwarf2expr.h (dwarf2_read_address): Add gdbarch argument.
3604         * dwarf2expr.c (dwarf2_read_address): Add gdbarch argument.
3605         Call gdbarch_integer_to_address directly instead of converting
3606         to value and back.  Update comment.
3607         (execute_stack_op): Update call site.
3608         * dwarf2loc.c (find_location_expression): Likewise.
3609         (locexpr_describe_location): Update
3610
3611         * dwarf2expr.h (struct dwarf_expr_context): Add gdbarch member.
3612         * dwarf2-frame.c (execute_stack_op): Initialize ctx->gdbarch.
3613         * dwarf2loc. (dwarf2_evaluate_loc_desc): Likewise.
3614         (dwarf2_loc_desc_needs_frame): Likewise.
3615
3616 2008-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
3617
3618         * breakpoint.h (struct bp_location): Change type of section
3619         member to "struct obj_section *".
3620         * tracepoint.h (struct tracepoint): Likewise.
3621         * symtab.h (struct general_symbol_info): Replace bfd_section
3622         member with obj_section.
3623         (struct symtab_and_line): Change type of section member to
3624         "struct obj_section *".
3625         (SYMBOL_BFD_SECTION): Remove macro, replace by ...
3626         (SYMBOL_OBJ_SECTION): ... this.
3627
3628         * minsym.c (prim_record_minimal_symbol_and_info): Record symbol
3629         section as obj_section instead of bfd_section.
3630
3631         * ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
3632         directly instead of looking of obj_section from bfd_section.
3633
3634         * objfiles.h (find_pc_sect_section): Remove.
3635         * objfiles.c (find_pc_sect_section): Remove.
3636         (find_pc_section): Inline find_pc_sect_section code.
3637
3638         * symfile.h (find_pc_overlay): Return struct obj_section *.
3639         (find_pc_mapped_section): Likewise.
3640         (section_is_overlay, section_is_mapped): Change type of section
3641         argument to struct obj_section *.
3642         (pc_in_mapped_range, pc_in_unmapped_range): Likewise.
3643         (overlay_mapped_address, overlay_unmapped_address): Likewise.
3644         (symbol_overlayed_address): Likewise.
3645         * symtab.h (symbol_overlayed_address): Likewise.
3646         * symfile.c (overlay_is_mapped): Remove.
3647         (section_is_mapped): Inline overlay_is_mapped code.  Update.
3648         (overlay_invalidate_all): Update.
3649         (section_is_overlay): Change section argument to type
3650         "struct obj_section *".  Use bfd_ methods.
3651         (pc_in_unmapped_range): Likewise.  Handle relocated sections.
3652         (pc_in_mapped_range): Likewise.  Handle relocated sections.
3653         (sections_overlap): Likewise.
3654         (overlay_unmapped_address): Likewise.
3655         (overlay_mapped_address): Likewise.
3656         (symbol_overlayed_address): Likewise.
3657         (find_pc_overlay): Return struct obj_section *.
3658         (find_pc_mapped_section): Likewise.
3659         (list_overlays_command): Update.
3660         (map_overlay_command, unmap_overlay_command): Update.
3661         (simple_overlay_update): Update.
3662
3663         * block.h (blockvector_for_pc_sect): Change section argument
3664         to type "struct obj_section *".
3665         (block_for_pc_sect): Likewise.
3666         * block.c (blockvector_for_pc_sect): Change section argument
3667         to type "struct obj_section *".
3668         (block_for_pc_sect): Likewise.
3669         * symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
3670         find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
3671         lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
3672         (matching_bfd_sections): Rename to ...
3673         (matching_obj_sections): ... this.  Update argument types.
3674         * blockframe.c (find_pc_sect_function): Likewise.
3675         * breakpoint.c (describe_other_breakpoints): Likewise.
3676         (breakpoint_has_pc, check_duplicates_for): Likewise.
3677         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
3678         (lookup_minimal_symbol_by_pc_section): Likewise.
3679         * symtab.c (find_pc_sect_psymtab_closer): Likewise.
3680         (find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
3681         find_pc_sect_line, find_function_start_pc): Likewise.
3682         (matching_bfd_sections): Rename to ...
3683         (matching_obj_sections): ... this.  Update argument types.
3684
3685         * blockframe.c (find_pc_partial_function): Update to section
3686         type changes.  No longer call find_pc_sect_section.
3687         (cache_pc_function_section): Change to type "struct obj_section *".
3688         * breakpoint.c (resolve_sal_pc): Update to section type changes.
3689         * exec.c (xfer_memory): Likewise.
3690         * findvar.c (read_var_value): Likewise.
3691         * infcmd.c (jump_command): Likewise.
3692         * linespec.c (minsym_found): Likewise.
3693         * maint.c (maintenance_translate_address): Likewise.
3694         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
3695         (lookup_solib_trampoline_symbol_by_pc): Likewise.
3696         * parse.c (write_exp_msymbol): Likewise.
3697         * printcmd.c (build_address_symbolic): Likewise.
3698         (address_info, sym_info): Likewise.
3699         * symmisc.c (dump_msymbols, print_symbol): Likewise.
3700         * symtab.c (fixup_section): Likewise.
3701         (fixup_symbol_section, fixup_psymbol_section): Likewise.
3702         (find_pc_line, find_function_start_sal): Likewise.
3703         * target.c (memory_xfer_partial): Likewise.
3704         * hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
3705         * spu-tdep.c (spu_overlay_update): Likewise.
3706
3707 2008-09-04  Doug Evans  <dje@google.com>
3708
3709         * defs.h (plongest,pulongest): Renamed from paddr_u,paddr_d.
3710         Change argument of pulongest from CORE_ADDR to ULONGEST.
3711         All callers updated.
3712         * utils.c (plongest): Renamed from paddr_d.
3713         (pulongest): Renamed from paddr_u, change arg type to ULONGEST.
3714         * remote-mips.c (send_srec): Use paddr_nz instead of paddr_u in
3715         `CORE_ADDR addr' arg of error message.
3716
3717 2008-09-03  Angela Marie Thomas <angela@releasedominatrix.com>
3718
3719         * ser-tcp.c (ser_tcp_send_break): New function.
3720         (_initialize_ser_tcp): Use ser_tcp_send_break.
3721         * ser-tcp.h (ser_tcp_send_break): New prototype.
3722
3723 2008-09-03  Ulrich Weigand  <uweigand@de.ibm.com>
3724
3725         * spu-tdep.c (spu_push_dummy_call): Update all stack pointer slots
3726         when allocating stack frame for inferior call.
3727
3728 2008-09-03  Ulrich Weigand  <uweigand@de.ibm.com>
3729
3730         * spu-tdep.c (spu_frame_unwind_cache): Do not attempt to unwind
3731         SP or return address if we failed to find a valid frame.
3732
3733 2008-09-03  Aleksandar Ristovski  <aristovski@qnx.com>
3734
3735         * breakpoint.c (breakpoint_init_inferior): Mark as not inserted only
3736         non-permanent breakpoints.
3737         (bpstat_stop_status): Change enable_state to bp_disabled only for
3738         non-permanent breakpoints.
3739         (bp_loc_is_permanent): New function.
3740         (create_breakpoint): Check if the location points to a permanent
3741         breakpoint and if it does, make breakpoint permanent.
3742         (update_breakpoint_locations): Make sure new locations of permanent
3743         breakpoints are properly initialized.
3744         * i386-tdep.c (i386_skip_permanent_breakpoint): New function.
3745         (i386_gdbarch_init): Set gdbarch_skip_permanent_breakpoint.
3746
3747 2008-09-02  Pedro Alves  <pedro@codesourcery.com>
3748
3749         * breakpoint.c (insert_breakpoints, update_global_location_list):
3750         Check breakpoints_always_inserted_mode instead of
3751         always_inserted_mode directly.
3752
3753 2008-09-02  Andreas Schwab  <schwab@suse.de>
3754
3755         * ia64-tdep.c (ia64_get_dyn_info_list): Use obj_section_addr.
3756
3757 2008-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3758
3759         Stay compatible after the GCC PR fortran/29635 fix.
3760         * dwarf2read.c (process_die <DW_TAG_imported_module>)
3761         (process_die <DW_TAG_imported_module>): Do not assert anything about
3762         these unsupported tags.
3763
3764 2008-08-29  Tom Tromey  <tromey@redhat.com>
3765
3766         * maint.c (_initialize_maint_cmds): Fix typo.
3767
3768 2008-08-29  Tom Tromey  <tromey@redhat.com>
3769
3770         * dwarf2read.c (dwarf2_build_psymtabs_hard): Copy dirname on
3771         obstack.
3772
3773 2008-08-27  Ulrich Weigand  <uweigand@de.ibm.com>
3774
3775         * remote.c: Include "gdb_stat.h".
3776
3777 2008-08-26  Ulrich Weigand  <uweigand@de.ibm.com>
3778
3779         * dummy-frame.h (dummy_frame_pop): Add prototype.
3780         * dummy-frame.c: Include "observer.h".
3781         (dummy_frame_push): Do not check for stale frames.
3782         (dummy_frame_pop): New function.
3783         (cleanup_dummy_frames): New function.
3784         (_initialize_dummy_frame): Install it as inferior_created observer.
3785
3786         * frame.h (struct frame_id): Update comments.
3787         (frame_id_inner): Remove prototype.
3788         * frame.c (frame_id_inner): Make static.  Add comments.
3789         (frame_find_by_id): Update frame_id_inner safety net check to avoid
3790         false positives for targets using non-contiguous stack ranges.
3791         (get_prev_frame_1): Update frame_id_inner safety net check.
3792         (frame_pop): Call dummy_frame_pop when popping a dummy frame.
3793
3794         * stack.c (return_command): Directly pop the selected frame.
3795         * infrun.c (handle_inferior_event): Remove dead code.
3796         * i386-tdep.c (i386_push_dummy_call): Update comment.
3797
3798 2008-08-26  Ulrich Weigand  <uweigand@de.ibm.com>
3799
3800         * breakpoint.c (remove_breakpoint): Do not fail if unable to remove
3801         breakpoint from shared library.
3802
3803 2008-08-26  Ulrich Weigand  <uweigand@de.ibm.com>
3804
3805         * solib-svr4.c (read_program_header): New function.
3806         (scan_dyntag_auxv): New function.
3807         (elf_locate_base): Use it if scan_dyntag fails.
3808         (find_program_interpreter): New function.
3809         (enable_break): Use it instead of .interp section.
3810
3811 2008-08-26  Ulrich Weigand  <uweigand@de.ibm.com>
3812
3813         * remote.h (remote_filename_p, remote_bfd_open): Add prototypes.
3814         * remote.c (remote_bfd_iovec_open, remote_bfd_iovec_close,
3815         remote_bfd_iovec_pread, remote_bfd_iovec_stat, remote_filename_p,
3816         remote_bfd_open): New functions.
3817         (remote_hostio_send_command): Fail safely if remote connection
3818         is not set up.
3819
3820         * solist.h (solib_open): Remove prototype.
3821         (solib_bfd_open): Add prototype.
3822         * solib.c: Include "remote.h".
3823         (solib_open): Remove, replace by ...
3824         (solib_bfd_open): ... this new function.  Handle remote BFDs.
3825         (solib_map_sections): Replace solib_open by solib_bfd_open.
3826         * solib-frv.c: Include "exceptions.h".
3827         (enable_break2): Replace solib_open by solib_bfd_open.
3828         * solib-svr4.c: Include "exceptions.h".
3829         (enable_break): Replace solib_open by solib_bfd_open.
3830
3831         * symfile.c: Include "remote.h".
3832         (build_id_verify): Handle remote BFDs.
3833         (separate_debug_file_exists): Use BFD to access file.  Handle
3834         remote BFDs.
3835         (symfile_bfd_open): Handle remote BFDs.
3836         (reread_symbols): Handle remote BFDs.
3837
3838         * NEWS: Mention "remote:" argument prefix to "set sysroot".
3839
3840 2008-08-26  Ulrich Weigand  <uweigand@de.ibm.com>
3841
3842         * gdbarch.sh (target_gdbarch): New global variable.
3843         (deprecated_current_gdbarch_select_hack): Set it.
3844         * gdbarch.c, gdbarch.h: Regenerate.
3845
3846         * arch-utils.c (gdbarch_update_p): Use target_gdbarch instead
3847         of current_gdbarch.
3848         * target-descriptions.c (target_find_description): Likewise.
3849         * arm-tdep.c (arm_update_current_architecture): Likewise.
3850         (show_fp_model, arm_show_abi, arm_show_fallback_mode, 
3851         arm_show_force_mode): Likewise.
3852         * mips-tdep.c (show_mask_address, show_mipsfpu_command,
3853         show_mips_abi): Likewise.
3854         * mep-tdep.c (me_module_register_set, current_me_module): Likewise.
3855
3856         * target.c (target_translate_tls_address): Use target_gdbarch
3857         instead of current_gdbarch.
3858         * remote.c (struct packet_reg): Likewise.
3859         (get_remote_arch_state, packet_reg_from_regnum,
3860         packet_reg_from_pnum, remote_check_symbols, remote_wait,
3861         remote_address_masked, remote_insert_breakpoint,
3862         remote_insert_hw_breakpoint, remote_read_description): Likewise.
3863         * remote-m32r-sdi.c (m32r_resume, m32r_wait): Likewise.
3864         * remote-mips.c (mips_open, mips_common_breakpoint): Likewise.
3865         * cris-tdep.c (cris_can_use_hardware_watchpoint): Likewise.
3866
3867         * solib.c (solib_open, solib_map_sections, solib_read_symbols,
3868         solib_add, info_sharedlibrary_command, solib_address, 
3869         solib_create_inferior_hook, in_solib_dynsym_resolve_code,
3870         solib_global_lookup): Likewise.
3871         * solib-frv.c (enable_break2, frv_relocate_main_executable): Likewise.
3872         * solib-irix.c (irix_current_sos, irix_open_symbol_file_object):
3873         Likewise.
3874         * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
3875         * solib-svr4.c (exec_entry_point, enable_break, svr4_free_so,
3876         set_solib_svr4_fetch_link_map_offsets, svr4_fetch_link_map_offsets):
3877         Likewise.
3878         * nto-tdep.c (nto_find_and_open_solib, nto_init_solib_absolute_prefix,
3879         nto_truncate_ptr): Likewise.
3880         * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Likewise.
3881
3882 2008-08-26  Luis Machado  <luisgpm@br.ibm.com>
3883
3884         * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections) New structure.
3885         (ppc_linux_vmx_regset_sections): New structure.
3886         (ppc_linux_fp_regset_sections): New structure.
3887         (ppc_linux_init_abi): Select core-file regset  based on target
3888         features.
3889
3890 2008-08-26  Ulrich Weigand  <uweigand@de.ibm.com>
3891
3892         * target.c (debug_print_register): Use regcache_raw_collect
3893         instead of regcache_cooked_read.  Only handle raw registers.
3894
3895 2008-08-25  Pedro Alves  <pedro@codesourcery.com>
3896
3897         * cp-name-parser.y: Include config.h before system headers.
3898
3899 2008-08-25  Ulrich Weigand  <uweigand@de.ibm.com>
3900
3901         * m88k-tdep.c: Update for unwinder changes.
3902
3903 2008-08-24  Tom Tromey  <tromey@redhat.com>
3904
3905         * s390-tdep.c (s390_address_class_type_flags): Use
3906         TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1.
3907         (s390_address_class_type_flags_to_name): Likewise.
3908         (s390_address_class_name_to_type_flags): Likewise.
3909
3910 2008-08-24  Tom Tromey  <tromey@redhat.com>
3911
3912         * rs6000-tdep.c (rs6000_builtin_type_vec128): Don't use
3913         TYPE_FLAGS.
3914         * features/rs6000/powerpc-vsx32l.c
3915         (initialize_tdesc_powerpc_vsx32l): Update.
3916         * features/rs6000/powerpc-vsx32.c
3917         (initialize_tdesc_powerpc_vsx32): Update.
3918         * features/rs6000/powerpc-vsx64.c
3919         (initialize_tdesc_powerpc_vsx64): Update.
3920         * features/rs6000/powerpc-vsx64l.c
3921         (initialize_tdesc_powerpc_vsx64l): Update.
3922         * target-descriptions.c (maint_print_c_tdesc_cmd): Emit
3923         TYPE_VECTOR, not TYPE_FLAGS.
3924
3925 2008-08-24  Tom Tromey  <tromey@redhat.com>
3926
3927         * xml-tdesc.c (tdesc_end_union): Update.
3928         * stabsread.c (define_symbol): Update.
3929         (read_type): Update.
3930         (read_struct_type): Update.
3931         (read_enum_type): Update.
3932         * spu-tdep.c (spu_builtin_type_vec128): Update.
3933         * sh-tdep.c (sh_push_dummy_call_fpu): Update.
3934         (sh_push_dummy_call_nofpu): Update.
3935         * mdebugread.c (parse_symbol): Update.
3936         (parse_symbol): Update.
3937         (parse_symbol): Update.
3938         (upgrade_type): Update.
3939         * jv-lang.c (java_lookup_class): Update.
3940         * iq2000-tdep.c (iq2000_pointer_to_address): Update.
3941         * i386-tdep.c (i386_mmx_type): Update.
3942         (i386_sse_type): Update.
3943         * gdbtypes.h (enum type_flag_value): New enum.
3944         (enum type_instance_flag_value): New enum.
3945         (TYPE_FLAG_UNSIGNED, TYPE_FLAG_NOSIGN, TYPE_FLAG_STUB,
3946         TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC, TYPE_FLAG_PROTOTYPED,
3947         TYPE_FLAG_INCOMPLETE, TYPE_FLAG_VARARGS, TYPE_FLAG_VECTOR,
3948         TYPE_FLAG_FIXED_INSTANCE, TYPE_FLAG_STUB_SUPPORTED,
3949         TYPE_FLAG_NOTTEXT): Now enum constants.
3950         (TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_CODE_SPACE,
3951         TYPE_FLAG_DATA_SPACE, TYPE_FLAG_ADDRESS_CLASS_1,
3952         TYPE_FLAG_ADDRESS_CLASS_2): Remove.
3953         (TYPE_INSTANCE_FLAG_CONST, TYPE_INSTANCE_FLAG_VOLATILE,
3954         TYPE_INSTANCE_FLAG_CODE_SPACE, TYPE_INSTANCE_FLAG_DATA_SPACE,
3955         TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1,
3956         TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2): New constants.
3957         (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB, TYPE_TARGET_STUB,
3958         TYPE_STATIC, TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_VARARGS,
3959         TYPE_VECTOR, TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED,
3960         TYPE_NOTTEXT): Update.
3961         (TYPE_FLAG_ADDRESS_CLASS_ALL): Remove.
3962         (TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL): New define.
3963         (TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE,
3964         TYPE_ADDRESS_CLASS_1, TYPE_ADDRESS_CLASS_2,
3965         TYPE_ADDRESS_CLASS_ALL): Update.
3966         (struct main_type) <flags>: Remove.
3967         <flag_unsigned, flag_nosign, flag_stub, flag_target_stub,
3968         flag_static, flag_prototyped, flag_incomplete, flag_varargs,
3969         flag_vector, flag_stub_supported, flag_nottext,
3970         flag_fixed_instance>: New fields.
3971         <nfields, vptr_fieldno>: Move earlier.
3972         (TYPE_FLAGS): Remove.
3973         * gdbtypes.c (make_pointer_type): Update.
3974         (address_space_name_to_int): Update.
3975         (address_space_int_to_name): Update.
3976         (make_type_with_address_space): Update.
3977         (make_cv_type): Update.
3978         (create_range_type): Update.
3979         (get_discrete_bounds): Update.
3980         (create_set_type): Update.
3981         (make_vector_type): Update.
3982         (smash_to_method_type): Update.
3983         (check_typedef): Update.
3984         (check_stub_method): Update.
3985         (init_type): Individually assign flag fields.
3986         (recursive_dump_type): Don't print entire TYPE_FLAGS field.  Do
3987         print TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED, and TYPE_NOTTEXT.
3988         (copy_type_recursive): Copy the entire main type.  Don't use
3989         TYPE_FLAGS.
3990         * features/rs6000/powerpc-altivec64l.c
3991         (initialize_tdesc_powerpc_altivec64l): Update.
3992         * features/rs6000/powerpc-altivec64.c
3993         (initialize_tdesc_powerpc_altivec64): Update.
3994         * features/rs6000/powerpc-altivec32l.c
3995         (initialize_tdesc_powerpc_altivec32l): Update.
3996         * features/rs6000/powerpc-altivec32.c
3997         (initialize_tdesc_powerpc_altivec32): Update.
3998         * features/rs6000/powerpc-7400.c (initialize_tdesc_powerpc_7400):
3999         Update.
4000         * features/arm-with-iwmmxt.c (initialize_tdesc_arm_with_iwmmxt):
4001         Update.
4002         * dwarf2read.c (read_structure_type): Update.
4003         (read_enumeration_type): Likewise.
4004         (process_enumeration_scope): Likewise.
4005         (read_tag_pointer_type): Likewise.
4006         (read_subroutine_type): Likewise.
4007         (read_subroutine_type): Likewise.
4008         (read_base_type): Likewise.
4009         * coffread.c (coff_read_enum_type): Update.
4010         * ada-valprint.c (adjust_type_signedness): Update.
4011         * ada-typeprint.c (print_record_field_types): Update.
4012         * ada-lang.c (packed_array_type): Update.
4013         (empty_record): Don't reset TYPE_FLAGS.
4014         (ada_template_to_fixed_record_type_1): Update.
4015         (ada_template_to_fixed_record_type_1): Likewise.
4016         (template_to_static_fixed_type): Likewise.
4017         (to_record_with_fixed_variant_part): Likewise.
4018         (to_fixed_record_type): Likewise.
4019         (to_fixed_array_type): Likewise.
4020         (to_static_fixed_type): Likewise.
4021
4022 2008-08-23  Jim Blandy  <jimb@redhat.com>
4023
4024         PR macros/607:
4025         * symmisc.c (print_symbol_bcache_statistics): Include statistics
4026         for the macro bcache.
4027
4028 2008-08-23  Tom Tromey  <tromey@redhat.com>
4029
4030         * macrotab.h (struct macro_definition) <kind>: Shrink to one bit.
4031         (argc): Now 31 bits.
4032
4033 2008-08-22  Tom Tromey  <tromey@redhat.com>
4034
4035         * NEWS: Move macro entries back under "New commands".
4036
4037 2008-08-22  Ulrich Weigand  <uweigand@de.ibm.com>
4038
4039         * breakpoint.c (create_overlay_event_breakpoint): Rename to ...
4040         (create_overlay_event_breakpoint_1): ... this.  Add OBJFILE parameter.
4041         (create_overlay_event_breakpoint): Loop over all objfiles to install
4042         multiple instances of the overlay event breakpoint if present.
4043
4044 2008-08-22  Ulrich Weigand  <uweigand@de.ibm.com>
4045
4046         * spu-tdep.c (spu_overlay_new_objfile): Only consider SPU objfiles.
4047         (info_spu_event_command): Command only supported on SPU architecture.
4048         (info_spu_signal_command): Likewise.
4049         (info_spu_mailbox_command): Likewise.
4050         (info_spu_dma_command): Likewise.
4051         (info_spu_proxydma_command): Likewise.
4052
4053 2008-08-22  Ulrich Weigand  <uweigand@de.ibm.com>
4054
4055         * infrun.c (adjust_pc_after_break): Do not call get_thread_regcache
4056         if the thread has already exited.
4057
4058 2008-08-22  Pedro Alves  <pedro@codesourcery.com>
4059
4060         * infrun.c (proceed): Move back setting previous_inferior_ptid
4061         from here ...
4062         (wait_for_inferior): ... to here.
4063         (fetch_inferior_event): ... and here.
4064
4065 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
4066
4067         * gdbarch.sh: Include "regcache.h" into gdbarch.c.
4068         (deprecated_current_gdbarch_select_hack): Call registers_changed
4069         instead of reinit_frame_cache.
4070         * gdbarch.c: Regenerate.
4071
4072 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
4073
4074         * elfread.c (elf_symtab_read): Do not relocate thread-local symbols.
4075
4076 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
4077
4078         * xcoffread.c (SYMNAME_ALLOC): Correct syntax.
4079
4080 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
4081
4082         * findvar.c (locate_var_value): Do not call get_frame_arch
4083         with a NULL frame argument.
4084
4085 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
4086
4087         * frame.h (frame_map_regnum_to_name): Remove prototype.
4088         (frame_map_name_to_regnum): Remove prototype.
4089         * frame.c (frame_map_regnum_to_name): Remove.
4090         (frame_map_name_to_regnum): Remove.
4091         (frame_unwind_register_value): Use user_reg_map_regnum_to_name
4092         instead of frame_map_regnum_to_name.
4093         * ax-gdb.c: Include "user-regs.h".
4094         (gen_expr): Use user_reg_map_name_to_regnum instead of
4095         frame_map_name_to_regnum.
4096         * eval.c:  Include "user-regs.h".
4097         (evaluate_subexp_standard): Use user_reg_map_name_to_regnum
4098         instead of frame_map_name_to_regnum.
4099         * infcmd.c (registers_info): Likewise.
4100         * parse.c: Include "user-regs.h".
4101         (write_dollar_variable): Use user_reg_map_name_to_regnum
4102         instead of frame_map_name_to_regnum.
4103         * tracepoint.c: Include "user-regs.h".
4104         (encode_actions): Use user_reg_map_name_to_regnum
4105         instead of frame_map_name_to_regnum.
4106         * valops.c: Include "user-regs.h".
4107         (value_fetch_lazy): Use user_reg_map_regnum_to_name instead
4108         of frame_map_regnum_to_name.
4109
4110 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
4111
4112         * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): Read
4113         and manually relocate .opd contents from BFD instead of reading
4114         them from target memory.
4115
4116 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
4117
4118         * dwarf2read.c (processing_current_prefix): Delete static
4119         variable.
4120         (process_full_comp_unit): Do not set processing_current_prefix.
4121         (dwarf2_full_name): New function.
4122         (read_func_scope): Do not set processing_current_prefix.  Use
4123         determine_prefix.
4124         (read_structure_type): Do not set processing_current_prefix.  Remove
4125         unused inner cleanup.
4126         (process_structure_scope): Do not set processing_current_prefix.
4127         (read_enumeration_type): Use dwarf2_full_name.
4128         (determine_class_name): Return a const char *.  Put the result
4129         on the objfile obstack.  Use dwarf2_full_name.
4130         (read_namespace_type): New function.
4131         (read_namespace): Do not create the type here.  Use
4132         determine_prefix.
4133         (read_typedef): Use dwarf2_full_name.  Do not pass the name
4134         to init_type.
4135         (read_base_type): Do not pass the name to init_type.  Handle
4136         TYPE_FLAG_NOSIGN.
4137         (read_unspecified_type): Do not pass the name to init_type.
4138         (new_symbol): Use dwarf2_full_name instead of
4139         processing_current_prefix.
4140         (read_type_die): Do not set processing_current_prefix.  Handle
4141         DW_TAG_namespace.
4142         (determine_prefix): Handle specifications.  Return the result
4143         on the objfile obstack.  Handle unions correctly.
4144
4145 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
4146
4147         * buildsym.c (add_symbol_to_list): Do not call
4148         cp_scan_for_anonymous_namespaces here.
4149         (finish_block): Do not call cp_set_block_scope here.
4150         * cp-namespace.c (processing_has_namespace_info)
4151         (processing_current_prefix): Delete.
4152         (cp_initialize_namespace): Do not initialize
4153         processing_has_namespace_info.
4154         (cp_scan_for_anonymous_namespaces): Use SYMBOL_DEMANGLED_NAME.  Do
4155         not check processing_has_namespace_info.
4156         (cp_set_block_scope): Take prefix and namespace info flag as
4157         arguments.  Honor namespaces regardless of a demangled name.
4158         * cp-support.h (processing_has_namespace_info)
4159         (processing_current_prefix): Delete declarations.
4160         (cp_set_block_scope): Update prototype.
4161         * dwarf2read.c (processing_has_namespace_info)
4162         (processing_current_prefix): New static variables.
4163         (read_file_scope): Initialize processing_has_namespace_info.
4164         (read_func_scope): Call cp_set_block_scope for C++.
4165         (new_symbol): Call cp_scan_for_anonymous_namespaces for C++.
4166         * symtab.c (symbol_demangled_name): Accept a const argument.
4167         * symtab.h (symbol_demangled_name): Update prototype.
4168
4169 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
4170
4171         * ax-gdb.c (gen_var_ref): Use SYMBOL_LINKAGE_NAME.
4172         * blockframe.c (find_pc_partial_function): Likewise.
4173         * buildsym.c (find_symbol_in_list): Likewise.
4174         * c-valprint.c (c_val_print): Likewise.
4175         * coffread.c (patch_opaque_types, process_coff_symbol): Likewise.
4176         (coff_read_enum_type): Likewise.  Use SYMBOL_SET_LINKAGE_NAME.
4177         * cp-support.c (cp_remove_params): Renamed from remove_params and
4178         made global.
4179         (overload_list_add_symbol): Update call to remove_params.
4180         * cp-support.h (cp_remove_params): Declare.
4181         * dwarf2read.c (process_enumeration_scope): Use SYMBOL_LINKAGE_NAME.
4182         (dwarf2_const_value): Use SYMBOL_PRINT_NAME.
4183         * expprint.c (dump_subexp_body_standard): Likewise.
4184         * f-valprint.c (info_common_command, there_is_a_visible_common_named):
4185         Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME
4186         for messages.
4187         * findvar.c (read_var_value): Use SYMBOL_LINKAGE_NAME.
4188         * gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise.
4189         * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
4190         (hppa_hpux_skip_trampoline_code): Use SYMBOL_LINKAGE_NAME to find
4191         symbols and SYMBOL_PRINT_NAME for messages.
4192         * jv-lang.c (add_class_symbol): Use SYMBOL_SET_LINKAGE_NAME.
4193         * linespec.c (decode_line_2): Use SYMBOL_LINKAGE_NAME.
4194         * mdebugread.c (parse_symbol): Use SYMBOL_LINKAGE_NAME and
4195         SYMBOL_SET_LINKAGE_NAME.
4196         (mylookup_symbol): Use SYMBOL_LINKAGE_NAME.
4197         * minsyms.c (add_minsym_to_demangled_hash_table): Use
4198         SYMBOL_SEARCH_NAME.
4199         (lookup_minimal_symbol): Use SYMBOL_LINKAGE_NAME or
4200         SYMBOL_MATCHES_SEARCH_NAME, depending on the pass.
4201         * objfiles.h (ALL_OBJFILE_MSYMBOLS): Use SYMBOL_LINKAGE_NAME.
4202         * printcmd.c (build_address_symbolic): Use SYMBOL_LINKAGE_NAME.
4203         (address_info): Use SYMBOL_PRINT_NAME for messages and
4204         SYMBOL_LINKAGE_NAME for lookups.
4205         * sol-thread.c (info_cb): Use SYMBOL_PRINT_NAME for messages.
4206         * stabsread.c (patch_block_stabs, define_symbol)
4207         (read_type, read_enum_type, common_block_end)
4208         (cleanup_undefined_types_1, scan_file_globals): Use
4209         SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, ALL_OBJFILE_MSYMBOLS,
4210         and SYMBOL_PRINT_NAME.
4211         * stack.c (print_frame_args): Use SYMBOL_LINKAGE_NAME.
4212         (print_frame, frame_info): Use SYMBOL_PRINT_NAME for output.  Use
4213         cp_remove_params instead of cplus_demangle.
4214         (print_block_frame_labels, print_frame_arg_vars): Use
4215         SYMBOL_LINKAGE_NAME.
4216         * symmisc.c (dump_msymbols): Use ALL_OBJFILE_MSYMBOLS and
4217         SYMBOL_LINKAGE_NAME.
4218         (dump_symtab_1, print_symbol, print_partial_symbols)
4219         (maintenance_check_symtabs): Use SYMBOL_LINKAGE_NAME.
4220         * symtab.h (DEPRECATED_SYMBOL_NAME): Delete.
4221         (SYMBOL_SET_LINKAGE_NAME): New.
4222         (SYMBOL_SET_NAMES): Add a comment.
4223         * tracepoint.c (set_traceframe_context, validate_actionline)
4224         (collect_symbol, scope_info): Use SYMBOL_LINKAGE_NAME for
4225         lookups and SYMBOL_PRINT_NAME for output.
4226         * typeprint.c (typedef_print): Use SYMBOL_LINKAGE_NAME.
4227         * xcoffread.c (process_xcoff_symbol): Use SYMBOL_SET_LINKAGE_NAME.
4228
4229 2008-08-21  Pedro Alves  <pedro@codesourcery.com>
4230
4231         * arm-tdep.c (arm_pc_is_thumb): Use obj_section_addr.
4232         * hppa-hpux-tdep.c (hppa_hpux_find_dummy_bpaddr): Likewise.
4233         * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Use
4234         obj_section_addr and obj_section_endaddr.
4235         * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Likewise.
4236         * hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise.
4237         * ia64-tdep.c (ia64_find_global_pointer): Likewise.
4238         (find_extant_func_descr): Likewise.
4239         * solib-frv.c (frv_relocate_main_executable): Use
4240         obj_section_addr.
4241         * xstormy16-tdep.c (xstormy16_find_jmp_table_entry): Use
4242         obj_section_addr and obj_section_endaddr.
4243
4244 2008-08-21  Paul N. Hilfinger  <hilfinger@adacore.com>
4245
4246         * NEWS: Amplify last entry on boolean types in Ada.
4247
4248 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
4249
4250         * dwarf2read.c (die_specification, dwarf2_extension, follow_die_ref):
4251         Make the dwarf2_cu * parameter output as well as input.  Update it if
4252         we follow a reference to another CU.
4253         (read_func_scope, determine_class_name, namespace_name, dwarf2_attr)
4254         (die_type, die_containing_type): Update calls to changed functions.
4255         Use the returned CU along with the returned DIE.
4256         (read_namespace): Use dwarf2_attr instead of dwarf2_extension.
4257
4258 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
4259
4260         * dwarf2read.c (queue_comp_unit): Take an objfile argument.  Read
4261         in the DIEs here.
4262         (process_queue): Do not read in the DIEs here.
4263         (psymtab_to_symtab_1): Update call to queue_comp_unit.
4264         (read_full_die): Do not call queue_comp_unit from here.
4265         (maybe_queue_comp_unit): New function.
4266         (follow_die_ref): Use it.
4267
4268 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
4269
4270         * dwarf2read.c (struct attribute): Move earlier.
4271         (struct die_info): Change attrs to a trailing array.
4272         (dwarf_alloc_die): Take the number of attributes.  Allocate space
4273         for them.
4274         (read_full_die): Update call to dwarf_alloc_die.  Do not manually
4275         allocate attributes.
4276
4277 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
4278
4279         * dwarf2read.c (REF_HASH_SIZE): Delete.
4280         (struct dwarf2_cu): Replace die_ref_table with die_hash.
4281         (struct die_info): Remove next_ref.
4282         (store_in_ref_table): Remove offset argument.  Rewrite to use
4283         htab_find_slot_with_hash.
4284         (die_hash, die_eq): New.
4285         (read_comp_unit): Allocate the die_hash.
4286         (read_die_and_children): Update call to store_die_ref.
4287         (follow_die_ref): Rewrite to use htab_find_with_hash.
4288
4289 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
4290
4291         * dwarf2read.c (free_die_list, copy_die): Delete.
4292         (dwarf_alloc_die): Take a CU argument.  Allocate the new DIE
4293         on the obstack.
4294         (read_full_die): Update call to dwarf_alloc_die.  Allocate
4295         attributes on the CU obstack.
4296         (free_one_comp_unit): Do not call free_die_list.
4297
4298 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
4299
4300         * dwarf2read.c (read_die_and_children): Ignore NULL DIEs.
4301         (read_die_and_siblings): Likewise.  Do not add padding DIEs to the
4302         sibling list.
4303         (read_full_die): Do not allocate DIEs for abbrev 0.
4304         (follow_die_ref): Correct error message.
4305
4306 2008-08-20  Pedro Alves  <pedro@codesourcery.com>
4307
4308         * linespec.c (symtab_from_filename): Also throw NOT_FOUND_ERROR if
4309         there are no symbols loaded, instead of throwing a generic error.
4310         (decode_variable): Likewise.
4311
4312 2008-08-20  Pedro Alves  <pedro@codesourcery.com>
4313
4314         * objfiles.h (struct obj_section): Remove addr and endaddr fields.
4315         (obj_section_offset, obj_section_addr, obj_section_endaddr): New
4316         macros.
4317         * objfiles.c (add_to_objfile_sections): Don't set addr, endaddr
4318         and offset.  Use size_t instead of unsigned long.
4319         (build_objfile_section_table): Use size_t instead of unsigned
4320         long.
4321         (objfile_relocate): Don't relocate s->addr and s->endaddr, they're
4322         gone.
4323         (find_pc_sect_section): Use obj_section_addr and
4324         obj_section_endaddr.
4325         * symfile.c (symfile.c): Remove code that maps sections
4326         offsets in "addr" to the object's sections.
4327         * blockframe.c (find_pc_partial_function): Use obj_section_endaddr.
4328         * gcore.c (gcore_create_callback): Use obj_section_addr and
4329         obj_section_endaddr.
4330         * maint.c (print_objfile_section_info): Likewise.
4331         * printcmd.c (sym_info): Use obj_section_addr and
4332         obj_section_endaddr.
4333         * symtab.c (fixup_section): Likewise.
4334
4335 2008-08-20  Mark Kettenis  <kettenis@gnu.org>
4336
4337         * sparc-tdep.c: Make some comments catch up with reality.
4338
4339 2008-08-20  Vladimir Prus  <vladimir@codesourcery.com>
4340
4341         * NEWS: Mention 'set target-async'
4342
4343 2008-08-19  Vladimir Prus  <vladimir@codesourcery.com>
4344
4345         * infrun.c (resume): If the thread is placed to the deferred step
4346         queue, mark it as running.
4347
4348 2008-08-19  Vladimir Prus  <vladimir@codesourcery.com>
4349
4350         Make sure target supports non-stop.
4351         * infcmd.c (run_command_1, attach_command): If non-stop mode
4352         is requested, verify the target supports it.
4353         * linux-nat.c (linux_nat_supports_non_stop): New.
4354         (linux_nat_add_target): Register the above.
4355         * target.c (find_default_supports_non_stop)
4356         (target_supports_non_stop): New.
4357         (init_dummy_target): Register find_default_supports_non_stop.
4358         * target.h (struct target_ops): New field to_supports_non_stop.
4359         (target_supports_non_stop): New.
4360
4361 2008-08-19  Pedro Alves  <pedro@codesourcery.com>
4362             Vladimir Prus  <vladimir@codesourcery.com>
4363
4364         * target.c (target_async_permitted, target_async_permitted_1)
4365         (set_maintenance_target_async_permitted)
4366         (show_maintenance_target_async_permitted): New.
4367         (initialize_targets): Register 'set target-async'.
4368         * target.h (target_async_permitted): Declare.
4369         * linux-nat.c (linux_nat_async_enabled)
4370         (linux_nat_async_permitted, set_maintenance_linux_async_permitted)
4371         (show_maintenance_linux_async_permitted): Remove.
4372         (sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
4373         (get_pending_events, linux_nat_async): Use target_async_permitted.
4374         (linux_nat_set_async_mode): Remove, moving the only used bits
4375         into...
4376         (linux_nat_setup_async): This.
4377         (_initialize_linux_nat): Do not register 'maint set linux-async'.
4378         Use linux_nat_setup_async.
4379         * remote.c (remote_async_permitted, remote_async_permitted_set)
4380         (set_maintenance_remote_async_permitted)
4381         (show_maintenance_remote_async_permitted): Remove.
4382         (remote_open_1, remote_terminal_inferior, remote_can_async_p)
4383         (remote_is_async_p): Use target_async_permitted.
4384         (_initialize_remote): Don't register 'main set remote-async'.
4385         * mi/mi-cmds.c (mi_cmds): Register -list-target-features.
4386         * mi/mi-cmds.h (mi_cmd_list_target_features): New.
4387         * mi/mi-main.c (mi_cmd_list_target_features): New.
4388
4389 2008-08-19  Vladimir Prus  <vladimir@codesourcery.com>
4390
4391         * target.c (maybe_kill_then_attach)
4392         (maybe_kill_then_create_inferior): Remove.
4393         (update_current_target): Do not default to_attach,
4394         to_create_inferiour, to_is_async_p.
4395
4396 2008-08-19  Paul N. Hilfinger  <hilfinger@adacore.com>
4397         
4398         Changes for supporting boolean types in debugging data.
4399         * ada-lang.c (discrete_type_high_bound,discrete_type_low_bound): Change 
4400         API to return LONGEST values rather than struct values.
4401         (ada_evaluate_subexp): Change to use new API of discrete_type_low_bound
4402         and discrete_type_high_bound.
4403         (to_fixed_range_type): Create a range type in cases where 
4404         argument is base type and its limits are representable as ints.
4405         (ada_is_modular_type): Correct so that base type must be integral.
4406         * ada-lex.l (TRUEKEYWORD,FALSEKEYWORD): Make 'true' and 'false' 
4407         keywords when they appear alone, since we are phasing out 
4408         direct representation of these identifiers in debugging data.
4409         * ada-exp.y: Define 'true' and 'false' as primaries.
4410         (type_boolean): New function.
4411         (type_int,type_long,type_long_long,type_floattype_double)
4412         (type_long_double): Remove uses of current_gdbarch for consistency
4413         with type_boolean.
4414         (write_int): Change comment to indicate that it might write boolean 
4415         constant as well.
4416         * ada-typeprint.c (ada_print_type): Print '(false, true)' for boolean
4417         type, since will no longer be represented as enumerated type in 
4418         debugging data.
4419         * ada-valprint.c (print_optional_low_bound): Handle boolean case
4420         as well.
4421         * NEWS: Note support boolean types.
4422         
4423 2008-08-18  Pedro Alves  <pedro@codesourcery.com>
4424
4425         * bsd-uthread.c (bsd_uthread_close): New.
4426         (bsd_uthread_deactivate): Don't cleanup here, just unpush the
4427         target.
4428         (bsd_uthread_solib_loaded): Fix typo.
4429         (bsd_uthread_target): Register bsd_uthread_close.
4430
4431 2008-08-18  Pedro Alves  <pedro@codesourcery.com>
4432
4433         * corelow.c (core_open): Assume there was no upper layer left
4434         behind from a previous inferior.
4435         * target.c (pop_all_targets): Rename to ...
4436         (pop_all_targets_above): ... this.  Add a target stratum
4437         parameter.  Use it instead of hardcoding the dummy_stratum.
4438         (pop_all_targets): New, defer to pop_all_targets_above.
4439         (target_preopen): Use pop_all_targets_above.
4440         * target.h (pop_all_targets_above): Declare.
4441
4442 2008-08-18  Pedro Alves  <pedro@codesourcery.com>
4443
4444         * gdbthread.h (thread_change_ptid): Declare.
4445         * infrun.c (infrun_thread_ptid_changed): New.
4446         (_initialize_infrun): Attach infrun_thread_ptid_changed to the
4447         thread_ptid_changed observer.
4448         * regcache.c (regcache_thread_ptid_changed): New.
4449         (_initialize_regcache): Attach regcache_thread_ptid_changed to the
4450         thread_ptid_changed observer.
4451         * thread.c (thread_change_ptid): New.
4452
4453 2008-08-18  Tom Tromey  <tromey@redhat.com>
4454
4455         * symfile.c (reread_symbols): Update.
4456         * solib-sunos.c (allocate_rt_common_objfile): Update.
4457         * objfiles.c (allocate_objfile): Update.
4458         * objfiles.h (struct objfile) <md, mmfd, deprecated_obj_private>:
4459         Remove.
4460
4461 2008-08-18  Tom Tromey  <tromey@redhat.com>
4462
4463         * gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's
4464         obstack.
4465
4466 2008-08-18  Daniel Jacobowitz  <dan@codesourcery.com>
4467
4468         * rs6000-tdep.c (struct rs6000_framedata): Add gpr_mask, used_bl,
4469         lr_register.
4470         (rs6000_in_function_epilogue_p): Check for bctr.
4471         (skip_prologue): Initialize lr_register.  Set lr_reg to a register
4472         number.  Set gpr_mask and used_bl.  Continue scanning while some
4473         expected registers are not saved.  Set lr_register if LR is not
4474         stored.
4475         (rs6000_frame_cache): Handle gpr_mask and lr_register.
4476
4477 2008-08-17  Tom Tromey  <tromey@redhat.com>
4478
4479         PR gdb/1535:
4480         * breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): New macros.
4481         (ep_find_event_name_end): Remove.
4482         (catch_fork_temporary, catch_vfork_temporary,
4483         catch_fork_permanent, catch_vfork_permanent): New constants.
4484         (catch_vfork, catch_fork): Remove.
4485         (catch_fork_command_1): Add 'command' argument.  Remove
4486         'fork_kind' and 'tempflag'.  Handle NULL 'arg'.  Update switch for
4487         all cases.
4488         (catch_exec_command_1): Add 'command' argument; remove
4489         'tempflag'.  Handle NULL 'arg'.
4490         (catch_load_command_1): Likewise.
4491         (catch_unload_command_1): Likewise.
4492         (catch_ada_exception_command): Likewise.
4493         (catch_assert_command): Likewise.
4494         (catch_catch_command): New function.
4495         (catch_throw_command): Likewise.
4496         (catch_command_1): Remove.
4497         (catch_command): Just call error.
4498         (tcatch_command): Likewise.
4499         (catch_cmdlist): New global.
4500         (tcatch_cmdlist): Likewise.
4501         (add_catch_command): New function.
4502         (_initialize_breakpoint): Create "catch" and "tcatch" as prefix
4503         commands.  Create all catch sub-commands.
4504
4505 2008-08-17  Pedro Alves  <pedro@codesourcery.com>
4506
4507         * gdbthread.h: Add comments.
4508         * stack.c (get_selected_block): Return 0 on an exited thread.
4509         * top.c (execute_command): Check for is_stopped, not !is_running.
4510         * event-top.c (command_handler): Likewise.
4511
4512 2008-08-16  Pedro Alves  <pedro@codesourcery.com>
4513
4514         * mi/mi-main.c (mi_cmd_exec_next, mi_cmd_exec_next_instruction)
4515         (mi_cmd_exec_step, mi_cmd_exec_step_instruction)
4516         (mi_cmd_exec_finish): Remove "return".
4517
4518 2008-08-16  Pedro Alves  <pedro@codesourcery.com>
4519
4520         * target.h (pop_all_targets): Declare.
4521         * target.c (pop_all_targets): New.
4522         * top.c (quit_target): Pop all targets instead of just closing the
4523         current.
4524
4525 2008-08-16  Vladimir Prus  <vladimir@codesourcery.com>
4526             Thiago Jung Bauermann  <bauerman@br.ibm.com>
4527
4528         * cli-script.c (read_next_line): Add parse_commands argument.
4529         (recurse_read_control_structure): Adapt to new read_next_line
4530         signature.
4531         (read_command_lines): Add parse_commands argument.
4532         (define_command): Adapt to new read_command_lines signature.
4533         (document_command): Likewise.
4534         * breakpoint.c (commands_command): Likewise.
4535         * defs.h (read_command_lines): Adjust function prototype.
4536
4537 2008-08-16  Paul N. Hilfinger  <hilfinger@adacore.com>
4538
4539         * ada-lang.c (pos_atr): Account for the possibility that the 
4540         argument may be a reference.
4541
4542 2008-08-16  Paul N. Hilfinger  <hilfingr@adacore.com>
4543
4544         * xcoffread.c (scan_xcoff_symtab): Do not include global symbols
4545         ('F' format) for @FIX names generated by the loader, retaining only
4546         the minimal symbols (and no partial symbol tables) for these names.
4547         Fixes warning messages about symbols that are found in partial 
4548         symbol tables, but not full symbol tables.
4549
4550 2008-08-16  Pedro Alves  <pedro@codesourcery.com>
4551
4552         * infrun.c (fetch_inferior_event): Only call normal_stop if not
4553         stopping quietly.
4554
4555 2008-08-15  Luis Machado  <luisgpm@br.ibm.com>
4556
4557         * rs6000-tdep: Include "features/rs6000/powerpc-vsx32.c".
4558         Include "features/rs6000/powerpc-vsx64.c".
4559         (ppc_supply_vsxregset): New function.
4560         (ppc_collect_vsxregset): New function.
4561         (IS_VSX_PSEUDOREG): New macro.
4562         (IS_EFP_PSEUDOREG): New macro.
4563         (vsx_register_p): New function.
4564         (ppc_vsx_support_p): New function.
4565         (rs6000_builtin_type_vec128): New function.
4566         (rs6000_register_name): Hide upper halves of vs0~vs31.  Return
4567         correct names for VSX registers and EFPR registers.
4568         (rs6000_pseudo_register_type): Return correct types for VSX
4569         and EFPR registers.
4570         (rs6000_pseudo_register_reggroup_p): Return correct group for
4571         VSX and EFPR registers.
4572         (ppc_pseudo_register_read): Rename to dfp_pseudo_register_read.
4573         (ppc_pseudo_register_write): Rename to dfp_pseudo_register_write.
4574         (vsx_pseudo_register_read): New function.
4575         (vsx_pseudo_register_write): New function.
4576         (efpr_pseudo_register_read): New function.
4577         (efpr_pseudo_register_write): New function.
4578         (rs6000_pseudo_register_read): Call new VSX and EFPR read functions.
4579         (rs6000_pseudo_register_write): Call new VSX and EFPR write functions.
4580         (rs6000_gdbarch_init): Declare have_vsx.
4581         Initialize new upper half VSX registers.
4582         Initialize VSX-related and EFPR-related pseudo-registers variables.
4583         Adjust the number of pseudo registers accordingly.
4584
4585         * ppc-linux-nat.c: Define PTRACE_GETVSXREGS, PTRACE_SETVSXREGS
4586         and SIZEOF_VSRREGS.
4587         (gdb_vsxregset_t): New type.
4588         (have_ptrace_getsetvsxregs): New variable.
4589         (fetch_vsx_register): New function.
4590         (fetch_register): Handle VSX registers.
4591         (fetch_vsx_registers): New function.
4592         (fetch_ppc_registers): Handle VSX registers.
4593         (store_ppc_registers): Handle VSX registers.
4594         (store_vsx_register): New function.
4595         (store_register): Handle VSX registers.
4596         (store_vsx_registers): New function.
4597         (ppc_linux_read_description): Handle VSX-enabled inferiors.
4598         (gdb_vsxregset_t): New type.
4599         (supply_vsxregset): New function.
4600         (fill_vsxregset): New function.
4601
4602         * ppc-tdep.h (vsx_register_p): New prototype.
4603         (vsx_support_p): New prototype.
4604         (ppc_vsr0_regnum): New variable.
4605         (ppc_vsr0_upper_regnum): Likewise.
4606         (ppc_efpr0_regnum): Likewise.
4607         (ppc_builtin_type_vec128): New type.
4608         (ppc_num_vsrs): New constant.
4609         (ppc_num_vshrs): New constant.
4610         (ppc_num_efprs): Likewise.
4611         Define POWERPC_VEC_VSX PPC_VSR0_UPPER_REGNUM and PPC_VSR31_UPPER_REGNUM.
4612         (ppc_supply_vsxregset): New prototype.
4613         (ppc_collect_vsxregset): New prototype.
4614
4615         * ppc-linux-tdep.c: Include "features/rs6000/powerpc-vsx32l.c"
4616         Include "features/rs6000/powerpc-vsx64l.c".
4617         (_initialize_ppc_linux_tdep): Initialize VSX-enabled targets.
4618         (ppc_linux_regset_sections): Add new ".reg-ppc-vsx" field.
4619         (ppc32_linux_vsxregset): New 32-bit VSX-enabled regset.
4620         (ppc_linux_regset_from_core_section): Handle VSX core section.
4621         (ppc_linux_core_read_description): Support VSX-enabled core files.
4622
4623         * ppc-linux-tdep.h: Declare *tdesc_powerpc_vsx32l
4624         Declare tdesc_powerpc_vsx64l
4625
4626         * corelow.c (get_core_register_section): Support VSX-enabled
4627         core files.
4628
4629         * features/rs6000/power-vsx.xml: New VSX descriptions.
4630         * features/rs6000/powerpc-vsx32.xml: New file.
4631         * features/rs6000/powerpc-vsx32l.xml: New file.
4632         * features/rs6000/powerpc-vsx64.xml: New file.
4633         * features/rs6000/powerpc-vsx64l.xml: New file.
4634         * features/rs6000/powerpc-vsx32.c: New file (generated).
4635         * features/rs6000/powerpc-vsx32l.c: New file (generated).
4636         * features/rs6000/powerpc-vsx64.c: New file (generated).
4637         * features/rs6000/powerpc-vsx64l.c: New file (generated).
4638         * features/Makefile: Updated with new descriptions.
4639         * regformats/rs6000/powerpc-vsx32l.dat: New file (generated).
4640         * regformats/rs6000/powerpc-vsx64l.dat: New file (generated).
4641
4642 2008-08-15  Vladimir Prus  <vladimir@codesourcery.com>
4643
4644         * ia64-linux.nat (_initialize_ia64_linux_nat): Don't
4645         call linux_target twice.
4646
4647 2008-08-14  Aleksandar Ristovski  <aristovski@qnx.com>
4648
4649         * nto-tdep.c (lm_info): Updated struct lm_info definition from
4650         solib-svr4.c
4651         (LM_ADDR): Use l_addr if available; if not, use link map and set 
4652         l_addr.
4653
4654 2008-08-14  Tom Tromey  <tromey@redhat.com>
4655
4656         * macrocmd.c (macro_define_command): Check for NULL argument.
4657         (macro_undef_command): Likewise.
4658
4659 2008-08-14  Pedro Alves  <pedro@codesourcery.com>
4660
4661         * infcmd.c (continue_1): Add an ERROR_NO_INFERIOR call.
4662
4663 2008-08-13  Pedro Alves  <pedro@codesourcery.com>
4664
4665         * breakpoint.c (always_inserted_auto, always_inserted_on)
4666         (always_inserted_off, always_inserted_enums): New.
4667         (always_inserted_mode): Change type to char* and point to
4668         always_inserted_auto.
4669         (show_always_inserted_mode): In auto mode, also show the current
4670         effect of the option.
4671         (breakpoints_always_inserted_mode): Adjust for the new auto mode.
4672         (_initialize_breakpoint): Make the "set breakpoints
4673         always-inserted" command an enum command.  Extend help to describe
4674         the auto mode.
4675
4676 2008-08-13  Ulrich Weigand  <uweigand@de.ibm.com>
4677
4678         * spu-tdep.c (info_spu_dma_command): Respect TSQV (tag status
4679         query valid) bit.  Ignore bits outside the condition field.
4680         (info_spu_proxydma_command): Ignore bits outside the field.
4681
4682 2008-08-12  Michael Snyder  <msnyder@vmware.com>
4683
4684         * MAINTAINERS: Update my email address.
4685
4686 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
4687
4688         * ppc-linux-nat.c (ppc_linux_get_hwcap): Really get AT_HWCAP.
4689
4690 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
4691
4692         Add no-ack mode to the remote protocol --- optionally stop ACKing
4693         packets and responses when we have a reliable communication
4694         medium.
4695
4696         Based on Apple's GDB, by Jason Molenda <jmolenda@apple.com>
4697
4698         * remote.c (struct remote_state): Add noack_mode field.
4699         (PACKET_QStartNoAckMode): New.
4700         (remote_start_remote): Don't any outstanding packet here.
4701         (remote_open_1): Clear noack_mode.  Ack any outstanding packet
4702         here.  Activate noack mode if requested.
4703         (remote_protocol_features): Add QStartNoAckMode.
4704         (remote_open_1):
4705         (putpkt_binary): Don't send ack in noack mode.
4706         (read_frame): Don't recompute the checksum in noack mode.
4707         (getpkt_sane): Skip sending ack if in noack mode.
4708         (_initialize_remote): Add set/show remote noack mode.
4709         * NEWS:  Note the new features.
4710
4711 2008-08-11  Kevin Buettner  <kevinb@redhat.com>
4712
4713         * rs6000-tdep.c (BL_MASK, BL_INSTRUCTION, BL_DISPLACEMENT_MASK):
4714         New macros.
4715         (rs6000_skip_main_prologue): New function.
4716         (rs6000_gdb_arch_init): Register rs6000_skip_main_prologue.
4717
4718 2008-08-11  Sandra Loosemore  <sandra@codesourcery.com>
4719
4720         * MAINTAINERS (Write After Approval):  Add self.
4721
4722 2008-08-11  Stan Shebs  <stan@codesourcery.com>
4723
4724         ARM BE8 support.
4725         * disasm.c (gdb_disassemble_info): Set endian_code.
4726         * gdbarch.sh (gdbarch_info): New field byte_order_for_code.
4727         * gdbarch.h, gdbarch.c: Regenerate.
4728         * arch-utils.c (initialize_current_architecture): Set the
4729         default byte_order_for_code.
4730         (gdbarch_info_init): Ditto.
4731         (gdbarch_info_fill): Ditto.
4732         * arm-tdep.c (SWAP_INT, SWAP_SHORT): New macros.
4733         (thumb_analyze_prologue): Swap halfword if code endianness is
4734         different from general endianness.
4735         (arm_skip_prologue): Similarly.
4736         (arm_scan_prologue): Ditto.
4737         (thumb_get_next_pc): Ditto.
4738         (arm_get_next_pc): Ditto.
4739         (arm_gdbarch_init): Set byte_order_for_code from BE8 flag,
4740         choose correct endianness for breakpoints.
4741
4742 2008-08-10  Pedro Alves  <pedro@codesourcery.com>
4743
4744         * bsd-kvm.c: Include "gdbthread.h".
4745         (bsd_kvm_ptid): New.
4746         (bsd_kvm_open): Add a main thread.
4747         (bsd_kvm_close): Delete it.
4748         (bsd_kvm_thread_alive): New.
4749         (bsd_kvm_pid_to_str): New.
4750         (bsd_kvm_add_target): Register bsd_kvm_thread_alive and
4751         bsd_kvm_pid_to_str.
4752         (bsd_kvm_add_target): Initialize bsd_kvm_ptid.
4753
4754 2008-08-09  Pedro Alves  <pedro@codesourcery.com>
4755
4756         * buildsym.c (start_subfile): Properly cast sentinel in concat
4757         call.
4758         * cp-name-parser.y: Include "config.h".
4759         * xml-tdesc.c (fetch_xml_from_file): Properly cast sentinel in
4760         concat call.
4761         * gdb_select.h: Include sys/time.h if sys/select.h is not
4762         available.
4763
4764 2008-08-09  Pedro Alves  <pedro@codesourcery.com>
4765
4766         * go32-nat.c: Include "gdbthread.h".
4767         (go32_stop, go32_kill_inferior): Delete the main thread.
4768         (go32_create_inferior): Add it.
4769         (go32_thread_alive, go32_pid_to_str): New.
4770         (init_go32_ops): Register go32_thread_alive and go32_pid_to_str.
4771
4772 2008-08-09  Pedro Alves  <pedro@codesourcery.com>
4773
4774         * go32-nat.c (fetch_register, store_register): Pass the regcache
4775         gdbarch to i386_fp_regnum_p and i386_fpc_regnum_p.
4776         (go32_xfer_memory): Change type of myaddr parameter to gdb_byte.
4777         (struct seg_descr, struct seg_descr): pack the whole struct
4778         instead of each member individually.
4779
4780 2008-08-09  Andreas Schwab  <schwab@suse.de>
4781
4782         * python/python.c (_initialize_python): Use unabbreviated commands
4783         in prefix name.
4784
4785 2008-08-09  Daniel Jacobowitz  <dan@codesourcery.com>
4786
4787         * Makefile.in (stamp-h): Also create .deps.
4788
4789 2008-08-09  Tom Tromey  <tromey@redhat.com>
4790
4791         * Makefile.in (generated_files): Add GNULIB_H.
4792
4793 2008-08-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4794
4795         * solib-pa64.c (pa64_solib_create_inferior_hook): Don't set
4796         DT_HP_DEBUG_PRIVATE.  Add warning if DT_HP_DEBUG_PRIVATE is not set.
4797         Revise comment.
4798         (pa64_current_sos): Remove map private warning warning.
4799         * solib-som.c: Include string.h and sys/utsname.h.
4800         (get_hpux_major_release): New function.
4801         (som_solib_create_inferior_hook): Read dynamic linker header.  Warn
4802         about shared library private mapping on HP-UX 11 and later.  Only force
4803         private mapping of shared libraries on HP-UX 10 and earlier.
4804         (link_map_start): Delete warning.
4805
4806 2008-08-09  Xuepeng Guo  <xuepeng.guo@intel.com>
4807             H.J. Lu  <hongjiu.lu@intel.com>
4808             Mark Kettenis <kettenis@gnu.org>
4809
4810         * amd64-tdep.c (amd64_frame_cache): Add saved_sp_reg.
4811         (amd64_init_frame_cache): Initialize saved_sp_reg.
4812         (amd64_analyze_stack_align): New.
4813         (amd64_analyze_prologue): Call it.
4814         (amd64_frame_cache): Use saved_sp_reg if it is invalid.  Don't set
4815         %rip to 8 when halfway aligning the stack.
4816
4817         * amd64-tdep.h (amd64_regnum): Add AMD64_R9_REGNUM to
4818         AMD64_R14_REGNUM.
4819
4820         * i386-tdep.c (i386_frame_cache): Remove stack_align.  Add
4821         saved_sp_reg.
4822         (i386_alloc_frame_cache): Remove stack_align.  Initialize
4823         saved_sp_reg to -1.
4824         (i386_analyze_stack_align): Rewrite.
4825         (i386_frame_cache): Use saved_sp_reg if it is valid.
4826
4827 2008-08-09  Ulrich Weigand  <uweigand@de.ibm.com>
4828
4829         * target.c: Include "solib.h".
4830         (target_pre_inferior): Call no_shared_libraries.
4831         * infcmd.c (run_command_1): Do not call objfile_purge_solibs
4832         or clear_solib.
4833         (attach_command): Do not call clear_solib.
4834
4835 2008-08-09  Mark Kettenis  <kettenis@gnu.org>
4836
4837         * i386obsd-nat.c (i386obsd_supply_pcb): Supply the right bytes for
4838         the %eip register.
4839
4840 2008-08-08  Tom Tromey  <tromey@redhat.com>
4841
4842         * Makefile.in (python.o): Remove dependencies.  Use COMPILE and
4843         POSTCOMPILE.
4844         (python-utils.o): Likewise.
4845
4846 2008-08-08  Andreas Schwab  <schwab@suse.de>
4847
4848         * corefile.c (_initialize_core): Remove spurious paren from set
4849         gnutarget doc string.
4850
4851 2008-08-08  Luis Machado  <luisgpm@br.ibm.com>
4852
4853         * ppc-linux-nat.c: Include "auxv.h" and "elf/common.h".
4854         Define PPC_FEATURE_BOOKE.
4855         (ppc_linux_get_hwcap): New function.
4856         (ppc_linux_region_ok_for_hw_watchpoint): Handle PowerPC 440
4857         4-bytes alignment restrictions.
4858         (ppc_linux_insert_watchpoint): Handle PowerPC 440-specific
4859         positioning of the read/write flags.
4860         (ppc_linux_watchpoint_addr_within_range): Handle PowerPC 440
4861         4-bytes alignment.
4862
4863 2008-08-08  Pedro Alves  <pedro@codesourcery.com>
4864
4865         Use ptid_t.tid to store thread ids instead of ptid_t.pid.
4866
4867         * win32-nat.c (win32_add_thread): Change thread argument type to
4868         ptid_t.  Adjust.
4869         (win32_add_thread): Adjust.
4870         (win32_delete_thread): Change thread argument type to ptid_t.
4871         Adjust.
4872         (win32_fetch_inferior_registers, win32_store_inferior_registers)
4873         (win32_resume, get_win32_debug_event, get_win32_debug_event)
4874         (win32_wait, win32_pid_to_exec_file, win32_pid_to_str): Adjust.
4875         (init_win32_ops): Put to_magic last.
4876         (win32_win32_thread_alive): Adjust.
4877
4878 2008-08-08  Pedro Alves  <pedro@codesourcery.com>
4879
4880         * remote-m32r-sdi.c (m32r_thread_alive, m32r_pid_to_str): New.
4881         (init_m32r_ops): Register m32r_thread_alive and m32r_pid_to_str.
4882
4883 2008-08-08  Pedro Alves  <pedro@codesourcery.com>
4884
4885         * remote-m32r-sdi.c: Include "gdbthread.h".
4886         (remote_m32r_ptid): New.
4887         (m32r_close): Delete the main thread.
4888         (m32r_resume): Set inferior_ptid toA remote_m32r_ptid. Add the
4889         main thread.
4890         (m32r_kill, m32r_load, sdireset_command): Delete the main thread.
4891         (_initialize_remote_m32r): Initialize remote_m32r_ptid.
4892
4893 2008-08-07  Tom Tromey  <tromey@redhat.com>
4894             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4895
4896         * aclocal.m4, configure: Rebuild.
4897         * configure.in: Call ZW_CREATE_DEPDIR,
4898         ZW_PROG_COMPILER_DEPENDENCIES, AC_PROG_MAKE_SET.
4899         (MAKE, GMAKE): New substs.
4900         * acinclude.m4: Include depstand.m4.
4901         * Makefile.in (DEPMODE, DEPDIR, COMPILE.post, COMPILE.pre,
4902         COMPILE, POSTCOMPILE, depcomp): New variables.
4903         Remove all _h variables.
4904         Remove many .o targets.
4905         ($(srcdir)/copying.c): avoid backslash-newline after comment
4906         sign (@maintainer_mode_true@).
4907         (HFILES_NO_SRCDIR): Regenerate.
4908         (generated_files): New variable.
4909         (all_gdbtk_cflags): Likewise.
4910         (.c.o): Rewrote.
4911         (init.o, version.o, copying.o): Remove.
4912         (distclean): Remove DEPDIR.
4913         (test-cp-name-parser.o, hpux-thread.o, main.o, monitor.o,
4914         printcmd.o, procfs.o, v850ice.o): Rewrite.
4915         (cli-cmds.o, cli-decode.o, cli-dump.o, cli-interp.o, cli-logging.o,
4916         cli-script.o, cli-setshow.o, cli-utils.o): Likewise.
4917         (gdbtk.o, gdbtk-bp.o, gdbtk-cmds.o, gdbtk-hooks.o, gdbtk-interp.o,
4918         gdbtk-main.o, gdbtk-register.o, gdbtk-stack.o, gdbtk-varobj.o,
4919         gdbtk-wrapper.o): Likewise.
4920         (mi-cmd-break.o, mi-cmd-disas.o, mi-cmd-env.o, mi-cmd-file.o,
4921         mi-cmds.o, mi-cmd-stack.o, mi-cmd-target.o, mi-cmd-var.o,
4922         mi-console.o, mi-getopt.o, mi-interp.o, mi-main.o, mi-out.o,
4923         mi-parse.o, mi-symbol-cmds.o, mi-common.o, signals.o, tui.o,
4924         tui-command.o, tui-data.o, tui-disasm.o, tui-file.o, tui-hooks.o,
4925         tui-interp.o, tui-io.o, tui-layout.o, tui-main.o, tui-out.o,
4926         tui-regs.o, tui-source.o, tui-stack.o, tui-win.o, tui-windata.o,
4927         tui-wingeneral.o, tui-winsource.o): Likewise.
4928         (all_object_files): New variable.
4929         ($(all_object_files)): New target.
4930         Include dependency files, when using GNU Make.
4931
4932 2008-08-07  Ulrich Weigand  <uweigand@de.ibm.com>
4933
4934         * spu-tdep.c (info_spu_dma_cmdlist): Only show entries with
4935         the valid bit set.  Ensure display order respects partial
4936         order defined by dependency bits.
4937
4938 2008-08-06  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4939
4940         * solib-pa64.c (read_dld_descriptor): Return zero if load map is not
4941         setup.
4942
4943 2008-08-06  Mark Kettenis  <kettenis@gnu.org>
4944
4945         * i386obsd-nat.c (i386obsd_supply_pcb): Adjust for changes in
4946         OpenBSD 4.3.
4947
4948 2008-08-06  Vladimir Prus  <vladimir@codesourcery.com>
4949             Tom Tromey  <tromey@redhat.com>
4950             Thiago Jung Bauermann  <bauerman@br.ibm.com>
4951             Doug Evans  <dje@google.com>
4952
4953         * Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
4954         SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
4955         PYTHON_CFLAGS): New.
4956         (python_h, python_internal_h): New.
4957         (cli-script.o): Depend on python.h
4958         (python.o, python-utils.o): New.
4959         * cli/cli-script.c (print_command_lines): Handle python_control.
4960         (execute_control_command): Handle python_control.
4961         (execute_control_command_untraced): New function.
4962         (while_command): Call execute_control_command_untraced.
4963         (if_command): Likewise.
4964         (get_command_line): Remove static attribute.
4965         (read_next_line): Handle "python".
4966         (recurse_read_control_structure): Handle python_control.
4967         (read_command_lines): Handle python_control.
4968         Include python.h.
4969         * cli/cli-script.h (get_command_line): Add prototype.
4970         (execute_control_command_untraced): Likewise.
4971         * configure.ac: Add --with-python.
4972         * defs.h (enum command_control_type) <python_control>: New
4973         constant.
4974         * python/python-internal.h: New file.
4975         * python/python.c: New file.
4976         * python/python.h: New file.
4977         * python/python-utils.c: New file.
4978         * NEWS: Mention Python scripting support and its new commands.
4979
4980 2008-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
4981
4982         * spu-tdep.c (spu_gdbarch_init): Call set_gdbarch_frame_red_zone_size.
4983
4984 2008-08-06  Phil Muldoon  <pmuldoon@redhat.com>
4985
4986         * MAINTAINERS (Write After Approval): Add self.
4987
4988 2008-08-06  Phil Muldoon  <pmuldoon@redhat.com>
4989
4990         * breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled.
4991         (insert_breakpoint_locations): Likewise.
4992
4993 2008-08-05  Phil Muldoon  <pmuldoon@redhat.com>
4994
4995         * breakpoint.c (create_longjmp_breakpoint): Remove unused struct
4996         breakpoint.
4997         (set_longjmp_breakpoint): Likewise.
4998
4999 2008-08-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
5000
5001         PR build/2490
5002         * solib-pa64.c: Only compile if both HAVE_ELF_HP_H and __LP64__ are
5003         defined.
5004
5005 2008-08-05  Tom Tromey  <tromey@redhat.com>
5006
5007         * bcache.c (deprecated_bcache_added): Initialize obstack.
5008         (bcache_xmalloc): Don't initialize obstack.
5009         (bcache_xfree): Conditionally free obstack.
5010         (bcache_memory_used): Update.
5011
5012 2008-08-05  Tom Tromey  <tromey@redhat.com>
5013
5014         * symfile.c (add_psymbol_to_bcache): Return a const pointer.  Use
5015         bcache_full.
5016         (append_psymbol_to_list): Accept a const pointer.
5017         (add_psymbol_to_list): Fix const correctness.
5018         * bcache.h: (deprecated_bcache_added, deprecated_bcache): Remove.
5019         (bcache_full): Declare.
5020         * bcache.c (bcache_data, deprecated_bcache): Remove.
5021         (bcache): Use bcache_full.
5022         (bcache_full): Rename from deprecated_bcache_added.  Change return
5023         type.
5024
5025 2008-08-04  Stan Shebs  <stan@codesourcery.com>
5026
5027         * solib-svr4.c (BKPT_AT_SYMBOL): Remove, always defined.
5028         (bkpt_names): Remove SOLIB_BKPT_NAME, never defined.
5029         (enable_break): Remove test of BKPT_AT_SYMBOL.
5030
5031 2008-08-02  Keith Seitz  <keiths@redhat.com>
5032
5033         * acinclude.m4: Include ../config/tcl.m4 to pick up
5034         standard Tcl configury bits.
5035         Remove all Tcl, Tk, Itcl, Itk, etc definitions.
5036         * configure.ac: Don't check if ../itcl exists when building
5037         gdbtk. It could be installed.
5038         Rewrite gdbtk configury to allow for using system-supplied
5039         Tcl and Tk. Gdbtk no longer requires build-time access to
5040         itcl and itk.
5041         * Makefile.in: Remove everything related to itcl and itk.
5042         Rewrite the Tcl bits for gdbtk to correspond to rewrite of
5043         configure.ac.
5044         Remove v850ice.o build rule.
5045         (ALL_TCL_CFLAGS): New convenience defintion. Change all
5046         gdbtk sources to use it.
5047         * configure: Regenerate.
5048
5049 2008-07-31  Stan Shebs  <stan@codesourcery.com>
5050
5051         * coffread.c (coff_symtab_read): Remove FUNCTION_EPILOGUE_SIZE.
5052
5053 2008-07-30  Stan Shebs  <stan@codesourcery.com>
5054
5055         * objfiles.c (TARGET_KEEP_SECTION): Remove.
5056         (add_to_objfile_sections): Remove use.
5057
5058 2008-07-29  Tom Tromey  <tromey@redhat.com>
5059
5060         * cli/cli-decode.c (lookup_cmd_1): Use memcpy.
5061         (lookup_cmd_composition): Likewise.
5062
5063 2008-07-29  Tom Tromey  <tromey@redhat.com>
5064
5065         * cli/cli-cmds.c (edit_command): Remove unused variables.  Delete
5066         dead code.  Fix indentation.
5067
5068 2008-07-29  Stan Shebs  <stan@codesourcery.com>
5069
5070         * main.c (captured_main): Remove long-unused #if 0 blocks.
5071
5072 2008-07-28  Tom Tromey  <tromey@redhat.com>
5073
5074         * annotate.h (deprecated_annotate_starting_hook): Remove.
5075         (deprecated_annotate_stopped_hook): Remove.
5076         (deprecated_annotate_exited_hook): Remove.
5077         * Makefile.in (annotate.o): Depend on observer_h.
5078         * top.c (deprecated_delete_breakpoint_hook): Remove.
5079         (deprecated_create_breakpoint_hook): Likewise.
5080         (deprecated_modify_breakpoint_hook): Likewise.
5081         * interps.c (clear_interpreter_hooks): Update for removed hooks.
5082         * breakpoint.c (mention): Don't call removed hook.
5083         (delete_breakpoint): Likewise.
5084         (disable_breakpoint): Likewise.
5085         (do_enable_breakpoint): Likewise.
5086         * annotate.c: Include observer.h.
5087         (breakpoint_changed): Change type of argument.
5088         (_initialize_annotate): Register observers.
5089         (deprecated_annotate_starting_hook): Remove.
5090         (deprecated_annotate_stopped_hook): Remove.
5091         (deprecated_annotate_exited_hook): Remove.
5092         (annotate_starting): Update for hook removal.
5093         (annotate_stopped): Likewise.
5094         (annotate_exited): Likewise.
5095         * defs.h (deprecated_delete_breakpoint_hook): Remove.
5096         (deprecated_create_breakpoint_hook): Likewise.
5097         (deprecated_modify_breakpoint_hook): Likewise.
5098
5099 2008-07-28  Tom Tromey  <tromey@redhat.com>
5100
5101         * main.c (captured_main): Don't use BEFORE_MAIN_LOOP_HOOK.
5102
5103 2008-07-27  Daniel Jacobowitz  <dan@codesourcery.com>
5104
5105         * configure.ac: Check for the GNU/Linux ptrace signature.
5106         * configure: Regenerated.
5107
5108 2008-07-27  Daniel Jacobowitz  <dan@codesourcery.com>
5109
5110         * linux-nat.c (resume_callback): Add more debugging output.
5111         (linux_nat_has_pending_sigint): New function, based on
5112         linux_nat_has_pending.
5113         (set_ignore_sigint, maybe_clear_ignore_sigint): New functions.
5114         (stop_wait_callback): Remove flush_mask handling.  Honor
5115         ignore_sigint.  Call maybe_clear_ignore_sigint.  Pass NULL
5116         to recursive calls.
5117         (linux_nat_has_pending, flush_callback): Remove.
5118         (linux_nat_filter_event): Check for ignore_sigint.
5119         (linux_nat_wait): Remove flush_mask support and call to
5120         flush_callback.  Use set_ignore_sigint and maybe_clear_ignore_sigint.
5121         * linux-nat.h (struct lwp_info): Add ignore_sigint field.
5122
5123 2008-07-27  Daniel Jacobowitz  <dan@codesourcery.com>
5124
5125         * linux-nat.c (count_events_callback, select_event_lwp_callback): Only
5126         report events from resumed threads.
5127
5128 2008-07-27  Daniel Jacobowitz  <dan@codesourcery.com>
5129
5130         * mips-linux-tdep.c (mips_linux_syscall_next_pc): New function.
5131         (mips_linux_init_abi): Set tdep->syscall_next_pc.
5132         * mips-tdep.c (enum mips_fpu_type, struct gdbarch_tdep): Move to
5133         mips-tdep.h.
5134         (mips32_next_pc): Handle the syscall instruction.
5135         * mips-tdep.h (enum mips_fpu_type, struct gdbarch_tdep): New,
5136         from mips-tdep.c.  Add syscall_next_pc to gdbarch_tdep.
5137
5138 2008-07-26  Tom Tromey  <tromey@redhat.com>
5139
5140         PR gdb/1158:
5141         * valops.c (value_struct_elt): Treat function-valued field as a
5142         static method.
5143
5144 2008-07-26  Tom Tromey  <tromey@redhat.com>
5145
5146         PR gdb/1136:
5147         * macroexp.c (get_punctuator) <punctuators>: Rearrange to put
5148         longer tokens first.
5149
5150 2008-07-26  Vladimir Prus  <vladimir@codesourcery.com>
5151
5152         Kill cmd_async_ok.
5153         * cli/cli-decode.h (CMD_ASYNC_OK, set_cmd_async_ok)
5154         (get_cmd_async_ok): Remove.
5155         * cli/cli-decode.c (set_cmd_async_ok, get_cmd_async_ok): Remove.
5156         * cli/cli-cmds.c (init_cli_cmds): Don't use set_cmd_async_ok.
5157         * infcmd.c (_initialize_infcmd): Likewise.
5158         * thread.c (_initialize_thread): Likewise.
5159
5160 2008-07-25  Joseph Myers  <joseph@codesourcery.com>
5161
5162         * mips-tdep.c (mips_n32n64_push_dummy_call): Handle passing
5163         128-bit long doubles in even-odd pairs of FPRs.  Do not
5164         right-align float arguments for big-endian.
5165         (mips_n32n64_return_value): Apply return value convention for
5166         structs containing one or two floating-point values to soft-float
5167         as well as hard-float.  Handle 128-bit long doubles in such
5168         structs.
5169         (mips_o32_push_dummy_call): Only skip one integer register for a
5170         float argument passed in an FPR.
5171
5172 2008-07-25  Tom Tromey  <tromey@redhat.com>
5173
5174         * tui/tui-hooks.c: Include observer.h.
5175         (tui_event_default, tui_old_event_hooks, tui_event_hooks):
5176         Remove.
5177         (tui_bp_created_observer, tui_bp_deleted_observer,
5178         tui_bp_modified_observer): New globals.
5179         (tui_install_hooks): Use observers, not events.
5180         (tui_remove_hooks): Likewise.
5181         * mi/mi-cmd-break.c: Include observer.h, not gdb-events.h.
5182         (mi_breakpoint_observers_installed, mi_can_breakpoint_notify): New
5183         globals.
5184         (breakpoint_notify): Check mi_can_breakpoint_notify.
5185         (breakpoint_hooks): Remove.
5186         (mi_cmd_break_insert): Attach observers.  Don't use events.
5187         * tracepoint.c: Include observer.h, not gdb-events.h.
5188         (tracepoint_operation, trace_pass_command): Notify observer.
5189         * interps.c: Don't include gdb-events.h.
5190         (clear_interpreter_hooks): Don't call clear_gdb_event_hooks.
5191         * gdbarch.c: Rebuild.
5192         * gdbarch.sh: Emit include for observer.h, not gdb-events.h.
5193         (deprecated_current_gdbarch_select_hack): Notify observer.
5194         * breakpoint.h: Don't include gdb-events.h.
5195         * breakpoint.c: Don't include gdb-events.h.
5196         (condition_command): Notify observer.
5197         (commands_command): Likewise.
5198         (commands_from_control_command): Likewise.
5199         (mention, delete_breakpoint, set_ignore_count): Likewise.
5200         (disable_breakpoint, do_enable_breakpoint): Likewise.
5201         * Makefile.in (gdb_events_h): Remove.
5202         (breakpoint_h): Update.
5203         (COMMON_OBS): Remove gdb-events.o.
5204         (gdb-events.o): Remove.
5205         (breakpoint.o, gdbarch.o, interps.o, tracepoint.o, gdbtk-bp.o,
5206         gdbtk-hooks.o, mi-cmd-break.o, tui-hooks.o): Update.
5207         * gdb-events.c: Remove.
5208         * gdb-events.h: Remove.
5209         * gdb-events.sh: Remove.
5210
5211 2008-07-24  Pedro Alves  <pedro@codesourcery.com>
5212
5213         * remote.c (remote_threads_extra_info): Don't query the remote
5214         server about info on the internally added main thread.
5215
5216 2008-07-24  Aleksandar Ristovski  <aristovski@qnx.com>
5217
5218         * nto-procfs.c (procfs_attach): Populate initial thread list.
5219         (procfs_wait): Return new pid, built from the inferior status.
5220
5221 2008-07-23  Thiago Jung Bauermann  <bauerman@br.ibm.com>
5222
5223         * configure.ac (CONFIG_INITS): Delete long obsoleted variable.
5224         * configure: Regenerate.
5225
5226 2008-07-23  Aleksandar Ristovski  <aristovski@qnx.com>
5227
5228         * nto-procfs.c (procfs_xfer_memory): Changed signature.
5229         (procfs_resume): Workaround for dereferencing type-punned pointer
5230         warning.
5231         * nto-tdep.c (nto_parse_redirection): Change signature to be const
5232         correct.
5233         * nto-tdep.h (nto_parse_redirection): Likewise.
5234
5235 2008-07-21  Stan Shebs  <stan@codesourcery.com>
5236
5237         Scrub remnants of IN_SOLIB_DYNSYM_RESOLVE_CODE.
5238         * gdbarch.sh: Adjust comment to refer to
5239         in_solib_dynsym_resolve_code().
5240         * gdbarch.h, gdbarch.c: Update.
5241         * solib-osf.c: Ditto.
5242         * infrun.c: Ditto.
5243         (handle_inferior_event): Use in_solib_dynsym_resolve_code
5244         unconditionally.
5245         * config/mips/nm-irix5.h: Remove undef of
5246         IN_SOLIB_DYNSYM_RESOLVE_CODE.
5247
5248 2008-07-21  Tom Tromey  <tromey@redhat.com>
5249
5250         * symfile.c (reread_symbols): Don't pass argument to observer.
5251         * exec.c (exec_file_attach): Don't pass argument to observer.
5252         * ada-lang.c (ada_executable_changed_observer): Remove argument.
5253         * symtab.c (symtab_observer_executable_changed): Remove argument.
5254         * observer.sh: Handle functions with no arguments.
5255
5256 2008-07-20  Sergei Poselenov  <sposelenov@emcraft.com>
5257             Chris Demetriou  <cgd@google.com>
5258
5259         * elfread.c (elf_symfile_segments): Fix the check that each loadable
5260         section fits within an ELF segment to handle ELF segments that hit
5261         the end of the address space.
5262
5263 2008-07-20  Chris Demetriou  <cgd@google.com>
5264
5265         * MAINTAINERS (Write After Approval): Add self.
5266
5267 2008-07-18  Tom Tromey  <tromey@redhat.com>
5268
5269         PR gdb/855:
5270         * NEWS: Add entry for macro commands.
5271         * Makefile.in (macrocmd.o): Add gdb_string.h.
5272         * macroscope.h (user_macro_scope): Declare.
5273         (default_macro_scope): Update documentation.
5274         (macro_user_macros): Declare.
5275         * c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
5276         Use user_macro_scope.
5277         (null_macro_lookup): Remove.
5278         * macrotab.h (macro_callback_fn): Declare.
5279         (macro_for_each): Likewise.
5280         (macro_allow_redefinitions): Likewise.
5281         * macrotab.c (foreach_macro): New function
5282         (macro_for_each): Likewise.
5283         (struct macro_table) <redef_ok>: New field.
5284         (macro_allow_redefinitions): New function.
5285         (new_macro_table): Update.
5286         (macro_define_function): Likewise.
5287         (macro_define_object): Likewise.
5288         * macroscope.c (user_macro_scope): New function.
5289         (default_macro_scope): Use it.
5290         (macro_user_macros): New global.
5291         (standard_macro_lookup): Look in macro_user_macros.
5292         (_initialize_macroscope): New function.
5293         * macroexp.h (macro_is_whitespace, macro_is_digit,
5294         macro_is_identifier_nondigit): Declare.
5295         * macroexp.c (macro_is_whitespace): Rename.  No longer static.
5296         (macro_is_digit): Likewise.
5297         (macro_is_identifier_nondigit): Likewise.
5298         (get_identifier): Update.
5299         (get_pp_number): Likewise.
5300         (get_token): Likewise.
5301         * macrocmd.c (skip_ws): New function.
5302         (extract_identifier): Likewise.
5303         (free_macro_definition_ptr): Likewise.
5304         (user_macros): Remove.
5305         (macro_define_command): Implement.
5306         (_initialize_macrocmd): Update.
5307         (macro_undef_command): Implement.
5308         (print_one_macro): New function.
5309         (macro_list_command): Implement.
5310
5311 2008-07-18  Joseph Myers  <joseph@codesourcery.com>
5312
5313         * configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
5314         in BFD ELF check.
5315         * configure: Regenerate.
5316
5317 2008-07-17  Paul Pluzhnikov  <ppluzhnikov@google.com>
5318
5319         * auxv.c (fprint_target_auxv): Stop at AT_NULL.
5320
5321 2008-07-15  Andreas Schwab  <schwab@suse.de>
5322
5323         * valops.c (value_cast_pointers): Follow typedefs when checking
5324         result of coercion.
5325
5326 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
5327
5328         * block.c (block_function): Renamed to ...
5329         (block_linkage_function): ... this.  All callers changed.
5330         * block.h (block_function): Renamed to ...
5331         (block_linkage_function): ... this.
5332
5333 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
5334
5335         * mn10300-tdep.c (set_reg_offsets): Use get_frame_register_unsigned.
5336
5337 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
5338
5339         * frame.c (frame_sp_unwind): Delete.
5340         (get_frame_sp): Do not use it.
5341         * frame.h (frame_sp_unwind): Delete prototype.
5342
5343 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
5344
5345         * ia64-tdep.c (ia64_dummy_id): Use get_frame_pc.
5346
5347 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
5348
5349         * dwarf2-frame.c (dwarf2_frame_cache): Update comment.
5350         * frame.c (frame_unwind_address_in_block): Delete.
5351         (get_frame_address_in_block): Do not use it.  Check the type
5352         of the next frame first.
5353         (frame_cleanup_after_sniffer): Update comment.
5354         * frame.h (frame_unwind_address_in_block): Delete prototype.
5355         * hppa-tdep.c (hppa_find_unwind_entry_in_block): Update comment.
5356
5357 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
5358
5359         * frame.c (frame_func_unwind): Delete.
5360         (get_frame_func): Do not use it.
5361         * frame.h (frame_func_unwind): Delete prototype.
5362         * hppa-tdep.c (hppa_frame_cache): Update comment.
5363         * rs6000-tdep.c (rs6000_frame_cache): Update comment.
5364
5365 2008-07-14  Stan Shebs  <stan@codesourcery.com>
5366
5367         * remote-sim.c (init_gdbsim_ops): Remove
5368         TARGET_REDEFINE_DEFAULT_OPS.
5369
5370 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
5371
5372         * findvar.c (read_var_value): Remove unused variable.
5373
5374 2008-07-15  Luis Machado  <luisgpm@br.ibm.com>
5375
5376         * infrun.c (handle_inferior_event): Tag threads as stopped
5377         before inserting breakpoints.
5378
5379 2008-07-15  Hui Zhu  <teawater@gmail.com>
5380
5381         * MAINTAINERS: Added myself to section Write After Approval.
5382
5383 2008-07-14  Paul Pluzhnikov  <ppluzhnikov@google.com>
5384
5385         PR gdb/2477
5386         * cp-abi.c (value_virtual_fn_field): Handle invalid pointers.
5387
5388 2008-07-14  Pedro Alves  <pedro@codesourcery.com>
5389
5390         * i386-dicos-tdep.c (i386_dicos_frame_align): Delete.
5391         (i386_dicos_push_dummy_code): New.
5392         (i386_dicos_init_abi): Don't register i386_dicos_frame_align.
5393         Register i386_dicos_push_dummy_code.
5394
5395 2008-07-14  Markus Deuling  <deuling@de.ibm.com>
5396
5397         * mips-tdep.c (fp_register_arg_p): Add gdbarch as paramter.
5398         (mips_n32n64_push_dummy_call, mips_o64_return_value)
5399         (mips_eabi_push_dummy_call): Update call to fp_register_arg_p.
5400
5401         (MIPS_FPU_TYPE): Add gdbarch as parameter and replace current_gdbarch.
5402         (fp_register_arg_p, mips_dump_tdep, show_mipsfpu_command)
5403         (mips_n32n64_fp_arg_chunk_p): Update caller.
5404
5405         (mips_n32n64_fp_arg_chunk_p): Add gdbarch as paramter.
5406         (mips_n32n64_push_dummy_call): Update caller.
5407
5408         (MIPS_LAST_ARG_REGNUM): Add gdbarch as parameter and replace
5409         current_gdbarch.
5410         (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
5411         (mips_o32_push_dummy_call, mips_o64_push_dummy_call): Update caller.
5412
5413
5414         (MIPS_LAST_FP_ARG_REGNUM): Add gdbarch as parameter and replace
5415         current_gdbarch.
5416         (mips_eabi_push_dummy_call, mips_o32_push_dummy_call)
5417         (mips_o64_push_dummy_call): Update caller.
5418
5419         (MIPS_EABI): Add gdbarch as parameter and replace current_gdbarch.
5420         (fp_register_arg_p, mips_dump_tdep): Update caller.
5421
5422         (set_reg_offset): Add gdbarch as parameter and replace current_gdbarch.
5423         (mips16_scan_prologue, mips32_scan_prologue): Update caller.
5424
5425         (reset_saved_regs): Make static.  Add gdbarch as parameter.  Replace
5426         current_gdbarch.
5427         (mips32_scan_prologue): Update caller.
5428
5429         (heuristic_proc_start): Add gdbarch as parameter. Replace
5430         current_gdbarch.
5431         (mips_insn16_frame_cache, mips_insn32_frame_cache): Update caller.
5432
5433         * mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
5434         (mipsnbsd_store_inferior_registers): Use get_regcache_arch to get at
5435         the current architecture. Update call to getregs_supplies.
5436         (getregs_supplies): Add gdbarch as parameter and replace
5437         current_gdbarch.
5438
5439         * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use get_frame_arch to
5440         get at the current architecture. Update call to NBSD_MIPS_JB_OFFSET and
5441         NBSD_MIPS_JB_ELEMENT_SIZE.
5442         (NBSD_MIPS_JB_ELEMENT_SIZE, NBSD_MIPS_JB_OFFSET): Add gdbarch and
5443         replace current_gdbarch.
5444
5445         * remote-mips.c (mips_map_regno): Add gdbarch as parameter and replace
5446         current_gdbarch.
5447         (mips_fetch_registers, mips_store_registers): Update call
5448         to mips_map_regno.
5449         (mips_load): Use get_regcache_arch to get at the current_architecture
5450         and replace current_gdbarch.
5451
5452 2008-07-13  Pedro Alves  <pedro@codesourcery.com>
5453
5454         * thread.c (restore_selected_frame): On fail to restore, select
5455         the innermost frame, and don't crash when warning the user.
5456
5457 2008-07-13  Hui Zhu  <teawater@gmail.com>
5458
5459         * symtab.c (expand_line_sal): Fix a memory leak.
5460
5461 2008-07-13  Pedro Alves  <pedro@codesourcery.com>
5462
5463         * utils.c (struct continuation): Define as inheriting struct
5464         cleanup.
5465         (add_continuation, do_all_continuations)
5466         (discard_all_continuations, add_intermediate_continuation)
5467         (do_all_intermediate_continuations)
5468         (discard_all_intermediate_continuations): Adjust.
5469
5470 2008-07-13  Vladimir Prus  <vladimir@codesourcery.com>
5471
5472         Skip varobj in running threads.
5473         * mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's
5474         thread is not stopped, skip the varobj.
5475         * Makefile.in: Update dependencies.
5476
5477 2008-07-13  Vladimir Prus  <vladimir@codesourcery.com>
5478
5479         Enable all commands while inferiour is running
5480         * mi/mi-main.c (mi_cmd_execute): Don't check if
5481         inferiour is executing.
5482
5483 2008-07-13  Vladimir Prus  <vladimir@codesourcery.com>
5484
5485         Allow all CLI command even if target is executing.
5486         * gdb/top.c (execute_command_1): Don't check if the inferiour
5487         is running.
5488
5489 2008-07-13  Vladimir Prus  <vladimir@codesourcery.com>
5490
5491         * mi/mi-main.c (mi_cmd_execute): Remove unused variable.
5492         Fix printing of frame, when frame is wrong.
5493
5494 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
5495
5496         * spu-tdep.c (spu_frame_unwind_cache): Do not error if
5497         backchain is unreadable.
5498
5499 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
5500
5501         * spu-linux-nat.c: Include "gdbthread.h".
5502         (spu_child_post_startup_inferior): Register main thread.
5503         (spu_child_post_attach): Likewise.
5504         * Makefile.in (spu-linux-nat.o): Update dependencies.
5505
5506 2008-07-12  Pedro Alves  <pedro@codesourcery.com>
5507
5508         Rewrite continuations internals on top of cleanups and plug
5509         continuation arguments leaks.
5510
5511         * defs.h (struct continuation): Make it opaque.
5512         (add_continuation, add_intermediate_continuation): Drop the int
5513         argument of the continuation hook argument.  Add
5514         continuation_free_args argument.
5515         (do_all_continuations, do_all_intermediate_continuations): Drop
5516         the error_p argument.
5517
5518         * utils.c (add_continuation): Drop the int argument of the
5519         continuation hook argument.  Add continuation_free_args argument.
5520         Reimplement on top of cleanups.
5521         (do_all_continuations): Drop error argument.  Reimplement on top
5522         of cleanups.
5523         (discard_all_continuations): Reimplement on top of cleanups.
5524         (add_intermediate_continuation): Drop the int argument of the
5525         continuation hook argument.  Add continuation_free_args argument.
5526         Reimplement on top of cleanups.
5527         (do_all_intermediate_continuations): Drop error argument.
5528         Reimplement on top of cleanups.
5529         (discard_all_intermediate_continuations): Reimplement on top of
5530         cleanups.
5531
5532         * breakpoint.c (until_break_command_continuation): Drop error
5533         argument.  Add xfree as continuation argument deleter.
5534
5535         * inf-loop.c (inferior_event_handler): On error, discard all
5536         continuations.  Adjust to new do_all_intermediate_continuations
5537         and do_all_continuations interfaces.
5538
5539         * infcmd.c (step_1_continuation): Drop error_p argument.  Adjust.
5540         Pass xfree as continuation argument deleter.
5541         (finish_command_continuation): Drop error_p argument.  Adjust.
5542         (finish_command_continuation_free_arg): New.
5543         (finish_command): Pass finish_command_continuation_free_arg as
5544         continuation argument deleter.  Adjust to new do_all_continuations
5545         interfaces.
5546         (attach_command_continuation): Drop error_p argument.
5547         (attach_command_continuation_free_args): New.
5548         (attach_command): Pass attach_command_continuation_free_args as
5549         continuation argument deleter.
5550
5551         * interps.c (interp_set): Adjust to new do_all_continuations
5552         interfaces.
5553
5554         * event-top.c (stdin_event_handler): In error, also discard the
5555         intermediate continuations.
5556
5557 2008-07-12  Pedro Alves  <pedro@codesourcery.com>
5558
5559         Replace struct continuation_args by void* and per command structs.
5560
5561         * top.c (execute_command): Remove unused arg1 and arg2 locals.
5562
5563         * breakpoint.c (struct until_break_command_continuation_args):
5564         New.
5565         (until_break_command_continuation): Take a void* instead of a
5566         continuations_arg.  Adjust.
5567         (until_break_command): Adjust to use struct
5568         until_break_command_continuation_args instead of struct
5569         continuation_arg.
5570
5571         * infcmd.c (struct step_1_continuation_args): New.
5572         (step_1_continuation): Take a void* instead of a
5573         continuations_arg.  Adjust to use struct step_1_continuation_args.
5574         (step_once): Adjust to use struct step_1_continuation_args.
5575
5576         (struct finish_command_continuation_args): New.
5577         (finish_command_continuation): Take a void* instead of a
5578         continuations_arg.  Adjust to use struct
5579         finish_command_continuation_args.
5580         (finish_command): Adjust to use struct
5581         finish_command_continuation_args.
5582         (struct attach_command_continuation_args): New.
5583         (attach_command_continuation): Take a void* instead of a
5584         continuations_arg.  Adjust to use struct
5585         attach_command_continuation_args.
5586         (attach_command): Adjust to use struct
5587         attach_command_continuation_args.
5588
5589         * defs.h (struct continuation_arg): Delete.
5590         (struct continuation): Replace the struct continuation_arg*
5591         parameter of continuation_hook by a void*.  Replace "arg_list"
5592         member by a new "args" member with void* type.
5593         (add_continuation, add_intermediate_continuation): Replace struct
5594         continuation_arg type usages by void* usages.
5595
5596         * utils.c (add_continuation, do_all_continuations)
5597         (add_intermediate_continuation)
5598         (do_all_intermediate_continuations): Replace struct
5599         continuation_arg type usages by void* usages.  Pass "args" instead
5600         of "arg_list".
5601
5602 2008-07-12  Pedro Alves  <pedro@codesourcery.com>
5603
5604         * infrun.c (struct thread_stepping_state): Delete sal member.
5605         (init_thread_stepping_state): Add local sal.  Use it instead of
5606         tss->sal.
5607         (handle_inferior_event): New local stop_pc_sal.  Use it instead of
5608         tss->sal.
5609         (step_into_function): Add local stop_func_sal.  Use it instead of
5610         tss->sal.
5611
5612 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
5613
5614         Implement -exec-continue/-exec-interrupt --all.
5615         * infcmd.c (continue_1): New, extracted from
5616         (continue_command): ...here.
5617         (interrupt_target_1): New, extracted from
5618         (interrupt_target_command): ...here.
5619         * inferior.h (continue_1, interrupt_target_1): New.
5620         * mi/mi-main.c (mi_cmd_exec_continue)
5621         (mi_cmd_exec_interrupt): Handle --all.
5622
5623 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
5624
5625         Implement --thread and --frame.
5626         * gdbthread.h (find_thread_id): Declare.
5627         * thread.c (find_thread_id): Make non-static.
5628         * mi/mi-main.c (mi_cmd_execute): Switch to the right
5629         thread and frame, if necessary.
5630         * mi/mi-parse.c (mi_parse): Handle --thread and --frame.
5631         * mi/mi-parse.h (strcut mi_parse): New fields thread and frame.
5632
5633 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
5634
5635         * infrun.c (resume): Discard cleanups on early exit path.
5636
5637 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
5638
5639         * infrun.c (normal_stop): For MI, report which threads
5640         were stopped.
5641
5642 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
5643
5644         Report thread state in -thread-info output.
5645         * thread.c (print_thread_info): Add new field "state".
5646
5647 2008-07-11  Pedro Alves  <pedro@codesourcery.com>
5648
5649         * infrun.c (handle_inferior_event): Also ignore a
5650         TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
5651
5652 2008-07-11  Tom Tromey  <tromey@redhat.com>
5653
5654         * completer.c (complete_line_internal): New function, from
5655         complete_line.  Add 'for_help' parameter.
5656         (complete_line): Use it.
5657         (command_completer): Move later.  Rewrite.
5658
5659 2008-07-11  Pedro Alves  <pedro@codesourcery.com>
5660
5661         * thread.c (thread_apply_command): Move making the cleanup out of
5662         the loop.
5663
5664 2008-07-11  Pedro Alves  <pedro@codesourcery.com>
5665
5666         Exited threads.
5667
5668         * thread.c (enum thread_state): New.
5669         (thread_state main_thread_running): Delete, in favor of...
5670         (thread_state main_thread_state): ... this.  Update throughout.
5671         (clear_thread_inferior_resources): New, split from free_thread.
5672         (free_thread): Call clear_thread_inferior_resources.
5673         (init_thread_list): Set main thread to stopped state.
5674         (add_thread_silent): Take care of PTID reuses.
5675         (delete_thread): If deleting inferior_ptid or a thread with
5676         refcount > 0, mark it as exited, but still keep it in the list.
5677         Only notify of thread exits, if we haven't done so yet.
5678         (iterate_over_threads): Make it safe to delete threads while
5679         iterating over them.
5680         (do_captured_list_thread_ids): Don't account for exited threads.
5681         (thread_alive): Check for the THREAD_EXITED state, and don't set
5682         ptid to -1 on exited threads.
5683         (set_running): Update to account for extra possible states.
5684         (is_thread_state): New.
5685         (is_stopped, is_exited): New.
5686         (is_running): Implement in terms of is_thread_state.
5687         (any_running): Update.
5688         (print_thread_info): Update.  Account for exited threads.  Don't
5689         warn about missed frame restoring here, its done in the cleanup.
5690         (switch_to_thread): Don't read from a thread that has gone.
5691         (restore_current_thread): In non-stop mode, do a full context
5692         switch.
5693         (restore_selected_frame): Add a frame_level argument.  Rewrite.
5694         (struct current_thread_cleanup): Add selected_frame_level and
5695         was_stopped members.
5696         (do_restore_current_thread_cleanup): Check if thread was stopped
5697         and still is, and if the target has registers, stack and memory
5698         before restoring the selected frame.  Don't delete the cleanup
5699         argument here.
5700         (restore_current_thread_cleanup_dtor): New.
5701         (make_cleanup_restore_current_thread): Remove all arguments.
5702         Rewrite.
5703         (thread_apply_all_command): Update.  Prune threads.
5704         (thread_apply_command): Update.
5705         (thread_command): Account for currently selected exited thread.
5706         (do_captured_thread_select): Check for a running thread.  Prune
5707         threads.
5708         (_initialize_thread): Make "info threads", "thread", "thread
5709         apply", and "thread apply all" appliable without a selected thread.
5710         * gdbthread.h (struct thread_info): Replace running_ by state_.
5711         Add refcount.
5712         (is_exited, is_stopped): Declare.
5713         (make_cleanup_restore_current_thread): Remove all arguments.
5714         * infrun.c: Include "event-top.h".
5715         (fetch_inferior_event): In non-stop mode, restore selected thread
5716         and frame after handling the event and running breakpoint
5717         commands.  Display GDB prompt if needed.
5718         (normal_stop): In non-stop mode, don't print thread switching
5719         notice.
5720         * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
5721         (get_cmd_no_selected_thread_ok): New.
5722         * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): New.
5723         (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
5724         Declare.
5725         * cli/cli-cmds.c: Set "pwd", "help", "info", "show" as
5726         no-selected-thread ok.
5727         * top.c (execute_command): Check for non no-selected-thread-ok
5728         commands.
5729         * linux-nat.c (struct saved_ptids, threads_to_delete)
5730         (record_dead_thread, prune_lwps): Delete.
5731         (exit_lwp): Unconditionally delete thread.
5732         (linux_nat_resume): Remove prune_lwps call.
5733         * infcmd.c (proceed_thread_callback): Check if !is_stopped instead
5734         of is_running.  Adjust to make_cleanup_restore_current_thread
5735         interface change.
5736         * mi/mi-main.c (mi_cmd_execute): Only allow a few commands if the
5737         selected thread has exited.
5738         * inf-loop.c (inferior_event_handler): Don't display the prompt
5739         here.
5740         * varobj.c (c_value_of_root): Update.
5741         * defs.h (make_cleanup_dtor): Declare.
5742         * utils.c (make_cleanup_dtor): New.
5743
5744         * Makefile.in (infrun.o): Depend on $(event_top_h).
5745
5746 2008-07-11  Pedro Alves  <pedro@codesourcery.com>
5747
5748         Add "continue -a" and "interrupt -a" options for non-stop mode.
5749
5750         * infcmd.c (proceed_thread_callback, do_context_switch_to): New.
5751         (continue_command): Add "-a" option.
5752         (interrupt_target_command): Add "-a" option.
5753         (_initialize_infcmd): Add extend help of continue and interrupt
5754         command to mention the new "-a" option.  Mark "continue" async ok.
5755
5756 2008-07-10  Doug Evans  <dje@google.com>
5757
5758         Add "set print symbol-loading on|off".
5759         * NEWS: Document new option.
5760         * symfile.h (print_symbol_loading): Declare.
5761         * symfile.c (print_symbol_loading): New global.
5762         (symbol_file_add_with_addrs_or_offsets): Only print "Reading symbols
5763         from ..." if print_symbol_loading.
5764         (_initialize_symfile): Add set/show print symbol-loading.
5765         * solib.c (solib_read_symbols): Only print "Loaded symbols for ..."
5766         if print_symbol_loading.
5767
5768 2008-07-10  Pedro Alves  <pedro@codesourcery.com>
5769
5770         Non-stop linux native.
5771
5772         * linux-nat.c (linux_test_for_tracefork): Block events while we're
5773         here.
5774         (get_pending_status): Implement non-stop mode.
5775         (linux_nat_detach): Stop threads before detaching.
5776         (linux_nat_resume): In non-stop mode, always resume only a single
5777         PTID.
5778         (linux_handle_extended_wait): On a clone event, in non-stop mode,
5779         add new lwp to GDB's thread table, and mark as running, executing
5780         and stopped appropriately.
5781         (linux_nat_filter_event): Don't assume there are other running
5782         threads when a thread exits.
5783         (linux_nat_wait): Mark the main thread as running and executing.
5784         In non-stop mode, don't stop all lwps.
5785         (linux_nat_kill): Stop lwps before killing them.
5786         (linux_nat_thread_alive): Use signal 0 to detect if a thread is
5787         alive.
5788         (send_sigint_callback): New.
5789         (linux_nat_stop): New.
5790         (linux_nat_add_target): Set to_stop to linux_nat_stop.
5791
5792         * linux-nat.h (thread_db_attach_lwp): Declare.
5793
5794         * linux-thread-db.c (thread_get_info_callback): Check for new
5795         threads if we have none.
5796         (thread_from_lwp, enable_thread_event): Set proc_handle.pid to the
5797         stopped lwp.  Check for new threads if we have none.
5798         (thread_db_attach_lwp): New.
5799         (thread_db_init): Set proc_handle.pid to inferior_ptid.
5800         (check_event): Set proc_handle.pid to the stopped lwp.
5801         (thread_db_find_new_threads): Set proc_handle.pid to any stopped
5802         lwp available, bail out if there is none.
5803
5804         * linux-fork.c (linux_fork_killall): Use SIGKILL instead of
5805         PTRACE_KILL.
5806
5807 2008-07-10  Kevin Buettner  <kevinb@redhat.com>
5808
5809         * rs6000-tdep.c (ppc_displaced_step_fixup): Change type of
5810         `current_pc' from CORE_ADDR to ULONGEST.
5811
5812         * remote-sim.c (gdbsim_cntrl_c): Pass remote_sim_ptid to
5813         gdbsim_stop().
5814
5815 2008-07-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
5816
5817         * NEWS (New commands): Mention "set disable-randomization".
5818         * configure.ac: Add check for HAVE_PERSONALITY and
5819         HAVE_DECL_ADDR_NO_RANDOMIZE.
5820         * configure, config.in: Regenerate.
5821         * linux-nat.c [HAVE_PERSONALITY]: New include <sys/personality.h>.
5822         [HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
5823         ADDR_NO_RANDOMIZE.
5824         (disable_randomization, show_disable_randomization)
5825         (set_disable_randomization): New.
5826         (linux_nat_create_inferior) [HAVE_PERSONALITY]: New variables
5827         PERSONALITY_ORIG and PERSONALITY_SET.  Disable randomization upon the
5828         variable DISABLE_RANDOMIZATION.
5829         (_initialize_linux_nat): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
5830         DISABLE_RANDOMIZATION.
5831
5832 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
5833
5834         Adjust all targets to new target_stop interface.
5835
5836         * gnu-nat.c (gnu_stop): Add ptid argument.
5837         * go32-nat.c (go32_stop): Add ptid argument.
5838         (go32_create_inferior): Pass inferior_ptid to go32_stop.
5839         * hpux-thread.c (hpux_thread_stop): Add ptid argument.
5840         * monitor.c (monitor_stop): Add ptid argument.
5841         (monitor_open): Pass inferior_ptid to monitor_stop.
5842         (monitor_interrupt): Pass inferior_ptid to target_stop.
5843         (monitor_stop): Add ptid argument.
5844         * nto-procfs.c (nto_interrupt): Pass inferior_ptid to target_stop.
5845         (procfs_create_inferior): Add ptid argument.
5846         * procfs.c (procfs_stop): Add ptid argument.
5847         * remote-m32r-sdi.c (m32r_stop): Add ptid argument.
5848         * remote-sim.c (gdbsim_stop): Add ptid argument.
5849         * sol-thread.c (sol_thread_stop): Add ptid argument.
5850         * win32-nat.c (win32_stop): Add ptid argument.
5851
5852 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
5853
5854         Non-stop inferior control.
5855
5856         * infrun.c (resume): In non-stop mode, always resume just one
5857         thread.
5858         (proceed): Don't call prepare_to_proceed in non-stop mode.
5859         (fetch_inferior_event): In non-stop mode, switch context before
5860         handling the event.
5861         (error_is_running, ensure_not_running): New.
5862         (handle_inferior_event): In non-stop mode: Mark only the event
5863         thread as stopped.  Require that the target module manages adding
5864         threads to the thread list.  Assert that there isn't a
5865         deferred_step_ptid set.  Don't switch to infwait_thread_hop_state.
5866         (normal_stop): Only mark not-running if inferior hasn't exited.
5867         In non-stop mode, only mark the event thread.
5868
5869         * thread.c:Include "cli/cli-decode.h".
5870         (print_thread_info): Don't read from a running thread.
5871         Output "(running)" if thread is running.
5872         (switch_to_thread): Don't read stop_pc if thread is executing.
5873         (do_restore_current_thread_cleanup): Don't write to a running
5874         thread.
5875         (thread_apply_all_command): Don't read from a running thread.  In
5876         non-stop mode, do a full context-switch instead of just switching
5877         threads.
5878         (thread_apply_command): In non-stop mode, do a full context-switch
5879         instead of just switching threads.
5880         (do_captured_thread_select): Likewise.  Inform user if selected
5881         thread is running.
5882         (_initialize_thread): Mark "info threads" and "thread" and
5883         async_ok.
5884
5885         * inf-loop.c (inferior_event_handler): In non-stop mode, don't
5886         unregister the target from the event loop.
5887
5888         * infcmd.c (continue_command, step_1, jump_command)
5889         (signal_command): Ensure the selected thread isn't running.
5890         (interrupt_target_command): In non-stop mode, interrupt only the
5891         selected thread.
5892
5893         * inferior.h (error_is_running, ensure_not_running): Declare.
5894
5895         * target.h (struct target_ops): Add ptid argument to the to_stop
5896         member.
5897         (target_stop): Add ptid_t argument.
5898
5899         * target.c (update_current_target): Add ptid argument to to_stop's
5900         type.
5901         (debug_to_stop): Add ptid_t argument.
5902         (debug_to_rcmd): Set to_stop_ptid.
5903
5904         * remote.c (remote_stop): Add ptid_t argument.
5905         (async_remote_interrupt): Add inferior_ptid to target_stop.
5906         * inf-ptrace.c (inf_ptrace_stop): Add ptid argument.
5907
5908         * Makefile.in (thread.o): Depend on $(cli_decode_h).
5909
5910 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
5911
5912         Don't rely on ecs->wait_for_more.
5913
5914         * infrun.c (proceed): Clear the stepping state, set
5915         previous_inferior_ptid and clear infwait state.
5916         (wait_for_inferior): Don't clear the stepping state, set
5917         previous_inferior_ptid, or clear the infwait state here.
5918         (fetch_inferior_event): Don't clear the stepping state, set
5919         previous_inferior_ptid, or clear the infwait state here.  Don't
5920         condition on wait_for_more.
5921
5922 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
5923
5924         Refactor infrun a bit.
5925
5926         * infrun.c (currently_stepping): Take a struct
5927         thread_stepping_state instead of an execution_control_state.
5928         (struct thread_stepping_state): New, split from
5929         execution_control_state.
5930         (gtss, tss): New globals.
5931         (proceed): Clear the stepping state, set previous_inferior_ptid
5932         and clear infwait state.
5933         (init_wait_for_inferior): Clear the stepping state,
5934         previous_inferior_ptid and infwait state.
5935         (waiton_ptid, infwait_state): New, split from
5936         execution_control_state.
5937         (struct execution_control_state): Members that persist through
5938         events moved out to either struct thred_stepping_state or made
5939         global.  Deleted unneeded wp, saved_inferior_ptid, tmpstatus.
5940         (wait_for_inferior, fetch_inferior_event): Use local
5941         execution_control_state.  Update to execution_control_state split.
5942         (init_execution_control_state): Adjust.
5943         (init_thread_stepping_state): New, extracted from
5944         init_execution_control_state.
5945         (context_switch): Take a ptid instead of an
5946         execution_control_state.
5947         (context_switch_to): Adjust.
5948         (adjust_pc_after_break): Adjust.
5949         (init_infwait_state): New.
5950         (handle_inferior_event): Adjust.
5951
5952 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
5953             Vladimir Prus  <vladimir@codesourcery.com>
5954
5955         Per-thread commands.
5956
5957         * gdbthread.h: Remove unneeded forward declarations.
5958         Include "inferior.h".
5959         (struct thread_info): Add continuations,
5960         intermediate_continuations, proceed_to_finish, step_over_calls,
5961         stop_step, step_multi and stop_signal members.
5962         (save_infrun_state): Add continuations,
5963         intermediate_continuations, proceed_to_finish, step_over_calls,
5964         stop_step, step_multi, stop_signal and stop_bpstat parameters.
5965         (load_infrun_state): Add continuations,
5966         intermediate_continuations, proceed_to_finish, step_over_calls,
5967         stop_step, step_multi, stop_signal and stop_bpstat parameters.
5968
5969         * thread.c (load_infrun_state): In non-stop mode, load
5970         continuations, intermediate_continuations, proceed_to_finish,
5971         step_over_calls, stop_step, step_multi and stop_signal.
5972         (save_infrun_state): Store continuations,
5973         intermediate_continuations, proceed_to_finish, step_over_calls,
5974         stop_step, step_multi, stop_signal and stop_bpstat.
5975         (save_infrun_state): Store continuations,
5976         intermediate_continuations, proceed_to_finish, step_over_calls,
5977         stop_step, step_multi, stop_signal and stop_bpstat.
5978         (free_thread): Clear The thread's stop_bpstat.
5979
5980         * inferior.h (context_switch_to): Declare.
5981
5982         * infrun.c (ecss): New global.
5983         (context_switch): Context switch continuations,
5984         intermediate_continuations, proceed_to_finish, step_over_calls,
5985         stop_step, step_multi, stop_signal and stop_bpstat.
5986         (wait_for_inferior): Use global ecss.
5987         (async_ecss, async_ecs): Delete.
5988         (fetch_inferior_event): Use global ecss.
5989         (context_switch_to): New.
5990
5991         * top.c (execute_command): In non-stop, only check if the current
5992         thread is running, in all-stop, check if there's any thread
5993         running.
5994
5995         * breakpoint.c (bpstat_remove_breakpoint): New.
5996         (bpstat_remove_breakpoint_callback): New.
5997         (delete_breakpoint): Clear the stop_bpstats of all threads.
5998
5999         * mi/mi-main.c (mi_cmd_execute): In non-stop, only check if the
6000         current thread is running, in all-stop, check if there's any
6001         thread running.
6002
6003         * Makefile.in (gdbthread_h): Depend on $(inferior_h).
6004
6005 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
6006
6007         Add non_stop global.
6008
6009         * inferior.h (non_stop): Declare.
6010         * infrun.c (non_stop, non_stop_1): New.
6011         (set_non_stop, show_non_stop): New.
6012         (_initialize_infrun): Add "set/show non-stop" command.
6013
6014 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
6015
6016         Adjust fork/vfork/exec to pass ptids around.
6017
6018         * target.h (struct target_waitstatus): Store related_pid as a ptid.
6019         (inferior_has_forked, inferior_has_vforked, inferior_has_execd):
6020         Take a ptid_t.
6021         * breakpoint.h (struct breakpoint): Change forked_inferior_pid
6022         type to ptid.
6023         * breakpoint.c (print_it_typical, bpstat_check_location)
6024         (print_one_breakpoint_location, set_raw_breakpoint_without_location)
6025         (create_fork_vfork_event_catchpoint): Adjust.
6026         * infrun.c (fork_event): Change parent_pid and child_pid types to
6027         ptid.
6028         (follow_exec, inferior_has_forked, inferior_has_vforked)
6029         (inferior_has_execd): Take a ptid_t and don't trim it.
6030         * linux-thread-db.c (thread_db_wait): Don't trim the returned ptid.
6031         * linux-nat.c (linux_child_follow_fork): Adjust.
6032         * inf-ptrace.c (inf_ptrace_wait): Adjust.
6033         * inf-ttrace.c (inf_ttrace_wait): Adjust.
6034         * win32-nat.c (get_win32_debug_event): Don't set related_pid.
6035
6036 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
6037
6038         Add "executing" property to threads.
6039
6040         * inferior.h (target_executing): Delete.
6041         * gdbthread.h (struct thread_info): Add executing_ field.
6042         (set_executing, is_executing): New.
6043         * thread.c (main_thread_executing): New.
6044         (init_thread_list): Clear it and also main_thread_running.
6045         (is_running): Return false if target has no execution.
6046         (any_running, is_executing, set_executing): New.
6047
6048         * top.c: Include "gdbthread.h".
6049         (target_executing): Delete.
6050         (execute_command): Replace target_executing check by any_running.
6051         * event-top.c: Include "gdbthread.h".
6052         (display_gdb_prompt, command_handler): Replace target_executing by
6053         is_running.
6054         * inf-loop.c: Include "gdbthread.h".  Don't mark as not executing
6055         here.  Replace target_executing by is_running.
6056         * infrun.c (handle_inferior_event): Mark all threads as
6057         not-executing.
6058         * linux-nat.c (linux_nat_resume): Don't mark thread as executing
6059         here.
6060         * stack.c (get_selected_block): Return null if inferior is
6061         executing.
6062         * target.c (target_resume): Mark resumed ptid as executing.
6063         * breakpoint.c (until_break_command): Replace target_executing
6064         check by is_executing.
6065         * remote.c (remote_async_resume): Don't mark inferior as executing
6066         here.
6067         * mi/mi-interp.c (mi_cmd_interpreter_exec): Replace target_executing
6068         by any_running.
6069
6070         * mi/mi-main.c (mi_cmd_exec_interrupt, mi_cmd_execute)
6071         (mi_execute_async_cli_command): Replace target_executing by
6072         is_running.
6073
6074         * frame.c (get_current_frame): Error out if the current thread is
6075         executing.
6076         (has_stack_frames): New.
6077         (get_selected_frame, deprecated_safe_get_selected_frame): Check
6078         has_stack_frames.
6079
6080         * Makefile.in (event-top.o, frame.o, inf-loop.o, top.o): Depend on
6081         $(gdbthread_h).
6082
6083 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
6084
6085         * symfile.c (load_command): Reopen the exec file and reread
6086         symbols before anything else.
6087
6088 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
6089
6090         * remote-sim.c: Include gdbthread.h.
6091         (remote_sim_ptid): New global.
6092         (gdbsim_create_inferior): Silently add the main task to GDB's
6093         thread list.
6094         (gdbsim_close, gdbsim_mourn_inferior): Silently delete the main
6095         task from GDB's thread list.
6096         (gdbsim_resume): Adjust to use remote_sim_ptid.
6097         (gdbsim_thread_alive, gdbsim_pid_to_str): New.
6098         (init_gdbsim_ops): Register gdbsim_thread_alive and
6099         gdbsim_pid_to_str.
6100         (_initialize_remote_sim): Initialize remote_sim_ptid.
6101         * Makefile.in (remote-sim.o): Depend on $(gdbthread_h).
6102
6103 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
6104
6105         * monitor (monitor_ptid): New global.
6106         (monitor_open): Silently add the main task to GDB's thread list.
6107         (monitor_close, monitor_mourn_inferior): Silently delete the main
6108         task from GDB's thread list.
6109         (monitor_thread_alive, monitor_pid_to_str): New.
6110         (init_base_monitor_ops): Register monitor_thread_alive and
6111         monitor_pid_to_str.
6112         (_initialize_remote_monitors): Initialize monitor_ptid.
6113
6114         * gdbthread.h (delete_thread_silent): Declare.
6115         * thread.c (delete_thread): Rename to ...
6116         (delete_thread_1): ... this.  Add "silent" parameter.  If silent,
6117         don't do exit notifications.
6118         (delete_thread, delete_thread_silent): New, as wrappers to
6119         delete_thread_1.
6120
6121 2008-07-08  Pedro Alves  <pedro@codesourcery.com>
6122
6123         * breakpoint.c (update_global_location_list): Add boolean
6124         "should_insert" argument.  Only insert locations if caller told it
6125         too.
6126         (update_global_location_list_nothrow): Add boolean "should_insert"
6127         argument.  Pass it to update_global_location_list.
6128         (insert_breakpoints, create_longjmp_breakpoint)
6129         (create_overlay_event_breakpoint, enable_overlay_breakpoints)
6130         (create_thread_event_breakpoint, create_solib_event_breakpoint)
6131         (create_fork_vfork_event_catchpoint, create_exec_event_catchpoint)
6132         (enable_watchpoints_after_interactive_call_stop)
6133         (set_momentary_breakpoint, create_breakpoints)
6134         (break_command_really, watch_command_1)
6135         (create_ada_exception_breakpoint, update_breakpoint_locations)
6136         (do_enable_breakpoint, enable_command): Pass true to
6137         update_global_location_list.
6138         (bpstat_stop_status, disable_overlay_breakpoints)
6139         (disable_watchpoints_before_interactive_call_start)
6140         (delete_breakpoint, disable_breakpoint, disable_command): Pass
6141         false to update_global_location_list.
6142         (update_breakpoints_after_exec): Don't temporarily disable
6143         always-inserted mode.
6144
6145 2008-07-08  Pedro Alves  <pedro@codesourcery.com>
6146
6147         * breakpoint.c (mark_breakpoints_out): Make public.
6148         (update_breakpoints_after_exec): Don't call mark_breakpoints_out
6149         here.  Update comment.
6150         * breakpoint.h (mark_breakpoints_out): Declare.
6151
6152         * linux-nat.c (linux_handle_extended_wait): On
6153         TARGET_WAITKIND_EXECD, call mark_breakpoints_out.
6154         * inf-ttrace.c (inf_ttrace_wait): Likewise.
6155
6156 2008-07-08  Pedro Alves  <pedro@codesourcery.com>
6157
6158         * infrun.c (follow_exec): Reset shared libraries before adding the
6159         main exec file.
6160
6161 2008-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6162
6163         * breakpoint.c (bpstat_copy): Call RELEASE_VALUE on the new OLD_VAL.
6164
6165 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
6166
6167         * i386-dicos-tdep.c: Include "inferior.h".
6168         (i386_dicos_frame_align): New.
6169         (i386_dicos_init_abi): Register i386_dicos_frame_align.  Set call
6170         dummy location ON_STACK.
6171         * Makefile.in (i386-dicos-tdep.o): Depend on $(inferior_h).
6172
6173 2008-07-07  Joel Brobecker  <brobecker@adacore.com>
6174
6175         * gstdint.h: New file.
6176
6177 2008-07-05  Vladimir Prus  <vladimir@codesourcery.com>
6178
6179         * mi/mi-interp.c (mi_on_resume): Don't try to report
6180         resumed thread it the thread list is empty.
6181
6182 2008-07-05  Pierre Muller  <muller@ics.u-strasbg.fr>
6183
6184         * cli/cli-decode.c (add_setshow_optional_filename_cmd): Set
6185         completer for set to filename_completer.
6186
6187         NEWS: Mention it.
6188
6189 2008-07-04  Vladimir Prus  <vladimir@codesourcery.com>
6190
6191         Implement -target-attach.
6192         * mi/mi-cmds.c (mi_cmds): Forward -target-attach to CLI attach.
6193
6194 2008-06-21  Hui Zhu  <teawater@gmail.com>
6195
6196         * target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak.
6197
6198 2008-07-03  Pedro Alves  <pedro@codesourcery.com>
6199
6200         * config/i386/nm-cygwin.h (ATTACH_NO_WAIT): Delete.
6201         * config/i386/nm-i386gnu.h (ATTACH_NO_WAIT): Delete.
6202
6203         * target.h (struct target_ops): Add to_attach_no_wait member.
6204         (target_attach_no_wait): New.
6205         * target.c (update_current_target): Inherit to_attach_no_wait.
6206
6207         * infcmd.c: Replace ATTACH_NO_WAIT compile time check by
6208         target_attach_no_wait runtime check.
6209
6210         * gnu-nat.c (init_gnu_ops): Set to_attach_no_wait in gnu_ops.
6211         * win32-nat.c (init_win32_ops): Set to_attach_no_wait in
6212         win32_ops.
6213
6214 2008-07-03  Pedro Alves  <pedro@codesourcery.com>
6215
6216         * i386-tdep.c (i386_displaced_step_fixup): Condition log printing
6217         on debug_displaced being set.
6218
6219 2008-06-30  Daniel Jacobowitz  <dan@codesourcery.com>
6220
6221         * frame.c (get_prev_frame_1): Call frame_unwind_find_by_frame
6222         directly instead of get_frame_id.
6223
6224 2008-06-30  Luis Machado  <luisgpm@br.ibm.com>
6225
6226         * rs6000-tdep.c (ppc_displaced_step_fixup): New function.
6227         (deal_with_atomic_sequence): Update BC masks.
6228         (rs6000_gdbarch_init): Init displaced stepping infra-structure.
6229         Define BRANCH_MASK, B_INSN, BC_INSN, BXL_INSN, BP_MASK and BP_INSN.
6230
6231 2008-06-30  Daniel Jacobowitz  <dan@codesourcery.com>
6232
6233         * cris-tdep.c (crisv32_single_step_through_delay): Get this frame's
6234         register, not the previous frame's.
6235
6236 2008-06-30  Luis Machado  <luisgpm@br.ibm.com>
6237
6238         * source.c (select_source_symtab): Make sure we skip namespace
6239         symtabs when showing cpp source code.
6240
6241 2008-06-30  Hans-Peter Nilsson  <hp@axis.com>
6242
6243         * MAINTAINERS (Authorized committers): Fix my email address.
6244
6245 2008-06-28  Vladimir Prus  <vladimir@codesourcery.com>
6246
6247         * mi/mi-cmds.c (mi_cmds): Route -exec-run, -exec-until,
6248         -target-download and -target-select via CLI, so that
6249         the quoting rules are the same as they were (unfortunately)
6250         in all prior gdb releases.
6251         * mi/mi-cmds.h (mi_cmd_exec_run, mi_cmd_exec_until)
6252         (mi_cmd_target_download, mi_cmd_target_select): Remove.
6253         * mi/mi-main.c (mi_cmd_exec_run, mi_cmd_exec_until)
6254         (mi_cmd_target_download, mi_cmd_target_select): Remove.
6255         (mi_cmd_execute): Set current_token even for commands
6256         routed via CLI.
6257
6258 2008-06-28  Ulrich Weigand  <uweigand@de.ibm.com>
6259
6260         * alphafbsd-tdep.c: Update for unwinder changes.
6261         * alpha-linux-tdep.c: Likewise.
6262         * alphanbsd-tdep.c: Likewise.
6263         * alphaobsd-tdep.c: Likewise.
6264         * avr-tdep.c: Likewise.
6265         * cris-tdep.c: Likewise.
6266         * frv-linux-tdep.c: Likewise.
6267         * frv-tdep.c: Likewise.
6268         * h8300-tdep.c: Likewise.
6269         * hppa-linux-tdep.c: Likewise.
6270         * iq2000-tdep.c: Likewise.
6271         * m32c-tdep.c: Likewise.
6272         * m32r-linux-tdep.c: Likewise.
6273         * m32r-tdep.c: Likewise.
6274         * m68hc11-tdep.c: Likewise.
6275         * mep-tdep.c: Likewise.
6276         * mn10300-tdep.c: Likewise.
6277         * mt-tdep.c: Likewise.
6278         * score-tdep.c: Likewise.
6279         * sh64-tdep.c: Likewise.
6280         * sh-tdep.c: Likewise.
6281         * sparc64fbsd-tdep.c: Likewise.
6282         * sparc64nbsd-tdep.c: Likewise.
6283         * sparc64obsd-tdep.c: Likewise.
6284         * v850-tdep.c: Likewise.
6285         * vaxobsd-tdep.c: Likewise.
6286         * vax-tdep.c: Likewise.
6287         * xstormy16-tdep.c: Likewise.
6288
6289 2008-06-28  Vladimir Prus  <vladimir@codesourcery.com>
6290
6291         * mi/mi-main.c (enum captured_mi_execute_command_actions)
6292         (captured_mi_execute_command_args): Remove.
6293         (captured_mi_execute_command): Cast the closure to mi_parse
6294         pointer, not to captured_mi_execute_command_args, and don't
6295         set the action field thereof.
6296         (mi_execute_command): Pass struct mi_parse, not
6297         captured_mi_execute_command_args to captured_mi_execute_command.
6298         (mi_execute_command): Remove (dead) code for suppressing
6299         printing prompt.
6300
6301 2008-06-28  Pedro Alves  <pedro@codesourcery.com>
6302
6303         * linux-nat.c (enum sigchld_state): New.
6304         (linux_nat_async_events_state): Renamed from
6305         linux_nat_async_events_enabled.
6306         (linux_nat_event_pipe_push, my_waitpid): Adjust.
6307         (sigchld_default_action): New.
6308         (lin_lwp_attach_lwp): Adjust.  Call linux_nat_async_events
6309         unconditionally.
6310         (linux_nat_create_inferior): Set events state to sigchld_default
6311         state.
6312         (linux_nat_resume): Adjust.
6313         (linux_nat_wait): Call linux_nat_async_events unconditionally.
6314         (sigchld_handler): Adjust.
6315         (linux_nat_async_mask): Don't set SIGCHLD actions here.
6316         (get_pending_events): Adjust.
6317         (linux_nat_async_events): Rewrite to handle enum sigchld_state
6318         instead of a boolean.
6319         (linux_nat_async): Adjust.
6320         (_initialize_linux_nat): Capture default SIGCHLD action into
6321         sigchld_default_action.
6322
6323 2008-06-28  Vladimir Prus  <vladimir@codesourcery.com>
6324
6325         * breakpoint.c (moribund_locations): New.
6326         (bpstat_stop_status): Process moribund locations.
6327         (update_global_location_list): Add removed
6328         locations to moribund_locations.
6329         (breakpoint_retire_moribund): New.
6330         * breakpoint.h (struct bp_location): New field
6331         events_till_retirement.
6332         (breakpoint_retire_moribund): Declare.
6333         * thread.c (thread_count): New.
6334         * infrun.c (handle_inferior_event): Call
6335         breakpoint_retire_moribund.
6336         * gdbthread.h (thread_count): Declare.
6337
6338 2008-06-27  Joseph Myers  <joseph@codesourcery.com>
6339
6340         * dfp.c (decimal_convert): Call match_endianness before and after
6341         conversion.
6342
6343 2008-06-27  Jonathan Larmour  <jifl@eCosCentric.com>
6344
6345         * remote.c (remote_insert_breakpoint): Ensure that if Z0
6346         unsupported and we fall back to memory_insert_breakpoint, we
6347         use the unmodified requested address.
6348
6349 2008-06-27  Joel Brobecker  <brobecker@adacore.com>
6350
6351         * dwarf2read.c (read_attribute_value): Issue a complaint when
6352         adjusting size attribute values of 0xffffffff as zero.
6353
6354 2008-06-27  Joseph Myers  <joseph@codesourcery.com>
6355
6356         * i386-tdep.c (i386_16_byte_align_p): New.
6357         (i386_push_dummy_call): Determine stack space required for
6358         arguments going forwards allowing for 16-byte alignment, then push
6359         arguments going forwards.
6360
6361 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
6362
6363         * infrun.c (start_remote): Don't clear thread list here.
6364         * monitor.c (monitor_open): Include "gdbthread.h".  Clear thread
6365         list here.
6366         * remote.c (record_currthread): Upgrade the main thread and its
6367         entry in the thread list if this is the first time we hear about
6368         threads.
6369         (remote_thread_alive): Consider magic_null_ptid or a ptid without
6370         a tid member always alive.
6371         (remote_find_new_threads): Don't update the main thread here.
6372         (remote_start_remote): Clear thread list here.  Always add the
6373         main thread.
6374         (extended_remote_attach_1): Add the main thread here.
6375         (extended_remote_mourn_1): Re-add the main thread here.
6376         (extended_remote_create_inferior_1): Add a main thread.
6377
6378         * Makefile.in (monitor.o): Depend on $(gdbthread_h).
6379
6380 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
6381
6382         Use ptid_t.tid to store thread ids instead of ptid_t.pid.
6383
6384         * remote.c (magic_null_ptid, not_sent_ptid, any_thread_ptid): New
6385         globals.
6386         (general_thread, continue_thread): Change type to ptid_t.
6387         (record_currthread): Take a ptid_t parameter instead of an
6388         integer.
6389         (MAGIC_NULL_PID): Delete.
6390         (set_thread): Take a ptid_t parameter and adjust.
6391         (set_general_thread, set_continue_thread): New.
6392         (remote_thread_alive, remote_newthread_step)
6393         (remote_current_thread, remote_find_new_threads)
6394         (remote_threads_info, remote_start_remote, remote_vcont_resume)
6395         (remote_resume_1, remote_wait, extended_remote_create_inferior_1)
6396         (threadalive_test, remote_pid_to_str)
6397         (remote_get_thread_local_address): Adjust.
6398         (_initialize_remote): Initialize magic_null_ptid, not_sent_ptid
6399         and any_thread_ptid.
6400
6401 2008-06-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
6402
6403         * configure.ac (--enable-tui): AC_MSG_ERROR for explicit --enable-tui.
6404         * configure: Regenerated.
6405
6406 2008-06-26  Joel Brobecker  <brobecker@adacore.com>
6407
6408         * dwarf2read.c (read_attribute_value): Treat size attribute
6409         values of 0xffffffff as if the attribute value was zero.
6410
6411 2008-06-26  Vladimir Prus  <vladimir@codesourcery.com>
6412
6413         * linux-nat.c: Add description of overall logic.
6414
6415 2008-06-26  Daniel Jacobowitz  <dan@codesourcery.com>
6416
6417         * Makefile.in (GNULIB_H): Use GNULIB_STDINT_H.
6418         (gdb_stdint_h, gdb_stdint.h, stamp-int): Delete.  Remove
6419         all dependencies on $(gdb_stdint_h).
6420         (distclean): Do not delete gdb_stdint.h.
6421         * acinclude.m4: Do not use stdint.m4.
6422         * configure.ac: Set GNULIB_STDINT_H.  Remove tests for stdint.h,
6423         uintptr_t, and gdb_stdint.h.
6424         * defs.h: Include <stdint.h>.
6425         * gdb_thread_db.h: Assume stdint.h is already included.
6426         * breakpoint.c, findcmd.c, hppa-tdep.c, inf-ptrace.c, proc-service.c,
6427         rs6000-nat.c, spu-linux-nat.c, target.c, win32-nat.c: Do not
6428         include gdb_stdint.h.
6429         * configure, config.in: Regenerate.
6430
6431 2008-06-26  Joseph Myers  <joseph@codesourcery.com>
6432
6433         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Handle passing
6434         decimal floating-point values in GPRs for soft-float.
6435         (do_ppc_sysv_return_value): Handle returning decimal
6436         floating-point values in GPRs for soft-float.
6437
6438 2008-06-26  Vladimir Prus  <vladimir@codesourcery.com>
6439
6440         * target.c (target_read_until_error): New.
6441         * target.h (target_read_until_error): Declare.
6442         * mi/mi-main.c (mi_cmd_data_read_memory): Use
6443         target_read_until_error.
6444
6445 2008-06-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6446
6447         Fix a memory leak found by Hui Zhu <teawater@gmail.com>.
6448         * c-exp.y (parse_number): Move the S and SAVED_CHAR initialization
6449         after the DECFLOAT detection to fix a memory leak.  Remove the
6450         redundant NUM initialization.  Protect the DECFLOAT detection memory
6451         access before the P block.  Restore the P memory content for the
6452         DECFLOAT detection.
6453
6454 2008-06-25  Vladimir Prus  <vladimir@codesourcery.com>
6455
6456         Kill the return value for all MI command functions.
6457         * mi/mi-cmds.h (enum mi_cmd_result): Remove.
6458         (mi_cmd_argv_ftype): Change return type to void.
6459
6460         * mi/mi-main.c: Adjust all function that implement
6461         MI commands to return nothing.
6462         (struct captured_mi_execute_command_actions):
6463         Remove the rc field.
6464         (mi_cmd_execute): Return nothing.
6465         (mi_execute_async_cli_command): Return nothing.
6466         (mi_cmd_exec_interrupt): Don't print ^done here.
6467         (mi_cmd_target_select): Don't print ^connected here.
6468         (captured_mi_execute_command): Don't check for MI_CMD_DONE.
6469         Special-case -target-select and output ^connected, not ^done.
6470
6471         * mi/mi-cmd-break.c: Adjust.
6472         * mi/mi-cmd-disas.c: Adjust.
6473         * mi/mi-cmd-env.c: Adjust.
6474         * mi/mi-cmd-file.c: Adjust.
6475         * mi/mi-cmd-stack.c: Adjust.
6476         * mi/mi-cmd-target.c: Adjust.
6477         * mi/mi-cmd-var.c: Adjust.
6478         * mi/mi-interp.c: Adjust.
6479         * mi/mi-symbol-cmds.c: Adjust.
6480
6481 2008-06-25  Vladimir Prus  <vladimir@codesourcery.com>
6482
6483         Emit ^running via observer.
6484         * mi/mi-interp.c (mi_cmd_interpreter_exec): Do no print
6485         ^running here.
6486         (mi_on_resume): Print ^running if not previously output.
6487         * mi/mi-main.c (running_result_record_printed): New.
6488         (captured_mi_execute_command): Reset
6489         running_result_record_printed.  Use running_result_record_printed
6490         to decide if we should skip ^done.
6491         (mi_execute_async_cli_command): Don't print ^running here.
6492         * mi/mi-main.h (current_token, running_result_record_printed):
6493         Declare.
6494
6495 2008-06-24  Michael Snyder  <msnyder@specifix.com>
6496
6497         * infrun.c (_initialize_infrun): White space and typo fix.
6498
6499 2008-06-23  Christopher Faylor  <me.gdb.changelog@cgf.cx>
6500
6501         * win32-nat.c (safe_symbol_file_add_stub): Remove unused variable.
6502         (do_initial_win32_stuff): Fix problem with inability to set breakpoints
6503         when first loading DLL with "dll" command.
6504
6505 2008-06-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6506
6507         * gnu-nat.c (proc_string): Use capital T for "Thread".
6508
6509 2008-06-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6510
6511         * win32-nat.c (win32_pid_to_str): Use capital T for "Thread".
6512
6513 2008-06-18  Joel Brobecker  <brobecker@adacore.com>
6514
6515         * solib-osf.c (osf_solib_create_inferior_hook): Do nothing if
6516         the target cannot run.
6517
6518 2008-06-18  Joel Brobecker  <brobecker@adacore.com>
6519
6520         * solib-osf.c (osf_solib_create_inferior_hook): Do nothing if
6521         we're attaching to a running process.
6522
6523 2008-06-18  Pierre Muller  <muller@ics.u-strasbg.fr>
6524
6525         * win32-nat.c (handle_load_dll): Give dll name and load address
6526         if debug_events is on.
6527         (handle_unload_dll): Likewise.
6528
6529 2008-06-14  Vladimir Prus  <vladimir@codesourcery.com>
6530
6531         Don't suppress *running when doing finish.
6532         * infcall.c (call_function_by_hand): Set both
6533         suppress_resume_observer and suppress_stop_observer.
6534         * infcmd.c (suppress_run_stop_observers): Split into...
6535         (suppress_resume_observer, suppress_stop_observer): ...those.
6536         (finish_command_continuation): Clear suppress_stop_observer.
6537         (finish_command): Set suppress_stop_observer.
6538         * inferior.h (suppress_run_stop_observers): Split into...
6539         (suppress_resume_observer, suppress_stop_observer): ...those.
6540         * infrun.c (normal_stop): Check for suppress_stop_observer.
6541         * thread.c (set_running): Check for suppress_resume_observer.
6542
6543 2008-06-12  Pedro Alves  <pedro_alves@portugalmail.pt>
6544             Pierre Muller  <muller@ics.u-strasbg.fr>
6545
6546         * gdbarch.sh (gdbarch_skip_main_prologue): New.
6547         * gdbarch.h, gdbarch.c: Regenerate.
6548         * i386-tdep.h (i386_skip_main_prologue): Declare.
6549         * i386-tdep.c (i386_skip_main_prologue): New.
6550         * i386-cygwin-tdep.c (i386_cygwin_init_abi): Register
6551         i386_skip_main_prologue as gdbarch_skip_main_prologue gdbarch callback.
6552         * symtab.c (find_function_start_sal): When pc points at the "main"
6553         function, call gdbarch_skip_main_prologue.
6554
6555 2008-06-11  Daniel Jacobowitz  <dan@codesourcery.com>
6556
6557         * value.c (value_primitive_field): Fetch lazy register values.
6558
6559 2008-06-11  Pedro Alves  <pedro@codesourcery.com>
6560
6561         * NEWS: Mention support removal of undocumented S AA p PID stop
6562         reply packet.
6563
6564         * remote.c (remote_wait): Remove undocumented S AA p PID support.
6565
6566 2008-06-10  Stan Shebs  <stan@codesourcery.com>
6567
6568         * MAINTAINERS: Update my affiliation and address.
6569
6570 2008-06-10  Andreas Schwab  <schwab@suse.de>
6571
6572         * top.c (print_gdb_version): Don't print final newline.
6573
6574 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
6575
6576         Implement *running.
6577         * Makefile.in: Update dependencies.
6578         * gdbthread.h (struct thread_info): New field
6579         running_.
6580         (set_running, is_running): New.
6581         * thread.c (set_running, is_running): New.
6582         * inferior.h (suppress_normal_stop_observer): Rename to...
6583         (suppress_run_stop_observers): ..this.
6584         * infcmd.c (suppress_normal_stop_observer): Rename to...
6585         (suppress_run_stop_observers): ..this.
6586         (finish_command_continuation, finish_command): Adjust.
6587         * infcall.c (call_function_by_hand): Adjust.
6588         * infrun.c (normal_stop): Call set_running.
6589         * target.c (target_resume): New.  Call set_running.
6590         * target.h (target_resume): Convert from macro to
6591         a function.
6592
6593         * mi/mi-interp.c (mi_on_resume): New.
6594         (mi_interpreter_init): Register mi_on_resume.
6595
6596 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
6597
6598         Use observers to report stop events in MI.
6599         * mi/mi-interp.c (mi_on_normal_stop): New.
6600         (mi_interpreter_init): Register mi_on_normal_stop.
6601         (mi_interpreter_exec_continuation): Remove.
6602         (mi_cmd_interpreter_exec): Don't register the above.
6603         * mi/mi-main.c (captured_mi_execute_command): Don't care
6604         about sync_execution.
6605         (mi_execute_async_cli_command): Don't install continuation.  Don't
6606         print *stopped.
6607         (mi_exec_async_cli_cmd_continuation): Remove.
6608
6609 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
6610
6611         Suppress normal stop observer when it's problematic.
6612         * inferior.h (suppress_normal_stop_observer): New.
6613         * infcall.c (call_function_by_hand): Disable stop events when
6614         doing function calls.
6615         * infmcd.c (suppress_normal_stop_observer): New.
6616         (finish_command_continuation): Call normal_stop observer
6617         explicitly.
6618         (finish_command): Disable stop events inside proceed.
6619         * infrun.c (normal_stop): Don't call normal stop observer if
6620         suppressed of if multi-step is in progress.
6621
6622 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
6623
6624         Remove stale code.
6625         * infrun.c (finish_command): Don't pass cleanup
6626         to continuation.
6627         (finish_command_continuation): Don't grab cleanup from
6628         the passed data, as we don't use, and cannot, use it anyway.
6629
6630 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
6631
6632         Introduce common cleanup for restoring integers.
6633         * defs.h (make_cleanup_restore_integer): New declaration.
6634         (struct cleanup): New field free_arg.
6635         (make_my_cleanup_2): New.
6636         * utils.c (restore_integer_closure, restore_integer)
6637         (make_cleanup_restore_integer): New.
6638         (make_my_cleanup): Initialize the free_arg field and
6639         renamed to make_my_cleanup_2.
6640         (do_my_cleanups): Call free_arg.
6641         (discard_cleanups): Call free_arg.
6642         * breakpoint.c (restore_always_inserted_mode): Remove.
6643         (update_breakpoints_after_exec): Use make_cleanup_restore_integer.
6644
6645 2008-06-09  Doug Evans  <dje@google.com>
6646
6647         * remote.c (remote_wait): Include beginning of malformed packet
6648         in error output.
6649
6650 2008-06-09  Tom Tromey  <tromey@redhat.com>
6651
6652         * completer.c (complete_line): Don't special-case
6653         expression_completer.
6654         (expression_completer): Only pass last word to
6655         location_completer.
6656         * c-exp.y (yylex): Check 'token', not 'operator'.
6657
6658 2008-06-09  Daniel Jacobowitz  <dan@codesourcery.com>
6659
6660         * configure.ac (build_warnings): Add -Wno-format for mingw.
6661         * configure: Regenerated.
6662
6663 2008-06-07  Daniel Jacobowitz  <dan@codesourcery.com>
6664
6665         * NEWS: Make indentation consistent.  Move exec tracing entry out
6666         of remote packet list.
6667
6668 2008-06-06  Tom Tromey  <tromey@redhat.com>
6669
6670         * value.h (evaluate_subexpression_type, extract_field_op):
6671         Declare.
6672         * printcmd.c (_initialize_printcmd): Use expression_completer for
6673         'p', 'inspect', 'call'.
6674         * parser-defs.h (parse_field_expression): Declare.
6675         * parse.c: Include exceptions.h.
6676         (in_parse_field, expout_last_struct): New globals.
6677         (mark_struct_expression): New function.
6678         (prefixify_expression): Return int.
6679         (prefixify_subexp): Return int.  Use expout_last_struct.
6680         (parse_exp_1): Update.
6681         (parse_exp_in_context): Add 'out_subexp' argument.  Handle
6682         in_parse_field.
6683         (parse_field_expression): New function.
6684         * expression.h (parse_field_expression): Declare.
6685         (in_parse_field): Likewise.
6686         * eval.c (evaluate_subexpression_type): New function.
6687         (extract_field_op): Likewise.
6688         * completer.h (expression_completer): Declare.
6689         * completer.c (expression_completer): New function.
6690         (count_struct_fields, add_struct_fields): New functions.
6691         * c-exp.y (yyparse): Redefine.
6692         (COMPLETE): New token.
6693         (exp): New productions.
6694         (saw_name_at_eof, last_was_structop): New globals.
6695         (yylex): Return COMPLETE when needed.  Recognize in_parse_field.
6696         (c_parse): New function.
6697         * breakpoint.c (_initialize_breakpoint): Use expression_completer
6698         for watch, awatch, and rwatch.
6699         * Makefile.in (parse.o): Depend on exceptions_h.
6700
6701 2008-06-06  Paul Pluzhnikov  <ppluzhnikov@google.com>
6702
6703         PR gdb/1147
6704         * gdb/valopts.c (find_overload_match): Handle references
6705         to pointers.
6706
6707 2008-06-06  Paul N. Hilfinger  <hilfinger@adacore.com>
6708
6709         * ada-lang.c (ada_value_assign): Correct big-endian case to take into
6710         account the bitsize of the 'from' operand.
6711
6712 2008-06-06  Pedro Alves  <pedro@codesourcery.com>
6713
6714         * annotate.h (annotate_thread_changed): Declare.
6715
6716 2008-06-06  Nick Roberts  <nickrob@snap.net.nz>
6717
6718         * annotate.c (annotate_thread_changed): New function.
6719         * thread.c (thread_command) : Use it.
6720         * infrun.c (normal_stop): Use it.
6721
6722 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
6723             Nathan Sidwell  <nathan@codesourcery.com>
6724             Joseph Myers  <joseph@codesourcery.com>
6725
6726         * acinclude.m4: Include ../config/acx.m4.
6727         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6728         * configure, config.in: Regenerate.
6729         * main.c (print_gdb_help): Use REPORT_BUGS_TO for bug-reporting
6730         address.
6731         * top.c (print_gdb_version): Use PKGVERSION and REPORT_BUGS_TO.
6732
6733 2008-06-05  Pedro Alves  <pedro@codesourcery.com>
6734
6735         Replace 'target async' by 'maintenance set remote-async' and
6736         'target remote' combination.
6737
6738         * remote.c (remote_async_wait): Merge into remote_wait, and
6739         remove.
6740         (remote_async_permitted, remote_async_permitted_set): New
6741         variables.
6742         (set_maintenance_remote_async_permitted)
6743         (show_maintenance_remote_async_permitted): New functions.
6744         (remote_async_ops, extended_async_remote_ops): Delete.
6745         (remote_async_open, extended_remote_async_open): Delete.
6746         (remote_open_1): Drop async_p parameter.  Update callers.  Replace
6747         async_p with remote_async_permitted checks.
6748         (extended_async_remote_attach): Delete.
6749         (remote_resume, remote_async_resume): Merge and leave remote_resume.
6750         (remote_async_terminal_inferior): Rename to...
6751         (remote_terminal_inferior): ... this, and add
6752         remote_async_termitted check.
6753         (remote_async_terminal_ours): Rename to...
6754         (remote_terminal_ours): ... this, and add remote_async_termitted
6755         check.
6756         (remote_wait, remote_async_wait): Merge and leave remote_wait
6757         only.
6758         (remote_kill, remote_async_kill): Merge and leave remote_kill
6759         only.
6760         (remote_async_mourn, extended_async_remote_mourn): Delete.
6761         (extended_remote_create_inferior_1): Drop async_p parameter.
6762         Update callers.  Always use extended_remote_ops.
6763         (extended_remote_async_create_inferior): Delete.
6764         (remote_return_zero): Delete.
6765         (init_remote_ops): Register remote_can_async_p, remote_async,
6766         remote_async_mask, remote_terminal_inferior and
6767         remote_terminal_ours.
6768         (remote_can_async_p, remote_is_async_p): Check for
6769         remote_async_permitted.
6770         (init_remote_async_ops, init_extended_async_remote_ops): Remove.
6771         (set_remote_cmd): Don't add async and extended-async targets.
6772         (_initialize_remote): Add set/show remote-async maintenance
6773         commands.
6774
6775 2008-06-05  Pedro Alves  <pedro@codesourcery.com>
6776
6777         * remote.c (kill_kludge): Delete.
6778         (remote_wait, remote_async_wait): Don't set it.
6779         (remote_kill, remote_async_kill): Don't do anything with it.
6780
6781 2008-06-05  Pedro Alves  <pedro@codesourcery.com>
6782
6783         * linux-thread-db.c (thread_db_wait): Don't trim event ptid.
6784
6785 2008-06-05  Aleksandar Ristovski  <aristovski@qnx.com>
6786
6787         * bcache.c (bcache_data): Call deprecated_bcache_added function.
6788         (deprecated_bcache_added): New function name. Body of function
6789         bcache_data is used here with the addition of 'added' argument.
6790         * bcache.h (deprecated_bcache_added): New function.
6791         * symfile.c (add_psymbol_to_bcache): New helper function, takes part of
6792         work from add_psymbol_to_list - initialises partial symbol and stashes
6793         it in objfile's cache.
6794         (append_psymbol_to_list): New helper function, takes other part of
6795         work from add_psymbol_to_list - adds partial symbol to the given list.
6796         (add_psymbol_to_list): Call helper functions instead of doing work
6797         here. If adding to global list, do not duplicate partial symbols in the
6798         partial symtab.
6799
6800 2008-06-05  Aleksandar Ristovski  <aristovski@qnx.com>
6801
6802         * breakpoint.c (print_exception_catchpoint): Put 'exception' back to
6803         'exception caught|thrown' message.
6804
6805 2008-06-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
6806
6807         * Makefile.in: Update dependencies.
6808         * dwarf2expr.c: New include "gdb_assert.h".
6809         (new_dwarf_expr_context): Initialize MAX_RECURSION_DEPTH.
6810         (dwarf_expr_eval): Sanity check the RECURSION_DEPTH count.
6811         (execute_stack_op): Error out on too large RECURSION_DEPTH.
6812         Increase/decrease RECURSION_DEPTH around the function.
6813
6814 2008-06-05  Daniel Jacobowitz  <dan@codesourcery.com>
6815
6816         * remote.c (get_offsets): Handle a single segment.
6817         * symfile.c (symfile_map_offsets_to_segments): Allow more bases
6818         than segments.
6819
6820 2008-06-03  Daniel Jacobowitz  <dan@codesourcery.com>
6821
6822         * solib-svr4.c (struct lm_info): Add lm_addr.
6823         (main_lm_addr): New.
6824         (svr4_default_sos): Set lm_addr.
6825         (svr4_current_sos): Set lm_addr and main_lm_addr.
6826         (svr4_fetch_objfile_link_map): Rewrite.
6827         (svr4_clear_solib): Clear main_lm_addr.
6828
6829 2008-06-03  Michael Snyder  <msnyder@redhat.com>
6830             Joseph Myers  <joseph@codesourcery.com>
6831
6832         * mips-tdep.c (mips_eabi_return_value): Replace stub that always
6833         returned RETURN_VALUE_STRUCT_CONVENTION with a real function.
6834
6835 2008-06-02  Roman Zippel <zippel@linux-m68k.org>
6836
6837         * m68klinux-tdep.c (m68k_linux_pc_in_sigtramp): Fix incorrect test.
6838
6839 2008-06-02  Roman Zippel <zippel@linux-m68k.org>
6840
6841         * m68k-tdep.c (m68k_analyze_prologue): Fix length of lea insn.
6842
6843 2008-06-01  Joel Brobecker  <brobecker@adacore.com>
6844
6845         * rs6000-aix-tdep.c (rs6000_convert_from_func_ptr_addr): Do not
6846         treat pointers in data space as function descriptors if the
6847         target address is also in the data space.
6848
6849 2008-05-30  Joel Brobecker  <brobecker@adacore.com>
6850
6851         * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): Set
6852         the trad-frame register value for the SP register.
6853
6854 2008-05-29  Mark Kettenis  <kettenis@gnu.org>
6855
6856         * sparcnbsd-tdep.c, sparcobsd-tdep.c: Update for unwinder changes.
6857
6858 2008-05-28  Joel Brobecker  <brobecker@adacore.com>
6859
6860         * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Improve the heuristic
6861         that identifies function descriptors outside of the .opd section.
6862
6863 2008-05-28  Aleksandar Ristovski  <aristovski@qnx.com>
6864
6865         * breakpoint.c (print_exception_catchpoint): In CLI add 'Temporary' for
6866         temporary catchpoints.  In MI add missing fields 'reason', 'disp',
6867         'bkptno'.
6868         (print_mention_exception_catchpoint): Add 'Temporary' for temporary
6869         catchpoints.
6870         (handle_gnu_v3_exceptions): Use tempflag.
6871
6872 2008-05-28  Vladimir Prus  <vladimir@codesourcery.com>
6873
6874         Refactor varobj_update interface.
6875         * varobj.c (varobj_update): Report changes as vector.  Also
6876         return not just a list of varobj, but a list of special structures
6877         that tell what exactly has changed.
6878         * varobj.h (enum varobj_update_error): Rename to
6879         varobj_scope_status.
6880         (struct varobj_update_result_t): New.
6881         (varobj_update): Adjust prototype.
6882         * mi/mi-cmd-var.c: Adjust for changes.
6883
6884 2008-05-28  Vladimir Prus  <vladimir@codesourcery.com>
6885
6886         * varobj.c (varobj_update): Fix comment typo.
6887         Fix indentation.
6888
6889 2008-05-26  Joel Brobecker  <brobecker@adacore.com>
6890
6891         Set the symtab field of symbols read from ECOFF debugging entries.
6892         * mdebugread.c (add_symbol): Add new parameter symtab.
6893         (parse_symbol): Update calls to add_symbol throughout.
6894
6895 2008-05-27  Andreas Schwab  <schwab@suse.de>
6896
6897         * symtab.h (enum address_class): Remove LOC_REGPARM and
6898         LOC_COMPUTED_ARG.
6899         (struct symbol): Add is_argument.
6900         (SYMBOL_IS_ARGUMENT): Define.
6901
6902         * ada-lang.c (ada_add_block_symbols): Use SYMBOL_IS_ARGUMENT.
6903         * buildsym.c (finish_block): Likewise.
6904         * stack.c (print_frame_args, print_block_frame_locals)
6905         (print_frame_arg_vars): Likewise.
6906         * symtab.c (lookup_block_symbol): Likewise.
6907         * tracepoint.c (add_local_symbols): Likewise.
6908         * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
6909
6910         * coffread.c (process_coff_symbol): Set SYMBOL_IS_ARGUMENT.
6911         * dwarf2read.c (new_symbol): Likewise.
6912         * mdebugread.c (parse_symbol): Likewise.
6913         * stabsread.c (define_symbol): Likewise.
6914
6915         * ada-exp.y (select_possible_type_sym): Don't handle LOC_REGPARM
6916         and LOC_COMPUTED_ARG.
6917         * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
6918         * ax-gdb.c (gen_var_ref): Likewise.
6919         * eval.c (evaluate_subexp_for_address): Likewise.
6920         * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
6921         * m2-exp.y (yylex): Likewise.
6922         * printcmd.c (address_info): Likewise.
6923         * symmisc.c (print_symbol, print_partial_symbols): Likewise.
6924         * tracepoint.c (collect_symbol, scope_info): Likewise.
6925
6926 2008-05-24  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>
6927
6928         * gdbarch.sh: Added new gdbarch struct
6929         core_regset_sections.
6930         * gdbarch.c: Refreshed.
6931         * gdbarch.h: Refreshed.
6932         * regset.h (core_regset_section): Declared.
6933         * linux-nat.c (linux_nat_do_thread_registers): Added
6934         support for the new gdbarch struct core_regset_sections.
6935         * utils.c (host_address_to_string): New function.
6936         * defs.h (host_address_to_string): New prototype.
6937         * i386-linux-tdep.c (i386_regset_rections): New register
6938         sections list for i386.
6939           (i386_linux_init_abi): Initialized new gdbarch struct
6940           core_regset_sections.
6941         * Makefile.in: Updated to reflect dependency changes.
6942         * ppc-linux-tdep.c (ppc_regset_sections): Register
6943         sections list for ppc.
6944           (ppc_linux_init_abi): Initialized new gdbarch struct
6945           core_regset_sections
6946
6947 2008-05-24  Andreas Schwab  <schwab@suse.de>
6948
6949         * linespec.c (decode_objc): Save current language around call to
6950         get_selected_block.
6951
6952 2008-05-23  Joel Brobecker  <brobecker@adacore.com>
6953
6954         * valprint.h (get_array_bounds): Renames get_array_low_bound.
6955         * valprint.c (get_array_bounds): Renames get_array_low_bound.
6956         Return the proper bound value if the array index type is an
6957         enumerated type. Compute the high bound if requested.
6958         (val_print_array_elements): Handle the case when the array
6959         element has a null size.
6960         * ada-valprint.c (print_optional_low_bound): Add handling
6961         for empty arrays or arrays of zero-size elements.
6962         (ada_val_print_array): New function, extracted out from
6963         ada_val_print_1 case TYPE_CODE_ARRAY, and enhanced to
6964         handle empty arrays and arrays of zero-size elements.
6965         (ada_val_print_1)[case TYPE_CODE_ARRAY]: Replace extracted-out
6966         code by call to ada_val_print_array.
6967         (ada_value_print): Remove handling of null array.  The handling
6968         was incomplete and is now better handled by ada_val_print_array.
6969
6970 2008-05-23 Markus Deuling  <deuling@de.ibm.com>
6971
6972         * annotate.c (annotate_source, annotate_frame_begin): Replace
6973         deprecated_print_address_numeric with paddress.
6974         * cli/cli-cmds.c (list_command, edit_command): Likewise.
6975         * tui/tui-stack.c (tui_make_status_line): Likewise.
6976
6977         * defs.h (deprecated_print_address_numeric): Remove.
6978         * printcmd.c (deprecated_print_address_numeric): Remove.
6979         * maint.c (maint_print_section_info): Fix comment.
6980
6981 2008-05-23 Markus Deuling  <deuling@de.ibm.com>
6982
6983         * valprint.c (print_hex_chars, print_octal_chars, print_decimal_chars,
6984         print_binary_chars, print_char_chars): Add byte_order parameter and
6985         replace gdbarch_byte_order.
6986         (print_decimal_chars): Replace START_P, NOT_END_P and NEXT_P by their
6987         expressions and remove them.  Remove unused TWO_TO_FOURTH.
6988         (val_print_type_code_int): Introduce gdbarch_byte_order to get at the
6989         endianness.  Update call to print_hex_chars.
6990         * valprint.h (print_hex_chars, print_octal_chars, print_decimal_chars,
6991         print_binary_chars, print_char_chars): Add byte_order parameter.
6992         * printcmd.c (print_scalar_formatted): Introduce gdbarch_byte_order to
6993         get at the endianness.  Update print_*_char calls to use byte_order.
6994
6995 2008-05-22  Ulrich Weigand  <uweigand@de.ibm.com>
6996
6997         * symtab.h (struct symbol): Make "aux_value" member a void pointer
6998         instead of a union.
6999         (SYMBOL_LOCATION_BATON): Update.
7000
7001 2008-05-22  Ulrich Weigand  <uweigand@de.ibm.com>
7002
7003         * symtab.h (enum address_class): Remove LOC_BASEREG and
7004         LOC_BASEREG_ARG.
7005         (struct symbol): Remove "basereg" member of "aux_value" union.
7006         (SYMBOL_BASEREG): Remove.
7007
7008         * ada-exp.y (select_possible_type_sym): Do not handle LOC_BASEREG
7009         or LOC_BASEREG_ARG.
7010         * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
7011         (ada_add_block_symbols): Likewise.
7012         * ax-gdb.c (gen_var_ref): Likewise.
7013         * buildsym.c (finish_block): Likewise.
7014         * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
7015         * m2-exp.y (yylex): Likewise.
7016         * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
7017         * printcmd.c (address_info): Likewise.
7018         * stack.c (print_frame_args, print_block_frame_locals): Likewise.
7019         (print_frame_arg_vars): Likewise.
7020         * symmisc.c (print_symbol): Likewise.
7021         * symtab.c (lookup_block_symbol): Likewise.
7022         * tracepoint.c (collect_symbol, add_local_symbols): Likewise.
7023         (scope_info): Likewise.
7024
7025 2008-05-22  Ulrich Weigand  <uweigand@de.ibm.com>
7026
7027         * symtab.h (enum address_class): Remove LOC_LOCAL_ARG.
7028
7029         * ada-exp.y (select_possible_type_sym): Do not handle LOC_LOCAL_ARG.
7030         * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
7031         (ada_add_block_symbols): Likewise.
7032         * ax-gdb.c (gen_var_ref): Likewise.
7033         * buildsyms.c (finish_block): Likewise.
7034         * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
7035         * m2-exp.y (yylex): Likewise.
7036         * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
7037         * printcmd.c (address_info): Likewise.
7038         * stack.c (print_frame_args, print_frame_arg_vars): Likewise.
7039         * symmisc.c (print_symbol, print_partial_symbols): Likewise.
7040         * symtab.c (lookup_block_symbol): Likewise.
7041         * tracepoint.c (collect_symbol, add_local_symbols): Likewise.
7042         (scope_info): Likewise.
7043
7044 2008-05-22  Ulrich Weigand  <uweigand@de.ibm.com>
7045
7046         * symtab.h (enum address_class): Remove LOC_INDIRECT and
7047         LOC_HP_THREAD_LOCAL_STATIC.
7048
7049         * findvar.c (symbol_read_needs_frame, read_var_value): Do not
7050         handle LOC_INDIRECT or LOC_HP_THREAD_LOCAL_STATIC.
7051         (read_var_value): Likewise.
7052         * buildsym.c (finish_block): Likewise.
7053         * objfiles.c (objfile_relocate): Likewise.
7054         * printcmd.c (address_info): Likewise.
7055         * symmisc.c (print_symbol, print_partial_symbols): Likewise.
7056         * tracepoint.c (scope_info): Likewise.
7057
7058 2008-05-21 Markus Deuling  <deuling@de.ibm.com>
7059            Maxim Grigoriev  <maxim2405@gmail.com>
7060
7061         * xtensa-tdep.c (xtensa_read_register): Remove.
7062         (xtensa_frame_cache): Get rid of xtensa_read_register. Pass extra
7063         argument litbase to call0_frame_cache().
7064         (call0_track_op, call0_analyze_prologue)
7065         (call0_frame_cache): Use extra argument litbase.
7066
7067 2008-05-21  Joel Brobecker  <brobecker@adacore.com>
7068
7069         * infcmd.c (_initialize_infcmd): Add new "fin" alias for "finish".
7070
7071 2008-05-21  Ulrich Weigand  <uweigand@de.ibm.com>
7072
7073         * frame.h (SIZEOF_FRAME_SAVED_REGS): Remove.
7074
7075 2008-05-21  Ulrich Weigand  <uweigand@de.ibm.com>
7076
7077         * alpha-mdebug-tdep.c: Include "trad-frame.h".
7078         (struct alpha_mdebug_unwind_cache): Change type of SAVED_REGS to
7079         struct trad_frame_saved_reg *.
7080         (alpha_mdebug_frame_unwind_cache): Allocate SAVED_REGS using
7081         trad_frame_alloc_saved_regs.  Update accesses.  Record previous
7082         value of SP as being vfp.
7083         (alpha_mdebug_frame_prev_register): Use trad_frame_get_prev_register.
7084         * Makefile.in (alpha-mdebug-tdep.o): Update dependencies.
7085
7086 2008-05-21  Markus Deuling  <deuling@de.ibm.com>
7087
7088         * score-tdep.c (score_print_insn): Get the current endianess from
7089         disassemble_info instead of gdbarch_byte_order.
7090
7091 2008-05-21  Pedro Alves  <pedro@codesourcery.com>
7092
7093         * frame.c (get_prev_frame_1): Build frame id before setting
7094         this_frame->prev_p, not after.
7095
7096 2008-05-21  Nick Roberts  <nickrob@snap.net.nz>
7097
7098         * annotate.c (annotate_new_thread): New function for new-thread
7099         annotation.
7100         * annotate.h: (annotate_new_thread): New extern.
7101         * thread.c (add_thread_with_info): Use it.
7102         * Makefile.in (thread.o): Add dependency on annotate.h.
7103
7104 2008-05-20  Joel Brobecker  <brobecker@adacore.com>
7105
7106         * win32-nat.c (win32_wait): Block the control-c event while
7107         waiting for a debug event.
7108
7109 2008-05-19  Pedro Alves  <pedro@codesourcery.com>
7110
7111         * symtab.h (lookup_symbol_in_language): Update comment.
7112         * symtab.c (lookup_symbol_aux_block): Update comment.
7113         * ada-lang.c (ada_lookup_symbol_list): Update comment.
7114
7115 2008-05-19  Ulrich Weigand  <uweigand@de.ibm.com>
7116
7117         * symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter.
7118         (lookup_symbol): Likewise.
7119         * symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter.
7120         (lookup_symbol): Likewise.
7121         (search_symbols): Update.
7122
7123         * linespec.c (find_methods, collect_methods): Update.
7124         (add_matching_methods, add_constructors): Update.
7125         (decode_compound, decode_dollar, decode_variable): Update.
7126         (lookup_prefix_sym): Update.
7127
7128         (symbol_found): Remove SYM_SYMTAB parameter.
7129         Use SYMBOL_SYMTAB (sym) instead.
7130
7131         * gdbtypes.c (lookup_typename): Update.
7132         (lookup_struct, lookup_union, lookup_enum): Update.
7133         (lookup_template_type): Update.
7134         (check_typedef): Update.
7135         * language.c (lang_bool_type): Update.
7136         * mdebugread.c (parse_procedure): Update.
7137         * mi/mi-cmd-stack.c (list_args_or_locals): Update.
7138         * parse.c (write_dollar_variable): Update.
7139         * printcmd.c (address_info): Update.
7140         * source.c (select_source_symtab): Update.
7141         * stack.c (print_frame_args, print_frame_arg_vars): Update.
7142         * valops.c (find_function_in_inferior): Update.
7143         (value_struct_elt_for_reference): Update.
7144         * value.c (value_static_field, value_fn_field): Update.
7145
7146         * alpha-mdebug-tdep.c (find_proc_desc): Update.
7147         * arm-tdep.c (arm_skip_prologue): Update.
7148         * mt-tdep.c (mt_skip_prologue): Update.
7149         * xstormy16-tdep.c (xstormy16_skip_prologue): Update.
7150
7151         * ada-lang.h (struct ada_symbol_info): Remove SYMTAB member.
7152         * ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter.
7153         (add_defn_to_vec): Likewise.
7154         (ada_add_block_symbols): Likewise.
7155         (lookup_cached_symbol, cache_symbol): Likewise.
7156         (standard_lookup): Update.
7157         (ada_lookup_symbol_list): Update.
7158
7159         * c-valprint.c (c_val_print): Update.
7160         * cp-support.c (cp_lookup_rtti_type): Update.
7161         * jv-lang.c (java_lookup_class, get_java_object_type): Update.
7162         * objc-lang.c (lookup_struct_typedef, find_imps): Update.
7163         * p-valprint.c (pascal_val_print): Update.
7164         * scm-lang.c (scm_lookup_name): Update.
7165
7166         * c-exp.y: Update.
7167         * f-exp.y: Update.
7168         * jv-exp.y: Update.
7169         * m2-exp.y: Update.
7170         * objc-exp.y: Update.
7171         * p-exp.y: Update.
7172
7173 2008-05-19  Ulrich Weigand  <uweigand@de.ibm.com>
7174
7175         * language.h (struct language_defn): Remove SYMTAB parameter from
7176         la_lookup_symbol_nonlocal callback function pointer.
7177
7178         * ada-lang.h (ada_lookup_encoded_symbol): Remove SYMTAB parameter.
7179         (ada_lookup_encoded_symbol): Likewise.
7180         * ada-lang.c (ada_lookup_encoded_symbol): Remove SYMTAB parameter.
7181         Always call fixup_symbol_section.
7182         (ada_lookup_symbol): Remove SYMTAB parameter.
7183         (ada_lookup_symbol_nonlocal): Likewise.
7184         * ada-exp.y (write_object_renaming): Update.
7185         (find_primitive_type): Likewise.
7186
7187         * cp-support.h (cp_lookup_symbol_nonlocal): Remove SYMTAB parameter.
7188         (cp_lookup_symbol_namespace): Likewise.
7189         * cp-namespace.c (lookup_namespace_scope): Remove SYMTAB parameter.
7190         (lookup_symbol_file): Likewise.
7191         (lookup_possible_namespace_symbol): Likewise.
7192         (cp_lookup_symbol_nonlocal): Likewise.
7193         (cp_lookup_symbol_namespace): Likewise.
7194         (cp_lookup_nested_type): Update.
7195
7196         * scm-valprint.c (scm_inferior_print): Update.
7197         * valops.c (value_maybe_namespace_elt): Update.
7198
7199         * solist.h (struct target_so_ops): Remove SYMTAB parameter from
7200         lookup_lib_global_symbol callback function pointer.
7201         (solib_global_lookup): Remove SYMTAB parameter.
7202         * solib.c (solib_global_lookup): Remove SYMTAB parameter.
7203         * solib-svr4.c (elf_lookup_lib_symbol): Likewise.
7204
7205         * symtab.h (basic_lookup_symbol_nonlocal): Remove SYMTAB parameter.
7206         (lookup_symbol_static): Likewise.
7207         (lookup_symbol_global): Likewise.
7208         (lookup_symbol_aux_block): Likewise.
7209         (lookup_global_symbol_from_objfile): Likewise.
7210         * symtab.c (lookup_symbol_aux): Remove SYMTAB parameter.
7211         (lookup_symbol_aux_local): Likewise.
7212         (lookup_symbol_aux_block): Likewise.
7213         (lookup_symbol_aux_symtabs): Likewise.
7214         (lookup_symbol_aux_psymtabs): Likewise.
7215         (lookup_global_symbol_from_objfile): Likewise.
7216         (basic_lookup_symbol_nonlocal): Likewise.
7217         (lookup_symbol_static): Likewise.
7218         (lookup_symbol_global): Likewise.
7219
7220         (lookup_symbol_in_language): Do not pass SYMTAB to lookup_symbol_aux.
7221
7222 2008-05-17  Pedro Alves  <pedro@codesourcery.com>
7223
7224         * remote.c (init_extended_remote_ops): Fix typo.
7225
7226 2008-05-16  Pedro Alves  <pedro@codesourcery.com>
7227
7228         * NEWS: Mention new DICOS x86 target configuration.
7229
7230 2008-05-16  Pedro Alves  <pedro@codesourcery.com>
7231             Ulrich Weigand  <uweigand@de.ibm.com>
7232
7233         * minsyms.c (lookup_minimal_symbol_by_pc_name): New function.
7234         * symtab.h (lookup_minimal_symbol_by_pc_name): Add prototype.
7235
7236         * symtab.c (fixup_section): Remove prototype.  Add ADDR parameter;
7237         use it instead of ginfo->value.address.  Look up minimal symbol by
7238         address and name.  Assume OBJFILE is non-NULL.
7239         (fixup_symbol_section): Ensure we always have an objfile to look
7240         into.  Extract and pass to fixup_section the symbol's address that
7241         will match the minimal symbol's address.
7242         (fixup_psymbol_section): Likewise.
7243
7244         (find_pc_sect_psymtab): Fall back to non-addrmap case when debugging
7245         overlays and the addrmap returned the wrong section.
7246
7247         * dwarf2read.c (var_decode_location): Set SYMBOL_CLASS before
7248         calling fixup_symbol_section.
7249
7250 2008-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
7251
7252         * minsyms.c: Include "target.h".
7253         (find_solib_trampoline_target): Handle minimal symbols pointing
7254         to function descriptors as well.
7255         * Makefile.in (minsyms.o): Update dependencies.
7256
7257         * ppc-linux-tdep.c (ppc64_standard_linkage): Rename to ...
7258         (ppc64_standard_linkage1): ... this.  Fix optional instructions.
7259         (PPC64_STANDARD_LINKAGE_LEN): Rename to ...
7260         (PPC64_STANDARD_LINKAGE1_LEN): ... this.
7261         (ppc64_standard_linkage2, ppc64_standard_linkage3): New.
7262         (PPC64_STANDARD_LINKAGE2_LEN, PPC64_STANDARD_LINKAGE3_LEN): New.
7263         (ppc64_standard_linkage_target): Rename to ...
7264         (ppc64_standard_linkage1_target): ... this.
7265         (ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): New.
7266         (ppc64_skip_trampoline_code): Support three variants of standard
7267         linkage stubs.  Call find_solib_trampoline_target to handle
7268         glink stubs.
7269
7270 2008-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
7271
7272         * ppc-linux-tdep.c (ppc_linux_init_abi): Do not install
7273         ppc64_sysv_abi_adjust_breakpoint_address.
7274         * ppc-sysv-tdep.c (ppc64_sysv_abi_adjust_breakpoint_address): Remove.
7275         * ppc-tdep.h (ppc64_sysv_abi_adjust_breakpoint_address): Remove.
7276
7277 2008-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
7278
7279         * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Remove.
7280         (ppc_linux_init_abi): Install find_solib_trampoline_target instead
7281         of ppc_linux_skip_trampoline_code.
7282
7283 2008-05-15  Daniel Jacobowitz  <dan@codesourcery.com>
7284
7285         * gdbarch.sh: Delete dwarf_reg_to_regnum.
7286         * gdbarch.c, gdbarch.h: Regenerated.
7287         * amd64-tdep.c, arm-tdep.c, h8300-tdep.c, hppa-linux-tdep.c,
7288         hppa-tdep.c, i386-tdep.c, m32c-tdep.c, m68k-tdep.c, mips-tdep.c,
7289         s390-tdep.c, xtensa-tdep.c: Do not set dwarf_reg_to_regnum.
7290
7291 2008-05-15  Pedro Alves  <pedro@codesourcery.com>
7292
7293         * linux-nat.c (trap_ptid): Delete.
7294         (linux_nat_detach, linux_nat_wait, linux_nat_mourn_inferior):
7295         Adjust.
7296         * linux-thread-db.c (thread_db_wait): Adjust.
7297
7298 2008-05-15  Joel Brobecker  <brobecker@adacore.com>
7299
7300         * linespec.c (decode_line_1): Fix a couple of comments.
7301
7302 2008-05-15  Alan Modra  <amodra@bigpond.net.au>
7303
7304         * dbxread.c: Formatting.
7305         (INTERNALIZE_SYMBOL): Init n_other.
7306         (set_namestring): Take pointer to nlist arg rather than struct
7307         copy.  Update all callers.
7308
7309 2008-05-15  Andreas Schwab  <schwab@suse.de>
7310
7311         * Makefile.in (dwarf2loc.o): Remove $(addrmap_h).
7312         (dwarf2read.o): Add $(addrmap_h).
7313
7314 2008-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
7315
7316         * ppc-linux-tdep.c (ppc_linux_convert_from_func_ptr_addr): Rename ...
7317         (ppc64_linux_convert_from_func_ptr_addr): ... to this.  No longer try
7318         to handle ppc32 PLT entries.
7319         (ppc_linux_init_abi): Install ppc64_linux_convert_from_func_ptr_addr
7320         only on ppc64.
7321
7322 2008-05-14  Daniel Jacobowitz  <dan@codesourcery.com>
7323
7324         * elfread.c (elf_symtab_read): Create trampolines for @plt symbols.
7325         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Renamed from
7326         lookup_minimal_symbol_by_pc_section.  Prefer trampolines if requested.
7327         (lookup_minimal_symbol_by_pc_section): Use
7328         lookup_minimal_symbol_by_pc_section_1.
7329         (lookup_solib_trampoline_symbol_by_pc): Likewise.
7330
7331 2008-05-13  Joel Brobecker  <brobecker@adacore.com>
7332
7333         * findcmd.c: Add #include "gdb_stdint.h".
7334         * Makefile.in (findcmd.o): Update dependencies.
7335
7336 2008-05-11  David S. Miller  <davem@davemloft.net>
7337
7338         * sparc-linux-tdep.c (sparc32_linux_init_abi): Remove
7339         long double size override, Linux does use 128-bit now.
7340
7341         * sparc-linux-tdep.c (PSR_SYSCALL): Define.
7342         (sparc_linux_write_pc): New function.
7343         (sparc32_linux_init_abi): Register it.
7344         * sparc64-linux-tdep.c (TSTATE_SYSCALL): Define.
7345         (sparc64_linux_write_pc): New function.
7346         (sparc64_linux_init_abi): Register it.
7347
7348         * sparc-linux-tdep.c, sparc64-linux-tdep.c: Use
7349         dwarf2_append_unwinders(), not dwarf2_frame_sniffer.
7350
7351 2008-05-11  Ulrich Weigand  <uweigand@de.ibm.com>
7352
7353         * rs6000-tdep.c (rs6000_gdbarch_init): Set up info.target_desc
7354         and info.tdep_info before calling gdbarch_init_osabi.
7355
7356 2008-05-09  Joel Brobecker  <brobecker@adacore.com>
7357
7358         * ada-lang.c (ada_evaluate_subexp) [BINOP_ASSIGN]: Do not force
7359         the type of the right hand side of the assignment to the type
7360         of the left hand side if the left hand side is a convenience
7361         variable.
7362
7363 2008-05-09  Ulrich Weigand  <uweigand@de.ibm.com>
7364
7365         * NEWS: Mention gdbserver bi-arch capability.
7366
7367 2008-05-09  Doug Evans  <dje@google.com>
7368
7369         New "find" command.
7370         * NEWS: Document find command and qSearch:memory packet.
7371         * Makefile.in (SFILES): Add findcmd.c.
7372         (COMMON_OBJS): Add findcmd.o.
7373         (findcmd.o): New rule.
7374         * findcmd.c: New file.
7375         * target.h (target_ops): New member to_search_memory.
7376         (simple_search_memory): Declare.
7377         (target_search_memory): Declare.
7378         * target.c (simple_search_memory): New fn.
7379         (target_search_memory): New fn.
7380         * remote.c (PACKET_qSearch_memory): New packet kind.
7381         (remote_search_memory): New fn.
7382         (init_remote_ops): Init to_search_memory.
7383         (init_extended_remote_ops): Ditto.
7384         (_initialize_remote): Add qSearch:memory packet config command.
7385
7386 2008-05-09  Eli Zaretskii  <eliz@gnu.org>
7387
7388         * thread.c (_initialize_thread): Don't use commas and periods in
7389         first line of doc string of "set/show print thread-events".
7390
7391 2008-05-08  Joel Brobecker  <brobecker@adacore.com>
7392
7393         * alpha-mdebug-tdep.c, alpha-osf1-tdep.c, alpha-tdep.c:
7394         Update for unwinder changes.
7395
7396 2008-05-08  Joel Brobecker  <brobecker@adacore.com>
7397
7398         * frame.c (get_frame_base_address, get_frame_locals_address)
7399         (get_frame_args_address): Pass the correct frame when calling
7400         frame_base_find_by_frame.
7401
7402 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7403
7404         * remote.c (extended_remote_attach_1): Call target_find_description.
7405
7406 2008-05-08  Daniel Jacobowitz  <dan@codesourcery.com>
7407
7408         * remote.c (extended_remote_create_inferior_1): Clean up
7409         before marking the target running.
7410
7411 2008-05-08  Joel Brobecker  <brobecker@adacore.com>
7412
7413         * hppa-tdep.h, hppa-tdep.c, hppa-hpux-tdep.c: Update for unwinder
7414         changes.
7415
7416 2008-05-07  Joel Brobecker  <brobecker@adacore.com>
7417
7418         * sparc-tdep.c, sparc-tdep.h, sparc-sol2-tdep.c, sparc64-tdep.c,
7419         sparc64-sol2-tdep.c: Update for unwinder changes.
7420
7421 2008-05-07  Daniel Jacobowitz  <dan@codesourcery.com>
7422
7423         * cp-support.c (mangled_name_to_comp): Initialize storage.
7424         (unqualified_name_from_comp): Likewise.
7425
7426 2008-05-07  Jie Zhang  <jie.zhang@analog.com>
7427
7428         * remote.c (remote_insert_breakpoint): Call get_remote_state
7429         after gdbarch_breakpoint_from_pc is called.
7430         (remote_insert_hw_breakpoint): Likewise.
7431
7432 2008-05-06  Joel Brobecker  <brobecker@adacore.com>
7433
7434         * valprint.c (val_print): Add new language parameter and use it
7435         instead of using the current_language. Update calls to val_print
7436         throughout.
7437         (common_val_print): Add new langauge parameter and pass it to
7438         val_print.
7439         * value.h (struct language_defn): Add opaque declaration.
7440         (val_print, common_val_print): Update declarations.
7441         * stack.c (print_frame_args): Update call to common_val_print
7442         using the appropriate language.
7443         * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
7444         * c-valprint, f-valprint.c, m2-valprint.c, mt-tdep.c, infcmd.c,
7445         mi/mi-main.c, jv-valprint.c, ada-valprint.c, varobj.c, p-valprint.c,
7446         scm-valprint.c, cp-valprint.c, sh64-tdep.c, printcmd.c:
7447         #include "language.h" if necessary.
7448         Update calls to val_print and common_val_print.
7449         * Makefile.in (mt-tdep.o, sh64-tdep.o, mi-cmds.o, mi-main.o):
7450         Update dependencies.
7451
7452 2008-05-06  Joel Brobecker  <brobecker@adacore.com>
7453
7454         * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Treat addresses
7455         pointing inside a non-executable section as function descriptors.
7456
7457 2008-05-06  Pedro Alves  <pedro@codesourcery.com>
7458
7459         * inf-loop.c (inferior_event_handler): Run all continuations and
7460         print any language change before running the breakpoint commands.
7461
7462 2008-05-06  Joel Brobecker  <brobecker@adacore.com>
7463
7464         * frame-unwind.c (frame_unwind_got_bytes): New function.
7465         * frame-unwind.h (frame_unwind_got_bytes): Add declaration.
7466         * libunwind-frame.h, libunwind-frame.c, ia64-tdep.c: Update
7467         for unwinder changes.
7468
7469 2008-05-05  Doug Evans  <dje@google.com>
7470
7471         * NEWS: Mention new /m modifier for disassemble command.
7472         * cli/cli-cmds.c (print_disassembly): New function.
7473         (disassemble_current_function): New function
7474         (disassemble_command): Recognize /m modifier, print mixed
7475         source+assembly.
7476         (init_cli_cmds): Update disassemble help text.
7477
7478 2008-05-05  Maxim Grigoriev  <maxim2405@gmail.com>
7479
7480         * xtensa-tdep.c: Update for unwinder changes.
7481
7482 2008-05-05  Andreas Schwab  <schwab@suse.de>
7483
7484         Update m68k port for unwinder changes.
7485         * m68k-tdep.c (m68k_frame_cache): Expect this_frame.
7486         (m68k_frame_this_id, m68k_frame_prev_register): Update signature.
7487         (m68k_frame_unwind): Use default_frame_sniffer.
7488         (m68k_frame_sniffer): Remove.
7489         (m68k_frame_base_address): Expect this_frame.
7490         (m68k_dummy_id): Renamed from m68k_unwind_dummy_id.  Expect
7491         this_frame.
7492         (m68k_gdbarch_init): Use set_gdbarch_dummy_id,
7493         dwarf2_append_unwinders, and frame_unwind_append_unwinder.
7494         * m68klinux-tdep.c (m68k_linux_pc_in_sigtramp): Expect frame_info
7495         parameter instead of pc value.
7496         (m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
7497         Expect this_frame.
7498         (m68k_linux_sigtramp_frame_this_id)
7499         (m68k_linux_sigtramp_frame_prev_register)
7500         (m68k_linux_sigtramp_frame_sniffer): Update signature.
7501         (m68k_linux_sigtramp_frame_unwind): Use
7502         m68k_linux_sigtramp_frame_sniffer.
7503         (m68k_linux_init_abi): Use frame_unwind_append_unwinder.
7504
7505         * m68klinux-nat.c (store_register): Fix typo.
7506
7507 2008-05-05  Pedro Alves  <pedro@codesourcery.com>
7508
7509         * infcmd.c (step_1): Put thread id on the stack to avoid possible
7510         NULL dereferencing.
7511
7512 2008-05-05  Luis Machado  <luisgpm@br.ibm.com>
7513
7514         * symfile.c (reread_symbols): Update objfile's entry point.
7515
7516 2008-05-05  Aleksandar Ristovski  <aristovski@qnx.com>
7517             Joel Brobecker  <brobecker@adacore.com>
7518
7519         * ada-lang.c: Update throughout to use symbol_matches_domain
7520         instead of matching the symbol domain explictly.
7521         * dwarf2read.c (add_partial_symbol): Do not add new psym for
7522         STRUCT_DOMAIN. Make sure you recognize c++ struct and java and ada
7523         class as typedefs. See lookup_partial_symbol function.
7524         (new_symbol): Similar to add_partial_symbol, do not create
7525         symbol for the typedef. See lookup_block_symbol.
7526         * symtab.c (symbol_matches_domain): New function, takes care
7527         of dual meaning of STRUCT_DOMAIN symbol for c++, ada and java.
7528         (lookup_partial_symbol): Use symbol_matches_domain to see if the
7529         found psym domain matches the given domain.
7530         (lookup_block_symbol): Likewise.
7531
7532 2008-05-05  Vladimir Prus  <vladimir@codesourcery.com>
7533
7534         * top.c (command_line_handler_continuation): Remove.
7535         (execute_command): Do not install the above.
7536
7537 2008-05-05  Vladimir Prus  <vladimir@codesourcery.com>
7538
7539         * inf-loop.c (inferior_event_handler): Call bpstat_do_action,
7540         and catch all exceptions from it.
7541         * top.c (command_line_handler_continuation): Don't
7542         call bpstat_do_action here.
7543
7544 2008-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
7545
7546         * dwarf2read.c (struct dwarf2_cu): Add type_hash.
7547         (struct die_info): Remove type.
7548         (read_type_die, read_typedef, read_base_type, read_subrange_type)
7549         (read_structure_type, read_enumeration_type, read_array_type)
7550         (read_tag_pointer_type, read_tag_ptr_to_member_type)
7551         (read_tag_reference_type, read_tag_const_type, read_tag_volatile_type)
7552         (read_tag_string_type, read_subroutine_type, read_set_type)
7553         (read_unspecified_type): Delete prototypes.  Remove check for
7554         already-loaded type.  Return the new type.
7555         (set_die_type): Return the new type.
7556         (reset_die_and_siblings_types): Delete.
7557         (load_comp_unit, load_full_comp_unit): Set type_hash.
7558         (process_queue): Remove call to reset_die_and_siblings_types.
7559         (process_die): Do not read most types here.  Use read_type_die
7560         for others.
7561         (read_func_scope, dwarf2_add_member_fn): Use read_type_die.
7562         (quirk_gcc_member_function_pointer): Return the new type.
7563         (process_structure_scope, process_enumeration_scope): Use
7564         get_die_type and read the DIE's type.
7565         (read_full_die): Do not initialize die->type.
7566         (tag_type_to_type): Use read_type_die.
7567         (read_type_die): Check for already defined types.  Return the
7568         type.
7569         (determine_prefix): Use get_die_type.
7570         (set_die_type): Return the type.
7571         (get_die_type): Take a CU argument.  Check for no type_hash.
7572
7573 2008-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
7574
7575         * dwarf2read.c (dwarf2_ranges_read, read_partial_die): Initialize
7576         locals.
7577
7578 2008-05-04  Pedro Alves  <pedro@codesourcery.com>
7579
7580         * breakpoint.c (update_breakpoints_after_exec): Delete bp_longjmp
7581         and bp_longjmp_resume breakpoints.
7582         (breakpoint_address_is_meaningful): Claim bp_longjmp_resume as
7583         meaningful.
7584         (create_longjmp_breakpoint): Don't create bp_longjmp_resume
7585         breakpoints.  Create bp_longjmp breakpoints as momentary
7586         breakpoints.
7587         (enable_longjmp_breakpoint): Delete.
7588         (set_longjmp_breakpoint): New.
7589         (disable_longjmp_breakpoint): Delete.
7590         (delete_longjmp_breakpoint): New.
7591         (set_longjmp_resume_breakpoint): Delete.
7592         (set_momentary_breakpoint_at_pc): New.
7593         (breakpoint_re_set_one): Don't delete bp_longjmp and
7594         bp_longjmp_resume breakpoints.
7595         (breakpoint_re_set): Don't create longjmp and longjmp-resume
7596         breakpoints.
7597
7598         * infrun.c (step_resume_breakpoint): Add comment.
7599         (struct execution_control_state): Delete handling_longjmp member.
7600         (init_execution_control_state). Don't clear handling_longjmp.
7601         (context_switch): Don't context switch handling_longjmp.
7602         (handle_inferior_event): If handling a bp_longjmp breakpoint,
7603         create a bp_longjmp_resume breakpoint, and set it as current
7604         step_resume_breakpoint, then step over the longjmp breakpoint.  If
7605         handling a bp_longjmp_resume breakpoint, don't delete the longjmp
7606         breakpoint, delete the longjmp-resume breakpoint, and stop
7607         stepping.
7608         (currently_stepping): Remove handling_longjmp from expression.
7609         (insert_step_resume_breakpoint_at_sal): Update comment.
7610         (insert_longjmp_resume_breakpoint): New.
7611
7612         * breakpoint.h (set_momentary_breakpoint_at_pc): Declare.
7613         (enable_longjmp_breakpoint, disable_longjmp_breakpoint): Delete
7614         declarations.
7615         (set_longjmp_breakpoint, delete_longjmp_breakpoint): Declare.
7616         (set_longjmp_resume_breakpoint): Delete declaration.
7617
7618         * gdbthread.h (save_infrun_state): Remove handling_longjmp
7619         parameter.
7620         (load_infrun_state): Delete *handling_longjmp parameter.
7621         * thread.c (save_infrun_state): Remove handling_longjmp parameter.
7622         Update body.
7623         (load_infrun_state): Delete *handling_longjmp parameter.  Update
7624         body.
7625
7626         * infcmd.c (disable_longjmp_breakpoint_cleanup): Delete.
7627         (delete_longjmp_breakpoint_cleanup): New.
7628         (step_1): Call set_longjmp_breakpoint instead of
7629         enable_longjmp_breakpoint.  Use delete_longjmp_breakpoint_cleanup
7630         instead of disable_longjmp_breakpoint_cleanup when making cleanup.
7631         (step_1_continuation): Pass thread id in the continuation args to
7632         step_once.
7633         (step_once): Add thread parameter.  Pass thread id the the
7634         continuation.
7635
7636 2008-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7637
7638         Set CU BASE_ADDRESS already from partial DIEs.
7639         * dwarf2read.c (read_partial_die): New variables BASE_ADDRESS and
7640         BASE_ADDRESS_TYPE.  Set these variables from DW_AT_LOW_PC and
7641         DW_AT_ENTRY_PC.  Set CU->HEADER.BASE_KNOWN and CU->HEADER.BASE_ADDRESS
7642         from these variables if it was still unset.
7643
7644         * Makefile.in: Update dependencies.
7645         * dwarf2read.c: Include "addrmap.h"
7646         (struct dwarf2_cu): New fields RANGES_OFFSET and HAS_RANGES_OFFSET.
7647         (dwarf2_ranges_read): New prototype.
7648         (dwarf2_build_psymtabs_hard): Initialize and prepare PSYMTABS_ADDRMAP.
7649         Add discontiguous range to PSYMTABS_ADDRMAP by DWARF2_RANGES_READ on
7650         HAS_RANGES_OFFSET, otherwise add there the contiguous range.
7651         (dwarf2_ranges_read): New parameter RANGES_PST, update the function
7652         comment for it.  Add the found ranges to RANGES_PST.  New variable
7653         BASEADDR, initialize it the common way.
7654         (dwarf2_get_pc_bounds): Update the caller for the new parameter.
7655         (read_partial_die): `DW_AT_ranges' now only sets RANGES_OFFSET and
7656         HAS_RANGES_OFFSET for the later processing.
7657         * objfiles.h (struct objfile): New field PSYMTABS_ADDRMAP.
7658         * symtab.c: Include "addrmap.h"
7659         (find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
7660         Move the psymtab locator into ...
7661         (find_pc_sect_psymtab_closer): ... a new function.
7662
7663 2008-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7664
7665         * arch-utils.c (gdbarch_update_p): Use default values for
7666         info.abfd and info.target_desc if they are NULL.
7667         (gdbarch_from_bfd): Remove assertion.
7668         (set_gdbarch_from_file): Call gdbarch_find_by_info directly,
7669         using the current target description.
7670         (gdbarch_info_fill): Do not use default values for info->abfd
7671         and info->target_desc.
7672
7673 2008-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7674
7675         * symfile.c (reread_symbols): Reload EXEC_BFD on its change.
7676
7677 2008-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7678
7679         * inferior.h (read_pc_pid, write_pc_pid): Remove.
7680         * regcache.h (regcache_read_pc, regcache_write_pc): Add prototypes.
7681
7682         * regcache.c (read_pc_pid): Remove, replace by ...
7683         (regcache_read_pc): ... this function.
7684         (write_pc_pid): Remove, replace by ...
7685         (regcache_write_pc): ... this function.
7686         (read_pc, write_pc): Update.
7687
7688         * infrun.c (displaced_step_prepare): Replace read_pc_pid and
7689         write_pc_pid by regcache_read_pc and regcache_write_pc.
7690         (displaced_step_fixup): Likewise.
7691         (resume): Likewise.  Use regcache arch instead of current_gdbarch.
7692         (prepare_to_proceed): Likewise.
7693         (proceed): Likewise.
7694         (adjust_pc_after_break): Likewise.
7695         (handle_inferior_event): Likewise.
7696
7697         * linux-nat.c (cancel_breakpoint): Likewise.
7698         * linux-thread-db.c (check_event): Likewise.
7699         * aix-thread.c (aix_thread_wait): Likewise.
7700         * tracepoint.c (trace_dump_command): Likewise.
7701
7702 2008-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7703
7704         * dwarf2loc.c (dwarf_expr_frame_base): Error out on missing
7705         SYMBOL_LOCATION_BATON.
7706
7707 2008-05-04  Vladimir Prus  <vladimir@codesourcery.com>
7708
7709         * target.h (struct target_ops): New field to_auxv_parse.
7710         * auxv.c (default_auxv_parse): New, renamed from previous
7711         target_auxv_parse.
7712         (target_auxv_parse): Try to call target method.  Fallback to
7713         default_auxv_parse if not found.
7714         * procfs.c (procfs_auxv_parse): New.
7715         (init_procfs_ops): On Solaris, in 64-bit mode, install
7716         procfs_auxv_parse.
7717
7718 2008-05-03  Adam Nemet  <anemet@caviumnetworks.com>
7719
7720         * symfile.c (add_symbol_file_command):  Use paddress rather than
7721         hex_string to print the address.
7722
7723 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
7724
7725         * rs6000-tdep.c (rs6000_frame_this_id): If info->base is 0,
7726         return the null frame ID to terminate the backtrace.
7727
7728 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
7729
7730         * rs6000-tdep.c: Do not include "rs6000-tdep.h".
7731         (rs6000_find_toc_address_hook): Move to rs6000-aix-tdep.c.
7732         (SIG_FRAME_PC_OFFSET): Likewise.
7733         (SIG_FRAME_LR_OFFSET): Likewise.
7734         (SIG_FRAME_FP_OFFSET): Likewise.
7735         (rs6000_push_dummy_call): Likewise.
7736         (rs6000_return_value): Likewise.
7737         (rs6000_convert_from_func_ptr_addr): Likewise.
7738         (branch_dest, rs6000_software_single_step): Likewise.
7739         (deal_with_atomic_sequence): Rename to ...
7740         (ppc_deal_with_atomic_sequence): ... this.  Adapt all callers.
7741         Do not call branch_dest; inline required parts of that function.
7742         (rs6000_skip_trampoline_code): Replace DEPRECATED_SYMBOL_NAME
7743         with SYMBOL_LINKAGE_NAME.
7744         (struct reg, regsize): Delete.
7745         (read_memory_addr): Delete; inline into callers.
7746         (rs6000_skip_prologue): Move after skip_prologue.
7747         (skip_prologue): Remove prototype.
7748         (rs6000_gdbarch_init): Remove sysv_abi variable; perform all
7749         initialization as if this variable were true.  Do not install
7750         ppc64_sysv_abi_adjust_breakpoint_address.
7751
7752         * rs6000-aix-tdep.c: Include "gdb_assert.h", "gdbtypes.h",
7753         "gdbcore.h", "target.h", "value.h", "infcall.h", "objfiles.h",
7754         and "breakpoint.h".
7755         (rs6000_find_toc_address_hook): Move here from rs6000-tdep.c.
7756         (SIG_FRAME_PC_OFFSET): Likewise.
7757         (SIG_FRAME_LR_OFFSET): Likewise.
7758         (SIG_FRAME_FP_OFFSET): Likewise.
7759         (rs6000_push_dummy_call): Likewise.
7760         (rs6000_return_value): Likewise.
7761         (rs6000_convert_from_func_ptr_addr): Likewise.
7762         (branch_dest, rs6000_software_single_step): Likewise.  Replace
7763         tdep->text_segment_base by AIX_TEXT_SEGMENT_BASE.
7764         (rs6000_aix_init_osabi): Install rs6000_push_dummy_call,
7765         rs6000_return_value, and rs6000_convert_from_func_ptr_addr.
7766         Call set_gdbarch_long_double_bit and set_gdbarch_frame_red_zone_size.
7767         Set tdep->lr_frame_offset.  Do not set tdep->text_segment_base.
7768
7769         * rs6000-tdep.h (rs6000_software_single_step): Remove prototype.
7770         (AIX_TEXT_SEGMENT_BASE): New macro.
7771         * rs6000-nat.c (exec_one_dummy_insn): Replace tdep->text_segment_base
7772         by AIX_TEXT_SEGMENT_BASE.
7773
7774         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Add prototype.
7775         (struct gdbarch_tdep): Remove text_segment_base member.
7776         * ppc-linux-tdep.c (ppc_linux_init_abi): On 64-bit, install
7777         ppc64_sysv_abi_adjust_breakpoint_address.
7778
7779         * Makefile.in (rs6000-tdep.o): Update dependencies.
7780         (rs6000-aix-tdep.o): Likewise.
7781
7782 2008-05-03  Luis Machado  <luisgpm@br.ibm.com>
7783             Thiago Jung Bauermann  <bauerman@br.ibm.com>
7784
7785         * cli/cli-decode.c (lookup_cmd_1): Fix indentation.
7786         * doublest.c (convert_typed_floating): Fix typo in comment.
7787         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
7788         * frame-unwind.h (frame_sniffer_ftype): Likewise.
7789         * frame.c (frame_unwind_address_in_block): Likewise.
7790         * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Likewise.
7791         * symtab.h (struct symbol): Likewise.
7792         * tramp-frame.h (struct trad_frame_cache): Likewise.
7793         * value.c (allocate_repeat_value): Likewise.
7794
7795 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
7796
7797         * infrun.c (handle_inferior_event): Do not insert breakpoints at
7798         TARGET_WAITKIND_LOADED events during startup (i.e. in the shell).
7799
7800 2008-05-03  Pedro Alves  <pedro@codesourcery.com>
7801
7802         * parse.c (parse_exp_in_context): Don't override
7803         expression_context_pc if get_selected_block returned a valid
7804         block.
7805
7806 2008-05-03  Daniel Jacobowitz  <dan@codesourcery.com>
7807
7808         * alpha-tdep.h (ALPHA_REGISTER_BYTES): Delete.
7809         * arm-tdep.h (STATUS_REGISTER_SIZE): Delete.
7810         * breakpoint.c (args_for_catchpoint_enable, current_exception_event):
7811         Delete.
7812         * c-typeprint.c (c_type_print_base): Delete handling of template
7813         instantiations.
7814         * cp-support.h (METHOD_PTR_IS_VIRTUAL, METHOD_PTR_FROM_VOFFSET)
7815         (METHOD_PTR_TO_VOFFSET): Delete.
7816         * defs.h (QUIT_FIXME): Delete.
7817         * f-lang.h (DEFAULT_DOTMAIN_NAME_IN_MF77, DEFAULT_MAIN_NAME_IN_MF77)
7818         (DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY, DEFAULT_DOTMAIN_NAME_IN_XLF): Delete.
7819         * gdbtypes.h (struct cplus_struct_type): Delete is_inlined,
7820         ninstantiations, and instantiations.
7821         (TYPE_INSTANTIATIONS, TYPE_NINSTANTIATIONS, TYPE_INSTANTIATION)
7822         (TYPE_FN_FIELD_INLINED): Delete.
7823         * srec.h (SREC_BINARY): Delete.
7824         * symtab.c (symbol_init_demangled_name): Delete.
7825         * symtab.h (SYMBOL_INIT_DEMANGLED_NAME, symbol_init_demangled_name)
7826         (SYMBOL_OBJFILE, struct exception_event_record, CURRENT_EXCEPTION_KIND)
7827         (CURRENT_EXCEPTION_CATCH_SAL, CURRENT_EXCEPTION_CATCH_LINE)
7828         (CURRENT_EXCEPTION_CATCH_FILE, CURRENT_EXCEPTION_CATCH_PC)
7829         (CURRENT_EXCEPTION_THROW_SAL, CURRENT_EXCEPTION_THROW_LINE)
7830         (CURRENT_EXCEPTION_THROW_FILE, CURRENT_EXCEPTION_THROW_PC): Delete.
7831         * target.h (enum thread_control_capabilities): Delete tc_switch.
7832         (target_can_switch_threads): Delete.
7833
7834 2008-05-03  Daniel Jacobowitz  <dan@codesourcery.com>
7835
7836         * Makefile.in (objfiles.o): Update.
7837         * exec.c (exec_set_section_address): Support p->addr != 0.
7838         * objfiles.c (objfile_relocate): Update exec_ops section
7839         addresses.
7840         * symfile.c (place_section): Move exec_set_section_address call...
7841         (default_symfile_offsets): ...to here.
7842
7843 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
7844
7845         * Makefile.in (ppc_linux_tdep_h): New macro.
7846         (powerpc_32l_c, powerpc_altivec32_c, powerpc_altivec32l_c): Likewise.
7847         (powerpc_64l_c, powerpc_altivec64_c, powerpc_altivec64l_c): Likewise.
7848         (powerpc_e500l_c): Likewise.
7849         (ppc-linux-nat.o): Update dependencies.
7850         (ppc-linux-tdep.o): Update dependencies.
7851         (rs6000-tdep.o): Update dependencies.
7852
7853         * ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Remove.
7854         (ppc_linux_svr4_fetch_link_map_offsets): Remove.
7855         (ppc_linux_gregset, ppc_linux_fpregset): Move to ppc-linux-tdep.h
7856         (ppc_supply_reg, ppc_collect_reg): Add prototypes.
7857         (tdesc_powerpc_e500): Remove.
7858
7859         * rs6000.c: Include "features/rs6000/powerpc-altivec32.c"
7860         and "features/rs6000/powerpc-altivec64.c".
7861         (ppc_supply_reg, ppc_collect_reg): Make global.
7862         (variants): Use tdesc_powerpc_32 for "powerpc" and
7863         tdesc_powerpc_altivec64 for "powerpc64".
7864         (_initialize_rs6000_tdep): Initialize AltiVec descriptions.
7865
7866         * ppc-linux-tdep.h: New file.
7867
7868         * ppc-linux-tdep.c: Include "ppc-linux-tdep.c".
7869         Include "features/rs6000/powerpc-32l.c".
7870         Include "features/rs6000/powerpc-altivec32l.c".
7871         Include "features/rs6000/powerpc-64l.c".
7872         Include "features/rs6000/powerpc-altivec64l.c".
7873         Include "features/rs6000/powerpc-e500l.c".
7874         (ppc_linux_supply_gregset): New function.
7875         (ppc_linux_collect_gregset): Handle orig_r3 and trap registers.
7876         (ppc32_linux_gregset): Use ppc_linux_supply_gregset.
7877         (ppc64_linux_gregset): Likewise.
7878         (ppc_linux_sigtramp_cache): Handle orig_r3 and trap registers.
7879         (ppc_linux_trap_reg_p): New function.
7880         (ppc_linux_write_pc): New function.
7881         (ppc_linux_core_read_description): New function.
7882         (ppc_linux_init_abi): Install ppc_linux_write_pc and
7883         ppc_linux_core_read_description.  Install orig_r3 and trap
7884         registers if present in the target description.
7885         (_initialize_ppc_linux_tdep): Initialize Linux target descriptions.
7886
7887         * ppc-linux-nat.c: Include "ppc-linux-tdep.h".
7888         (PT_ORIG_R3, PT_TRAP): Define if necessary.
7889         (ppc_register_u_addr): Handle orig_r3 and trap registers.
7890         (fetch_ppc_registers): Likewise.
7891         (store_ppc_registers): Likewise.
7892         (store_register): Likewise.
7893         (ppc_linux_read_description): Check whether AltiVec is supported.
7894         Check whether inferior is 32-bit or 64-bit.  Return the appropriate
7895         Linux target description.
7896
7897         * features/Makefile (WHICH): Use rs6000/powerpc-32l and
7898         rs6000/powerpc-altivec32l instead of rs6000/powerpc-32.
7899         Use rs6000/powerpc-64l and rs6000/powerpc-altivec64l instead
7900         of rs6000/powerpc-64.  Use rs6000/powerpc-e500l instead of
7901         rs6000/powerpc-e500.  Update -expedite variables accordingly.
7902
7903         * features/rs6000/power-spe.xml: Use regnum 73 for "acc".
7904         * features/rs6000/powerpc-32.xml: Do not include power-altivec.xml.
7905         * features/rs6000/powerpc-64.xml: Do not include power-altivec.xml.
7906         * features/rs6000/powerpc-e500.c: Regenerate.
7907         * features/rs6000/powerpc-32.c: Regenerate.
7908         * features/rs6000/powerpc-64.c: Regenerate.
7909
7910         * features/rs6000/power-linux.xml: New file.
7911         * features/rs6000/power64-linux.xml: New file.
7912         * features/rs6000/powerpc-32l.xml: New file.
7913         * features/rs6000/powerpc-altivec32l.xml: New file.
7914         * features/rs6000/powerpc-64l.xml: New file.
7915         * features/rs6000/powerpc-altivec64l.xml: New file.
7916         * features/rs6000/powerpc-e500l.xml: New file.
7917         * features/rs6000/powerpc-32l.c: New (generated) file.
7918         * features/rs6000/powerpc-altivec32l.c: New (generated) file.
7919         * features/rs6000/powerpc-64l.c: New (generated) file.
7920         * features/rs6000/powerpc-altivec64l.c: New (generated) file.
7921         * features/rs6000/powerpc-e500l.xml: New (generated) file.
7922
7923         * regformats/reg-ppc.dat: Remove.
7924         * regformats/reg-ppc64.dat: Remove.
7925         * regformats/rs6000/powerpc-32.dat: Remove.
7926         * regformats/rs6000/powerpc-64.dat: Remove.
7927         * regformats/rs6000/powerpc-e500.dat: Remove.
7928         * regformats/rs6000/powerpc-32l.dat: New (generated) file.
7929         * regformats/rs6000/powerpc-altivec32l.dat: New (generated) file.
7930         * regformats/rs6000/powerpc-64l.dat: New (generated) file.
7931         * regformats/rs6000/powerpc-altivec64l.dat: New (generated) file.
7932         * regformats/rs6000/powerpc-e500l.dat: New (generated) file.
7933
7934 2008-05-03  Pedro Alves  <pedro@codesourcery.com>
7935
7936         * thread.c (delete_thread): Call observer_notify_thread_exit.
7937         * mi/mi-interp.c (mi_interpreter_init): Register mi_thread_exit as
7938         thread_exit observer.
7939         (mi_thread_exit): New.
7940
7941 2008-05-03  Thiago Jung Bauermann  <bauerman@br.ibm.com>
7942
7943         * breakpoint.c (create_exception_catchpoint): Remove prototype
7944         for already deleted function.
7945         * breakpoint.h (ep_is_exception_catchpoint): Likewise.
7946         * frame.h (show_stack_frame): Remove prototype.
7947         * stack.c (show_stack_frame): Remove empty, unused function.
7948         * source.c (symtab_to_fullname, print_source_lines): Small fix
7949         in comment.
7950         * value.c (show_values): Update comments to mention "show values"
7951         command instead of "info history".
7952
7953 2008-05-02  Ulrich Weigand  <uweigand@de.ibm.com>
7954
7955         * linespec.c: Include "target.h".
7956         (minsym_found): Handle minimal symbols pointing to function
7957         descriptors.  Use find_function_start_pc.
7958         * minsyms.c (msymbol_objfile): New function.
7959         * parse.c (write_exp_msymbol): Handle minimal symbols pointing
7960         to function descriptors.
7961         * symtab.c (fixup_section): Only use minimal symbol at the same
7962         address to determine section of a symbol.
7963         (find_function_start_pc): New function.
7964         (find_function_start_sal): Use it.
7965         * symtab.h (msymbol_objfile): Add prototype.
7966         (find_function_start_pc): Likewise.
7967         * value.c: Include "objfiles.h".
7968         (value_fn_field): Handle minimal symbols pointing to function
7969         descriptors.
7970         * Makefile.in (linespec.o): Update dependencies.
7971         (value.o): Likewise.
7972
7973 2008-05-02  Joel Brobecker  <brobecker@adacore.com>
7974
7975         * ada-lang.c (unwrap_value): Handle the case where the "F" field
7976         inside a PAD type is a bitfield.
7977
7978 2008-05-02  Ulrich Weigand  <uweigand@de.ibm.com>
7979
7980         * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Handle
7981         TYPE_CODE_BOOL and TYPE_CODE_CHAR the same as TYPE_CODE_INT.
7982         Handle TYPE_CODE_REF the same as TYPE_CODE_PTR.
7983         Handle TYPE_CODE_METHOD the same as TYPE_CODE_FUNC.
7984         Allow typedefs when checking for function pointer arguments.
7985         Right-align small structs passed on the stack.
7986         (ppc64_sysv_abi_return_value): Handle TYPE_CODE_BOOL and
7987         TYPE_CODE_CHAR the same as TYPE_CODE_INT.
7988         Handle TYPE_CODE_REF the same as TYPE_CODE_PTR.
7989
7990 2008-05-02  Daniel Jacobowitz  <dan@codesourcery.com>
7991
7992         * Makefile.in (arm-tdep.o): Update.
7993         * arm-tdep.c (arm_objfile_data_key, struct arm_mapping_symbol)
7994         (struct arm_per_objfile, arm_compare_mapping_symbols): New.
7995         (arm_pc_is_thumb): Use mapping symbols.
7996         (arm_objfile_data_cleanup, arm_record_special_symbol): New.
7997         (arm_gdbarch_init): Call set_gdbarch_record_special_symbol.
7998         (_initialize_arm_tdep): Initialize arm_objfile_data_key.
7999         * elfread.c (elf_symtab_read): Use gdbarch_record_special_symbol.
8000         * gdbarch.sh: Add record_special_symbol.
8001         * gdbarch.c, gdbarch.h: Regenerated.
8002         * objfiles.c (struct objfile_data): Add cleanup member.
8003         (register_objfile_data_with_cleanup): New function, from
8004         register_objfile_data.
8005         (register_objfile_data): Use it.
8006         (objfile_free_data): Call clear_objfile_data.
8007         (clear_objfile_data): Call cleanup functions.
8008         * objfiles.h (register_objfile_data_with_cleanup): Declare.
8009
8010 2008-05-02  Daniel Jacobowitz  <dan@codesourcery.com>
8011
8012         * objfiles.c (init_entry_point_info): Handle shared libraries.
8013
8014 2008-05-02  Daniel Jacobowitz  <dan@codesourcery.com>
8015
8016         * arm-tdep.c (arm_prologue_this_id): Compare pc, not func, to
8017         lowest_pc.
8018
8019 2008-05-02  Jim Blandy  <jimb@codesourcery.com>
8020             Pedro Alves  <pedro@codesourcery.com>
8021
8022         Implement displaced stepping.
8023
8024         * gdbarch.sh (max_insn_length): New 'variable'.
8025         (displaced_step_copy, displaced_step_fixup)
8026         (displaced_step_free_closure, displaced_step_location): New
8027         functions.
8028         (struct displaced_step_closure): Add forward declaration.
8029         * gdbarch.c, gdbarch.h: Regenerated.
8030
8031         * arch-utils.c: #include "objfiles.h".
8032         (simple_displaced_step_copy_insn)
8033         (simple_displaced_step_free_closure)
8034         (displaced_step_at_entry_point): New functions.
8035         * arch-utils.h (simple_displaced_step_copy_insn)
8036         (simple_displaced_step_free_closure)
8037         (displaced_step_at_entry_point): New prototypes.
8038
8039         * i386-tdep.c (I386_MAX_INSN_LEN): Rename to...
8040         (I386_MAX_MATCHED_INSN_LEN): ... this.
8041         (i386_absolute_jmp_p, i386_absolute_call_p)
8042         (i386_ret_p, i386_call_p, i386_breakpoint_p, i386_syscall_p)
8043         (i386_displaced_step_fixup): New functions.
8044         (struct i386_insn, i386_match_insn): Update.
8045         (i386_gdbarch_init): Set gdbarch_max_insn_length.
8046         * i386-tdep.h (I386_MAX_INSN_LEN): New.
8047         (i386_displaced_step_fixup): New prototype.
8048         * i386-linux-tdep.c (i386_linux_init_abi): Include "arch-utils.h".
8049         Register gdbarch_displaced_step_copy,
8050         gdbarch_displaced_step_fixup, gdbarch_displaced_step_free_closure,
8051         and gdbarch_displaced_step_location functions.
8052
8053         * infrun.c (debug_displaced): New variable.
8054         (show_debug_displaced): New function.
8055         (struct displaced_step_request): New struct.
8056         (displaced_step_request_queue, displaced_step_ptid)
8057         (displaced_step_gdbarch, displaced_step_closure)
8058         (displaced_step_original, displaced_step_copy)
8059         (displaced_step_saved_copy, can_use_displaced_stepping): New
8060         variables.
8061         (show_can_use_displaced_stepping, use_displaced_stepping)
8062         (displaced_step_clear, cleanup_displaced_step_closure)
8063         (displaced_step_dump_bytes, displaced_step_prepare)
8064         (displaced_step_clear_cleanup, write_memory_ptid)
8065         (displaced_step_fixup): New functions.
8066         (resume): Call displaced_step_prepare.
8067         (proceed): Call read_pc once, and remember the value.  If using
8068         displaced stepping, don't remove breakpoints.
8069         (handle_inferior_event): Call displaced_step_fixup.  Add some
8070         debugging output.  When we try to step over a breakpoint, but get
8071         a signal to deliver to the thread instead, ensure the step-resume
8072         breakpoint is actually inserted.  If a thread hop is needed, and
8073         displaced stepping is enabled, don't remove breakpoints.
8074         (init_wait_for_inferior): Call displaced_step_clear.
8075         (_initialize_infrun): Add "set debug displaced" command.  Add
8076         "maint set can-use-displaced-stepping" command.  Clear
8077         displaced_step_ptid.
8078         * inferior.h (debug_displaced): Declare variable.
8079         (displaced_step_dump_bytes): Declare function.
8080
8081         * Makefile.in (arch-utils.o, i386-linux-tdep.o): Update
8082         dependencies.
8083
8084 2008-05-02  Daniel Jacobowitz  <dan@codesourcery.com>
8085
8086         * arm-tdep.c (arm_mode_strings, arm_fallback_mode_string)
8087         (arm_force_mode_string, arm_show_fallback_mode)
8088         (arm_show_force_mode): New.
8089         (arm_pc_is_thumb): Honor fallback-mode and force-mode.  Use
8090         arm_frame_is_thumb.
8091         (_initialize_arm_tdep): Add "set arm fallback-mode"
8092         and "set arm force-mode".
8093         * NEWS: Document new commands.
8094
8095 2008-05-02  Andrew Stubbs  <andrew.stubbs@st.com>
8096
8097         * main.h (batch_silent): Declare.
8098         * event-top.c: Include main.h.
8099         (gdb_setup_readline): Remove extern batch_silent declaration.
8100         * infrun.c (normal_stop): Don't print source location when running in
8101         --batch-silent mode.
8102         * Makefile.in (event-top.o): Add main.h dependency.
8103
8104 2008-05-02  Andreas Schwab  <schwab@suse.de>
8105
8106         * target.h (struct target_ops): Add
8107         to_watchpoint_addr_within_range.
8108         (target_watchpoint_addr_within_range): New function.
8109         * target.c (update_current_target): Inherit
8110         to_watchpoint_addr_within_range, defaulting to
8111         default_watchpoint_addr_within_range.
8112         (default_watchpoint_addr_within_range): New function.
8113         (debug_to_watchpoint_addr_within_range): New function.
8114         (setup_target_debug): Set to_watchpoint_addr_within_range.
8115         * ppc-linux-nat.c (ppc_linux_watchpoint_addr_within_range):
8116         New function.
8117         (_initialize_ppc_linux_nat): Set to_watchpoint_addr_within_range.
8118         * breakpoint.c (watchpoints_triggered): Use
8119         target_watchpoint_addr_within_range.
8120
8121 2008-05-01  Pedro Alves  <pedro@codesourcery.com>
8122
8123         * configure.tgt: Add i[34567]86-*-dicos* and x86_64-*-dicos*.
8124         (i[34567]86-*-dicos*, x86_64-*-dicos*):
8125         Set gdb_osabi to GDB_OSABI_DICOS.
8126
8127         * defs.h (enum gdb_osabi): Add GDB_OSABI_DICOS.
8128         * osabi.c (gdb_osabi_name): Add "DICOS".
8129
8130         * i386-dicos-tdep.c: New file.
8131
8132         * Makefile.in (ALL_TARGET_OBS): Add i386-dicos-tdep.o.
8133         (ALLDEPFILES): Add i386-dicos-tdep.c.
8134         (i386-dicos-tdep.o): New rule.
8135
8136 2008-05-01  Pedro Alves  <pedro@codesourcery.com>
8137
8138         * linux-nat.c (linux_nat_switch_fork): Reinit GDB's thread list
8139         and register the fork's PTID as a thread.
8140
8141 2008-05-01  Aleksandar Ristovski  <aristovski@qnx.com>
8142
8143         PR gdb/1665
8144         * breakpoint.c (create_breakpoint): Add breakpoint_ops argument and
8145         assign its value to the breakpoint created.
8146         (create_breakpoints): Add breakpoint_ops argument and pass it
8147         to create_breakpoint call.
8148         (break_command_really): Add breakpoint_ops argument and pass/assign
8149         appropriately.
8150         (break_command_1): Pass NULL as ops argument.
8151         (set_breakpoint): Pass NULL as ops argument.
8152         (print_one_exception_catchpoint): Print <PENDING> if no loc available.
8153         (handle_gnu_v3_exceptions): Call generic breakpoint code to insert
8154         catch and throw catchpoints.
8155
8156 2008-05-01  Aleksandar Ristovski  <aristovski@qnx.com>
8157
8158         PR gdb/2343
8159         * corelow.c (core_open): Use gdbarch_target_signal_from_host to
8160         translate signal numeric value from the target to GDB's enum
8161         target_signal.
8162         * gdbarch.c, gdbarch.h: Regenerated.
8163         * gdbarch.sh: Added two new functions target_signal_from_host and
8164         target_signal_to_host.
8165         * target.h (default_target_signal_from_host,
8166         default_target_signal_to_host): New functions - declarations.
8167         * signals/signals.c (struct gdbarch): New declaration.
8168         (default_target_signal_to_host, default_target_signal_from_host): New
8169         functions.
8170
8171 2008-05-01  Daniel Jacobowitz  <dan@codesourcery.com>
8172             Pedro Alves  <pedro@codesourcery.com>
8173
8174         Based on work by Jan Kratochvil <jan.kratochvil@redhat.com> and Jeff
8175         Johnston <jjohnstn@redhat.com>.
8176
8177         * NEWS: Mention attach to stopped process fix.
8178         * infcmd.c (detach_command, disconnect_command): Discard the thread
8179         list.
8180         * infrun.c (handle_inferior_event): Do not ignore non-SIGSTOP while
8181         attaching.  Use signal_stop_state.
8182         (signal_stop_state): Check stop_soon.
8183         * linux-nat.c (kill_lwp): Declare earlier.
8184         (pid_is_stopped, linux_nat_post_attach_wait): New.
8185         (lin_lwp_attach_lwp): Use linux_nat_post_attach_wait.  Update
8186         comments.
8187         (linux_nat_attach): Use linux_nat_post_attach_wait.
8188         (detach_callback, linux_nat_detach): Improve handling for signalled
8189         processes.
8190         (linux_nat_pid_to_str): Always print out the LWP ID if it differs
8191         from the process ID.
8192         * Makefile.in (infcmd.o): Update.
8193
8194 2008-05-01  Daniel Jacobowitz  <dan@codesourcery.com>
8195
8196         * arm-linux-tdep.h (ARM_CPSR_REGNUM): Delete definition.
8197         * arm-tdep.c (arm_frame_is_thumb): New.
8198         (arm_pc_is_thumb): Clarify comment.
8199         (thumb_analyze_prologue): Remove PC special case.
8200         (thumb_scan_prologue): Take a block_addr argument.  Use it for
8201         find_pc_partial_function.  Remove unused variables.
8202         (arm_scan_prologue): Use arm_frame_is_thumb.  Use the block address
8203         for find_pc_partial_function.  Remove PC special case.
8204         (arm_prologue_prev_register): Add special handling for PC and CPSR.
8205         (arm_dwarf2_prev_register, arm_dwarf2_frame_init_reg): New.
8206         (arm_get_next_pc): Use arm_frame_is_thumb.
8207         (arm_write_pc): Use CPSR_T instead of 0x20.
8208         (arm_gdbarch_init): Call dwarf2_frame_set_init_reg.
8209         * arm-tdep.h (enum gdb_regnum): Add ARM_CPSR_REGNUM.
8210         (CPSR_T): Define.
8211         * dwarf2-frame.c (dwarf2_frame_prev_register): Handle
8212         DWARF2_FRAME_REG_FN.
8213         * dwarf2-frame.h (enum dwarf2_frame_reg_rule): Add
8214         DWARF2_FRAME_REG_FN.
8215         (struct dwarf2_frame_state_reg): Add FN to loc union.
8216
8217 2008-05-01  Nick Roberts  <nickrob@snap.net.nz>
8218
8219         * exec.c (print_section_info): Add missing '\n'.
8220
8221 2008-05-01  Vladimir Prus  <vladimir@codesourcery.com>
8222
8223         * thread.c (add_thread): Move observer call to ...
8224         (add_thread_silent): ... here.
8225
8226 2008-04-30  Ulrich Weigand  <uweigand@de.ibm.com>
8227
8228         * rs6000-tdep.c: Update for unwinder changes.
8229         * ppcobsd-tdep.c: Likewise.
8230
8231 2008-04-30  Ulrich Weigand  <uweigand@de.ibm.com>
8232
8233         * s390-tdep.c: Update for unwinder changes.
8234
8235 2008-04-30  Ulrich Weigand  <uweigand@de.ibm.com>
8236
8237         * spu-tdep.c: Update for unwinder changes.
8238
8239 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8240
8241         * hppanbsd-tdep.c, m68kbsd-tdep.c, mn10300-linux-tdep.c,
8242         ppc-linux-tdep.c, ppcnbsd-tdep.c, sparc-linux-tdep.c,
8243         sparc64-linux-tdep.c: Update for unwinder changes.
8244
8245 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8246
8247         * mipsnbsd-tdep.c, mips64obsd-tdep.c, mips-linux-tdep.c: Update
8248         for unwinder changes.
8249         * mips-tdep.c: Likewise.
8250         (mips_stub_frame_cache): Unwind the ABI stack pointer, not the
8251         raw one.
8252
8253 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8254
8255         * arm-linux-tdep.c, arm-tdep.c, armobsd-tdep.c: Update for
8256         unwinder changes.
8257
8258 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8259
8260         Update i386 and amd64 ports for unwinder changes.
8261
8262         * amd64-tdep.c (amd64_frame_cache): Expect this_frame.
8263         (amd64_frame_this_id, amd64_frame_prev_register): Update signature.
8264         (amd64_frame_unwind): Use default_frame_sniffer.
8265         (amd64_frame_sniffer): Delete.
8266         (amd64_sigtramp_frame_cache): Expect this_frame.
8267         (amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register)
8268         (amd64_sigtramp_frame_sniffer): Update signature.
8269         (amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer.
8270         (amd64_frame_base_address): Expect this_frame.
8271         (amd64_dummy_id): Renamed from amd64_unwind_dummy_id.  Expect
8272         this_frame.
8273         (amd64_init_abi): Use set_gdbarch_dummy_id and
8274         frame_unwind_append_unwinder.
8275         * i386-tdep.c (i386_frame_cache): Expect this_frame.
8276         (i386_frame_this_id, i386_frame_prev_register): Update signature.
8277         (i386_frame_unwind): Use default_frame_sniffer.
8278         (i386_frame_sniffer): Delete.
8279         (i386_sigtramp_frame_cache): Expect this_frame.
8280         (i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register)
8281         (i386_sigtramp_frame_sniffer): Update signature.
8282         (i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer.
8283         (i386_frame_base_address): Update signature.
8284         (i386_dummy_id): Rename from i386_unwind_dummy_id.  Expect this_frame.
8285         (i386_push_dummy_call): Update comment.
8286         (i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr):
8287         Expect this_frame.
8288         (i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders,
8289         and frame_unwind_append_unwinder.
8290         * amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c,
8291         amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c,
8292         i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c,
8293         i386nbsd-tdep.c: Update for unwinder changes.
8294
8295 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8296
8297         * trad-frame.c (struct trad_frame_cache): Rename next_frame to this_frame.
8298         (trad_frame_cache_zalloc, trad_frame_alloc_saved_regs): Expect
8299         this_frame.
8300         (trad_frame_get_prev_register, trad_frame_get_register): Update signature.
8301         * trad-frame.h (trad_frame_cache_zalloc, trad_frame_get_register)
8302         (trad_frame_alloc_saved_regs, trad_frame_get_prev_register): Update
8303         signature.
8304         * tramp-frame.c (tramp_frame_cache, tramp_frame_start): Expect
8305         this_frame.
8306         (tramp_frame_this_id, tramp_frame_prev_register, tramp_frame_sniffer):
8307         Update signature.
8308         * tramp-frame.h (struct tramp_frame): Update signature of init.
8309         * Makefile.in (trad-frame.o): Update.
8310
8311 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8312
8313         * dwarf2-frame.c (read_reg): Expect this_frame in the baton.
8314         (execute_stack_op): Put this_frame in the baton.
8315         (execute_cfa_program): Take this_frame.
8316         (struct dwarf2_frame_ops): Update comment for signal_frame_p.
8317         (dwarf2_frame_default_init_reg, dwarf2_frame_init_reg)
8318         (dwarf2_frame_signal_frame_p, dwarf2_frame_cache)
8319         (dwarf2_frame_this_id): Adjust to work on this_frame.
8320         (dwarf2_signal_frame_this_id): Delete.
8321         (dwarf2_frame_prev_register): Update signature.  Use new frame
8322         unwind methods.
8323         (dwarf2_frame_sniffer): Update signature.  Expect this_frame.
8324         (dwarf2_frame_unwind, dwarf2_signal_frame_unwind): Add
8325         dwarf2_frame_sniffer.
8326         (dwarf2_append_unwinders): New.
8327         (dwarf2_frame_base_address, dwarf2_frame_base_sniffer): Expect
8328         this_frame.
8329         * sparc-tdep.c (sparc32_dwarf2_struct_return_p)
8330         (sparc32_dwarf2_frame_init_reg): Expect this_frame.
8331         * cris-tdep.c (cris_dwarf2_frame_init_reg): Likewise.
8332         * rs6000-tdep.c (ppc_dwarf2_frame_init_reg): Likewise.
8333         * s390-tdep.c (s390_dwarf2_frame_init_reg): Likewise.
8334         * sh-tdep.c (sh_dwarf2_frame_init_reg): Likewise.
8335         * sparc64-tdep.c (sparc64_dwarf2_frame_init_reg): Likewise.
8336         * dwarf2-frame.h (dwarf2_frame_sniffer): Delete declaration.
8337         (dwarf2_append_unwinders): Declare.
8338         (dwarf2_frame_base_sniffer): Update declaration.
8339         * i386-linux-tdep.c (i386_linux_dwarf_signal_frame_p): Expect
8340         this_frame.
8341
8342 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8343
8344         Convert frame unwinders to use the current frame and
8345         "struct value".
8346
8347         * frame.c (frame_debug): Make global.
8348         (get_frame_id): Pass this frame to unwinder routines.
8349         (frame_pc_unwind): Remove unused unwind->prev_pc support.
8350         (do_frame_register_read): Do not discard the return value of
8351         frame_register_read.
8352         (frame_register_unwind): Remove debug messages.  Use
8353         frame_unwind_register_value.
8354         (frame_unwind_register_value, get_frame_register_value): New
8355         functions.
8356         (create_new_frame, get_frame_base_address, get_frame_locals_address)
8357         (get_frame_args_address, get_frame_type): Pass this frame to
8358         unwinder routines.
8359         (frame_cleanup_after_sniffer, frame_prepare_for_sniffer): New
8360         functions.
8361         * frame.h: Update comments.
8362         (frame_debug, frame_unwind_register_value, get_frame_register_value)
8363         (frame_prepare_for_sniffer): Declare.
8364         * frame-unwind.h: Update comments and parameter names.
8365         (default_frame_sniffer): Declare.
8366         (frame_prev_register_ftype): Return a struct value *.
8367         (struct frame_unwind): Remove prev_pc member.
8368         (frame_unwind_sniffer_ftype, frame_unwind_append_sniffer): Delete.
8369         (frame_unwind_append_unwinder, frame_unwind_got_optimized)
8370         (frame_unwind_got_register, frame_unwind_got_memory)
8371         (frame_unwind_got_constant, frame_unwind_got_address): Declare.
8372         * frame-base.h: Update comments and parameter names.
8373         * valops.c (value_fetch_lazy): Use get_frame_register_value.  Iterate
8374         if necessary.  Add debugging output.
8375         * sentinel-frame.c (sentinel_frame_prev_register)
8376         (sentinel_frame_this_id): Update for new signature.
8377         (sentinel_frame_prev_pc): Delete.
8378         (sentinel_frame_unwinder): Remove prev_pc.
8379         * ia64-tdep.c (ia64_libunwind_frame_unwind): Do not initialize
8380         prev_pc.
8381         * libunwind-frame.c (libunwind_frame_unwind): Likewise.
8382         * frame-unwind.c (struct frame_unwind_table_entry): Remove sniffer.
8383         (frame_unwind_append_sniffer): Delete.
8384         (frame_unwind_append_unwinder): New function.
8385         (frame_unwind_find_by_frame): Take this frame.  Only use sniffers
8386         from unwinders.  Use frame_prepare_for_sniffer.
8387         (default_frame_sniffer, frame_unwind_got_optimized)
8388         (frame_unwind_got_register, frame_unwind_got_memory)
8389         (frame_unwind_got_constant, frame_unwind_got_address): New functions.
8390         * dummy-frame.c (dummy_frame_sniffer): Use gdbarch_dummy_id.
8391         (dummy_frame_prev_register, dummy_frame_this_id): Update for new
8392         signature.
8393         * gdbarch.sh: Replace unwind_dummy_id with dummy_id.
8394         * gdbarch.c, gdbarch.c: Regenerated.
8395         * frame-base.c (default_frame_base_address)
8396         (default_frame_locals_address, default_frame_args_address): Update
8397         for new signature.
8398         (frame_base_find_by_frame): Pass this frame to unwinder routines.
8399         * infcall.c (call_function_by_hand): Update comments.
8400         * Makefile.in (frame-unwind.o): Update dependencies.
8401
8402 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8403
8404         * ada-lang.c (ada_value_primitive_packed_val): Only check
8405         value_lazy for memory lvals.
8406         * findvar.c (value_of_register_lazy): New function.
8407         (locate_var_value): Only check value_lazy for memory lvals.
8408         * valarith.c (value_subscripted_rvalue): Likewise.
8409         * valops.c (value_fetch_lazy): Handle both memory and register
8410         lvals.
8411         (search_struct_field, value_slice): Only check value_lazy for memory
8412         lvals.
8413         * value.c (struct value): Update comment for lazy.
8414         (value_primitive_field): Only check value_lazy for memory lvals.
8415         * value.h (value_lazy): Update comment.
8416         (value_of_register_lazy): Declare.
8417
8418 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
8419
8420         * corefile.c (reopen_exec_file): Close any open files.
8421
8422 2008-04-29  Joel Brobecker  <brobecker@adacore.com>
8423
8424         * ia64-tdep.c (ia64_memory_remove_breakpoint): Set
8425         show_memory_breakpoints to 1 while reading the instruction bundle.
8426
8427 2008-04-29  Joel Brobecker  <brobecker@adacore.com>
8428
8429         * gdbarch.sh: Document the return_value method. Explain that
8430         the FUNCTYPE parameter might be NULL.
8431         * gdbarch.h: Regenerated.
8432         * sparc-tdep.c (sparc32_push_dummy_code): Do not pass the function
8433         type when calling using_struct_return, as this is unnecessary
8434         on this target.
8435
8436 2008-04-28  Joel Brobecker  <brobecker@adacore.com>
8437
8438         * terminal.h (create_tty_session): Fix return type.
8439
8440 2008-04-26  Vladimir Prus  <vladimir@codesourcery.com>
8441
8442         * mi/mi-interp.c (mi_new_thread): Quote the thread id.
8443
8444 2008-04-26  Joel Brobecker  <brobecker@adacore.com>
8445
8446         * breakpoint.c (condition_command, commands_from_control_command)
8447         (break_command_really): Minor reformatting.
8448
8449 2008-04-25  Pedro Alves  <pedro@codesourcery.com>
8450
8451         * dwarf2read.c (dwarf2_const_value): Handle DW_FORM_strp.
8452
8453 2008-04-25  Pedro Alves  <pedro@codesourcery.com>
8454
8455         * amd64-tdep.c (amd64_get_longjmp_target): New.
8456         (amd64_init_abi): Register amd64_get_longjmp_target as
8457         gdbarch_get_longjmp_target callback.
8458         * i386-tdep.c (i386_get_longjmp_target): Remove 64-bit handling.
8459
8460 2008-04-25  Pedro Alves  <pedro@codesourcery.com>
8461
8462         * breakpoint.h (enum bpstat_what_main_action): Delete
8463         BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE.
8464
8465         * breakpoint.c (clrs): Delete.
8466         (bpstat_what): Update table.
8467
8468         * infrun.c (handle_inferior_event): Remove
8469         BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE handling.
8470
8471 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
8472
8473         * mi/mi-cmds.h (mi_cmd_args_ftype): Remove.
8474         Adjust all prototypes using mi_cmd_args_ftype to use
8475         mi_cmd_argv_ftype.
8476         (struct mi_cmd): Remove the args_func field.
8477         * mi/mi-cmds.c: Don't provide value for the args_func field.
8478         * mi/mi-main.c (mi_execute_async_cli_command)
8479         (mi_cmd_exec_run, mi_cmd_exec_next, mi_cmd_exec_next_instruction)
8480         (mi_cmd_exec_step, mi_cmd_exec_step_instruction)
8481         (mi_cmd_exec_finish, mi_cmd_exec_until, mi_cmd_exec_return)
8482         (mi_cmd_exec_continue, mi_cmd_exec_interrupt)
8483         (mi_cmd_target_download): Adjust.
8484         (mi_cmd_target_select): Adjust. Pass 0 for from_tty parameter.
8485         (mi_cmd_execute): Do not check for args_func.
8486         (mi_execute_async_cli_command): Adjust.
8487         * mi/mi-parse.c: Don't check for args_func.
8488
8489 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
8490
8491         * breakpoint.c (bpstat_check_location)
8492         (bpstat_check_watchpoint, bpstat_check_breakpoint_conditions):
8493         New, extracted from bpstat_stop_status.
8494         (bpstat_stop_status): Use the above.
8495
8496 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
8497
8498         * mi/mi-main.c (last_async_command): Rename to current_token.
8499         (previous_async_command): Remove.
8500         (mi_cmd_gdb_exit): Adjust.
8501         (mi_cmd_exec_interrupt): Don't dance with previous_async_command.
8502         (mi_cmd_target_select): Adjust.
8503         (mi_cmd_execute): Don't set previous_async_command.  Free token
8504         here even in async mode.
8505         (mi_execute_async_cli_command): Adjust.
8506         (mi_exec_async_cli_cmd_continuation): Adjust.  Do not free the
8507         token.
8508         (mi_load_progress): Adjust.
8509
8510 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
8511
8512         * infcmd.c (step_1_continuation): Always disable longjmp
8513         breakpoint if we're not going to do another step.
8514
8515 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
8516
8517         exec_cleanup murder.
8518         * breakpoint.c (until_break_command_continuation): Add
8519         the 'error' parameter.  Directly delete the breakoint as
8520         opposed to running cleanups.
8521         (until_break_command): Install continuation only
8522         after starting the target.  Don't use exec cleanups,
8523         use ordinary cleanups.  Discard cleanups is successfully
8524         started the target in async mode.
8525         (make_cleanup_delete_breakpoint): Remove.
8526         * breakpoint.h (make_cleanup_delete_breakpoint): Remove
8527         declaration.
8528         * defs.h (do_exec_cleanups, make_exec_cleanup): Remove
8529         declarations.
8530         (struct continations): Add the 'error' parameter to the
8531         continuation_hook field.
8532         (add_continuation, do_all_continuations)
8533         (add_intermediate_continuation)
8534         (do_all_intermediate_continuations): Add the 'error' parameter.
8535         * exceptions.c (throw_exception): Don't call do_exec_cleanups.
8536         * inf-loop.c (inferior_event_handler): Instead of calling
8537         discard_all_continuations, use do_all_continuations with 1 as
8538         'error' parameter.  Pass 0 as 'error' parameter in existing uses
8539         of discard_all_continuations.
8540         * infcmd.c (step_1): Do not use exec cleanup.  For async case, discard
8541         cleanups.
8542         (step_once): Install continuation only after resuming the target.
8543         (step_1_continuation): Disable longjmp breakpoint on error.
8544         (finish_command_continuation): Add the error parameter.  Delete
8545         the finish breakpoint directly, do not use cleanups.
8546         (finish_command): Do not use exec_cleanups. Always setup
8547         continuation.  For sync case, immediately run them.
8548         (attach_command_continuation): Add the error parameter.
8549         * infrun.c (fetch_inferior_event): Do not use exec cleanups to
8550         remove step_resume_breakpoint -- adjust delete it directly.
8551         * interps.c (interp_set): Adjust call to do_all_continations.
8552         * mi/mi-interp.c (mi_interpreter_exec_continuation): Do not
8553         do exec cleanups.
8554         * mi/mi-main.c (mi_cmd_target_select): Do not do exec
8555         cleanups.
8556         (mi_cmd_execute): Do not use exec_cleanup.
8557         (mi_execute_async_cli_command): Simplify the string concatenation
8558         logic.  Do no use exec cleanup.
8559         (mi_exec_async_cli_cmd_continuation): New parameter error.
8560         Free last_async_command.
8561         * top.c (command_line_handler_continuation): New parameter error.
8562         * utils.c (exec_cleanup_chain, make_exec_cleanup)
8563         (do_exec_cleanups): Remove.
8564         (add_continuation, do_all_continations)
8565         (add_intermediate_continuation)
8566         (do_all_intermediate_continuations): New parameter error.
8567
8568 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
8569
8570         * breakpoint.h (bp_location_p): New typedef.
8571         Register a vector of bp_location_p.
8572         * breakpoint.c (always_inserted_mode)
8573         (show_always_inserted_mode): New.
8574         (unlink_locations_from_global_list): Remove.
8575         (update_global_location_list)
8576         (update_global_location_list_nothrow): New.
8577         (update_watchpoint): Don't free locations.
8578         (should_insert_location): New.
8579         (insert_bp_location): Use should_insert_location.
8580         (insert_breakpoint_locations): Copied from
8581         insert_breakpoints.
8582         (insert_breakpoint): Use insert_breakpoint_locations.
8583         (bpstat_stop_status): Call update_global_location_list
8584         when disabling breakpoint.
8585         (allocate_bp_location): Don't add to bp_location_chain.
8586         (set_raw_breakpoint)
8587         (create_longjmp_breakpoint, enable_longjmp_breakpoint)
8588         (disable_longjmp_breakpoint, create_overlay_event_breakpoint)
8589         (enable_overlay_breakpoints, disable_overlay_breakpoints)
8590         (set_longjmp_resume_breakpoint)
8591         (enable_watchpoints_after_interactive_call_stop)
8592         (disable_watchpoints_before_interactive_call_start)
8593         (create_internal_breakpoint)
8594         (create_fork_vfork_event_catchpoint)
8595         (create_exec_event_catchpoint, set_momentary_breakpoint)
8596         (create_breakpoints, break_command_1, watch_command_1)
8597         (create_exception_catchpoint)
8598         (handle_gnu_v3_exceptions)
8599         (disable_breakpoint, breakpoint_re_set_one)
8600         (create_thread_event_breakpoint, create_solib_event_breakpoint)
8601         (create_ada_exception_breakpoint): : Don't call check_duplicates.
8602         Call update_global_location_list.
8603         (delete_breakpoint): Don't remove locations and don't
8604         try to reinsert them. Call update_global_location_list.
8605         (update_breakpoint_locations): Likewise.
8606         (restore_always_inserted_mode): New.
8607         (update_breakpoints_after_exec): Temporary disable
8608         always inserted mode.
8609         * Makefile.in: Update dependencies.
8610
8611         * infrun.c (proceed): Remove breakpoints while stepping
8612         over breakpoint.
8613         (handle_inferior_event): Don't remove or insert
8614         breakpoints.
8615         * linux-fork.c (checkpoint_command): Remove breakpoints
8616         before fork and insert after.
8617         (linux_fork_context): Remove breakpoints before switch
8618         and insert after.
8619         * target.c (target_disconnect, target_detach): Remove
8620         breakpoints from target.
8621
8622
8623 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
8624
8625         * breakpoint.c (print_one_breakpoint_location): In MI
8626         mode, report the location string the breakpoint was
8627         originally created with.
8628
8629 2008-04-23  Maxim Grigoriev  <maxim2405@gmail.com>
8630
8631         * Makefile.in (xtensa-tdep.o): Update dependencies.
8632         * configure.tgt (xtensa*): Update dependencies.
8633         * xtensa-tdep.c (arreg_number): Renamed from areg_number.
8634         Local variable areg renamed to arreg.
8635         (areg_number): New function.
8636         (xtensa_pseudo_register_read, xtensa_pseudo_register_write)
8637         (xtensa_extract_return_value, xtensa_store_return_value): areg_number
8638         replaced by arreg_number.
8639         (xtensa_windowed_frame_cache, struct xtensa_frame_cache): New comments.
8640         (xtensa_alloc_frame_cache): Initialize cache->wd.ws.
8641         (xtensa_scan_prologue): New function.
8642         (xtensa_frame_cache): New local fp_regnum. Handle separately the case,
8643         when ENTRY instraction hasn't been executed yet. Get the frame pointer
8644         value based on prologue analysis. Fix the bugs preventing WS and
8645         AR4-AR7/A11 registers from getting right values for intermediate frames,
8646         whose registers have been already spilled.
8647         (xtensa_frame_prev_register): Fix WS register value. Use are_number
8648         and arreg_number appropriately.
8649         (xtensa_gdbarch_init): Set solib_svr4_fetch_link_map_offsets to
8650         svr4_ilp32_fetch_link_map_offsets.
8651
8652 2008-04-23  Andrew Stubbs  <andrew.stubbs@st.com>
8653
8654         * printcmd.c: Define USE_PRINTF_I64 and PRINTF_HAS_LONG_LONG on MinGW.
8655         (printf_command): Convert %lld to %I64d when USE_PRINTF_I64 set.
8656
8657 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
8658
8659         * acinclude.m4: Add override.m4.
8660         * configure: Regenerate.
8661
8662 2008-04-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
8663
8664         * ada-lang.c (get_selections): Variable PROMPT made non-const and
8665         initialized with a trailing space now.  Use PROMPT_ARG of
8666         COMMAND_LINE_INPUT instead of printing it ourselves.
8667
8668 2008-04-22  Joel Brobecker  <brobecker@adacore.com>
8669
8670         * NEWS: Document support for 64-bit core file.
8671
8672 2008-04-22  Corinna Vinschen  <vinschen@redhat.com>
8673
8674         * NEWS: Add information on calling convention and new SH CLI options.
8675
8676         * sh-tdep.c (sh_cc_gcc): New static string.
8677         (sh_cc_renesas): Ditto.
8678         (sh_cc_enum): New static string array.
8679         (sh_active_calling_convention): New static string pointer denoting
8680         active user chosen ABI.
8681         (sh_is_renesas_calling_convention): New function to return function
8682         specific ABI, or user choice if necessary.
8683         (sh_use_struct_convention): Rename first argument and turn around its
8684         meaning.  Check for renesas ABI and return accordingly.
8685         (sh_use_struct_convention_nofpu): New function.
8686         (sh_next_flt_argreg): Get function type as third parameter.  Check
8687         for renesas ABI and choose floating registers accordingly.
8688         (sh_push_dummy_call_fpu): Check for ABI and choose argument slot and
8689         struct return slot accordingly.
8690         (sh_push_dummy_call_nofpu): Ditto.
8691         (sh_return_value_nofpu): Call sh_use_struct_convention_nofpu from here.
8692         Evaluate ABI and give to sh_use_struct_convention_nofpu.
8693         (sh_return_value_fpu):  Evaluate ABI and give to
8694         sh_use_struct_convention.
8695         (show_sh_command): New function.
8696         (set_sh_command): Ditto.
8697         (_initialize_sh_tdep): Initialize `set/show sh calling-convention
8698         CLI command.
8699
8700         * gdbarch.sh (return_value): Add func_type argument.
8701         * gdbarch.c: Regenerate.
8702         * gdbarch.h: Ditto.
8703         * eval.c (evaluate_subexp_standard): Rename local variable value_type to
8704         val_type so as not to collide with value_type function.  Call
8705         using_struct_return with additional function type argument.
8706         * infcall.c (call_function_by_hand): Call using_struct_return and
8707         gdbarch_return_value with additional function type argument.
8708         * infcmd.c (print_return_value): Take addition func_type argument.
8709         Call gdbarch_return_value with additional function type argument.
8710         (finish_command_continuation): Call print_return_value with additional
8711         function type argument.
8712         (finish_command): Ditto.
8713         * sparc-tdep.c (sparc32_push_dummy_code): Call using_struct_return with
8714         additional function type argument.
8715         * stack.c (return_command): Call using_struct_return and
8716         gdbarch_return_value with additional function type argument.
8717         * value.c (using_struct_return): Take additional function type argument.
8718         * value.h (using_struct_return): Accommodate declaration.
8719         * alpha-tdep.c (alpha_return_value): Add func_type argument.
8720         * amd64-tdep.c (amd64_return_value): Ditto.
8721         * arm-tdep.c (arm_return_value): Ditto.
8722         * avr-tdep.c (avr_return_value): Ditto.
8723         * cris-tdep.c (cris_return_value): Ditto.
8724         * frv-tdep.c (frv_return_value): Ditto.
8725         * h8300-tdep.c (h8300_return_value): Ditto.
8726         (h8300h_return_value): Ditto.
8727         * hppa-tdep.c (hppa32_return_value): Ditto.
8728         (hppa64_return_value): Ditto.
8729         * i386-tdep.c (i386_return_value): Ditto.
8730         * ia64-tdep.c (ia64_return_value): Ditto.
8731         * iq2000-tdep.c (iq2000_return_value): Ditto.
8732         * m32c-tdep.c (m32c_return_value): Ditto.
8733         * m32r-tdep.c (m32r_return_value): Ditto.
8734         * m68hc11-tdep.c (m68hc11_return_value): Ditto.
8735         * m68k-tdep.c (m68k_return_value): Ditto.
8736         (m68k_svr4_return_value): Ditto.
8737         * m88k-tdep.c  (m88k_return_value): Ditto.
8738         * mep-tdep.c (mep_return_value): Ditto.
8739         * mips-tdep.c (mips_eabi_return_value): Ditto.
8740         (mips_n32n64_return_value): Ditto.
8741         (mips_o32_return_value): Ditto.
8742         (mips_o64_return_value): Ditto.
8743         * mn10300-tdep.c (mn10300_return_value): Ditto.
8744         * mt-tdep.c (mt_return_value): Ditto.
8745         * ppc-linux-tdep.c (ppc_linux_return_value): Ditto.
8746         * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Ditto.
8747         (ppc_sysv_abi_broken_return_value): Ditto.
8748         (ppc64_sysv_abi_return_value): Ditto.
8749         * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto.
8750         (ppc_sysv_abi_broken_return_value): Ditto.
8751         (ppc64_sysv_abi_return_value): Ditto.
8752         * ppcnbsd-tdep.c (ppcnbsd_return_value): Ditto.
8753         * rs6000-tdep.c (rs6000_return_value): Ditto.
8754         * s390-tdep.c (s390_return_value): Ditto.
8755         * score-tdep.c (score_return_value): Ditto.
8756         * sh-tdep.c (sh_return_value_nofpu): Ditto.
8757         (sh_return_value_fpu): Ditto.
8758         * sh64-tdep.c (sh64_return_value): Ditto.
8759         * sparc-tdep.c (sparc32_return_value): Ditto.
8760         * sparc64-tdep.c (sparc64_return_value): Ditto.
8761         * spu-tdep.c (spu_return_value): Ditto.
8762         * v850-tdep.c (v850_return_value): Ditto.
8763         * vax-tdep.c (vax_return_value): Ditto.
8764         * xstormy16-tdep.c (xstormy16_return_value): Ditto.
8765         * xtensa-tdep.c (xtensa_return_value): Ditto.
8766
8767         * gdbtypes.h (struct type): Add calling_convention member.
8768         * dwarf2read.c (read_subroutine_type): Add calling convention read
8769         from DW_AT_calling_convention attribute to function type.
8770
8771 2008-04-22  Markus Deuling  <deuling@de.ibm.com>
8772
8773         * eval.c (evaluate_subexp_standard): Use value_subscripted_rvalue for
8774         multi_f77_subscript to support values from registers.
8775         * valarith.c (value_subscripted_rvalue): Remove prototype and static.
8776         * value.h (value_subscripted_rvalue): Add prototype.
8777
8778         * f-typeprint.c (f_type_print_base): Add support for TYPE_CODE_UNION.
8779         Fix output.
8780         * f-valprint.c (f_val_print): Likewise.
8781
8782 2008-04-21  Craig Silverstein  <csilvers@google.com>
8783
8784         * dwarf2read.c (zlib_decompress_section): Define abfd in the
8785         !HAVE_ZLIB_H case.
8786
8787 2008-04-21  Pedro Alves  <pedro@codesourcery.com>
8788
8789         * symfile.c (syms_from_objfile): Don't warn if lowest loadable
8790         section is not a code section.
8791
8792 2008-04-19  Craig Silverstein  <csilvers@google.com>
8793
8794         * NEWS: Add information on compressed debug sections.
8795
8796 2008-04-19  Vladimir Prus  <vladimir@codesourcery.com>
8797
8798         * mi/mi-cmd-var.c (varobj_update_one): Print new
8799         value for variable objects that changed type.
8800
8801 2008-04-19  Vladimir Prus  <vladimir@codesourcery.com>
8802
8803         * varobj.c (varobj_invalidate): Don't touch floating
8804         varobjs.
8805
8806 2008-04-19  Mark Kettenis  <kettenis@gnu.org>
8807
8808         * symtab.c: (multiple_symbols_modes, multiple_symbols_ask)
8809         (multiple_symbols_cancel): Remove extra const.
8810         * symtab.h: Likewise.
8811
8812 2008-04-19  Nick Roberts  <nickrob@snap.net.nz>
8813
8814         * interps.c (top_level_interpreter): Rename static variable...
8815         (top_level_interpreter_ptr): ...to this.
8816         (top_level_interpreter): New function.
8817
8818         * interps.h: New extern for top_level_interpreter.
8819
8820         * linespec.c: Include interps.h and mi/mi-cmds.h.
8821         (decode_line_2): When using MI, always set all breakpoints in menu.
8822
8823         * Makefile.in (linespec.o, mi-interp.o): Add dependencies.
8824
8825 2008-04-18  Craig Silverstein  <csilvers@google.com>
8826
8827         * configure.ac (AC_SEARCH_LIBS): Add check for zlib.
8828         * config.in, configure: Regenerate.
8829         * dwarf2read.c: Include zlib.h if present.
8830         Modified *_SECTION macros.
8831         (section_is_p): New.
8832         (dwarf2_locate_sections): Use section_is_p instead of strcmp
8833         (dwarf2_resize_section): New.
8834         to determine whether a given section has a given name.
8835         (zlib_decompress_section): New.
8836         (dwarf2_read_section): Read the compressed section if present
8837         in the binary.
8838         * MAINTAINERS: Added myself to section Write After Approval.
8839
8840 2008-04-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
8841
8842         * defs.h (exec_set_section_offsets): Remove prototype.
8843         * exec.c (exec_set_section_offsets): Remove function.
8844
8845 2008-04-18  Joel Brobecker  <brobecker@adacore.com>
8846
8847         * stabsread.c (cleanup_undefined_types_1): Add instance flags check
8848         in the search for the matching symbol.
8849
8850 2008-04-17  Marc Khouzam  <marc.khouzam@ericsson.com>
8851
8852         * breakpoint.c (update_watchpoint): Always reparse
8853         condition.
8854
8855 2008-04-17  Joel Brobecker  <brobecker@adacore.com>
8856
8857         * breakpoint.c (print_one_breakpoint_location): Make sure to print
8858         the breakpoint address only once.
8859
8860 2008-04-17  Dennis Roberts  <dennis.roberts@sunquestinfo.com>
8861
8862         * rs6000-tdep.c (rs6000_gdbarch_init): Use the BFD architecture,
8863         rather than a hard-coded architecture, for xcoff executables.
8864
8865 2008-04-17  Doug Evans  <dje@google.com>
8866
8867         * buildsym.c (watch_main_source_file_lossage): New fn.
8868         (end_symtab): Call it.
8869
8870         * source.c (find_and_open_source): Add some comments clarifying
8871         handling of FULLNAME argument.  Make static.  Remove pointless
8872         xstrdup/xfree.
8873
8874 2008-04-17  Pedro Alves  <pedro@codesourcery.com>
8875
8876         * inf-loop.c (inferior_event_handler): Also run the intermediate
8877         continuations in the INF_EXEC_COMPLETE case.
8878
8879 2008-04-16  Tom Tromey  <tromey@redhat.com>
8880
8881         * cli/cli-decode.h (CMD_ASYNC_OK): New define.
8882         (set_cmd_async_ok, get_cmd_async_ok): Declare.
8883         * cli/cli-decode.c (set_cmd_async_ok): New function.
8884         (get_cmd_async_ok): New function.
8885         * cli/cli-cmds.c (init_cli_cmds): Mark "pwd", "help", "info", and
8886         "show" as async-ok.
8887         * top.c (execute_command): Use get_cmd_async_ok.
8888         * infcmd.c: Include cli/cli-decode.h.
8889         (_initialize_infcmd): Mark "interrupt" as async-ok.
8890         * Makefile.in (infcmd.o): Depend on cli_decode_h.
8891
8892 2008-04-16  Daniel Jacobowitz  <dan@codesourcery.com>
8893
8894         PR gdb/2445
8895         * exec.c: Correct "arch-utils.h" include.
8896
8897 2008-04-15  Aleksandar Ristovski  <aristovski@qnx.com>
8898
8899         PR gdb/2424
8900         * infrun.c (normal_stop) Move breakpoint_auto_delete further down
8901         to allow printing to 'see' real reason of stop. This fixes PR 2424.
8902         * breakpoint.c (bpdisp_texst): New function. The function takes over
8903         the role of bpstats static array in print_one_breakpoint_location.
8904         (print_it_typical): Print "Temporary breakpoint" instead
8905         of just "Breakpoint" when breakpoint is, well, temporary. For mi-like
8906         protocols, print disp field.
8907         (print_one_breakpoint_location): Removed bpdisps static definition.
8908         Call new bpstat_text function to get value for 'disp' field.
8909         (mention): Print "Temporary breakpoint" instead of just "Breakpoint".
8910
8911 2008-04-15  Daniel Jacobowitz  <dan@codesourcery.com>
8912
8913         * gnulib/Makefile.am, gnulib/m4/gnulib-cache.m4,
8914         gnulib/aux/link-warning.h, gnulib/extra/link-warning.h: Adjust
8915         by rerunning gnulib-tool with --aux-dir=gnulib/extra.
8916         * gnulib/Makefile.in: Regenerate.
8917
8918 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
8919
8920         * Makefile.in (GNULIB_H): New.  Trigger all-lib.
8921         (defs_h): Use $(GNULIB_H).
8922         (all-lib): Depend on gnulib/Makefile.
8923         (gnulib/Makefile): Regenerate gnulib/Makefile and gnulib/.deps.
8924         * config.in, gnulib/Makefile.in: Regenerated.
8925
8926 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
8927
8928         * Makefile.in (LIBGNU, INCGNU): Define.
8929         (INTERNAL_CFLAGS_BASE): Add INCGNU.
8930         (INTERNAL_LIBS, CLIBS, CDEPS): Add LIBGNU.
8931         (CLEANDIRS): New.
8932         ($(LIBGNU), all-lib): New rules.
8933         (clean, distclean, do-maintainer-clean): Use CLEANDIRS.
8934         * configure.ac: Use gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE.
8935         Simplify AC_CONFIG_AUX_DIR.  Generate gnulib/Makefile.
8936         * gnulib: New directory, from gnulib-tool.
8937         * configure, aclocal.m4: Regenerated.
8938
8939 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
8940
8941         * linux-thread-db.c (have_threads_callback): Check thread->private.
8942
8943 2008-04-13  Nick Roberts  <nickrob@snap.net.nz>
8944             Vladimir Prus  <vladimir@codesourcery.com>
8945
8946         Fix @-varobjs.
8947         * varobj.c (value_of_root): Update the expression for
8948         floating varobjs.
8949         * mi/mi-cmd-var.c (varobj_update_one): If type has changed,
8950         report that.
8951
8952 2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>
8953
8954         * mi/mi-cmd-var.c: Include "mi-getopt.h".
8955         (mi_parse_format): New.  Factored out from mi_cmd_var_set_format.
8956         (mi_cmd_var_set_format): Use new mi_parse_format.
8957         (mi_cmd_var_evaluate_expression): Support for -f option to specify
8958         format.
8959         * Makefile.in (mi-cmd-var.o): Update dependencies.
8960
8961         * varobj.h (varobj_get_formatted_value): Declare.
8962         * varobj.c (my_value_of_variable): Added format parameter.
8963         (cplus_value_of_variable): Likewise.
8964         (java_value_of_variable): Likewise.
8965         (c_value_of_variable): Likewise.  Evaluate expression based
8966         on format parameter.
8967         (struct language_specific): Add format parameter to function member
8968         *value_of_variable.
8969         (varobj_get_formatted_value): New.
8970         (varobj_get_value): Added format parameter to method call.
8971
8972 2008-04-08  Joel Brobecker  <brobecker@adacore.com>
8973
8974         * stabsread.c (cleanup_undefined_types_noname): Manually set the
8975         instance flags of the undefined type before calling replace_type.
8976
8977 2008-04-08  Vladimir Prus  <vladimir@codesourcery.com>
8978
8979         * target.h (enum strata): Remove the download_stratum.
8980
8981 2008-04-07  Doug Evans  <dje@google.com>
8982
8983         * buildsym.h (last_source_file): Add dwarf info to comment.
8984         (last_source_start_addr): Ditto.
8985
8986 2008-04-07  Pedro Alves  <pedro@codesourcery.com>
8987
8988         * alphanbsd-tdep.c: Include "target.h".
8989         * mn10300-tdep.c: Include "target.h".
8990         * Makefile.in (alphanbsd-tdep.o, mn10300-tdep.o): Update.
8991
8992 2008-04-06  Vladimir Prus  <vladimir@codesourcery.com>
8993
8994         Fix breakpoint condition that use member variables.
8995         * valops.c (check_field): Remove.
8996         (check_field_in): Rename to check_field.
8997         (value_of_this): Use la_name_of_this.
8998         * value.h (check_field): Adjust prototype.
8999
9000         * language.h (la_value_of_this): Rename to la_name_of_this.
9001         * language.c (unknown_language_defn): Specify "this" for
9002         name_of_this.
9003         (auto_language_defn): Likewise.
9004         (local_language_defn): Likewise.
9005         * ada-lang.c (ada_language_defn): Adjust comment.
9006         * c-lang.c (c_language_defn): Adjust comment.
9007         (cplus_language_defn): Specify "this" for name_of_this.
9008         (asm_language_defn): Adjust comment.
9009         (minimal_language_defn): Adjust comment.
9010         * f-lang.c (f_language_defn): Specify NULL for name_of_this.
9011         * jv-lang.c (java_language_defn): Specify "this" for name_of_this.
9012         * m2-lang.c (m2_language_defn): Specify "this" for name_of_this.
9013         * objc-lang.c (objc_language_defn): Specify "self" for
9014         name_of_this.
9015         * p-lang.c (pascal_language_defn): Specify "this" for
9016         name_of_this.
9017         * scm-lang.c (scm_language_defn): Specify NULL for name_of_this.
9018
9019         * symtab.c (lookup_symbol_aux): Lookup "this" in the
9020         proper scope, and check for field in type of "this", without
9021         trying to create a value.
9022
9023 2008-04-04  Pedro Alves  <pedro@codesourcery.com>
9024
9025         * mi/mi-cmds.h (enum mi_cmd_result): Delete MI_CMD_ERROR.
9026         (mi_error_message): Delete declaration.
9027         * mi/mi-interp.c (mi_cmd_interpreter_exec): Call error instead of
9028         returning MI_CMD_ERROR.
9029         * mi/mi-main.c (mi_error_message): Delete.
9030         (mi_cmd_exec_interrupt):
9031         (mi_cmd_thread_select, mi_cmd_thread_list_ids)
9032         (mi_cmd_thread_info): Call error instead of returning
9033         MI_CMD_ERROR.
9034         (mi_cmd_data_list_register_values): Call error instead of
9035         returning MI_CMD_ERROR.  Adapt to new get_register interface.
9036         (get_register): Change return typo to void.  Call error instead of
9037         returning MI_CMD_ERROR.
9038         (mi_cmd_data_write_register_values): Call error instead of
9039         returning MI_CMD_ERROR.
9040         (mi_cmd_list_features): Return MI_CMD_DONE.
9041         (captured_mi_execute_command): Remove MI_CMD_ERROR handling.
9042         (mi_execute_command): Always print exceptions with -error.
9043
9044 2008-04-04  Joel Brobecker  <brobecker@adacore.com>
9045
9046         * NEWS: Mention new commands set/show multiple-symbols.
9047
9048 2008-04-03  Joel Brobecker  <brobecker@adacore.com>
9049
9050         * symtab.c (multiple_symbols_ask, multiple_symbols_all)
9051         (multiple_symbols_cancel): New constants.
9052         (multiple_symbols_modes, multiple_symbols_mode): New static globals.
9053         (multiple_symbols_select_mode): New function.
9054         (_initialize_symtab): Add new set/show multiple-symbols commands.
9055         * symtab.h (multiple_symbols_ask, multiple_symbols_all)
9056         (multiple_symbols_cancel, multiple_symbols_select_mode): Declare.
9057         * ada-lang.c (user_select_syms): Add handling of new multiple-symbols
9058         setting.
9059         * linespec.c (decode_line_2): Likewise.
9060
9061 2008-04-03  Doug Evans  <dje@sebabeach.org>
9062
9063         * symtab.h (enum free_code): Delete free_contents, unused.
9064         * symmisc.c (free_symtab_block): Delete.
9065         (free_symtab, case free_code): Delete.
9066
9067 2008-04-01  Aleksandar Ristovski  <aristovski@qnx.com>
9068
9069         * valops.c (value_cast_structs): New function. Cast related
9070         STRUCT types up/down and return cast value. The body of this
9071         function comes mostly from value_cast_pointers.
9072         (value_cast_pointers): Code for actual cast STRUCT-STRUCT moved
9073         to value_cast_structs. Now value_cast_pointers needs only create
9074         appropriate reference after using value_cast_structs for actual
9075         casting.
9076         (value_cast): Handle references.
9077
9078 2008-04-01  Marc Khouzam  <marc.khouzam@ericsson.com>
9079
9080         * MAINTAINERS: Added myself to section Write After Approval.
9081
9082 2008-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
9083
9084         * ia64-tdep.c (examine_prologue): Correct array access.
9085
9086 2008-03-28  Aleksandar Ristovski  <aristovski@qnx.com>
9087
9088         * cp-support.c (first_component_command): Return if no arguments.
9089
9090 2008-03-28  Carlos O'Donell  <carlos@codesourcery.com>
9091
9092         * ser-mingw.c (ser_windows_open): Open requested name.
9093
9094 2008-03-28  Aleksandar Ristovski  <aristovski@qnx.com>
9095
9096         * MAINTAINERS: Added myself.
9097
9098 2008-03-28  Pedro Alves  <pedro@codesourcery.com>
9099
9100         * target.c (find_default_run_target): Allow a NULL `do_mesg'
9101         parameter.  If it is NULL, don't call error.
9102         (find_default_can_async_p, find_default_is_async_p): Pass NULL as
9103         `do_mesg' parameter to find_default_run_target.  If no target was
9104         found, return 0.
9105
9106 2008-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
9107
9108         * mips-linux-tdep.c: Update N32/N64 signal frame comments.
9109         (N64_SIGCONTEXT_LO, N64_SIGCONTEXT_PC, N64_SIGCONTEXT_FPCSR): Update.
9110         (N64_SIGCONTEXT_FIR, N64_SIGCONTEXT_CAUSE, N64_SIGCONTEXT_BADVADDR):
9111         Delete.
9112         (mips_linux_n32n64_sigframe_init): Do not record cause or badvaddr.
9113
9114 2008-03-27  Joel Brobecker  <brobecker@adacore.com>
9115
9116         GDB 6.8 released.
9117
9118 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
9119
9120         * features/Makefile (%.dat): Set xmltarget to the base filename
9121         of the XML source, without subdirectory.
9122         * regformats/rs6000/powerpc-32.dat: Regenerate.
9123         * regformats/rs6000/powerpc-64.dat: Regenerate.
9124         * regformats/rs6000/powerpc-e500.dat: Regenerate.
9125
9126 2008-03-27  Markus Deuling  <deuling@de.ibm.com>
9127
9128         * xcoffread.c (scan_xcoff_symtab): Replace current_gdbarch by
9129         objfile arch.
9130
9131 2008-03-27  Nick Roberts  <nickrob@snap.net.nz>
9132
9133         * mi/mi-main.c (enum captured_mi_execute_command_actions):
9134         Spell suppress in EXECUTE_COMMAND_SUPPRESS_PROMPT correctly.
9135
9136 2008-03-26  Ulrich Weigand  <uweigand@de.ibm.com>
9137
9138         * objfiles.h (struct objfile): New GDBARCH member.
9139         (get_objfile_arch): Add prototype.
9140         * objfiles.c: Include "arch-utils.h".
9141         (allocate_objfile): Look up gdbarch associated with bfd.
9142         (get_objfile_arch): New function.
9143         * Makefile (objfiles.o): Update dependencies.
9144
9145         * dwarf2-frame.c (decode_frame_entry_1): Replace current_gdbarch
9146         by objfile arch.
9147         * dwarf2loc.c (dwarf_expr_read_reg): Replace current_gdbarch
9148         by frame arch.
9149         (locexpr_describe_location): Replace current_gdbarch by
9150         objfile arch.
9151         * dwarf2read.c (die_type): Replace current_gdbarch by objfile arch.
9152         (dwarf2_add_field): Likewise.
9153         (read_tag_pointer_type): Likewise.
9154         (read_base_type): Likewise.
9155         (new_symbol): Likewise.
9156
9157         * coffread.c (decode_type): Add OBJFILE argument.  Update callers.
9158         (decode_base_type, decode_function_type): Likewise.
9159         (coff_read_struct_type, coff_read_enum_type): Likewise.
9160         (coff_symtab_read): Replace current_gdbarch by objfile arch.
9161         (decode_base_type): Likewise.
9162         (coff_read_enum_type): Likewise.
9163         (coff_read_struct_type): Replace current_objfile by OBJFILE argument.
9164         (coff_read_enum_type): Likewise.
9165
9166         * dbxread.c (read_dbx_symtab): Replace current_gdbarch by objfile arch.
9167         (end_psymtab): Likewise.
9168         (process_one_symbol): Likewise.
9169
9170         * mdebugread.c (parse_symbol): Replace current_gdbarch by objfile arch.
9171         (parse_procedure): Likewise.
9172         (parse_partial_symbols): Likewise.
9173
9174         * somread.c (som_symtab_read): Replace current_gdbarch by objfile arch.
9175
9176         * stabsread.c (define_symbol): Replace current_gdbarch by objfile arch.
9177         Replace static pcc_promotion_type and pcc_unsigned_promotion_type by
9178         built-in types.
9179         (read_range_type): Replace current_gdbarch by objfile arch.  Replace
9180         static range_index_type by built-in type.
9181         (read_one_struct_field): Replace current_gdbarch by objfile arch.
9182         (read_enum_type): Likewise.
9183
9184         * xcoffread.c (read_xcoff_symtab): Replace current_gdbarch by
9185         objfile arch.
9186
9187 2008-03-26  Vladimir Prus  <vladimir@codesourcery.com>
9188
9189         * varobj.h (varobj_floating_p): Declare.
9190         * varobj.c (varobj_floating_p): New.
9191         * mi/mi-cmd-var.c (mi_cmd_var_update): When passed
9192         '@' as the name, update all floating varobjs.
9193
9194 2008-03-26  Vladimir Prus  <vladimir@codesourcery.com>
9195
9196         * varobj.c (struct varobj_root): Rename use_selected_frame to
9197         floating, and clarify the meaning.
9198         (varobj_create, varobj_update,  new_root_variable): Adjust.
9199         (value_of_root): Don't use type_changed as in variable,
9200         adjust comment.
9201         (c_value_of_root): Adjust.
9202
9203 2008-03-25  Pedro Alves  <pedro@codesourcery.com>
9204
9205         * linux-nat.c (linux_nat_attach): Add the pid we attached to, to
9206         gdb's thread list.
9207         (linux_nat_wait): Add main lwp to gdb's thread list.
9208         * linux-thread-db.c (find_new_threads_callback): Also attach to
9209         already listed threads which thread_db didn't know about yet.
9210
9211 2008-03-25  Pedro Alves  <pedro@codesourcery.com>
9212
9213         * linux-nat.c (drain_queued_events): Fix comment typo.
9214         (linux_nat_attach): In async mode, don't rely on storing a pending
9215         status.  Instead place the wait status on the pipe.
9216         (linux_nat_resume): Remove unreacheable shortcut code in async
9217         mode.
9218         (stop_wait_callback): In async mode, don't store pending status.
9219         Instead, cancel breakpoints or resend the signal appropriatelly.
9220         (cancel_breakpoint): New, refactored from
9221         cancel_breakpoints_callback.
9222         (cancel_breakpoints_callback): Call cancel_breakpoint.
9223         (pipe_to_local_event_queue): Remove special token processing.
9224         (linux_nat_wait): Issue an internal error if a pending status is
9225         found in async mode.
9226
9227 2008-03-24  Daniel Jacobowitz  <dan@codesourcery.com>
9228
9229         * inflow.c (gdb_has_a_terminal): Guard access to our_process_group.
9230
9231 2008-03-24  Nick Roberts  <nickrob@snap.net.nz>
9232             Vladimir Prus  <vladimir@codesourcery.com>
9233
9234         * varobj.c  (struct varobj_root): New component thread_id.
9235         (varobj_get_thread_id, check_scope): New functions.
9236         (c_value_of_root): Use check_scope.  Switch to the
9237         proper thread if necessary.
9238
9239         * varobj.h (varobj_get_thread_id): New extern.
9240
9241         * mi/mi-cmd-var.c (print_varobj): Add thread-id field.
9242
9243 2008-03-23  Daniel Jacobowitz  <dan@codesourcery.com>
9244
9245         PR gdb/544
9246         * top.c: Revert 2008-03-21 changes.
9247
9248 2008-03-23  Vladimir Prus  <vladimir@codesourcery.com>
9249
9250         * thread.c (make_cleanup_restore_current_thread): Make it
9251         globally visible.
9252         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
9253         * varobj.c (varobj_update): Don't save/restore frame.
9254         (c_value_of_root): Save/restore thread and frame here,
9255         using make_cleanup_restore_current_thread.
9256         * Makefile.in: Update dependecies.
9257
9258 2008-03-23  Vladimir Prus  <vladimir@codesourcery.com>
9259
9260         * varobj.c (struct varobj_root): Clarify
9261         comment on the frame field.
9262         (varobj_create): Don't set frame if we have no
9263         block.
9264
9265 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
9266
9267         PR gdb/544
9268         Suggested by Jan Kratochvil:
9269         * top.c (gdb_rl_operate_and_get_next_completion): Call
9270         rl_redisplay_function.
9271         (gdb_rl_redisplay): New.
9272         (init_main): Set rl_redisplay_function.
9273
9274 2008-03-21  Thomas Mittelstaedt  <T.Mittelstaedt@cadenas.de>  (tiny change)
9275
9276         * aix-thread.c (pdc_read_regs): Fix compiler warning.
9277         (pdc_write_regs, aix_thread_resume, fetch_regs_kernel_thread)
9278         (store_regs_kernel_thread): Likewise.
9279
9280 2008-03-21  Pedro Alves  <pedro@codesourcery.com>
9281
9282         Linux native async support.
9283
9284         * target.h (struct target_ops): Delete to_async_mask_value and add
9285         to_async_mask.
9286         (target_is_async_p, target_async): Formatting.
9287         (target_async_mask_value): Delete.
9288         (target_async_mask): Delete function declaration, and add new
9289         target macro with the same name.
9290
9291         * target.c (update_current_target): Replace to_async_mask_value by
9292         to_async_mask.  Default to_async_mask to return_one.
9293         (target_async_mask): Delete.
9294         (find_default_can_async_p, find_default_is_async_p): New.
9295         (init_dummy_target): register find_default_can_async_p and
9296         find_default_is_async_p on the dummy target.
9297
9298         * linux-nat.c: Include inf-loop.h, event-loop.h and event-top.h.
9299         (debug_linux_nat_async): New global.
9300         (show_debug_linux_nat_async): New function.
9301         (linux_nat_async_enabled, linux_nat_async_mask_value)
9302         (linux_nat_event_pipe, linux_nat_num_queued_events)
9303         (linux_nat_async_events_enabled): New globals.
9304         (struct waitpid_result): New struct.
9305         (waitpid_queue): New global.
9306         (queued_waitpid, push_waitpid, drain_queued_events): New.
9307         (my_waitpid): Call queued_waitpid.
9308         (linux_child_follow_fork): Disable async events during the call.
9309         (blocked_mask): Delete.
9310         (sync_sigchld_action, async_sigchld_action): New globals.
9311         (lin_lwp_attach_lwp): In sync mode, don't reblock SIGCHLD.  In
9312         async mode, block events during the call.
9313         (linux_nat_create_inferior): New.
9314         (linux_nat_attach): In sync mode, restore the mask states.  In
9315         async mode, wake the event loop immediatelly.
9316         (detach_callback): Drain all queued events of the lwp we're
9317         detaching from.
9318         (linux_nat_detach): Block async mode, and drain events of the main
9319         process.
9320         (linux_nat_resume): If in async mode, mask async events during the
9321         call.  If short circuiting, force event loop to wake up.  If
9322         resuming, set target_executing, and register target events in the
9323         event loop.
9324         (pipe_to_local_event_queue, local_event_queue_to_pipe): New.
9325         (linux_nat_wait): In async mode, block events during the call.
9326         Only enable/disable passing SIGINT to the inferior in sync mode.
9327         Get events from local waitpid queue.  If no interesting events was
9328         found, return to events loop.  Reregister target events in the
9329         event loop on exit.  In sync mode, no need to reblock SIGCHLD.
9330         (linux_nat_kill): Disable events on entry.
9331         (linux_nat_mourn_inferior): In sync mode, don't restore the masks
9332         here.  Detach async mode from the event loop if there are no more
9333         forks available, otherwise leave it on.
9334         (sigchld_handler): Assure this is called only in sync mode.
9335         (linux_async_permitted, linux_async_permitted_1): New globals.
9336         (set_maintenance_linux_async_permitted)
9337         (show_maintenance_linux_async_permitted): New functions.
9338         (linux_nat_is_async_p, linux_nat_can_async_p)
9339         (linux_nat_async_mask): New.
9340         (linux_nat_event_pipe_pop, linux_nat_event_pipe_push): New.
9341         (get_pending_events, async_sigchld_handler): New.
9342         (linux_nat_async_events): New.
9343         (async_terminal_is_ours): New global.
9344         (linux_nat_terminal_inferior, linux_nat_terminal_ours): New.
9345         (async_client_callback, async_client_context): New.
9346         (linux_nat_async_file_handler, linux_nat_async)
9347         (linux_nat_disable_async, linux_nat_enable_async): New.
9348         (linux_nat_add_target): Register linux_nat_create_inferior,
9349         linux_nat_can_async_p, linux_nat_is_async_p, linux_nat_async,
9350         linux_nat_async_mask, linux_nat_terminal_inferior and
9351         linux_nat_terminal_ours.
9352         (_initialize_linux_nat): Remove local action variable, and update
9353         code that used it to use sync_sigchld_action.  Add new
9354         "lin-lwp-async" debug set/show command.  Put the "lin-lwp" debug
9355         set/show command in the maintenance class.  Add new "linux-async"
9356         maintenance set/show command.  Block SIGCHLD by default.  Setup
9357         async_sichld_action, and sync_sigchld_action.  Install the default
9358         async mode.
9359         (lin_thread_get_thread_signals): Use a local sigset_t for blocking
9360         the cancel signals.
9361
9362         * linux-thread-db.c (re_check_for_thread_db): New.
9363         (clear_lwpid_callback): Handle TARGET_WAITKIND_IGNORE.
9364         (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
9365         (thread_db_async_mask): New.
9366         (init_thread_db_ops): Register thread_db_can_async_p,
9367         thread_db_is_async_p, thread_db_async and thread_db_async_mask.
9368
9369         * remote.c (remote_async_mask_value): New.
9370         (remote_return_zero): New.
9371         (init_remote_ops): Register remote_return_zero as callbacks of
9372         to_can_async_p and to_is_async_p.
9373         (remote_can_async_p, remote_is_async_p, remote_async): Update to
9374         use remote_async_mask_value.
9375         (remote_async_mask): New.
9376         (init_remote_async_ops): Remove to_async_mask_value setting and
9377         register remote_async_mask as to_async_mask callback in
9378         remote_async_ops.
9379
9380         * Makefile.in (linux-nat.o): Update.
9381
9382 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
9383
9384         * gdbthread.h (add_thread_with_info): New.
9385         * linux-thread-db.c: Add some documentation.
9386         (GET_LWP, GET_PID, GET_THREAD, is_lwp, is_thread, BUILD_LWP): Delete.
9387         (struct private_thread_info): Remove th_valid and ti_valid.
9388         Replace ti with tid.
9389         (thread_get_info_callback): Do not add TID to the new ptid.  Do
9390         not cache th or ti.
9391         (thread_db_map_id2thr, lwp_from_thread): Delete functions.
9392         (thread_from_lwp): Assert that the LWP is set.  Do not add TID to the
9393         new PTID.
9394         (attach_thread): Handle an already-existing thread.  Use
9395         add_thread_with_info.  Cache the th and tid.
9396         (detach_thread): Verify that private was set.  Remove verbose
9397         argument and printing.  Update caller.
9398         (thread_db_detach): Do not adjust inferior_ptid.
9399         (clear_lwpid_callback, thread_db_resume, thread_db_kill): Delete.
9400         (check_event, find_new_threads_callback): Do not add TID to the new PTID.
9401         (thread_db_wait): Do not use lwp_from_thread.
9402         (thread_db_pid_to_str): Use the cached TID.
9403         (thread_db_extra_thread_info): Check that private is set.
9404         (same_ptid_callback): Delete.
9405         (thread_db_get_thread_local_address): Do not use it or check
9406         is_thread.  Check that private is set.  Assume that the thread
9407         handle is already cached.
9408         (init_thread_db_ops): Remove to_resume and to_kill.
9409         * thread.c (add_thread_with_info): New.
9410         (add_thread): Use it.
9411         * linux-nat.c (find_thread_from_lwp): Delete.
9412         (exit_lwp): Do not use it.  Check print_thread_events.  Print before
9413         deleting the thread.
9414         (GET_PID, GET_LWP, BUILD_LWP, is_lwp): Move to...
9415         * linux-nat.h (GET_PID, GET_LWP, BUILD_LWP, is_lwp): ...here.
9416         * inf-ttrace.c (inf_ttrace_wait): Use print_thread_events and
9417         printf_unfiltered for thread exits.
9418         * procfs.c (procfs_wait): Likewise.
9419
9420 2008-03-21  Chris Demetriou  <cgd@google.com>
9421
9422         * symtab.c (rbreak_command): Quote symbol name before passing
9423         it to break_command.
9424
9425 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
9426
9427         * eval.c (evaluate_subexp_for_address): Clarify error message.
9428         Use value_must_coerce_to_target.
9429         * infcall.c (value_arg_coerce): Call value_coerce_to_target.
9430         * valops.c (value_assign): Call value_coerce_to_target when
9431         assigning to anything but internalvars.  Leave GDB-side arrays
9432         as arrays when assigning to internalvars.
9433         (value_must_coerce_to_target, value_coerce_to_target): New.
9434         (value_coerce_array, value_addr): Call value_coerce_to_target.
9435         (value_array): Create the array in GDB's memory instead of
9436         the inferior's.
9437         * value.h (value_must_coerce_to_target, value_coerce_to_target):
9438         Declare.
9439
9440 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
9441
9442         * top.c (quit_confirm): Warn that we will kill the program.
9443
9444 2008-03-19  Pedro Alves  <pedro@codesourcery.com>
9445
9446         * inflow.c (terminal_ours_1): Guard access to
9447         inferior_process_group with #ifdef PROCESS_GROUP_TYPE.
9448
9449 2008-03-18  Ulrich Weigand  <uweigand@de.ibm.com>
9450             Jim Blandy  <jimb@codesourcery.com>
9451             Daniel Jacobowitz  <drow@false.org>
9452
9453         * dwarf2expr.h (struct dwarf_expr_context): Add ADDR_SIZE member.
9454         (dwarf2_read_address): Update prototype.
9455
9456         * dwarf2expr.c (unsigned_address_type): Add ADDR_SIZE parameter.
9457         (signed_address_type): Likewise.
9458         (dwarf2_read_address): Replace BYTES_READ parameter with ADDR_SIZE.
9459         (execute_stack_op): Update calls to unsigned_address_type,
9460         signed_address_type and dwarf2_read_address.  Fix implementation
9461         of DW_OP_deref_size.
9462
9463         * dwarf2loc.h (dwarf2_per_cu_objfile): Add prototype.
9464         (dwarf2_per_cu_addr_size): Likewise.
9465         (struct dwarf2_locexpr_baton): Replace OBJFILE with PER_CU.
9466         (struct dwarf2_loclist_baton): Likewise.
9467
9468         * dwarf2loc.c (find_location_expression): Update calls to
9469         dwarf2_read_address.  Use dwarf2_per_cu_objfile and
9470         dwarf2_per_cu_addr_size to retrieve PER_CU parameters.
9471         (locexpr_describe_location): Likewise.
9472         (dwarf2_evaluate_loc_desc): Replace OBJFILE with PER_CU parameter.
9473         Set ctx->addr_size to dwarf2_per_cu_addr_size (per_cu).
9474         (dwarf2_loc_desc_needs_frame): Add PER_CU parameter.  Set ctx->addr_size
9475         to dwarf2_per_cu_addr_size (per_cu).
9476         (locexpr_read_variable): Update dwarf2_evaluate_loc_desc call.
9477         (loclist_read_variable): Likewise.
9478         (locexpr_read_needs_frame): Update dwarf2_loc_desc_needs_frame call.
9479
9480         * dwarf2read.c (dwarf2_symbol_mark_computed): Set baton->per_cu
9481         instead of baton->objfile.
9482         (dwarf2_per_cu_obfile): New function.
9483         (dwarf2_per_cu_addr_size): Likewise.
9484
9485         * dwarf2-frame.c (struct comp_unit): Move higher.
9486         (struct dwarf2_cie): Add UNIT and ADDR_SIZE members.
9487         (execute_stack_op): Add ADDR_SIZE parameter; set ctx->addr_size.
9488         (execute_cfa_program): Add FDE parameter.  Replace EH_FRAME_P
9489         parameter by using fde->eh_frame_p.  Use read_encoded_value
9490         to implement DW_CFA_set_loc.
9491         (struct dwarf2_frame_cache): Add ADDR_SIZE member.
9492         (dwarf2_frame_cache): Set cache->addr_size.  Update calls to
9493         execute_stack_op and execute_cfa_program.
9494         (dwarf2_frame_prev_register): Update calls to execute_stack_op.
9495         (size_of_encoded_value): Remove.
9496         (read_encoded_value): Add PTR_LEN and FUNC_BASE parameters.
9497         Remove call to size_of_encoded_value.  Implement DW_EH_PE_funcrel.
9498         (add_cie): Set cie->unit backlink.
9499         (decode_frame_entry_1): Set cie->addr_size.  Update calls to
9500         read_encoded_value.
9501         (dwarf2_build_frame_info): Allocate UNIT on objfile obstack.
9502
9503 2008-03-17  Markus Deuling  <deuling@de.ibm.com>
9504
9505         * i386-tdep.c (i386_print_insn): Remove unnecessary call to
9506         gdbarch_bfd_arch_info.
9507
9508 2008-03-17  Joel Brobecker  <brobecker@adacore.com>
9509
9510         * aix-thread.c (pdc_read_regs): Minor reformatting.
9511
9512 2008-03-17  Vladimir Prus  <vladimir@codesourcery.com>
9513
9514         * thread.c (print_thread_info): Don't insist
9515         on having current thread if there are no
9516         threads at all.
9517
9518 2008-03-17  Pedro Alves  <pedro@codesourcery.com>
9519
9520         * infcmd.c (attach_command_post_wait)
9521         (attach_command_continuation): New.
9522         (attach_command): Support background async execution, and async
9523         execution in synchronous mode.
9524
9525 2008-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
9526
9527         * stack.c (print_stack_frame, print_frame): Use RETURN_MASK_ERROR.
9528         * symmisc.c (dump_symtab_1): Likewise.
9529         * wrapper.c (gdb_value_struct_elt): Likewise.
9530
9531 2008-03-17  Pedro Alves  <pedro@codesourcery.com>
9532
9533         * linux-nat.c (linux_nat_filter_event): Fix comment typo.
9534
9535 2008-03-17  Pedro Alves  <pedro@codesourcery.com>
9536
9537         * linux-nat.c (linux_nat_filter_event): New, refactored from
9538         linux_nat_wait.
9539         (linux_nat_wait): Call linux_nat_filter_event.
9540
9541 2008-03-17  Ulrich Weigand  <uweigand@de.ibm.com>
9542
9543         * top.c (execute_command): Fix uninitialized variable error.
9544
9545 2008-03-16  Nick Hudson  <nick.hudson@dsl.pipex.com>
9546
9547         * Makefile.in (amd64nbsd-nat.o): New dependency.
9548         * amd64nbsd-nat.c: Include "nbsd-nat.h".
9549         (_initialize_amd64nbsd_nat): Update target vector to use
9550         nbsd_pid_to_exec_file.
9551         * config/i386/nbsd64.mh (NATDEPFILES): Add nbsd-nat.o.
9552
9553 2008-03-15  Vladimir Prus  <vladimir@codesourcery.com>
9554
9555         Remove ignoring leading exec events code.
9556         * fork-child.c (startup_inferior): Do not set
9557         inferior_ignoring_leading_exec_events.
9558         * inf-child.c (inf_child_reported_exec_events_per_exec_call): Remove.
9559         (inf_child_target): Do not set to_reported_exec_events_per_exec_call.
9560         * infrun.c (inferior_ignoring_leading_exec_events): Remove.
9561         (handle_inferior_event): Remove code for ignoring leading exec
9562         events.
9563         * target.c (update_current_target): Do not inherit, or default,
9564         to_reported_exec_events_per_exec_call.
9565         (debug_to_reported_exec_events_per_exec_call): Remove.
9566         (setup_target_debug): Do not set to_reported_exec_events_per_exec_call.
9567         * target.h (target_reported_exec_events_per_exec_call): Remove.
9568         (struct target): Remove the to_reported_exec_events_per_exec_call
9569         field.
9570
9571 2008-03-15  Vladimir Prus  <vladimir@codesourcery.com>
9572
9573         Implement -thread-info.
9574         * gdbthread.h (print_thread_info): Declare.
9575
9576         * thread.c (print_thread_info): New, extracted
9577         from info_threads_command and adjusted to
9578         work for CLI and MI.
9579         (info_threads_command): Use print_thread_info.
9580         * Makefile.in: Update dependencies.
9581
9582         * mi/mi-cmds.c (mi_cmds): Specify a handler
9583         for -thread-info.
9584         * mi/mi-cmds.h (mi_cmd_thread_info): Declare.
9585         * mi/mi-main.c (mi_cmd_thread_info): New.
9586         (mi_cmd_list_features): Include 'thread-info'.
9587
9588 2008-03-14  Kevin Buettner  <kevinb@redhat.com>
9589
9590         * mips-tdep.c (mips32_scan_prologue): Use the ABI register size
9591         to decide whether to match instruction patterns using "sw" and "sd".
9592
9593 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
9594
9595         * infcmd.c (jump_command): Postpone disabling stdin until after
9596         the possible query.
9597
9598 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
9599
9600         * inflow.c (gdb_getpgrp): New.
9601         (gdb_has_a_terminal): Use get_getpgrp.
9602         (terminal_ours_1): If attach_flag is set, don't refetch
9603         inferior_process_group.
9604
9605 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
9606
9607         * features/library-list.dtd: Allow "section" elements as children
9608         of "library".  Add "section" element and describe its attributes.
9609
9610         * solib-target.c (struct lm_info): Add section_bases member.
9611         (library_list_start_segment): Error out if seen a section element.
9612         (library_list_start_section): New.
9613         (library_list_end_library): New.
9614         (solib_target_free_library_list): Free section_bases.
9615         (section_attributes): New.
9616         (library_children): Make "segment" optional.  Add "section" child.
9617         (library_list_children): Register library_list_end_library.
9618         (solib_target_relocate_section_addresses): Handle section bases.
9619
9620         * NEWS: Mention new qXfer:libraries:read section offsets support.
9621
9622 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
9623
9624         * defs.h (do_exec_error_cleanups, discard_exec_error_cleanups)
9625         (make_exec_error_cleanup): Remove declarations.
9626         * utils.c (exec_error_cleanup_chain): Remove.
9627         (do_exec_error_cleanups, discard_exec_error_cleanups)
9628         (make_exec_error_cleanup): Remove.
9629         * event-loop.c (start_event_loop): Adjust call to
9630         async_enable_stdin.
9631         * event-top.c (async_enable_stdin): Remove the paramater dummy.
9632         (async_disable_stdin): Don't register async_enable_stdin via
9633         cleanup.
9634         * inf-loop.c (inferior_event_handler): Don't
9635         call do_exec_error_cleanups.  Call async_enable_stdin instead.
9636         * event-loop.c (start_event_loop): Adjust call to
9637         async_enable_stdin.
9638         * tui/tui-interp.c (tui_command_loop): Adjust call to
9639         async_enable_stdin.
9640
9641 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
9642
9643         Async mode fixes.
9644         * Makefile.in (infcmd.o, inf-loop.o): Update dependencies.
9645         * breakpoint.c (bpstat_do_actions): In async mode,
9646         don't jump to top expecting stop_bpstat to be already
9647         updated.
9648         * event-loop.c (start_event_loop): Call async_enable_stdin
9649         on exception.
9650         * event-top.c (async_enable_stdin): Do nothing if sync_execution
9651         is not set.
9652         (command_handler): Do not setup continuation here.
9653         (command_line_handler_continuation): Move to...
9654         * top.c (command_line_handler_continuation): ... here.
9655         (execute_command): In async mode, register continuation.
9656         Don't check frame's language in running in async mode.
9657         * exceptions.c (throw_exception): Don't do exec_error_cleanups.
9658         * inf-loop.c (complete_execution): Inline into...
9659         (inferior_event_handler): ... here.  Clear target_executing before
9660         doing any cleanups.  Don't try to show prompt if the target was
9661         resumed.
9662         * infcmd.c (signal_command): Add support for async mode.
9663         (finish_command): Only add continuation if the target was
9664         successfully resumed.
9665         * remote.c (init_async_opts): Register to_get_thread_local_address
9666         handler.
9667         * mi/mi-interp.c (mi_cmd_interpreter_exec): Don't mess
9668         with sync_execution.
9669         * tui/tui-interp.c (tui_command_loop): Call async_enable_stdin
9670         on exception.
9671
9672 2008-03-14  Daniel Jacobowitz  <dan@codesourcery.com>
9673
9674         * corefile.c (reopen_exec_file): Use exec_bfd_mtime.
9675         * exec.c (exec_bfd_mtime): Define.
9676         (exec_close): Clear it.
9677         (exec_file_attach): Set it.
9678         * gdbcore.h (exec_bfd_mtime): Declare.
9679         * source.c (find_source_lines): Do not use bfd_get_mtime.
9680
9681 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
9682
9683         * top.c (simplified_command_loop): Remove.
9684
9685 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
9686
9687         Remove unused remote.c hooks.
9688         * remote.c (deprecated_target_resume_hook)
9689         (deprecated_target_wait_loop_hook): Remove.
9690         (remote_resume): Do not call deprecated_target_resume_hook.
9691         (remote_wait): Do not call deprecated_target_wait_loop_hook.
9692         (remote_async_wait): Likewise.
9693
9694 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
9695
9696         Implement MI notification for new threads.
9697         * doc/observer.texi (new_thread): Document.
9698         * observer.sh: Forward declare struct thread_info.
9699         * thread.c (add_thread): Notify observer.
9700
9701         * interps.h (interp_init_ftype): New parameter
9702         top_level.
9703         (interp_set): Likewise.
9704         (top_level_interpreter_data): Declare.
9705         * interps.c (interp_set): New parameter top_level.
9706         Pass it to interpreter's init function.  Remember
9707         top level interpreter.
9708         (interpreter_exec_cmd): Adjust.
9709         (top_level_interpreter_data): New.
9710         * main.c (captured_main): Pass 1 for top_level
9711         parameter of interp_set.
9712         * cli/cli-interp.c (cli_interpreter_init): New
9713         parameter top_level.
9714         * tui/tui-interp.c (tui_init): New parameter top_level.
9715
9716         * mi/mi-interp.c (mi_new_thread): New.
9717         (mi_interpreter_init): If top level, register
9718         observer for new threads.
9719
9720         * Makefile.in (mi-interp.o, thread.o): Update dependencies.
9721
9722 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
9723
9724         * top.c (execute_command): Disable break and stop
9725         commands in async mode.
9726
9727 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
9728
9729         revert:
9730         2008-03-14  Pedro Alves  <pedro@codesourcery.com>
9731         * inf-loop.c (inferior_event_handler): Don't include remote.h.
9732         Call target_stop in the INF_QUIT_REQ case.
9733         * Makefile.in (inf-loop.o): Update.
9734
9735 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
9736
9737         * inf-loop.c (inferior_event_handler): Don't include remote.h.
9738         Call target_stop in the INF_QUIT_REQ case.
9739         * Makefile.in (inf-loop.o): Update.
9740
9741 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
9742
9743         * top.c (execute_command): Enable break, info and interrupt
9744         commands in async mode.
9745
9746 2008-03-13  Vladimir Prus  <vladimir@codesourcery.com>
9747             Daniel Jacobowitz  <dan@codesourcery.com>
9748
9749         * breakpoint.h (breakpoint_restore_shadows): New
9750         declaration.
9751         * breakpoint.c (breakpoint_restore_shadows): New.
9752         (read_memory_nobpt): Delete.
9753         * gdbcore.h (read_memory_nobpt): Delete declaration.
9754         * target.c (memory_xfer_partial): Call
9755         breakpoint_restore_shadows.
9756         (restore_show_memory_breakpoints)
9757         (make_show_memory_breakpoints_cleanup): New.
9758         (show_memory_breakpoints): New.
9759         * target.h (make_show_memory_breakpoints_cleanup): Declare.
9760         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
9761         Make sure we see memory breakpoints when checking if
9762         breakpoint is still there.
9763         * alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
9764         hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
9765         m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
9766         sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
9767
9768 2008-03-12  Pedro Alves  <pedro@codesourcery.com>
9769
9770         * thread.c (add_thread): Use printf_unfiltered to print.
9771
9772 2008-03-12  Joel Brobecker  <brobecker@gnat.com>
9773
9774         * sol-thread.c: Replace use of TM_I386SOL2_H by an expression
9775         that is true only on x86-solaris and x86_64-solaris.
9776         * procfs.c: Likewise. Move procfs_find_LDT_entry up together
9777         with proc_get_LDT_entry.
9778
9779 2008-03-12  Thiago Jung Bauermann  <bauerman@br.ibm.com>
9780
9781         * configure.ac (AC_CHECK_FUNCS): Add check for setsid.
9782         * config.in, configure: Regenerate.
9783         * fork-child.c (fork_inferior): Call create_tty_session.
9784         * inflow.c (new_tty): Set controlling terminal with TIOCSCTTY.
9785         (create_tty_session): New function.
9786         * terminal.h: Declare create_tty_session.
9787
9788 2008-03-12  Alan Modra  <amodra@bigpond.net.au>
9789
9790         PR 5900
9791         * elfread.c (elf_symtab_read): Make shndx an unsigned int.
9792         * mipsread.c: Include elf/internal.h.
9793         (read_alphacoff_dynamic_symtab): Map external reserved sym_shndx
9794         to internal range.
9795
9796 2008-03-11  Markus Deuling  <deuling@de.ibm.com>
9797
9798         * win32-nat.c (do_win32_fetch_inferior_registers): Use get_regcache_arch
9799         to get at the current architecture and at the target specific vector.
9800         Add target specific vector to I387_FISEG_REGNUM and I387_FOP_REGNUM and
9801         remove define of I387_ST0_REGNUM.
9802
9803         * amd64-tdep.c (I387_ST0_REGNUM): Remove define.
9804
9805         (amd64_supply_fxsave, amd64_collect_fxsave): Use get_regcache_arch to
9806         get at the current architecture
9807         (I387_FISEG_REGNUM, I387_FOSEG_REGNUM): Add target specific vector as
9808         parameter.
9809
9810         * i386-tdep.c: Remove various define's and undef's of I387_ST0_REGNUM,
9811         I387_NUM_XMM_REGS and I387_MM0_REGNUM.
9812
9813         (I387_NUM_XMM_REGS, I387_XMM0_REGNUM, I387_MXCSR_REGNUM,
9814         I387_ST0_REGNUM, I387_FCTRL_REGNUM, I387_MM0_REGNUM,
9815         (I387_FSTAT_REGNUM): Add target specific vector as parameter.
9816
9817         (i386_register_name, i386_dbx_reg_to_regnum): Use gdbarch_tdep to get
9818         at the target specific vector.
9819
9820         (i386_get_longjmp_target): Use get_frame_arch to get at the current
9821         architecture. Use gdbarch_tdep to get at the target specific vector.
9822
9823         (i386_fp_regnum_p, i386_fpc_regnum_p): Add gdbarch as parameter and
9824         update caller. Use gdbarch_tdep to get at the target specific vector.
9825
9826         (i386_register_to_value: Use get_frame_arch to get at the current
9827         architecture.
9828
9829         * i386-tdep.h (i386_fp_regnum_p, i386_fpc_regnum_p): Add gdbarch as
9830         parameter.
9831
9832         * i387-tdep.c (I387_FCTRL_REGNUM, I387_FSTAT_REGNUM, I387_FTAG_REGNUM,
9833         I387_FISEG_REGNUM, I387_FIOFF_REGNUM, I387_FOSEG_REGNUM
9834         I387_FOOFF_REGNUM, I387_FOP_REGNUM, I387_ST0_REGNUM, FSAVE_ADDR,
9835         FXSAVE_ADDR, I387_XMM0_REGNUM): Add target specific vector as parameter.
9836
9837         (I387_ST0_REGNUM, I387_NUM_XMM_REGS): Remove various define's and
9838         undef's.
9839
9840         (i387_convert_register_p, i387_register_to_value,
9841         i387_value_to_register): Update call for i386_fp_regnum_p.
9842
9843         * i387-tdep.h: Remove comment.
9844         (I387_ST0_REGNUM, I387_NUM_XMM_REGS, I387_MM0_REGNUM): Add define.
9845         (I387_FCTRL_REGNUM, I387_FSTAT_REGNUM, I387_FTAG_REGNUM,
9846         I387_FISEG_REGNUM, I387_FIOFF_REGNUM, I387_FOSEG_REGNUM,
9847         I387_FOOFF_REGNUM, I387_FOP_REGNUM, I387_XMM0_REGNUM,
9848         I387_MXCSR_REGNUM): Add target specific vector as parameter.
9849
9850 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
9851
9852         * Makefile.in (fork-child.o): Update.
9853         * NEWS: Document "set exec-wrapper" and the gdbserver --wrapper
9854         argument.  Gather all gdbserver features together.
9855         * fork-child.c (exec_wrapper): New variable.
9856         (fork_inferior): Use it.
9857         (startup_inferior): Skip an extra trap if using "set exec-wrapper".
9858         (unset_exec_wrapper_command, _initialize_fork_child): New.
9859
9860 2008-03-10  Hidetaka Takano  <hidetaka.takano@glb.toshiba.co.jp>
9861
9862         * source.c (directory_command): Modify the determination of
9863         condition of terminal "from_tty".
9864
9865 2008-03-10  Matt Rice  <ratmice@gmail.com>
9866
9867         * dwarf2read.c (set_cu_language): Add DW_LANG_ObjC.
9868
9869 2008-03-10  Hidetaka Takano  <hidetaka.takano@glb.toshiba.co.jp>
9870
9871         * spu-tdep.c (info_spu_event_command): Insert a '\0' to the end
9872         of the data passing to strtoulst function.
9873         (info_spu_signal_command): Likewise.
9874
9875 2008-03-08  Vladimir Prus  <vladimir@codesourcery.com>
9876
9877         * mi/mi-interp.c (mi_command_loop): Remove
9878         commented-out code.
9879
9880 2008-03-07  Joel Brobecker  <brobecker@adacore.com>
9881
9882         * remote.c (extended_remote_attach_1): Make local variable pid an int
9883         instead of a pid_t.
9884
9885 2008-03-07  Joel Brobecker  <brobecker@adacore.com>
9886
9887         * solib-svr4.c (svr4_same_1): New function, originally extracted
9888         from svr4_same and expanded to handle the sparc64 case.
9889         (svr4_same): Move up and reimplement using svr4_same_1.
9890         (enable_break): Use svr4_same_1 to do shared library name comparisons.
9891
9892 2008-03-07  Ramana Radhakrishnan  <ramana.r@gmail.com>
9893
9894         * MAINTAINERS: Move self to Paper trail.
9895
9896 2008-03-05  Daniel Jacobowitz  <dan@codesourcery.com>
9897
9898         * Makefile.in (mingw-hdep.o, posix-hdep.o, remote-fileio.o): Update.
9899         * event-loop.c (call_async_signal_handler): New.
9900         * event-loop.h (call_async_signal_handler)
9901         (gdb_call_async_signal_handler): Declare.
9902         (mark_async_signal_handler): Add comments.
9903         * event-top.c (handle_sigint): Use gdb_call_async_signal_handler.
9904         * mingw-hdep.c (sigint_event, sigint_handler): New.
9905         (gdb_select): Use them.  Wait for the readline signal handler
9906         to finish.
9907         (gdb_call_async_signal_handler, _initialize_mingw_hdep): New functions.
9908         * posix-hdep.c (gdb_call_async_signal_handler): New function.
9909         * remote-fileio.c (sigint_fileio_token, async_remote_fileio_interrupt):
9910         New.
9911         (remote_fileio_ctrl_c_signal_handler): Use
9912         gdb_call_async_signal_handler.
9913         (initialize_remote_fileio): Initialize sigint_fileio_token.
9914         * remote.c (initialize_sigint_signal_handler, handle_remote_sigint): Do
9915         not initialize tokens here.
9916         (handle_remote_sigint_twice): Likewise.  Reinstall
9917         handle_remote_sigint.
9918         (async_remote_interrupt_twice): Just call interrupt_query.
9919         (cleanup_sigint_signal_handler): Do not delete tokens.
9920         (remote_interrupt, remote_interrupt_twice): Use
9921         gdb_call_async_signal_handler.
9922         (interrupt_query): Reinstall the default signal handler.
9923         (_initialize_remote): Initialize tokens here.
9924
9925 2008-03-04  Joel Brobecker  <brobecker@adacore.com>
9926
9927         * features/rs6000/power-core.xml, features/rs6000/power64-core.xml,
9928         features/rs6000/powerpc-601.xml, features/rs6000/rs6000.xml:
9929         Change the type of the lr register to code_ptr.
9930         * features/rs6000/powerpc-32.c, features/rs6000/powerpc-403.c,
9931         features/rs6000/powerpc-403gc.c, features/rs6000/powerpc-505.c,
9932         features/rs6000/powerpc-601.c, features/rs6000/powerpc-602.c,
9933         features/rs6000/powerpc-603.c, features/rs6000/powerpc-604.c,
9934         features/rs6000/powerpc-64.c, features/rs6000/powerpc-7400.c,
9935         features/rs6000/powerpc-750.c, features/rs6000/powerpc-860.c,
9936         features/rs6000/powerpc-e500.c, features/rs6000/rs6000.c: Regenerate.
9937
9938 2008-03-03  James E. Wilson  <wilson@tuliptree.org>
9939
9940         * MAINTAINERS: Update my email address.
9941
9942 2008-03-03  Keith Seitz  <keiths@redhat.com>
9943
9944         From Dave Murphy  <davem@devkitpro.org>:
9945         * configure.ac: Set tcl configdir to win under mingw.
9946         * configure: Regenerate.
9947
9948 2008-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
9949
9950         * breakpoint.c (fetch_watchpoint_value): New function.
9951         (update_watchpoint): Set and clear val_valid.  Use
9952         fetch_watchpoint_value.  Handle unreadable values on the
9953         value chain.  Correct check for user-requested array watchpoints.
9954         (breakpoint_init_inferior): Clear val_valid.
9955         (watchpoint_value_print): New function.
9956         (print_it_typical): Use it.  Do not free or clear old_val.  Print
9957         watchpoints even if old_val == NULL.
9958         (watchpoint_check): Use fetch_watchpoint_value.  Check for values
9959         becoming readable or unreadable.
9960         (watch_command_1): Use fetch_watchpoint_value.  Set val_valid.
9961         (do_enable_watchpoint): Likewise.
9962         * breakpoint.h (struct breakpoint): Update comment for val.  Add
9963         val_valid.
9964         * NEWS: Mention watchpoints on inaccessible memory.
9965
9966 2008-02-29  Daniel Jacobowitz  <dan@codesourcery.com>
9967
9968         * Makefile.in (i386-nat.o): Update.
9969         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Call
9970         i386_use_watchpoints.
9971         * i386-linux-nat.c (_initialize_i386_linux_nat): Call
9972         i386_use_watchpoints.
9973         * i386-nat.c (i386_stopped_data_address): Take two arguments.
9974         (i386_stopped_by_watchpoint): Update call.
9975         (i386_can_use_hw_breakpoint, i386_use_watchpoints): New.
9976         * config/i386/nm-i386.h: Conditionalize definitions on
9977         ! I386_WATCHPOINTS_IN_TARGET_VECTOR.
9978         (i386_use_watchpoints): Declare.
9979         (i386_stopped_data_address): Update.
9980         * config/i386/nm-linux.h (I386_WATCHPOINTS_IN_TARGET_VECTOR): Define.
9981         * config/i386/nm-linux64.h (I386_WATCHPOINTS_IN_TARGET_VECTOR): Define.
9982
9983 2008-02-29  Joel Brobecker  <brobecker@adacore.com>
9984
9985         GDB 6.8 branch created (branch timestamp: 2008-02-26 10:00 UTC)
9986         * version.in: Bump version to 6.8.50.20080229-cvs.
9987
9988 2008-02-28  Markus Deuling  <deuling@de.ibm.com>
9989
9990         * f-typeprint.c (f_print_type): Handle NULL pointer in VARSTRING
9991         properly.
9992
9993 2008-02-28  Tom Tromey  <tromey@redhat.com>
9994
9995         * infcmd.c (notice_args_read): Print result of get_inferior_args.
9996
9997 2008-02-28  Daniel Jacobowitz  <dan@codesourcery.com>
9998
9999         * infcmd.c (kill_if_already_running): Make static.  Use
10000         target_require_runnable.
10001         * target.c (target_require_runnable): New.
10002         * target.h (target_require_runnable): Declare.
10003
10004 2008-02-28  Daniel Jacobowitz  <dan@codesourcery.com>
10005
10006         * frame.c (reinit_frame_cache): Only annotate if frames were
10007         previously valid.
10008
10009 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10010
10011         * regformats/reg-ppc.dat: Rename "ps" to "msr".
10012         * regformats/reg-ppc64.dat: Likewise.
10013
10014 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10015
10016         * features/Makefile (%.dat): Emit xmltarget statement.
10017
10018         * regformats/regdat.sh: Support xmltarget and xmlarch statments.
10019         Generate code to set gdbserver_xmltarget in init_registers_${name}.
10020
10021         * regformats/arm-with-iwmmxt.dat: Regenerate.
10022         * regformats/mips64-linux.dat: Regenerate.
10023         * regformats/mips-linux.dat: Regenerate.
10024         * regformats/rs6000/powerpc-32.dat: Regenerate.
10025         * regformats/rs6000/powerpc-64.dat: Regenerate.
10026         * regformats/rs6000/powerpc-e500.dat: Regenerate.
10027
10028         * regformats/reg-arm.dat: Add xmlarch statement.
10029         * regformats/reg-i386.dat: Likewise.
10030         * regformats/reg-i386-linux.dat: Likewise.
10031         * regformats/reg-x86-64-linux.dat: Likewise.
10032         * regformats/reg-spu.dat: Likewise.
10033
10034 2008-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
10035
10036         * remote.c (remote_wait, remote_async_wait): Stop if we receive
10037         an error.
10038
10039 2008-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
10040
10041         * utils.c (debug_timestamp): New.
10042         (vfprintf_unfiltered): Print timestamps if requested.
10043         (show_debug_timestamp): New.
10044         (initialize_utils): Register "set debug timestamp".
10045         * NEWS: Mention "set debug timestamp".  Add GDB 6.8 section.
10046
10047 2008-02-27  Joel Brobecker  <brobecker@adacore.com>
10048
10049         * breakpoint.c (skip_prologue_sal): New function.
10050         (resolve_sal_pc): Adjust SAL past prologue if the SAL was
10051         computed from a line number.
10052
10053 2008-02-27  Joel Brobecker  <brobecker@adacore.com>
10054
10055         * features/rs6000/power-core.xml, features/rs6000/power64-core.xml
10056         features/rs6000/powerpc-601.xml, features/rs6000/rs6000.xml:
10057         Set PC register type to "code_ptr".
10058         * features/rs6000/powerpc-32.c, features/rs6000/powerpc-403.c,
10059         features/rs6000/powerpc-403gc.c, features/rs6000/powerpc-505.c,
10060         features/rs6000/powerpc-601.c, features/rs6000/powerpc-602.c,
10061         features/rs6000/powerpc-603.c, features/rs6000/powerpc-604.c,
10062         features/rs6000/powerpc-64.c, features/rs6000/powerpc-7400.c,
10063         features/rs6000/powerpc-750.c, features/rs6000/powerpc-860.c,
10064         features/rs6000/powerpc-e500.c, features/rs6000/rs6000.c:
10065         Regenerate.
10066
10067 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
10068
10069         * regformats/regdat.sh: Rename init_registers function in
10070         generated file to init_registers_${name}.
10071
10072         * regformats/reg-crisv32.dat: Set "name" to crisv32.
10073         * regformats/reg-ppc64.dat: Set "name" to ppc64.
10074         * regformats/reg-s390x.dat: Set "name" to s390x.
10075
10076 2008-02-26  Greg Law  <glaw@undo-software.com>
10077
10078         * regcache.c (registers_changed): Call reinit_frame_cache.
10079
10080 2008-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
10081
10082         * configure.tgt (sh-*-linux*): Match sh*.  Add glibc-tdep.o.
10083         * sh-linux-tdep.c (sh_linux_init_abi): Use glibc_skip_solib_resolver
10084         and svr4_fetch_objfile_link_map.
10085         * Makefile.in (sh-linux-tdep.o): Update.
10086
10087 2008-02-26  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10088
10089         * amd64-tdep.c (amd64_classify): Add support for decimal float
10090         types.
10091         * i386-tdep.c (i386_return_value): Make 128-bit decimal float
10092         use the struct return convention.
10093
10094 2008-02-26  Nick Roberts  <nickrob@snap.net.nz>
10095
10096         * breakpoint.c (print_one_breakpoint_location): Revert Enb field
10097         to old format.  Discard breakpoint address if shared library is
10098         unloaded.
10099         (breakpoint_1): Adjust formatting of table header accordingly.
10100
10101 2008-02-25  Vladimir Prus  <vladimir@codesourcery.com>
10102
10103        * remote.c (remote_get_threadlist): If the response
10104        is empty, don't try to parse it.
10105
10106 2008-02-23  Vladimir Prus  <vladimir@codesourcery.com>
10107
10108         Unbreak 'target async'.
10109         * serial.c (serial_async): Set the
10110         handler function before enabling async
10111         mode.
10112
10113 2008-02-22  Daniel Jacobowitz  <dan@codesourcery.com>
10114
10115         * solib-svr4.c (enable_break): Convert r_brk to a code address.
10116
10117 2008-02-21  Pedro Alves  <pedro@codesourcery.com>
10118
10119         * remote.c (extended_remote_attach_1): Set attach_flag.
10120         (extended_remote_create_inferior_1): Clear attach_flag.
10121
10122 2008-02-20  Daniel Jacobowitz  <dan@codesourcery.com>
10123
10124         * mipsnbsd-tdep.c (mipsnbsd_ilp32_fetch_link_map_offsets): Set
10125         r_brk_offset.
10126         (mipsnbsd_lp64_fetch_link_map_offsets): Likewise.
10127         * solib-svr4.c (solib_svr4_r_brk): New.
10128         (open_symbol_file_object, svr4_current_sos): Always check the
10129         debug base.
10130         (svr4_fetch_objfile_link_map): Do not set debug_base.
10131         (enable_break): Use r_brk if it is set.
10132         (svr4_ilp32_fetch_link_map_offsets): Set r_brk_offset.
10133         (svr4_lp64_fetch_link_map_offsets): Likewise.
10134         * solib-svr4.h (struct link_map_offsets): Add r_brk_offset.
10135
10136 2008-02-20  Markus Deuling  <deuling@de.ibm.com>
10137             Mark Kettenis  <kettenis@gnu.org>
10138
10139         * alpha-tdep.c (alpha_heuristic_unwind_cache): Replace saved_regs by
10140         trad_frame_saved_reg.
10141         (trad-frame.h): New include.
10142
10143         (alpha_heuristic_frame_unwind_cache): Use trad_frame_alloc_saved_regs
10144         instead of frame_obstack_zalloc.
10145         (alpha_heuristic_frame_prev_register): Use trad_frame_get_prev_register.
10146
10147         * Makefile.in (alpha-tdep.o): Add dependency to trad_frame_h.
10148
10149 2008-02-20  Markus Deuling  <deuling@de.ibm.com>
10150
10151         * rs6000-tdep.c (gdb_print_insn_powerpc): Get the current endianess
10152         from disassemble_info instead of gdbarch_byte_order.
10153
10154         * mips-tdep.c (gdb_print_insn_mips): Likewise.
10155         * arm-tdep.c (gdb_print_insn_arm): Likewise.
10156
10157 2008-02-20  Markus Deuling  <deuling@de.ibm.com>
10158
10159         * gdbarch.sh (memory_insert_breakpoint, memory_remove_breakpoint): Add
10160         gdbarch as parameter.
10161
10162         * gdbarch.{c,h}: Regenerate.
10163
10164         * ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Add gdbarch as
10165         parameter.
10166         * mem-break.c (default_memory_insert_breakpoint)
10167         (default_memory_remove_breakpoint): Likewise.
10168         * target.h (default_memory_remove_breakpoint)
10169         (default_memory_insert_breakpoint): Likewise.
10170
10171         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Add gdbarch as
10172         parameter. Replace current_gdbarch by gdbarch.
10173         * m32r-tdep.c (m32r_memory_insert_breakpoint)
10174         (m32r_memory_remove_breakpoint): Likewise.
10175
10176 2008-02-19  Daniel Jacobowitz  <dan@codesourcery.com>
10177
10178         * MAINTAINERS: Add Vladimir Prus as MI maintainer.
10179
10180 2008-02-19  Joel Brobecker  <brobecker@adacore.com>
10181
10182         * NEWS: Add entry describing Add support improvements.
10183
10184 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
10185
10186         * m68klinux-nat.c (getfpregs_supplies): Replace gdbarch_fp0_regnum by
10187         M68K_FP0_REGNUM.
10188
10189 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
10190
10191         * sentinel-frame.c (sentinel_frame_prev_register): Do not call
10192         register_offset_hack anymore.
10193
10194         * regcache.{c,h} (register_offset_hack): Remove.
10195
10196 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
10197
10198         * hppa-tdep.h (find_global_pointer): Add gdbarch as parameter.
10199
10200         * hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer): Likewise. Replace
10201         current_gdbarch by gdbarch.
10202         (hppa64_hpux_find_global_pointer): Likewise.
10203         * hppa-tdep.c (hppa_find_global_pointer): Likewise.
10204         (hppa32_push_dummy_call, hppa64_push_dummy_call): Update call for
10205         find_global_pointer.
10206
10207         * hppabsd-tdep.c (hppabsd_find_global_pointer): Add gdbarch as
10208         parameter.
10209         * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Likewise.
10210
10211         * hppa-linux-nat.c (hppa_linux_register_addr): Use ARRAY_SIZE instead
10212         of gdbarch_num_regs.
10213
10214         * hppa-hpux-tdep.c (hppa_hpux_sr_for_addr): Add gdbarch as parameter and
10215         replace current_gdbarch by gdbarch.
10216         (hppa_hpux_push_dummy_code): Update call for hppa_hpux_sr_for_addr.
10217
10218 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
10219
10220         * rs6000-nat.c (exec_one_dummy_insn, regmap): Add gdbarch as parameter
10221         and replace current_gdbarch by gdbarch.
10222
10223         (store_register): Update call for exec_one_dummy_insn.
10224         (fetch_register, store_register): Update call of regmap.
10225
10226         * ppcnbsd-nat.c (getregs_supplies, getfpregs_supplies): Add gdbarch as
10227         parameter and replace current_gdbarch by gdbarch.
10228
10229         (ppcnbsd_store_inferior_registers): Use get_regcache_arch to get at
10230         the current architecture. Update call for getregs_supplies and
10231         getfpregs_supplies.
10232         (ppcnbsd_fetch_inferior_registers): Likewise.
10233
10234         * ppcobsd-nat.c (getfpregs_supplies): Add gdbarch as parameter and
10235         replace current_gdbarch by gdbarch.
10236         (ppcobsd_fetch_registers, ppcobsd_store_registers): Use
10237         get_regcache_arch to get at the current architecture. Update call for
10238         getfpregs_supplies.
10239
10240 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
10241
10242         * arch-utils.c (gdbarch_from_bfd): Remove unnecessary {old,new}_gdbarch
10243         variables.
10244
10245 2008-02-15  Markus Deuling  <deuling@de.ibm.com>
10246
10247         * mips-linux-tdep.c (mips_linux_init_abi): Remove internal error.
10248
10249 2008-02-14  Vladimir Prus  <vladimir@codesourcery.com>
10250
10251         * NEWS: Mention pending breakpints in MI.
10252
10253 2008-02-14  Markus Deuling  <deuling@de.ibm.com>
10254
10255         * Makefile.in (ALL_TARGET_OBS): Remove dependency to xtensa-linux-nat.o.
10256
10257 2008-02-13  Markus Deuling  <deuling@de.ibm.com>
10258
10259         Add script to build and test GDB using enable-targets=all.
10260
10261         * gdb_buildall.sh: New file.
10262
10263 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
10264
10265         * NEWS (New native configurations): Xtensa GNU/Linux.
10266         (New targets): Xtensa GNU/Linux.
10267         * Makefile.in (ALL_TARGET_OBS): Add xtensa-linux-nat.o and
10268         xtensa-linux-tdep.o
10269         (ALLDEPFILES): Add xtensa-linux-tdep.c and xtensa-linux-nat.c
10270         (xtensa-linux-nat.o, xtensa-linux-tdep.o): New dependencies.
10271         * configure.tgt (xtensa*-*-linux*): New entry.
10272         * xtensa-config.c (xtensa_tdep): New variable.
10273         (xtensa_config_byte_order, xtensa_config_tdep): Removed.
10274         (rmap): Change format based on new macro XTREG.
10275         (XTENSA_CONFIG_INSTANTIATE): Use new macro defined in xtensa-tdep.h.
10276         * xtensa-linux-nat.c: New.
10277         * xtensa-linux-tdep.c: New.
10278         * xtensa-xtregs.c: New.
10279         * xtensa-tdep.h (xtensa_elf_gregset_t): Update.
10280         (XTENSA_ELF_NGREG, XTREG, XTREG_END, XTENSA_GDBARCH_TDEP_INSTANTIATE)
10281         (XCHAL_NUM_CONTEXTS, XCHAL_HAVE_EXCEPTIONS): New macros.
10282         (xtensa_register_t): New field coprocessor.
10283         (XTENSA_REGISTER_FLAGS_PRIVILEGED): Name spelling corrected.
10284         * xtensa-tdep.c (xtensa_config_tdep, xtensa_config_byte_order): Removed.
10285         (xtensa_pseudo_register_read, xtensa_pseudo_register_write):
10286         Update to handle privileged registers.
10287         (xtensa_supply_gregset) Remove exccause and excvaddr registers.
10288         (xtensa_push_dummy_call): Set windowstart register correctly.
10289         (call0_analyze_prologue): Initialize xtensa_default_isa.
10290         (xtensa_derive_tdep): New.
10291         (xtensa_gdbarch_init): Get rid of xtensa_config_byte_order and
10292         xtensa_config_tdep, use XCHAL_HAVE_BE and xtensa_tdep instead.
10293         Call xtensa_derive_tdep().
10294         * config/xtensa/linux.mh: New.
10295         * regformats/reg-xtensa.dat: New.
10296
10297 2008-02-09  Aleksandar Ristovski  <aristovski@qnx.com>  (tiny change)
10298
10299         * corelow.c (core_open): Use IS_ABSOLUTE_PATH.
10300         (filenames.h): New include.
10301         * Makefile.in (corelow.o): Add dependency for filenames.h.
10302
10303 2008-02-08  Doug Evans  <dje@google.com>
10304
10305         * source.c (find_and_open_source): Always rewrite absolute filenames.
10306
10307 2008-02-07  Doug Evans  <dje@google.com>
10308
10309         * breakpoint.c: #include "hashtab.h".
10310         (ambiguous_names_p): New fn.
10311         (update_breakpoint_locations): When restoring bp enable status, don't
10312         compare function names if any functions have same name.
10313         * Makefile.in (breakpoint.o): Add hashtab.h dependency.
10314
10315 2008-02-07  Joel Brobecker  <brobecker@adacore.com>
10316
10317         * ada-lang.c (symbol_completion_add): Make SV parameter a VEC**
10318         instead of just a VEC*. Update use of SV.
10319         (ada_make_symbol_completion_list): Update symbol_completion_add calls.
10320
10321 2007-02-07  Joel Brobecker  <brobecker@adacore.com>
10322
10323         * NEWS: Put all new commands since gdb-6.7 together.
10324
10325 2007-02-07  Joel Brobecker  <brobecker@adacore.com>
10326
10327         * ada-lang.c: #include "vec.h".
10328         (struct string_vector, new_string_vector, string_vector_append):
10329         Delete.
10330         (char_ptr): New typedef.
10331         (DEF_VEC_P (char_ptr)): New VEC type.
10332         (symbol_completion_add): Update profile to take the new VEC type
10333         instead of the old string_vector structure. Update code accordingly.
10334         (ada_make_symbol_completion_list): Use the new VEC type instead of
10335         the old string_vector structure, and update the code accordingly.
10336         * Makefile.in (ada-lang.o): Add dependency on vec.h.
10337
10338 2008-02-06  Pierre Muller  <muller@ics.u-strasbg.fr>
10339
10340         * p-exp.y: Set current_type in missing places.
10341         (leftdiv_is_integer): New static variable.
10342         Typecast right operand of BINOP_DIV to long_double if both operands
10343         are integers.
10344
10345 2008-02-06  Maciej W. Rozycki  <macro@mips.com>
10346
10347         * remote-mips.c (set_breakpoint): Rename to...
10348         (mips_set_breakpoint): ... this.
10349         (clear_breakpoint): Rename to...
10350         (mips_clear_breakpoint): ... this.
10351         (common_breakpoint): Rename to...
10352         (mips_common_breakpoint): ... this.
10353         (check_lsi_error): Rename to...
10354         (mips_check_lsi_error): ... this.
10355
10356 2007-02-05  Joel Brobecker  <brobecker@adacore.com>
10357
10358         * language.h (struct language_defn): Add new field
10359         la_make_symbol_completion_list.
10360         * symtab.c (default_make_symbol_completion_list): Renames
10361         make_symbol_completion_list.
10362         (make_symbol_completion_list): New function.
10363         * symtab.h (default_make_symbol_completion_list): Add declaration.
10364         * langauge.c (unknown_language): Set la_make_symbol_completion_list.
10365         (auto_language, local_language): Likewise.
10366         * objc-lang.c (objc_language_defn): Likewise.
10367         * scm-lang.c (scm_language_defn): Likewise.
10368         * m2-lang.c (m2_language_defn): Likewise.
10369         * f-lang.c (f_language_defn): Likewise.
10370         * jv-lang.c (java_language_defn): Likewise.
10371         * p-lang.c (pascal_language_defn): Likewise.
10372         * c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn)
10373         (minimal_language_defn): Likewise.
10374         * ada-lang.c (struct string_vector): New structure.
10375         (new_string_vector, string_vector_append, ada_unqualified_name)
10376         (add_angle_brackets, symbol_completion_match, symbol_completion_add)
10377         (ada_make_symbol_completion_list): New functions.
10378         (ada_language_defn): Set la_make_symbol_completion_list.
10379         * ada-lang.h (ada_make_symbol_completion_list): Remove declaration,
10380         this function is static.
10381
10382 2008-02-05  Kevin Buettner  <kevinb@redhat.com>
10383
10384         * mn10300-tdep.c (mn10300_push_dummy_call): Adjust stack pointer
10385         to account for call site optimizations.
10386
10387 2008-02-05  Andrzej Zaborowski  <balrogg@gmail.com>
10388
10389         * tracepoint.c (read_actions): Handle end-of-text indicator
10390         in action list properly.  (Committed by Jim Blandy)
10391
10392 2008-02-05  Jim Blandy  <jimb@red-bean.com>
10393
10394         * ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a
10395         pseudoregister, not an internal error.
10396         Reported by: Andrzej Zaborowski
10397
10398 2008-02-04  Vladimir Prus  <vladimir@codesourcery.com>
10399
10400         * varobj.c (c_value_of_variable): Use xstrdup.
10401
10402 2008-02-04  Vladimir Prus  <vladimir@codesourcery.com>
10403
10404         Update stored rendition of varobj value when format changes.
10405         * varobj.c (varobj_set_display_format): Recomputed
10406         print_value.
10407         (c_value_of_variable): Return print_value.
10408
10409 2008-02-03  Doug Evans  <dje@google.com>
10410
10411         * eval.c (evaluate_subexp_standard): Fix type of result of mixed
10412         integer/float division operations when EVAL_AVOID_SIDE_EFFECTS.
10413         * valops.c (value_one): New function.
10414         * value.h (value_one): Declare.
10415
10416         Fix argument promotion for binary arithmetic ops for C.
10417         * valarith.c (unop_result_type): New fn.
10418         (binop_result_type): New fn.
10419         (value_binop): Move result type computation to binop_result_type.
10420         (value_pos, value_neg, value_complement): Move result type
10421         computation to unop_result_type.
10422
10423         PR 2384
10424         * gdbtypes.c (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
10425         Return basetype, fieldno if found.  All callers updated.
10426         Don't cache TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE if from different
10427         objfile.
10428         * gdbtypes.h (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
10429         * symfile.h (fill_in_vptr_fieldno): Delete.
10430
10431 2008-02-02  Doug Evans  <dje@google.com>
10432
10433         * valarith.c (value_binop): Handle unsigned BINOP_REM division by zero.
10434
10435         * typeprint.c (*): Whitespace cleanup.
10436
10437 2008-02-02  Mark Kettenis  <kettenis@gnu.org>
10438             Luis Machado  <luisgpm@br.ibm.com>
10439             Thiago Jung Bauermann  <bauerman@br.ibm.com>
10440
10441         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Pass floats that
10442         don't fit into registerson the stack the way GCC does.
10443
10444 2008-02-01  Joel Brobecker  <brobecker@adacore.com>
10445
10446         * symtab.c (symbol_set_names): Do not add an entry in the demangling
10447         hash table for Ada symbols. Just store the linkage name as is,
10448         and leave the demangled_name as NULL.
10449
10450 2007-02-01  Joel Brobecker  <brobecker@adacore.com>
10451
10452         * dwarf2read.c (add_partial_symbol): Always store all Ada subprograms
10453         in the global scope.
10454         (new_symbol): Likewise.
10455
10456 2008-02-01  Vladimir Prus  <vladimir@codesourcery.com>
10457
10458         * breakpoint.c (break_command_1): Return void.
10459         (break_command_really): Return void.  Rethrow
10460         exceptions instead of returning.
10461         (gdb_breakpoint): Remove the error_message parameter.
10462         Return void.  Rename to set_breakpoint.
10463         * gdb.h (gdb_breakpoint): Rename and move to...
10464         * breakpoint.h (set_breakpoint): ...here.
10465         * mi/mi-cmb-break.c (mi_cmd_break_insert): Restore
10466         event hooks even if exception is thrown.  Adjust to
10467         gdb_breakpoint interface changes.
10468
10469
10470 2008-02-01  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10471
10472         * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Write 32-bit
10473         float in both first and second word in the doubleword, to support
10474         old and new ABIs.
10475
10476 2008-02-01  Vladimir Prus  <vladimir@codesourcery.com>
10477
10478         Properly rethrow exception.  This fixes errors
10479         about non-existent functions for -break-insert.
10480         * breakpoint.c (break_command_really): Use throw_exception
10481         for rethrowing.  If rethrowing, don't print the exception.
10482
10483 2008-01-31  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10484
10485         * NEWS: Mention Decimal Floating Point support.
10486
10487 2008-01-31  Joel Brobecker  <brobecker@adacore.com>
10488
10489         * std-regs.c (value_of_builtin_frame_pc_reg): Change the returned
10490         value type to builtin_type_void_func_ptr.
10491
10492 2008-01-31  Andreas Krebbel  <krebbel1@de.ibm.com>
10493
10494         * s390-tdep.c (is_float_singleton, is_float_like,
10495         alignment_of, s390_return_value): Make checks for
10496         TYPE_CODE_FLT to match TYPE_CODE_DECFLOAT as well.
10497
10498 2008-01-31  Luis Machado  <luisgpm@br.ibm.com>
10499             Thiago Jung Bauermann  <bauerman@br.ibm.com>
10500
10501         * infcmd.c (default_print_registers_info): Also print hex
10502         raw contents for TYPE_CODE_DECFLOAT registers.
10503         * ppc-tdep.h (gdbarch_tdep): Add ppc_dl0_regnum member.
10504         * rs6000-tdep.c (IS_DFP_PSEUDOREG): New macro.
10505         (rs6000_register_name): Add support for DFP pseudo-registers.
10506         (rs6000_pseudo_register_type): Likewise.
10507         rs6000_pseudo_register_reggroup_p): Likewise.
10508         (ppc_pseudo_register_read): New function.
10509         (ppc_pseudo_register_write): Likewise.
10510         (rs6000_pseudo_register_read): Likewise.
10511         (rs6000_pseudo_register_write): Likewise.
10512         (e500_pseudo_register_read): Move checks to
10513         rs6000_pseudo_register_read.
10514         (e500_pseudo_register_write): Move checks to
10515         rs6000_pseudo_register_write.
10516         (rs6000_gdbarch_init): Initialize tdep->ppc_dl0_regnum.  Install
10517         rs6000_pseudo_register_read and rs6000_pseudo_register_write
10518         in gdbarch if SPE or DFP is available.  Adjust gdbarch's
10519         num_pseudo_regs to account for DFP pseudo regs.
10520
10521 2008-01-31  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10522
10523         * ppc-tdep.h (struct gdbarch_tdep): Remove ppc_ev31_regnum member.
10524         * rs6000-tdep.c (IS_SPE_PSEUDOREG): New macro.
10525         (spe_register_p, rs6000_register_name, rs6000_pseudo_register_type,
10526         rs6000_pseudo_register_reggroup_p, e500_move_ev_register,
10527         e500_pseudo_register_read, e500_pseudo_register_write): Use
10528         IS_SPE_PSEUDOREG macro.
10529         (rs6000_frame_cache): Remove use of tdep->ppc_ev31_regnum.
10530         (rs6000_gdbarch_init): Remove unnecessary num_sprs local variable.
10531         Remove initialization of tdep->ppc_ev31_regnum.
10532
10533 2008-01-08  Paul Hilfinger  <hilfinger@adacore.com>
10534
10535         * printcmd.c (print_formatted): Handle references as for unformatted
10536         prints.
10537
10538 2008-01-30  Joel Brobecker  <brobecker@adacore.com>
10539
10540         * eval.c (evaluate_subexp_standard): Add handling of user
10541         registers when in EVAL_AVOID_SIDE_EFFECTS mode.
10542
10543 2008-01-30  Pierre Muller  <muller@ics.u-strasbg.fr>
10544
10545         * eval.c (evaluate_subexp_standard): Support
10546         BINOP_INTDIV opcode.
10547
10548 2008-01-30  Paul N. Hilfinger  <hilfinger@adacore.com>
10549
10550         * valarith.c (value_binop): Add floating-point BINOP_MIN and
10551         BINOP_MAX cases.
10552         For BINOP_EXP, use length and signedness of left operand only for
10553         result, as for shifts.
10554         For integral operands to BINOP_EXP, use new integer_pow and
10555         uinteger_pow functions so as to get full range of results.
10556         (integer_pow): New function.
10557         (uinteger_pow): New function.
10558
10559 2008-01-30  Vladimir Prus  <vladimir@codesourcery.com>
10560
10561         Use vector for varobj_list_children interface.
10562         * gdb/varobj.c (varobj_list_children): Return vector
10563         of varobjs.
10564         * gdb/varobj.h (varobj_list_children): Adjust
10565         prototype.
10566         (varobj_p): Declare.  Declare vector thereof.
10567         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust
10568         for varobj_list_children change.
10569         * Makefile.in (varobj_h): Update dependencies.
10570
10571 2008-01-30  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10572
10573         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Add support for
10574         TYPE_CODE_DECFLOAT arguments.
10575         (ppc64_sysv_abi_push_dummy_call) Likewise.
10576         (get_decimal_float_return_value): New function.
10577         (do_ppc_sysv_return_value): Add support for TYPE_CODE_DECFLOAT return
10578         values by calling get_decimal_float_return_value.
10579         (ppc64_sysv_abi_return_value): Likewise.
10580
10581 2008-01-30  Nick Roberts  <nickrob@snap.net.nz>
10582
10583         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file):  Add field
10584         for preprocessor macro information.  Formatting changes.
10585
10586 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10587
10588         * remote.c (struct remote_state): Add cached_wait_status.
10589         (remote_exec_file): New variable.
10590         (PACKET_vAttach, PACKET_vRun): New constants.
10591         (extended_remote_restart): Do not query for status.
10592         (struct start_remote_args): New.
10593         (remote_start_remote): Take it as a second argument.  Check
10594         whether the target is running.  Issue an error for non-running
10595         non-extended targets.  Cache the wait status.  Set inferior_ptid
10596         here.
10597         (remote_open_1): Prompt to disconnect non-running targets.  Make
10598         sure the target is marked running.  Do not set inferior_ptid here.
10599         Update call to remote_start_remote.  Do not call remote_check_symbols
10600         if the target is not running.
10601         (remote_detach_1): Rename from remote_detach.  Take an EXTENDED
10602         argument.  Handle a non-running target.
10603         (remote_detach): Use it.
10604         (extended_remote_detach): New.
10605         (remote_disconnect): Fix typo.  Use remoute_mourn_1.
10606         (extended_remote_attach_1, extended_remote_attach)
10607         (extended_async_remote_attach): New.
10608         (remote_vcont_resume): Remove unused variable.
10609         (remote_wait, remote_async_wait): Use any cached wait status.
10610         (putpkt_binary, getpkt): Clear any cached wait status.
10611         (extended_remoute_mourn_1): New.
10612         (extended_remote_mourn): Use it.
10613         (extended_async_remote_mourn, extended_remote_run): New.
10614         (extended_remote_create_inferior_1): New.
10615         (extended_remote_create_inferior): Use it.
10616         (extended_remote_async_create_inferior): Likewise.
10617         (remote_xfer_partial): Skip for non-executing targets.
10618         (init_extended_remote_ops): Set to_detach and to_attach.
10619         (init_extended_async_remote_ops): Likewise.  Use
10620         extended_async_remote_mourn.
10621         (_initialize_remote): Register vAttach, vRun, and
10622         set remote exec-file.
10623         * NEWS: Mention vAttach, vRun, and gdbserver extended-remote support.
10624
10625 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10626
10627         * Makefile.in (symfile.o): Update.
10628         * NEWS: Mention exec tracing support.
10629         * inf-ttrace.c (inf_ttrace_wait): Return TARGET_WAITKIND_EXECD for
10630         exec events.
10631         * infcmd.c (kill_if_already_running, detach_command)
10632         (disconnect_command): Replace SOLIB_RESTART with no_shared_libraries.
10633         * infrun.c (MAY_FOLLOW_EXEC, may_follow_exec): Delete.
10634         (follow_exec): Do not check may_follow_exec.  Do not mourn and push
10635         targets.  Apply the sysroot path to the loaded executable.  Use
10636         no_shared_libraries.
10637         * linux-nat.c (linux_child_follow_fork): Print fork following
10638         messages if verbose.
10639         (kill_wait_callback): Kill again before waiting a second time.
10640         * symfile.c (symbol_file_clear): Replace SOLIB_RESTART with
10641         no_shared_libraries.
10642
10643 2008-01-29  Joel Brobecker  <brobecker@adacore.com>
10644
10645         * amd64-tdep.c (amd64_classify): Add handling of TYPE_CODE_CHAR.
10646
10647 2008-01-29  Joel Brobecker  <brobecker@adacore.com>
10648
10649         * nto-tdep.h: Remove #include "defs.h".
10650         * nto-tdep.c: Add #include "defs.h".
10651         * Makefile.in (nto_tdep_h): Update dependencies.
10652         (nto-tdep.o): Likewise.
10653
10654 2008-01-29  Joel Brobecker  <brobecker@adacore.com>
10655
10656         * infrun.c (wait_for_inferior): Add treat_exec_as_sigtrap parameter
10657         and use it.
10658         (proceed, start_remote): Update call to wait_for_inferior.
10659         * inferior.h (wait_for_inferior): Update declaration.
10660         * fork-child.c, infcmd.c, solib-irix.c, solib-osf.c, solib-sunos.c,
10661         solib-svr4.c, win32-nat.c: Update calls to wait_for_inferior.
10662         * inf-ttrace.c (inf_ttrace_wait): Report TTEVT_EXEC events as
10663         TARGET_WAITKIND_EXECD instead of TARGET_WAITKIND_STOPPED.
10664
10665 2008-01-29  Aleksandar Ristovski  <aristovski@qnx.com>
10666
10667         * varobj (adjust_value_for_child_access): Added checking for
10668         returned value from gdb_value_ind.
10669         (c_describe_child): Likewise.
10670         (cplus_describe_child): Fixed a typo.
10671
10672 2008-01-29  Jim Blandy  <jimb@red-bean.com>
10673
10674         * MAINTAINERS: Update my info.
10675
10676 2008-01-29  Vladimir Prus  <vladimir@codesourcery.com>
10677
10678         Use multiple locations for hardware watchpoints.
10679         This eliminates the need to traverse value chain, doing
10680         various checks, in three different places.
10681
10682         * breakpoint.h (struct bp_location): New fields
10683         lengths and watchpoint_type.
10684         (struct breakpoint): Remove the val_chain field.
10685         * breakpoint.c (is_hardware_watchpoint): New.
10686         (free_valchain): Remove.
10687         (update_watchpoint): New.
10688         (insert_bp_location): For hardware watchpoint, just
10689         directly insert it.
10690         (insert_breakpoints): Call update_watchpoint_locations
10691         on all watchpoints.  If we have failed to insert
10692         any location of a hardware watchpoint, remove all inserted
10693         locations.
10694         (remove_breakpoint): For hardware watchpoints, directly
10695         remove location.
10696         (watchpoints_triggered): Iterate over locations.
10697         (bpstat_stop_status): Use only first location of
10698         a resource watchpoint.
10699         (delete_breakpoint): Don't call free_valchain.
10700         (print_one_breakpoint): Don't print all
10701         locations for watchpoints.
10702         (breakpoint_re_set_one): Use update_watchpoint for
10703         watchpoints.
10704
10705 2008-01-29  Vladimir Prus  <vladimir@codesourcery.com>
10706
10707         Don't reset watchpoint block on solib load.
10708
10709         * breakpoint.c (insert_bp_location): For watchpoints,
10710         recompute condition.
10711         (breakpoint_re_set_one): Instead of recomputing value
10712         and condition for watchpoints, just reset value and
10713         let insert_breakpoints/insert_bp_location recompute it.
10714         Don't do anything about disabled watchpoint.
10715
10716 2008-01-29  Pierre Muller  <muller@ics.u-strasbg.fr>
10717
10718         * valarith.c (value_binop): Handle unsigned integer
10719         division by zero.
10720
10721 2008-01-28  Kevin Buettner  <kevinb@redhat.com>
10722
10723         * mn10300-tdep.c (mn10300_analyze_prologue): Check for an
10724         instruction pattern that appears frequently in position
10725         independent code.  Fix bug in code which looks for "fmov" and
10726         backtracks if no "fmov" is found.
10727
10728 2008-01-28  Doug Evans  <dje@google.com>
10729
10730         * dbxread.c (read_dbx_symtab): Fix indentation.
10731         Reformat comments to 80 columns.
10732         Move local var def closer to only use.
10733
10734 2008-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
10735
10736         * fork-child.c (SHELL_FILE): Remove #ifndef.
10737         (fork_inferior): Remove SHELL_COMMAND_CONCAT.
10738
10739 2008-01-25  Pierre Muller  <muller@ics.u-strasbg.fr>
10740
10741         * i386-tdep.c (i386_skip_noop): New function.
10742         (i386_analyze_prologue): Call i386_skip_noop function.
10743
10744 2008-01-24  Michael Snyder  <msnyder@specifix.com>
10745
10746         * procfs.c (procfs_xfer_partial): Comment, cut/paste error.
10747         * win32-nat.c (win32_xfer_partial): Ditto.
10748         * target.c (default_xfer_partial): Minor whitespace adjustment.
10749
10750 2008-01-24  Pedro Alves  <pedro@codesourcery.com>
10751
10752         * arm-tdep.c (arm_addr_bits_remove): In non 26-bit mode, don't
10753         strip bit 1 even if pc doesn't point to thumb code.
10754
10755 2008-01-23  Daniel Jacobowitz  <dan@codesourcery.com>
10756
10757         * remote.c (remote_wait): Handle SIGINT between packets.
10758         (remote_async_wait): Likewise.
10759
10760 2008-01-23  Vladimir Prus  <vladimir@codesourcery.com>
10761             Chris Demetriou  <cgd@google.com>
10762
10763         * thread.c (add_thread_silent): Renamed
10764         from add_thread.
10765         (print_thread_events): New variable definition.
10766         (show_print_thread_events): New function.
10767         (_initialize_thread): Add "set print thread-events" and
10768         "show print thread-events" commands.
10769         (add_thread): Announce new thread.
10770         * gdbthread.h (add_thread_silent): Declare.
10771         (print_thread_events): New variable declaration.
10772         * inf-ttrace.c (inf_ttrace_wait): Don't
10773         inform about new thread, as add_thread is always
10774         called too, and will take care of that.
10775         * infrun.c (handle_inferior_event): Likewise.
10776         * procfs.c (procfs_wait): Likewise.
10777         * remote.c (remote_currthread): Likewise.
10778         * sol-thread.c (sol_thread_wait): Likewise.
10779         * win32-nat.c (get_win32_debug_event): Likewise.
10780         * linux-thread-db.c (attach_thread): Likewise.
10781         Remove the verbose parameter.
10782         (check_event): Make detach_thread be verbose
10783         only if print_thread_events is set.
10784         * linux-nat.c (lin_lwp_attach_lwp): Don't inform
10785         about new thread.  This is called only from
10786         linux-thread-db.c:attach_thread, which will take care.
10787         Remove the verbose parameter.
10788         * linux-nat.h (lin_lwp_attach_lwp): Adjust prototype.
10789
10790 2008-01-23  Nick Roberts  <nickrob@snap.net.nz>
10791
10792         * mi/mi-cmd-var.c (mi_cmd_var_set_format): Add value field to output.
10793
10794 2008-01-22  Vladimir Prus  <vladimir@codesourcery.com>
10795
10796         * breakpoint.c (break_command_really): New parameter
10797         ignore_count.
10798         (break_command_1): Pass 0 as
10799         ignore_count to break_command_really.
10800         (gdb_breakpoint): Pass ignore_count to
10801         break_command_really.
10802
10803 2008-01-21  Kevin Buettner  <kevinb@redhat.com>
10804
10805         * mn10300-linux-tdep.c (am33_linux_sigframe_cache_init): Find
10806         sigcontext struct via pointer.
10807         (struct sigframe comment): Update to show new field `psc'.
10808
10809 2008-01-21  Vladimir Prus  <vladimir@codesourcery.com>
10810
10811         * infrun.c (handle_inferior_event): If
10812         we failed to remove breakpoints, error,
10813         don't try to increment PC by hand.
10814
10815 2008-01-18  Nick Hudson  <nick.hudson@dsl.pipex.com>
10816
10817         Add NetBSD/hppa target and host support.
10818
10819         * hppabsd-tdep.c (hppabsd_supply_gregset): Move to ...
10820         (hppabsd_gregset): Move to ...
10821         (hppabsd_regset_from_core_section): Rename
10822         hppaobsd_regset_from_core_section and move to ...
10823         (hppabsd_find_global_pointer): Update comment.
10824         (hppabsd_init_abi): Make global. Do not register
10825         hppabsd_regset_from_core_section.
10826         (hppabsd_core_osabi_sniffer): Rename hppaobsd_core_osabi_sniffer and
10827         move to ...
10828         (_initialize_hppabsd_tdep): Move to ...
10829         * hppaobsd-tdep.c: ... here. New file.
10830         * hppnbsd-tdep.c: New file.
10831         * hppnbsd-nat.c: New file.
10832         * Makefile.in (ALL_TARGET_OBS): Add hppanbsd-tdep.o and hppaobsd-tdep.o.
10833         (ALLDEPFILES): Add hppabsd-nat.c and hppabsd-tdep.c.
10834         (hppabsd-nat.o, hppabsd-tdep.o): New dependencies.
10835         (hppabsd-tdep.o, hppaobsd-tdep.o): Update dependencies.
10836         * configure.host (hppa*-*-netbsd*): New entry.
10837         * configure.tgt (hppa*-*-netbsd*): New entry.
10838         (hppa*-*-openbsd*): Update.
10839         * NEWS (New native configuration): Mention NetBSD/hppa.
10840         (New targets): Mention NetBSD/hppa.
10841
10842 2008-01-18  Markus Deuling  <deuling@de.ibm.com>
10843
10844         * gdbarch.sh (function_list): Add new property bits_big_endian to
10845         gdbarch structure.
10846         * gdbarch.{c,h}: Regenerate.
10847
10848         * value.c (struct value): Replace BITS_BIG_ENDIAN by
10849         gdbarch_bits_big_endian (comment).
10850         (unpack_field_as_long, modify_field): Likewise.
10851         * value.h: Likewise (comment).
10852         * valops.c (value_slice): Likewise.
10853         * valarith.c (value_subscript, value_bit_index): Likewise.
10854         * gdbtypes.h (field): Likewise (comment).
10855         * eval.c (evaluate_subexp_standard): Likewise.
10856         * dwarf2read.c (dwarf2_add_field): Likewise.
10857         * ada-lang.c (decode_packed_array, ada_value_primitive_packed_val)
10858         (move_bits, ada_value_assign, value_assign_to_component): Likewise.
10859
10860         * defs.h (BITS_BIG_ENDIAN): Remove.
10861
10862 2008-01-18  Markus Deuling  <deuling@de.ibm.com>
10863
10864         * jv-exp.y (yylex): Replace DEPRECATED_STREQN with the appropriate
10865         function calls.
10866         * m2-exp.y (yylex): Likewise.
10867         * objc-exp.y (yylex): Likewise.
10868
10869         * defs.h (DEPRECATED_STREQN): Remove.
10870
10871 2008-01-17  H.J. Lu  <hjl.tools@gmail.com>
10872
10873         * MAINTAINERS: Update my email address.
10874
10875 2008-01-17  Jim Blandy  <jimb@codesourcery.com>
10876
10877         * README: Mention gdbserver/README.
10878
10879 2008-01-17  Pierre Muller  <muller@ics.u-strasbg.fr>
10880
10881         * valarith.c (value_binop): Handle BINOP_INTDIV
10882         for unsigned and signed integers.
10883
10884 2008-01-17  Ulrich Weigand  <uweigand@de.ibm.com>
10885
10886         * s390-tdep.c (s390_gdbarch_init): Set default long double
10887         type to 128-bit IEEE quad.
10888
10889 2008-01-17  Joel Brobecker  <brobecker@adacore.com>
10890
10891         * hpux-thread.c (hpux_thread_resume): Delete commented-out code.
10892
10893 2008-01-16  Mark Kettenis  <kettenis@gnu.org>
10894
10895         * auxv.c (fprint_target_auxv): Add support for AT_SUN_AUXFLAGS.
10896
10897         * dfp.c, dfp.h: Rename decimal_to_double to decimal_to_doublest.
10898         * value.c: All callers changed.
10899
10900 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
10901
10902         * rs6000-nat.c (add_vmap, vmap_ldinfo, vmap_exec): Replace
10903         DEPRECATED_STREQ by its expression.
10904         * coffread.c (coff_locate_sections, coff_symtab_read): Likewise.
10905         * xcoffread.c (read_xcoff_symtab, read_symbol_lineno, find_linenos)
10906         (scan_xcoff_symtab): Likewise.
10907         * hppa-hpux-tdep.c (hppa_hpux_skip_trampoline_code): Likewise.
10908         * f-lang.c (find_common_for_function): Likewise.
10909         * objc-exp.y (parse_number): Likewise.
10910
10911         * defs.h (DEPRECATED_STREQ): Remove.
10912
10913 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
10914
10915         * mn10300-tdep.h (AM33_MODE): Add gdbarch as parameter.
10916         * mn10300-tdep.c (set_reg_offsets, mn10300_analyze_prologue): Use
10917         get_frame_arch to get at the current_architecture. Update AM33_MODE
10918         call.
10919         (mn10300_analyze_prologue): Add gdbarch as parameter. Update caller.
10920         (mn10300_frame_unwind_cache): Use get_frame_arch to get at the current
10921         architecture.
10922         (set_reg_offsets, mn10300_analyze_prologue): Fix indentation.
10923
10924 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
10925
10926         * amd64-nat.h (amd64_native_gregset_supplies_p): Add gdbarch as
10927         parameter.
10928         * amd64-nat.c (amd64_native_gregset_supplies_p): Likewise.
10929
10930         (amd64_native_gregset_reg_offset): Add gdbarch as parameter. Replace
10931         current_gdbarch by gdbarch. Update caller.
10932
10933         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers)
10934         (amd64_linux_store_inferior_registers): Use get_regcache_arch to get at
10935         the current architecture. Update calls of
10936         amd64_native_gregset_supplies_p.
10937         * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers)
10938         (amd64bsd_store_inferior_registers): Likewise.
10939
10940 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
10941
10942         * ppc-linux-nat.c (ppc_register_u_addr): Add gdbarch as parameter.
10943         Replace current_gdbarch by gdbarch. Update caller.
10944
10945 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
10946
10947         * dbxread.c (repeated_header_complaint, dbx_symfile_init)
10948         (read_dbx_dynamic_symtab, function_outside_compilation_unit_complaint)
10949         (read_dbx_symtab, end_psymtab, dbx_psymtab_to_symtab_1)
10950         (dbx_psymtab_to_symtab, read_ofile_symtab, process_one_symbol)
10951         (stabsect_build_psymtabs): Fix indentation.
10952
10953 2008-01-15  Michael Snyder  <msnyder@specifix.com>
10954
10955         * corelow.c (core_xfer_partial): Comment, cut/paste error.
10956
10957 2008-01-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10958
10959         * win32-nat.c (win32_create_inferior): Restore code calling
10960         CloseHandle on ProcessInformation structure.
10961
10962 2008-01-13  Nick Hudson  <nick.hudson@dsl.pipex.com>
10963
10964         * configure.ac: Check for void * as 3 argument of ptrace.
10965         * configure: regenerate.
10966
10967 2008-01-11  Markus Deuling  <deuling@de.ibm.com>
10968
10969         * alpha-tdep.c (alpha_heuristic_proc_start)
10970         (alpha_sigtramp_register_address): Add gdbarch as parameter. Replace
10971         current_gdbarch by gdbarch.
10972
10973         (alpha_heuristic_frame_unwind_cache): Use get_frame_arch to get at the
10974         current architecture by frame_info. Update alpha_heuristic_proc_start
10975         call.
10976
10977         (alpha_sigtramp_frame_this_id, alpha_sigtramp_frame_prev_register): Use
10978         get_frame_arch to get at the current architecture by frame_info. Update
10979         alpha_sigtramp_register_address call.
10980
10981         * arm-tdep.c (thumb_scan_prologue): Add gdbarch as parameter and replace
10982         current_gdbarch by gdbarch. Update caller.
10983         (convert_to_extended, convert_from_extended): Add endianess parameter
10984         for comparison. Update caller.
10985         (arm_extract_return_value, arm_store_return_value): Use
10986         get_regcache_arch to get at the current architecture.
10987
10988         * cris-tdep.c (cris_register_size): Add gdbarch as parameter. Replace
10989         current_gdbarch by gdbarch. Update caller.
10990         (cris_gdb_func, move_to_preg_op, none_reg_mode_move_from_preg_op): Add
10991         gdbarch as parameter. Update caller. Replace current_gdbarch by gdbarch.
10992
10993         * h8300-tdep.c (E_PSEUDO_CCR_REGNUM, E_PSEUDO_EXR_REGNUM, BINWORD): Add
10994         gdbarch as parameter. Update caller.
10995         (h8300_init_frame_cache): Add gdbarch as parameter. Replace
10996         current_gdbarch by gdbarch. Update caller.
10997
10998         * hppa-tdep.c (skip_prologue_hard_way): Add gdbarch as parameter and
10999         update caller. Replace current_gdbarch by gdbarch.
11000
11001         * m32c-tdep.c (m32c_skip_trampoline_code): Use get_frame_arch to get at
11002         the current architecture. Replace current_gdbarch by gdbarch.
11003         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
11004         (STACK_CORRECTION, USE_PAGE_REGISTER): Replace M6811_TDEP by its
11005         expression. Add gdbarch as parameter and replace current_gdbarch with
11006         it. Update caller.
11007         (M6811_TDEP): Remove.
11008         (m68hc11_frame_prev_register): Use get_frame_arch to get at the current
11009         architecture.
11010         (m68hc11_scan_prologue): Add gdbarch as parameter. Replace
11011         current_gdbarch by gdbarch. Update caller.
11012
11013         * m68k-tdep.c (m68k_analyze_prologue): Add gdbarch as parameter and
11014         update caller.
11015         (m68k_analyze_register_saves): Likewise. Also replace current_gdbarch
11016         by gdbarch.
11017
11018         * rs6000-tdep.c (skip_prologue): Add gdbarch as parameter and update
11019         caller. Relace current_gdbarch by gdbarch.
11020         (altivec_register_p, spe_register_p): Likewise.
11021         * ppc-tdep.h (altivec_register_p, spe_register_p): Add gdbarch as
11022         parameter.
11023         * ppc-linux-nat.c (fetch_register, store_register): Update caller of
11024         altivec_register_p and spe_register_p.
11025
11026         * score-tdep.c (score_fetch_inst): Add gdbarch as parameter. Update
11027         caller. Replace current_gdbarch by gdbarch.
11028         (score_analyze_prologue): use get_frame_arch to get at the current
11029         architecture.
11030
11031         * sparc-tdep.h (sparc_analyze_prologue): Add gdbarch as parameter.
11032         * sparc-tdep.c (sparc_analyze_prologue): Likewise. Replace
11033         current_gdbarch by gdbarch. Update caller.
11034         (sparc_frame_cache): Use get_frame_arch to get at the current
11035         architecture.
11036         * sparce64-tdep.c (sparc64_skip_prologue): Update call of
11037         sparc_analyze_prologue.
11038
11039         * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Add gdbarch as
11040         parameter.
11041
11042 2008-01-11  Markus Deuling  <deuling@de.ibm.com>
11043
11044         * exec.c: #include "arch-utils.h"
11045          (print_section_info): Use gdbarch_from_bfd to get at the
11046         current architecture. Replace current_gdbarch. Fix indention. Replace
11047         deprecated_print_address_numeric by paddress.
11048         * Makefile.in (exec.o) Add dependency to arch-utils.h.
11049
11050         * valprint.c (val_print_string): Replace
11051         deprecated_print_address_numeric.
11052         * tracepoint.c (trace_mention, scope_info): Likewise.
11053         * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol)
11054         (print_symbol, print_partial_symbols, maintenance_info_psymtabs)
11055         (maintenance_check_symtabs): Likewise.
11056         * symfile.c (list_overlays_command): Likewise.
11057         * stack.c (frame_info, print_block_frame_labels): Likewise.
11058         * printcmd.c (print_address, print_address_demangle)
11059         (address_info): Likewise.
11060         * corefile.c (memory_error): Likewise.
11061         * infcmd.c (jump_command): Likewise.
11062         * breakpoint.c (insert_bp_location, describe_other_breakpoints)
11063         (mention, delete_breakpoint): Likewise.
11064         * c-valprint.c (print_function_pointer_address, c_val_print): Likewise.
11065         * dwarf2read.c (dump_die): Likewise.
11066         * ada-valprint.c (ada_val_print_1): Likewise.
11067         * f-valprint.c (f_val_print): Likewise.
11068         * linux-fork.c (info_forks_command): Likewise.
11069         * m32r-com.c (m32r_load_section, m32r_load)
11070         (m32r_upload_command): Likewise.
11071
11072         * ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.
11073
11074 2008-01-11  Markus Deuling  <deuling@de.ibm.com>
11075
11076         * gdbarch.sh (skip_prologue): Add gdbarch
11077         as parameter.
11078         * gdbarch.{c,h}: Regenerate.
11079
11080         * alpha-tdep.c (alpha_skip_prologue): Add gdbarch as parameter.
11081         * amd64-tdep.c (amd64_skip_prologue): Likewise.
11082         * avr-tdep.c (avr_skip_prologue): Likewise.
11083         * cris-tdep.c (cris_skip_prologue): Likewise.
11084         * frv-tdep.c (frv_skip_prologue): Likewise.
11085         * h8300-tdep.c (h8300_skip_prologue): Likewise.
11086         * hppa-tdep.c (hppa_skip_prologue): Likewise.
11087         * i386-tdep.c (i386_skip_prologue): Likewise.
11088         * ia64-tdep.c (ia64_skip_prologue): Likewise.
11089         * iq2000-tdep.c (iq2000_skip_prologue): Likewise.
11090         * m32r-tdep.c (m32r_skip_prologue): Likewise.
11091         * m68hc11-tdep.c (m68hc11_skip_prologue): Likewise.
11092         * m68k-tdep.c (m68k_skip_prologue): Likewise.
11093         * m88k-tdep.c (m88k_skip_prologue): Likewise.
11094         * mep-tdep.c (mep_skip_prologue): Likewise.
11095         * mips-tdep.c (mips_skip_prologue): Likewise.
11096         * mn10300-tdep.c (mn10300_skip_prologue): Likewise.
11097         * mt-tdep.c (mt_skip_prologue): Likewise.
11098         * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
11099         * score-tdep.c (score_skip_prologue): Likewise.
11100         * sh64-tdep.c (sh64_skip_prologue): Likewise.
11101         * sh-tdep.c (sh_skip_prologue): Likewise.
11102         * sparc64-tdep.c (sparc64_skip_prologue): Likewise.
11103         * sparc-tdep.c (sparc32_skip_prologue): Likewise.
11104         * spu-tdep.c (spu_skip_prologue): Likewise.
11105         * v850-tdep.c (v850_skip_prologue): Likewise.
11106         * vax-tdep.c (vax_skip_prologue): Likewise.
11107         * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise.
11108         * xtensa-tdep.c (xtensa_skip_prologue): Likewise.
11109
11110         * arm-tdep.c (arm_skip_prologue): Add gdbarch as parameter. Replace
11111         current_gdbarch by gdbarch.
11112         * m32c-tdep.c (m32c_skip_prologue): Likewise.
11113         * s390-tdep.c (s390_skip_prologue): Likewise.
11114
11115 2008-01-10  Doug Evans  <dje@google.com>
11116
11117         * defs.h (struct continuation_arg): Fix typo in comment.
11118         * target.c (target_translate_tls_address): Fix comment spelling error.
11119
11120 2008-01-09  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11121
11122         * doublest.h (DOUBLEST_PRINT_FORMAT): Remove % from string.
11123         (DOUBLEST_SCAN_FORMAT): Likewise.
11124         * dfp.c (decimal_from_floating): Use DOUBLEST_PRINT_FORMAT.
11125         * ada-lex.l (processReal): Prepend "%" to use of DOUBLEST_SCAN_FORMAT.
11126         * c-exp.y (parse_number): Likewise.
11127         * jv-exp.y (parse_number): Likewise.
11128         * objc-exp.y (parse_number): Likewise.
11129         * p-exp.y (parse_number): Likewise.
11130
11131 2008-01-09  Joel Brobecker  <brobecker@adacore.com>
11132
11133         * gdbtypes.c (create_array_type): Add handling of null Ada arrays.
11134         (check_typedef): Likewise.
11135
11136 2008-01-09  Luis Machado  <luisgpm@br.ibm.com>
11137
11138         * printcmd.c (printf_command): Add seen_big_h, seen_big_d and
11139         seen_double_big_d, treat the new H, D, and DD modifiers as length
11140         modifiers.
11141
11142 2008-01-08  Joel Brobecker  <brobecker@adacore.com>
11143
11144         * dwarf2read.c (read_enumeration_type): Add comment.
11145
11146 2008-01-08  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11147
11148         * config.in: Regenerate.
11149
11150 2008-01-08  Joel Brobecker  <brobecker@adacore.com>
11151
11152         * ada-lang.c (ada_convert_actual): Renames convert_actual.
11153         Make non-static.
11154         (ada_convert_actuals): Delete.
11155         * ada-lang.h (ada_convert_actual): Add declaration.
11156         (ada_convert_actuals): Remove declaration.
11157         * infcall.c: #include "ada-lang.h".
11158         (value_arg_coerce): Add new parameter sp.  Update function
11159         documetnation.  Add handling of Ada function call parameters.
11160         * Makefile.in (infcall.o): Update dependencies.
11161
11162 2008-01-08  Paul Hilfinger  <hilfinger@adacore.com>
11163
11164         * ada-lang.c (ensure_lval): Fix value lval kind.
11165         (convert_actual): Add handling for arguments passed by reference.
11166
11167 2008-01-08  Doug Evans  <dje@google.com>
11168
11169         * dbxread.c (read_dbx_symtab): Fix indentation.
11170
11171 2008-01-07  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11172
11173         * Makefile.in (dfp.o): Depend on expression.h, gdbtypes.h and value.h.
11174         (valarith.o): Depend on dfp.h.
11175         (valops.o): Likewise.
11176         * dfp.c: Include expression.h, gdbtypes.h, value.h and dfp.h.
11177         (set_decnumber_context): New function.
11178         (decimal_check_errors): Likewise.
11179         (decimal_from_number): Likewise.
11180         (decimal_to_number): Likewise.
11181         (decimal_from_string): Use set_decnumber_context and
11182         decimal_check_errors.
11183         (decimal_from_integral): New function.
11184         (decimal_from_floating): Likewise.
11185         (decimal_to_double): Likewise.
11186         (promote_decimal): Likewise.
11187         (decimal_binop): Likewise.
11188         (decimal_is_zero): Likewise.
11189         (decimal_compare): Likewise.
11190         (decimal_convert): Likewise.
11191         * dfp.h (decimal_from_integral): New prototype.
11192         (decimal_from_floating): Likewise.
11193         (decimal_to_double): Likewise.
11194         (decimal_binop): Likewise.
11195         (decimal_is_zero): Likewise.
11196         (decimal_compare): Likewise.
11197         (decimal_convert): Likewise.
11198         * eval.c (evaluate_subexp_standard): Remove expect_type argument from
11199         call to value_from_decfloat.
11200         * valarith.c: Include dfp.h.
11201         (value_args_as_decimal): New function.
11202         (value_binop): Add if block to handle TYPE_CODE_DECFLOAT values.
11203         (value_logical_not): Likewise.
11204         (value_equal): Likewise.
11205         (value_less): Likewise.
11206         (value_pos): Likewise.
11207         (value_neg): Formatting fix.
11208         * valops.c: Include dfp.h.
11209         (value_cast): Add if block to handle TYPE_CODE_DECFLOAT values.
11210         * value.c (unpack_long): Add case to handle TYPE_CODE_DECFLOAT.
11211         (unpack_double): Add if block to handle TYPE_CODE_DECFLOAT.
11212         (value_from_decfloat): Remove expect_type argument.
11213         * value.h (value_from_decfloat): Update prototype.
11214
11215 2008-01-07  Vladimir Prus  <vladimir@codesourcery.com>
11216
11217         Ignore change in name of dynamic linker during
11218         execution on Solaris.  This also unbreaks pending breakpoints.
11219
11220         * solist.h (struct target_so_ops): New field same.
11221         * solib-svr4.c (svr4_same): New.
11222         (_initialize_svr4_solib): Register svr4_same.
11223         * solib.c (update_solib_list): Use ops->same, if available.
11224
11225 2008-01-06  Christopher Faylor  <me+cygwin@cgf.cx>
11226
11227         * win32-nat.c (win32_make_so): Use cygwin-style path to avoid warnings
11228         when using MS-DOS paths.
11229
11230 2008-01-05  Pedro Alves  <pedro@codesourcery.com>
11231
11232         * NEWS: Mention --pid and --core command line behaviour changes.
11233
11234 2008-01-05  Pedro Alves  <pedro@codesourcery.com>
11235
11236         * main.c (captured_main): Remove 'count' varible and the
11237         ALIGN_STACK_ON_ENTRY block that used it.  Error out if --core and
11238         --pid options were issued simultaneously.  If an explicit pid
11239         option was passed, don't fallback to core file.  Detect extra
11240         arguments better in the presence of explicit pid or core
11241         arguments.
11242
11243 2008-01-05  Joel Brobecker  <brobecker@adacore.com>
11244
11245         * ada-lang.c (ada_which_variant_applies): Correctly compute
11246         the value of the discriminant when the variant record is packed.
11247
11248 2008-01-04  Joel Brobecker  <brobecker@adacore.com>
11249
11250         * ada-lang.c (is_name_suffix): Handle middle-name numeric suffixes
11251         that are used to differentiate homonyms.
11252
11253 2008-01-04  Jerome Guitton  <guitton@adacore.com>
11254
11255         * ada-lang.c (decode_packed_array_type): Avoid a seg fault
11256         when the type is an anonymous pointer type.
11257         (ada_check_typedef): Avoid a seg fault when the type is null.
11258         * ada-typeprint.c (print_array_type): Add support for pointer
11259         to packed arrays.
11260
11261 2008-01-04  Paul N. Hilfinger  <hilfinger@adacore.com>
11262
11263         * ada-exp.y: Allow '{type} ADDRESS' notation on left of assignment.
11264
11265 2008-01-04  Joel Brobecker  <brobecker@adacore.com>
11266
11267         * ada-lang.c (ada_evaluate_subexp): Evaluate tagged types in
11268         EVAL_NORMAL mode when noside is EVAL_AVOID_SIDE_EFFECTS.
11269
11270 2008-01-04  Joel Brobecker  <brobecker@adacore.com>
11271
11272         * ada-exp.y (chop_separator): New function.
11273         (write_selectors): Rewrite to re-use chop_separator.
11274         (ada_nget_field_index, get_symbol_field_type): New functions.
11275         (write_var_or_type): Add support for "ptype TYPENAME.FIELD"
11276         expressions.
11277
11278 2008-01-03  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11279
11280         * symtab.c (find_pc_sect_line): Use SYMBOL_VALUE_ADDRESS instead
11281         of SYMBOL_VALUE when working with function symbols.
11282
11283 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
11284
11285         * ada-lang.c (resolve_subexp): Add handling of OP_REGISTER
11286         expressions.  These expressions do not need to be rewriten.
11287
11288 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
11289
11290         * dwarf2read.c (read_enumeration_type): Flag type as stub if
11291         the given die is a declaration.
11292
11293 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
11294
11295         * ada-lang.c (ada_array_bound_from_type): Make non-static.
11296         Handle properly the case when the index type is an enumerated type.
11297         Do not return the subtype of the bounds type, just return the
11298         bounds type directly - this is not needed and is more consistent
11299         with what we do for arrays when no XA parallel type exists.
11300
11301 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
11302
11303         * ada-lang.c (static_unwrap_type): Add forward declaration.
11304         (template_to_static_fixed_type): Fields of dynamic types sometimes
11305         also need to be unwrapped. Take this into account.
11306         (ada_to_fixed_type_1): Renamed from ada_to_fixed_type.
11307         (ada_to_fixed_type): New wrapper around ada_to_fixed_type_1.
11308         * ada-typeprint.c (ada_print_type): Get the typename from
11309         the original type, not the base type.
11310
11311 2008-01-03  Jerome Guitton  <guitton@adacore.com>
11312
11313         * ada-lang.c (ada_value_struct_elt, to_fixed_array_type)
11314         (to_fixed_array_type, ada_to_fixed_value_create, unwrap_value):
11315         Update calls to ada_to_fixed_type.
11316         (ada_template_to_fixed_record_type_1): Ditto, but without looking
11317         for the tag.
11318         (ada_to_fixed_type): Add check_tag parameter; do not look for
11319         tag if null.  When looking for a tag, use a fixed record type.
11320         * ada-lang.h (ada_to_fixed_type): Add check_tag parameter.
11321         * ada-valprint.c (printable_val_type, ada_value_print): Update
11322         calls to ada_to_fixed_type.
11323
11324 2008-01-03  Luis Machado  <luisgpm@br.ibm.com>
11325
11326         * doublest.c (convert_floatformat_to_doublest): Call
11327         floatformat_to_doublest instead of floatformat_to_double and use
11328         DOUBLEST variables.
11329         (convert_doublest_to_floatformat): Call floatformat_from_doublest
11330         instead of floatformat_from_double and use DOUBLEST variables.
11331
11332 2008-01-03  Nick Hudson  <nick.hudson@dsl.pipex.com>
11333
11334         * MAINTAINERS (Write After Approval): Add self.
11335
11336 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
11337
11338         * symfile.c (set_initial_language): Make non-static.
11339         * symfile.h (set_initial_language): Add declaration.
11340         * language.c: #include "symfile.h".
11341         (set_language): Call set_initial_language if the frame language
11342         could not be determined.
11343
11344 2008-01-03  Paul N. Hilfinger  <hilfinger@adacore.com>
11345
11346         * eval.c (evaluate_subexp_for_address): Provide frame address to
11347         locate_var_value only if it will be needed.
11348
11349 2008-01-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
11350
11351         * linux-nat.c (linux_child_follow_fork): Call also CHECK_FOR_THREAD_DB.
11352
11353 2008-01-02  Joel Brobecker  <brobecker@adacore.com>
11354
11355         * ada-lang.c (ada_evaluate_subexp): Modify the value returned
11356         when noside is EVAL_AVOID_SIDE_EFFECTS to be an lval_memory.
11357         This is needed to make sure that any other treatment applied
11358         to the resulting value does not fail for spurious reason,
11359         such as trying to take the address of this value.
11360
11361 2008-01-02  Joel Brobecker  <brobecker@adacore.com>
11362
11363         * ada-lang.c (ada_value_equal): Dereference reference types when
11364         comparing arrays.
11365
11366 2008-01-01  Daniel Jacobowitz  <dan@codesourcery.com>
11367
11368         Updated copyright notices for most files.
11369
11370 2008-01-01  Christopher Faylor  <me+gdb@cgf.cx>
11371
11372         * win32-nat.c (psapi_module_handle): Remove static.
11373         (get_module_name): Rename from psapi_get_dll_name.  Revamp slightly to
11374         return first module found if base_address is zero.  Don't initialize
11375         psapi function pointers here.  Convert to cygwin paths when
11376         appropriate.
11377         (win32_pid_to_exec_file): Use Cygwin's /proc interface to determine
11378         executable name.  Use get_module_name when that fails or when
11379         !__CYGWIN__.
11380         (_initialize_psapi): New function.  Initialize psapi stuff before it is
11381         needed or issue a warning if it is not found.  Move psapi_module_handle
11382         here.
11383
11384 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
11385
11386         * ada-lang.c (ada_remove_trailing_digits): New function.
11387         (ada_remove_po_subprogram_suffix): New function.
11388         (ada_decode): Improve. Move the description of the algorithm
11389         directly inside the code, instead of in the function global
11390         description.
11391
11392 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
11393
11394         * ada-valprint.c (ada_val_print_1) [TYPE_CODE_REF]: Ignore deref_ref
11395         and always print the dereferenced value.
11396
11397 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
11398
11399         * ada-lang.c (ada_evaluate_subexp, case BINOP_SUB): Add handling
11400         of the case where the first argument is a reference.
11401         (ada_evaluate_subexp, case BINOP_ADD): Likewise.
11402
11403 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
11404
11405         Implement support for Ada interface types.
11406
11407         * ada-lang.c (ada_is_dispatch_table_ptr_type): New function.
11408         (ada_is_ignored_field): Ignore fields that are a dispatch table
11409         of a tagged type.
11410
11411 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
11412
11413         * top.c (print_gdb_version): Update copyright year.
11414
11415 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
11416
11417         * ChangeLog-2007: New ChangeLog rotation.
11418         * ChangeLog: Reset for 2008.
11419         * config/djgpp/fnchange.lst: Add entries for ChangeLog-2006 and
11420         ChangeLog-2007.
11421
11422 For older changes see ChangeLog-2007.
11423 \f
11424 Local Variables:
11425 mode: change-log
11426 left-margin: 8
11427 fill-column: 74
11428 version-control: never
11429 coding: utf-8
11430 End: