1 2010-01-19 Joel Brobecker <brobecker@adacore.com>
3 * stack.c (print_block_frame_labels): Comment function out.
5 2010-01-19 Joel Brobecker <brobecker@adacore.com>
7 Delete unused or undefined functions.
8 * breakpoint.c (ep_parse_optional_filename): Delete.
9 * dcache.c (dcache_write_line): Remove declaration.
10 * infrun.c (build_infrun): Remove declaration.
11 * tracepoint.c (tracepoint_save_command): Remove declaration.
12 * linux-nat.c (init_lwp_list): Delete. No longer used.
13 * event-loop.c (check_async_signal_handlers): Delete declaration.
14 * infrun.c (init_execution_control_state): Delete.
15 (proceed): Update comment to avoid mentioning
16 init_execution_control_state.
17 * target.c (kill_or_be_killed, nosupport_runtime): Delete.
18 * ada-lang.c (ada_to_static_fixed_value): Delete.
19 * scm-lang.c (evaluate_subexp_scm): Delete declaration.
20 * cp-namespace.c (cp_copy_usings): Delete.
21 * xml-syscall.c (xml_number_of_syscalls): Delete.
22 * progspace.c (find_program_space_by_num): Delete.
23 * inflow.c (handle_sigio): Delete declaration.
24 * hppa-tdep.c (hppa_alignof): Delete.
25 * mipsnbsd-tdep.c (mipsnbsd_sigtramp_offset)
26 (mipsnbsd_core_osabi_sniffer): Delete.
28 2010-01-18 Tom Tromey <tromey@redhat.com>
31 * c-exp.y (REINTERPRET_CAST, DYNAMIC_CAST, STATIC_CAST)
32 (CONST_CAST): New tokens.
33 (exp): Add new productions.
34 (ident_tokens): Add const_cast, dynamic_cast, static_cast, and
36 (is_cast_operator): New function.
37 (yylex): Handle cast operators specially.
38 * eval.c (evaluate_subexp_standard) <UNOP_DYNAMIC_CAST,
39 UNOP_REINTERPRET_CAST>: New cases.
40 * expprint.c (print_subexp_standard): Likewise.
41 (op_name_standard): Likewise.
42 (dump_subexp_body_standard): Likewise.
43 * parse.c (operator_length_standard): Likewise.
44 * expression.h (enum exp_opcode): New constants UNOP_DYNAMIC_CAST,
45 UNOP_REINTERPRET_CAST.
46 * gdbtypes.c (class_types_same_p): New function.
47 (is_ancestor): Use it.
48 (is_public_ancestor): New function.
49 (is_unique_ancestor_worker): Likewise.
50 (is_unique_ancestor): Likewise.
51 * gdbtypes.h (class_types_same_p, is_public_ancestor)
52 (is_unique_ancestor): Declare.
53 * valops.c (value_reinterpret_cast): New function.
54 (dynamic_cast_check_1): Likewise.
55 (dynamic_cast_check_2): Likewise.
56 (value_dynamic_cast): Likewise.
57 * value.h (value_reinterpret_cast, value_dynamic_cast): Declare.
59 2010-01-18 Joel Brobecker <brobecker@adacore.com>
61 Fix build failure when building without Python support.
62 * python/python.c: Always include exceptions.h, even when HAVE_PYTHON
65 2010-01-18 Joel Brobecker <brobecker@adacore.com>
67 Use XVS field type instead of doing a parallel lookup.
68 * ada-lang.c (ada_get_base_type): Follow the XVS field type
69 if it is a reference type instead of doing a type lookup using
72 2010-01-18 Joel Brobecker <brobecker@adacore.com>
74 Trust PAD types instead of using PAD___XVS.
75 * ada-lang.c (trust_pad_over_xvs): New static variable.
76 (ada_is_aligner_type): If !trust_pad_over_xvs and there is a
77 parallel XVS type, follow the XVS type instead of the PAD type.
78 (unwrap_value): Make sure that there is no parallel XVE type
79 before returning the value as is.
80 (set_ada_list, show_ada_list): New static variables.
81 (set_ada_command, show_ada_command): New functions.
82 (_initialize_ada_language): Add new "set/show ada" prefix commands.
83 Add new "set/show ada trust-PAD-over-XVS" setting.
85 2010-01-18 Tom Tromey <tromey@redhat.com>
86 Thiago Jung Bauermann <bauerman@br.ibm.com>
88 Allow "source" to load python scripts.
89 * exceptions.h (enum errors): Add UNSUPPORTED_ERROR.
90 * python/python.c (source_python_script): New function.
91 * python/python.h (source_python_script): Add declaration.
92 * cli/cli-cmds.c: #include exceptions.h and python/python.h.
93 (script_ext_off, script_ext_soft, script_ext_strict)
94 (script_ext_enums, script_ext_mode): New static constants.
95 (show_script_ext_mode, find_and_open_script): New functions.
96 (source_script): Enhance to handle Python scripts.
97 (init_cli_cmds): Add set/show script-extension commands.
99 2010-01-16 Stan Shebs <stan@codesourcery.com>
101 * tracepoint.h (struct trace_status): Use unsigned long long
103 * tracepoint.c (trace_status_command): Fix printf directive.
104 (trace_save_command): Check fwrite returns, fix printf directive.
105 (trace_filename): New global.
106 (tfile_open): Set it, check read returns.
107 (tfile_close): Free trace_filename.
108 (tfile_get_traceframe_address): Check read returns.
109 (tfile_trace_find): Ditto.
110 (tfile_fetch_registers): Ditto.
111 (tfile_xfer_partial): Ditto.
112 (tfile_get_trace_state_variable_value): Ditto.
114 2010-01-15 Stan Shebs <stan@codesourcery.com>
116 Add trace file support.
117 * tracepoint.h (enum trace_stop_reason): New enum.
118 (struct trace_status): New struct.
119 (parse_trace_status): Declare.
120 (struct uploaded_tp): Move here from remote.c,
121 add fields for actions.
122 (struct uploaded_tsv): New struct.
123 * tracepoint.c (tfile_ops): New target vector.
124 (trace_fd): New global.
125 (tfile_open): New function.
126 (tfile_close): New function.
127 (tfile_files_info): New function.
128 (tfile_get_trace_status): New function.
129 (tfile_get_traceframe_address): New function.
130 (tfile_trace_find): New function.
131 (tfile_fetch_registers): New function.
132 (tfile_xfer_partial): New function.
133 (tfile_get_trace_state_variable_value): New function.
134 (init_tfile_ops): New function.
135 (_initialize_tracepoint): Call it, add tfile target.
136 (trace_status): New global.
137 (current_trace_status): New function.
138 (trace_running_p): Remove, change all users to get from
139 current_trace_status()->running.
140 (get_trace_status): Remove.
141 (trace_status_command): Call target_get_trace_status directly,
142 report more detail including tracing stop reasons.
143 (trace_find_command): Always allow tfind on a file.
144 (trace_find_pc_command): Ditto.
145 (trace_find_tracepoint_command): Ditto.
146 (trace_find_line_command): Ditto.
147 (trace_find_range_command): Ditto.
148 (trace_find_outside_command): Ditto.
149 (trace_frames_offset, cur_offset): Declare as off_t.
150 (trace_regblock_size): Rename from reg_size, update users.
151 (parse_trace_status): New function.
152 (tfile_interp_line): New function.
153 (disconnect_or_stop_tracing): Ensure current trace
154 status before asking what to do.
155 (stop_reason_names): New global.
156 (trace_save_command): New command.
157 (get_uploaded_tp): Move here from remote.c.
158 (find_matching_tracepoint): Ditto.
159 (merge_uploaded_tracepoints): New function.
160 (parse_trace_status): Use stop_reason_names.
161 (_initialize_tracepoint): Define tsave command.
162 * target.h (target_ops): New fields to_save_trace_data,
163 to_upload_tracepoints, to_upload_trace_state_variables,
164 to_get_raw_trace_data, change to_get_trace_status
165 to take a pointer to a status struct.
166 (target_save_trace_data): New macro.
167 (target_upload_tracepoints): New macro.
168 (target_upload_trace_state_variables): New macro.
169 (target_get_raw_trace_data): New macro.
170 * target.c (update_current_target): Add new methods, change
171 signature of to_get_trace_status.
172 * remote.c (hex2bin): Make globally visible.
174 (remote_download_trace_state_variable): Download name also.
175 (remote_get_trace_status): Update parameter, use
177 (remote_save_trace_data): New function.
178 (remote_upload_tracepoints): New function.
179 (remote_upload_trace_state_variables): New function.
180 (remote_get_raw_trace_data): New function.
181 (remote_start_remote): Use them.
182 (_initialize_remote_ops): Add operations.
183 * ax-gdb.c: Include breakpoint.h.
184 * breakpoint.c (create_tracepoint_from_upload): Use
185 break_command_really, return tracepoint, warn about unimplemented
187 * NEWS: Mention trace file addition.
189 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
191 Fix compilation warning on gcc-3.4.
192 * exec.c (print_section_info): Move the `displacement' variable
193 initialization to its declaration.
195 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
197 * gdb-gdb.py (StructMainTypePrettyPrinter): Fix TYPE_CODE_RANGE
200 2010-01-15 Eric Botcazou <botcazou@adacore.com>
202 "info tasks" broken by typedefs in ATCB type definitions.
203 * ada-lang.c (ada_template_to_fixed_record_type_1): Add call to
204 ada_check_typedef before retrieving the length of the type for
207 2010-01-15 Joel Brobecker <brobecker@adacore.com>
209 Do not use name-based lookup for unconstrained packed arrays.
210 * ada-lang.c (find_parallel_type_by_descriptive_type):
211 Limit the fallback to name-based lookups to the case where
212 the type is a constrained packed array.
214 2010-01-15 Joel Brobecker <brobecker@adacore.com>
216 Enhance gdb-gdb.py to handle main_type.type_specific.
217 * gdb-gdb.py: Print the type-specific part of struct main_type.
219 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
221 * configure.ac (AC_CHECK_FUNCS): Check for setrlimit and getrlimit.
222 * configure: Regenerate.
223 * config.in: Regenerate.
224 * utils.c: Include sys/resource.h.
225 (dump_core, can_dump_core): New.
226 (internal_vproblem): Update the comment. Check can_dump_core while
227 setting dump_core_p. Replace two abort calls by dump_core calls.
229 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
230 Eli Zaretskii <eliz@gnu.org>
232 * NEWS: Document the PIE support.
234 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
236 * linux-tdep.c: Remove includes gdbcore.h, observer.h and elf-bfd.h.
237 (check_is_pie_binary, _initialize_linux_tdep): Remove.
239 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
241 * solib-svr4.c (svr4_exec_displacement): New comment for entry_point.
242 Replace exec_entry_point call by bfd_get_start_address.
244 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
246 Support Valgrind attachments broken by the PIE support.
247 * auxv.c: Include gdbcore.h.
248 (procfs_xfer_auxv): Make static. Reduce its comment. Drop its
249 parameters ops, object and annex. Remove their assertions.
250 (ld_so_xfer_auxv, memory_xfer_auxv): New function.
251 * auxv.h (procfs_xfer_auxv): Remove comment. Rename to ...
252 (memory_xfer_auxv): ... here.
253 * linux-nat.c (linux_xfer_partial): Rename procfs_xfer_auxv to
255 * procfs.c (procfs_xfer_partial): Likewise.
256 * solib-svr4.c (svr4_relocate_main_executable): New prototype.
257 (svr4_special_symbol_handling): Call svr4_relocate_main_executable.
258 (svr4_solib_create_inferior_hook): Conditionalize the
259 svr4_relocate_main_executable call.
261 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
263 * solib-svr4.c (scan_dyntag): Remove variable dyn_addr. New variable
264 target_section. Find SECT in current_target_sections, gdb_assert it.
265 (elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile.
267 * symtab.c (lookup_objfile_from_block): Return the binary file instead
268 of separate debug info file.
270 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
272 Support PIEs with no symfile_objfile.
273 * exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point.
274 * solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block.
276 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
278 * solib-svr4.c (svr4_relocate_main_executable): Move the static exec
280 (svr4_static_exec_displacement): ... a new function.
281 (svr4_exec_displacement): New function.
282 (svr4_relocate_main_executable): Call svr4_exec_displacement. Allocate
283 new_offsets using alloca now. Remove variable old_chain and changed.
284 Call objfile_relocate unconditionally now.
286 2010-01-14 Doug Evans <dje@google.com>
288 * gdbtypes.c (arch_flags_type): Fix comment.
289 * gdbtypes.h (arch_composite_type): Fix comment.
291 2009-01-14 Tristan Gingold <gingold@adacore.com>
293 * machoread.c (macho_add_oso_symfile): Add symfile_flags parameter.
294 Call xstrdup for abfd->filename. Pass symfile_flags and objfile flags
295 to symbol_file_add_from_bfd. Add OSO as separate objfile.
296 (macho_oso_symfile): Add symfile_flags parameter. Pass it to
297 macho_add_oso_symfile.
298 (macho_symfile_read): Pass symfile_flags to macho_oso_symfile.
300 2010-01-14 Joel Brobecker <brobecker@adacore.com>
302 Tru64: Dead threads are never deleted.
303 * dec-thread.c (dec_thread_ptid_is_alive): New function.
304 (dec_thread_count_gdb_threads): Fix counter increment.
305 (dec_thread_add_gdb_thread): Fix *listp increment.
306 (resync_thread_list): Fix bug in deletion of dead threads that
307 caused all threads to be deleted, instead of just the dead ones.
309 2010-01-13 Phil Muldoon <pmuldoon@redhat.com>
313 * python/python-internal.h: Add lazy_string_object_type
315 (create_lazy_string_object, gdbpy_initialize_lazy_string)
316 (gdbpy_is_lazystring, gdbpy_extract_lazy_string): Define.
317 * python/py-value.c (valpy_lazy_string): New function.
318 (convert_value_from_python): Add lazy string conversion.
319 * python/py-prettyprint.c (pretty_print_one_value): Check if
320 return is also a lazy string.
321 (print_string_repr): Add lazy string printing branch.
322 (print_children): Likewise.
323 * python/py-lazy-string.c: New file. Implement lazy strings.
324 * python/python.c (_initialize_python): Call
325 gdbpy_initialize_lazy_string.
326 * varobj.c (value_get_print_value): Add lazy string printing
327 branch. Account for encoding.
328 * c-lang.c (c_printstr): Account for new encoding argument. If
329 encoding is NULL, find encoding suited for type, otherwise use
331 * language.h (language_defn): Add encoding argument.
332 (LA_PRINT_STRING): Likewise.
333 * language.c (unk_lang_printstr): Update to reflect new encoding
334 argument to language_defn.
335 * ada-lang.h (ada_printstr): Likewise.
336 * c-lang.h (c_printstr): Likewise.
337 * p-lang.h (pascal_printstr);
338 * f-lang.c (f_printstr): Likewise.
339 * m2-lang.c (m2_printstr): Likewise.
340 * objc-lang.c (objc_printstr): Likewise.
341 * p-lang.c (pascal_printstr): Likewise.
342 * scm-lang.c (scm_printstr): Likewise.
343 * c-valprint.c (c_val_print): Update LA_PRINT_STRING call for
345 * ada-valprint.c (ada_printstr): Likewise.
346 * f-valprint.c (f_val_print): Likewise
347 * m2-valprint.c (m2_val_print): Likewise.
348 * p-valprint.c (pascal_val_print): Likewise.
349 * expprint.c (print_subexp_standard): Likewise.
350 * valprint.c (val_print_string): Likewise.
351 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-lazy-string.
352 (SUBDIR_PYTHON_SRCS): Likewise.
353 (py-lazy-string.o): New rule.
355 2010-01-13 Doug Evans <dje@google.com>
357 * mi/mi-main.c (list_available_thread_groups): Avoid "may be used
358 uninitialized" warning from gcc on local `tree'.
360 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
362 Implement core awareness.
364 * bcache.c (compare_ints): Remove
365 (print_percentage): Use compare_positive_ints.
366 * defs.h (compare_positive_ints): Declare.
367 * linux-nat.h (struct lin_lwp): New field core.
368 (linux_nat_core_of_thread_1): Declare.
369 * linux-nat.c (add_lwp): Init the 'core' field.
370 (linux_nat_wait_1): Record the core.
371 (linux_nat_core_of_thread_1, linux_nat_core_of_thread): New.
372 (linux_nat_add_target): Register the above.
373 * linux-thread-db.c (update_thread_core): New.
374 (thread_db_find_new_threads): Update core information for
376 * remote.c (struct private_thread_info): New.
377 (free_private_thread_info, demand_private_info): New.
378 (PACKET_qXfer_threads, use_osdata_threads): New.
379 (struct thread_item, threads_parsing_context
380 (start_thread, end_thread, thread_attributes)
381 (thread_children, threads_children, threads_elements): New.
382 (remote_threads_info): Try qXfer:threads before anything
384 (remote_protocol_packets): Register qXfer:threads.
385 (remote_open_1): Init use_osdata_threads.
386 (struct stop_reply): New field 'core'.
387 (remote_parse_stop_reply): Parse core number.
388 (process_stop_reply): Record core number.
389 (remote_xfer_partial): Handle qXfer:threads.
390 (remote_core_of_thread): New.
391 (init_remote_ops): Register remote_core_of_thread.
392 (_initialize_remote): Register qXfer:read.
393 * target.c (target_core_of_thread): New
394 * target.h (enum target_object): New value TARGET_OBJECT_THREADS.
395 (struct target_ops): New field to_core_of_threads.
396 (target_core_of_thread): Declare.
397 * gdbthread.h (struct thread_info): New field private_dtor.
398 * thread.c (print_thread_info): Report the core.
399 * ui-out.c (MAX_UI_OUT_LEVELS): Increase.
400 * utils.c (compare_positive_ints): New.
401 * features/threads.dtd: New.
402 * mi/mi-interp.c (mi_on_normal_stop): Report the core.
403 * mi/mi-main.c (struct collect_cores_data, collect_cores)
404 (do_nothing, free_vector_of_osdata_items)
405 (splay_tree_int_comparator, free_splay_tree): New.
406 (print_one_inferior_data): Implemented printing of selected
407 inferiors. Collect and print cores.
409 (mi_cmd_list_thread_groups): Support --recurse. Permit specifying
410 thread groups together with --available.
412 2010-01-12 Jan Kratochvil <jan.kratochvil@redhat.com>
414 * configure: Regenerate (for _STRUCTURED_PROC).
416 2010-01-12 Joel Brobecker <brobecker@adacore.com>
418 Delete dead function.
419 * ada-lang.c (extract_string): Delete. No longer used.
421 2010-01-12 Joel Brobecker <brobecker@adacore.com>
423 Fix -Wunused warning in dec-thread.c.
424 * dec-thread.c (dec_thread_count_gdb_threads)
425 (dec_thread_add_gdb_thread): Prevent -Wunused warning.
427 2010-01-12 Joel Brobecker <brobecker@adacore.com>
429 * ada-valprint.c (ada_print_floating): Remove trailing space.
431 2010-01-12 Joel Brobecker <brobecker@adacore.com>
433 Add support for DW_AT_GNAT_descriptive_type.
434 * gdbtypes.h (enum type_specific_kind): New enum.
435 (struct main_type) [type_specific_field]: New component.
436 [type_specific]: Add new component "gnat_stuff".
437 (struct gnat_aux_type): New type.
438 (INIT_CPLUS_SPECIFIC): Also set TYPE_SPECIFIC_FIELD (type).
439 (HAVE_CPLUS_STRUCT): Also check TYPE_SPECIFIC_FIELD (type).
440 (gnat_aux_default, allocate_gnat_aux_type): Add declaration.
441 (INIT_GNAT_SPECIFIC, ALLOCATE_GNAT_AUX_TYPE, HAVE_GNAT_AUX_INFO)
442 (TYPE_SPECIFIC_FIELD): New macros.
443 (TYPE_CPLUS_SPECIFIC): Return cplus_struct_default if the given
444 type does not hold any cplus-specific data.
445 (TYPE_RAW_CPLUS_SPECIFIC): New macro.
446 (TYPE_GNAT_SPECIFIC, TYPE_DESCRIPTIVE_TYPE): New macros.
447 (TYPE_IS_OPAQUE): Use HAVE_CPLUS_STRUCT to check if type has
449 * gdbtypes.c (allocate_cplus_struct_type): Minor stylistic rewrite.
450 Set new component TYPE_SPECIFIC_FIELD (type).
451 (gnat_aux_default): New constant.
452 (allocate_gnat_aux_type): New function.
453 (init_type): Add initialization the type-specific stuff for
454 TYPE_CODE_FLT and TYPE_CODE_FUNC types.
455 (print_gnat_stuff): New function.
456 (recursive_dump_type): Use HAVE_CPLUS_STRUCT to check for cplus-
457 specific data. Adjust code that prints the contents of the
458 type-specific union using the TYPE_SPECIFIC_FIELD value.
459 * dwarf2read.c (dwarf2_attach_fields_to_type): Do not allocate
460 the type cplus stuff for Ada types.
461 (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
462 Error out if these routines are called with an Ada type.
463 (read_structure_type, read_array_type, read_subrange_type):
464 Add call to set_descriptive_type.
465 (set_die_type): Initialize the gnat-specific data if necessary.
466 (need_gnat_info, die_descriptive_type, set_descriptive_type):
468 * ada-lang.c (decode_constrained_packed_array_type): Use
469 decode_constrained_packed_array_type instead of doing a standard
470 lookup to locate a parallel type.
471 (find_parallel_type_by_descriptive_type): New function.
472 (ada_find_parallel_type_with_name): New function.
473 (ada_find_parallel_type): Reimplement using
474 ada_find_parallel_type_with_name.
475 * ada-valprint.c (print_field_values): Use HAVE_CPLUS_STRUCT
476 to check if type has a cplus stuff.
477 * linespec.c (total_number_of_methods): Likewise.
478 * mdebugread.c (new_type): Likewise.
480 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
482 * NEWS: Document the 0b binary number prefix parsing.
484 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
486 * objfiles.c (objfile_relocate1): Change the return type to int.
487 Describe the new return value. Return non-zero if data changed.
488 (objfile_relocate): New variable changed. Set it. Call
489 breakpoint_re_set depending on CHANGED.
491 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
493 Implement binary numbers parsing.
494 * c-exp.y (parse_number): New case 'b' and 'B'.
496 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
497 Tristan Gingold <gingold@adacore.com>
499 * solib.c (info_sharedlibrary_command): Replace
500 objfile_has_partial_symbols and objfile_has_full_symbols calls by
503 2010-01-10 Joel Brobecker <brobecker@adacore.com>
505 * NEWS: Document the improvements made to the mips-irix port.
507 2010-01-09 Joel Brobecker <brobecker@adacore.com>
509 Fix the documentation of valprint.c:value_print.
510 * valprint.c (value_print): Update the function description to
511 mention that the syntax of the output follows the current_language,
514 2010-01-09 Jan Kratochvil <jan.kratochvil@redhat.com>
516 Fix displacement of separate debug info files.
517 * objfiles.c (objfile_relocate): Rename to ...
518 (objfile_relocate1): ... here and make it static. Extend the comment.
519 (objfile_relocate): New function.
520 * solib-spu.c (spu_relocate_main_executable): Explicitly check if
521 SYMFILE_OBJFILE is NULL. Remove variables objfile and old_chain.
522 Remove following of SEPARATE_DEBUG_OBJFILE. new_offsets is now
523 allocated using alloca.
524 * symfile.c (copy_section_addr_info): Remove.
525 (build_section_addr_info_from_objfile): Make it global. New variables
526 addr_bit and mask, use them.
527 * symfile.h (build_section_addr_info_from_objfile): New prototype.
528 (copy_section_addr_info): Remove.
530 2010-01-09 Joel Brobecker <brobecker@adacore.com>
532 Signal unwinder for mips-irix N32.
533 * mips-irix-tdep.c: #include mips-tdep.h, trad-frame.h, and
535 (SIGTRAMP_FRAME_SIZE, SIGCONTEXT_PC_OFF, SIGCONTEXT_REGS_OFF)
536 (SIGCONTEXT_FPREGS_OFF, SIGCONTEXT_FPCSR_OFF, SIGCONTEXT_HI_OFF)
537 (SIGCONTEXT_LO_OFF): New macros.
538 (mips_irix_n32_tramp_frame_init): New function.
539 (mips_irix_n32_tramp_frame): New static constant.
540 (mips_irix_init_abi): Prepend the mips_irix_n32_tramp_frame unwinder.
542 2010-01-09 Joel Brobecker <brobecker@adacore.com>
544 Breakpoint in shared library does not work on mips-irix.
545 * procfs.c: #include "observer.h".
546 (procfs_inferior_created): New function, moving here the code
547 which unsets the syssgi syscall-exit notifications.
548 (procfs_create_inferior): Remove the code which unsets the syssgi
549 syscall-exit notifications. It is too early to do this here.
550 (_initialize_procfs): Attach the procfs_inferior_created observer.
552 2010-01-09 Joel Brobecker <brobecker@adacore.com>
554 Wrong return convention for arrays (mips-irix).
555 * mips-tdep.c (mips_n32n64_return_value): Arrays whose size is
556 128 bits or smaller are returned the same way as structs
557 and unions of the the same size.
559 2010-01-09 Joel Brobecker <brobecker@adacore.com>
561 Cannot set the PC on mips-irix.
562 * irix5-nat.c (fill_gregset): Check regno against the raw PC
563 register number, no the cooked one.
565 2010-01-09 Joel Brobecker <brobecker@adacore.com>
567 Error while loading core file on mips-irix.
568 * solib-irix.c (irix_solib_create_inferior_hook): Do nothing
569 if debugging from a core file.
571 2010-01-09 Joel Brobecker <brobecker@adacore.com>
573 GDB hangs when attaching to process on mips-irix.
574 * solib-irix.c (irix_solib_create_inferior_hook): Do nothing if
575 attaching to a process.
577 2010-01-09 Joel Brobecker <brobecker@adacore.com>
579 Use the correct breakpoint instruction on mips-irix.
580 * mips-tdep.c (mips_breakpoint_from_pc): Add new static variable
581 containing the correct breakpoint instruction to use on mips-irix.
582 Use it when the osabi is GDB_OSABI_IRIX.
584 2010-01-09 Joel Brobecker <brobecker@adacore.com>
586 -Wunused warning in procfs.c (mips-irix only).
587 * procfs.c (gdb_praddset, gdb_prdelset): New macros. Use them
588 throughout instead of using praddset and prdelset respectively.
590 2010-01-09 Joel Brobecker <brobecker@adacore.com>
592 GDB crash while stepping into function.
593 * infrun.c (handle_inferior_event): Refetch the current frame
594 after handling what.main_action, in case that pointer became
597 2010-01-09 Joel Brobecker <brobecker@adacore.com>
599 Fix build failure of solaris-hosted cross debuggers.
600 * ada-valprint.c, parse.c: Include defs.h before including ctype.h.
602 2010-01-09 Daniel Gutson <dgutson@codesourcery.com>
604 Fix build failure on sparc-solaris.
605 * procfs.c: (procfs_do_thread_registers) Use elfcore_write_lwpstatus.
607 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
609 Move some symfile code into subroutines.
610 * symfile.h (relative_addr_info_to_section_offsets)
611 (addr_info_make_relative): New prototypes.
612 * symfile.c (default_symfile_offsets): Move a part to ...
613 (relative_addr_info_to_section_offsets): ... this new function.
614 (default_symfile_offsets): Call it.
615 (syms_from_objfile <!mainline && addrs && addrs->other[0].name>): Move
617 (addr_info_make_relative): ... this new function.
619 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
621 Add from_tty to solib_create_inferior_hook.
622 * infcmd.c (post_create_inferior): Move solib_add after
623 solib_create_inferior_hook. Pass from_tty to
624 solib_create_inferior_hook. Call solib_add and SOLIB_ADD with
625 0 from_tty and comment why.
626 * infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0.
627 * linux-nat.c (linux_child_follow_fork): Likewise.
628 * nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise.
629 * solib-darwin.c (darwin_solib_create_inferior_hook): New parameter
631 * solib-frv.c (frv_solib_create_inferior_hook): Likewise.
632 * solib-irix.c (irix_solib_create_inferior_hook): Likewise.
633 * solib-null.c (null_solib_create_inferior_hook): Likewise.
634 * solib-osf.c (osf_solib_create_inferior_hook): Likewise.
635 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
636 * solib-som.c (som_solib_create_inferior_hook): Likewise.
637 * solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty.
638 Pass it to svr4_so_ops.solib_create_inferior_hook.
639 * solib-sunos.c (sunos_solib_create_inferior_hook): New parameter
641 * solib-svr4.c (enable_break): New parameter from_tty. Pass it to
643 (svr4_solib_create_inferior_hook): New parameter from_tty. Pass it to
645 * solib-target.c (solib_target_solib_create_inferior_hook): New
647 * solib.c (solib_create_inferior_hook): New parameter from_tty. Pass
648 it to ops->solib_create_inferior_hook.
649 (reload_shared_libraries): Pass from_tty to solib_create_inferior_hook.
650 Move solib_add after solib_create_inferior_hook, call it now with
651 from_tty as 0. New comment there.
652 * solib.h (solib_create_inferior_hook): New parameter from_tty.
653 * solist.h (struct target_so_ops <solib_create_inferior_hook>):
656 2010-01-08 Vladimir Prus <vladimir@codesourcery.com>
659 * infrun.c (handle_inferior_event): Use get_thread_regcache
660 with events ptid, not get_current_regcache.
662 2009-01-08 Joel Brobecker <brobecker@adacore.com>
664 GDB crash with empty executable name (MinGW).
665 * source.c (openp): Add assert that parameter string is not NULL.
666 if parameter string is an empty string, then return with a failure
669 2009-01-08 Joel Brobecker <brobecker@adacore.com>
671 Get rid of support for VAX Floats.
672 * ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
673 (ada_vax_float_print_function): Delete.
674 * ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
675 (ada_vax_float_print_function): Delete.
676 * ada-typeprint.c (print_vax_floating_point_type): Delete.
677 (ada_print_type): Remove support for VAX floats.
678 * ada-valprint.c (ada_val_print_1): Remove support for VAX floats.
680 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
682 * stabsread.c (read_args): Handle zero arguments.
684 2009-01-08 Joel Brobecker <brobecker@adacore.com>
686 Cannot find in-tree libiconv.a after reconfigure.
687 * acinclude.m4 (AM_ICONV): If we find an in-tree libiconv.a
688 that we can use, then cache the path to this archive.
689 * configure: Regenerate.
691 2010-01-07 Stan Shebs <stan@codesourcery.com>
693 Make tracepoint operations go through target vector.
694 * target.h (enum trace_find_type): New enum.
695 (struct target_ops): New fields to_trace_init,
696 to_download_tracepoint, to_download_trace_state_variable,
697 to_trace_set_readonly_regions, to_trace_start, to_get_trace_status,
698 to_trace_stop, to_trace_find, to_get_trace_state_variable_value,
699 to_set_disconnected_tracing.
700 (target_trace_init): New macro.
701 (target_download_tracepoint): New macro.
702 (target_download_trace_state_variable): New macro.
703 (target_trace_start): New macro.
704 (target_trace_set_readonly_regions): New macro.
705 (target_get_trace_status): New macro.
706 (target_trace_stop): New macro.
707 (target_trace_find): New macro.
708 (target_get_trace_state_variable_value): New macro.
709 (target_set_disconnected_tracing): New macro.
710 * target.c (update_current_target): Inherit and set defaults for
711 tracepoint operations.
712 * tracepoint.c (default_collect): Make globally visible.
713 (target_is_remote): Remove, along with all calls.
714 (tvariables_info): Call target_get_trace_state_variable_value.
715 (remote_set_transparent_ranges): Remove.
716 (trace_start_command): Call target_trace_init,
717 target_download_tracepoint, etc.
718 (download_tracepoint): Remove.
719 (trace_stop_command): Simplify.
720 (stop_tracing): Call target_trace_stop.
721 (get_trace_status): Call target_get_trace_status.
722 (trace_status_command): Add case for targets that cannot trace.
723 (finish_tfind_command): Change to take numerical arguments, call
725 (trace_find_command): Update call to finish_tfind_command.
726 (trace_find_pc_command): Ditto.
727 (trace_find_tracepoint_command): Ditto.
728 (trace_find_line_command): Ditto.
729 (trace_find_range_command): Ditto.
730 (trace_find_outside_command): Ditto.
731 (set_disconnected_tracing_value): Call
732 target_set_disconnected_tracing.
733 * remote.c: Add protocol encoding bits from tracepoint.c.
734 (trace_error): Move from tracepoint.c.
735 (remote_get_noisy_reply): Ditto.
736 (free_actions_list_cleanup_wrapper): Ditto.
737 (free_actions_list): Ditto.
738 (remote_trace_init): New function.
739 (remote_download_tracepoint): New function.
740 (remote_download_trace_state_variable): New function.
741 (remote_trace_set_readonly_regions): New function.
742 (remote_trace_start): New function.
743 (remote_get_trace_status): New function.
744 (remote_trace_stop): New function.
745 (remote_trace_find): New function.
746 (remote_download_trace_state_variable): New function.
747 (remote_set_disconnected_tracing): New function.
748 (init_remote_ops): Add tracepoint operations.
750 * tracepoint.c (trace_dump_command): Don't decr_pc_after_break.
752 2010-01-07 Tristan Gingold <gingold@adacore.com>
754 * symfile.c (build_section_addr_info_from_objfile): New function.
755 (symbol_file_add_separate): Don't use offsets from objfile but
758 2010-01-06 Stan Shebs <stan@codesourcery.com>
760 Support disconnected tracing.
761 * infcmd.c (detach_command): Ask whether to stop tracing.
762 * cli/cli-cmds.c (quit_command): Ditto.
763 * breakpoint.h (struct breakpoint): New field number_on_target.
764 * breakpoint.c (create_tracepoint_from_upload): New function.
765 (get_tracepoint_by_number_on_target): New function.
766 * remote.c (struct remote): New field disconnected_tracing.
767 (remote_disconnected_tracing_feature): New function.
768 (remote_protocol_features): Add DisconnectedTracing.
769 (struct uploaded_tp): New struct.
770 (uploaded_tps): New global.
771 (get_uploaded_tp): New function.
772 (find_matching_tracepoint): New function.
773 (remote_get_tracing_state): New function.
774 (remote_start_remote): Call it.
775 * tracepoint.c (disconnected_tracing): New global.
776 (trace_start_command): Initialize number_on_target.
777 (stop_tracing): New function, split out from...
778 (trace_stop_command): Call stop_tracing.
779 (get_trace_status): New function, split out from...
780 (trace_status_command): Call get_trace_status, add info on
781 disconnection behavior.
782 (disconnect_or_stop_tracing): New function.
783 (finish_tfind_command): Translate from number on target.
784 (trace_find_tracepoint_command): Translate to number on target.
785 (send_disconnected_tracing_value): New function.
786 (set_disconnected_tracing): New function.
787 (_initialize_tracepoint): Add disconnected-tracing variable.
788 * NEWS: Mention disconnected tracing.
790 2010-01-06 Tristan Gingold <gingold@adacore.com>
792 * symtab.c (lookup_global_symbol_from_objfile): Rename objfile
793 parameter to main_objfile. Iterate on all separate debug objfiles.
794 * symfile.h (symbol_file_add_separate)
795 (find_separate_debug_file_by_debuglink): Remove parameter names.
796 * symfile.c (symbol_file_add_separate): Use add_separate_objfile.
797 (reread_symbols): Use free_objfile_separate_debug.
798 * objfiles.h (struct objfile): Add separate_debug_objfile_link.
800 (objfile_separate_debug_iterate, add_separate_debug_objfile)
801 (free_objfile_separate_debug): New prototypes.
802 * objfiles.c (objfile_separate_debug_iterate): New function.
803 (add_separate_debug_objfile, free_objfile_separate_debug): New
805 (free_objfile): Use free_objfile_separate_debug. Adjust for
806 multiple separate debug objfile.
807 (objfile_has_symbols): Adjust comment. Iterate on all separate
809 * minsyms.c (lookup_minimal_symbol): Adjust for multiple separate
811 (lookup_minimal_symbol_text): Ditto.
812 (lookup_minimal_symbol_by_pc_name): Ditto.
813 (lookup_minimal_symbol_solib_trampoline): Ditto.
814 (lookup_minimal_symbol_by_pc_section_1): Iterate on all separate
817 2010-01-05 Stan Shebs <stan@codesourcery.com>
819 Add fast tracepoints.
820 * arch-utils.h (default_fast_tracepoint_valid_at): Declare.
821 * arch-utils.c (default_fast_tracepoint_valid_at): New function.
822 * breakpoint.h (enum bptype): Add bp_fast_tracepoint.
823 * breakpoint.c (tracepoint_type): New function.
824 (ALL_TRACEPOINTS): Use it.
825 (should_be_inserted): Ditto.
826 (bpstat_check_location): Ditto.
827 (print_one_breakpoint_location): Ditto.
828 (user_settable_breakpoint): Ditto.
829 (set_breakpoint_location_function): Ditto.
830 (disable_breakpoints_in_shlibs): Ditto.
831 (delete_trace_command): Ditto.
832 (print_it_typical): Add bp_fast_tracepoint case.
833 (bpstat_what): Ditto.
834 (print_one_breakpoint_location): Ditto.
835 (allocate_bp_location): Ditto.
837 (breakpoint_re_set_one): Ditto.
838 (disable_command): Ditto.
839 (enable_command): Ditto.
840 (check_fast_tracepoint_sals): New function.
841 (break_command_really): Call it.
842 (ftrace_command): New function.
843 (_initialize_breakpoint): Add ftrace command.
844 * gdbarch.sh (fast_tracepoint_valid_at): New.
845 * gdbarch.h, gdbarch.c: Regenerate.
846 * i386-tdep.c (i386_fast_tracepoint_valid_at): New function.
847 (i386_gdbarch_init): Use it.
848 * remote.c (struct remote_state): New field fast_tracepoints.
849 (PACKET_FastTracepoints): New packet config type.
850 (remote_fast_tracepoint_feature): New function.
851 (remote_protocol_features): Add FastTracepoints.
852 (remote_supports_fast_tracepoints): New function.
853 (_initialize_remote): Add FastTracepoints.
854 * tracepoint.c (download_tracepoint): Add fast tracepoint option.
855 * NEWS: Mention fast tracepoints.
857 2010-01-06 Joel Brobecker <brobecker@adacore.com>
859 * gdb-gdb.py: New file.
861 2010-01-05 Michael Snyder <msnyder@vmware.com>
863 * infrun.c (handle_inferior_event): Fix typo in comment.
865 2010-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
867 * symfile.c (syms_from_objfile): Remove the !MAINLINE conditional.
869 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
871 * features/Makefile (WHICH): Add s390-linux32, s390-linux64,
873 (s390-linux32-expedite): Define.
874 (s390-linux64-expedite): Define.
875 (s390x-linux64-expedite): Define.
876 * features/s390-acr.xml: New file.
877 * features/s390-fpr.xml: New file.
878 * features/s390-core32.xml: New file.
879 * features/s390-core64.xml: New file.
880 * features/s390x-core64.xml: New file.
881 * features/s390-linux32.xml: New file.
882 * features/s390-linux64.xml: New file.
883 * features/s390x-linux64.xml: New file.
884 * features/s390-linux32.c: New generated file.
885 * features/s390-linux64.c: New generated file.
886 * features/s390x-linux64.c: New generated file.
888 * regformats/s390-linux32.dat: New generated file.
889 * regformats/s390-linux64.dat: New generated file.
890 * regformats/s390x-linux64.dat: New generated file.
891 * regformats/reg-s390.dat: Remove.
892 * regformats/reg-s390x.dat: Remove.
894 * s390-nat.c: Include "auxv.h" and <elf.h>.
895 (HWCAP_S390_HIGH_GPRS): Define if undefined.
896 (s390_target_wordsize): New function.
897 (s390_auxv_parse): Likewise.
898 (s390_get_hwcap): Likewise.
899 (s390_read_description): Likewise.
900 (_initialize_s390_nat): Install s390_auxv_parse and
901 s390_read_description.
903 * s390-tdep.c: Include "features/s390-linux32.c",
904 "features/s390-linux64.c", and "features/s390x-linux64.c".
905 (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
906 (s390_register_call_saved): New function.
907 (s390_register_name): Remove.
908 (s390_register_type): Remove.
909 (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
910 (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
911 (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
912 (s390_pseudo_register_name): New function.
913 (s390_pseudo_register_type): New function.
914 (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
915 Handle full GPR pesudos and varying pseudo register numbers.
916 (s390_pseudo_register_write): Likewise
917 (s390x_pseudo_register_read): Remove.
918 (s390x_pseudo_register_write): Likewise.
919 (s390_register_group): Remove.
920 (s390_pseudo_register_group): New function.
921 (s390_regmap_gregset): Add GPR upper halves.
922 (s390x_regmap_gregset): Likewise.
923 (s390_regmap_fpregset): Likewise.
924 (s390_regmap_upper): New global variable.
925 (s390_upper_regset): New global variable.
926 (s390_upper_regset_sections): New global variable.
927 (s390_regset_from_core_section): Handle GPR upper halves.
928 (s390_core_read_description): New function.
929 (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
930 register information. Handle varying pseudo register numbers.
931 (s390_backchain_frame_unwind_cache): Likewise.
932 (s390_frame_prev_register): Unwind full GPRs to show lower halves.
933 (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
934 (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
935 PC and CC pseudos. Unwind upper halves and full GPRs as appropriate.
936 Handle varying pseudo register numbers.
937 (s390_unwind_pc): Handle varying pseudo register numbers.
938 (s390_dwarf2_prev_register): New function.
939 (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
940 register information. Handle varying pseudo register numbers.
941 Install s390_dwarf2_prev_register to unwind full GPRs.
942 (s390_gdbarch_init): Handle target descriptions. Assign varying
943 pseudo register numbers. Install s390_adjust_frame_regnum.
944 (_initialize_s390_tdep): Initialize target descriptions.
946 * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
947 (S390_NUM_REGS): Redefine to include upper half registers.
948 (S390_PC_REGNUM, S390_CC_REGNUM): Remove.
949 (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
950 (tdesc_s390_linux32): Add declaration.
951 (tdesc_s390_linux64): Likewise.
952 (tdesc_s390x_linux64): Likewise.
954 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
956 * regset.h (struct core_regset_section): Add HUMAN_NAME.
957 * i386-linux-tdep.c (i386_linux_regset_sections): Fill in HUMAN_NAME.
958 * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections): Likewise.
959 (ppc_linux_vmx_regset_sections): Likewise.
960 (ppc_linux_fp_regset_sections): Likewise.
962 * corelow.c (get_core_register_section): Constify arguments.
963 (get_core_registers): Use gdbarch_core_regset_sections instead
964 of hard-coded platform-specific register section names.
966 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
968 * dwarf2loc.c (read_pieced_value): If a piece occupies part of
969 a register, assume the least-significant part is used.
970 (write_pieced_value): Likewise.
972 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
974 * printcmd.c: Include "arch-utils.h".
975 (do_one_display): Re-parse expression if current architecture changed.
977 2010-01-03 Jan Kratochvil <jan.kratochvil@redhat.com>
978 Joel Brobecker <brobecker@adacore.com>
980 * gdbtypes.c (check_typedef): New comment on type length.
981 * value.c (allocate_value_lazy): Remove the unused atype variable. New
982 comment on type length.
983 (value_primitive_field): Keep the original TYPE value, new comment.
985 2010-01-01 Jan Kratochvil <jan.kratochvil@redhat.com>
987 * cli/cli-script.c (process_next_line): Rename p1 as p_end and p2 as
988 p_start. Change != comparisons to > and < comparisons.
990 2010-01-01 Jan Kratochvil <jan.kratochvil@redhat.com>
992 * cli/cli-script.c (process_next_line): Check P2 overrun.
994 2009-01-01 Joel Brobecker <brobecker@adacore.com>
996 Update the copyright hearder to add year 2010 for most GDB files.
998 2009-01-01 Joel Brobecker <brobecker@adacore.com>
1000 Fix build failure in inf-ptrace.c.
1001 * inf-ptrace.c (inf_ptrace_follow_fork): Fix typo.
1003 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1005 * top.c (print_gdb_version): Update copyright year.
1007 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1009 Fix break *FUN'address thread NUM.
1010 * ada-lex.l (task): Expand rule to also match the thread keyword.
1012 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1014 Fix break *FUN'address task NUM.
1015 * ada-lex.l (task): New rule.
1016 * ada-lang.c (valid_task_id): Make sure the Ada task list has
1017 been built before using it.
1019 For older changes see ChangeLog-2009.
1025 version-control: never