2010-02-03 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2010-02-03 Tristan Gingold <gingold@adacore.com>
2
3 * symfile.h (struct sym_fns): Add sym_relocate field.
4 (default_symfile_relocate): New prototype.
5 (symfile_relocate_debug_section): First argument is now an objfile.
6 * symfile.c (default_symfile_relocate): Rename from
7 symfile_relocate_debug_section, first argument is now an objfile.
8 (symfile_relocate_debug_section): New function.
9 * coffread.c (coff_sym_fns): Set sym_relocate field.
10 * somread.c (som_sym_fns): Ditto.
11 * mipsread.c (ecoff_sym_fns): Ditto.
12 * machoread.c (macho_sym_fns): Ditto.
13 * elfread.c (elf_sym_fns): Ditto.
14 * dwarf2read.c (dwarf2_read_section): Ditto.
15 * xcoffread.c (xcoff_sym_fns): Ditto.
16 * dbxread.c (aout_sym_fns): Ditto.
17 (dbx_psymtab_to_symtab): Adjust call to symfile_relocate_debug_section.
18 (elfstab_build_psymtabs): Ditto.
19
20 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
21
22 * defs.h (MAX_REGISTER_SIZE): Increase to 32.
23
24 2010-02-02 Tom Tromey <tromey@redhat.com>
25
26 * valops.c (value_cast_structs): Try downcasting using the RTTI
27 type.
28
29 2010-02-02 Tom Tromey <tromey@redhat.com>
30
31 * gnu-v2-abi.c: Don't include gnu-v2-abi.h.
32 (gnuv2_baseclass_offset): Now static.
33 * Makefile.in (HFILES_NO_SRCDIR): Remove gnu-v2-abi.h.
34 * gnu-v2-abi.h: Remove.
35
36 2010-02-02 Tom Tromey <tromey@redhat.com>
37
38 * m2-typeprint.c (m2_record_fields): Don't use
39 TYPE_DECLARED_TYPE.
40 * gdbtypes.h (TYPE_DECLARED_CLASS): New macro.
41 (struct main_type) <flag_declared_class>: New field.
42 (struct cplus_struct_type) <declared_type>: Remove.
43 <ntemplate_args>: Move earlier.
44 (DECLARED_TYPE_CLASS, DECLARED_TYPE_UNION, DECLARED_TYPE_STRUCT)
45 (DECLARED_TYPE_TEMPLATE): Remove.
46 (TYPE_DECLARED_TYPE): Remove.
47 * gdbtypes.c (lookup_union): Don't use TYPE_DECLARED_TYPE.
48 * dwarf2read.c (read_structure_type): Set TYPE_DECLARED_CLASS.
49 * c-typeprint.c (c_type_print_base): Use TYPE_DECLARED_CLASS, not
50 TYPE_DECLARED_TYPE.
51
52 2010-02-02 Tom Tromey <tromey@redhat.com>
53
54 PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890:
55 * valops.c (search_struct_field): Compute nbases after calling
56 CHECK_TYPEDEF.
57 (check_field): Call CHECK_TYPEDEF.
58 * cp-valprint.c (cp_print_value): Pass correct address to
59 baseclass_offset. Fix check for virtual base past the end of the
60 object. Don't offset address passed to cp_print_value_fields or
61 apply_val_pretty_printer.
62 (cp_print_value_fields): Fix call to val_print.
63 (cp_print_value_fields_rtti): New function.
64 * c-valprint.c (c_val_print): Use cp_print_value_fields_rtti.
65 * p-valprint.c (pascal_object_print_value_fields): Fix call to
66 val_print.
67 * python/py-prettyprint.c (apply_val_pretty_printer): Add embedded
68 offset to address.
69 * language.h (struct language_defn) <la_val_print>: Document.
70 * c-lang.h (cp_print_value_fields_rtti): Declare.
71
72 2010-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
73
74 PR libc/11214:
75 * linux-low.c (linux_tracefork_child) [!(__UCLIBC__ && HAS_NOMMU)]: New.
76 (linux_test_for_tracefork): Move `stack' into [__UCLIBC__ && HAS_NOMMU].
77 (linux_test_for_tracefork) [!(__UCLIBC__ && HAS_NOMMU)]: New.
78
79 2010-02-01 Michael Matz <matz@suse.de>
80 Daniel Jacobowitz <dan@codesourcery.com>
81
82 * i386-tdep.c (i386_frame_cache): Assume valid anonymous
83 functions use a frame pointer.
84
85 2010-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
86
87 * solib-svr4.c (scan_dyntag): New variable dyn_addr. Replace gdb_assert
88 by a conditional setting DYN_ADDR. Use DYN_ADDR.
89 * config/djgpp/fnchange.lst: Add translations for
90 symbol-without-target_section.exp and symbol-without-target_section.c.
91
92 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
93
94 * gdbarch.sh: Set LANG and LC_ALL to C, not c.
95 (remote_breakpoint_for_pc): Correct invalid_p check.
96 * gdbarch.c: Regenerated.
97
98 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
99
100 * arm-tdep.c (arm_find_mapping_symbol): New function, from
101 arm_pc_is_thumb.
102 (arm_pc_is_thumb): Use arm_find_mapping_symbol.
103 (extend_buffer_earlier): New function.
104 (MAX_IT_BLOCK_PREFIX, IT_SCAN_THRESHOLD): New constants.
105 (arm_adjust_breakpoint_address): New function.
106 (arm_gdbarch_init): Register arm_adjust_breakpoint_address.
107
108 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
109
110 * arm-linux-tdep.c (arm_linux_thumb2_be_breakpoint)
111 (arm_linux_thumb2_le_breakpoint): New constants.
112 (arm_linux_init_abi): Set thumb2_breakpoint and
113 thumb2_breakpoint_size.
114 * arm-tdep.c (thumb_insn_size, thumb_advance_itstate): New functions.
115 (thumb_get_next_pc): Add a comment. Rename IT to ITSTATE.
116 Implement support for single stepping through IT blocks if
117 a 32-bit Thumb breakpoint instruction is available.
118 (arm_breakpoint_from_pc): If a 32-bit Thumb breakpoint instruction
119 is available, use it when needed.
120 (arm_remote_breakpoint_from_pc): New function.
121 (arm_gdbarch_init): Register arm_remote_breakpoint_from_pc.
122 * arm-tdep.h (struct gdbarch_tdep): Correct thumb_breakpoint
123 comment. Add thumb2_breakpoint and thumb2_breakpoint_size.
124
125 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
126
127 * arch-utils.c (default_remote_breakpoint_from_pc): New function.
128 * arch-utils.h (default_remote_breakpoint_from_pc): Declare.
129 * gdbarch.c, gdbarch.h: Regenerated.
130 * gdbarch.sh (remote_breakpoint_from_pc): New architecture method.
131 * remote.c (remote_insert_breakpoint, remote_insert_hw_breakpoint): Use
132 gdbarch_remote_breakpoint_from_pc.
133
134 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
135
136 * infrun.c (prepare_to_proceed): Handle other signals which might
137 match a breakpoint.
138 (handle_inferior_event): Move the check for unusual breakpoint
139 signals earlier.
140
141 2010-01-29 Paul Hilfinger <hilfinger@adacore.com>
142
143 amd64 - function returning record with field straddling 2 registers.
144 * amd64-tdep.c (amd_classify_aggregate): Handle the case of
145 a record of length <= 16 in which a field straddles the two
146 eightbytes.
147
148 2010-01-29 Joel Brobecker <brobecker@adacore.com>
149
150 Implement return values on amd64-windows.
151 * amd64-windows-tdep.c: #include gdbcore.h and regcache.h.
152 (amd64_windows_return_value): New function.
153 (amd64_windows_init_abi): Call set_gdbarch_return_value with
154 amd64_windows_return_value.
155
156 2010-01-29 Joel Brobecker <brobecker@adacore.com>
157
158 amd64-windows: 32 bytes allocated on stack by caller for integer
159 parameter registers.
160 * i386-tdep.h (struct gdbarch_tdep): Add new field
161 integer_param_regs_saved_in_caller_frame.
162 * amd64-windows-tdep.c (amd64_windows_init_abi): Set
163 tdep->integer_param_regs_saved_in_caller_frame to 1.
164 * amd64-tdep.c (amd64_push_dummy_call): Allocate some memory on
165 stack if tdep->integer_param_regs_saved_in_caller_frame is set.
166
167 2010-01-29 Joel Brobecker <brobecker@adacore.com>
168
169 amd64-windows: memory args passed by pointer during function calls.
170 * i386-tdep.h (gdbarch_tdep): Add field memory_args_by_pointer.
171 * amd64-tdep.c (amd64_push_arguments): Add handling of architectures
172 where tdep->memory_args_by_pointer is non-zero.
173 * amd64-windows-tdep.c (amd64_windows_init_abi): Set
174 tdep->memory_args_by_pointer to 1.
175
176 2010-01-29 Joel Brobecker <brobecker@adacore.com>
177
178 amd64-windows: Integer parameters in function calls.
179 * i386-tdep.h (enum amd64_reg_class): New, moved here from
180 amd64-tdep.c.
181 (struct gdbarch_tdep): Add fields call_dummy_num_integer_regs,
182 call_dummy_integer_regs, and classify.
183 * amd64-tdep.h (amd64_classify): Add declaration.
184 * amd64-tdep.c (amd64_dummy_call_integer_regs): New static constant.
185 (amd64_reg_class): Delete, moved to i386-tdep.h.
186 (amd64_classify): Make non-static. Move declaration to amd64-tdep.h.
187 Replace call to amd64_classify by call to tdep->classify.
188 (amd64_push_arguments): Get the list of registers to use for
189 passing integer parameters from the gdbarch tdep structure,
190 rather than using a hardcoded one. Replace calls to amd64_classify
191 by calls to tdep->classify.
192 (amd64_push_dummy_call): Get the register number used for
193 the "hidden" argument from tdep->call_dummy_integer_regs.
194 (amd64_init_abi): Initialize tdep->call_dummy_num_integer_regs
195 and tdep->call_dummy_integer_regs. Set tdep->classify.
196 * amd64-windows-tdep.c: Add include of gdbtypes.h.
197 (amd64_windows_dummy_call_integer_regs): New static global.
198 (amd64_windows_classify): New function.
199 (amd64_windows_init_abi): Initialize tdep->call_dummy_num_integer_regs
200 tdep->call_dummy_integer_regs and tdep->classify.
201
202 2010-01-28 Daniel Jacobowitz <dan@codesourcery.com>
203
204 * regcache.c (regcache_xmalloc): Add aspace argument. Use it
205 for the new regcache. All callers updated.
206 (regcache_cpy, regcache_cpy_no_passthrough): Do not set aspace here.
207 (get_thread_arch_regcache): Do not set aspace here.
208 * regcache.h (regcache_xmalloc): Update declaration.
209
210 * frame.c, infcall.c, ppc-linux-tdep.c: Calls to
211 regcache_xmalloc updated.
212
213 2010-01-28 Joel Brobecker <brobecker@adacore.com>
214
215 Another -Wunused-function error in procfs.c (sparc-solaris)
216 * procfs.c (insert_dbx_link_breakpoint): Delete declaration. Move up.
217 Only define if SYS_syssgi is defined.
218 (remove_dbx_link_breakpoint): Delete declaration. Move up.
219 (dbx_link_addr, insert_dbx_link_bpt_in_file)
220 (insert_dbx_link_bpt_in_region): Move up. Only define if SYS_syssgi
221 is itself defined.
222
223 2010-01-27 Christopher Faylor <me+cygwin@cgf.cx>
224
225 * windows-nat.c (windows_initialization_done): New variable.
226 (get_windows_debug_event): Issue error when process dies before
227 completely initializing.
228 (do_initial_windows_stuff): Set flag to indicate when we are done with
229 the initial steps of attaching to the child.
230
231 2010-01-27 Jan Kratochvil <jan.kratochvil@redhat.com>
232
233 * symtab.h (struct symbol <symtab>): New comment on NULL values.
234
235 2010-01-27 Doug Evans <dje@google.com>
236
237 * solib-svr4.c (solib_break_names): Add __dl_rtld_db_dlactivity.
238
239 * breakpoint.c (bpstat_stop_status): Delete useless code.
240
241 2010-01-27 Jan Kratochvil <jan.kratochvil@redhat.com>
242
243 * printcmd.c (display_uses_solib_p): Remove variable section. Access
244 objfile via SYMBOL_SYMTAB.
245
246 2010-01-26 Tom Tromey <tromey@redhat.com>
247
248 PR exp/7643:
249 * eval.c (evaluate_subexp_for_address) <UNOP_IND>: Call
250 coerce_array on result.
251
252 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com>
253
254 * cp-namespace.c (cp_lookup_symbol_namespace): Added
255 search_parent argument.
256 (cp_add_using): Initialize 'searched' field.
257 (reset_directive_searched): New function.
258 * cp-support.h: Add 'searched' field to using_direct struct.
259 (cp_lookup_symbol_imports): Ditto.
260 * cp-namespace.c (cp_lookup_symbol_imports): Ditto.
261 Perform recursive search.
262 Implement non parent search.
263 * valops.c (value_maybe_namespace_elt): Updated.
264
265 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com>
266
267 PR gdb/10929:
268 * dwarf2read.c (read_lexical_block_scope): Create blocks for
269 scopes which contain using directives even if they contain no
270 declarations.
271 * symtab.c (lookup_symbol_aux): Pass lowest level block to
272 la_lookup_symbol_nonlocal.
273 * cp-namespace.c (cp_lookup_symbol_nonlocal): call
274 cp_lookup_symbol_namespace.
275 (cp_lookup_symbol_namespace): Perform an import lookup at every
276 block level.
277 (cp_lookup_symbol_imports): New function.
278 (cp_lookup_symbol_in_namespace): New function.
279
280 2010-01-25 Tom Tromey <tromey@redhat.com>
281
282 PR gdb/11049:
283 * c-valprint.c (c_val_print): Fix test of extract_unsigned_integer
284 result.
285
286 2010-01-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
287
288 * configure.ac: Only use host_os part when disabling TUI on osf.
289 Use test to check variables, prefix strings with x.
290 * configure: Regenerate.
291
292 * solib-osf.c (osf_current_sos): Initialize tail.
293
294 2010-01-25 gingold <gingold@adacore.com>
295
296 * windows-nat.c (windows_continue): Use %x to print thread id.
297 (get_windows_debug_event): Ditto.
298
299 2010-01-22 Tom Tromey <tromey@redhat.com>
300
301 PR symtab/11199:
302 * dwarf2read.c (quirk_gcc_member_function_pointer): Change return
303 type and arguments. Use smash_to_methodptr_type.
304 (read_structure_type): Call quirk_gcc_member_function_pointer
305 later.
306 * gdbtypes.h (smash_to_methodptr_type): Declare.
307 * gdbtypes.c (smash_to_methodptr_type): New function.
308 (lookup_methodptr_type): Use it.
309
310 2010-01-21 Tom Tromey <tromey@redhat.com>
311
312 PR symtab/11198:
313 * symtab.h (lookup_minimal_symbol_and_objfile): Declare.
314 * minsyms.c (lookup_minimal_symbol_and_objfile): New function.
315 * glibc-tdep.c (find_minsym_and_objfile): Remove.
316 (glibc_skip_solib_resolver): Use
317 lookup_minimal_symbol_and_objfile.
318
319 2010-01-21 Kai Tietz <kai.tietz@onevision.com>
320
321 * inflow.c (check_syscall): Guard by #if clause for GO32 and
322 WIN32 targets.
323
324 2010-01-20 Tom Tromey <tromey@redhat.com>
325
326 PR backtrace/10770:
327 * valarith.c (value_binop): Handle BINOP_GTR, BINOP_LEQ, and
328 BINOP_GEQ. Handle BINOP_NOTEQUAL in the signed case.
329 * dwarf2expr.c (new_dwarf_expr_context): Allocate
330 dwarf_stack_values, not CORE_ADDRs.
331 (execute_stack_op): Change DW_OP_div and comparison operators to
332 use signed operands.
333
334 2010-01-20 Vladimir Prus <vladimir@codesourcery.com>
335
336 Per-inferior args and tty and environment.
337
338 * infcmd.c (inferior_args): Rename to ...
339 (inferior_args_scratch): ... this.
340 (inferior_io_terminal): Rename to ...
341 (inferior_io_terminal_scratch): ... this.
342 (inferior_argc, inferior_argv): Remove.
343 (set_inferior_io_terminal, get_inferior_io_terminal): Store
344 inside current_inferior().
345 (set_inferior_tty_command, show_inferior_tty_command): New.
346 (get_inferior_args, set_inferior_args): Store inside
347 current_inferior().
348 (notice_args_set): Likewise and rename to...
349 (set_args_command): ... this.
350 (set_inferior_args_vector): Likewise.
351 (notice_args_read): Rename to...
352 (show_args_command): ...new.
353 (tty_command): Remove.
354 (run_command_1): Don't free old args, as they are freed by
355 set_inferior_arg now.
356 (run_no_args_command): Likewise.
357 (inferior_environ): Remove.
358 (run_command_1): Use environment of the current inferior.
359 (environment_info, set_environment_command)
360 (unset_environment_command, path_info, path_command): Likewise.
361 (_initialize_infcmd): Adjust for function and variable renames.
362 Do not init inferior_environ.
363 * inferior.h (set_inferior_arg): Adjust prototype.
364 (struct inferior): New fields args, argc, argv, terminal, environment.
365 (inferior_environ): Remove declaration.
366 * inferior.c (free_inferior): Free new fields.
367 (add_inferior_silent): Initialize 'environment' field.
368 * main.c (captured_main): Set arguments only after the initial
369 inferior has been created. Set set_inferior_io_terminal,
370 not tty_command.
371 * mi/mi-main.c (mi_cmd_env_path): Use environment of the current
372 inferior.
373 (_initialize_mi_cmd_env): Adjust for disappearance of global
374 inferior_environ.
375 * solib.c (solib_find): Use environment of the current inferior.
376
377 2010-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
378
379 * varobj.c (varobj_add_child, install_dynamic_child): Wrap into #if
380 HAVE_PYTHON.
381 (instantiate_pretty_printer): Move HAVE_PYTHON outside of the function.
382
383 2010-01-20 Joel Brobecker <brobecker@adacore.com>
384
385 Get rid of ada-lang.c:function_name_from_pc.
386 * ada-lang.c: Add "stack.h" #include.
387 (function_name_from_pc): Delete.
388 (is_known_support_routine): Replace call to function_name_from_pc
389 by call to find_frame_funname.
390 (ada_unhandled_exception_name_addr_from_raise): Likewise.
391
392 2010-01-19 Tom Tromey <tromey@redhat.com>
393
394 PR c++/11026:
395 * dwarf2read.c (read_partial_die): Allocate partial DIE's name on
396 objfile obstack.
397
398 2010-01-19 Tom Tromey <tromey@redhat.com>
399
400 * top.c (stop_sig, float_handler, do_nothing): Remove.
401
402 2010-01-19 Jan Kratochvil <jan.kratochvil@redhat.com>
403
404 * breakpoint.c (watchpoint_check): Check the call
405 gdbarch_in_function_epilogue_p before calling frame_find_by_id.
406 Extend the comment.
407 * config/djgpp/fnchange.lst: Add translations for
408 watchpoint-cond-gone.exp, watchpoint-cond-gone.c and
409 watchpoint-cond-gone-stripped.c.
410
411 2010-01-19 Tom Tromey <tromey@redhat.com>
412
413 PR c++/8000:
414 * dwarf2read.c (partial_die_parent_scope): Put enumeration type
415 into parent scope, and enumerator into grandparent scope.
416
417 2010-01-19 Joel Brobecker <brobecker@adacore.com>
418
419 * NEWS: Add entry for "set/show ada trust-PAD-over-XVS" commands.
420
421 2010-01-19 Joel Brobecker <brobecker@adacore.com>
422
423 * configure.host: Make x86_64-*-solaris2.1[0-9]* an alias of
424 i[34567]86-*-solaris2.1[0-9]*.
425 * configure.tgt: Likewise.
426
427 2010-01-19 Joel Brobecker <brobecker@adacore.com>
428
429 * NEWS: Document the source command enhancement allowing it
430 to load Python scripts. Document the "set/show script-extension"
431 commands.
432
433 2010-01-19 Joel Brobecker <brobecker@adacore.com>
434
435 Add -Wunused-function to compile flags.
436 * configure.ac: Add -Wunused-function to build_warnings.
437 * configure: Regenerate.
438
439 2010-01-19 Joel Brobecker <brobecker@adacore.com>
440
441 "delete" ada-lex.c:input function, not used.
442 * ada-lex.l: #define YY_NO_INPUT.
443
444 2010-01-19 Joel Brobecker <brobecker@adacore.com>
445
446 Delete free_named_symtabs and associated cleanup.
447 * symfile.h (free_named_symtabs): Delete declaration.
448 * symfile.c: Remove some commented out code (clear_symtab_users_once).
449 (cashier_psymtab): Comment function out.
450 Delete declaration.
451 (free_named_symtabs): Delete.
452 * coffread.c (coff_end_symtab): Remove call to free_named_symtabs.
453 * dbxread.c (end_psymtab): Likewise.
454 * dwarf2read.c (process_psymtab_comp_unit): Ditto.
455 * exec.c (exec_close_1): Ditto.
456 * xcoffread.c (xcoff_end_psymtab): Likewise.
457
458 2010-01-19 Joel Brobecker <brobecker@adacore.com>
459
460 * stack.c (print_block_frame_labels): Comment function out.
461
462 2010-01-19 Joel Brobecker <brobecker@adacore.com>
463
464 Delete unused or undefined functions.
465 * breakpoint.c (ep_parse_optional_filename): Delete.
466 * dcache.c (dcache_write_line): Remove declaration.
467 * infrun.c (build_infrun): Remove declaration.
468 * tracepoint.c (tracepoint_save_command): Remove declaration.
469 * linux-nat.c (init_lwp_list): Delete. No longer used.
470 * event-loop.c (check_async_signal_handlers): Delete declaration.
471 * infrun.c (init_execution_control_state): Delete.
472 (proceed): Update comment to avoid mentioning
473 init_execution_control_state.
474 * target.c (kill_or_be_killed, nosupport_runtime): Delete.
475 * ada-lang.c (ada_to_static_fixed_value): Delete.
476 * scm-lang.c (evaluate_subexp_scm): Delete declaration.
477 * cp-namespace.c (cp_copy_usings): Delete.
478 * xml-syscall.c (xml_number_of_syscalls): Delete.
479 * progspace.c (find_program_space_by_num): Delete.
480 * inflow.c (handle_sigio): Delete declaration.
481 * hppa-tdep.c (hppa_alignof): Delete.
482 * mipsnbsd-tdep.c (mipsnbsd_sigtramp_offset)
483 (mipsnbsd_core_osabi_sniffer): Delete.
484
485 2010-01-18 Tom Tromey <tromey@redhat.com>
486
487 PR c++/9680:
488 * c-exp.y (REINTERPRET_CAST, DYNAMIC_CAST, STATIC_CAST)
489 (CONST_CAST): New tokens.
490 (exp): Add new productions.
491 (ident_tokens): Add const_cast, dynamic_cast, static_cast, and
492 reinterpret_cast.
493 (is_cast_operator): New function.
494 (yylex): Handle cast operators specially.
495 * eval.c (evaluate_subexp_standard) <UNOP_DYNAMIC_CAST,
496 UNOP_REINTERPRET_CAST>: New cases.
497 * expprint.c (print_subexp_standard): Likewise.
498 (op_name_standard): Likewise.
499 (dump_subexp_body_standard): Likewise.
500 * parse.c (operator_length_standard): Likewise.
501 * expression.h (enum exp_opcode): New constants UNOP_DYNAMIC_CAST,
502 UNOP_REINTERPRET_CAST.
503 * gdbtypes.c (class_types_same_p): New function.
504 (is_ancestor): Use it.
505 (is_public_ancestor): New function.
506 (is_unique_ancestor_worker): Likewise.
507 (is_unique_ancestor): Likewise.
508 * gdbtypes.h (class_types_same_p, is_public_ancestor)
509 (is_unique_ancestor): Declare.
510 * valops.c (value_reinterpret_cast): New function.
511 (dynamic_cast_check_1): Likewise.
512 (dynamic_cast_check_2): Likewise.
513 (value_dynamic_cast): Likewise.
514 * value.h (value_reinterpret_cast, value_dynamic_cast): Declare.
515
516 2010-01-18 Joel Brobecker <brobecker@adacore.com>
517
518 Fix build failure when building without Python support.
519 * python/python.c: Always include exceptions.h, even when HAVE_PYTHON
520 is not defined.
521
522 2010-01-18 Joel Brobecker <brobecker@adacore.com>
523
524 Use XVS field type instead of doing a parallel lookup.
525 * ada-lang.c (ada_get_base_type): Follow the XVS field type
526 if it is a reference type instead of doing a type lookup using
527 the XVS field name.
528
529 2010-01-18 Joel Brobecker <brobecker@adacore.com>
530
531 Trust PAD types instead of using PAD___XVS.
532 * ada-lang.c (trust_pad_over_xvs): New static variable.
533 (ada_is_aligner_type): If !trust_pad_over_xvs and there is a
534 parallel XVS type, follow the XVS type instead of the PAD type.
535 (unwrap_value): Make sure that there is no parallel XVE type
536 before returning the value as is.
537 (set_ada_list, show_ada_list): New static variables.
538 (set_ada_command, show_ada_command): New functions.
539 (_initialize_ada_language): Add new "set/show ada" prefix commands.
540 Add new "set/show ada trust-PAD-over-XVS" setting.
541
542 2010-01-18 Tom Tromey <tromey@redhat.com>
543 Thiago Jung Bauermann <bauerman@br.ibm.com>
544
545 Allow "source" to load python scripts.
546 * exceptions.h (enum errors): Add UNSUPPORTED_ERROR.
547 * python/python.c (source_python_script): New function.
548 * python/python.h (source_python_script): Add declaration.
549 * cli/cli-cmds.c: #include exceptions.h and python/python.h.
550 (script_ext_off, script_ext_soft, script_ext_strict)
551 (script_ext_enums, script_ext_mode): New static constants.
552 (show_script_ext_mode, find_and_open_script): New functions.
553 (source_script): Enhance to handle Python scripts.
554 (init_cli_cmds): Add set/show script-extension commands.
555
556 2010-01-16 Stan Shebs <stan@codesourcery.com>
557
558 * tracepoint.h (struct trace_status): Use unsigned long long
559 instead of size_t.
560 * tracepoint.c (trace_status_command): Fix printf directive.
561 (trace_save_command): Check fwrite returns, fix printf directive.
562 (trace_filename): New global.
563 (tfile_open): Set it, check read returns.
564 (tfile_close): Free trace_filename.
565 (tfile_get_traceframe_address): Check read returns.
566 (tfile_trace_find): Ditto.
567 (tfile_fetch_registers): Ditto.
568 (tfile_xfer_partial): Ditto.
569 (tfile_get_trace_state_variable_value): Ditto.
570
571 2010-01-15 Stan Shebs <stan@codesourcery.com>
572
573 Add trace file support.
574 * tracepoint.h (enum trace_stop_reason): New enum.
575 (struct trace_status): New struct.
576 (parse_trace_status): Declare.
577 (struct uploaded_tp): Move here from remote.c,
578 add fields for actions.
579 (struct uploaded_tsv): New struct.
580 * tracepoint.c (tfile_ops): New target vector.
581 (trace_fd): New global.
582 (tfile_open): New function.
583 (tfile_close): New function.
584 (tfile_files_info): New function.
585 (tfile_get_trace_status): New function.
586 (tfile_get_traceframe_address): New function.
587 (tfile_trace_find): New function.
588 (tfile_fetch_registers): New function.
589 (tfile_xfer_partial): New function.
590 (tfile_get_trace_state_variable_value): New function.
591 (init_tfile_ops): New function.
592 (_initialize_tracepoint): Call it, add tfile target.
593 (trace_status): New global.
594 (current_trace_status): New function.
595 (trace_running_p): Remove, change all users to get from
596 current_trace_status()->running.
597 (get_trace_status): Remove.
598 (trace_status_command): Call target_get_trace_status directly,
599 report more detail including tracing stop reasons.
600 (trace_find_command): Always allow tfind on a file.
601 (trace_find_pc_command): Ditto.
602 (trace_find_tracepoint_command): Ditto.
603 (trace_find_line_command): Ditto.
604 (trace_find_range_command): Ditto.
605 (trace_find_outside_command): Ditto.
606 (trace_frames_offset, cur_offset): Declare as off_t.
607 (trace_regblock_size): Rename from reg_size, update users.
608 (parse_trace_status): New function.
609 (tfile_interp_line): New function.
610 (disconnect_or_stop_tracing): Ensure current trace
611 status before asking what to do.
612 (stop_reason_names): New global.
613 (trace_save_command): New command.
614 (get_uploaded_tp): Move here from remote.c.
615 (find_matching_tracepoint): Ditto.
616 (merge_uploaded_tracepoints): New function.
617 (parse_trace_status): Use stop_reason_names.
618 (_initialize_tracepoint): Define tsave command.
619 * target.h (target_ops): New fields to_save_trace_data,
620 to_upload_tracepoints, to_upload_trace_state_variables,
621 to_get_raw_trace_data, change to_get_trace_status
622 to take a pointer to a status struct.
623 (target_save_trace_data): New macro.
624 (target_upload_tracepoints): New macro.
625 (target_upload_trace_state_variables): New macro.
626 (target_get_raw_trace_data): New macro.
627 * target.c (update_current_target): Add new methods, change
628 signature of to_get_trace_status.
629 * remote.c (hex2bin): Make globally visible.
630 (bin2hex): Ditto.
631 (remote_download_trace_state_variable): Download name also.
632 (remote_get_trace_status): Update parameter, use
633 parse_trace_status.
634 (remote_save_trace_data): New function.
635 (remote_upload_tracepoints): New function.
636 (remote_upload_trace_state_variables): New function.
637 (remote_get_raw_trace_data): New function.
638 (remote_start_remote): Use them.
639 (_initialize_remote_ops): Add operations.
640 * ax-gdb.c: Include breakpoint.h.
641 * breakpoint.c (create_tracepoint_from_upload): Use
642 break_command_really, return tracepoint, warn about unimplemented
643 parts.
644 * NEWS: Mention trace file addition.
645
646 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
647
648 Fix compilation warning on gcc-3.4.
649 * exec.c (print_section_info): Move the `displacement' variable
650 initialization to its declaration.
651
652 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
653
654 * gdb-gdb.py (StructMainTypePrettyPrinter): Fix TYPE_CODE_RANGE
655 comparison.
656
657 2010-01-15 Eric Botcazou <botcazou@adacore.com>
658
659 "info tasks" broken by typedefs in ATCB type definitions.
660 * ada-lang.c (ada_template_to_fixed_record_type_1): Add call to
661 ada_check_typedef before retrieving the length of the type for
662 regular fields.
663
664 2010-01-15 Joel Brobecker <brobecker@adacore.com>
665
666 Do not use name-based lookup for unconstrained packed arrays.
667 * ada-lang.c (find_parallel_type_by_descriptive_type):
668 Limit the fallback to name-based lookups to the case where
669 the type is a constrained packed array.
670
671 2010-01-15 Joel Brobecker <brobecker@adacore.com>
672
673 Enhance gdb-gdb.py to handle main_type.type_specific.
674 * gdb-gdb.py: Print the type-specific part of struct main_type.
675
676 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
677
678 * configure.ac (AC_CHECK_FUNCS): Check for setrlimit and getrlimit.
679 * configure: Regenerate.
680 * config.in: Regenerate.
681 * utils.c: Include sys/resource.h.
682 (dump_core, can_dump_core): New.
683 (internal_vproblem): Update the comment. Check can_dump_core while
684 setting dump_core_p. Replace two abort calls by dump_core calls.
685
686 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
687 Eli Zaretskii <eliz@gnu.org>
688
689 * NEWS: Document the PIE support.
690
691 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
692
693 * linux-tdep.c: Remove includes gdbcore.h, observer.h and elf-bfd.h.
694 (check_is_pie_binary, _initialize_linux_tdep): Remove.
695
696 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
697
698 * solib-svr4.c (svr4_exec_displacement): New comment for entry_point.
699 Replace exec_entry_point call by bfd_get_start_address.
700
701 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
702
703 Support Valgrind attachments broken by the PIE support.
704 * auxv.c: Include gdbcore.h.
705 (procfs_xfer_auxv): Make static. Reduce its comment. Drop its
706 parameters ops, object and annex. Remove their assertions.
707 (ld_so_xfer_auxv, memory_xfer_auxv): New function.
708 * auxv.h (procfs_xfer_auxv): Remove comment. Rename to ...
709 (memory_xfer_auxv): ... here.
710 * linux-nat.c (linux_xfer_partial): Rename procfs_xfer_auxv to
711 memory_xfer_auxv.
712 * procfs.c (procfs_xfer_partial): Likewise.
713 * solib-svr4.c (svr4_relocate_main_executable): New prototype.
714 (svr4_special_symbol_handling): Call svr4_relocate_main_executable.
715 (svr4_solib_create_inferior_hook): Conditionalize the
716 svr4_relocate_main_executable call.
717
718 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
719
720 * solib-svr4.c (scan_dyntag): Remove variable dyn_addr. New variable
721 target_section. Find SECT in current_target_sections, gdb_assert it.
722 (elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile.
723 New variable abfd.
724 * symtab.c (lookup_objfile_from_block): Return the binary file instead
725 of separate debug info file.
726
727 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
728
729 Support PIEs with no symfile_objfile.
730 * exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point.
731 * solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block.
732
733 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
734
735 * solib-svr4.c (svr4_relocate_main_executable): Move the static exec
736 code part to ...
737 (svr4_static_exec_displacement): ... a new function.
738 (svr4_exec_displacement): New function.
739 (svr4_relocate_main_executable): Call svr4_exec_displacement. Allocate
740 new_offsets using alloca now. Remove variable old_chain and changed.
741 Call objfile_relocate unconditionally now.
742
743 2010-01-14 Doug Evans <dje@google.com>
744
745 * gdbtypes.c (arch_flags_type): Fix comment.
746 * gdbtypes.h (arch_composite_type): Fix comment.
747
748 2009-01-14 Tristan Gingold <gingold@adacore.com>
749
750 * machoread.c (macho_add_oso_symfile): Add symfile_flags parameter.
751 Call xstrdup for abfd->filename. Pass symfile_flags and objfile flags
752 to symbol_file_add_from_bfd. Add OSO as separate objfile.
753 (macho_oso_symfile): Add symfile_flags parameter. Pass it to
754 macho_add_oso_symfile.
755 (macho_symfile_read): Pass symfile_flags to macho_oso_symfile.
756
757 2010-01-14 Joel Brobecker <brobecker@adacore.com>
758
759 Tru64: Dead threads are never deleted.
760 * dec-thread.c (dec_thread_ptid_is_alive): New function.
761 (dec_thread_count_gdb_threads): Fix counter increment.
762 (dec_thread_add_gdb_thread): Fix *listp increment.
763 (resync_thread_list): Fix bug in deletion of dead threads that
764 caused all threads to be deleted, instead of just the dead ones.
765
766 2010-01-13 Phil Muldoon <pmuldoon@redhat.com>
767
768 PR python/10705
769
770 * python/python-internal.h: Add lazy_string_object_type
771 definition.
772 (create_lazy_string_object, gdbpy_initialize_lazy_string)
773 (gdbpy_is_lazystring, gdbpy_extract_lazy_string): Define.
774 * python/py-value.c (valpy_lazy_string): New function.
775 (convert_value_from_python): Add lazy string conversion.
776 * python/py-prettyprint.c (pretty_print_one_value): Check if
777 return is also a lazy string.
778 (print_string_repr): Add lazy string printing branch.
779 (print_children): Likewise.
780 * python/py-lazy-string.c: New file. Implement lazy strings.
781 * python/python.c (_initialize_python): Call
782 gdbpy_initialize_lazy_string.
783 * varobj.c (value_get_print_value): Add lazy string printing
784 branch. Account for encoding.
785 * c-lang.c (c_printstr): Account for new encoding argument. If
786 encoding is NULL, find encoding suited for type, otherwise use
787 user encoding.
788 * language.h (language_defn): Add encoding argument.
789 (LA_PRINT_STRING): Likewise.
790 * language.c (unk_lang_printstr): Update to reflect new encoding
791 argument to language_defn.
792 * ada-lang.h (ada_printstr): Likewise.
793 * c-lang.h (c_printstr): Likewise.
794 * p-lang.h (pascal_printstr);
795 * f-lang.c (f_printstr): Likewise.
796 * m2-lang.c (m2_printstr): Likewise.
797 * objc-lang.c (objc_printstr): Likewise.
798 * p-lang.c (pascal_printstr): Likewise.
799 * scm-lang.c (scm_printstr): Likewise.
800 * c-valprint.c (c_val_print): Update LA_PRINT_STRING call for
801 encoding argument.
802 * ada-valprint.c (ada_printstr): Likewise.
803 * f-valprint.c (f_val_print): Likewise
804 * m2-valprint.c (m2_val_print): Likewise.
805 * p-valprint.c (pascal_val_print): Likewise.
806 * expprint.c (print_subexp_standard): Likewise.
807 * valprint.c (val_print_string): Likewise.
808 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-lazy-string.
809 (SUBDIR_PYTHON_SRCS): Likewise.
810 (py-lazy-string.o): New rule.
811
812 2010-01-13 Doug Evans <dje@google.com>
813
814 * mi/mi-main.c (list_available_thread_groups): Avoid "may be used
815 uninitialized" warning from gcc on local `tree'.
816
817 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
818
819 Implement core awareness.
820
821 * bcache.c (compare_ints): Remove
822 (print_percentage): Use compare_positive_ints.
823 * defs.h (compare_positive_ints): Declare.
824 * linux-nat.h (struct lin_lwp): New field core.
825 (linux_nat_core_of_thread_1): Declare.
826 * linux-nat.c (add_lwp): Init the 'core' field.
827 (linux_nat_wait_1): Record the core.
828 (linux_nat_core_of_thread_1, linux_nat_core_of_thread): New.
829 (linux_nat_add_target): Register the above.
830 * linux-thread-db.c (update_thread_core): New.
831 (thread_db_find_new_threads): Update core information for
832 every thread.
833 * remote.c (struct private_thread_info): New.
834 (free_private_thread_info, demand_private_info): New.
835 (PACKET_qXfer_threads, use_osdata_threads): New.
836 (struct thread_item, threads_parsing_context
837 (start_thread, end_thread, thread_attributes)
838 (thread_children, threads_children, threads_elements): New.
839 (remote_threads_info): Try qXfer:threads before anything
840 else.
841 (remote_protocol_packets): Register qXfer:threads.
842 (remote_open_1): Init use_osdata_threads.
843 (struct stop_reply): New field 'core'.
844 (remote_parse_stop_reply): Parse core number.
845 (process_stop_reply): Record core number.
846 (remote_xfer_partial): Handle qXfer:threads.
847 (remote_core_of_thread): New.
848 (init_remote_ops): Register remote_core_of_thread.
849 (_initialize_remote): Register qXfer:read.
850 * target.c (target_core_of_thread): New
851 * target.h (enum target_object): New value TARGET_OBJECT_THREADS.
852 (struct target_ops): New field to_core_of_threads.
853 (target_core_of_thread): Declare.
854 * gdbthread.h (struct thread_info): New field private_dtor.
855 * thread.c (print_thread_info): Report the core.
856 * ui-out.c (MAX_UI_OUT_LEVELS): Increase.
857 * utils.c (compare_positive_ints): New.
858 * features/threads.dtd: New.
859 * mi/mi-interp.c (mi_on_normal_stop): Report the core.
860 * mi/mi-main.c (struct collect_cores_data, collect_cores)
861 (do_nothing, free_vector_of_osdata_items)
862 (splay_tree_int_comparator, free_splay_tree): New.
863 (print_one_inferior_data): Implemented printing of selected
864 inferiors. Collect and print cores.
865 (output_cores): New.
866 (mi_cmd_list_thread_groups): Support --recurse. Permit specifying
867 thread groups together with --available.
868
869 2010-01-12 Jan Kratochvil <jan.kratochvil@redhat.com>
870
871 * configure: Regenerate (for _STRUCTURED_PROC).
872
873 2010-01-12 Joel Brobecker <brobecker@adacore.com>
874
875 Delete dead function.
876 * ada-lang.c (extract_string): Delete. No longer used.
877
878 2010-01-12 Joel Brobecker <brobecker@adacore.com>
879
880 Fix -Wunused warning in dec-thread.c.
881 * dec-thread.c (dec_thread_count_gdb_threads)
882 (dec_thread_add_gdb_thread): Prevent -Wunused warning.
883
884 2010-01-12 Joel Brobecker <brobecker@adacore.com>
885
886 * ada-valprint.c (ada_print_floating): Remove trailing space.
887
888 2010-01-12 Joel Brobecker <brobecker@adacore.com>
889
890 Add support for DW_AT_GNAT_descriptive_type.
891 * gdbtypes.h (enum type_specific_kind): New enum.
892 (struct main_type) [type_specific_field]: New component.
893 [type_specific]: Add new component "gnat_stuff".
894 (struct gnat_aux_type): New type.
895 (INIT_CPLUS_SPECIFIC): Also set TYPE_SPECIFIC_FIELD (type).
896 (HAVE_CPLUS_STRUCT): Also check TYPE_SPECIFIC_FIELD (type).
897 (gnat_aux_default, allocate_gnat_aux_type): Add declaration.
898 (INIT_GNAT_SPECIFIC, ALLOCATE_GNAT_AUX_TYPE, HAVE_GNAT_AUX_INFO)
899 (TYPE_SPECIFIC_FIELD): New macros.
900 (TYPE_CPLUS_SPECIFIC): Return cplus_struct_default if the given
901 type does not hold any cplus-specific data.
902 (TYPE_RAW_CPLUS_SPECIFIC): New macro.
903 (TYPE_GNAT_SPECIFIC, TYPE_DESCRIPTIVE_TYPE): New macros.
904 (TYPE_IS_OPAQUE): Use HAVE_CPLUS_STRUCT to check if type has
905 cplus-specific data.
906 * gdbtypes.c (allocate_cplus_struct_type): Minor stylistic rewrite.
907 Set new component TYPE_SPECIFIC_FIELD (type).
908 (gnat_aux_default): New constant.
909 (allocate_gnat_aux_type): New function.
910 (init_type): Add initialization the type-specific stuff for
911 TYPE_CODE_FLT and TYPE_CODE_FUNC types.
912 (print_gnat_stuff): New function.
913 (recursive_dump_type): Use HAVE_CPLUS_STRUCT to check for cplus-
914 specific data. Adjust code that prints the contents of the
915 type-specific union using the TYPE_SPECIFIC_FIELD value.
916 * dwarf2read.c (dwarf2_attach_fields_to_type): Do not allocate
917 the type cplus stuff for Ada types.
918 (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
919 Error out if these routines are called with an Ada type.
920 (read_structure_type, read_array_type, read_subrange_type):
921 Add call to set_descriptive_type.
922 (set_die_type): Initialize the gnat-specific data if necessary.
923 (need_gnat_info, die_descriptive_type, set_descriptive_type):
924 New functions.
925 * ada-lang.c (decode_constrained_packed_array_type): Use
926 decode_constrained_packed_array_type instead of doing a standard
927 lookup to locate a parallel type.
928 (find_parallel_type_by_descriptive_type): New function.
929 (ada_find_parallel_type_with_name): New function.
930 (ada_find_parallel_type): Reimplement using
931 ada_find_parallel_type_with_name.
932 * ada-valprint.c (print_field_values): Use HAVE_CPLUS_STRUCT
933 to check if type has a cplus stuff.
934 * linespec.c (total_number_of_methods): Likewise.
935 * mdebugread.c (new_type): Likewise.
936
937 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
938
939 * NEWS: Document the 0b binary number prefix parsing.
940
941 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
942
943 * objfiles.c (objfile_relocate1): Change the return type to int.
944 Describe the new return value. Return non-zero if data changed.
945 (objfile_relocate): New variable changed. Set it. Call
946 breakpoint_re_set depending on CHANGED.
947
948 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
949
950 Implement binary numbers parsing.
951 * c-exp.y (parse_number): New case 'b' and 'B'.
952
953 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
954 Tristan Gingold <gingold@adacore.com>
955
956 * solib.c (info_sharedlibrary_command): Replace
957 objfile_has_partial_symbols and objfile_has_full_symbols calls by
958 objfile_has_symbols.
959
960 2010-01-10 Joel Brobecker <brobecker@adacore.com>
961
962 * NEWS: Document the improvements made to the mips-irix port.
963
964 2010-01-09 Joel Brobecker <brobecker@adacore.com>
965
966 Fix the documentation of valprint.c:value_print.
967 * valprint.c (value_print): Update the function description to
968 mention that the syntax of the output follows the current_language,
969 not necessarily C.
970
971 2010-01-09 Jan Kratochvil <jan.kratochvil@redhat.com>
972
973 Fix displacement of separate debug info files.
974 * objfiles.c (objfile_relocate): Rename to ...
975 (objfile_relocate1): ... here and make it static. Extend the comment.
976 (objfile_relocate): New function.
977 * solib-spu.c (spu_relocate_main_executable): Explicitly check if
978 SYMFILE_OBJFILE is NULL. Remove variables objfile and old_chain.
979 Remove following of SEPARATE_DEBUG_OBJFILE. new_offsets is now
980 allocated using alloca.
981 * symfile.c (copy_section_addr_info): Remove.
982 (build_section_addr_info_from_objfile): Make it global. New variables
983 addr_bit and mask, use them.
984 * symfile.h (build_section_addr_info_from_objfile): New prototype.
985 (copy_section_addr_info): Remove.
986
987 2010-01-09 Joel Brobecker <brobecker@adacore.com>
988
989 Signal unwinder for mips-irix N32.
990 * mips-irix-tdep.c: #include mips-tdep.h, trad-frame.h, and
991 tramp-frame.h.
992 (SIGTRAMP_FRAME_SIZE, SIGCONTEXT_PC_OFF, SIGCONTEXT_REGS_OFF)
993 (SIGCONTEXT_FPREGS_OFF, SIGCONTEXT_FPCSR_OFF, SIGCONTEXT_HI_OFF)
994 (SIGCONTEXT_LO_OFF): New macros.
995 (mips_irix_n32_tramp_frame_init): New function.
996 (mips_irix_n32_tramp_frame): New static constant.
997 (mips_irix_init_abi): Prepend the mips_irix_n32_tramp_frame unwinder.
998
999 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1000
1001 Breakpoint in shared library does not work on mips-irix.
1002 * procfs.c: #include "observer.h".
1003 (procfs_inferior_created): New function, moving here the code
1004 which unsets the syssgi syscall-exit notifications.
1005 (procfs_create_inferior): Remove the code which unsets the syssgi
1006 syscall-exit notifications. It is too early to do this here.
1007 (_initialize_procfs): Attach the procfs_inferior_created observer.
1008
1009 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1010
1011 Wrong return convention for arrays (mips-irix).
1012 * mips-tdep.c (mips_n32n64_return_value): Arrays whose size is
1013 128 bits or smaller are returned the same way as structs
1014 and unions of the the same size.
1015
1016 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1017
1018 Cannot set the PC on mips-irix.
1019 * irix5-nat.c (fill_gregset): Check regno against the raw PC
1020 register number, no the cooked one.
1021
1022 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1023
1024 Error while loading core file on mips-irix.
1025 * solib-irix.c (irix_solib_create_inferior_hook): Do nothing
1026 if debugging from a core file.
1027
1028 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1029
1030 GDB hangs when attaching to process on mips-irix.
1031 * solib-irix.c (irix_solib_create_inferior_hook): Do nothing if
1032 attaching to a process.
1033
1034 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1035
1036 Use the correct breakpoint instruction on mips-irix.
1037 * mips-tdep.c (mips_breakpoint_from_pc): Add new static variable
1038 containing the correct breakpoint instruction to use on mips-irix.
1039 Use it when the osabi is GDB_OSABI_IRIX.
1040
1041 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1042
1043 -Wunused warning in procfs.c (mips-irix only).
1044 * procfs.c (gdb_praddset, gdb_prdelset): New macros. Use them
1045 throughout instead of using praddset and prdelset respectively.
1046
1047 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1048
1049 GDB crash while stepping into function.
1050 * infrun.c (handle_inferior_event): Refetch the current frame
1051 after handling what.main_action, in case that pointer became
1052 dangling.
1053
1054 2010-01-09 Joel Brobecker <brobecker@adacore.com>
1055
1056 Fix build failure of solaris-hosted cross debuggers.
1057 * ada-valprint.c, parse.c: Include defs.h before including ctype.h.
1058
1059 2010-01-09 Daniel Gutson <dgutson@codesourcery.com>
1060
1061 Fix build failure on sparc-solaris.
1062 * procfs.c: (procfs_do_thread_registers) Use elfcore_write_lwpstatus.
1063
1064 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1065
1066 Move some symfile code into subroutines.
1067 * symfile.h (relative_addr_info_to_section_offsets)
1068 (addr_info_make_relative): New prototypes.
1069 * symfile.c (default_symfile_offsets): Move a part to ...
1070 (relative_addr_info_to_section_offsets): ... this new function.
1071 (default_symfile_offsets): Call it.
1072 (syms_from_objfile <!mainline && addrs && addrs->other[0].name>): Move
1073 this part to ...
1074 (addr_info_make_relative): ... this new function.
1075
1076 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1077
1078 Add from_tty to solib_create_inferior_hook.
1079 * infcmd.c (post_create_inferior): Move solib_add after
1080 solib_create_inferior_hook. Pass from_tty to
1081 solib_create_inferior_hook. Call solib_add and SOLIB_ADD with
1082 0 from_tty and comment why.
1083 * infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0.
1084 * linux-nat.c (linux_child_follow_fork): Likewise.
1085 * nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise.
1086 * solib-darwin.c (darwin_solib_create_inferior_hook): New parameter
1087 from_tty.
1088 * solib-frv.c (frv_solib_create_inferior_hook): Likewise.
1089 * solib-irix.c (irix_solib_create_inferior_hook): Likewise.
1090 * solib-null.c (null_solib_create_inferior_hook): Likewise.
1091 * solib-osf.c (osf_solib_create_inferior_hook): Likewise.
1092 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
1093 * solib-som.c (som_solib_create_inferior_hook): Likewise.
1094 * solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty.
1095 Pass it to svr4_so_ops.solib_create_inferior_hook.
1096 * solib-sunos.c (sunos_solib_create_inferior_hook): New parameter
1097 from_tty.
1098 * solib-svr4.c (enable_break): New parameter from_tty. Pass it to
1099 solib_add.
1100 (svr4_solib_create_inferior_hook): New parameter from_tty. Pass it to
1101 enable_break.
1102 * solib-target.c (solib_target_solib_create_inferior_hook): New
1103 parameter from_tty.
1104 * solib.c (solib_create_inferior_hook): New parameter from_tty. Pass
1105 it to ops->solib_create_inferior_hook.
1106 (reload_shared_libraries): Pass from_tty to solib_create_inferior_hook.
1107 Move solib_add after solib_create_inferior_hook, call it now with
1108 from_tty as 0. New comment there.
1109 * solib.h (solib_create_inferior_hook): New parameter from_tty.
1110 * solist.h (struct target_so_ops <solib_create_inferior_hook>):
1111 Likewise.
1112
1113 2010-01-08 Vladimir Prus <vladimir@codesourcery.com>
1114
1115 Fix multiexec race.
1116 * infrun.c (handle_inferior_event): Use get_thread_regcache
1117 with events ptid, not get_current_regcache.
1118
1119 2009-01-08 Joel Brobecker <brobecker@adacore.com>
1120
1121 GDB crash with empty executable name (MinGW).
1122 * source.c (openp): Add assert that parameter string is not NULL.
1123 if parameter string is an empty string, then return with a failure
1124 immediately.
1125
1126 2009-01-08 Joel Brobecker <brobecker@adacore.com>
1127
1128 Get rid of support for VAX Floats.
1129 * ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
1130 (ada_vax_float_print_function): Delete.
1131 * ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
1132 (ada_vax_float_print_function): Delete.
1133 * ada-typeprint.c (print_vax_floating_point_type): Delete.
1134 (ada_print_type): Remove support for VAX floats.
1135 * ada-valprint.c (ada_val_print_1): Remove support for VAX floats.
1136
1137 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1138
1139 * stabsread.c (read_args): Handle zero arguments.
1140
1141 2009-01-08 Joel Brobecker <brobecker@adacore.com>
1142
1143 Cannot find in-tree libiconv.a after reconfigure.
1144 * acinclude.m4 (AM_ICONV): If we find an in-tree libiconv.a
1145 that we can use, then cache the path to this archive.
1146 * configure: Regenerate.
1147
1148 2010-01-07 Stan Shebs <stan@codesourcery.com>
1149
1150 Make tracepoint operations go through target vector.
1151 * target.h (enum trace_find_type): New enum.
1152 (struct target_ops): New fields to_trace_init,
1153 to_download_tracepoint, to_download_trace_state_variable,
1154 to_trace_set_readonly_regions, to_trace_start, to_get_trace_status,
1155 to_trace_stop, to_trace_find, to_get_trace_state_variable_value,
1156 to_set_disconnected_tracing.
1157 (target_trace_init): New macro.
1158 (target_download_tracepoint): New macro.
1159 (target_download_trace_state_variable): New macro.
1160 (target_trace_start): New macro.
1161 (target_trace_set_readonly_regions): New macro.
1162 (target_get_trace_status): New macro.
1163 (target_trace_stop): New macro.
1164 (target_trace_find): New macro.
1165 (target_get_trace_state_variable_value): New macro.
1166 (target_set_disconnected_tracing): New macro.
1167 * target.c (update_current_target): Inherit and set defaults for
1168 tracepoint operations.
1169 * tracepoint.c (default_collect): Make globally visible.
1170 (target_is_remote): Remove, along with all calls.
1171 (tvariables_info): Call target_get_trace_state_variable_value.
1172 (remote_set_transparent_ranges): Remove.
1173 (trace_start_command): Call target_trace_init,
1174 target_download_tracepoint, etc.
1175 (download_tracepoint): Remove.
1176 (trace_stop_command): Simplify.
1177 (stop_tracing): Call target_trace_stop.
1178 (get_trace_status): Call target_get_trace_status.
1179 (trace_status_command): Add case for targets that cannot trace.
1180 (finish_tfind_command): Change to take numerical arguments, call
1181 target_trace_find.
1182 (trace_find_command): Update call to finish_tfind_command.
1183 (trace_find_pc_command): Ditto.
1184 (trace_find_tracepoint_command): Ditto.
1185 (trace_find_line_command): Ditto.
1186 (trace_find_range_command): Ditto.
1187 (trace_find_outside_command): Ditto.
1188 (set_disconnected_tracing_value): Call
1189 target_set_disconnected_tracing.
1190 * remote.c: Add protocol encoding bits from tracepoint.c.
1191 (trace_error): Move from tracepoint.c.
1192 (remote_get_noisy_reply): Ditto.
1193 (free_actions_list_cleanup_wrapper): Ditto.
1194 (free_actions_list): Ditto.
1195 (remote_trace_init): New function.
1196 (remote_download_tracepoint): New function.
1197 (remote_download_trace_state_variable): New function.
1198 (remote_trace_set_readonly_regions): New function.
1199 (remote_trace_start): New function.
1200 (remote_get_trace_status): New function.
1201 (remote_trace_stop): New function.
1202 (remote_trace_find): New function.
1203 (remote_download_trace_state_variable): New function.
1204 (remote_set_disconnected_tracing): New function.
1205 (init_remote_ops): Add tracepoint operations.
1206
1207 * tracepoint.c (trace_dump_command): Don't decr_pc_after_break.
1208
1209 2010-01-07 Tristan Gingold <gingold@adacore.com>
1210
1211 * symfile.c (build_section_addr_info_from_objfile): New function.
1212 (symbol_file_add_separate): Don't use offsets from objfile but
1213 built an addr info.
1214
1215 2010-01-06 Stan Shebs <stan@codesourcery.com>
1216
1217 Support disconnected tracing.
1218 * infcmd.c (detach_command): Ask whether to stop tracing.
1219 * cli/cli-cmds.c (quit_command): Ditto.
1220 * breakpoint.h (struct breakpoint): New field number_on_target.
1221 * breakpoint.c (create_tracepoint_from_upload): New function.
1222 (get_tracepoint_by_number_on_target): New function.
1223 * remote.c (struct remote): New field disconnected_tracing.
1224 (remote_disconnected_tracing_feature): New function.
1225 (remote_protocol_features): Add DisconnectedTracing.
1226 (struct uploaded_tp): New struct.
1227 (uploaded_tps): New global.
1228 (get_uploaded_tp): New function.
1229 (find_matching_tracepoint): New function.
1230 (remote_get_tracing_state): New function.
1231 (remote_start_remote): Call it.
1232 * tracepoint.c (disconnected_tracing): New global.
1233 (trace_start_command): Initialize number_on_target.
1234 (stop_tracing): New function, split out from...
1235 (trace_stop_command): Call stop_tracing.
1236 (get_trace_status): New function, split out from...
1237 (trace_status_command): Call get_trace_status, add info on
1238 disconnection behavior.
1239 (disconnect_or_stop_tracing): New function.
1240 (finish_tfind_command): Translate from number on target.
1241 (trace_find_tracepoint_command): Translate to number on target.
1242 (send_disconnected_tracing_value): New function.
1243 (set_disconnected_tracing): New function.
1244 (_initialize_tracepoint): Add disconnected-tracing variable.
1245 * NEWS: Mention disconnected tracing.
1246
1247 2010-01-06 Tristan Gingold <gingold@adacore.com>
1248
1249 * symtab.c (lookup_global_symbol_from_objfile): Rename objfile
1250 parameter to main_objfile. Iterate on all separate debug objfiles.
1251 * symfile.h (symbol_file_add_separate)
1252 (find_separate_debug_file_by_debuglink): Remove parameter names.
1253 * symfile.c (symbol_file_add_separate): Use add_separate_objfile.
1254 (reread_symbols): Use free_objfile_separate_debug.
1255 * objfiles.h (struct objfile): Add separate_debug_objfile_link.
1256 Adjust comment.
1257 (objfile_separate_debug_iterate, add_separate_debug_objfile)
1258 (free_objfile_separate_debug): New prototypes.
1259 * objfiles.c (objfile_separate_debug_iterate): New function.
1260 (add_separate_debug_objfile, free_objfile_separate_debug): New
1261 functions.
1262 (free_objfile): Use free_objfile_separate_debug. Adjust for
1263 multiple separate debug objfile.
1264 (objfile_has_symbols): Adjust comment. Iterate on all separate
1265 debug objfiles.
1266 * minsyms.c (lookup_minimal_symbol): Adjust for multiple separate
1267 debug objfile.
1268 (lookup_minimal_symbol_text): Ditto.
1269 (lookup_minimal_symbol_by_pc_name): Ditto.
1270 (lookup_minimal_symbol_solib_trampoline): Ditto.
1271 (lookup_minimal_symbol_by_pc_section_1): Iterate on all separate
1272 debug objfiles.
1273
1274 2010-01-05 Stan Shebs <stan@codesourcery.com>
1275
1276 Add fast tracepoints.
1277 * arch-utils.h (default_fast_tracepoint_valid_at): Declare.
1278 * arch-utils.c (default_fast_tracepoint_valid_at): New function.
1279 * breakpoint.h (enum bptype): Add bp_fast_tracepoint.
1280 * breakpoint.c (tracepoint_type): New function.
1281 (ALL_TRACEPOINTS): Use it.
1282 (should_be_inserted): Ditto.
1283 (bpstat_check_location): Ditto.
1284 (print_one_breakpoint_location): Ditto.
1285 (user_settable_breakpoint): Ditto.
1286 (set_breakpoint_location_function): Ditto.
1287 (disable_breakpoints_in_shlibs): Ditto.
1288 (delete_trace_command): Ditto.
1289 (print_it_typical): Add bp_fast_tracepoint case.
1290 (bpstat_what): Ditto.
1291 (print_one_breakpoint_location): Ditto.
1292 (allocate_bp_location): Ditto.
1293 (mention): Ditto.
1294 (breakpoint_re_set_one): Ditto.
1295 (disable_command): Ditto.
1296 (enable_command): Ditto.
1297 (check_fast_tracepoint_sals): New function.
1298 (break_command_really): Call it.
1299 (ftrace_command): New function.
1300 (_initialize_breakpoint): Add ftrace command.
1301 * gdbarch.sh (fast_tracepoint_valid_at): New.
1302 * gdbarch.h, gdbarch.c: Regenerate.
1303 * i386-tdep.c (i386_fast_tracepoint_valid_at): New function.
1304 (i386_gdbarch_init): Use it.
1305 * remote.c (struct remote_state): New field fast_tracepoints.
1306 (PACKET_FastTracepoints): New packet config type.
1307 (remote_fast_tracepoint_feature): New function.
1308 (remote_protocol_features): Add FastTracepoints.
1309 (remote_supports_fast_tracepoints): New function.
1310 (_initialize_remote): Add FastTracepoints.
1311 * tracepoint.c (download_tracepoint): Add fast tracepoint option.
1312 * NEWS: Mention fast tracepoints.
1313
1314 2010-01-06 Joel Brobecker <brobecker@adacore.com>
1315
1316 * gdb-gdb.py: New file.
1317
1318 2010-01-05 Michael Snyder <msnyder@vmware.com>
1319
1320 * infrun.c (handle_inferior_event): Fix typo in comment.
1321
1322 2010-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1323
1324 * symfile.c (syms_from_objfile): Remove the !MAINLINE conditional.
1325
1326 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1327
1328 * features/Makefile (WHICH): Add s390-linux32, s390-linux64,
1329 and s390x-linux64.
1330 (s390-linux32-expedite): Define.
1331 (s390-linux64-expedite): Define.
1332 (s390x-linux64-expedite): Define.
1333 * features/s390-acr.xml: New file.
1334 * features/s390-fpr.xml: New file.
1335 * features/s390-core32.xml: New file.
1336 * features/s390-core64.xml: New file.
1337 * features/s390x-core64.xml: New file.
1338 * features/s390-linux32.xml: New file.
1339 * features/s390-linux64.xml: New file.
1340 * features/s390x-linux64.xml: New file.
1341 * features/s390-linux32.c: New generated file.
1342 * features/s390-linux64.c: New generated file.
1343 * features/s390x-linux64.c: New generated file.
1344
1345 * regformats/s390-linux32.dat: New generated file.
1346 * regformats/s390-linux64.dat: New generated file.
1347 * regformats/s390x-linux64.dat: New generated file.
1348 * regformats/reg-s390.dat: Remove.
1349 * regformats/reg-s390x.dat: Remove.
1350
1351 * s390-nat.c: Include "auxv.h" and <elf.h>.
1352 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1353 (s390_target_wordsize): New function.
1354 (s390_auxv_parse): Likewise.
1355 (s390_get_hwcap): Likewise.
1356 (s390_read_description): Likewise.
1357 (_initialize_s390_nat): Install s390_auxv_parse and
1358 s390_read_description.
1359
1360 * s390-tdep.c: Include "features/s390-linux32.c",
1361 "features/s390-linux64.c", and "features/s390x-linux64.c".
1362 (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
1363 (s390_register_call_saved): New function.
1364 (s390_register_name): Remove.
1365 (s390_register_type): Remove.
1366 (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
1367 (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
1368 (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
1369 (s390_pseudo_register_name): New function.
1370 (s390_pseudo_register_type): New function.
1371 (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
1372 Handle full GPR pesudos and varying pseudo register numbers.
1373 (s390_pseudo_register_write): Likewise
1374 (s390x_pseudo_register_read): Remove.
1375 (s390x_pseudo_register_write): Likewise.
1376 (s390_register_group): Remove.
1377 (s390_pseudo_register_group): New function.
1378 (s390_regmap_gregset): Add GPR upper halves.
1379 (s390x_regmap_gregset): Likewise.
1380 (s390_regmap_fpregset): Likewise.
1381 (s390_regmap_upper): New global variable.
1382 (s390_upper_regset): New global variable.
1383 (s390_upper_regset_sections): New global variable.
1384 (s390_regset_from_core_section): Handle GPR upper halves.
1385 (s390_core_read_description): New function.
1386 (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
1387 register information. Handle varying pseudo register numbers.
1388 (s390_backchain_frame_unwind_cache): Likewise.
1389 (s390_frame_prev_register): Unwind full GPRs to show lower halves.
1390 (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
1391 (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
1392 PC and CC pseudos. Unwind upper halves and full GPRs as appropriate.
1393 Handle varying pseudo register numbers.
1394 (s390_unwind_pc): Handle varying pseudo register numbers.
1395 (s390_dwarf2_prev_register): New function.
1396 (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
1397 register information. Handle varying pseudo register numbers.
1398 Install s390_dwarf2_prev_register to unwind full GPRs.
1399 (s390_gdbarch_init): Handle target descriptions. Assign varying
1400 pseudo register numbers. Install s390_adjust_frame_regnum.
1401 (_initialize_s390_tdep): Initialize target descriptions.
1402
1403 * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
1404 (S390_NUM_REGS): Redefine to include upper half registers.
1405 (S390_PC_REGNUM, S390_CC_REGNUM): Remove.
1406 (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
1407 (tdesc_s390_linux32): Add declaration.
1408 (tdesc_s390_linux64): Likewise.
1409 (tdesc_s390x_linux64): Likewise.
1410
1411 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1412
1413 * regset.h (struct core_regset_section): Add HUMAN_NAME.
1414 * i386-linux-tdep.c (i386_linux_regset_sections): Fill in HUMAN_NAME.
1415 * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections): Likewise.
1416 (ppc_linux_vmx_regset_sections): Likewise.
1417 (ppc_linux_fp_regset_sections): Likewise.
1418
1419 * corelow.c (get_core_register_section): Constify arguments.
1420 (get_core_registers): Use gdbarch_core_regset_sections instead
1421 of hard-coded platform-specific register section names.
1422
1423 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1424
1425 * dwarf2loc.c (read_pieced_value): If a piece occupies part of
1426 a register, assume the least-significant part is used.
1427 (write_pieced_value): Likewise.
1428
1429 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1430
1431 * printcmd.c: Include "arch-utils.h".
1432 (do_one_display): Re-parse expression if current architecture changed.
1433
1434 2010-01-03 Jan Kratochvil <jan.kratochvil@redhat.com>
1435 Joel Brobecker <brobecker@adacore.com>
1436
1437 * gdbtypes.c (check_typedef): New comment on type length.
1438 * value.c (allocate_value_lazy): Remove the unused atype variable. New
1439 comment on type length.
1440 (value_primitive_field): Keep the original TYPE value, new comment.
1441
1442 2010-01-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1443
1444 * cli/cli-script.c (process_next_line): Rename p1 as p_end and p2 as
1445 p_start. Change != comparisons to > and < comparisons.
1446
1447 2010-01-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1448
1449 * cli/cli-script.c (process_next_line): Check P2 overrun.
1450
1451 2009-01-01 Joel Brobecker <brobecker@adacore.com>
1452
1453 Update the copyright hearder to add year 2010 for most GDB files.
1454
1455 2009-01-01 Joel Brobecker <brobecker@adacore.com>
1456
1457 Fix build failure in inf-ptrace.c.
1458 * inf-ptrace.c (inf_ptrace_follow_fork): Fix typo.
1459
1460 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1461
1462 * top.c (print_gdb_version): Update copyright year.
1463
1464 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1465
1466 Fix break *FUN'address thread NUM.
1467 * ada-lex.l (task): Expand rule to also match the thread keyword.
1468
1469 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1470
1471 Fix break *FUN'address task NUM.
1472 * ada-lex.l (task): New rule.
1473 * ada-lang.c (valid_task_id): Make sure the Ada task list has
1474 been built before using it.
1475
1476 For older changes see ChangeLog-2009.
1477 \f
1478 Local Variables:
1479 mode: change-log
1480 left-margin: 8
1481 fill-column: 74
1482 version-control: never
1483 coding: utf-8
1484 End:
This page took 0.067062 seconds and 4 git commands to generate.