* breakpoint.h (struct counted_command_line): Moved definition to
[binutils-gdb.git] / gdb / ChangeLog
1 2010-04-02 Pedro Alves <pedro@codesourcery.com>
2
3 * breakpoint.h (struct counted_command_line): Moved definition to
4 breakpoint.c, and forward declare.
5 (breakpoint_commands): Declare.
6 * breakpoint.c (struct counted_command_line): Moved here.
7 (breakpoint_commands): New.
8 * tracepoint.c (encode_actions): Use breakpoint_commands.
9 * remote.c (remote_download_tracepoint): Ditto.
10
11 2010-04-01 H.J. Lu <hongjiu.lu@intel.com>
12
13 * remote.c (remote_parse_stop_reply): Use hex_string instead
14 of phex_nz for error.
15
16 2010-04-01 Stan Shebs <stan@codesourcery.com>
17 Nathan Sidwell <nathan@codesourcery.com>
18
19 * tracepoint.h (enum actionline_type): Remove.
20 (validate_actionline): Change return to void.
21 * tracepoint.c (report_agent_reqs_errors): New function.
22 (validate_actionline): Call it, change return to void, report errors
23 more consistently.
24 (collect_symbol): Call report_agent_reqs_errors.
25 (encode_actions_1): Ditto.
26 (encode_actions): Don't expect a result from validate_actionline.
27
28 2010-04-01 Stan Shebs <stan@codesourcery.com>
29
30 * tracepoint.c (trace_start_command): Confirm if trace is running.
31 (trace_stop_command): Error if trace not running.
32
33 2010-04-01 H.J. Lu <hongjiu.lu@intel.com>
34
35 * amd64-tdep.c (amd64_byte_names): Add "ah", "bh", "ch", "dh".
36 (AMD64_NUM_LOWER_BYTE_REGS): New.
37 (amd64_pseudo_register_read): Handle "ah", "bh", "ch", "dh".
38 (amd64_pseudo_register_write): Likewise.
39 (amd64_init_abi): Set num_byte_regs to 20.
40
41 2010-04-01 Pedro Alves <pedro@codesourcery.com>
42
43 * breakpoint.c (multi_start, multi_end, last_was_multi): Delete.
44 (prev_breakpoint_count): New.
45 (set_breakpoint_count): Adjust.
46 (rbreak_start_breakpoint_count): New.
47 (start_rbreak_breakpoints): Adjust.
48 (end_rbreak_breakpoints): Adjust.
49 (struct commands_info) <arg>: New field.
50 (do_map_commands_command): Tweak output to include breakpoint spec
51 range.
52 (commands_command_1): Adjust. Avoid setting an xfree cleanup if
53 ARG was empty on entry. Set INFO's arg.
54 (create_breakpoint): Adjust.
55
56 * NEWS: Clarify `commands' changes.
57
58 2010-04-01 Pedro Alves <pedro@codesourcery.com>
59
60 * tracepoint.c: Include stack.h.
61 (struct add_local_symbols_data): New.
62 (do_collect_symbol): New.
63 (add_local_symbols): Rewrite using iterate_over_block_arg_vars and
64 iterate_over_block_local_vars.
65 * stack.c (print_block_frame_locals): Rewrite as ...
66 (iterate_over_block_locals): ... this. Take a callback function
67 pointer and generic data pointer, and call that instead of
68 print_variable_and_value.
69 (struct print_variable_and_value_data): New.
70 (do_print_variable_and_value): New.
71 (iterate_over_block_local_vars): New, abstracted out from
72 print_frame_local_vars.
73 (print_frame_local_vars): Rewrite using
74 iterate_over_block_local_vars.
75 (iterate_over_block_arg_vars): New, abstracted out from
76 print_frame_arg_vars.
77 (print_frame_arg_vars): Rewrite using iterate_over_block_arg_vars.
78 * stack.h (iterate_over_block_arg_local_vars_cb): New typedef.
79 (iterate_over_block_arg_vars, iterate_over_block_local_vars): Declare.
80
81 2010-03-31 Richard Earnshaw <rearnsha@arm.com>
82
83 * arm-tdep.c (thumb_get_next_pc_raw): Correctly detect TBH
84 instructions. Use the PC+4 if the base of the TBB or TBH is the
85 PC register.
86
87 2010-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
88
89 Fix crash on reading wrong function declaration DWARF.
90 * dwarf2read.c (read_subroutine_type): New variable void_type.
91 Pre-fill all TYPE_FIELD_TYPEs. Move nparams and iparams initialization
92 more close to their use.
93
94 2010-03-31 Stan Shebs <stan@codesourcery.com>
95
96 * breakpoint.c (tracepoint_save_command): Include variables,
97 conditionals, tracepoint types, and default-collect.
98 * tracepoint.c (save_trace_state_variables): New function.
99 * tracepoint.h (save_trace_state_variables): Declare it.
100
101 2010-03-31 Pierre Muller <muller@ics.u-strasbg.fr>
102
103 * src/gdb/remote.c (end_thread): ARI fix: Use xstrdup instead of
104 strdup.
105
106 2010-03-30 Keith Seitz <keiths@redhat.com>
107
108 * c-typeprint.c (c_type_print_args): Don't print "void"
109 for java, regardless of whether it is TYPE_PROTOTYPED.
110 Use the passed-in language instead of current_language.
111 (c_type_print_varspec_suffix): Use current_language instead
112 of assuming language_c.
113 * jv-typeprint.c (java_type_print_base): (bz 9320) Strip off
114 any return type specifier from the physname.
115
116 2010-03-30 Pedro Alves <pedro@codesourcery.com>
117
118 * tui/tui-interp.c (tui_is_toplevel): New.
119 (tui_init): Set it.
120 (tui_allowed_p): New.
121 * tui/tui.c (tui_enable): Check if the TUI is allowed before
122 enabling it.
123 * tui/tui.h (tui_allowed_p): Declare.
124
125 2010-03-30 Ozkan Sezer <sezeroz@gmail.com>
126
127 * serial.h: Include winsock2.h before windows.h.
128
129 2010-03-30 H.J. Lu <hongjiu.lu@intel.com>
130
131 * NEWS: Mention xmlRegisters= in qSupported packet.
132
133 * i386-tdep.c: Include "remote.h".
134 (_initialize_i386_tdep): Call register_remote_support_xml.
135
136 * remote.c (remote_support_xml): New.
137 (register_remote_support_xml): Likewise.
138 (remote_query_supported_append): Likewise.
139 (remote_query_supported): Support remote_support_xml.
140
141 * remote.h (register_remote_support_xml): New.
142
143 2010-03-29 Stan Shebs <stan@codesourcery.com>
144
145 * tracepoint.c (trace_find_line_command): Remove dead code.
146
147 * tracepoint.h (struct uploaded_string): New struct.
148 (struct uploaded_tp): New fields for source strings.
149 * breakpoint.c (this_utp, next_cmd): New globals.
150 (read_uploaded_action): New function.
151 (create_tracepoint_from_upload): Fill in more parts
152 of a tracepoint.
153 * tracepoint.c (encode_source_string): New function.
154 (trace_save): Write out source strings, fix error checks.
155 (parse_tracepoint_definition): Add source string parsing.
156 * remote.c (PACKET_TracepointSource): New packet type.
157 (remote_download_command_source): New function.
158 (remote_download_tracepoint): Download source pieces also.
159 (_initialize_remote): Add packet config command.
160
161 * tracepoint.c (collect_symbol): Send LOC_UNRESOLVED symbols to
162 expression handler.
163
164 * tracepoint.c (start_tracing): Check tracepoints before sending
165 commands to target, don't start if all tracepoints disabled.
166
167 2010-03-28 Pedro Alves <pedro@codesourcery.com>
168
169 * cli/cli-script.c (process_next_line): Handle 'stepping'.
170
171 2010-03-26 Stan Shebs <stan@codesourcery.com>
172
173 * tracepoint.c (disconnect_or_stop_tracing): Get out of tfind mode.
174
175 2010-03-26 Tom Tromey <tromey@redhat.com>
176
177 * breakpoint.c (commands_command_1): Duplicate 'arg'.
178
179 2010-03-26 Ulrich Weigand <uweigand@de.ibm.com>
180
181 * breakpoint.c (expand_line_sal_maybe): Always call skip_prologue_sal.
182 (skip_prologue_sal): Remove local definition.
183 (resolve_sal_pc): Remove now unnecessary code.
184 * linespec.c (minsym_found): Call skip_prologue_sal.
185 * symtab.c (find_function_start_pc): Remove.
186 (find_function_start_sal): Extract prologue skipping into ...
187 (skip_prologue_sal): ... this new function. Handle code both
188 with and without debug info. Respect SAL's explicit_pc and
189 explicit_line flags. Inline old find_function_start_pc.
190 * symtab.h (find_function_start_pc): Remove.
191 (skip_prologue_sal): Add prototype.
192
193 2010-03-26 Ulrich Weigand <uweigand@de.ibm.com>
194
195 * dwarf2read.c (read_func_scope): Also scan specification DIEs
196 for DW_TAG_imported_module children.
197
198 2010-03-26 Ulrich Weigand <uweigand@de.ibm.com>
199
200 * dwarf2read.c (dwarf2_name): Work around GCC bugzilla debug/41828 by
201 ignoring spurious DW_AT_name attributes for unnamed structs or unions.
202 * completer.c (add_struct_fields): Fix inverted logic.
203
204 2010-03-26 Ulrich Weigand <uweigand@de.ibm.com>
205
206 * breakpoint.c (bpstat_clear_actions): Reset bs->commands_left.
207
208 2010-03-26 Pedro Alves <pedro@codesourcery.com>
209
210 * tracepoint.c (current_trace_status): Don't make sure error_desc
211 is non-NULL here.
212 (parse_trace_status): Release a previous error_desc string, and
213 set it to NULL by default. If stop reason is tracepoint_error,
214 make sure error_desc is not left NULL.
215
216 2010-03-26 Pedro Alves <pedro@codesourcery.com>
217
218 * tracepoint.c (trace_save): Remove X from tracepoint error
219 description.
220
221 2010-03-26 Pedro Alves <pedro@codesourcery.com>
222
223 * tracepoint.c (parse_trace_status): Don't allow plain strings in
224 the terror description. Don't expect an X prefix.
225
226 2010-03-25 Stan Shebs <stan@codesourcery.com>
227
228 * tracepoint.h (trace_stop_reason): Add tracepoint_error.
229 (struct trace_status): New field error_desc.
230 * tracepoint.c (stop_reason_names): Add terror.
231 (current_trace_status): Ensure non-NULL error description.
232 (trace_status_command): Add error report.
233 (trace_status_mi): Ditto.
234 (trace_save): Add special case for error description.
235 (parse_trace_status): Add case for errors.
236
237 2010-03-25 Keith Seitz <keiths@redhat.com>
238
239 * dwarf2read.c (read_subroutine_type): If the compilation unit
240 language is Java, mark any formal parameter named "this" as
241 artificial (GCC/43521).
242 (dwarf2_name): Add special handling for Java constructors.
243
244 2010-03-25 Tom Tromey <tromey@redhat.com>
245
246 PR gdb/11327, PR gdb/11328, PR breakpoints/11368:
247 * infrun.c (handle_inferior_event): Change initialization of
248 stop_stack_dummy.
249 (handle_inferior_event): Change assignment to stop_stack_dummy.
250 (normal_stop): Update use of stop_stack_dummy.
251 (struct inferior_status) <stop_stack_dummy>: Change type.
252 * inferior.h (stop_stack_dummy): Update.
253 * infcmd.c (stop_stack_dummy): Change type.
254 * infcall.c (cleanup_delete_std_terminate_breakpoint): New
255 function.
256 (call_function_by_hand): Call set_std_terminate_breakpoint.
257 Rewrite std::terminate handling.
258 * breakpoint.h (enum bptype) <bp_std_terminate,
259 bp_std_terminate_master>: New.
260 (enum stop_stack_kind): New.
261 (struct bpstat_what) <call_dummy>: Change type.
262 (set_std_terminate_breakpoint, delete_std_terminate_breakpoint):
263 Declare.
264 * breakpoint.c (create_std_terminate_master_breakpoint): New
265 function.
266 (update_breakpoints_after_exec): Handle bp_std_terminate_master.
267 Call create_std_terminate_master_breakpoint.
268 (print_it_typical): Handle new breakpoint kinds.
269 (bpstat_stop_status): Handle bp_std_terminate_master.
270 (bpstat_what): Correctly set call_dummy field. Handle
271 bp_std_terminate_master and bp_std_terminate.
272 (print_one_breakpoint_location): Update.
273 (allocate_bp_location): Update.
274 (set_std_terminate_breakpoint): New function.
275 (delete_std_terminate_breakpoint): Likewise.
276 (create_thread_event_breakpoint): Update.
277 (delete_command): Update.
278 (breakpoint_re_set_one): Update.
279 (breakpoint_re_set): Call create_std_terminate_master_breakpoint.
280
281 2010-03-25 Jan Kratochvil <jan.kratochvil@redhat.com>
282
283 * symfile.c (build_section_addr_info_from_bfd): New.
284 (build_section_addr_info_from_objfile): Base it on
285 build_section_addr_info_from_bfd.
286 (addrs_section_compar, addrs_section_sort): New.
287 (addr_info_make_relative): New variables my_cleanup, abfd_addrs,
288 addrs_sorted, abfd_addrs_sorted and addrs_to_abfd_addrs. Build
289 addrs_to_abfd_addrs. Use it for recalculating ADDRS.
290
291 2010-03-24 Michael Snyder <msnyder@localhost.localdomain>
292
293 * elfread.c (find_separate_debug_file_by_buildid):
294 Remove unused local variable.
295
296 2010-03-24 Tom Tromey <tromey@redhat.com>
297
298 PR breakpoints/9352:
299 * NEWS: Mention changes to `commands' and `rbreak'.
300 * symtab.c (do_end_rbreak_breakpoints): New function.
301 (rbreak_command): Call start_rbreak_breakpoints; arrange to call
302 end_rbreak_breakpoints.
303 * breakpoint.c (breakpoint_count, tracepoint_count): Now static.
304 (set_breakpoint_count): Likewise. Clear last_was_multi.
305 (multi_start, multi_end, last_was_multi): New globals.
306 (start_rbreak_breakpoints, end_rbreak_breakpoints): New
307 functions.
308 (struct commands_info): New
309 (do_map_commands_command): New function.
310 (commands_command_1): New function.
311 (commands_command): Use it.
312 (commands_from_control_command): Likewise.
313 (do_delete_breakpoint): New function.
314 (delete_command): Use it.
315 (map_breakpoint_numbers): Add 'data' argument. Pass to callback.
316 (do_map_disable_breakpoint): New function.
317 (disable_command): Use it.
318 (do_map_enable_breakpoint): New function.
319 (enable_command): Use it.
320 (enable_once_breakpoint): Add argument.
321 (enable_once_command): Update.
322 (enable_delete_breakpoint): Add argument.
323 (enable_delete_command): Update.
324 (break_command_really): Set last_was_multi when needed.
325 (check_tracepoint_command): Fix formatting.
326 (validate_commands_for_breakpoint): New function.
327 (breakpoint_set_commands): Use it.
328 (tracepoint_save_command): Update.
329 * breakpoint.h (start_rbreak_breakpoints, end_rbreak_breakpoints):
330 Declare.
331
332 2010-03-24 Tom Tromey <tromey@redhat.com>
333
334 * breakpoint.h (struct counted_command_line): New struct.
335 (struct breakpoint) <commands>: Change type.
336 (struct bpstats) <commands>: Change type.
337 <commands_left>: New field.
338 * breakpoint.c (alloc_counted_command_line): New function.
339 (incref_counted_command_line): Likewise.
340 (decref_counted_command_line): Likewise.
341 (do_cleanup_counted_command_line): Likewise.
342 (make_cleanup_decref_counted_command_line): Likewise.
343 (breakpoint_set_commands): Use decref_counted_command_line and
344 alloc_counted_command_line.
345 (commands_command): Don't error if breakpoint commands are
346 executing.
347 (commands_from_control_command): Likewise.
348 (bpstat_free): Update.
349 (bpstat_copy): Likewise.
350 (bpstat_clear_actions): Likewise.
351 (bpstat_do_actions_1): Likewise.
352 (bpstat_stop_status): Likewise.
353 (print_one_breakpoint_location): Likewise.
354 (delete_breakpoint): Likewise.
355 (bpstat_alloc): Initialize new field.
356 (tracepoint_save_command): Update.
357 * tracepoint.c (encode_actions): Update.
358 (trace_dump_command): Update.
359
360 2010-03-24 Daniel Jacobowitz <dan@codesourcery.com>
361
362 * dwarf2-frame.c (dwarf2_frame_find_quirks): Use producer_is_realview.
363 * dwarf2read.c (load_full_comp_unit): Read DW_AT_producer.
364 (read_structure_type): For RealView, set TYPE_STUB on structures with
365 no byte size and no children.
366 (read_subroutine_type): Mark functions as prototyped by default.
367 * symtab.c (producer_is_realview): New function.
368 * symtab.h (expand_line_sal): Fix declaration formatting.
369 (producer_is_realview): Declare.
370
371 2010-03-24 Daniel Jacobowitz <dan@codesourcery.com>
372
373 * arm-tdep.c (skip_prologue_function): New function.
374 (submask, bit, bits, sbits, BranchDest): Move higher in the file.
375 (thumb_analyze_prologue): Document return value. Recognize more
376 Thumb instructions, skippable calls, and some Thumb-2 instructions.
377 Add debug output.
378 (arm_skip_prologue): Remove call dummy check. Check the prologue
379 for non-GNU compilers.
380 (arm_instruction_changes_pc): New function.
381 (arm_analyze_prologue): New function, broken out from
382 arm_scan_prologue. Recognize more ARM instructions and skippable
383 calls. Update comments. Handle NULL cache. Return the address
384 of the first unrecognized instruction. Do not skip past other
385 instructions which change control flow. Add debug output.
386 (arm_scan_prologue): Use arm_analyze_prologue.
387 (ARM_PC_32): Delete.
388 (shifted_reg_val): Simplify ARM_PC_32 check.
389
390 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
391
392 * tracepoint.c (tvariables_info_1): Actually compute
393 the number of rows in the result.
394
395 2010-03-24 Pedro Alves <pedro@codesourcery.com>
396
397 * remote.c (crc32): Constify `buf' parameter.
398 (remote_verify_memory): New, abstracted out from...
399 (compare_sections_command): ... this. Remove hardcoded target
400 checks.
401 (init_remote_ops): Install remote_verify_memory.
402 * target.c (target_verify_memory): New.
403 * target.h (struct target_ops) <to_verify_memory>: New field.
404 (target_verify_memory): Declare.
405
406 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
407
408 Implement -trace-save.
409
410 * mi-cmds.h (mi_cmds_trace_save): Declare.
411 * mi-cmds.c (mi_cmds): Register -trace-save.
412 * mi/mi-main.c (mi_cmd_trace_save): New.
413 * remote.c (remote_save_trace_data): Take const parameter.
414 * target.h (struct target_ops::to_save_trace_data): Take
415 const parameter.
416 * target.c (update_current_target): Adjust to the above.
417 * tracepoint.c (trave_save): New, extracted from
418 (trace_save_command): ...this.
419 (tfile_trace_find): Remove message that is unnecessary now
420 that 'tfind' reports found frame.
421 * tracepoint.h (trace_save): Declare.
422
423 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
424
425 Implement -trace-find.
426
427 * mi/mi-cmds.c (mi_cmds): Register -trace-find.
428 * mi/mi-cmds.h (mi_cmd_trace_find): Declare.
429 * mi/mi-main.c (mi_cmd_trace_find): New.
430 * target.h (struct target_ops): Document to_trace_find.
431 * tracepoint.h (tfind_1): Declare.
432 * tracepoint.c (finish_tfind_command): Rename to...
433 (tfind_1): ...this.
434 * remote.c (remote_trace_find): Return -1 if target say
435 there's no frame. Improve error diagnostics.
436
437 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
438
439 -trace-define-variable and -trace-list-variables.
440
441 * tracepoint.c (create_trace_state_variable): Make
442 private copy of name, as opposed to assuming the
443 pointer lives forever.
444 (tvariables_info_1): New.
445 (tvariables_info): Use the above.
446 * tracepoint.h (create_trace_state_variable, tvariables_info_1):
447 Declare.
448 * mi/mi-cmds.c (mi_cmds): Register -trace-define-variable
449 and -trace-list-variables.
450 * mi/mi-cmds.h (mi_cmd_trace_define_variable)
451 (mi_cmd_trace_list_variables): New.
452 * mi/mi-main.c (mi_cmd_trace_define_variable)
453 (mi_cmd_trace_list_variables): New.
454
455 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
456
457 Implement -break-passcount.
458
459 * mi/mi-cmd-break.c (mi_cmd_break_passcount): New.
460 * mi/mi-cmds.c (mi_cmds): Register -break-passcount.
461 * mi/mi-cmds.h (mi_cmd_break_passcount): Declare.
462
463 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
464
465 -trace-start/-trace-end/-trace-status.
466
467 * mi/mi-cmds.c (mi_cmds): Register -trace-start, -trace-status
468 and -trace-stop.
469 * mi/mi-cmds.h (mi_cmd_trace_start, mi_cmd_trace_status)
470 (mi_cmd_trace_stop): Declare.
471 * mi/mi-main.c (mi_cmd_trace_start, mi_cmd_trace_status)
472 (mi_cmd_trace_stop): New.
473 * tracepoint.c (start_tracing): New, extracted from...
474 (trace_start_command): ...this.
475 (trace_status_mi): New.
476 * tracepoint.h (struct trace_status): Document
477 stopping_tracepoint.
478 (start_tracing, stop_tracing, trace_status_mi): Declare.
479
480 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
481
482 Implement creating tracepoints with -break-insert.
483
484 * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle -a
485 to mean that tracepoint should be created.
486
487 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
488
489 * breakpoint.c (check_no_tracepoint_commands): Use
490 current spelling of 'teval'.
491
492 2010-03-24 Vladimir Prus <vladimir@codesourcery.com>
493
494 Unify actions and commands
495
496 * defs.h (read_command_lines, read_command_lines_1): New
497 parameters validator and closure.
498 * tracepoint.h (struct action_line): Remove.
499 * breakpoint.h (struct breakpoint): Remove the 'actions'
500 field.
501 * defs.h (enum command_control_type): New value
502 while_stepping_control.
503 (struct command_line): Add comments.
504 * breakpoint.c (breakoint_is_tracepoint): New.
505 (breakpoint_set_commands): For tracepoints,
506 verify the commands are permissible.
507 (check_tracepoint_commands): New.
508 (commands_command): Require that each new line is validated using
509 check_tracepoint_command, if we set commands for a tracepoint.
510 (create_tracepoint_from_upload): Likewise.
511 (print_one_breakpoint_location): Remove the code to print
512 actions specifically.
513 (tracepoint_save_command): Relay to print_command_lines.
514 * cli/cli-script.c (process_next_line): New parameters validator
515 and closure. Handle 'while-stepping'. Call validator if not null.
516 (read_command_lines, read_command_lines1): Likewise.
517 (recurse_read_control_structure): New parameters validator and
518 closure. Handle while_stepping_control.
519 (print_command_lines): Handle while-stepping.
520 (get_command_line, define_command, document_command): Adjust.
521 * remote.c (remote_download_tracepoint): Adjust.
522 * tracepoint.c (make_cleanup_free_actions, read_actions)
523 (free_actions, do_free_actions_cleanup): Remove.
524 (trace_actions_command): Use read_command_lines.
525 (validate_actionline): Use error in one place.
526 (encode_actions_1): New, extracted from...
527 (encode_actions): ...this. Also use cleanups for exception
528 safety.
529 (trace_dump_command): Adjust.
530 * mi/mi-cmd-break (mi_cmd_break_commands): Validate commands if
531 it's tracepoint.
532
533 2010-03-23 Mike Frysinger <vapier@gentoo.org>
534
535 * Makefile.in (OPCODES_CFLAGS): Add -I$(OPCODES_SRC)/..
536
537 2010-03-22 Stan Shebs <stan@codesourcery.com>
538
539 * value.c (value_static_field): Be lazy about the field's value.
540
541 2010-03-22 Reid Kleckner <reid@kleckner.net>
542
543 PR gdb/11094
544 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Add
545 bp_jit_event.
546 (disable_breakpoints_in_shlibs): Likewise.
547
548 2010-03-22 Ulrich Weigand <uweigand@de.ibm.com>
549
550 * dwarf2read.c (partial_die_parent_scope): Work around buggy
551 GCC 4.1 debug info generation (GCC PR c++/28460).
552 (determine_prefix): Likewise.
553
554 2010-03-20 Daniel Jacobowitz <dan@codesourcery.com>
555
556 * tui/tui-disasm.c (tui_get_begin_asm_address): Default to
557 get_current_arch.
558 * tui/tui-layout.c (extract_display_start_addr): Likewise.
559
560 2010-03-19 Stan Shebs <stan@codesourcery.com>
561
562 * ax-gdb.c (gen_fetch): Handle bool.
563 (gen_usual_unary): Ditto.
564 (gen_cast): Ditto.
565 (gen_equal): New function.
566 (gen_less): New function.
567 (gen_expr_binop_rest): Call them, also return integer type from
568 logical operations.
569 (gen_expr): Ditto.
570
571 2010-03-19 Tom Tromey <tromey@redhat.com>
572
573 * jv-lang.c (jv_dynamics_objfile_data_key)
574 (jv_type_objfile_data_key): New globals.
575 (class_symtab): Move earlier.
576 (jv_per_objfile_free): New function.
577 (get_dynamics_objfile): Call set_objfile_data. Add 'gdbarch'
578 parameter.
579 Remove ancient #if 1.
580 (add_class_symbol): Remove redundant declaration.
581 (java_lookup_class): Use alloc_type, not alloc_type_arch.
582 (java_link_class_type): Mark as static. Update.
583 (jv_clear_object_type): New function.
584 (set_java_object_type): Likewise.
585 (get_java_object_type): Use set_java_object_type.
586 (is_object_type): Likewise.
587 (_initialize_java_language): Register new objfile keys.
588 (get_java_class_symtab): Add 'gdbarch' parameter.
589 (add_class_symtab_symbol): Update.
590 (type_from_class): Update.
591
592 2010-03-19 Stan Shebs <stan@codesourcery.com>
593
594 * ax-general.c (ax_const_l): Fix a sizing bug.
595
596 2010-03-18 Joel Brobecker <brobecker@adacore.com>
597
598 GDB 7.1 released.
599
600 2010-03-18 Stan Shebs <stan@codesourcery.com>
601 Pedro Alves <pedro@codesourcery.com>
602
603 * target.h (struct target_ops): New method
604 to_set_circular_trace_buffer.
605 (target_set_circular_trace_buffer): New macro.
606 * target.c (update_current_target): Add
607 to_set_circular_trace_buffer, fix to_set_disconnected_tracing
608 default behavior.
609 * remote.c (remote_set_circular_trace_buffer): New function.
610 (init_remote_ops): Add it to vector.
611 * tracepoint.h (struct trace_status): New field traceframes_created,
612 change buffer_size and buffer_free to int.
613 * tracepoint.c (circular_trace_buffer): New global.
614 (start_tracing): Send values of disconnected tracing and circular
615 trace buffer settings.
616 (set_circular_trace_buffer): New function.
617 (parse_trace_state): Handle total space and frames created.
618 (trace_status_command): Display total space and total frames
619 created.
620 (trace_save): Write out new status values.
621 (parse_trace_status): Set traceframe_count, traceframes_created,
622 buffer_free and buffer_size to -1 by default.
623 (_initialize_tracepoint): New setshow for circular-trace-buffer.
624 * NEWS: Mention the circular trace buffer option.
625
626 2010-03-18 Tom Tromey <tromey@redhat.com>
627
628 * infcmd.c (finish_command_continuation): Wrap print_return_value
629 in TRY_CATCH.
630
631 2010-03-18 Joel Brobecker <brobecker@adacore.com>
632
633 * dwarf2read.c (add_partial_subprogram): Make sure the subprogram
634 DIE has a name before creating the associated partial symbol.
635 (read_func_scope): Emit a complaint if the subprogram does not
636 have a name or when we can't extract the subprogram PC bounds.
637
638 2010-03-18 Ulrich Weigand <uweigand@de.ibm.com>
639
640 * mi/mi-main.c (mi_cmd_list_thread_groups): Use get_current_arch
641 instead of selected frame architecture.
642
643 2010-03-18 Pedro Alves <pedro@codesourcery.com>
644
645 * infcmd.c (until_command): Use ERROR_NO_INFERIOR. Ensure there's
646 a valid selected thread, and that it is not running.
647 (advance_command): Ditto.
648 (finish_command): Ditto.
649
650 2010-03-17 Stan Shebs <stan@codesourcery.com>
651
652 * ax-gdb.c (require_rvalue): Disallow non-scalars.
653
654 * infcall.c: Include tracepoint.h.
655 (call_function_by_hand): Disallow calls in tfind mode.
656 * infcmd.c: Include tracepoint.h.
657 (ensure_not_tfind_mode): New function.
658 (continue_1): Call it.
659 (step_1) Ditto.
660 (jump_command): Ditto.
661 (signal_command): Ditto.
662 (advance_command): Ditto.
663 (until_command): Ditto.
664 (finish_command): Ditto.
665 * tracepoint.h (disconnect_or_stop_tracing): Declare.
666
667 * ax-gdb.h (struct axs_value): New field optimized_out.
668 (gen_trace_for_var): Add gdbarch argument.
669 * ax-gdb.c (gen_trace_static_fields): New function.
670 (gen_traced_pop): Call it, add gdbarch argument.
671 (gen_trace_for_expr): Update call to it.
672 (gen_trace_for_var): Ditto, and report optimized-out variables.
673 (gen_struct_ref_recursive): Check for optimized-out value.
674 (gen_struct_elt_for_reference): Ditto.
675 (gen_static_field): Pass gdbarch instead of expression, assume
676 optimization if field not found.
677 (gen_var_ref): Set the optimized_out flag.
678 (gen_expr): Error on optimized-out variable.
679 * tracepoint.c (collect_symbol): Handle struct-valued vars as
680 expressions, skip optimized-out variables with computed locations.
681 * dwarf2loc.c (dwarf2_tracepoint_var_ref): Flag instead of
682 erroring out if location expression missing.
683 (loclist_tracepoint_var_ref): Don't error out here.
684
685 2010-03-17 Tom Tromey <tromey@redhat.com>
686
687 * dwarf2read.c (dwarf2_get_section_info): Handle case where no
688 DWARF data is available.
689
690 2010-03-17 Daniel Jacobowitz <dan@codesourcery.com>
691
692 * symfile.c (generic_load): Reset breakpoints after loading.
693
694 2010-03-17 Tom Tromey <tromey@redhat.com>
695
696 * linux-nat.c (linux_nat_detach): Check debug_linux_nat.
697
698 2010-03-17 Jan Kratochvil <jan.kratochvil@redhat.com>
699
700 * spu-tdep.c (spu_catch_start): Replace set_breakpoint call with the
701 create_breakpoint call, adjust the parameters.
702
703 2010-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
704 Chandru <chandru@in.ibm.com>
705
706 * dwarf2read.c (read_subrange_type): Set TYPE_HIGH_BOUND_UNDEFINED.
707 * valarith.c (value_subscripted_rvalue): Suppress error if
708 TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
709
710 2010-03-16 Holger Hans Peter Freyther <zecke@selfish.org>
711
712 * linux-record.c (record_linux_msghdr): Remove unintended semicolons.
713
714 2010-03-16 Joel Brobecker <brobecker@adacore.com>
715
716 * ada-tasks.c (task_command_1): Check that the task ptid is valid
717 before doing the associated thread switch.
718
719 2010-03-16 Daniel Jacobowitz <dan@codesourcery.com>
720
721 * MAINTAINERS: Update my email address.
722
723 2010-03-16 Vladimir Prus <vladimir@codesourcery.com>
724
725 Simplify MI breakpoint setting.
726
727 * breakpoint.c (break_command_really): Make nonstatic and
728 rename to...
729 (create_breakpoint): ...this. Rename prior function by this name
730 to...
731 (create_breakpoint_sal): ...this.
732 (create_breakpoints): Rename to...
733 (create_breakpoints_sal): ...this.
734 (set_breakpoint): Remove.
735 * breakpoint.h: Adjust to above changes.
736 * mi/mi-cmd-break.c (mi_cmd_break_insert): Simplify.
737
738 2010-03-15 Stan Shebs <stan@codesourcery.com>
739
740 * ax-gdb.c: Include cp-support.h.
741 (find_field): Remove.
742 (gen_primitive_field): New function.
743 (gen_struct_ref_recursive): New function.
744 (gen_struct_ref): Rewrite to call gen_struct_ref_recursive instead
745 of find_field.
746 (gen_static_field): New function.
747 (gen_struct_elt_for_reference): New.
748 (gen_namespace_elt): New.
749 (gen_maybe_namespace_elt): New.
750 (gen_aggregate_elt_ref): New.
751 (gen_expr): Add OP_SCOPE, display opcode name in error message.
752
753 2010-03-15 Tom Tromey <tromey@redhat.com>
754
755 * dwarf2read.c (die_needs_namespace): Also return 0 for
756 DW_TAG_subprogram.
757
758 2010-03-15 Sami Wagiaalla <swagiaal@redhat.com>
759
760 PR c++/7936:
761 * cp-support.h: Added char *declaration element to using_direct
762 data struct.
763 (cp_add_using): Added char *declaration argument.
764 (cp_add_using_directive): Ditto.
765 (cp_lookup_symbol_imports): made extern.
766 * cp-namespace.c: Updated with the above changes.
767 * dwarf2read.c (read_import_statement): Ditto.
768 (read_namespace): Ditto.
769 (read_import_statement): Support import declarations.
770 * cp-namespace.c (cp_lookup_symbol_imports): Check for imported
771 declarations.
772 Added support for 'declaration_only' search.
773 (cp_lookup_symbol_namespace): Attempt to search for the name as
774 is before consideration of imports.
775 * symtab.c (lookup_symbol_aux_local): Added a 'declaration_only'
776 search at every block level search.
777 Now takes language argument.
778 (lookup_symbol_aux): Updated.
779
780 2010-03-15 Tom Tromey <tromey@redhat.com>
781
782 * c-exp.y (name_not_typename): Add 'operator' clause.
783
784 2010-03-15 Ralf Corsepius <ralf.corsepius@rtems.org> (tiny change)
785
786 * configure.ac: Exit if ${gdb_target_obs}" is not set.
787 * configure: Regenerate.
788
789 2010-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
790
791 * symfile.c (addr_info_make_relative): Ignore also missing ".dynbss"
792 and ".sdynbss". Update the comment.
793
794 2010-03-15 Jie Zhang <jie@codesourcery.com>
795
796 * MAINTAINERS: Update my email address.
797
798 2010-03-14 Daniel Jacobowitz <dan@codesourcery.com>
799
800 * gdbtypes.h (TYPE_IS_OPAQUE): Correct HAVE_CPLUS_STRUCT check.
801
802 2010-03-14 Daniel Jacobowitz <dan@codesourcery.com>
803
804 * charset.c [USE_WIN32API]: Include <windows.h>.
805 (_initialize_charset): Correct type of w32_host_default_charset.
806
807 2010-03-14 Pedro Alves <pedro@codesourcery.com>
808
809 * infrun.c (ptid_match): Don't assert that PTID is not a pid ptid.
810
811 2010-03-12 Tom Tromey <tromey@redhat.com>
812
813 PR c++/9708:
814 * dwarf2read.c (die_needs_namespace) <DW_TAG_variable>: A variable
815 in a lexical block does not need a namespace.
816 (new_symbol) <DW_TAG_variable>: Put extern variables on
817 list_in_scope in all cases.
818
819 2010-03-12 Stan Shebs <stan@codesourcery.com>
820
821 * ax-gdb.c (gen_expr): Add shift expressions.
822 (gen_expr_binop_rest): Ditto.
823
824 2010-03-12 Sami Wagiaalla <swagiaal@redhat.com>
825
826 * buildsym.c (finish_block): Reset using_directives pointer
827 after block initialization.
828
829 2010-03-12 H.J. Lu <hongjiu.lu@intel.com>
830
831 * amd64-tdep.c (amd64_word_names): Replace "sp" with "".
832 * i386-tdep.c (i386_word_names): Likewise.
833
834 2010-03-12 Pedro Alves <pedro@codesourcery.com>
835
836 * target.c (memory_xfer_partial): Don't use the stack cache if
837 inspecting trace frames.
838 * tracepoint.c (finish_tfind_command): Invalidate the target
839 dcache.
840
841 2010-03-11 Jan Kratochvil <jan.kratochvil@redhat.com>
842
843 * solib-svr4.c (LM_ADDR_CHECK) <info_verbose>: Use printf_unfiltered
844 for the PIC displacement, print also the displacement value.
845 (svr4_exec_displacement): Print DISPLACEMENT if INFO_VERBOSE.
846
847 2010-03-10 Kevin Buettner <kevinb@redhat.com>
848
849 * remote-mips.c (close_ports, mips_initialize_cleanups)
850 (mips_exit_cleanups, mips_send_command, mips_open, pmon_open)
851 (ddb_open, lsi_open, mips_remove_breakpoint, mips_remove_watchpoint)
852 (mips_stopped_by_watchpoint, send_srec, pmon_checkset)
853 (pmon_make_fastrec, pmon_check_ack, mips_expect_download)
854 (pmon_check_entry_address, pmon_check_total, pmon_end_download)
855 (pmon_download, pmon_load_fast, _initialize_remote_mips): Add
856 comments describing each of these functions.
857 (mips_enter_debug, mips_exit_debug, common_open)
858 (mips_signal_from_protocol, pmon_makeb64, pmon_zeroset): Add
859 blank line after the comment describing the function.
860
861 2010-03-10 Jan Kratochvil <jan.kratochvil@redhat.com>
862
863 * solib-svr4.c (svr4_exec_displacement): Return now success, new
864 parameter displacementp. Update comment.
865 (svr4_relocate_main_executable): Return if non-zero SECTION_OFFSETS
866 element exists. Return if svr4_exec_displacement was not successful.
867 Update comment.
868
869 2010-03-10 Jan Kratochvil <jan.kratochvil@redhat.com>
870 Daniel Jacobowitz <dan@codesourcery.com>
871
872 * solib-svr4.c (read_program_header): Support type == -1 to read
873 all program headers.
874 (read_program_headers_from_bfd): New function.
875 (svr4_static_exec_displacement): Remove and move the comment ...
876 (svr4_exec_displacement): ... here. Remove variable found. New
877 variable displacement. Check also DYNAMIC. Verify DISPLACEMENT
878 alignment for ELF targets. Compare target vs. exec_bfd PHDRs for ELF
879 targets using read_program_headers_from_bfd. Remove the call of
880 svr4_static_exec_displacement.
881
882 2010-03-10 Tom Tromey <tromey@redhat.com>
883
884 * dwarf2read.c (struct pubnames_header): Remove.
885 (_PUBNAMES_HEADER): Remove.
886 (_ACTUAL_PUBNAMES_HEADER_SIZE): Remove.
887 (struct aranges_header): Remove.
888 (_ARANGES_HEADER, _ACTUAL_ARANGES_HEADER_SIZE): Remove.
889 (struct dwarf2_per_objfile) <pubnames, aranges>: Remove.
890 (PUBNAMES_SECTION): Remove.
891 (ARANGES_SECTION): Remove.
892 (dwarf2_locate_sections): Don't handle pubnames or aranges.
893 (dwarf2_build_psymtabs): Remove dead code.
894 (dwarf2_build_psymtabs_easy): Remove.
895
896 2010-03-10 Tom Tromey <tromey@redhat.com>
897
898 * elfread.c (elf_symfile_read): Don't call
899 dwarf2_build_frame_info.
900 * dwarf2read.c (struct dwarf2_section_info) <readin>: New field.
901 (struct dwarf2_per_objfile) <objfile>: New field.
902 (dwarf2_has_info): Now idempotent. Set objfile field.
903 (dwarf2_read_section): Check and set readin field. Call
904 posix_madvise.
905 (dwarf2_build_psymtabs): Don't read all sections.
906 (read_type_comp_unit_head): Read types section.
907 (create_debug_types_hash_table): Likewise.
908 (init_cu_die_reader): Add asserts.
909 (process_type_comp_unit): Add assert.
910 (dwarf2_build_psymtabs_hard): Read info section.
911 (load_partial_comp_unit): Add assert.
912 (create_all_comp_units): Read info section.
913 (load_full_comp_unit): Likewise.
914 (dwarf2_ranges_read): Read ranges section.
915 (dwarf2_record_block_ranges): Add assert.
916 (dwarf2_read_abbrevs): Read abbrev section.
917 (read_indirect_string): Read str section.
918 (dwarf_decode_line_header): Read line section.
919 (read_signatured_type_at_offset): Read types section.
920 (dwarf_decode_macros): Read macinfo section.
921 (dwarf2_symbol_mark_computed): Read loc section.
922 * dwarf2-frame.c (dwarf2_frame_find_fde): Call
923 dwarf2_build_frame_info.
924 (dwarf2_build_frame_info): Unconditionally set
925 dwarf2_frame_objfile_data on the objfile.
926 * configure.ac: Check for posix_madvise.
927 * config.in, configure: Rebuild.
928
929 2010-03-10 Tom Tromey <tromey@redhat.com>
930
931 * xcoffread.c (xcoff_start_psymtab): Update.
932 (xcoff_end_psymtab): Update.
933 * psymtab.c (allocate_psymtab): Remove dead code.
934 * psympriv.h (struct partial_symtab) <read_symtab_private>: Now
935 void*.
936 * mdebugread.c (parse_partial_symbols): Update.
937 (new_psymtab): Likewise.
938 * dwarf2read.c (process_psymtab_comp_unit): Update.
939 (psymtab_to_symtab_1): Update.
940 * dbxread.c (start_psymtab): Update.
941 (end_psymtab): Likewise.
942
943 2010-03-10 Tom Tromey <tromey@redhat.com>
944
945 * xcoffread.c: Include psymtab.h.
946 (xcoff_sym_fns): Update.
947 * symtab.h (struct partial_symbol): Remove.
948 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.
949 (struct partial_symtab): Remove.
950 (PSYMTAB_TO_SYMTAB): Remove.
951 (lookup_partial_symbol, lookup_partial_symtab, find_pc_psymtab)
952 (find_pc_sect_psymtab): Remove.
953 (find_pc_sect_symtab_via_partial): Declare.
954 (find_pc_psymtab, find_pc_sect_psymbol, psymtab_to_symtab)
955 (find_main_psymtab): Remove.
956 (find_main_filename): Declare.
957 (fixup_psymbol_section): Remove.
958 (fixup_section): Declare.
959 * symtab.c: Include psymtab.h.
960 (lookup_symtab): Use lookup_symtab method.
961 (lookup_partial_symtab): Remove.
962 (find_pc_sect_psymtab_closer): Remove.
963 (find_pc_sect_psymtab): Remove.
964 (find_pc_sect_symtab_via_partial): New function.
965 (find_pc_psymtab, find_pc_sect_psymbol, find_pc_psymbol): Remove.
966 (fixup_section): No longer static.
967 (fixup_psymbol_section): Remove.
968 (lookup_symbol_aux): Use lookup_symbol_aux_quick.
969 (lookup_global_symbol_from_objfile): Likewise.
970 (lookup_symbol_aux_psymtabs): Remove.
971 (lookup_symbol_aux_quick): New function.
972 (lookup_symbol_global): Use lookup_symbol_aux_quick.
973 (lookup_partial_symbol): Remove.
974 (basic_lookup_transparent_type_quick): New function.
975 (basic_lookup_transparent_type): Use it.
976 (find_main_psymtab): Remove.
977 (find_main_filename): New function.
978 (find_pc_sect_symtab): Use find_pc_sect_symtab method.
979 (find_line_symtab): Use expand_symtabs_with_filename method.
980 (output_partial_symbol_filename): New function.
981 (sources_info): Use map_partial_symbol_filenames.
982 (struct search_symbols_data): New type.
983 (search_symbols_file_matches): New function.
984 (search_symbols_name_matches): Likewise.
985 (search_symbols): Use expand_symtabs_matching method.
986 (struct add_name_data): Rename from add_macro_name_data.
987 (add_macro_name): Update.
988 (add_partial_symbol_name): New function.
989 (default_make_symbol_completion_list): Use
990 map_partial_symbol_names.
991 (struct add_partial_symbol_name): New type.
992 (maybe_add_partial_symtab_filename): New function.
993 (make_source_files_completion_list): Use
994 map_partial_symbol_filenames.
995 (expand_line_sal): Use expand_symtabs_with_filename method.
996 * symmisc.c: Include psymtab.h.
997 (print_objfile_statistics): Use print_stats method.
998 (dump_objfile): Use dump method.
999 (dump_psymtab, maintenance_print_psymbols)
1000 (maintenance_info_psymtabs, maintenance_check_symtabs)
1001 (extend_psymbol_list): Remove.
1002 * symfile.h (struct quick_symbol_functions): New struct.
1003 (struct sym_fns) <qf>: New field.
1004 (sort_pst_symbols): Remove.
1005 (increment_reading_symtab): Declare.
1006 * symfile.c: Include psymtab.h.
1007 (compare_psymbols, sort_pst_symbols): Remove.
1008 (psymtab_to_symtab): Remove.
1009 (increment_reading_symtab): New function.
1010 (symbol_file_add_with_addrs_or_offsets): Use expand_all_symtabs
1011 method.
1012 (set_initial_language): Use find_main_filename.
1013 (allocate_psymtab, discard_psymtab, cashier_psymtab): Remove.
1014 (free_named_symtabs): Remove unused code.
1015 (start_psymtab_common, add_psymbol_to_bcache)
1016 (append_psymbol_to_list, add_psymbol_to_list, init_psymbol_list):
1017 Remove.
1018 * stack.c: Include psymtab.h, symfile.h.
1019 (backtrace_command_1): Use find_pc_sect_symtab_via_partial.
1020 * source.h (psymtab_to_fullname): Don't declare.
1021 * source.c: Include psymtab.h.
1022 (select_source_symtab): Use find_last_source_symtab method.
1023 (forget_cached_source_info): Use forget_cached_source_info
1024 method.
1025 (find_and_open_source): No longer static.
1026 (psymtab_to_fullname): Remove.
1027 * somread.c: Include psymtab.h.
1028 (som_sym_fns): Update.
1029 * psympriv.h: New file.
1030 * psymtab.h: New file.
1031 * psymtab.c: New file.
1032 * objfiles.h: (ALL_OBJFILE_PSYMTABS): Remove.
1033 (ALL_PSYMTABS, ALL_PSPACE_PSYMTABS): Likewise.
1034 * objfiles.c: Include psymtab.h.
1035 (objfile_relocate1): Use relocate method.
1036 (objfile_has_partial_symbols): Use has_symbols method.
1037 * mipsread.c: Include psymtab.h.
1038 (ecoff_sym_fns): Update.
1039 * mi/mi-cmd-file.c: Include psymtab.h.
1040 (print_partial_file_name): New function.
1041 (mi_cmd_file_list_exec_source_files): Use
1042 map_partial_symbol_filenames.
1043 * mdebugread.c: Include psympriv.h.
1044 * machoread.c: Include psympriv.h.
1045 (macho_sym_fns): Update.
1046 * m2-exp.y (yylex): Use lookup_symtab.
1047 * elfread.c: Include psympriv.h.
1048 (elf_sym_fns): Update.
1049 * dwarf2read.c: Include psympriv.h.
1050 * dbxread.c: Include psympriv.h.
1051 (aout_sym_fns): Update.
1052 * cp-support.c: Include psymtab.h.
1053 (read_in_psymtabs): Remove.
1054 (make_symbol_overload_list_qualified): Use
1055 expand_symtabs_for_function method.
1056 * coffread.c: Include psympriv.h.
1057 (coff_sym_fns): Update.
1058 * blockframe.c: Include psymtab.h.
1059 (find_pc_partial_function): Use find_pc_sect_symtab method.
1060 * ada-lang.h (ada_update_initial_language): Update.
1061 * ada-lang.c: Include psymtab.h.
1062 (ada_update_initial_language): Remove 'main_pst' argument.
1063 (ada_lookup_partial_symbol): Remove.
1064 (struct ada_psym_data): New type.
1065 (ada_add_psyms): New function.
1066 (ada_add_non_local_symbols): Use map_ada_symtabs method.
1067 (struct add_partial_datum): New type.
1068 (ada_add_partial_symbol_completions): New function.
1069 (ada_make_symbol_completion_list): Use map_partial_symbol_names.
1070 (ada_exception_support_info_sniffer): Update.
1071 * Makefile.in (SFILES): Add psymtab.c.
1072 (COMMON_OBS): Add psymtab.o.
1073 (HFILES_NO_SRCDIR): Add psymtab.h, psympriv.h.
1074
1075 2010-03-10 Pierre Muller <muller@ics.u-strasbg.fr>
1076
1077 * remote-fileio.c (cygwin_conv_path): Define macro for old cygwin API.
1078
1079 2010-03-10 Sami Wagiaalla <swagiaal@redhat.com>
1080
1081 PR C++/11236:
1082 * cp-namespace.c (cp_add_using): Deleted.
1083 (cp_add_using_directive): Use obstack allocations.
1084 Merged the function cp_add_using into this one.
1085 Added 'struct obstack *' argument.
1086 (cp_scan_for_anonymous_namespaces): Updated.
1087 * cp-support.h: Updated.
1088 * dwarf2read.c (read_import_statement): Updated.
1089 (read_namespace): Updated.
1090
1091 2010-03-10 Pierre Muller <muller@ics.u-strasbg.fr>
1092
1093 * windows-nat.c (cygwin_conv_path): Remove old macro.
1094
1095 2010-03-10 Pedro Alves <pedro@codesourcery.com>
1096
1097 * breakpoint.c (condition_command): Handle watchpoint conditions.
1098 (is_hardware_watchpoint): Add comment.
1099 (is_watchpoint): New.
1100 (update_watchpoint): Don't reparse the watchpoint's condition
1101 unless necessary.
1102 (WP_IGNORE): New.
1103 (watchpoint_check): Use it.
1104 (bpstat_check_watchpoint): Handle it.
1105 (bpstat_check_breakpoint_conditions): Evaluate watchpoint local
1106 conditions in a frame where it makes sense.
1107 (watch_command_1): Store the innermost block of the condition
1108 expression.
1109 (delete_breakpoint): Delete the watchpoint condition expression.
1110 * breakpoint.h (struct bp_location) <cond>: Update comment.
1111 (struct breakpoint): New field `cond_exp_valid_block'.
1112
1113 2010-03-09 Joel Brobecker <brobecker@adacore.com>
1114
1115 Adjust handling of Ada DIEs after dwarf2_physname patch.
1116 * dwarf2read.c (dwarf2_compute_name): Add handling of Ada DIEs.
1117
1118 2010-03-09 Christopher Faylor <me+cygwin@cgf.cx>
1119 Pierre Muller <muller@ics.u-strasbg.fr>
1120
1121 * windows-nat.c (cygwin_conv_path): Redefine to properly convert
1122 from/to posix/win32.
1123 (windows_make_so): Use non-Cygwin 1.7 specific function.
1124 (windows_create_inferior): Make sure that cygallargs points to
1125 original args in non Cygwin 1.7. case.
1126
1127 2010-03-09 Michael Snyder <msnyder@vmware.com>
1128
1129 * i386-tdep.c (i386_record_lea_modrm_addr): Use extract_signed_int
1130 after target_read_memory to get host byte order.
1131 (i386_process_record): Ditto.
1132
1133 2010-03-09 Keith Seitz <keiths@redhat.com>
1134
1135 Based on work from Daniel Jacobowitz <dan@codesourcery.com>
1136 * c-typeprint.c (cp_type_print_method_args): For non-static methods,
1137 print out const or volatile qualifiers, too.
1138 (c_type_print_args): Add parameters show_artificial and language.
1139 Skip artificial parameters when requested.
1140 Use the appropriate language printer.
1141 (c_type_print_varspec): Tell c_type_print_args to skip artificial
1142 parameters and pass language_c.
1143 * dwarf2read.c (die_list): New file global.
1144 (struct partial_die_info): Update comments for name field.
1145 (pdi_needs_namespace): Renamed to ...
1146 (die_needs_namespace): ... this. Rewrite.
1147 (dwarf2_linkage_name): Remove.
1148 (add_partial_symbol): Do not predicate the call to
1149 partial_die_full_name based on pdi_needs_namespace.
1150 Remove call to cp_check_possible_namespace_symbols and associated
1151 outdated comments.
1152 (guess_structure_name): Do not inspect child subprogram DIEs.
1153 (dwarf2_fullname): Update comments.
1154 Use die_needs_namespace to assist in computing the name.
1155 (read_func_scope): Use dwarf2_name to get the DIE's name.
1156 Use dwarf2_physname to get the "linkage name" of the DIE.
1157 (dwarf2_add_member_field): Use dwarf2_physname instead of
1158 dwarf2_linkage_name.
1159 (read_structure_type): For structs and classes, set TYPE_NAME, too.
1160 (determine_class): Remove.
1161 (read_partial_die): Ignore DW_AT_MIPS_linkage_name for all languages
1162 except Ada.
1163 (new_symbol): Unconditionally call dwarf2_name.
1164 Compute the "linkage name" using dwarf2_physname.
1165 Use dwarf2_name instead of dwarf2_full_name for enumerator DIEs.
1166 When determining to scan for anonymous C++ namespaces, ignore
1167 the linkage name.
1168 (dwarf2_physname): New function.
1169 (dwarf2_full_name): Move content to new function and call
1170 that.
1171 (dwarf2_compute_name): "New" function.
1172 (_initialize_dwarf2_read): Initialize die_list.
1173 * gnu-v3-eabi.c (gnu_v3_find_method_in): Remove unused variable
1174 physname.
1175 (gnu_v3_print_method_ptr): Use the physname for virtual methods
1176 without a demangled name.
1177 Print out type information for non-virtual methods.
1178 * linespec.c (decode_line_1): Force ANY string using "::" (or
1179 "." for java) to use decode_compound, and clean up any stray quoting.
1180 If we found a file symtab, re-evaluate whether the remainder is_quoted.
1181 (decode_compound): Stop consuming at an open parenthesis.
1182 Keep template parameters.
1183 Keep any overload information.
1184 Keep keywords like "const".
1185 Remove paren_pointer.
1186 Move is_quoted check from set_flags to here.
1187 Remove #if 0 code from 2000. Ten years is long enough.
1188 (find_method): Before comparing symbol names, canonicalize the string
1189 from the user.
1190 If a specific overload is requested, find it. Otherwise throw an error.
1191 (find_method_overload_end): New function.
1192 (set_flags): Remove.
1193 (decode_compound): Assume that parentheses are matched.
1194 It's a lot easier.
1195 * symtab.c (symbol_find_demangled_name): Add DMGL_VERBOSE flag
1196 to cplus_demangle.
1197 * linespec.c (decode_line_1): Keep important keywords like
1198 "const" and "volatile".
1199 * symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): Remove.
1200 * typeprint.h (c_type_print_args): Add declaration.
1201 * ui-file.c (do_ui_file_obsavestring): New function.
1202 (ui_file_obsavestring): New function.
1203 * ui-file.h (ui_file_obsavestring): Add declaration.
1204 * valops.c (find_overload_match): Resolve the object to
1205 a non-pointer type.
1206 If the object is a data member, search the object for the member
1207 and return with staticp set.
1208 Use SYMBOL_NATURAL_NAME instead of SYMBOL_CPLUS_DEMANGLED_NAME.
1209 Do not attempt to extract a function name from non-function types.
1210 If the extracted function name and the original name are the same,
1211 we don't have a C++ method.
1212
1213 From Jan Kratochvil <jan.kratochvil@redhat.com>:
1214 * dwarf2read.c (new_symbol <DW_TAG_enumerator>): Call dwarf2_full_name.
1215
1216 * ada-lang.c (ada_lookup_symbol): Remove linkage_name parameters
1217 and arguments from symbol lookups.
1218 * ax-gdb.c (gen_expr): Likewise.
1219 * cp-namespace.c (cp_lookup_symbol_nonlocal, lookup_namespace_scope,
1220 cp_lookup_symbol_namespace, lookup_symbol_file, lookup_nested_type,
1221 lookup_possible_namespace_symbol): Likewise.
1222 * cp-support.c (read_in_psymtabs): Likewise.
1223 * cp-support.h (cp_lookup_symbol_nonlocal): Likewise.
1224 * language.h (la_lookup_symbol_nonlocal): Likewise.
1225 * scm-valprint.c (scm_inferior_print): Likewise.
1226 * solib-darwin.c (darwin_relocate_section_addresses): Likewise.
1227 * solib-svr.c (elf_lookup_lib): Likewise.
1228 * solib.c (show_auto_solib_add): Likewise.
1229 * solist.h (lookup_lib_global, solib_global_lookup): Likewise.
1230 * symmisc.c (maintenance_check_symtabs): Likewise.
1231 * symtab.c (lookup_symbol_in_language, lookup_symbol_aux,
1232 lookup_symbol_aux_local, lookup_symbol_aux_block,
1233 lookup_symbol_from_objfile, lookup_symbol_aux_symtabs,
1234 lookup_symbol_aux_psymtabs,basic_lookup_symbol_nonlocal,
1235 lookup_symbol_static, lookup_symbol_global, symbol_matches_domain,
1236 basic_lookup_transparent_type, find_main_psymtab,
1237 lookup_block_symbol): Likewise.
1238 * symtab.h (basic_lookp_symbol_nonlocal, lookup_symbol_static,
1239 lookup_symbol_global, lookup_symbol_aux_block,
1240 lookup_symbol_partial_symbol, lookup_block_symbol,
1241 lookup_global_symbol, value_maybe_namespace_elt): Likewise.
1242
1243 2010-03-09 Pierre Muller <muller@ics.u-strasbg.fr>
1244
1245 * python/python-internal.h: Include symtab.h.
1246
1247 2010-03-09 Joel Brobecker <brobecker@adacore.com>
1248 Pierre Muller <muller@ics.u-strasbg.fr>
1249
1250 * p-lang.c (is_pascal_string_type): Remove unneeded parentheses.
1251 * p-valprint.c (pascal_val_print): Remove undeed block and fix
1252 indentation.
1253
1254 2010-03-08 Tom Tromey <tromey@redhat.com>
1255
1256 * breakpoint.c (breakpoint_1): Add "QUIT".
1257
1258 2010-03-08 Daniel Jacobowitz <dan@codesourcery.com>
1259 Pedro Alves <pedro@codesourcery.com>
1260
1261 * solib.c (solib_find): Replace extension if
1262 solib_symbols_extension is set in the target gdbarch.
1263 * arm-symbian-tdep.c (arm_symbian_init_abi): Set
1264 solib_symbols_extension to "sym".
1265 * gdbarch.sh (solib_symbols_extension): New variable.
1266 (pstring): New function.
1267 * gdbarch.h, gdbarch.c: Regenerate.
1268
1269 2010-03-08 Tom Tromey <tromey@redhat.com>
1270
1271 PR cli/9591:
1272 * NEWS: Update.
1273 * utils.c: Include main.h.
1274 (fputs_maybe_filtered): Don't paginate if `batch_flag'.
1275 (defaulted_query): Use default answer if `batch_flag'.
1276 * main.h (batch_flag): Declare.
1277 * main.c (batch_flag): New global.
1278 (captured_main): Remove 'batch'. Update.
1279
1280 2010-03-08 Kevin Buettner <kevinb@redhat.com>
1281
1282 From Richard Sandiford, Martin M. Hunt, Corinna Vinschen,
1283 and Kevin Buettner:
1284
1285 * remote-mips.c (rockhopper_ops): New target_ops struct.
1286 (MON_ROCKHOPPER): New mips_monitor_type.
1287 (read_hex_value): New function.
1288 (mips_request): Send 8-byte values with a 'T' packet. Read the
1289 packet argument as a string and use read_hex_value to parse it.
1290 (mips_exit_debug): Wait for response when using MON_ROCKHOPPER.
1291 (rockhopper_open): New function.
1292 (mips_wait): Read the PC, FP and SP fields as strings. Use
1293 read_hex_value to parse them and mips_set_register to commit them.
1294 (mips_set_register): New function.
1295 (mips_fetch_registers): Do not cast register value to "unsigned"
1296 when reading a MON_ROCKHOPPER 't' packet. Use mips_set_register.
1297 (mips_store_registers): Use a 'T' packet to set registers when
1298 using MON_ROCKHOPPER.
1299 (pmon_end_download): Don't run initEther if using MON_ROCKHOPPER
1300 and expect the total to be printed before the entry address.
1301 (_initialize_remote_mips): Initialize and add rockhopper_ops.
1302
1303 2010-03-08 Kevin Buettner <kevinb@redhat.com>
1304
1305 * remote-mips.c (mips_fetch_word): Add new parameter, `valp'.
1306 Change return value to int. Store value fetched in location
1307 addressed by `val'. Use function's return value as success
1308 or failure indicator. Adjust all callers.
1309
1310 2010-03-08 Pierre Muller <muller@ics.u-strasbg.fr>
1311
1312 * p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL.
1313
1314 2010-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1315 Hui Zhu <teawater@gmail.com>
1316
1317 * record.c (record_open_1): Check tmp_to_stopped_by_watchpoint and
1318 tmp_to_stopped_data_address.
1319 (record_open): Reset tmp_to_stopped_by_watchpoint and
1320 tmp_to_stopped_data_address.
1321 * target.c (init_dummy_target): Add to_stopped_by_watchpoint and
1322 to_stopped_data_address.
1323
1324 2010-03-08 Hui Zhu <teawater@gmail.com>
1325
1326 * i386-tdep.c (i386_process_record): Initialize regnum.
1327
1328 2010-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1329
1330 * symfile.c (addr_info_make_relative): New variable sect_name, use it.
1331 Do not warn on ".gnu.liblist" and ".gnu.conflict".
1332
1333 2010-03-08 Joel Brobecker <brobecker@adacore.com>
1334
1335 Memory error when reading wrong core file.
1336 * solib-svr4.c (solib_svr4_r_map): catch and print all exception
1337 errors while reading the inferior memory, and return zero if
1338 an exception was raised.
1339
1340 2010-03-07 Michael Snyder <msnyder@vmware.com>
1341
1342 * record.c (record_restore): Rename tmpu8 to rectype.
1343
1344 * i386-tdep.c (i386_record_lea_modrm_addr): Rename local variables
1345 tmpu8, tmpi16, tmpi32, tmpulongest to addr8, addr16, addr32, addr64.
1346
1347 (i386_record_push): Rename local tmpulongest to addr.
1348
1349 (i386_process_record): Rename local tmpulongest to addr.
1350
1351 Rename local variables tmpu16, tmpu32, tmpu64 to addr16, addr32,
1352 addr64.
1353
1354 Rename local variable tmpu8 to opcode8 and regnum.
1355
1356 2010-03-07 Joel Brobecker <brobecker@adacore.com>
1357
1358 * remote.c (remote_get_ada_task_ptid): New function.
1359 (init_remote_ops): Set remote_ops.to_get_ada_task_ptid.
1360
1361 2010-03-06 Christopher Faylor <me+cygwin@cgf.cx>
1362
1363 * windows-nat.c: Reorganize #ifdef __CYGWIN__ considerations into one
1364 block. Define helper macros to reduce ifdefs in code.
1365 (get_module_name): Use cygwin_buf_t for buffer and __PMAX for buffer
1366 size. Call unadorned GetModuleFileNameEx rather than
1367 GetModuleFileNameEx*.
1368 (windows_make_so): Use __PMAX to denote maximum buffer size and
1369 cygwin_buf_t for buffer type. Use GetSystemDirectory{W,A} as
1370 appropriate.
1371 (get_image_name): Use __PMAX to denote maximum buffer size.
1372 (handle_load_dll): Likewise.
1373 (windows_pid_to_exec_file): Likewise.
1374 (windows_create_inferior): Add many accommodations for older Cygwin and
1375 non-Cygwin.
1376 (bad_GetModuleFileNameExW): Control inclusion of this function based on
1377 __USEWIDE conditional.
1378 (bad_GetModuleFileNameExA): Likewise.
1379 (_initialize_loadable): Just use real function names without the dyn_
1380 part since they are defined earlier.
1381
1382 2010-03-05 Corinna Vinschen <vinschen@redhat.com>
1383 Tom Tromey <tromey@redhat.com>
1384
1385 * utils.c (host_char_to_target): Add 'gdbarch' argument.
1386 (parse_escape): Likewise.
1387 * python/py-utils.c (unicode_to_target_string): Update.
1388 (unicode_to_target_python_string): Update.
1389 (target_string_to_unicode): Update.
1390 * printcmd.c (printf_command): Update.
1391 * p-exp.y (yylex): Update.
1392 * objc-exp.y (yylex): Update.
1393 * mi/mi-parse.c: Include charset.h.
1394 (mi_parse_escape): New function.
1395 (mi_parse_argv): Use it.
1396 * jv-exp.y (yylex): Update.
1397 * i386-cygwin-tdep.c (i386_cygwin_auto_wide_charset): New
1398 function.
1399 (i386_cygwin_init_abi): Call set_gdbarch_auto_wide_charset.
1400 * gdbarch.sh (auto_charset, auto_wide_charset): New.
1401 * gdbarch.c: Rebuild.
1402 * gdbarch.h: Rebuild.
1403 * defs.h (parse_escape): Update.
1404 * cli/cli-setshow.c: Include arch-utils.h.
1405 (do_setshow_command): Update.
1406 * cli/cli-cmds.c (echo_command): Update.
1407 * charset.h (target_charset, target_wide_charset): Update.
1408 * charset.c: Include arch-utils.h.
1409 (target_charset_name): Default to "auto".
1410 (target_wide_charset_name): Likewise.
1411 (show_target_charset_name): Handle "auto".
1412 (show_target_wide_charset_name): Likewise.
1413 (be_le_arch): New global.
1414 (set_be_le_names): Add 'gdbarch' argument.
1415 (validate): Likewise. Don't call set_be_le_names.
1416 (set_charset_sfunc, set_host_charset_sfunc)
1417 (set_target_charset_sfunc, set_target_wide_charset_sfunc):
1418 Update.
1419 (target_charset): Add 'gdbarch' argument.
1420 (target_wide_charset): Likewise. Remove 'byte_order' argument.
1421 (auto_target_charset_name): New global.
1422 (default_auto_charset, default_auto_wide_charset): New functions.
1423 (_initialize_charset): Set auto_target_charset_name. Allow "auto"
1424 for target charsets. Copy result of nl_langinfo. Use GetACP if
1425 USE_WIN32API.
1426 * c-lang.c (charset_for_string_type): Add 'gdbarch' argument,
1427 remove 'byte_order' argument. Update.
1428 (classify_type): Likewise.
1429 (c_emit_char): Update.
1430 (c_printchar): Update.
1431 (c_printstr): Update.
1432 (c_get_string): Update.
1433 (evaluate_subexp_c): Update.
1434 * arch-utils.h (default_auto_charset, default_auto_wide_charset):
1435 Declare.
1436 * python/python.c (gdbpy_target_charset): New function.
1437 (gdbpy_target_wide_charset): Likewise.
1438 (GdbMethods): Update.
1439 * NEWS: Update.
1440
1441 2010-03-05 Ulrich Weigand <uweigand@de.ibm.com>
1442
1443 * symfile.c (build_section_addr_info_from_objfile): Do not mask
1444 off high address bits.
1445
1446 2010-03-05 Ulrich Weigand <uweigand@de.ibm.com>
1447
1448 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Extract
1449 address as UnsignedLongLong, not LongLong.
1450
1451 2010-03-05 Kevin Buettner <kevinb@redhat.com>
1452 Pedro Alves <pedro@codesourcery.com>
1453
1454 * remote-mips.c (gdbthread.h): Include.
1455 (remote_mips_ptid): Declare.
1456 (mips_error): Only mourn the inferior when inferior_ptid is non-null.
1457 (common_open): Set inferior_ptid, add it as an inferior, and
1458 as a thread too. Delete FIXME comment regarding start_remote().
1459 (mips_close): Invoke generic_mourn_inferior().
1460 (mips_kill): Make sure that target_mourn_inferior is invoked.
1461 (mips_mourn_inferior): Don't invoke generic_mourn_inferior, as
1462 it's now invoked from mips_close().
1463 (mips_load): Don't null out inferior_ptid. Don't call
1464 clear_symtab_users().
1465 (mips_thread_alive, mips_pid_to_str): New functions.
1466 (_initialize_remote_mips): Initialize remote_mips_ptid. Initialize
1467 to_thread_alive and to_pid_to_str operations.
1468
1469 2010-03-04 Tom Tromey <tromey@redhat.com>
1470
1471 * dwarf2read.c (skip_one_die) <DW_FORM_ref_addr>: Use offset size
1472 in DWARF 3 and later.
1473 (read_attribute_value) <DW_FORM_ref_addr>: Likewise.
1474
1475 2010-03-04 Keith Seitz <keiths@redhat.com>
1476
1477 * linespec.c (decode_line_1): Update comments for is_quote_enclosed.
1478 If the filename portion of the linespec was quoted, recheck the
1479 remainder for additional quoting.
1480 (locate_first_half): Skip over completer chars, too.
1481
1482 2010-03-04 Tom Tromey <tromey@redhat.com>
1483
1484 * printcmd.c (printf_command): Pass dummy argument to
1485 printf_filtered.
1486
1487 2010-03-04 Doug Evans <dje@google.com>
1488
1489 * arm-tdep.c (arm_make_stub_cache): Delete unused locals reg,
1490 unwound_fp.
1491
1492 * arm-tdep.c (arm_stub_unwind_sniffer): Add comment.
1493
1494 2010-03-04 Pedro Alves <pedro@codesourcery.com>
1495
1496 * breakpoint.c (update_watchpoint): Create a sentinel location if
1497 the software watchpoint isn't watching any memory.
1498 (breakpoint_address_bits): Skip dummy software watchpoint locations.
1499
1500 2010-03-04 Pedro Alves <pedro@codesourcery.com>
1501
1502 * utils.c (fputs_maybe_filtered): Check if there's already a top
1503 level interpreter before dereferencing it. If there isn't one,
1504 don't paginate either.
1505
1506 2010-03-04 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1507
1508 * arm-tdep.c (arm_pc_is_thumb): Add heuristic that tries to get
1509 the state right when single stepping.
1510 (arm_get_next_pc_raw, thumb_get_next_pc_raw): New functions.
1511 Get the next PC along with the instruction state.
1512 (thumb_get_next_pc): Remove.
1513 (arm_get_next_pc): Modified to use arm_get_next_pc_raw.
1514
1515 2010-03-04 Hui Zhu <teawater@gmail.com>
1516
1517 * i386-tdep.c (i386_process_record): Change "addr" to "tmpu64".
1518
1519 2010-03-03 Pedro Alves <pedro@codesourcery.com>
1520
1521 * utils.c (fputs_maybe_filtered): Always disable pagination if the
1522 top level interpreter is MI.
1523
1524 2010-03-03 Stan Shebs <stan@codesourcery.com>
1525
1526 * remote.c (remote_download_tracepoint): Iterate over locations.
1527 * tracepoint.c (validate_actionline): Ditto.
1528 (encode_actions): Add location argument.
1529 (trace_dump_command): Check all locations to see if stepping
1530 frame.
1531
1532 2010-03-03 H.J. Lu <hongjiu.lu@intel.com>
1533 Eli Zaretskii <eliz@gnu.org>
1534
1535 * NEWS: Add X86 general purpose registers section.
1536
1537 2010-03-03 Tom Tromey <tromey@redhat.com>
1538
1539 PR mi/11098:
1540 * varobj.c (install_new_value): Handle case where new print_value
1541 is NULL.
1542
1543 2010-03-03 Dainis Jonitis <jonitis@gmail.com>
1544
1545 PR gdb/11345:
1546 * printcmd.c (printf_command): Print end of format string using
1547 printf_filtered.
1548
1549 2010-03-02 Tom Tromey <tromey@redhat.com>
1550
1551 * mi/mi-cmd-break.c (mi_read_next_line): Add missing 'void'.
1552 * defs.h (read_command_lines_1): Add missing 'void'.
1553 * cli/cli-script.c (recurse_read_control_structure): Add missing
1554 'void'.
1555 (read_next_line): Likewise.
1556 (read_command_lines_1): Likewise.
1557
1558 2010-03-02 Ulrich Weigand <uweigand@de.ibm.com>
1559
1560 * spu-tdep.c (spu_analyze_prologue): Track instruction to
1561 store backchain as part of prologue.
1562
1563 2010-03-02 Daniel Jacobowitz <dan@codesourcery.com>
1564
1565 * progspace.c (update_address_spaces): Update inferior address spaces
1566 also.
1567
1568 2010-03-02 Doug Evans <dje@google.com>
1569
1570 * dwarf2read.c (add_partial_subprogram): Add missing baseaddr to
1571 lowpc,highpc args to addrmap_set_empty.
1572
1573 2010-03-02 H.J. Lu <hongjiu.lu@intel.com>
1574
1575 * amd64-tdep.c (amd64_byte_names): New.
1576 (amd64_word_names): Likewise.
1577 (amd64_dword_names): Likewise.
1578 (amd64_pseudo_register_name): Likewise.
1579 (amd64_pseudo_register_read): Likewise.
1580 (amd64_pseudo_register_write): Likewise.
1581 (amd64_init_abi): Set num_byte_regs, num_word_regs, num_dword_regs
1582 and num_mmx_regs. Call set_gdbarch_pseudo_register_read,
1583 set_gdbarch_pseudo_register_write and
1584 set_tdesc_pseudo_register_name. Don't call
1585 set_gdbarch_num_pseudo_regs. Don't set mm0_regnum.
1586
1587 * i386-tdep.c (i386_num_mmx_regs): Removed.
1588 (i386_num_pseudo_regs): Likewise.
1589 (i386_byte_names): New.
1590 (i386_word_names): Likewise.
1591 (i386_byte_regnum_p): Likewise.
1592 (i386_word_regnum_p): Likewise.
1593 (i386_mmx_regnum_p): Updated.
1594 (i386_pseudo_register_name): Make it global. Handle byte and
1595 word pseudo-registers.
1596 (i386_pseudo_register_read): Likewise.
1597 (i386_pseudo_register_write): Likewise.
1598 (i386_pseudo_register_type): Handle byte, word and dword
1599 pseudo-registers
1600 (i386_register_reggroup_p): Don't include pseudo
1601 registers, except for MXX, in any register groups. Don't
1602 include pseudo byte, word, dword registers in general_reggroup.
1603 (i386_gdbarch_init): Set num_byte_regs, num_word_regs,
1604 num_dword_regs, al_regnum, ax_regnum and eax_regnum. Put MMX
1605 pseudo-registers after word pseudo-registers. Call
1606 set_gdbarch_num_pseudo_regs after calling gdbarch_init_osabi.
1607
1608 * i386-tdep.h (gdbarch_tdep): Add num_mmx_regs, num_byte_regs,
1609 al_regnum, num_word_regs, ax_regnum, num_dword_regs and
1610 eax_regnum.
1611 (i386_byte_regnum_p): New.
1612 (i386_word_regnum_p): Likewise.
1613 (i386_dword_regnum_p): Likewise.
1614 (i386_pseudo_register_name): Likewise.
1615 (i386_pseudo_register_read): Likewise.
1616 (i386_pseudo_register_write): Likewise.
1617
1618 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1619
1620 * target-descriptions.c (tdesc_type): Remove
1621 TDESC_TYPE_I386_EFLAGS and TDESC_TYPE_I386_MXCSR.
1622 (tdesc_predefined_types): Likewise.
1623 (tdesc_gdb_type): Likewise. Pass NULL to append_flags_type_flag
1624 if flag name is empty.
1625 (maint_print_c_tdesc_cmd): Handle TDESC_TYPE_FLAGS.
1626
1627 * features/i386/32bit-core.xml: Define i386_eflags.
1628 * features/i386/64bit-core.xml: Likewise.
1629
1630 * features/i386/32bit-sse.xml: Define i386_mxcsr.
1631 * features/i386/64bit-sse.xml: Likewise.
1632
1633 * features/i386/amd64-linux.c: Regenerated.
1634 * features/i386/amd64.c: Likewise.
1635 * features/i386/i386-linux.c: Likewise.
1636 * features/i386/i386.c: Likewise.
1637
1638 2010-03-01 Daniel Jacobowitz <dan@codesourcery.com>
1639
1640 * gdbtypes.c (append_composite_type_field_raw): New.
1641 (append_composite_type_field_aligned): Use the new function.
1642 * gdbtypes.h (append_composite_type_field_raw): Declare.
1643 * target-descriptions.c (struct tdesc_type_field): Add start and end.
1644 (struct tdesc_type_flag): New type.
1645 (struct tdesc_type): Add TDESC_TYPE_STRUCT and TDESC_TYPE_FLAGS to
1646 kind. Add size to u.u. Add u.f for flags.
1647 (tdesc_gdb_type): Handle TDESC_TYPE_STRUCT and TDESC_TYPE_FLAGS.
1648 (tdesc_free_type): Likewise.
1649 (tdesc_create_struct, tdesc_set_struct_size, tdesc_create_flags): New.
1650 (tdesc_add_field): Handle TDESC_TYPE_STRUCT.
1651 (tdesc_add_bitfield, tdesc_add_flag): New.
1652 * target-descriptions.h (tdesc_create_struct, tdesc_set_struct_size)
1653 (tdesc_create_flags, tdesc_add_bitfield, tdesc_add_flag): Declare.
1654 * xml-tdesc.c (struct tdesc_parsing_data): Rename current_union to
1655 current_type. Add current_type_size and current_type_is_flags.
1656 (tdesc_start_union): Clear the new fields.
1657 (tdesc_start_struct, tdesc_start_flags): New.
1658 (tdesc_start_field): Handle struct fields, including bitfields.
1659 (field_attributes): Make type optional. Add start and end.
1660 (union_children): Rename to struct_union_children.
1661 (union_attributes): Rename to struct_union_attributes. Add optional
1662 size.
1663 (flags_attributes): New.
1664 (feature_children): Add struct and flags.
1665 * features/gdb-target.dtd: Add flags and struct to features.
1666 Make field type optional. Add field start and end.
1667
1668 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1669
1670 * amd64-linux-nat.c (AMD64_LINUX_USER64_CS): New.
1671 (amd64_linux_read_description): Likewise.
1672 (_initialize_amd64_linux_nat): Set to_read_description to
1673 amd64_linux_read_description.
1674
1675 * amd64-linux-tdep.c: Include "features/i386/amd64-linux.c".
1676 (amd64_linux_register_name): Removed.
1677 (amd64_linux_register_type): Likewise.
1678 (amd64_linux_core_read_description): New.
1679 (amd64_linux_init_abi): Set target description to
1680 tdesc_amd64_linux if needed. Support orig_rax in target
1681 description. Don't call set_gdbarch_register_name nor
1682 set_gdbarch_register_type. Call
1683 set_gdbarch_core_read_description.
1684 (_initialize_amd64_linux_tdep): Call
1685 initialize_tdesc_amd64_linux.
1686
1687 * amd64-linux-tdep.h (tdesc_amd64_linux): New.
1688
1689 * amd64-tdep.c: Include "features/i386/amd64.c".
1690 (amd64_register_names): Removed.
1691 (amd64_register_name): Likewise.
1692 (amd64_register_type): Likewise.
1693 (amd64_init_abi): Set num_core_regs and register_names. Set
1694 target description to tdesc_amd64 if needed. Don't call
1695 set_gdbarch_register_name nor set_gdbarch_register_type.
1696 (_initialize_amd64_tdep): New.
1697
1698 * i386-linux-nat.c (i386_linux_read_description): New.
1699 (_initialize_i386_linux_nat): Set to_read_description to
1700 i386_linux_read_description.
1701
1702 * i386-linux-tdep.c: Include "features/i386/i386-linux.c".
1703 (i386_linux_register_name): Removed.
1704 (i386_linux_core_read_description): New.
1705 (i386_linux_read_description): Likewise.
1706 (i386_linux_init_abi): Don't call set_gdbarch_register_name.
1707 Set target description to tdesc_i386_linux if needed. Support
1708 orig_eax. Set register_reggroup_p. Call
1709 set_gdbarch_core_read_description.
1710 (_initialize_i386_linux_tdep): Call initialize_tdesc_i386_linux.
1711
1712 * i386-linux-tdep.h (tdesc_i386_linux): New.
1713
1714 * i386-nto-tdep.c (i386nto_regset_id): Replace I386_NUM_FREGS
1715 with I387_NUM_REGS.
1716
1717 * i386-tdep.c: Include "features/i386/i386.c".
1718 (i386_register_names): Make it const.
1719 (i386_mmx_names): Likewise.
1720 (i386_num_register_names): Removed.
1721 (i386_register_name): Likewise.
1722 (i386_eflags_type): Likewise.
1723 (i386_mxcsr_type): Likewise.
1724 (i386_sse_type): Likewise.
1725 (i386_register_type): Likewise.
1726 (i387_ext_type): Call tdesc_find_type instead of arch_float_type.
1727 (i386_pseudo_register_name): New.
1728 (i386_pseudo_register_type): Likewise.
1729 (i386_mmx_type): Make it static.
1730 (i386_gdbarch_init): Check arch. Replace I386_NUM_FREGS with
1731 I387_NUM_REGS. Set num_core_regs and register_names. Don't
1732 call set_gdbarch_register_name nor set_gdbarch_register_type.
1733 Set register_reggroup_p. Set target description to tdesc_i386
1734 if needed. Call set_tdesc_pseudo_register_type,
1735 set_tdesc_pseudo_register_name and tdesc_use_registers.
1736 (_initialize_i386_tdep): Call initialize_tdesc_i386.
1737 initialize_tdesc_x86_64.
1738
1739 * i386-tdep.h (gdbarch_tdep): Remove i386_eflags_type,
1740 i386_mxcsr_type and i386_sse_type. Add num_core_regs,
1741 register_names, tdesc and register_reggroup_p.
1742 (I386_NUM_FREGS): Removed.
1743 (i386_eflags_type): Likewise.
1744 (i386_mxcsr_type): Likewise.
1745 (i386_mmx_type): Likewise.
1746 (i386_sse_type): Likewise.
1747 (i386_register_name): Likewise.
1748 (i386_regnum): Add I386_MXCSR_REGNUM.
1749 (I386_SSE_NUM_REGS): Defined with I386_MXCSR_REGNUM.
1750
1751 * i387-tdep.h (I387_NUM_REGS): New.
1752
1753 * regformats/i386/i386-linux.dat: Generated.
1754 * regformats/i386/i386.dat: Likewise.
1755 * regformats/i386/amd64-linux.dat: Likewise.
1756 * regformats/i386/amd64.dat: Likewise.
1757
1758 * regformats/reg-i386-linux.dat: Removed.
1759 * regformats/reg-i386.dat: Likewise.
1760 * regformats/reg-x86-64-linux.dat: Likewise.
1761 * regformats/reg-x86-64.dat: Likewise.
1762
1763 2010-03-01 Corinna Vinschen <vinschen@redhat.com>
1764
1765 * remote-fileio.c (remote_fileio_func_rename): Use Cygwin 1.7
1766 cygwin_conv_path API rather than the deprecated
1767 cygwin_conv_to_full_posix_path.
1768 * windows-nat.c:
1769 (GetModuleFileNameExA): Undefine for Cygwin.
1770 (GetModuleFileNameExW): Define for Cygwin.
1771 (get_module_name): Change size of pathbuf to PATH_MAX for Cygwin.
1772 Call GetModuleFileNameExW and convert path to POSIX using
1773 cygwin_conv_path.
1774 (windows_make_so): Always define p. Drop unused variable m.
1775 Don't use Win32 functions to check file existance, rather use
1776 access on Cygwin. Fetch system directory using GetSystemDirectoryW.
1777 Use canonicalize_file_name to get full path.
1778 (get_image_name): Use wcstombs, rather than WideCharToMultiByte
1779 to convert Unicode pathname to multibyte on Cygwin. Otherwise,
1780 use correct target buffer size in call to WideCharToMultiByte.
1781 (handle_load_dll): Change size of dll_buf to PATH_MAX for Cygwin.
1782 (windows_pid_to_exec_file): Change size of path to PATH_MAX for Cygwin.
1783 (windows_create_inferior): Convert all paths and arguments to wchar_t
1784 and use CreateProcessW on Cygwin.
1785 (_initialize_windows_nat): Disable DOS-style path warning on Cygwin.
1786 (bad_GetModuleFileNameExA): Undefine for Cygwin.
1787 (bad_GetModuleFileNameExW): Define for Cygwin.
1788 (_initialize_loadable): Load GetModuleFileNameExW into
1789 dyn_GetModuleFileNameExW on Cygwin. Don't load ANSI function on Cygwin.
1790
1791 2010-02-28 Phil Muldoon <pmuldoon@redhat.com>
1792
1793 PR python/11036
1794 * python/py-frame.c (frapy_read_var): Add block argument and logic
1795 to cope with user provided blocks.
1796
1797 2010-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1798
1799 * infcall.c (call_function_by_hand): Remove gdb_assert on sp and old_sp.
1800 New comment.
1801
1802 2010-02-28 Corinna Vinschen <vinschen@redhat.com>
1803
1804 * Makefile.in (SUBDIR_MI_OBS): Move mi-common.o from here...
1805 (COMMON_OBS): ... to here since it's used unconditionally.
1806 (SUBDIR_MI_SRCS): Move mi/mi-common.c from here...
1807 (SFILES): To here.
1808
1809 2010-02-26 David Daney <ddaney@caviumnetworks.com>
1810
1811 * mips-linux-tdep.c: Update struct sigframe comments.
1812 (SIGFRAME_CODE_OFFSET): Delete macro.
1813 (mips_linux_o32_sigframe_init): Calculate sigcontext_base using
1814 this_frame's sp.
1815 (mips_linux_n32n64_sigframe_init): Same.
1816
1817 2010-02-26 Kevin Buettner <kevinb@redhat.com>
1818
1819 * remote-mips.c (mips_load): Don't use pseudo-register when
1820 invalidating regcache.
1821
1822 2010-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1823
1824 * arm-tdep.c (thumb_get_next_pc): Correct conditional branch opcode.
1825
1826 2010-02-26 Pedro Alves <pedro@codesourcery.com>
1827
1828 * NEWS: Add "New targets" section, and mention ARM Symbian
1829 support.
1830
1831 2010-02-26 Ulrich Weigand <uweigand@de.ibm.com>
1832
1833 * dwarf2loc.c (struct piece_closure): Remove ARCH member,
1834 add ADDR_SIZE member.
1835 (allocate_piece_closure): Update.
1836 (copy_pieced_value_closure): Likewise.
1837 (dwarf2_evaluate_loc_desc): Likewise.
1838 (read_pieced_value): Use DWARF address size instead of
1839 GDB's gdbarch_addr_bit as size of values on the DWARF stack.
1840
1841 2010-02-26 Phil Muldoon <pmuldoon@redhat.com>
1842 Tom Tromey <tromey@redhat.com>
1843
1844 * python/py-type.c (typy_lookup_typename): Add in block argument.
1845 If provided restrict lookup to specified blocks.
1846 (gdbpy_lookup_type): Likewise.
1847 (typy_lookup_type): Likewise.
1848
1849 2010-02-25 Daniel Jacobowitz <dan@codesourcery.com>
1850
1851 Symbian config
1852
1853 gdb/
1854 * arm-symbian-tdep.c: New.
1855 * configure.tgt (arm*-*-symbianelf*): New target.
1856 (*-*-symbianelf*): New OS.
1857 * osabi.c (gdb_osabi_names): Add Symbian.
1858 * defs.h (gdb_osabi): Add GDB_OSABI_SYMBIAN.
1859 * Makefile.in (ALL_TARGET_OBJS): Add arm-symbian-tdep.o.
1860 (ALLDEPFILES): Add arm-symbian-tdep.c.
1861
1862 2010-02-25 Daniel Jacobowitz <dan@codesourcery.com>
1863
1864 * symfile.c (find_lowest_section): Include SEC_ALLOC sections.
1865
1866 2010-02-24 Pedro Alves <pedro@codesourcery.com>
1867
1868 * mi/mi-main.c (mi_cmd_execute): Fix typo.
1869
1870 2010-02-24 Phil Muldoon <pmuldoon@redhat.com>
1871 Tom Tromey <tromey@redhat.com>
1872 Thiago Jung Bauermann <bauerman@br.ibm.com>
1873
1874 * python/python.c (_initialize_python): Call
1875 gdbpy_initialize_symtabs, gdbpy_initialize_symbols and
1876 gdbpy_initialize_blocks.
1877 * python/python-internal.h: Declare struct symbol, block and
1878 symtab_and_line. Declare block_object_type and
1879 symbol_object_type
1880 (gdbpy_lookup_symbol gdbpy_block_for_pc)
1881 (symtab_and_line_to_sal_object, symtab_to_symtab_object)
1882 (symbol_to_symbol_object, block_to_block_object)
1883 (gdbpy_initialize_symtabs,gdbpy_initialize_symbols)
1884 (gdbpy_initialize_blocks ): Declare.
1885 * python/py-frame.c (frapy_block, frapy_function, frapy_find_sal)
1886 (frapy_select): Add methods.
1887 (frapy_read_var): Add symbol branch.
1888 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-symbol, py-symtab,
1889 py-block.
1890 (SUBDIR_PYTHON_SRCS): Likewise.
1891 (py-symbol.o): New rule.
1892 (py-symtab.o): Likewise.
1893 (py-block.o): Likewise.
1894 * python/py-symbol.c: New file.
1895 * python/py-symtab.c: Likewise.
1896 * python/py-block.c: Likewise.
1897
1898 2010-02-24 Pedro Alves <pedro@codesourcery.com>
1899
1900 PR gdb/11321
1901
1902 * inferior.h (prepare_for_detach): Declare.
1903 (struct inferior) <detaching>: New field.
1904 * infrun.c (prepare_for_detach): New.
1905 (handle_inferior_event) <random signal>: Don't stop if detaching.
1906 * target.c (target_detach): Call prepare_for_detach.
1907
1908 2010-02-24 Pedro Alves <pedro@codesourcery.com>
1909
1910 Per-process displaced stepping queue.
1911
1912 * infrun.c (displaced_step_ptid, displaced_step_request_queue)
1913 (displaced_step_gdbarch, displaced_step_closure,
1914 (displaced_step_original, displaced_step_copy): Move globals to
1915 this...
1916 (struct displaced_step_inferior_state): ... new structure.
1917 (displaced_step_inferior_states): New global.
1918 (get_displaced_stepping_state, add_displaced_stepping_state)
1919 (remove_displaced_stepping_state, infrun_inferior_exit): New
1920 functions.
1921 (displaced_step_clear): Add displaced_step_inferior_state
1922 parameter, and adjust to handle it.
1923 (displaced_step_clear_cleanup): Parameter is now a
1924 displaced_step_inferior_state. Adjust.
1925 (displaced_step_prepare): Adjust.
1926 (displaced_step_fixup, displaced_step_fixup)
1927 (infrun_thread_ptid_changed, resume): Adjust.
1928 (init_wait_for_inferior): Don't call displaced_step_clear.
1929 (infrun_thread_stop_requested): Rewrite.
1930 (_initialize_infrun): Install infrun_inferior_exit as
1931 inferior_exit observer.
1932
1933 2010-02-24 Pedro Alves <pedro@codesourcery.com>
1934
1935 * inferior.h (ptid_match): Declare.
1936 * infrun.c (ptid_match): New.
1937 * remote.c (queued_stop_reply): Rewrite and use ptid_match.
1938 (handle_notification): Add debug output.
1939 * linux-nat.c (ptid_match): Delete.
1940
1941 2010-02-24 David S. Miller <davem@davemloft.net>
1942
1943 * gdb_ptrace.h (PT_SYSCALL): If PTRACE_SYSCALL is available, use it.
1944 * syscalls/sparc-linux.xml: New.
1945 * syscalls/sparc64-linux.xml: New.
1946 * Makefile.in (XML_SYSCALL_FILES): Add new syscall XML files.
1947 * sparc-linux-tdep.c (XML_SYSCALL_FILENAME_SPARC32): Define.
1948 (sparc32_linux_get_syscall_number): New function.
1949 (sparc32_linux_init_abi): Set syscall XML file name and hook up
1950 syscall number fetcher.
1951 * sparc64-linux-tdep.c (XML_SYSCALL_FILENAME_SPARC64): Define.
1952 (sparc64_linux_get_syscall_number): New function.
1953 (sparc64_linux_init_abi): Set syscall XML file name and hook up
1954 syscall number fetcher.
1955
1956 2010-02-24 Vladimir Prus <vladimir@codesourcery.com>
1957
1958 Multiexec MI
1959
1960 * breakpoint.c (clear_syscall_counts): Take struct inferior*.
1961 * inferior.c (add_inferior_silent): Notify inferior_added
1962 observer.
1963 (delete_inferior_1): Notify inferior_removed observer.
1964 (exit_inferior_1): Pass inferior, not pid, to observer.
1965 (inferior_appeared): Likewise.
1966 (add_inferior_with_spaces): New.
1967 (add_inferior_command): Use the above.
1968 * inferior.h (delete_inferior_1, add_inferior_with_spaces):
1969 Declare.
1970
1971 * inflow.c (inflow_inferior_exit): Likewise.
1972 * jit.c (jit_inferior_exit_hook): Likewise.
1973
1974 * mi/mi-cmds.c (mi_cmds): Register add-inferior and
1975 remove-inferior.
1976 * mi/mi-cmds.h (mi_cmd_add_inferior, mi_cmd_remove_inferior): New.
1977 * mi/mi-interp.c (mi_inferior_added, mi_inferior_removed): New.
1978 (report_initial_inferior): New.
1979 (mi_inferior_removed): Register the above. Make sure
1980 inferior_added observer is called on the first inferior.
1981 (mi_new_thread, mi_thread_exit): Thread group is now identified by
1982 inferior number, not pid.
1983 (mi_solib_loaded, mi_solib_unloaded): Report which inferiors are
1984 affected.
1985 * mi/mi-main.c (current_context): New.
1986 (proceed_thread_callback): Use typed closure.
1987 Proceed everything if pid is 0. Most implementation split into
1988 (proceed_thread): ... this.
1989 (run_one_inferior): New.
1990 (mi_cmd_exec_continue, mi_cmd_exec_interrupt, mi_cmd_exec_run):
1991 Adjust for multiexec behaviour.
1992 (mi_cmd_add_inferior, mi_cmd_remove_inferior): New.
1993 (mi_cmd_execute): Handle the 'thread-group' option here.
1994 Do some extra checks.
1995 * mi-parse.c (mi_parse): Handle the --all and --thread-group
1996 options.
1997 * mi-parse.h (struct mi_parse): New fields all and thread_group.
1998
1999 2010-02-24 Vladimir Prus <vladimir@codesourcery.com>
2000
2001 Make -exec-run a proper MI commands.
2002
2003 * mi/mi-cmds.h (mi_cmd_exec_run): Declare.
2004 * mi/mi-cmds.c (mi_cmds): Adjust.
2005 * mi/mi-main.c (mi_cmd_exec_run): New.
2006
2007 2010-02-24 Pedro Alves <pedro@codesourcery.com>
2008 Stan Shebs <stan@codesourcery.com>
2009
2010 * tracepoint.h (set_traceframe_number)
2011 (cleanup_restore_current_traceframe): Declare.
2012 * tracepoint.c (set_traceframe_number): New.
2013 (struct current_traceframe_cleanup): New.
2014 (do_restore_current_traceframe_cleanup)
2015 (restore_current_traceframe_cleanup_dtor)
2016 (make_cleanup_restore_current_traceframe): New.
2017 * infrun.c: Include tracepoint.h.
2018 (fetch_inferior_event): Switch out and in of tfind mode.
2019
2020 2010-02-24 Pedro Alves <pedro@codesourcery.com>
2021
2022 * breakpoint.c (breakpoint_init_inferior): Also delete
2023 bp_shlib_event breakpoints.
2024 * solib-frv.c (enable_break): Remove call to
2025 remove_solib_event_breakpoints.
2026 * solib-svr4.c (enable_break): Ditto.
2027 * solib-darwin.c (darwin_solib_create_inferior_hook): Ditto.
2028 * solib-pa64.c (pa64_solib_create_inferior_hook): Ditto.
2029 * solib-som.c (som_solib_create_inferior_hook): Ditto.
2030 * solib-spu.c (spu_enable_break): Ditto.
2031
2032 2010-02-23 Harald Koenig <H.Koenig@science-computing.de>
2033
2034 * c-exp.y (token_and_value): s/union YYSTYPE/YYSTYPE.
2035
2036 2010-02-23 Harald Koenig <H.Koenig@science-computing.de>
2037
2038 * varobj.c (varobj_update): Avoid non-constants in initializers.
2039
2040 2010-02-23 Tom Tromey <tromey@redhat.com>
2041
2042 * dwarf2loc.c (read_pieced_value) <DWARF_VALUE_STACK>: Correctly
2043 handle big-endian values.
2044 (dwarf2_evaluate_loc_desc) <DWARF_VALUE_STACK>: Likewise.
2045
2046 2010-02-22 Pedro Alves <pedro@codesourcery.com>
2047
2048 PR9605
2049
2050 gdb/
2051 * breakpoint.c (insert_bp_location): If inserting the read
2052 watchpoint failed, fallback to an access watchpoint.
2053 (bpstat_check_watchpoint): Stop for read watchpoint triggers even
2054 if the value changed, if not watching the same memory for writes.
2055 (watchpoint_locations_match): Add comment.
2056 (update_global_location_list): Copy the location's watchpoint type.
2057 * i386-nat.c (i386_length_and_rw_bits): It's an internal error to
2058 handle read watchpoints here.
2059 (i386_insert_watchpoint): Read watchpoints aren't supported.
2060 * remote.c (remote_insert_watchpoint): Return 1 for unsupported
2061 packets.
2062 * target.h (target_insert_watchpoint): Update description.
2063
2064 2010-02-19 Tom Tromey <tromey@redhat.com>
2065
2066 * p-typeprint.c (pascal_type_print_varspec_prefix): Update.
2067 * m2-typeprint.c (m2_print_type): Update.
2068 * gdbtypes.c (recursive_dump_type): Update.
2069 (copy_type_recursive): Update.
2070 * c-typeprint.c (c_type_print_varspec_prefix): Update.
2071 (c_type_print_base): Update.
2072 * gdbtypes.h (TYPE_CODE_TEMPLATE, TYPE_CODE_TEMPLATE_ARG):
2073 Remove.
2074 (struct cplus_struct_type) <ntemplate_args>: Remove.
2075 <struct template_arg>: Remove.
2076 <is_dynamic>: Move earlier.
2077 (TYPE_TEMPLATE_ARGS): Remove.
2078 (TYPE_NTEMPLATE_ARGS): Remove.
2079 (TYPE_TEMPLATE_ARG): Remove.
2080
2081 2010-02-19 Tom Tromey <tromey@redhat.com>
2082
2083 PR c++/8693, PR c++/9496:
2084 * cp-namespace.c (cp_lookup_nested_type): Handle TYPE_CODE_UNION.
2085 * c-exp.y (lex_one_token): Rename from yylex. Don't call
2086 write_dollar_variable. Don't try to classify NAME tokens.
2087 (token_and_value): New type.
2088 (token_fifo, popping, name_obstack): New globals.
2089 (classify_name): New function.
2090 (classify_inner_name): Likewise.
2091 (yylex): Likewise.
2092 (VARIABLE): Now has type sval.
2093 (exp : VARIABLE): Call write_dollar_variable.
2094 (qualified_name): Use TYPENAME, not typebase. Add production for
2095 multiple "::" instances.
2096 (variable): Use name_not_typename.
2097 (qualified_type): Remove.
2098 (typebase): Update.
2099
2100 2010-02-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2101
2102 * symfile.c (addr_info_make_relative): Extend comment. Move SECT to
2103 a more inner block. Initialize ADDR by LOWER_OFFSET only if it was
2104 found by bfd_get_section_by_name.
2105 * symfile.h (struct section_addr_info) <sectindex>: New comment.
2106
2107 2010-02-19 Joel Brobecker <brobecker@adacore.com>
2108
2109 * NEWS: Add new "[...] since 7.1" section. Rename the "[...] since
2110 7.0 section" into "Changes in 7.1".
2111
2112 2010-02-19 Joel Brobecker <brobecker@adacore.com>
2113
2114 GDB 7.1 branch created (branch timestamp: 2010-02-18 20:00 UTC)
2115 * version.in: Bump version to 7.1.50.20100219-cvs.
2116
2117 2010-02-18 Harald Koenig <H.Koenig@science-computing.de>
2118
2119 * mi/mi-main.c (mi_cmd_exec_jump): Drop unneeded `return'.
2120 * symfile.c (symfile_map_offsets_to_segments): Fix assertion.
2121
2122 2010-02-17 Tom Tromey <tromey@redhat.com>
2123
2124 * NEWS: Add Python API Improvements section.
2125
2126 2010-02-18 Daniel Jacobowitz <dan@codesourcery.com>
2127
2128 * NEWS: Correct typo.
2129
2130 2010-02-17 Tom Tromey <tromey@redhat.com>
2131
2132 * objfiles.c (gdb_bfd_ref): Handle abfd==NULL.
2133
2134 2010-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2135
2136 * symfile.c (build_section_addr_info_from_objfile): Include sections
2137 only if they are SEC_ALLOC or SEC_LOAD.
2138
2139 2010-02-17 H.J. Lu <hongjiu.lu@intel.com>
2140
2141 PR shlibs/11293
2142 * solib-svr4.c (enable_break): Check size of CORE_ADDR instead
2143 of ULONGEST for address size.
2144
2145 2010-02-17 Tom Tromey <tromey@redhat.com>
2146
2147 * NEWS: Add C++ improvements section.
2148
2149 2010-02-17 Ulrich Weigand <uweigand@de.ibm.com>
2150
2151 * python/python-internal.h [!WITH_THREAD] (PyGILState_Release,
2152 PyThreadState_Swap): Avoid "statement with no effect" warning.
2153
2154 2010-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2155
2156 * solib-svr4.c (enable_break <target_auxv_search>): New variable
2157 addr_bit. Adjust LOAD_ADDR sign for cross-arch inferiors.
2158
2159 2010-02-17 Tristan Gingold <gingold@adacore.com>
2160 Petr Hluzín <petr.hluzin@gmail.com>
2161
2162 * avr-tdep.c (avr_scan_prologue): Convert an if statement to a
2163 gdb_assert. Fix info->size for SIG prologue.
2164
2165 2010-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2166
2167 * infcmd.c (show_inferior_tty_command): Check for NULL.
2168 Correct output message.
2169
2170 2010-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2171
2172 * linespec.c (decode_line_1): Handle FILE:FUNCTION even if
2173 FUNCTION contains parentheses. Improve removal of a trailing
2174 single quote.
2175
2176 2010-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2177
2178 * gcore.c (do_bfd_delete_cleanup): New function.
2179 (gcore_command): Use it. Discard the cleanup after success.
2180 (gcore_copy_callback): Delete dead code.
2181
2182 2010-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2183
2184 * symfile.c (addr_info_make_relative): Always use
2185 find_lowest_section.
2186
2187 2010-02-16 Sami Wagiaalla <swagiaal@redhat.com>
2188
2189 * NEWS: Added entry for namespace fixes.
2190
2191 2010-02-15 Tom Tromey <tromey@redhat.com>
2192
2193 * dwarf2read.c (guess_structure_name): Allocate name on the
2194 objfile obstack.
2195
2196 2010-02-15 Tom Tromey <tromey@redhat.com>
2197
2198 * c-typeprint.c (c_type_print_base): Reverse order of test.
2199
2200 2010-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2201
2202 * solib-svr4.c (LM_ADDR_CHECK): New variable minpagesize. Optionally
2203 initialize it from ELF BFD. Extend the prelink condition by it.
2204
2205 2010-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2206
2207 * defs.h (parse_pid_to_attach): New.
2208 * utils.c (parse_pid_to_attach): New.
2209 * darwin-nat.c (darwin_attach): Replace ARGS parsing by parse_pid.
2210 * gnu-nat.c (gnu_attach): Likewise.
2211 * nto-procfs.c (procfs_attach): Likewise.
2212 * procfs.c (procfs_attach): Likewise.
2213 * windows-nat.c (windows_attach): Likewise.
2214 * inf-ptrace.c (inf_ptrace_attach): Likewise. Remove variable dummy.
2215 * inf-ttrace.c (inf_ttrace_attach): Likewise.
2216 * remote.c (extended_remote_attach_1): Likewise. New comment on getpid
2217 check.
2218
2219 2010-02-14 Masaki Muranaka <monaka@monami-software.com>
2220
2221 * MAINTAINERS: Add myself for write after approval privileges.
2222
2223 2010-02-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2224
2225 * solib-svr4.c: (LM_ADDR_CHECK): Move variable align to a more inner
2226 block.
2227
2228 2010-02-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2229
2230 * solib-svr4.c: (LM_ADDR_CHECK): Print successful prelink adjustment
2231 only if INFO_VERBOSE.
2232
2233 2010-02-12 Tomas Holmberg <th@virtutech.com>
2234
2235 * mi/mi-main.c: Added the --reverse flag to the following MI
2236 commands: exec-continue, exec-finish, exec-next, exec-step,
2237 exec-next-instruction, exec-step-instruction. This is to
2238 support reverse execution over the MI interface to gdb.
2239
2240 2010-02-12 Pedro Alves <pedro@codesourcery.com>
2241
2242 * tracepoint.c (_initialize_tracepoint): Specify that the address
2243 range of `tfind outsize' is exclusive, and that the address range
2244 of `tfind range' is inclusive, in the commands' help strings.
2245
2246 2010-02-12 Joel Brobecker <brobecker@adacore.com>
2247
2248 Spurious "dll not found" error messages on x64-windows.
2249 * windows-nat.c: Add include of complaints.h.
2250 (handle_unload_dll): Change dll-not-found error into a complaint.
2251
2252 2010-02-12 Pedro Alves <pedro@codesourcery.com>
2253
2254 * breakpoint.c (allocate_bp_location): Use bp_loc_other for
2255 bp_tracepoint and bp_fast_tracepoint, not
2256 bp_loc_software_breakpoint.
2257 (update_global_location_list): Tracepoints are never duplicates of
2258 anything.
2259
2260 2010-02-12 Pedro Alves <pedro@codesourcery.com>
2261
2262 * breakpoint.c (break_command_really): Change return type to int.
2263 Return false if no breakpoint was created, true otherwise.
2264 (trace_command): Don't set the tracepoint count if no tracepoint
2265 was created.
2266 (ftrace_command): Ditto.
2267 (create_tracepoint_from_upload): Bail out if the tracepoint wasn't
2268 created in the breakpoints table.
2269
2270 2010-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2271 Ulrich Weigand <uweigand@de.ibm.com>
2272
2273 * solib-svr4.c (LM_ADDR_CHECK): New comment on PPC-aware condition.
2274
2275 2010-02-11 Pedro Alves <pedro@codesourcery.com>
2276
2277 * ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out if
2278 the offset value isn't of integral type.
2279
2280 2010-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2281
2282 * breakpoint.c (delete_breakpoint) <bpt->related_breakpoint != NULL>:
2283 New.
2284
2285 2010-02-11 Pedro Alves <pedro@codesourcery.com>
2286
2287 * ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out on
2288 non-subscriptable types.
2289 * valarith.c (binop_types_user_defined_p): New, abstracted out
2290 from ...
2291 (binop_user_defined_p): ... this.
2292 * value.h (binop_types_user_defined_p): Declare.
2293
2294 2010-02-11 Pedro Alves <pedro@codesourcery.com>
2295
2296 * tracepoint.c (tfile_open): Remove spurious discard_cleanups.
2297 Merge uploaded TSVs before merging uploaded tracepoints.
2298
2299 2010-02-11 Pedro Alves <pedro@codesourcery.com>
2300
2301 * ax-gdb.c (gen_deref): Don't allow dereferencing void pointers.
2302
2303 2010-02-11 Vladimir Prus <vladimir@codesourcery.com>
2304
2305 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Add extra
2306 whitespace character after a dot in comment.
2307 (mi_cmd_stack_list_arguments, mi_cmd_stack_list_variables):
2308 Likewise.
2309 (list_args_or_locals): For the 'all' (that is
2310 -stack-list-variables) case, always output list of tuples.
2311 Output 'arg' field if variable is argument.
2312
2313 2010-02-10 Tom Tromey <tromey@redhat.com>
2314
2315 * parser-defs.h (parser_debug): Declare.
2316 * parse.c (_initialize_parse): Install "debug parser" set/show
2317 command.
2318 (parser_debug): New global.
2319 (show_parserdebug): New function.
2320 * c-exp.y (c_parse): Set yydebug.
2321
2322 2010-02-10 H.J. Lu <hongjiu.lu@intel.com>
2323
2324 * target-descriptions.c (tdesc_type): Add TDESC_TYPE_I387_EXT,
2325 TDESC_TYPE_I386_EFLAGS and TDESC_TYPE_I386_MXCSR.
2326 (tdesc_predefined_types): Add i387_ext, i386_eflags and
2327 i386_mxcsr.
2328 (tdesc_find_type): New.
2329 (tdesc_gdb_type): Use tdesc_find_type. Handle TDESC_TYPE_I387_EXT,
2330 TDESC_TYPE_I386_EFLAGS and TDESC_TYPE_I386_MXCSR.
2331
2332 * target-descriptions.h (tdesc_find_type): New.
2333
2334 2010-02-10 Michael Snyder <msnyder@vmware.com>
2335
2336 * gdb-gdb.py: Comment fix.
2337
2338 2010-02-09 Tristan Gingold <gingold@adacore.com>
2339
2340 * machoread.c (macho_symfile_relocate): New function.
2341 (macho_sym_fns): Use macho_symfile_relocate instead of
2342 default_symfile_relocate.
2343 (macho_oso_data): New type.
2344 (current_oso): New variable.
2345 (macho_add_oso_symfile): Do not compute section_addr_info, but
2346 instead set vma of sections.
2347 Do not set SYMFILE_VERBOSE to call symbol_file_add_from_bfd.
2348 Set and clear current_oso.
2349
2350 2010-02-09 Joel Brobecker <brobecker@adacore.com>
2351
2352 Wrong type description for tagged type parameter.
2353 * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: When noside is
2354 EVAL_AVOID_SIDE_EFFECTS, also handle the case when type is a
2355 reference to a tagged type.
2356
2357 2010-02-09 Tristan Gingold <gingold@adacore.com>
2358
2359 * objfiles.c (objfile_separate_debug_iterate): Do not iterate on
2360 brothers of the parent.
2361
2362 2010-02-08 Tom Tromey <tromey@redhat.com>
2363
2364 PR c++/8017:
2365 * value.h: Update.
2366 * valops.c (search_struct_field): Make 'name' const.
2367 (search_struct_method): Likewise.
2368 (find_method_list): Make 'method' const.
2369 (value_struct_elt): Make 'name' and 'err' const.
2370 (value_find_oload_method_list): Make 'method' const.
2371 (find_overload_match): Make 'name' const.
2372 * eval.c (evaluate_subexp_standard): New locals function,
2373 function_name.
2374 <OP_FUNCALL>: Handle OP_SCOPE specially.
2375
2376 2010-02-08 Ulrich Weigand <uweigand@de.ibm.com>
2377
2378 * infrun.c (handle_inferior_event): Do not look up regcache
2379 for exited processes.
2380
2381 Mon Feb 8 13:17:10 2010 Chris Moller <moller@mollerware.com>
2382
2383 PR gdb/10728
2384 * valarith.c (value_ptrdiff): Added a test for a zero type length,
2385 warn if found, and assume length = 1.
2386
2387 2010-02-08 Chris Moller <cmoller@redhat.com>
2388
2389 PR gdb/9067
2390 * cp-valprint.c (cp_print_value_fields) Fix use of obstacks.
2391 cp_print_static_field) Fix use of obstacks.
2392
2393 2010-02-08 Pedro Alves <pedro@codesourcery.com>
2394
2395 * linux-nat.c (linux_nat_resume): In non-stop, also only tag
2396 resumed LWPs as resumed.
2397 (linux_nat_wait_1): If there's no resumed LWP in the set of LWPs
2398 we're waiting for, bail out with TARGET_WAITKIND_IGNORE, instead
2399 of throwing an internal error. If an LWP of a process we're not
2400 waiting for reports a signal, don't force collecting a SIGSTOP,
2401 and if it was breakpoint hit in non-stop mode, cancel it. Don't
2402 go through all LWPs cancelling breakpoints in non-stop mode.
2403 (resume_stopped_resumed_lwps): New.
2404 (linux_nat_wait): Use it.
2405
2406 2010-02-07 H.J. Lu <hongjiu.lu@intel.com>
2407
2408 * features/Makefile (WHICH): Add i386/i386, i386/i386-linux,
2409 i386/amd64 and i386/amd64-linux.
2410 (i386/i386-expedite): New.
2411 (i386/i386-linux-expedite): Likewise.
2412 (i386/amd64-expedite):Likewise.
2413 (i386/amd64-linux-expedite): Likewise.
2414 ($(outdir)/i386/i386-linux.dat): Likewise.
2415 ($(outdir)/i386/amd64.dat): Likewise.
2416 ($(outdir)/i386/amd64-linux.dat): Likewise.
2417
2418 * features/i386/32bit-core.xml: New.
2419 * features/i386/32bit-linux.xml: Likewise.
2420 * features/i386/32bit-sse.xml: Likewise.
2421 * features/i386/64bit-core.xml: Likewise.
2422 * features/i386/64bit-linux.xml: Likewise.
2423 * features/i386/64bit-sse.xml: Likewise.
2424 * features/i386/i386-linux.xml: Likewise.
2425 * features/i386/i386.xml: Likewise.
2426 * features/i386/amd64-linux.xml: Likewise.
2427 * features/i386/amd64.xml: Likewise.
2428 * features/i386/i386-linux.c: Likewise.
2429 * features/i386/i386.c: Likewise.
2430 * features/i386/amd64-linux.c: Likewise.
2431 * features/i386/amd64.c: Likewise.
2432
2433 2010-02-05 Sami Wagiaalla <swagiaal@redhat.com>
2434
2435 PR c++/7935:
2436 * cp-support.h: Added char* alias element to using_direct data
2437 struct.
2438 (cp_add_using): Added char* alias argument.
2439 (cp_add_using_directive): Ditto.
2440 * cp-namespace.c: Updated with the above changes.
2441 (cp_lookup_symbol_imports): Check for aliases.
2442 * dwarf2read.c (read_import_statement): Figure out local alias
2443 for the import and pass it on to cp_add_using.
2444 (read_namespace): Pass alias argument to cp_add_using.
2445
2446 2010-02-05 Hui Zhu <teawater@gmail.com>
2447
2448 * defs.h (gdb_bfd_errmsg): New extern.
2449 * exec.c (exec_file_attach): Change bfd_errmsg to
2450 gdb_bfd_errmsg.
2451 * utils.c (AMBIGUOUS_MESS1): New macro.
2452 (AMBIGUOUS_MESS2): New macro.
2453 (gdb_bfd_errmsg): New function.
2454
2455 2010-02-04 Doug Evans <dje@google.com>
2456
2457 * solib-svr4.c (enable_break): Add comment.
2458
2459 2010-02-04 Anthony Green <green@moxielogic.com>
2460
2461 * moxie-tdep.c (moxie_analyze_prologue): Fail protocol analysis
2462 gracefully.
2463
2464 2010-02-04 Tom Tromey <tromey@redhat.com>
2465
2466 * valops.c (search_struct_field): Account for
2467 value_embedded_offset. Fix check for virtual base past the end of
2468 the object. Use value_copy when making a slice of the value.
2469
2470 2010-02-04 H.J. Lu <hongjiu.lu@intel.com>
2471
2472 PR tui/9622
2473 * tui/tui-interp.c (tui_init): Call tui_initialize_readline
2474 only if gdb_stdout is a tty.
2475
2476 2010-02-04 H.J. Lu <hongjiu.lu@intel.com>
2477
2478 * target-descriptions.c: Include "osabi.h".
2479 (maint_print_c_tdesc_cmd): Generate set_tdesc_osabi for valid
2480 OSABI.
2481
2482 2010-02-04 Tristan Gingold <gingold@adacore.com>
2483
2484 * machoread.c (macho_add_oso): Renamed to macho_register_oso.
2485 (macho_symtab_read): Adjust calls to macho_add_oso.
2486 (macho_oso_symfile): Renamed to macho_symfile_read_all_oso.
2487 (macho_symfile_read): Adjust call to macho_oso_symfile.
2488 (macho_new_init): Move this function after declarations.
2489 (macho_symfile_init): Ditto.
2490 * darwin-nat-info.c (darwin_lib_gdb_ports): Remove.
2491 * darwin-nat.c (darwin_lookup_task): Remove unused prototype.
2492
2493 2010-02-04 Vladimir Prus <vladimir@codesourcery.com>
2494
2495 Include MI command in remotelog.
2496
2497 * mi/mi-main.c (mi_execute_command): Call target_log_command.
2498
2499 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2500
2501 * remote.c (remote_state): Remove gdbarch.
2502 (init_remote_state): Don't set gdbarch.
2503 (remote_query_supported): Pass target_gdbarch instead of
2504 rs->gdbarch to gdbarch_qsupported.
2505
2506 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2507
2508 * gdbarch.sh: Add qsupported.
2509
2510 * gdbarch.c: Regenerated.
2511 * gdbarch.h: Likewise.
2512
2513 * remote.c (remote_state): Add gdbarch.
2514 (init_remote_state): Set gdbarch.
2515 (remote_query_supported): Support gdbarch_qsupported.
2516
2517 2010-02-03 Daniel Jacobowitz <dan@codesourcery.com>
2518
2519 * amd64fbsd-nat.c (amd64fbsd_supply_pcb): Also check for
2520 __FreeBSD_kernel_version.
2521
2522 2010-02-03 Tristan Gingold <gingold@adacore.com>
2523
2524 * symfile.h (struct sym_fns): Add sym_relocate field.
2525 (default_symfile_relocate): New prototype.
2526 (symfile_relocate_debug_section): First argument is now an objfile.
2527 * symfile.c (default_symfile_relocate): Rename from
2528 symfile_relocate_debug_section, first argument is now an objfile.
2529 (symfile_relocate_debug_section): New function.
2530 * coffread.c (coff_sym_fns): Set sym_relocate field.
2531 * somread.c (som_sym_fns): Ditto.
2532 * mipsread.c (ecoff_sym_fns): Ditto.
2533 * machoread.c (macho_sym_fns): Ditto.
2534 * elfread.c (elf_sym_fns): Ditto.
2535 * dwarf2read.c (dwarf2_read_section): Ditto.
2536 * xcoffread.c (xcoff_sym_fns): Ditto.
2537 * dbxread.c (aout_sym_fns): Ditto.
2538 (dbx_psymtab_to_symtab): Adjust call to symfile_relocate_debug_section.
2539 (elfstab_build_psymtabs): Ditto.
2540
2541 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2542
2543 * defs.h (MAX_REGISTER_SIZE): Increase to 32.
2544
2545 2010-02-02 Tom Tromey <tromey@redhat.com>
2546
2547 * valops.c (value_cast_structs): Try downcasting using the RTTI
2548 type.
2549
2550 2010-02-02 Tom Tromey <tromey@redhat.com>
2551
2552 * gnu-v2-abi.c: Don't include gnu-v2-abi.h.
2553 (gnuv2_baseclass_offset): Now static.
2554 * Makefile.in (HFILES_NO_SRCDIR): Remove gnu-v2-abi.h.
2555 * gnu-v2-abi.h: Remove.
2556
2557 2010-02-02 Tom Tromey <tromey@redhat.com>
2558
2559 * m2-typeprint.c (m2_record_fields): Don't use
2560 TYPE_DECLARED_TYPE.
2561 * gdbtypes.h (TYPE_DECLARED_CLASS): New macro.
2562 (struct main_type) <flag_declared_class>: New field.
2563 (struct cplus_struct_type) <declared_type>: Remove.
2564 <ntemplate_args>: Move earlier.
2565 (DECLARED_TYPE_CLASS, DECLARED_TYPE_UNION, DECLARED_TYPE_STRUCT)
2566 (DECLARED_TYPE_TEMPLATE): Remove.
2567 (TYPE_DECLARED_TYPE): Remove.
2568 * gdbtypes.c (lookup_union): Don't use TYPE_DECLARED_TYPE.
2569 * dwarf2read.c (read_structure_type): Set TYPE_DECLARED_CLASS.
2570 * c-typeprint.c (c_type_print_base): Use TYPE_DECLARED_CLASS, not
2571 TYPE_DECLARED_TYPE.
2572
2573 2010-02-02 Tom Tromey <tromey@redhat.com>
2574
2575 PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890:
2576 * valops.c (search_struct_field): Compute nbases after calling
2577 CHECK_TYPEDEF.
2578 (check_field): Call CHECK_TYPEDEF.
2579 * cp-valprint.c (cp_print_value): Pass correct address to
2580 baseclass_offset. Fix check for virtual base past the end of the
2581 object. Don't offset address passed to cp_print_value_fields or
2582 apply_val_pretty_printer.
2583 (cp_print_value_fields): Fix call to val_print.
2584 (cp_print_value_fields_rtti): New function.
2585 * c-valprint.c (c_val_print): Use cp_print_value_fields_rtti.
2586 * p-valprint.c (pascal_object_print_value_fields): Fix call to
2587 val_print.
2588 * python/py-prettyprint.c (apply_val_pretty_printer): Add embedded
2589 offset to address.
2590 * language.h (struct language_defn) <la_val_print>: Document.
2591 * c-lang.h (cp_print_value_fields_rtti): Declare.
2592
2593 2010-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2594
2595 PR libc/11214:
2596 * linux-low.c (linux_tracefork_child) [!(__UCLIBC__ && HAS_NOMMU)]: New.
2597 (linux_test_for_tracefork): Move `stack' into [__UCLIBC__ && HAS_NOMMU].
2598 (linux_test_for_tracefork) [!(__UCLIBC__ && HAS_NOMMU)]: New.
2599
2600 2010-02-01 Michael Matz <matz@suse.de>
2601 Daniel Jacobowitz <dan@codesourcery.com>
2602
2603 * i386-tdep.c (i386_frame_cache): Assume valid anonymous
2604 functions use a frame pointer.
2605
2606 2010-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2607
2608 * solib-svr4.c (scan_dyntag): New variable dyn_addr. Replace gdb_assert
2609 by a conditional setting DYN_ADDR. Use DYN_ADDR.
2610 * config/djgpp/fnchange.lst: Add translations for
2611 symbol-without-target_section.exp and symbol-without-target_section.c.
2612
2613 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2614
2615 * gdbarch.sh: Set LANG and LC_ALL to C, not c.
2616 (remote_breakpoint_for_pc): Correct invalid_p check.
2617 * gdbarch.c: Regenerated.
2618
2619 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2620
2621 * arm-tdep.c (arm_find_mapping_symbol): New function, from
2622 arm_pc_is_thumb.
2623 (arm_pc_is_thumb): Use arm_find_mapping_symbol.
2624 (extend_buffer_earlier): New function.
2625 (MAX_IT_BLOCK_PREFIX, IT_SCAN_THRESHOLD): New constants.
2626 (arm_adjust_breakpoint_address): New function.
2627 (arm_gdbarch_init): Register arm_adjust_breakpoint_address.
2628
2629 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2630
2631 * arm-linux-tdep.c (arm_linux_thumb2_be_breakpoint)
2632 (arm_linux_thumb2_le_breakpoint): New constants.
2633 (arm_linux_init_abi): Set thumb2_breakpoint and
2634 thumb2_breakpoint_size.
2635 * arm-tdep.c (thumb_insn_size, thumb_advance_itstate): New functions.
2636 (thumb_get_next_pc): Add a comment. Rename IT to ITSTATE.
2637 Implement support for single stepping through IT blocks if
2638 a 32-bit Thumb breakpoint instruction is available.
2639 (arm_breakpoint_from_pc): If a 32-bit Thumb breakpoint instruction
2640 is available, use it when needed.
2641 (arm_remote_breakpoint_from_pc): New function.
2642 (arm_gdbarch_init): Register arm_remote_breakpoint_from_pc.
2643 * arm-tdep.h (struct gdbarch_tdep): Correct thumb_breakpoint
2644 comment. Add thumb2_breakpoint and thumb2_breakpoint_size.
2645
2646 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2647
2648 * arch-utils.c (default_remote_breakpoint_from_pc): New function.
2649 * arch-utils.h (default_remote_breakpoint_from_pc): Declare.
2650 * gdbarch.c, gdbarch.h: Regenerated.
2651 * gdbarch.sh (remote_breakpoint_from_pc): New architecture method.
2652 * remote.c (remote_insert_breakpoint, remote_insert_hw_breakpoint): Use
2653 gdbarch_remote_breakpoint_from_pc.
2654
2655 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2656
2657 * infrun.c (prepare_to_proceed): Handle other signals which might
2658 match a breakpoint.
2659 (handle_inferior_event): Move the check for unusual breakpoint
2660 signals earlier.
2661
2662 2010-01-29 Paul Hilfinger <hilfinger@adacore.com>
2663
2664 amd64 - function returning record with field straddling 2 registers.
2665 * amd64-tdep.c (amd_classify_aggregate): Handle the case of
2666 a record of length <= 16 in which a field straddles the two
2667 eightbytes.
2668
2669 2010-01-29 Joel Brobecker <brobecker@adacore.com>
2670
2671 Implement return values on amd64-windows.
2672 * amd64-windows-tdep.c: #include gdbcore.h and regcache.h.
2673 (amd64_windows_return_value): New function.
2674 (amd64_windows_init_abi): Call set_gdbarch_return_value with
2675 amd64_windows_return_value.
2676
2677 2010-01-29 Joel Brobecker <brobecker@adacore.com>
2678
2679 amd64-windows: 32 bytes allocated on stack by caller for integer
2680 parameter registers.
2681 * i386-tdep.h (struct gdbarch_tdep): Add new field
2682 integer_param_regs_saved_in_caller_frame.
2683 * amd64-windows-tdep.c (amd64_windows_init_abi): Set
2684 tdep->integer_param_regs_saved_in_caller_frame to 1.
2685 * amd64-tdep.c (amd64_push_dummy_call): Allocate some memory on
2686 stack if tdep->integer_param_regs_saved_in_caller_frame is set.
2687
2688 2010-01-29 Joel Brobecker <brobecker@adacore.com>
2689
2690 amd64-windows: memory args passed by pointer during function calls.
2691 * i386-tdep.h (gdbarch_tdep): Add field memory_args_by_pointer.
2692 * amd64-tdep.c (amd64_push_arguments): Add handling of architectures
2693 where tdep->memory_args_by_pointer is non-zero.
2694 * amd64-windows-tdep.c (amd64_windows_init_abi): Set
2695 tdep->memory_args_by_pointer to 1.
2696
2697 2010-01-29 Joel Brobecker <brobecker@adacore.com>
2698
2699 amd64-windows: Integer parameters in function calls.
2700 * i386-tdep.h (enum amd64_reg_class): New, moved here from
2701 amd64-tdep.c.
2702 (struct gdbarch_tdep): Add fields call_dummy_num_integer_regs,
2703 call_dummy_integer_regs, and classify.
2704 * amd64-tdep.h (amd64_classify): Add declaration.
2705 * amd64-tdep.c (amd64_dummy_call_integer_regs): New static constant.
2706 (amd64_reg_class): Delete, moved to i386-tdep.h.
2707 (amd64_classify): Make non-static. Move declaration to amd64-tdep.h.
2708 Replace call to amd64_classify by call to tdep->classify.
2709 (amd64_push_arguments): Get the list of registers to use for
2710 passing integer parameters from the gdbarch tdep structure,
2711 rather than using a hardcoded one. Replace calls to amd64_classify
2712 by calls to tdep->classify.
2713 (amd64_push_dummy_call): Get the register number used for
2714 the "hidden" argument from tdep->call_dummy_integer_regs.
2715 (amd64_init_abi): Initialize tdep->call_dummy_num_integer_regs
2716 and tdep->call_dummy_integer_regs. Set tdep->classify.
2717 * amd64-windows-tdep.c: Add include of gdbtypes.h.
2718 (amd64_windows_dummy_call_integer_regs): New static global.
2719 (amd64_windows_classify): New function.
2720 (amd64_windows_init_abi): Initialize tdep->call_dummy_num_integer_regs
2721 tdep->call_dummy_integer_regs and tdep->classify.
2722
2723 2010-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2724
2725 * regcache.c (regcache_xmalloc): Add aspace argument. Use it
2726 for the new regcache. All callers updated.
2727 (regcache_cpy, regcache_cpy_no_passthrough): Do not set aspace here.
2728 (get_thread_arch_regcache): Do not set aspace here.
2729 * regcache.h (regcache_xmalloc): Update declaration.
2730
2731 * frame.c, infcall.c, ppc-linux-tdep.c: Calls to
2732 regcache_xmalloc updated.
2733
2734 2010-01-28 Joel Brobecker <brobecker@adacore.com>
2735
2736 Another -Wunused-function error in procfs.c (sparc-solaris)
2737 * procfs.c (insert_dbx_link_breakpoint): Delete declaration. Move up.
2738 Only define if SYS_syssgi is defined.
2739 (remove_dbx_link_breakpoint): Delete declaration. Move up.
2740 (dbx_link_addr, insert_dbx_link_bpt_in_file)
2741 (insert_dbx_link_bpt_in_region): Move up. Only define if SYS_syssgi
2742 is itself defined.
2743
2744 2010-01-27 Christopher Faylor <me+cygwin@cgf.cx>
2745
2746 * windows-nat.c (windows_initialization_done): New variable.
2747 (get_windows_debug_event): Issue error when process dies before
2748 completely initializing.
2749 (do_initial_windows_stuff): Set flag to indicate when we are done with
2750 the initial steps of attaching to the child.
2751
2752 2010-01-27 Jan Kratochvil <jan.kratochvil@redhat.com>
2753
2754 * symtab.h (struct symbol <symtab>): New comment on NULL values.
2755
2756 2010-01-27 Doug Evans <dje@google.com>
2757
2758 * solib-svr4.c (solib_break_names): Add __dl_rtld_db_dlactivity.
2759
2760 * breakpoint.c (bpstat_stop_status): Delete useless code.
2761
2762 2010-01-27 Jan Kratochvil <jan.kratochvil@redhat.com>
2763
2764 * printcmd.c (display_uses_solib_p): Remove variable section. Access
2765 objfile via SYMBOL_SYMTAB.
2766
2767 2010-01-26 Tom Tromey <tromey@redhat.com>
2768
2769 PR exp/7643:
2770 * eval.c (evaluate_subexp_for_address) <UNOP_IND>: Call
2771 coerce_array on result.
2772
2773 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com>
2774
2775 * cp-namespace.c (cp_lookup_symbol_namespace): Added
2776 search_parent argument.
2777 (cp_add_using): Initialize 'searched' field.
2778 (reset_directive_searched): New function.
2779 * cp-support.h: Add 'searched' field to using_direct struct.
2780 (cp_lookup_symbol_imports): Ditto.
2781 * cp-namespace.c (cp_lookup_symbol_imports): Ditto.
2782 Perform recursive search.
2783 Implement non parent search.
2784 * valops.c (value_maybe_namespace_elt): Updated.
2785
2786 2010-01-26 Sami Wagiaalla <swagiaal@redhat.com>
2787
2788 PR gdb/10929:
2789 * dwarf2read.c (read_lexical_block_scope): Create blocks for
2790 scopes which contain using directives even if they contain no
2791 declarations.
2792 * symtab.c (lookup_symbol_aux): Pass lowest level block to
2793 la_lookup_symbol_nonlocal.
2794 * cp-namespace.c (cp_lookup_symbol_nonlocal): call
2795 cp_lookup_symbol_namespace.
2796 (cp_lookup_symbol_namespace): Perform an import lookup at every
2797 block level.
2798 (cp_lookup_symbol_imports): New function.
2799 (cp_lookup_symbol_in_namespace): New function.
2800
2801 2010-01-25 Tom Tromey <tromey@redhat.com>
2802
2803 PR gdb/11049:
2804 * c-valprint.c (c_val_print): Fix test of extract_unsigned_integer
2805 result.
2806
2807 2010-01-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2808
2809 * configure.ac: Only use host_os part when disabling TUI on osf.
2810 Use test to check variables, prefix strings with x.
2811 * configure: Regenerate.
2812
2813 * solib-osf.c (osf_current_sos): Initialize tail.
2814
2815 2010-01-25 gingold <gingold@adacore.com>
2816
2817 * windows-nat.c (windows_continue): Use %x to print thread id.
2818 (get_windows_debug_event): Ditto.
2819
2820 2010-01-22 Tom Tromey <tromey@redhat.com>
2821
2822 PR symtab/11199:
2823 * dwarf2read.c (quirk_gcc_member_function_pointer): Change return
2824 type and arguments. Use smash_to_methodptr_type.
2825 (read_structure_type): Call quirk_gcc_member_function_pointer
2826 later.
2827 * gdbtypes.h (smash_to_methodptr_type): Declare.
2828 * gdbtypes.c (smash_to_methodptr_type): New function.
2829 (lookup_methodptr_type): Use it.
2830
2831 2010-01-21 Tom Tromey <tromey@redhat.com>
2832
2833 PR symtab/11198:
2834 * symtab.h (lookup_minimal_symbol_and_objfile): Declare.
2835 * minsyms.c (lookup_minimal_symbol_and_objfile): New function.
2836 * glibc-tdep.c (find_minsym_and_objfile): Remove.
2837 (glibc_skip_solib_resolver): Use
2838 lookup_minimal_symbol_and_objfile.
2839
2840 2010-01-21 Kai Tietz <kai.tietz@onevision.com>
2841
2842 * inflow.c (check_syscall): Guard by #if clause for GO32 and
2843 WIN32 targets.
2844
2845 2010-01-20 Tom Tromey <tromey@redhat.com>
2846
2847 PR backtrace/10770:
2848 * valarith.c (value_binop): Handle BINOP_GTR, BINOP_LEQ, and
2849 BINOP_GEQ. Handle BINOP_NOTEQUAL in the signed case.
2850 * dwarf2expr.c (new_dwarf_expr_context): Allocate
2851 dwarf_stack_values, not CORE_ADDRs.
2852 (execute_stack_op): Change DW_OP_div and comparison operators to
2853 use signed operands.
2854
2855 2010-01-20 Vladimir Prus <vladimir@codesourcery.com>
2856
2857 Per-inferior args and tty and environment.
2858
2859 * infcmd.c (inferior_args): Rename to ...
2860 (inferior_args_scratch): ... this.
2861 (inferior_io_terminal): Rename to ...
2862 (inferior_io_terminal_scratch): ... this.
2863 (inferior_argc, inferior_argv): Remove.
2864 (set_inferior_io_terminal, get_inferior_io_terminal): Store
2865 inside current_inferior().
2866 (set_inferior_tty_command, show_inferior_tty_command): New.
2867 (get_inferior_args, set_inferior_args): Store inside
2868 current_inferior().
2869 (notice_args_set): Likewise and rename to...
2870 (set_args_command): ... this.
2871 (set_inferior_args_vector): Likewise.
2872 (notice_args_read): Rename to...
2873 (show_args_command): ...new.
2874 (tty_command): Remove.
2875 (run_command_1): Don't free old args, as they are freed by
2876 set_inferior_arg now.
2877 (run_no_args_command): Likewise.
2878 (inferior_environ): Remove.
2879 (run_command_1): Use environment of the current inferior.
2880 (environment_info, set_environment_command)
2881 (unset_environment_command, path_info, path_command): Likewise.
2882 (_initialize_infcmd): Adjust for function and variable renames.
2883 Do not init inferior_environ.
2884 * inferior.h (set_inferior_arg): Adjust prototype.
2885 (struct inferior): New fields args, argc, argv, terminal, environment.
2886 (inferior_environ): Remove declaration.
2887 * inferior.c (free_inferior): Free new fields.
2888 (add_inferior_silent): Initialize 'environment' field.
2889 * main.c (captured_main): Set arguments only after the initial
2890 inferior has been created. Set set_inferior_io_terminal,
2891 not tty_command.
2892 * mi/mi-main.c (mi_cmd_env_path): Use environment of the current
2893 inferior.
2894 (_initialize_mi_cmd_env): Adjust for disappearance of global
2895 inferior_environ.
2896 * solib.c (solib_find): Use environment of the current inferior.
2897
2898 2010-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2899
2900 * varobj.c (varobj_add_child, install_dynamic_child): Wrap into #if
2901 HAVE_PYTHON.
2902 (instantiate_pretty_printer): Move HAVE_PYTHON outside of the function.
2903
2904 2010-01-20 Joel Brobecker <brobecker@adacore.com>
2905
2906 Get rid of ada-lang.c:function_name_from_pc.
2907 * ada-lang.c: Add "stack.h" #include.
2908 (function_name_from_pc): Delete.
2909 (is_known_support_routine): Replace call to function_name_from_pc
2910 by call to find_frame_funname.
2911 (ada_unhandled_exception_name_addr_from_raise): Likewise.
2912
2913 2010-01-19 Tom Tromey <tromey@redhat.com>
2914
2915 PR c++/11026:
2916 * dwarf2read.c (read_partial_die): Allocate partial DIE's name on
2917 objfile obstack.
2918
2919 2010-01-19 Tom Tromey <tromey@redhat.com>
2920
2921 * top.c (stop_sig, float_handler, do_nothing): Remove.
2922
2923 2010-01-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2924
2925 * breakpoint.c (watchpoint_check): Check the call
2926 gdbarch_in_function_epilogue_p before calling frame_find_by_id.
2927 Extend the comment.
2928 * config/djgpp/fnchange.lst: Add translations for
2929 watchpoint-cond-gone.exp, watchpoint-cond-gone.c and
2930 watchpoint-cond-gone-stripped.c.
2931
2932 2010-01-19 Tom Tromey <tromey@redhat.com>
2933
2934 PR c++/8000:
2935 * dwarf2read.c (partial_die_parent_scope): Put enumeration type
2936 into parent scope, and enumerator into grandparent scope.
2937
2938 2010-01-19 Joel Brobecker <brobecker@adacore.com>
2939
2940 * NEWS: Add entry for "set/show ada trust-PAD-over-XVS" commands.
2941
2942 2010-01-19 Joel Brobecker <brobecker@adacore.com>
2943
2944 * configure.host: Make x86_64-*-solaris2.1[0-9]* an alias of
2945 i[34567]86-*-solaris2.1[0-9]*.
2946 * configure.tgt: Likewise.
2947
2948 2010-01-19 Joel Brobecker <brobecker@adacore.com>
2949
2950 * NEWS: Document the source command enhancement allowing it
2951 to load Python scripts. Document the "set/show script-extension"
2952 commands.
2953
2954 2010-01-19 Joel Brobecker <brobecker@adacore.com>
2955
2956 Add -Wunused-function to compile flags.
2957 * configure.ac: Add -Wunused-function to build_warnings.
2958 * configure: Regenerate.
2959
2960 2010-01-19 Joel Brobecker <brobecker@adacore.com>
2961
2962 "delete" ada-lex.c:input function, not used.
2963 * ada-lex.l: #define YY_NO_INPUT.
2964
2965 2010-01-19 Joel Brobecker <brobecker@adacore.com>
2966
2967 Delete free_named_symtabs and associated cleanup.
2968 * symfile.h (free_named_symtabs): Delete declaration.
2969 * symfile.c: Remove some commented out code (clear_symtab_users_once).
2970 (cashier_psymtab): Comment function out.
2971 Delete declaration.
2972 (free_named_symtabs): Delete.
2973 * coffread.c (coff_end_symtab): Remove call to free_named_symtabs.
2974 * dbxread.c (end_psymtab): Likewise.
2975 * dwarf2read.c (process_psymtab_comp_unit): Ditto.
2976 * exec.c (exec_close_1): Ditto.
2977 * xcoffread.c (xcoff_end_psymtab): Likewise.
2978
2979 2010-01-19 Joel Brobecker <brobecker@adacore.com>
2980
2981 * stack.c (print_block_frame_labels): Comment function out.
2982
2983 2010-01-19 Joel Brobecker <brobecker@adacore.com>
2984
2985 Delete unused or undefined functions.
2986 * breakpoint.c (ep_parse_optional_filename): Delete.
2987 * dcache.c (dcache_write_line): Remove declaration.
2988 * infrun.c (build_infrun): Remove declaration.
2989 * tracepoint.c (tracepoint_save_command): Remove declaration.
2990 * linux-nat.c (init_lwp_list): Delete. No longer used.
2991 * event-loop.c (check_async_signal_handlers): Delete declaration.
2992 * infrun.c (init_execution_control_state): Delete.
2993 (proceed): Update comment to avoid mentioning
2994 init_execution_control_state.
2995 * target.c (kill_or_be_killed, nosupport_runtime): Delete.
2996 * ada-lang.c (ada_to_static_fixed_value): Delete.
2997 * scm-lang.c (evaluate_subexp_scm): Delete declaration.
2998 * cp-namespace.c (cp_copy_usings): Delete.
2999 * xml-syscall.c (xml_number_of_syscalls): Delete.
3000 * progspace.c (find_program_space_by_num): Delete.
3001 * inflow.c (handle_sigio): Delete declaration.
3002 * hppa-tdep.c (hppa_alignof): Delete.
3003 * mipsnbsd-tdep.c (mipsnbsd_sigtramp_offset)
3004 (mipsnbsd_core_osabi_sniffer): Delete.
3005
3006 2010-01-18 Tom Tromey <tromey@redhat.com>
3007
3008 PR c++/9680:
3009 * c-exp.y (REINTERPRET_CAST, DYNAMIC_CAST, STATIC_CAST)
3010 (CONST_CAST): New tokens.
3011 (exp): Add new productions.
3012 (ident_tokens): Add const_cast, dynamic_cast, static_cast, and
3013 reinterpret_cast.
3014 (is_cast_operator): New function.
3015 (yylex): Handle cast operators specially.
3016 * eval.c (evaluate_subexp_standard) <UNOP_DYNAMIC_CAST,
3017 UNOP_REINTERPRET_CAST>: New cases.
3018 * expprint.c (print_subexp_standard): Likewise.
3019 (op_name_standard): Likewise.
3020 (dump_subexp_body_standard): Likewise.
3021 * parse.c (operator_length_standard): Likewise.
3022 * expression.h (enum exp_opcode): New constants UNOP_DYNAMIC_CAST,
3023 UNOP_REINTERPRET_CAST.
3024 * gdbtypes.c (class_types_same_p): New function.
3025 (is_ancestor): Use it.
3026 (is_public_ancestor): New function.
3027 (is_unique_ancestor_worker): Likewise.
3028 (is_unique_ancestor): Likewise.
3029 * gdbtypes.h (class_types_same_p, is_public_ancestor)
3030 (is_unique_ancestor): Declare.
3031 * valops.c (value_reinterpret_cast): New function.
3032 (dynamic_cast_check_1): Likewise.
3033 (dynamic_cast_check_2): Likewise.
3034 (value_dynamic_cast): Likewise.
3035 * value.h (value_reinterpret_cast, value_dynamic_cast): Declare.
3036
3037 2010-01-18 Joel Brobecker <brobecker@adacore.com>
3038
3039 Fix build failure when building without Python support.
3040 * python/python.c: Always include exceptions.h, even when HAVE_PYTHON
3041 is not defined.
3042
3043 2010-01-18 Joel Brobecker <brobecker@adacore.com>
3044
3045 Use XVS field type instead of doing a parallel lookup.
3046 * ada-lang.c (ada_get_base_type): Follow the XVS field type
3047 if it is a reference type instead of doing a type lookup using
3048 the XVS field name.
3049
3050 2010-01-18 Joel Brobecker <brobecker@adacore.com>
3051
3052 Trust PAD types instead of using PAD___XVS.
3053 * ada-lang.c (trust_pad_over_xvs): New static variable.
3054 (ada_is_aligner_type): If !trust_pad_over_xvs and there is a
3055 parallel XVS type, follow the XVS type instead of the PAD type.
3056 (unwrap_value): Make sure that there is no parallel XVE type
3057 before returning the value as is.
3058 (set_ada_list, show_ada_list): New static variables.
3059 (set_ada_command, show_ada_command): New functions.
3060 (_initialize_ada_language): Add new "set/show ada" prefix commands.
3061 Add new "set/show ada trust-PAD-over-XVS" setting.
3062
3063 2010-01-18 Tom Tromey <tromey@redhat.com>
3064 Thiago Jung Bauermann <bauerman@br.ibm.com>
3065
3066 Allow "source" to load python scripts.
3067 * exceptions.h (enum errors): Add UNSUPPORTED_ERROR.
3068 * python/python.c (source_python_script): New function.
3069 * python/python.h (source_python_script): Add declaration.
3070 * cli/cli-cmds.c: #include exceptions.h and python/python.h.
3071 (script_ext_off, script_ext_soft, script_ext_strict)
3072 (script_ext_enums, script_ext_mode): New static constants.
3073 (show_script_ext_mode, find_and_open_script): New functions.
3074 (source_script): Enhance to handle Python scripts.
3075 (init_cli_cmds): Add set/show script-extension commands.
3076
3077 2010-01-16 Stan Shebs <stan@codesourcery.com>
3078
3079 * tracepoint.h (struct trace_status): Use unsigned long long
3080 instead of size_t.
3081 * tracepoint.c (trace_status_command): Fix printf directive.
3082 (trace_save_command): Check fwrite returns, fix printf directive.
3083 (trace_filename): New global.
3084 (tfile_open): Set it, check read returns.
3085 (tfile_close): Free trace_filename.
3086 (tfile_get_traceframe_address): Check read returns.
3087 (tfile_trace_find): Ditto.
3088 (tfile_fetch_registers): Ditto.
3089 (tfile_xfer_partial): Ditto.
3090 (tfile_get_trace_state_variable_value): Ditto.
3091
3092 2010-01-15 Stan Shebs <stan@codesourcery.com>
3093
3094 Add trace file support.
3095 * tracepoint.h (enum trace_stop_reason): New enum.
3096 (struct trace_status): New struct.
3097 (parse_trace_status): Declare.
3098 (struct uploaded_tp): Move here from remote.c,
3099 add fields for actions.
3100 (struct uploaded_tsv): New struct.
3101 * tracepoint.c (tfile_ops): New target vector.
3102 (trace_fd): New global.
3103 (tfile_open): New function.
3104 (tfile_close): New function.
3105 (tfile_files_info): New function.
3106 (tfile_get_trace_status): New function.
3107 (tfile_get_traceframe_address): New function.
3108 (tfile_trace_find): New function.
3109 (tfile_fetch_registers): New function.
3110 (tfile_xfer_partial): New function.
3111 (tfile_get_trace_state_variable_value): New function.
3112 (init_tfile_ops): New function.
3113 (_initialize_tracepoint): Call it, add tfile target.
3114 (trace_status): New global.
3115 (current_trace_status): New function.
3116 (trace_running_p): Remove, change all users to get from
3117 current_trace_status()->running.
3118 (get_trace_status): Remove.
3119 (trace_status_command): Call target_get_trace_status directly,
3120 report more detail including tracing stop reasons.
3121 (trace_find_command): Always allow tfind on a file.
3122 (trace_find_pc_command): Ditto.
3123 (trace_find_tracepoint_command): Ditto.
3124 (trace_find_line_command): Ditto.
3125 (trace_find_range_command): Ditto.
3126 (trace_find_outside_command): Ditto.
3127 (trace_frames_offset, cur_offset): Declare as off_t.
3128 (trace_regblock_size): Rename from reg_size, update users.
3129 (parse_trace_status): New function.
3130 (tfile_interp_line): New function.
3131 (disconnect_or_stop_tracing): Ensure current trace
3132 status before asking what to do.
3133 (stop_reason_names): New global.
3134 (trace_save_command): New command.
3135 (get_uploaded_tp): Move here from remote.c.
3136 (find_matching_tracepoint): Ditto.
3137 (merge_uploaded_tracepoints): New function.
3138 (parse_trace_status): Use stop_reason_names.
3139 (_initialize_tracepoint): Define tsave command.
3140 * target.h (target_ops): New fields to_save_trace_data,
3141 to_upload_tracepoints, to_upload_trace_state_variables,
3142 to_get_raw_trace_data, change to_get_trace_status
3143 to take a pointer to a status struct.
3144 (target_save_trace_data): New macro.
3145 (target_upload_tracepoints): New macro.
3146 (target_upload_trace_state_variables): New macro.
3147 (target_get_raw_trace_data): New macro.
3148 * target.c (update_current_target): Add new methods, change
3149 signature of to_get_trace_status.
3150 * remote.c (hex2bin): Make globally visible.
3151 (bin2hex): Ditto.
3152 (remote_download_trace_state_variable): Download name also.
3153 (remote_get_trace_status): Update parameter, use
3154 parse_trace_status.
3155 (remote_save_trace_data): New function.
3156 (remote_upload_tracepoints): New function.
3157 (remote_upload_trace_state_variables): New function.
3158 (remote_get_raw_trace_data): New function.
3159 (remote_start_remote): Use them.
3160 (_initialize_remote_ops): Add operations.
3161 * ax-gdb.c: Include breakpoint.h.
3162 * breakpoint.c (create_tracepoint_from_upload): Use
3163 break_command_really, return tracepoint, warn about unimplemented
3164 parts.
3165 * NEWS: Mention trace file addition.
3166
3167 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3168
3169 Fix compilation warning on gcc-3.4.
3170 * exec.c (print_section_info): Move the `displacement' variable
3171 initialization to its declaration.
3172
3173 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3174
3175 * gdb-gdb.py (StructMainTypePrettyPrinter): Fix TYPE_CODE_RANGE
3176 comparison.
3177
3178 2010-01-15 Eric Botcazou <botcazou@adacore.com>
3179
3180 "info tasks" broken by typedefs in ATCB type definitions.
3181 * ada-lang.c (ada_template_to_fixed_record_type_1): Add call to
3182 ada_check_typedef before retrieving the length of the type for
3183 regular fields.
3184
3185 2010-01-15 Joel Brobecker <brobecker@adacore.com>
3186
3187 Do not use name-based lookup for unconstrained packed arrays.
3188 * ada-lang.c (find_parallel_type_by_descriptive_type):
3189 Limit the fallback to name-based lookups to the case where
3190 the type is a constrained packed array.
3191
3192 2010-01-15 Joel Brobecker <brobecker@adacore.com>
3193
3194 Enhance gdb-gdb.py to handle main_type.type_specific.
3195 * gdb-gdb.py: Print the type-specific part of struct main_type.
3196
3197 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3198
3199 * configure.ac (AC_CHECK_FUNCS): Check for setrlimit and getrlimit.
3200 * configure: Regenerate.
3201 * config.in: Regenerate.
3202 * utils.c: Include sys/resource.h.
3203 (dump_core, can_dump_core): New.
3204 (internal_vproblem): Update the comment. Check can_dump_core while
3205 setting dump_core_p. Replace two abort calls by dump_core calls.
3206
3207 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
3208 Eli Zaretskii <eliz@gnu.org>
3209
3210 * NEWS: Document the PIE support.
3211
3212 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
3213
3214 * linux-tdep.c: Remove includes gdbcore.h, observer.h and elf-bfd.h.
3215 (check_is_pie_binary, _initialize_linux_tdep): Remove.
3216
3217 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
3218
3219 * solib-svr4.c (svr4_exec_displacement): New comment for entry_point.
3220 Replace exec_entry_point call by bfd_get_start_address.
3221
3222 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
3223
3224 Support Valgrind attachments broken by the PIE support.
3225 * auxv.c: Include gdbcore.h.
3226 (procfs_xfer_auxv): Make static. Reduce its comment. Drop its
3227 parameters ops, object and annex. Remove their assertions.
3228 (ld_so_xfer_auxv, memory_xfer_auxv): New function.
3229 * auxv.h (procfs_xfer_auxv): Remove comment. Rename to ...
3230 (memory_xfer_auxv): ... here.
3231 * linux-nat.c (linux_xfer_partial): Rename procfs_xfer_auxv to
3232 memory_xfer_auxv.
3233 * procfs.c (procfs_xfer_partial): Likewise.
3234 * solib-svr4.c (svr4_relocate_main_executable): New prototype.
3235 (svr4_special_symbol_handling): Call svr4_relocate_main_executable.
3236 (svr4_solib_create_inferior_hook): Conditionalize the
3237 svr4_relocate_main_executable call.
3238
3239 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
3240
3241 * solib-svr4.c (scan_dyntag): Remove variable dyn_addr. New variable
3242 target_section. Find SECT in current_target_sections, gdb_assert it.
3243 (elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile.
3244 New variable abfd.
3245 * symtab.c (lookup_objfile_from_block): Return the binary file instead
3246 of separate debug info file.
3247
3248 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
3249
3250 Support PIEs with no symfile_objfile.
3251 * exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point.
3252 * solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block.
3253
3254 2010-01-14 Jan Kratochvil <jan.kratochvil@redhat.com>
3255
3256 * solib-svr4.c (svr4_relocate_main_executable): Move the static exec
3257 code part to ...
3258 (svr4_static_exec_displacement): ... a new function.
3259 (svr4_exec_displacement): New function.
3260 (svr4_relocate_main_executable): Call svr4_exec_displacement. Allocate
3261 new_offsets using alloca now. Remove variable old_chain and changed.
3262 Call objfile_relocate unconditionally now.
3263
3264 2010-01-14 Doug Evans <dje@google.com>
3265
3266 * gdbtypes.c (arch_flags_type): Fix comment.
3267 * gdbtypes.h (arch_composite_type): Fix comment.
3268
3269 2009-01-14 Tristan Gingold <gingold@adacore.com>
3270
3271 * machoread.c (macho_add_oso_symfile): Add symfile_flags parameter.
3272 Call xstrdup for abfd->filename. Pass symfile_flags and objfile flags
3273 to symbol_file_add_from_bfd. Add OSO as separate objfile.
3274 (macho_oso_symfile): Add symfile_flags parameter. Pass it to
3275 macho_add_oso_symfile.
3276 (macho_symfile_read): Pass symfile_flags to macho_oso_symfile.
3277
3278 2010-01-14 Joel Brobecker <brobecker@adacore.com>
3279
3280 Tru64: Dead threads are never deleted.
3281 * dec-thread.c (dec_thread_ptid_is_alive): New function.
3282 (dec_thread_count_gdb_threads): Fix counter increment.
3283 (dec_thread_add_gdb_thread): Fix *listp increment.
3284 (resync_thread_list): Fix bug in deletion of dead threads that
3285 caused all threads to be deleted, instead of just the dead ones.
3286
3287 2010-01-13 Phil Muldoon <pmuldoon@redhat.com>
3288
3289 PR python/10705
3290
3291 * python/python-internal.h: Add lazy_string_object_type
3292 definition.
3293 (create_lazy_string_object, gdbpy_initialize_lazy_string)
3294 (gdbpy_is_lazystring, gdbpy_extract_lazy_string): Define.
3295 * python/py-value.c (valpy_lazy_string): New function.
3296 (convert_value_from_python): Add lazy string conversion.
3297 * python/py-prettyprint.c (pretty_print_one_value): Check if
3298 return is also a lazy string.
3299 (print_string_repr): Add lazy string printing branch.
3300 (print_children): Likewise.
3301 * python/py-lazy-string.c: New file. Implement lazy strings.
3302 * python/python.c (_initialize_python): Call
3303 gdbpy_initialize_lazy_string.
3304 * varobj.c (value_get_print_value): Add lazy string printing
3305 branch. Account for encoding.
3306 * c-lang.c (c_printstr): Account for new encoding argument. If
3307 encoding is NULL, find encoding suited for type, otherwise use
3308 user encoding.
3309 * language.h (language_defn): Add encoding argument.
3310 (LA_PRINT_STRING): Likewise.
3311 * language.c (unk_lang_printstr): Update to reflect new encoding
3312 argument to language_defn.
3313 * ada-lang.h (ada_printstr): Likewise.
3314 * c-lang.h (c_printstr): Likewise.
3315 * p-lang.h (pascal_printstr);
3316 * f-lang.c (f_printstr): Likewise.
3317 * m2-lang.c (m2_printstr): Likewise.
3318 * objc-lang.c (objc_printstr): Likewise.
3319 * p-lang.c (pascal_printstr): Likewise.
3320 * scm-lang.c (scm_printstr): Likewise.
3321 * c-valprint.c (c_val_print): Update LA_PRINT_STRING call for
3322 encoding argument.
3323 * ada-valprint.c (ada_printstr): Likewise.
3324 * f-valprint.c (f_val_print): Likewise
3325 * m2-valprint.c (m2_val_print): Likewise.
3326 * p-valprint.c (pascal_val_print): Likewise.
3327 * expprint.c (print_subexp_standard): Likewise.
3328 * valprint.c (val_print_string): Likewise.
3329 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-lazy-string.
3330 (SUBDIR_PYTHON_SRCS): Likewise.
3331 (py-lazy-string.o): New rule.
3332
3333 2010-01-13 Doug Evans <dje@google.com>
3334
3335 * mi/mi-main.c (list_available_thread_groups): Avoid "may be used
3336 uninitialized" warning from gcc on local `tree'.
3337
3338 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3339
3340 Implement core awareness.
3341
3342 * bcache.c (compare_ints): Remove
3343 (print_percentage): Use compare_positive_ints.
3344 * defs.h (compare_positive_ints): Declare.
3345 * linux-nat.h (struct lin_lwp): New field core.
3346 (linux_nat_core_of_thread_1): Declare.
3347 * linux-nat.c (add_lwp): Init the 'core' field.
3348 (linux_nat_wait_1): Record the core.
3349 (linux_nat_core_of_thread_1, linux_nat_core_of_thread): New.
3350 (linux_nat_add_target): Register the above.
3351 * linux-thread-db.c (update_thread_core): New.
3352 (thread_db_find_new_threads): Update core information for
3353 every thread.
3354 * remote.c (struct private_thread_info): New.
3355 (free_private_thread_info, demand_private_info): New.
3356 (PACKET_qXfer_threads, use_osdata_threads): New.
3357 (struct thread_item, threads_parsing_context
3358 (start_thread, end_thread, thread_attributes)
3359 (thread_children, threads_children, threads_elements): New.
3360 (remote_threads_info): Try qXfer:threads before anything
3361 else.
3362 (remote_protocol_packets): Register qXfer:threads.
3363 (remote_open_1): Init use_osdata_threads.
3364 (struct stop_reply): New field 'core'.
3365 (remote_parse_stop_reply): Parse core number.
3366 (process_stop_reply): Record core number.
3367 (remote_xfer_partial): Handle qXfer:threads.
3368 (remote_core_of_thread): New.
3369 (init_remote_ops): Register remote_core_of_thread.
3370 (_initialize_remote): Register qXfer:read.
3371 * target.c (target_core_of_thread): New
3372 * target.h (enum target_object): New value TARGET_OBJECT_THREADS.
3373 (struct target_ops): New field to_core_of_threads.
3374 (target_core_of_thread): Declare.
3375 * gdbthread.h (struct thread_info): New field private_dtor.
3376 * thread.c (print_thread_info): Report the core.
3377 * ui-out.c (MAX_UI_OUT_LEVELS): Increase.
3378 * utils.c (compare_positive_ints): New.
3379 * features/threads.dtd: New.
3380 * mi/mi-interp.c (mi_on_normal_stop): Report the core.
3381 * mi/mi-main.c (struct collect_cores_data, collect_cores)
3382 (do_nothing, free_vector_of_osdata_items)
3383 (splay_tree_int_comparator, free_splay_tree): New.
3384 (print_one_inferior_data): Implemented printing of selected
3385 inferiors. Collect and print cores.
3386 (output_cores): New.
3387 (mi_cmd_list_thread_groups): Support --recurse. Permit specifying
3388 thread groups together with --available.
3389
3390 2010-01-12 Jan Kratochvil <jan.kratochvil@redhat.com>
3391
3392 * configure: Regenerate (for _STRUCTURED_PROC).
3393
3394 2010-01-12 Joel Brobecker <brobecker@adacore.com>
3395
3396 Delete dead function.
3397 * ada-lang.c (extract_string): Delete. No longer used.
3398
3399 2010-01-12 Joel Brobecker <brobecker@adacore.com>
3400
3401 Fix -Wunused warning in dec-thread.c.
3402 * dec-thread.c (dec_thread_count_gdb_threads)
3403 (dec_thread_add_gdb_thread): Prevent -Wunused warning.
3404
3405 2010-01-12 Joel Brobecker <brobecker@adacore.com>
3406
3407 * ada-valprint.c (ada_print_floating): Remove trailing space.
3408
3409 2010-01-12 Joel Brobecker <brobecker@adacore.com>
3410
3411 Add support for DW_AT_GNAT_descriptive_type.
3412 * gdbtypes.h (enum type_specific_kind): New enum.
3413 (struct main_type) [type_specific_field]: New component.
3414 [type_specific]: Add new component "gnat_stuff".
3415 (struct gnat_aux_type): New type.
3416 (INIT_CPLUS_SPECIFIC): Also set TYPE_SPECIFIC_FIELD (type).
3417 (HAVE_CPLUS_STRUCT): Also check TYPE_SPECIFIC_FIELD (type).
3418 (gnat_aux_default, allocate_gnat_aux_type): Add declaration.
3419 (INIT_GNAT_SPECIFIC, ALLOCATE_GNAT_AUX_TYPE, HAVE_GNAT_AUX_INFO)
3420 (TYPE_SPECIFIC_FIELD): New macros.
3421 (TYPE_CPLUS_SPECIFIC): Return cplus_struct_default if the given
3422 type does not hold any cplus-specific data.
3423 (TYPE_RAW_CPLUS_SPECIFIC): New macro.
3424 (TYPE_GNAT_SPECIFIC, TYPE_DESCRIPTIVE_TYPE): New macros.
3425 (TYPE_IS_OPAQUE): Use HAVE_CPLUS_STRUCT to check if type has
3426 cplus-specific data.
3427 * gdbtypes.c (allocate_cplus_struct_type): Minor stylistic rewrite.
3428 Set new component TYPE_SPECIFIC_FIELD (type).
3429 (gnat_aux_default): New constant.
3430 (allocate_gnat_aux_type): New function.
3431 (init_type): Add initialization the type-specific stuff for
3432 TYPE_CODE_FLT and TYPE_CODE_FUNC types.
3433 (print_gnat_stuff): New function.
3434 (recursive_dump_type): Use HAVE_CPLUS_STRUCT to check for cplus-
3435 specific data. Adjust code that prints the contents of the
3436 type-specific union using the TYPE_SPECIFIC_FIELD value.
3437 * dwarf2read.c (dwarf2_attach_fields_to_type): Do not allocate
3438 the type cplus stuff for Ada types.
3439 (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
3440 Error out if these routines are called with an Ada type.
3441 (read_structure_type, read_array_type, read_subrange_type):
3442 Add call to set_descriptive_type.
3443 (set_die_type): Initialize the gnat-specific data if necessary.
3444 (need_gnat_info, die_descriptive_type, set_descriptive_type):
3445 New functions.
3446 * ada-lang.c (decode_constrained_packed_array_type): Use
3447 decode_constrained_packed_array_type instead of doing a standard
3448 lookup to locate a parallel type.
3449 (find_parallel_type_by_descriptive_type): New function.
3450 (ada_find_parallel_type_with_name): New function.
3451 (ada_find_parallel_type): Reimplement using
3452 ada_find_parallel_type_with_name.
3453 * ada-valprint.c (print_field_values): Use HAVE_CPLUS_STRUCT
3454 to check if type has a cplus stuff.
3455 * linespec.c (total_number_of_methods): Likewise.
3456 * mdebugread.c (new_type): Likewise.
3457
3458 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
3459
3460 * NEWS: Document the 0b binary number prefix parsing.
3461
3462 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
3463
3464 * objfiles.c (objfile_relocate1): Change the return type to int.
3465 Describe the new return value. Return non-zero if data changed.
3466 (objfile_relocate): New variable changed. Set it. Call
3467 breakpoint_re_set depending on CHANGED.
3468
3469 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
3470
3471 Implement binary numbers parsing.
3472 * c-exp.y (parse_number): New case 'b' and 'B'.
3473
3474 2010-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
3475 Tristan Gingold <gingold@adacore.com>
3476
3477 * solib.c (info_sharedlibrary_command): Replace
3478 objfile_has_partial_symbols and objfile_has_full_symbols calls by
3479 objfile_has_symbols.
3480
3481 2010-01-10 Joel Brobecker <brobecker@adacore.com>
3482
3483 * NEWS: Document the improvements made to the mips-irix port.
3484
3485 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3486
3487 Fix the documentation of valprint.c:value_print.
3488 * valprint.c (value_print): Update the function description to
3489 mention that the syntax of the output follows the current_language,
3490 not necessarily C.
3491
3492 2010-01-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3493
3494 Fix displacement of separate debug info files.
3495 * objfiles.c (objfile_relocate): Rename to ...
3496 (objfile_relocate1): ... here and make it static. Extend the comment.
3497 (objfile_relocate): New function.
3498 * solib-spu.c (spu_relocate_main_executable): Explicitly check if
3499 SYMFILE_OBJFILE is NULL. Remove variables objfile and old_chain.
3500 Remove following of SEPARATE_DEBUG_OBJFILE. new_offsets is now
3501 allocated using alloca.
3502 * symfile.c (copy_section_addr_info): Remove.
3503 (build_section_addr_info_from_objfile): Make it global. New variables
3504 addr_bit and mask, use them.
3505 * symfile.h (build_section_addr_info_from_objfile): New prototype.
3506 (copy_section_addr_info): Remove.
3507
3508 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3509
3510 Signal unwinder for mips-irix N32.
3511 * mips-irix-tdep.c: #include mips-tdep.h, trad-frame.h, and
3512 tramp-frame.h.
3513 (SIGTRAMP_FRAME_SIZE, SIGCONTEXT_PC_OFF, SIGCONTEXT_REGS_OFF)
3514 (SIGCONTEXT_FPREGS_OFF, SIGCONTEXT_FPCSR_OFF, SIGCONTEXT_HI_OFF)
3515 (SIGCONTEXT_LO_OFF): New macros.
3516 (mips_irix_n32_tramp_frame_init): New function.
3517 (mips_irix_n32_tramp_frame): New static constant.
3518 (mips_irix_init_abi): Prepend the mips_irix_n32_tramp_frame unwinder.
3519
3520 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3521
3522 Breakpoint in shared library does not work on mips-irix.
3523 * procfs.c: #include "observer.h".
3524 (procfs_inferior_created): New function, moving here the code
3525 which unsets the syssgi syscall-exit notifications.
3526 (procfs_create_inferior): Remove the code which unsets the syssgi
3527 syscall-exit notifications. It is too early to do this here.
3528 (_initialize_procfs): Attach the procfs_inferior_created observer.
3529
3530 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3531
3532 Wrong return convention for arrays (mips-irix).
3533 * mips-tdep.c (mips_n32n64_return_value): Arrays whose size is
3534 128 bits or smaller are returned the same way as structs
3535 and unions of the the same size.
3536
3537 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3538
3539 Cannot set the PC on mips-irix.
3540 * irix5-nat.c (fill_gregset): Check regno against the raw PC
3541 register number, no the cooked one.
3542
3543 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3544
3545 Error while loading core file on mips-irix.
3546 * solib-irix.c (irix_solib_create_inferior_hook): Do nothing
3547 if debugging from a core file.
3548
3549 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3550
3551 GDB hangs when attaching to process on mips-irix.
3552 * solib-irix.c (irix_solib_create_inferior_hook): Do nothing if
3553 attaching to a process.
3554
3555 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3556
3557 Use the correct breakpoint instruction on mips-irix.
3558 * mips-tdep.c (mips_breakpoint_from_pc): Add new static variable
3559 containing the correct breakpoint instruction to use on mips-irix.
3560 Use it when the osabi is GDB_OSABI_IRIX.
3561
3562 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3563
3564 -Wunused warning in procfs.c (mips-irix only).
3565 * procfs.c (gdb_praddset, gdb_prdelset): New macros. Use them
3566 throughout instead of using praddset and prdelset respectively.
3567
3568 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3569
3570 GDB crash while stepping into function.
3571 * infrun.c (handle_inferior_event): Refetch the current frame
3572 after handling what.main_action, in case that pointer became
3573 dangling.
3574
3575 2010-01-09 Joel Brobecker <brobecker@adacore.com>
3576
3577 Fix build failure of solaris-hosted cross debuggers.
3578 * ada-valprint.c, parse.c: Include defs.h before including ctype.h.
3579
3580 2010-01-09 Daniel Gutson <dgutson@codesourcery.com>
3581
3582 Fix build failure on sparc-solaris.
3583 * procfs.c: (procfs_do_thread_registers) Use elfcore_write_lwpstatus.
3584
3585 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3586
3587 Move some symfile code into subroutines.
3588 * symfile.h (relative_addr_info_to_section_offsets)
3589 (addr_info_make_relative): New prototypes.
3590 * symfile.c (default_symfile_offsets): Move a part to ...
3591 (relative_addr_info_to_section_offsets): ... this new function.
3592 (default_symfile_offsets): Call it.
3593 (syms_from_objfile <!mainline && addrs && addrs->other[0].name>): Move
3594 this part to ...
3595 (addr_info_make_relative): ... this new function.
3596
3597 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3598
3599 Add from_tty to solib_create_inferior_hook.
3600 * infcmd.c (post_create_inferior): Move solib_add after
3601 solib_create_inferior_hook. Pass from_tty to
3602 solib_create_inferior_hook. Call solib_add and SOLIB_ADD with
3603 0 from_tty and comment why.
3604 * infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0.
3605 * linux-nat.c (linux_child_follow_fork): Likewise.
3606 * nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise.
3607 * solib-darwin.c (darwin_solib_create_inferior_hook): New parameter
3608 from_tty.
3609 * solib-frv.c (frv_solib_create_inferior_hook): Likewise.
3610 * solib-irix.c (irix_solib_create_inferior_hook): Likewise.
3611 * solib-null.c (null_solib_create_inferior_hook): Likewise.
3612 * solib-osf.c (osf_solib_create_inferior_hook): Likewise.
3613 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
3614 * solib-som.c (som_solib_create_inferior_hook): Likewise.
3615 * solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty.
3616 Pass it to svr4_so_ops.solib_create_inferior_hook.
3617 * solib-sunos.c (sunos_solib_create_inferior_hook): New parameter
3618 from_tty.
3619 * solib-svr4.c (enable_break): New parameter from_tty. Pass it to
3620 solib_add.
3621 (svr4_solib_create_inferior_hook): New parameter from_tty. Pass it to
3622 enable_break.
3623 * solib-target.c (solib_target_solib_create_inferior_hook): New
3624 parameter from_tty.
3625 * solib.c (solib_create_inferior_hook): New parameter from_tty. Pass
3626 it to ops->solib_create_inferior_hook.
3627 (reload_shared_libraries): Pass from_tty to solib_create_inferior_hook.
3628 Move solib_add after solib_create_inferior_hook, call it now with
3629 from_tty as 0. New comment there.
3630 * solib.h (solib_create_inferior_hook): New parameter from_tty.
3631 * solist.h (struct target_so_ops <solib_create_inferior_hook>):
3632 Likewise.
3633
3634 2010-01-08 Vladimir Prus <vladimir@codesourcery.com>
3635
3636 Fix multiexec race.
3637 * infrun.c (handle_inferior_event): Use get_thread_regcache
3638 with events ptid, not get_current_regcache.
3639
3640 2009-01-08 Joel Brobecker <brobecker@adacore.com>
3641
3642 GDB crash with empty executable name (MinGW).
3643 * source.c (openp): Add assert that parameter string is not NULL.
3644 if parameter string is an empty string, then return with a failure
3645 immediately.
3646
3647 2009-01-08 Joel Brobecker <brobecker@adacore.com>
3648
3649 Get rid of support for VAX Floats.
3650 * ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
3651 (ada_vax_float_print_function): Delete.
3652 * ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
3653 (ada_vax_float_print_function): Delete.
3654 * ada-typeprint.c (print_vax_floating_point_type): Delete.
3655 (ada_print_type): Remove support for VAX floats.
3656 * ada-valprint.c (ada_val_print_1): Remove support for VAX floats.
3657
3658 2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3659
3660 * stabsread.c (read_args): Handle zero arguments.
3661
3662 2009-01-08 Joel Brobecker <brobecker@adacore.com>
3663
3664 Cannot find in-tree libiconv.a after reconfigure.
3665 * acinclude.m4 (AM_ICONV): If we find an in-tree libiconv.a
3666 that we can use, then cache the path to this archive.
3667 * configure: Regenerate.
3668
3669 2010-01-07 Stan Shebs <stan@codesourcery.com>
3670
3671 Make tracepoint operations go through target vector.
3672 * target.h (enum trace_find_type): New enum.
3673 (struct target_ops): New fields to_trace_init,
3674 to_download_tracepoint, to_download_trace_state_variable,
3675 to_trace_set_readonly_regions, to_trace_start, to_get_trace_status,
3676 to_trace_stop, to_trace_find, to_get_trace_state_variable_value,
3677 to_set_disconnected_tracing.
3678 (target_trace_init): New macro.
3679 (target_download_tracepoint): New macro.
3680 (target_download_trace_state_variable): New macro.
3681 (target_trace_start): New macro.
3682 (target_trace_set_readonly_regions): New macro.
3683 (target_get_trace_status): New macro.
3684 (target_trace_stop): New macro.
3685 (target_trace_find): New macro.
3686 (target_get_trace_state_variable_value): New macro.
3687 (target_set_disconnected_tracing): New macro.
3688 * target.c (update_current_target): Inherit and set defaults for
3689 tracepoint operations.
3690 * tracepoint.c (default_collect): Make globally visible.
3691 (target_is_remote): Remove, along with all calls.
3692 (tvariables_info): Call target_get_trace_state_variable_value.
3693 (remote_set_transparent_ranges): Remove.
3694 (trace_start_command): Call target_trace_init,
3695 target_download_tracepoint, etc.
3696 (download_tracepoint): Remove.
3697 (trace_stop_command): Simplify.
3698 (stop_tracing): Call target_trace_stop.
3699 (get_trace_status): Call target_get_trace_status.
3700 (trace_status_command): Add case for targets that cannot trace.
3701 (finish_tfind_command): Change to take numerical arguments, call
3702 target_trace_find.
3703 (trace_find_command): Update call to finish_tfind_command.
3704 (trace_find_pc_command): Ditto.
3705 (trace_find_tracepoint_command): Ditto.
3706 (trace_find_line_command): Ditto.
3707 (trace_find_range_command): Ditto.
3708 (trace_find_outside_command): Ditto.
3709 (set_disconnected_tracing_value): Call
3710 target_set_disconnected_tracing.
3711 * remote.c: Add protocol encoding bits from tracepoint.c.
3712 (trace_error): Move from tracepoint.c.
3713 (remote_get_noisy_reply): Ditto.
3714 (free_actions_list_cleanup_wrapper): Ditto.
3715 (free_actions_list): Ditto.
3716 (remote_trace_init): New function.
3717 (remote_download_tracepoint): New function.
3718 (remote_download_trace_state_variable): New function.
3719 (remote_trace_set_readonly_regions): New function.
3720 (remote_trace_start): New function.
3721 (remote_get_trace_status): New function.
3722 (remote_trace_stop): New function.
3723 (remote_trace_find): New function.
3724 (remote_download_trace_state_variable): New function.
3725 (remote_set_disconnected_tracing): New function.
3726 (init_remote_ops): Add tracepoint operations.
3727
3728 * tracepoint.c (trace_dump_command): Don't decr_pc_after_break.
3729
3730 2010-01-07 Tristan Gingold <gingold@adacore.com>
3731
3732 * symfile.c (build_section_addr_info_from_objfile): New function.
3733 (symbol_file_add_separate): Don't use offsets from objfile but
3734 built an addr info.
3735
3736 2010-01-06 Stan Shebs <stan@codesourcery.com>
3737
3738 Support disconnected tracing.
3739 * infcmd.c (detach_command): Ask whether to stop tracing.
3740 * cli/cli-cmds.c (quit_command): Ditto.
3741 * breakpoint.h (struct breakpoint): New field number_on_target.
3742 * breakpoint.c (create_tracepoint_from_upload): New function.
3743 (get_tracepoint_by_number_on_target): New function.
3744 * remote.c (struct remote): New field disconnected_tracing.
3745 (remote_disconnected_tracing_feature): New function.
3746 (remote_protocol_features): Add DisconnectedTracing.
3747 (struct uploaded_tp): New struct.
3748 (uploaded_tps): New global.
3749 (get_uploaded_tp): New function.
3750 (find_matching_tracepoint): New function.
3751 (remote_get_tracing_state): New function.
3752 (remote_start_remote): Call it.
3753 * tracepoint.c (disconnected_tracing): New global.
3754 (trace_start_command): Initialize number_on_target.
3755 (stop_tracing): New function, split out from...
3756 (trace_stop_command): Call stop_tracing.
3757 (get_trace_status): New function, split out from...
3758 (trace_status_command): Call get_trace_status, add info on
3759 disconnection behavior.
3760 (disconnect_or_stop_tracing): New function.
3761 (finish_tfind_command): Translate from number on target.
3762 (trace_find_tracepoint_command): Translate to number on target.
3763 (send_disconnected_tracing_value): New function.
3764 (set_disconnected_tracing): New function.
3765 (_initialize_tracepoint): Add disconnected-tracing variable.
3766 * NEWS: Mention disconnected tracing.
3767
3768 2010-01-06 Tristan Gingold <gingold@adacore.com>
3769
3770 * symtab.c (lookup_global_symbol_from_objfile): Rename objfile
3771 parameter to main_objfile. Iterate on all separate debug objfiles.
3772 * symfile.h (symbol_file_add_separate)
3773 (find_separate_debug_file_by_debuglink): Remove parameter names.
3774 * symfile.c (symbol_file_add_separate): Use add_separate_objfile.
3775 (reread_symbols): Use free_objfile_separate_debug.
3776 * objfiles.h (struct objfile): Add separate_debug_objfile_link.
3777 Adjust comment.
3778 (objfile_separate_debug_iterate, add_separate_debug_objfile)
3779 (free_objfile_separate_debug): New prototypes.
3780 * objfiles.c (objfile_separate_debug_iterate): New function.
3781 (add_separate_debug_objfile, free_objfile_separate_debug): New
3782 functions.
3783 (free_objfile): Use free_objfile_separate_debug. Adjust for
3784 multiple separate debug objfile.
3785 (objfile_has_symbols): Adjust comment. Iterate on all separate
3786 debug objfiles.
3787 * minsyms.c (lookup_minimal_symbol): Adjust for multiple separate
3788 debug objfile.
3789 (lookup_minimal_symbol_text): Ditto.
3790 (lookup_minimal_symbol_by_pc_name): Ditto.
3791 (lookup_minimal_symbol_solib_trampoline): Ditto.
3792 (lookup_minimal_symbol_by_pc_section_1): Iterate on all separate
3793 debug objfiles.
3794
3795 2010-01-05 Stan Shebs <stan@codesourcery.com>
3796
3797 Add fast tracepoints.
3798 * arch-utils.h (default_fast_tracepoint_valid_at): Declare.
3799 * arch-utils.c (default_fast_tracepoint_valid_at): New function.
3800 * breakpoint.h (enum bptype): Add bp_fast_tracepoint.
3801 * breakpoint.c (tracepoint_type): New function.
3802 (ALL_TRACEPOINTS): Use it.
3803 (should_be_inserted): Ditto.
3804 (bpstat_check_location): Ditto.
3805 (print_one_breakpoint_location): Ditto.
3806 (user_settable_breakpoint): Ditto.
3807 (set_breakpoint_location_function): Ditto.
3808 (disable_breakpoints_in_shlibs): Ditto.
3809 (delete_trace_command): Ditto.
3810 (print_it_typical): Add bp_fast_tracepoint case.
3811 (bpstat_what): Ditto.
3812 (print_one_breakpoint_location): Ditto.
3813 (allocate_bp_location): Ditto.
3814 (mention): Ditto.
3815 (breakpoint_re_set_one): Ditto.
3816 (disable_command): Ditto.
3817 (enable_command): Ditto.
3818 (check_fast_tracepoint_sals): New function.
3819 (break_command_really): Call it.
3820 (ftrace_command): New function.
3821 (_initialize_breakpoint): Add ftrace command.
3822 * gdbarch.sh (fast_tracepoint_valid_at): New.
3823 * gdbarch.h, gdbarch.c: Regenerate.
3824 * i386-tdep.c (i386_fast_tracepoint_valid_at): New function.
3825 (i386_gdbarch_init): Use it.
3826 * remote.c (struct remote_state): New field fast_tracepoints.
3827 (PACKET_FastTracepoints): New packet config type.
3828 (remote_fast_tracepoint_feature): New function.
3829 (remote_protocol_features): Add FastTracepoints.
3830 (remote_supports_fast_tracepoints): New function.
3831 (_initialize_remote): Add FastTracepoints.
3832 * tracepoint.c (download_tracepoint): Add fast tracepoint option.
3833 * NEWS: Mention fast tracepoints.
3834
3835 2010-01-06 Joel Brobecker <brobecker@adacore.com>
3836
3837 * gdb-gdb.py: New file.
3838
3839 2010-01-05 Michael Snyder <msnyder@vmware.com>
3840
3841 * infrun.c (handle_inferior_event): Fix typo in comment.
3842
3843 2010-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3844
3845 * symfile.c (syms_from_objfile): Remove the !MAINLINE conditional.
3846
3847 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3848
3849 * features/Makefile (WHICH): Add s390-linux32, s390-linux64,
3850 and s390x-linux64.
3851 (s390-linux32-expedite): Define.
3852 (s390-linux64-expedite): Define.
3853 (s390x-linux64-expedite): Define.
3854 * features/s390-acr.xml: New file.
3855 * features/s390-fpr.xml: New file.
3856 * features/s390-core32.xml: New file.
3857 * features/s390-core64.xml: New file.
3858 * features/s390x-core64.xml: New file.
3859 * features/s390-linux32.xml: New file.
3860 * features/s390-linux64.xml: New file.
3861 * features/s390x-linux64.xml: New file.
3862 * features/s390-linux32.c: New generated file.
3863 * features/s390-linux64.c: New generated file.
3864 * features/s390x-linux64.c: New generated file.
3865
3866 * regformats/s390-linux32.dat: New generated file.
3867 * regformats/s390-linux64.dat: New generated file.
3868 * regformats/s390x-linux64.dat: New generated file.
3869 * regformats/reg-s390.dat: Remove.
3870 * regformats/reg-s390x.dat: Remove.
3871
3872 * s390-nat.c: Include "auxv.h" and <elf.h>.
3873 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3874 (s390_target_wordsize): New function.
3875 (s390_auxv_parse): Likewise.
3876 (s390_get_hwcap): Likewise.
3877 (s390_read_description): Likewise.
3878 (_initialize_s390_nat): Install s390_auxv_parse and
3879 s390_read_description.
3880
3881 * s390-tdep.c: Include "features/s390-linux32.c",
3882 "features/s390-linux64.c", and "features/s390x-linux64.c".
3883 (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
3884 (s390_register_call_saved): New function.
3885 (s390_register_name): Remove.
3886 (s390_register_type): Remove.
3887 (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
3888 (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
3889 (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
3890 (s390_pseudo_register_name): New function.
3891 (s390_pseudo_register_type): New function.
3892 (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
3893 Handle full GPR pesudos and varying pseudo register numbers.
3894 (s390_pseudo_register_write): Likewise
3895 (s390x_pseudo_register_read): Remove.
3896 (s390x_pseudo_register_write): Likewise.
3897 (s390_register_group): Remove.
3898 (s390_pseudo_register_group): New function.
3899 (s390_regmap_gregset): Add GPR upper halves.
3900 (s390x_regmap_gregset): Likewise.
3901 (s390_regmap_fpregset): Likewise.
3902 (s390_regmap_upper): New global variable.
3903 (s390_upper_regset): New global variable.
3904 (s390_upper_regset_sections): New global variable.
3905 (s390_regset_from_core_section): Handle GPR upper halves.
3906 (s390_core_read_description): New function.
3907 (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
3908 register information. Handle varying pseudo register numbers.
3909 (s390_backchain_frame_unwind_cache): Likewise.
3910 (s390_frame_prev_register): Unwind full GPRs to show lower halves.
3911 (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
3912 (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
3913 PC and CC pseudos. Unwind upper halves and full GPRs as appropriate.
3914 Handle varying pseudo register numbers.
3915 (s390_unwind_pc): Handle varying pseudo register numbers.
3916 (s390_dwarf2_prev_register): New function.
3917 (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
3918 register information. Handle varying pseudo register numbers.
3919 Install s390_dwarf2_prev_register to unwind full GPRs.
3920 (s390_gdbarch_init): Handle target descriptions. Assign varying
3921 pseudo register numbers. Install s390_adjust_frame_regnum.
3922 (_initialize_s390_tdep): Initialize target descriptions.
3923
3924 * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
3925 (S390_NUM_REGS): Redefine to include upper half registers.
3926 (S390_PC_REGNUM, S390_CC_REGNUM): Remove.
3927 (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
3928 (tdesc_s390_linux32): Add declaration.
3929 (tdesc_s390_linux64): Likewise.
3930 (tdesc_s390x_linux64): Likewise.
3931
3932 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3933
3934 * regset.h (struct core_regset_section): Add HUMAN_NAME.
3935 * i386-linux-tdep.c (i386_linux_regset_sections): Fill in HUMAN_NAME.
3936 * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections): Likewise.
3937 (ppc_linux_vmx_regset_sections): Likewise.
3938 (ppc_linux_fp_regset_sections): Likewise.
3939
3940 * corelow.c (get_core_register_section): Constify arguments.
3941 (get_core_registers): Use gdbarch_core_regset_sections instead
3942 of hard-coded platform-specific register section names.
3943
3944 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3945
3946 * dwarf2loc.c (read_pieced_value): If a piece occupies part of
3947 a register, assume the least-significant part is used.
3948 (write_pieced_value): Likewise.
3949
3950 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3951
3952 * printcmd.c: Include "arch-utils.h".
3953 (do_one_display): Re-parse expression if current architecture changed.
3954
3955 2010-01-03 Jan Kratochvil <jan.kratochvil@redhat.com>
3956 Joel Brobecker <brobecker@adacore.com>
3957
3958 * gdbtypes.c (check_typedef): New comment on type length.
3959 * value.c (allocate_value_lazy): Remove the unused atype variable. New
3960 comment on type length.
3961 (value_primitive_field): Keep the original TYPE value, new comment.
3962
3963 2010-01-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3964
3965 * cli/cli-script.c (process_next_line): Rename p1 as p_end and p2 as
3966 p_start. Change != comparisons to > and < comparisons.
3967
3968 2010-01-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3969
3970 * cli/cli-script.c (process_next_line): Check P2 overrun.
3971
3972 2009-01-01 Joel Brobecker <brobecker@adacore.com>
3973
3974 Update the copyright hearder to add year 2010 for most GDB files.
3975
3976 2009-01-01 Joel Brobecker <brobecker@adacore.com>
3977
3978 Fix build failure in inf-ptrace.c.
3979 * inf-ptrace.c (inf_ptrace_follow_fork): Fix typo.
3980
3981 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3982
3983 * top.c (print_gdb_version): Update copyright year.
3984
3985 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3986
3987 Fix break *FUN'address thread NUM.
3988 * ada-lex.l (task): Expand rule to also match the thread keyword.
3989
3990 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3991
3992 Fix break *FUN'address task NUM.
3993 * ada-lex.l (task): New rule.
3994 * ada-lang.c (valid_task_id): Make sure the Ada task list has
3995 been built before using it.
3996
3997 For older changes see ChangeLog-2009.
3998 \f
3999 Local Variables:
4000 mode: change-log
4001 left-margin: 8
4002 fill-column: 74
4003 version-control: never
4004 coding: utf-8
4005 End: