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