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