497e3a3335a4788c05fe44508a84fa263c69202c
[binutils-gdb.git] / gdb / ChangeLog
1 2009-03-25 Tom Tromey <tromey@redhat.com>
2
3 * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
4 * stack.c (print_this_frame_argument_p): Use check_typedef.
5
6 2009-03-25 Tom Tromey <tromey@redhat.com>
7
8 * configure: Rebuild.
9 * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
10 Rearrange flags setting. Add comments.
11
12 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
13
14 * config/i386/nm-i386.h: Remove code within
15 I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
16 * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
17 macro.
18 * config/i386/nm-cygwin64.h: Ditto.
19 * config/i386/nm-fbsd.h: Ditto.
20 * config/i386/nm-go32.h: Ditto.
21 * config/i386/nm-linux.h: Ditto.
22 * config/i386/nm-linux64.h: Ditto.
23
24 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
25
26 ARI fix: "xasprintf" rule.
27 * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
28
29 2009-03-25 Pedro Alves <pedro@codesourcery.com>
30
31 * remote.c (remote_start_remote): In non-stop mode, call
32 init_wait_for_inferior before adding threads and inferiors.
33
34 2009-03-25 Joel Brobecker <brobecker@adacore.com>
35
36 * breakpoint.c (breakpoint_thread_match): Split a large condition
37 into several smaller conditions. No behavior change.
38
39 2009-03-25 Pedro Alves <pedro@codesourcery.com>
40
41 * infrun.c (infrun_thread_thread_exit): New.
42 (_initialize_infrun): Attach it to the thread_exit observer.
43 * thread.c (delete_thread_1): Always call the observer, passing it
44 the silent flag.
45 * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter. If
46 SILENT, return immediately.
47
48 2009-03-25 Pedro Alves <pedro@codesourcery.com>
49
50 * infrun.c (normal_stop): Use has_stack_frames instead of
51 target_has_stack.
52 * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
53 when there is no thread selected.
54 (mi_cmd_execute): Don't special case commands that can run without
55 a valid selected thread.
56 * top.c (execute_command): Don't special case commands that can
57 run without a valid selected thread. Use has_stack_frames.
58 * infcmd.c (ensure_valid_thread): New.
59 (continue_1, step_1, jump_command, signal_command): Use it.
60 (detach_command): Error out if there's no selected thread/inferior.
61 * thread.c (print_thread_info): Allow having no thread selected.
62 (switch_to_thread): Don't read the PC if there is no current thread.
63 (do_restore_current_thread_cleanup): Don't record the current
64 frame if there is no current thread.
65 (make_cleanup_restore_current_thread): Don't read frame info if
66 there is no selected thread.
67 (_initialize_thread): Don't mark commands as
68 "no_selected_thread_ok".
69 * frame.c (get_current_frame): Error out if there is no valid
70 selected thread.
71 (has_stack_frames): Return false if there is no valid
72 selected thread.
73 * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
74 "no_selected_thread_ok".
75 * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
76 (get_cmd_no_selected_thread_ok): Delete.
77 * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
78 (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
79 Delete declaration.
80 * stack.c (get_selected_block): Use has_stack_frames.
81
82 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
83
84 Fix size of FPSCR in Power 7 processors.
85 * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
86 (PPC_FEATURE_HAS_DFP): New #define.
87 (ppc_linux_read_description): Check for DFP feature instead of
88 ISA 2.05 to decide on size of the FPSCR.
89
90 2009-03-25 Kevin Buettner <kevinb@redhat.com>
91
92 * mn10300-tdep.c (trad-frame.h): Don't include.
93 (prologue-value.h): Include.
94 (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
95 (struct mn10300_prologue): Define.
96 (push_reg, translate_rreg, check_for_saved): New functions.
97 (mn10300_analyze_prologue): Rewrite, using prologue-value
98 machinery. Handle more instructions than before. Permit
99 instructions to occur in any order.
100 (mn10300_skip_prologue): Find the extents of the function
101 in question; mn10300_analyze_prologue no longer does this.
102 (mn10300_analyze_frame_prologue): New function.
103 (mn10300_frame_base): New function.
104 (mn10300_frame_this_id): Rewrite, no longer using trad-frame
105 implementation.
106 (mn10300_frame_prev_register): Likewise.
107 (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
108 (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
109 `this_frame'.
110 (mn10300_frame_unwind_init): Don't call frame_base_set_default().
111
112 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
113
114 Fix completer problem for filename completion on the first try.
115
116 * gdb/completer.h (gdb_completion_word_break_characters): New function.
117 * gdb/completer.c: Include gdb_assert.h.
118 (complete_line_internal_reason): New enum.
119 (complete_line_internal): Change last argument type to
120 complete_line_internal_reason.
121 Modify function to handle the different complete_line_internal_reason
122 argument values.
123 (complete_line): Adapt to change in complete_line_internal.
124 (command_completer): Ditto.
125 (gdb_completion_word_break_characters): Implement new function.
126 * top.c (init_main): Set rl_completion_word_break_hook to
127 gdb_completion_word_break_characters.
128
129
130 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
131
132 ARI fix: "strlen d_name" rule.
133 * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
134
135
136 2009-03-24 Tom Tromey <tromey@redhat.com>
137 Pedro Alves <pedro@codesourcery.com>
138
139 * configure, config.in: Rebuild.
140 * configure.ac: Check for libiconvlist.
141 * charset.c: Check HAVE_LIBICONVLIST.
142 * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
143 LIBICONV_LIBDIR. Update CPPFLAGS and LIBS.
144 * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
145 Remove.
146 (INTERNAL_CFLAGS_BASE): Update.
147 (INTERNAL_LDFLAGS): Update.
148 (CLIBS): Update.
149
150 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
151
152 * configure.ac: Initialize the variable $PREFER_CURSES.
153 * configure: Regenerated.
154
155 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
156
157 * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
158 * configure: Regenerated.
159
160 2009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
161
162 ARI fix: "strerror" rule.
163 * darwin-nat.c (darwin_ptrace): Use safe_strerror.
164 (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
165
166 2009-03-23 Joel Brobecker <brobecker@adacore.com>
167
168 * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
169 before looking up the fields inside our struct type.
170
171 2009-03-23 Joel Brobecker <brobecker@adacore.com>
172
173 * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
174 trying to resolve the type qualification.
175
176 2009-03-23 Joel Brobecker <brobecker@adacore.com>
177
178 * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
179 we try to apply the attribute on the real type, rather than
180 its associated typedef.
181
182 2009-03-23 Joel Brobecker <brobecker@adacore.com>
183
184 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
185 to make sure we try to get the modulus of the actual type, not the
186 associated typedef.
187
188 2009-03-23 Joel Brobecker <brobecker@adacore.com>
189
190 * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
191 [OP_ATR_LENGTH]: When using the attribute on a type, make sure
192 to get the real type, not the associated typedef.
193
194 2009-03-23 Joel Brobecker <brobecker@adacore.com>
195
196 * ada-lang.c (ada_get_field_index): Add handling of the case
197 when TYPE is a typedef of a struct.
198
199 2009-03-23 Joel Brobecker <brobecker@adacore.com>
200
201 Add gdb_usleep as a portable version of usleep based on gdb_select.
202 * gdb_usleep.h, gdb_usleep.c: New files.
203 * Makefile.in (SFILES): Add gdb_usleep.c.
204 (HFILES_NO_SRCDIR): Add gdb_usleep.h.
205 (COMMON_OBS): Add gdb_usleep.o.
206 * ser-unix.c (hardwire_send_break): Replace call to gdb_select
207 by call to gdb_usleep.
208
209 2009-03-23 Joel Brobecker <brobecker@adacore.com>
210
211 * buildsym.c (end_symtab): If we ignore the subfiles, then
212 unlink the associated symtabs if they were already allocated.
213
214 2009-03-23 Jerome Guitton <guitton@adacore.com>
215
216 Provide a way to force building of GDB with libcurses.
217 * configure.ac: Add --with-curses.
218 * configure: Regenerated.
219
220 2009-03-23 Tom Tromey <tromey@redhat.com>
221
222 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
223 error message.
224
225 2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
226
227 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
228 solib_contains_address_p instead of searching.
229
230 2009-03-23 Tom Tromey <tromey@redhat.com>
231
232 * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
233 (iconv): Make 'inbuf' argument const.
234 (convert_between_encodings): Use ICONV_CONST.
235 (wchar_iterate): Likewise.
236
237 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
238
239 * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
240 dynamically loaded function.
241 (LookupPrivilegeValueA): Ditto.
242 (OpenProcessToken): Ditto.
243 (AdjustTokenPrivileges): Rename and define placeholder for address of
244 dynamically loaded function.
245 (LookupPrivilegeValueA): Ditto.
246 (OpenProcessToken): Ditto.
247 (set_process_privilege): Remove check for loaded functions.
248 (bad_OpenProcessToken): Define.
249 (_initialize_loadable): Load token functions from advapi here, setting
250 OpenProcessToken function to a dummy static function which always return
251 error if OS doesn't support this functionality.
252
253 2009-03-22 Nicolas Roche <roche@adacore.com>
254 Christopher Faylor <me+cygwin@cgf.cx>
255
256 * win32-nat.c (ctrl_c_handler): New function.
257 (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
258 is run in a separate console.
259
260 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
261
262 * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
263 for dynamically loaded function.
264 (DebugBreakProcess): Ditto.
265 (DebugSetProcessKillOnExit): Ditto.
266 (EnumProcessModules): Ditto.
267 (GetModuleFileNameExA): Ditto.
268 (GetModuleInformation): Ditto.
269 (DebugActiveProcessStop): Rename and define placeholder for address of
270 dynamically loaded function.
271 (DebugBreakProcess): Ditto.
272 (DebugSetProcessKillOnExit): Ditto.
273 (EnumProcessModules): Ditto.
274 (GetModuleFileNameExA): Ditto.
275 (GetModuleInformation): Ditto.
276 (psapi_loaded): Delete.
277 (get_module_name): Don't check psapi_loaded, just rely on the fact that
278 dynamically loaded functions will return failure if they weren't
279 previously found.
280 (has_detach_ability): Delete.
281 (windows_attach): Remove call to has_detach_ability (). Just rely on
282 functions being callable.
283 (bad_DebugActiveProcessStop): Define.
284 (bad_DebugBreakProcess): Ditto.
285 (bad_DebugSetProcessKillOnExit): Ditto.
286 (bad_EnumProcessModules): Ditto.
287 (bad_GetModuleFileNameExA): Ditto.
288 (bad_GetModuleInformation): Ditto.
289 (_initialize_loadable): Rename from _initialize_psapi. Initialize all
290 dynamic storage here, setting nonexistent functions to dummy static
291 functions which always return error.
292
293 2009-03-22 Pedro Alves <pedro@codesourcery.com>
294
295 * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
296 to the about_to_proceed observer notification.
297 (mi_about_to_proceed): New.
298 (mi_on_resume): Only output ^running and the prompt here if the
299 target was proceeded.
300 * breakpoint.c (breakpoint_proceeded): New static.
301 (breakpoint_about_to_proceed): New.
302 (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
303 the about_to_proceed observer notification.
304 * inferior.h (breakpoint_proceeded): Delete declaration.
305 * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
306 Notify the about_to_proceed observers.
307 (struct inferior_status): Delete breakpoint_proceeded member.
308 (save_inferior_status): Don't save it.
309 (restore_inferior_status): Don't restore it.
310 * mi-main.h (mi_proceeded): Declare.
311 * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
312 a command.
313
314 2009-03-22 Pedro Alves <pedro@codesourcery.com>
315
316 * gdbthread.h (struct thread_info): Add in_infcall member.
317 * infcall.c (run_inferior_call): Save, set and restore in_infcall.
318 Remove reverences to suppress_resume_observer. Refresh
319 `call_thread' after returning from `proceed'.
320 * infcmd.c (suppress_resume_observer): Delete.
321 * inferior.h (suppress_resume_observer): Delete declaration.
322 * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
323 inferior function.
324 * thread.c (set_running): Remove references to
325 suppress_resume_observer.
326 * infrun.c (struct inferior_status): Add in_infcall member.
327 (save_inferior_status): Save it.
328 (restore_inferior_status): Restore it.
329
330 2009-03-22 Pedro Alves <pedro@codesourcery.com>
331
332 * infcall.c (run_inferior_call): Remove references to
333 suppress_stop_observer.
334 * infcmd.c (suppress_stop_observer): Delete.
335 (finish_command_continuation): Remove NOTE. Don't clear
336 suppress_stop_observer anymore.
337 (finish_command_continuation_free_arg): Likewise.
338 (finish_forward): Remove references to suppress_stop_observer.
339 Call normal_stop observer if we haven't already.
340 * inferior.h (suppress_stop_observer): Delete.
341 * infrun.c (normal_stop): When deciding to suppress the
342 normal_stop observer, check for proceed_to_finish instead of
343 suppress_stop_observer.
344
345 2009-03-22 Pedro Alves <pedro@codesourcery.com>
346
347 * symfile.c (symfile_relocate_debug_section): Remove check for
348 SEC_DEBUGGING.
349
350 2009-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
351 Jim Blandy <jimb@red-bean.com>
352 Thiago Jung Bauermann <bauerman@br.ibm.com>
353 Tom Tromey <tromey@redhat.com>
354
355 Miscellaneous fixes to the Python code.
356 * python/python-cmd.c (cmdpy_init): Accept keyword
357 arguments.
358 * python/python-value.c (valpy_string): Accept keyword
359 arguments.
360 (valpy_binop): Use `break' to exit from the TRY_CATCH block.
361 Do not call value_to_value_object on NULL RES_VAL.
362 (value_object_methods): Change `string' entry to also accept
363 keyword arguments.
364 (convert_value_from_python): Return a copy of the value if obj is
365 a gdb.Value object.
366 (value_object_methods): Mark the `string' method as accepting
367 keywords, and show method "prototype" in the doc string.
368 * python/python.c (get_parameter): Don't return inside a
369 TRY_CATCH.
370
371 2009-03-20 Tom Tromey <tromey@redhat.com>
372
373 Add support for convenience functions in Python.
374 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
375 (SUBDIR_PYTHON_SRCS): Add python-function.c.
376 (python-function.o): New target.
377 * eval.c: Include "python/python.h" and <ctype.h>.
378 (evaluate_subexp_standard): Handle values of type
379 TYPE_CODE_INTERNAL_FUNCTION.
380 * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
381 * parse.c (write_exp_string): Remove duplicate word in comment.
382 * python/python-function.c: New file.
383 * python/python-internal.h (gdbpy_initialize_functions): Add
384 prototype.
385 * python/python.c (_initialize_python): Call
386 gdbpy_initialize_functions.
387 * valprint.c (value_check_printable): Handle values of type
388 TYPE_CODE_INTERNAL_FUNCTION.
389 * value.c: Include "cli/cli-decode.h".
390 (internal_function): New struct.
391 (functionlist, internal_fn_type): New static variables.
392 (lookup_only_internalvar,
393 lookup_internalvar): Add const qualifier to name argument.
394 (create_internalvar): Likewise. Initialize new field.
395 (set_internal_var): Fix typo in comment. Don't allow assignment
396 to canonical variable.
397 (value_create_internal_function, value_internal_function_name,
398 call_internal_function, function_command, function_destroyer,
399 add_internal_function): New functions.
400 (_initialize_values): Create `function' placeholder command.
401 Initialize internal_fn_type.
402 * value.h (lookup_only_internalvar, create_internalvar,
403 lookup_internalvar): Add const qualifier to name argument.
404 (internal_function_fn, add_internal_function, call_internal_function,
405 value_internal_function_name): Add prototypes.
406 (struct internalvar) <canonical>: New field.
407
408 2009-03-20 Tom Tromey <tromey@redhat.com>
409
410 * c-lang.c (evaluate_subexp_c): Call check_typedef.
411
412 2009-03-20 Tom Tromey <tromey@redhat.com>
413 Julian Brown <julian@codesourcery.com>
414
415 PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
416 PR i18n/9401, PR exp/9613:
417 * NEWS: Update
418 * value.h (value_typed_string): Declare.
419 (val_print_string): Update.
420 * valprint.h (print_char_chars): Update.
421 * valprint.c (print_char_chars): Add type argument. Update.
422 (val_print_string): Likewise.
423 * valops.c (value_typed_string): New function.
424 * utils.c (host_char_to_target): New function.
425 (parse_escape): Use host_char_to_target, host_hex_value. Update.
426 Remove '^' case.
427 (no_control_char_error): Remove.
428 * typeprint.c (print_type_scalar): Update.
429 * scm-valprint.c (scm_scmval_print): Update.
430 * scm-lang.h (scm_printchar, scm_printstr): Update.
431 * scm-lang.c (scm_printchar): Add type argument.
432 (scm_printstr): Likewise.
433 * printcmd.c (print_formatted): Update.
434 (print_scalar_formatted): Update.
435 (printf_command) <wide_string_arg, wide_char_arg>: New constants.
436 Handle '%lc' and '%ls'.
437 * parser-defs.h (struct typed_stoken): New type.
438 (struct stoken_vector): Likewise.
439 (write_exp_string_vector): Declare.
440 * parse.c (write_exp_string_vector): New function.
441 * p-valprint.c (pascal_val_print): Update.
442 * p-lang.h (is_pascal_string_type, pascal_printchar,
443 pascal_printstr): Update.
444 * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
445 Add 'char_type' argument.
446 (pascal_emit_char): Add type argument.
447 (pascal_printchar): Likewise.
448 (pascal_printstr): Likewise.
449 * objc-lang.c (objc_emit_char): Add type argument.
450 (objc_printchar): Likewise.
451 (objc_printstr): Likewise.
452 * macroexp.c (get_character_constant): Handle unicode characters.
453 Use c_parse_escape.
454 (get_string_literal): Handle unicode strings. Use
455 c_parse_escape.
456 * m2-valprint.c (print_unpacked_pointer): Update.
457 (m2_print_array_contents): Update.
458 (m2_val_print): Update.
459 * m2-lang.c (m2_emit_char): Add type argument.
460 (m2_printchar): Likewise.
461 (m2_printstr): Likewise.
462 * language.h (struct language_defn) <la_printchar>: Add type
463 argument.
464 <la_printstr, la_emitchar>: Likewise.
465 (LA_PRINT_CHAR): Likewise.
466 (LA_PRINT_STRING): Likewise.
467 (LA_EMIT_CHAR): Likewise.
468 * language.c (unk_lang_emit_char): Add type argument.
469 (unk_lang_printchar): Likewise.
470 (unk_lang_printstr): Likewise.
471 * jv-valprint.c (java_val_print): Update.
472 * jv-lang.c (java_emit_char): Add type argument.
473 * f-valprint.c (f_val_print): Update.
474 * f-lang.c (f_emit_char): Add type argument.
475 (f_printchar): Likewise.
476 (f_printstr): Likewise.
477 * expprint.c (print_subexp_standard): Update.
478 * charset.h (target_wide_charset): Declare.
479 (c_target_char_has_backslash_escape, c_parse_backslash,
480 host_char_print_literally, host_char_to_target,
481 target_char_to_host, target_char_to_control_char): Remove.
482 (enum transliterations): New type.
483 (convert_between_encodings): Declare.
484 (HOST_ESCAPE_CHAR): New define.
485 (host_letter_to_control_character, host_hex_value): Declare.
486 (enum wchar_iterate_result): New enum.
487 (struct wchar_iterator): Declare.
488 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
489 wchar_push_back): Declare.
490 * charset-list.h: New file.
491 * c-valprint.c (textual_name): New function.
492 (textual_element_type): Handle wide character types.
493 (c_val_print): Pass original type to textual_element_type. Handle
494 wide character types.
495 (c_value_print): Use textual_element_type. Pass original type of
496 value to val_print.
497 * c-lang.h (enum c_string_type): New type.
498 (c_printchar, c_printstr): Update.
499 * c-lang.c (classify_type): New function.
500 (print_wchar): Likewise.
501 (c_emit_char): Add type argument. Handle wide characters.
502 (c_printchar): Likewise.
503 (c_printstr): Add type argument. Handle wide and multibyte
504 character sets.
505 (convert_ucn): New function.
506 (emit_numeric_character): Likewise.
507 (convert_octal): Likewise.
508 (convert_hex): Likewise.
509 (ADVANCE): New macro.
510 (convert_escape): New function.
511 (parse_one_string): Likewise.
512 (evaluate_subexp_c): Likewise.
513 (exp_descriptor_c): New global.
514 (c_language_defn): Use exp_descriptor_c.
515 (cplus_language_defn): Likewise.
516 (asm_language_defn): Likewise.
517 (minimal_language_defn): Likewise.
518 (charset_for_string_type): New function.
519 * c-exp.y (%union): Add 'svec' and 'tsval'.
520 (CHAR): New token.
521 (exp): Add CHAR production.
522 (string_exp): Rewrite.
523 (exp) <string_exp>: Rewrite.
524 (tempbuf): Now global.
525 (tempbuf_init): New global.
526 (parse_string_or_char): New function.
527 (yylex) <tempbuf>: Now global.
528 <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
529 Remove.
530 Handle 'u', 'U', and 'L' prefixes. Call parse_string_or_char.
531 (c_parse_escape): New function.
532 * auxv.c (fprint_target_auxv): Update.
533 * ada-valprint.c (ada_emit_char): Add type argument.
534 (ada_printchar): Likewise.
535 (ada_print_scalar): Update.
536 (printstr): Add type argument. Update calls to ada_emit_char.
537 (ada_printstr): Add type argument.
538 (ada_val_print_array): Update.
539 (ada_val_print_1): Likewise.
540 * ada-lang.c (emit_char): Add type argument.
541 * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
542 type arguments.
543 * gdb_locale.h: Include langinfo.h.
544 * charset.c (_initialize_charset): Set default host charset from
545 the locale. Don't register charsets. Add target-wide-charset
546 commands. Call find_charset_names.
547 (struct charset, struct translation): Remove.
548 (GDB_DEFAULT_HOST_CHARSET): Remove.
549 (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
550 (target_wide_charset_name): New global.
551 (show_host_charset_name): Handle "auto".
552 (show_target_wide_charset_name): New function.
553 (host_charset_enum, target_charset_enum): Remove.
554 (charset_enum): New global.
555 (all_charsets, register_charset, lookup_charset, all_translations,
556 register_translation, lookup_translation): Remove.
557 (simple_charset, ascii_print_literally, ascii_to_control): Remove.
558 (iso_8859_print_literally, iso_8859_to_control,
559 iso_8859_family_charset): Remove.
560 (ebcdic_print_literally, ebcdic_to_control,
561 ebcdic_family_charset): Remove.
562 (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
563 register_iconv_charsets): Remove.
564 (target_wide_charset_be_name, target_wide_charset_le_name): New
565 globals.
566 (identity_either_char_to_other): Remove.
567 (set_be_le_names, validate): New functions.
568 (backslashable, backslashed, represented): Remove.
569 (default_c_target_char_has_backslash_escape): Remove.
570 (default_c_parse_backslash, iconv_convert): Remove.
571 (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
572 ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
573 iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
574 ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
575 ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
576 ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
577 (table_convert_char, table_translation, simple_table_translation):
578 Remove.
579 (current_host_charset, current_target_charset,
580 c_target_char_has_backslash_escape_func,
581 c_target_char_has_backslash_escape_baton): Remove.
582 (c_parse_backslash_func, c_parse_backslash_baton): Remove.
583 (host_char_to_target_func, host_char_to_target_baton): Remove.
584 (target_char_to_host_func, target_char_to_host_baton): Remove.
585 (cached_iconv_host_to_target, cached_iconv_target_to_host):
586 Remove.
587 (lookup_charset_or_error, check_valid_host_charset): Remove.
588 (set_host_and_target_charsets): Remove.
589 (set_host_charset, set_target_charset): Remove.
590 (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
591 (set_target_wide_charset_sfunc): New function.
592 (show_charset): Print target wide character set.
593 (host_charset, target_charset): Rewrite.
594 (target_wide_charset): New function.
595 (c_target_char_has_backslash_escape): Remove.
596 (c_parse_backslash): Remove.
597 (host_letter_to_control_character): New function.
598 (host_char_print_literally): Remove.
599 (host_hex_value): New function.
600 (target_char_to_control_char): Remove.
601 (cleanup_iconv): New function.
602 (convert_between_encodings): New function.
603 (target_char_to_host): Remove.
604 (struct wchar_iterator): Define.
605 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
606 wchar_push_back): New functions.
607 (do_cleanup_iterator): New function.
608 (char_ptr): New typedef.
609 (charsets): New global.
610 (add_one, find_charset_names): New functions.
611 (default_charset_names): New global.
612 (auto_host_charset_name): Likewise.
613 * aclocal.m4, config.in, configure: Rebuild.
614 * configure.ac: Call AM_LANGINFO_CODESET.
615 (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
616 (AM_ICONV): Invoke earlier.
617 * acinclude.m4: Include codeset.m4. Subst LIBICONV_INCLUDE and
618 LIBICONV_LIBDIR. Check for libiconv in build tree.
619 * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
620 (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
621 (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
622 * gdb_obstack.h (obstack_grow_wstr): New define.
623 * gdb_wchar.h: New file.
624 * defs.h: Include it.
625
626 2009-03-20 Tom Tromey <tromey@redhat.com>
627 Jan Kratochvil <jan.kratochvil@redhat.com>
628
629 * dwarf2read.c (process_die): Handle DW_TAG_typedef.
630 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
631 typedef.
632 * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
633 SYMBOL_TYPE result.
634 * ada-typeprint.c (print_array_type): Do the NULL check
635 unconditionally.
636
637 2009-03-19 Tom Tromey <tromey@redhat.com>
638
639 * utils.c (do_obstack_free): New function.
640 (make_cleanup_obstack_free): Likewise.
641 * defs.h (make_cleanup_obstack_free): Declare.
642
643 2009-03-18 Doug Evans <dje@google.com>
644
645 * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
646 int, not a long long.
647 (linux_nat_info_proc_cmd): Store pid in long instead of long long.
648
649 * expprint.c (dump_raw_expression): Print note if non-NULL.
650
651 * printcmd.c (display_uses_solib_p): Redo loop, scan element list
652 backwards.
653
654 2009-03-18 Nathan Sidwell <nathan@codesourcery.com>
655
656 * Makefile.in: Update license to GPLv3.
657 * ada-exp.y: Update license to GPLv3.
658 * ada-lex.l: Update license to GPLv3.
659 * c-exp.y: Update license to GPLv3.
660 * cp-name-parser.y: Update license to GPLv3.
661 * darwin-nat-info.c: Update license to GPLv3.
662 * f-exp.y: Update license to GPLv3.
663 * gdb_thread_db.h: Update license to GPLv3.
664 * hppanbsd-nat.c: Update license to GPLv3.
665 * hppanbsd-tdep.c: Update license to GPLv3.
666 * hppaobsd-tdep.c: Update license to GPLv3.
667 * jv-exp.y: Update license to GPLv3.
668 * m2-exp.y: Update license to GPLv3.
669 * objc-exp.y: Update license to GPLv3.
670 * p-exp.y: Update license to GPLv3.
671 * reply_mig_hack.awk: Update license to GPLv3.
672 * reverse.c: Update license to GPLv3.
673 * xtensa-xtregs.c: Update license to GPLv3.
674
675 2009-03-18 Pedro Alves <pedro@codesourcery.com>
676
677 * remote.c (remote_close): Don't call generic_mourn_inferior.
678 (remote_mourn_1): Call generic_mourn_inferior after closing the
679 target.
680
681 2009-03-18 Pedro Alves <pedro@codesourcery.com>
682
683 * remote.c (remote_start_remote): Add missing call to
684 init_wait_for_inferior in non-stop mode.
685
686 2009-03-18 Pedro Alves <pedro@codesourcery.com>
687
688 * breakpoint.c (bpstat_should_step): Only consider software
689 watchpoints that have a location.
690
691 2009-03-17 Joel Brobecker <brobecker@adacore.com>
692
693 Add a target_ops parameter to the to_kill method in struct target_ops.
694
695 * target.h (struct target_ops): Add a "target_ops *" parameter to
696 method to_kill.
697 (target_kill): Remove macro. Add declaration.
698 * target.c (debug_to_kill): Delete, no longer necessary.
699 (target_kill): New function.
700 (update_current_target): Stop inheriting the to_kill method.
701 Do not de_fault it to no_process either.
702 (setup_target_debug): Do not set current_target.to_kill.
703 * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
704 linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
705 remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
706 accordingly.
707
708 2009-03-17 Doug Evans <dje@google.com>
709
710 * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
711 glibc 2.3.2 and earlier.
712
713 2009-03-17 Joel Brobecker <brobecker@adacore.com>
714
715 * frame.c (get_prev_frame_1): Do not perform the inner_frame
716 sanity check if this_frame is not NORMAL.
717 (frame_id_inner): Update the description of this function.
718
719 2009-03-17 Hui Zhu <teawater@gmail.com>
720
721 * stack.c: Change the introduce of "disassemble-next-line".
722
723 2009-03-17 Pedro Alves <pedro@codesourcery.com>
724
725 * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
726 declare as extern.
727
728 2009-03-17 Hui Zhu <teawater@gmail.com>
729
730 * stack.c: Include valprint.h.
731 (disassemble_next_line): New enum.
732 (show_disassemble_next_line): New function. Show the current
733 value of disassemble-next-line.
734 (gdb_disassembly_stub_args): New struct for argument passing
735 between function do_gdb_disassembly and function
736 gdb_disassembly_stub.
737 (gdb_disassembly_stub): New function. Helper for
738 gdb_disassembly.
739 (do_gdb_disassembly): New function. Use TRY_CATCH to catch
740 the exception from the gdb_disassembly because it will be
741 broken by filter sometime.
742 (print_frame_info): If disassemble-next-line is set to auto
743 or on and doesn't have the line debug messages for $pc,
744 output the next instruction.
745 If disassemble-next-line is set to on and there is line debug
746 messages, output assembly codes for next line.
747 (_initialize_stack): Make the "set disassemble-next-line"
748 command an auto-boolean command. Change its class to
749 class_stack. Place it in the top level set list. Extend help
750 to describe the auto mode.
751
752 2009-03-17 Pedro Alves <pedro@codesourcery.com>
753
754 * infrun.c (normal_stop): Don't overwrite old_chain.
755
756 2009-03-16 Joel Brobecker <brobecker@adacore.com>
757
758 * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
759 which is undefined, by call to regcache_invalidate, which should
760 do what the original author wanted to do.
761
762 2009-03-16 Joel Brobecker <brobecker@adacore.com>
763
764 * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
765 (mips_create_inferior): Likewise.
766
767 2009-03-16 Joel Brobecker <brobecker@adacore.com>
768
769 * go32-nat.c (go32_create_inferior): Add missing ops parameter.
770
771 2009-03-16 Joel Brobecker <brobecker@adacore.com>
772
773 * darwin-nat.c (darwin_resume): Fix a compiler warning when
774 building on x86_64-darwin.
775
776 2009-03-16 Tristan Gingold <gingold@adacore.com>
777
778 * configure.tgt: Add handling for x86_64-darwin.
779
780 2009-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
781
782 * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
783
784 2009-03-15 Joel Brobecker <brobecker@adacore.com>
785
786 * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
787 Use the ops parameter to get to the target beneath, rather than
788 using the current_target global. Using the current_target global
789 was an unintended accident.
790
791 2009-03-15 Joel Brobecker <brobecker@adacore.com>
792
793 Fix an error happening while loading symbols from a core file
794 (on AIX).
795
796 * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
797 to detect whether we're debugging a core file or not.
798
799 2009-03-15 Joel Brobecker <brobecker@adacore.com>
800
801 Modernize the aix-thread later by getting rid of the base_target
802 global. This brings back to life the AIX port which was otherwise
803 crashing all the time.
804
805 * aix-thread.c (base_target): Delete.
806 (pd_enable): Do not set base_target.
807 (aix_thread_attach): Use find_target_beneath instead of base_target.
808 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
809 (aix_thread_fetch_registers, aix_thread_store_registers),
810 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
811 (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
812 (aix_thread_kill): Delete. Does not seem necessary.
813 (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
814
815 2009-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
816
817 * stack.c (return_command <retval_exp>): New variables retval_expr
818 and old_chain. Inline parse_and_eval to initialize retval_expr. Check
819 RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
820 if RETURN_TYPE is NULL.
821
822 >>>>>>> 1.10280
823 2009-03-14 Pedro Alves <pedro@codesourcery.com>
824
825 * remote.c (PACKET_qAttached): New.
826 (remote_query_attached): New.
827 (remote_add_inferior): Add new `attached' argument. Handle it.
828 (remote_notice_new_inferior, remote_start_remote): Adjust to pass
829 -1 to remote_add_inferior in new parameter.
830 (extended_remote_attach_1): Adjust to pass 1 to
831 remote_add_inferior in the new parameter.
832 (extended_remote_create_inferior_1): Adjust to pass 0 to
833 remote_add_inferior in the new parameter.
834 (_initialize_remote): Add "set/show remote query-attached-packet"
835 commands.
836
837 2009-03-13 Tom Tromey <tromey@redhat.com>
838
839 * symtab.c (lookup_symbol_in_language): Use a cleanup.
840
841 2009-03-13 Doug Evans <dje@google.com>
842
843 * exceptions.h: Clean up some comments on catch_exceptions usage.
844 * exceptions.c: Ditto. Plus mark catch_errors as superseded by
845 catch_exceptions.
846
847 2009-02-17 Joel Brobecker <brobecker@adacore.com>
848
849 The following patch helps getting rid of a warning inside solib-som.c.
850
851 * source.c (source_full_path_of): Constify parameter filename.
852 * defs.h (source_full_path_of): Update declaration accordingly.
853
854 2009-03-12 Joel Brobecker <brobecker@adacore.com>
855
856 * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
857 BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
858 Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
859
860 2009-03-12 Joel Brobecker <brobecker@adacore.com>
861
862 * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
863 promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
864
865 2009-03-12 Joel Brobecker <brobecker@adacore.com>
866
867 * ada-tasks.c (ada_task_is_alive): Move up and make static.
868 * ada-lang.h (ada_task_is_alive): Remove declaration.
869
870 2009-03-12 Jerome Guitton <guitton@adacore.com>
871
872 * ada-lang.c (ada_delta): Change the type of numerators and
873 denominators to DOUBLEST, as they may not fit into a long.
874 (scaling_factor): Ditto.
875
876 2009-03-12 Jerome Guitton <guitton@adacore.com>
877
878 * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
879
880 2009-03-12 Joel Brobecker <brobecker@adacore.com>
881
882 * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
883 types, if we are unable to determine the actual symbol type
884 from its tag, then use the static approximation instead.
885
886 2009-03-12 Joel Brobecker <brobecker@adacore.com>
887
888 Fix crash printing packed record with packed array.
889
890 * ada-lang.c (ada_modulus_from_name): New function.
891 (ada_modulus): In the case where the type length is bigger than
892 the size of the type used to hold the bounds, try determining
893 the modulus from the type name.
894 (ada_value_primitive_packed_val): Fix bug in the computation of
895 ntarg causing an out-of-buffer invalid access.
896
897 2009-03-12 Joel Brobecker <brobecker@adacore.com>
898
899 Fix segfault when printing short_integer'last.
900
901 * ada-lang.c (ada_find_any_type): Search in the primitive types
902 if a symbol could not be found.
903
904 2009-03-12 Joel Brobecker <brobecker@adacore.com>
905
906 * ada-tasks.c (task_states,long_task_states): Add new states
907 Activating and Acceptor_Delay_Sleep. Update the description
908 of state Acceptor_Sleep.
909
910 2009-03-12 Jonas Maebe <jonas.maebe@elis.ugent.be> (obvious change)
911
912 Fix a build failure on Darwin following some changes in
913 the profile of some target_ops methods.
914
915 * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
916 where missing.
917 (darwin_stop_inferior, darwin_detach): Likewise.
918
919 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
920
921 Include token in ^running notification for CLI commands.
922
923 * mi/mi-main.c (mi_execute_command): Set current_token here.
924 (mi_cmd_execute): Do not set current_token here.
925
926 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
927
928 Fix MI timings.
929
930 * mi/mi-main.c (mi_print_timing_maybe): New.
931 (captured_mi_execute_command): Simplify. Output timings to
932 CLI commands, too.
933 (mi_execute_async_cli_command): Do not print timings.
934 * mi/mi-main.h (mi_print_timing_maybe): Declare.
935 * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
936
937 2009-03-12 Jerome Guitton <guitton@adacore.com>
938
939 * xcoffread.c (process_linenos): Check if the line in the
940 include table refers to the main source file and, if so,
941 add them to the main subfile.
942
943 2009-03-12 Joel Brobecker <brobecker@adacore.com>
944
945 Fix a build failure on AIX introduced after a change in the profile
946 of some of the "methods" in the target_ops structure.
947 * aix-thread.c: Add missing target_ops parameter throughout.
948
949 Implement Ada task switching on AIX.
950 * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
951 (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
952
953 2009-03-11 Daniel Jacobowitz <dan@codesourcery.com>
954
955 * breakpoint.c (bpstat_check_breakpoint_conditions): Use
956 value_mark and value_free_to_mark.
957 * objfiles.c (free_objfile): Call objfile_free_data before
958 freeing the BFD.
959
960 2009-03-10 Hui Zhu <teawater@gmail.com>
961
962 * disasm.c (gdb_disassembly): Remove unused argument
963 "line_num".
964 * disasm.h (gdb_disassembly): Ditto.
965 * cli/cli-cmds.c (print_disassembly): Ditto.
966 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
967
968 2009-03-09 Paul Pluzhnikov <ppluzhnikov@google.com>
969
970 * solib.c (solib_contains_address_p): New function.
971 (solib_name_from_address): Use it.
972 * printcmd.c (display_uses_solib_p): Use it.
973 * solib.h (solib_contains_address_p): Declare it.
974
975 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
976
977 * varobj.c (free_variable): Call value_free.
978
979 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
980
981 PR gdb/9873:
982 * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
983 Move the variable `macinfo_type' out of the loop. Create a new
984 processing pass before the current one to pre-create `current_file'.
985 New complaint on misplaced zero/non-zero definitions/includes.
986 Skip first DW_MACINFO_start_file with `at_commandline' set.
987
988 2008-03-09 Vladimir Prus <vladimir@codesourcery.com>
989
990 * solib.c (reload_shared_libraries): Give
991 inferior a chance to reset solib breakpoint.
992 Reinit frame cache.
993
994 2009-03-08 Christopher Faylor <me+cygwin@cgf.cx>
995
996 * windows-nat.c (dr): Redefine to use largest possible integer which
997 holds a pointer.
998 (cygwin_set_dr): Avoid coercion.
999
1000 2009-03-08 Oswald Buddenhagen <oswald.buddenhagen@trolltech.de>
1001
1002 * windows-nat.c (windows_create_inferior): Implement --tty handling on
1003 non-cygwin.
1004
1005 2009-03-06 Paul Pluzhnikov <ppluzhnikov@google.com>
1006
1007 Rename solib_address to solib_name_from_address.
1008 * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
1009 (disable_breakpoints_in_unloaded_shlib): Update.
1010 * printcmd.c (display_uses_solib_p): Likewise.
1011 * stack.c (print_frame): Likewise.
1012 * solib.c: Rename.
1013 * solib.h: Rename.
1014
1015 2009-03-05 Paul Pluzhnikov <ppluzhnikov@google.com>
1016
1017 * printcmd.c (do_one_display): Reparse exp_string.
1018 (display_uses_solib_p): New function.
1019 (clear_dangling_display_expressions): New function.
1020 (_initialize_printcmd): Add observer.
1021 * solib.c (no_shared_libraries): Swap order of calls to
1022 clear_solib and objfile_purge_solibs.
1023
1024 2009-03-05 Joel Brobecker <brobecker@adacore.com>
1025
1026 Implement the target-specific part of Ada tasking support
1027 on Tru64.
1028
1029 * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
1030 (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
1031
1032 2009-03-05 Joel Brobecker <brobecker@adacore.com>
1033
1034 Get rid of the global "base_target" and use "find_target_beneath"
1035 to find the underlying target.
1036 * dec-thread.c (base_target): Delete.
1037 (enable_dec_thread): Remove assignement to base_target.
1038 (dec_thread_detach, dec_thread_wait, dec_thread_wait)
1039 (dec_thread_fetch_registers, dec_thread_store_registers)
1040 (dec_thread_mourn_inferior, dec_thread_pid_to_str):
1041 Update the function profile if necessary.
1042 Use find_target_beneath to call the same method but from
1043 the underlying target, removing the need for "base_target".
1044
1045 * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
1046 Fix a copy/paste error in a few debug traces...
1047
1048 * solib-osf.c (init_so): Use a simpler method for computing
1049 the size of lm_info structure. This also gets rid of warning
1050 emitted by the compiler.
1051
1052 2009-03-05 Pedro Alves <pedro@codesourcery.com>
1053
1054 * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
1055 duplicates of permanent breakpoints.
1056
1057 2009-03-04 Pedro Alves <pedro@codesourcery.com>
1058
1059 * inferior.h (notice_new_inferior): Declare.
1060 * infcmd.c (notice_new_inferior): New.
1061 * remote.c (remote_add_inferior, remote_add_thread): New.
1062 (notice_new_inferiors): Rename to...
1063 (remote_notice_new_inferior): ... this. Add RUNNING argument.
1064 Use remote_add_thread instead of add_thread, passing it the
1065 RUNNING argument. Add an inferior with remote_add_inferior. If
1066 we just learned about an inferior, call notice_new_inferior.
1067 (record_currthread): Adjust.
1068 (remote_threads_info): Adjust to use remote_notice_new_inferior.
1069 (remote_start_remote, extended_remote_attach_1): Use
1070 remote_add_inferior.
1071 (process_stop_reply): Adjust. Call remote_notice_new_inferior
1072 after handling expedited registers and watchpoint state.
1073 (extended_remote_create_inferior_1): Use remote_add_inferior.
1074
1075 2009-03-04 Aleksandar Ristovski <aristovski@qnx.com>
1076
1077 * infcmd.c (registers_info): Remove register number case.
1078
1079 2009-03-03 Pedro Alves <pedro@codesourcery.com>
1080
1081 * top.c (quit_target): Check for target_has_execution before
1082 killing or detaching from inferiors.
1083
1084 2009-03-02 Joel Brobecker <brobecker@adacore.com>
1085
1086 Remove some unused routines.
1087
1088 * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
1089 Delete.
1090 * ada-lang.c (ada_task_list_iterator_ftype)
1091 (iterate_over_live_ada_tasks): Delete.
1092 * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
1093 Delete.
1094
1095 2009-03-01 Doug Evans <dje@google.com>
1096
1097 * symtab.c: Remove trailing whitespace throughout the file.
1098 (expand_line_sal): Fix some typos and whitespace.
1099
1100 * Makefile.in (clean): rm -f $(DEPDIR)/*.
1101
1102 * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
1103 (init.c): signals/ -> common/.
1104 (signals.o): Update.
1105 * target.h (target_signal_to_string,target_signal_to_string)
1106 (target_signal_from_name,target_signal_to_host_p)
1107 (target_signal_from_host,target_signal_to_host): Move to ...
1108 * common/gdb_signals.h: ... here. New file.
1109 * common/signals.c: Moved here from signals/signals.c.
1110 #include gdb_signals.h, remove #include of target.h in gdb case.
1111 (target_signal_from_command,default_target_signal_to_host)
1112 (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
1113
1114 Include thread ID in target_wait debugging output.
1115 * infrun.c (print_target_wait_results): New function.
1116 (wait_for_inferior,fetch_inferior_event): Call it.
1117
1118 2009-02-27 Pedro Alves <pedro@codesourcery.com>
1119
1120 * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
1121 with a ptid_t field.
1122 * linux-thread-db.c (thread_get_info_callback): Build the ptid
1123 using the pid stored in proc_handle.ptid.
1124 (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
1125 (check_for_thread_db, thread_db_detach, check_event)
1126 (thread_db_mourn_inferior, find_new_threads_callback)
1127 (thread_db_find_new_threads_1): Adjust.
1128 * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
1129 (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
1130
1131 2009-02-27 Phil Muldoon <pmuldoon@redhat.com>
1132
1133 * valprint.c (read_string): Rework clean-up logic. Use
1134 free_current_contents to clean-up buffer.
1135
1136 2009-02-27 Andreas Schwab <schwab@linux-m68k.org>
1137
1138 * MAINTAINERS: Update e-mail address.
1139
1140 2009-02-26 Phil Muldoon <pmuldoon@redhat.com>
1141
1142 * python/python-utils.c (python_string_to_unicode): Always return
1143 a new reference.
1144 (python_string_to_target_string): Decrement transient python
1145 instance.
1146 (python_string_to_host_string): Likewise.
1147
1148 2007-02-26 Pedro Alves <pedro@codesourcery.com>
1149
1150 * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
1151 call to super_fetch_registers.
1152 (mips64_linux_store_registers): Pass `ops' to call to
1153 super_store_registers.
1154
1155 2009-02-25 Doug Evans <dje@google.com>
1156
1157 * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
1158 error message.
1159
1160 * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
1161 disabled_shlib_breaks, unused.
1162
1163 * printcmd.c (build_address_symbolic): Fix comment.
1164
1165 2009-02-25 Hui Zhu <teawater@gmail.com>
1166
1167 * cli/cli-script.c (define_command): Add _() to query.
1168 * gnu-nat.c (inf_validate_task_sc): Ditto.
1169 * infcmd.c (kill_if_already_running): Ditto.
1170 (jump_command): Ditto.
1171 (attach_command): Ditto.
1172 * inflow.c (kill_command): Ditto.
1173 * infrun.c (handle_command): Ditto.
1174 * maint.c (maintenance_dump_me): Ditto.
1175 * memattr.c (mem_delete_command): Ditto.
1176 * monitor.c (monitor_interrupt_query): Ditto.
1177 * nto-procfs.c (interrupt_query): Ditto.
1178 * printcmd.c (undisplay_command): Ditto.
1179 * remote-mips.c (mips_kill): Ditto.
1180 * remote.c (interrupt_query): Ditto.
1181 * solib-irix.c (irix_open_symbol_file_object): Ditto.
1182 * solib-osf.c (osf_open_symbol_file_object): Ditto.
1183 * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
1184 * solib-som.c (som_open_symbol_file_object): Ditto.
1185 * solib-svr4.c (open_symbol_file_object): Ditto.
1186 * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
1187 * target.c (kill_or_be_killed): Ditto.
1188 * tracepoint.c (delete_trace_command): Ditto.
1189 * top.c (quit_confirm): Add _() to s that will be used
1190 in query.
1191
1192 2009-02-24 Pierre Muller <muller@ics.u-strasbg.fr>
1193
1194 Fix windows-nat.c compilation failure.
1195
1196 * windows-nat.c (windows_thread_alive): Fix forward declaration.
1197 (get_windows_debug_event): Add ops parameter to call to windows_resume.
1198
1199 2009-02-23 Pedro Alves <pedro@codesourcery.com>
1200
1201 * remote-sim.c (gdbsim_resume): Add target_ops* argument.
1202
1203 2009-02-23 Jay Krell <jay.krell@cornell.edu> (tiny change)
1204
1205 * symtab.c (find_line_symtab): Initialize exact to avoid
1206 a compiler warning.
1207
1208 2009-02-23 Pedro Alves <pedro@codesourcery.com>
1209
1210 * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
1211 `ops' to recursive call.
1212
1213 2009-02-23 Pedro Alves <pedro@codesourcery.com>
1214
1215 * corelow.c (get_core_registers): Adjust.
1216 (core_file_thread_alive): Rename to...
1217 (core_thread_alive): ... this.
1218 (core_pid_to_str): Try gdbarch_core_pid_to_str first.
1219 (init_core_ops): Adjust.
1220 (coreops_suppress_target): Delete.
1221 (_initialize_corelow): Unconditionally add core_ops.
1222 * procfs.c: Include "inf-child.h".
1223 (procfs_ops): Delete.
1224 (init_procfs_ops): Delete. Reimplement as...
1225 (procfs_target): ... this, inheriting from inf-child.
1226 (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
1227 (procfs_prepare_to_store): Delete.
1228 (procfs_store_registers, procfs_resume): Adjust.
1229 (procfs_open): Delete.
1230 (procfs_suppress_run): Delete.
1231 (procfs_can_run): Delete.
1232 (procfs_mourn_inferior): Adjust.
1233 (procfs_init_inferior): Add target_ops parameter. Adjust.
1234 (procfs_create_inferior): Don't pass procfs_init_inferior to
1235 fork_inferior. Instead call it after fork_inferior returns.
1236 (procfs_find_new_threads): Adjust.
1237 (_initialize_procfs): Adjust to use procfs_target instead of
1238 init_procfs_ops.
1239 * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
1240 (lwp_to_thread): Use target_thread_alive.
1241 (sol_thread_open): Delete.
1242 (sol_thread_attach): Delete.
1243 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1244 (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
1245 to use find_target_beneath.
1246 (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
1247 (sol_thread_xfer_partial): Adjust to use find_target_beneath.
1248 (sol_thread_files_info, sol_thread_kill_inferior): Delete.
1249 (check_for_thread_db): New.
1250 (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
1251 (sol_thread_new_objfile): Call check_for_thread_db.
1252 (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
1253 (sol_thread_can_run): Delete.
1254 (sol_thread_alive): Adjust to use find_target_beneath.
1255 (sol_thread_stop): Delete.
1256 (rw_common): Use target_write_memory or target_read_memory.
1257 (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
1258 (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
1259 (solaris_pid_to_str): Remove check for libthread_db initialization
1260 failing.
1261 (sol_find_new_threads): Remove check for libthread_db
1262 initialization failing, or for an invalid inferior_ptid. Adjust
1263 to use find_target_beneath.
1264 (sol_core_open, sol_core_close, sol_core_detach,
1265 sol_core_files_info, sol_find_memory_regions,
1266 sol_make_note_section, ignore): Delete.
1267 (init_sol_thread_ops): Make it a thread_stratum target. Remove
1268 unneeded callback settings.
1269 (init_sol_core_ops): Delete.
1270 (_initialize_sol_thread): No longer call init_sol_core_ops, set
1271 procfs_suppress_run, or hack with core_ops.
1272
1273 * target.h (struct target_ops): Add a target_ops * parameter to
1274 to_resume, to_fetch_registers, to_store_registers, to_thread_alive
1275 and to_find_new_threads.
1276 (target_fetch_registers, target_store_registers)
1277 (target_thread_alive, target_find_new_threads): Redeclare as
1278 function.
1279
1280 * target.c (update_current_target): Do not inherit or de_fault
1281 to_resume, to_fetch_registers, to_store_registers,
1282 to_thread_alive, to_find_new_threads.
1283 (target_resume): Adjust.
1284 (target_thread_alive, target_find_new_threads): New.
1285 (debug_to_resume, debug_to_fetch_registers): Delete.
1286 (target_fetch_registers): New.
1287 (debug_to_store_registers): Delete.
1288 (target_store_registers): New.
1289 (debug_to_thread_alive, debug_to_find_new_threads): Delete.
1290 (setup_target_debug): Adjust.
1291
1292 * gdbcore.h (core_ops): Delete declaration.
1293
1294 * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
1295 inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
1296 i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
1297 hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
1298 nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
1299 alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
1300 bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
1301 hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
1302 ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
1303 m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
1304 mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
1305 ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
1306 shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
1307 vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
1308
1309 * gdbarch.sh (core_pid_to_str): New gdbarch callback.
1310 * gdbarch.h, gdbarch.c: Regenerate.
1311
1312 * sol2-tdep.c: Include "inferior.h".
1313 (sol2_core_pid_to_str): New.
1314 * sol2-tdep.h (sol2_core_pid_to_str): Declare.
1315
1316 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
1317 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
1318 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
1319 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
1320
1321 2009-02-22 Doug Evans <dje@google.com>
1322
1323 * exec.c (exec_file_attach): Fix comment.
1324
1325 2009-02-22 Pedro Alves <pedro@codesourcery.com>
1326
1327 Silence a few -Wmissing-prototypes warnings.
1328
1329 PR build/9877:
1330 * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
1331 it static.
1332 * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
1333 * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
1334 * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
1335 (_initialize_amd64nbsd_tdep): ... this.
1336 * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
1337 (_initialize_arm_linux_tdep): Declare.
1338 * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
1339 * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
1340 * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
1341 * avr-tdep.c (avr_return_value): Make it static.
1342 (avr_frame_unwind_cache): Ditto.
1343 * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
1344 (bsd_uthread_solib_loaded): Ditto.
1345 (bsd_uthread_solib_unloaded): Ditto.
1346 (bsd_uthread_target): Ditto.
1347 (_initialize_bsd_uthread): Declare.
1348 * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
1349 (cris_frame_unwind_cache): Ditto.
1350 * frv-tdep.c (frv_return_value): Ditto.
1351 * h8300-tdep.c (h8300_use_struct_convention): Ditto.
1352 (h8300h_use_struct_convention): Ditto.
1353 * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
1354 Ditto.
1355 * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
1356 declarations.
1357 * hppabsd-tdep.c: Include hppabsd-tdep.h.
1358 (hppabsd_find_global_pointer): Make it static.
1359 * hppabsd-tdep.h: New.
1360 * hppanbsd-tdep.c: Include hppabsd-tdep.h.
1361 (hppabsd_init_abi): Remove declaration.
1362 (_initialize_hppabsd_tdep): Remove declaration.
1363 (_initialize_hppanbsd_tdep): Declare.
1364 * hppaobsd-tdep.c: Include hppabsd-tdep.h.
1365 (hppabsd_init_abi): Delete declaration.
1366 (hppaobsd_init_abi): Make it static.
1367 * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
1368 * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
1369 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
1370 * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
1371 * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
1372 * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
1373 (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
1374 (_initialize_m32c_tdep): Declare.
1375 * m32r-rom.c (_initialize_m32r_rom): Declare.
1376 * m32r-tdep.c (m32r_skip_prologue): Make it static.
1377 (m32r_return_value): Ditto.
1378 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
1379 (m68hc11_return_value): Ditto.
1380 * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
1381 * m88k-tdep.c (m88k_frame_cache): Make it static.
1382 * mep-tdep.c (mep_gdb_print_insn): Ditto.
1383 (mep_return_value): Ditto.
1384 (_initialize_mep_tdep): Declare.
1385 * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
1386 * mips-linux-tdep.c (supply_64bit_reg): Make it static.
1387 (mips_linux_syscall_next_pc): Ditto.
1388 (_initialize_mips_linux_tdep): Declare.
1389 * mips-tdep.c (mips_single_step_through_delay): Make it static.
1390 * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
1391 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
1392 * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
1393 * mt-tdep.c (_initialize_mt_tdep): Declare.
1394 * nbsd-tdep.c: Include nbsd-tdep.h.
1395 * nto-tdep.c (find_load_phdr): Make it static.
1396 (_initialize_nto_tdep): Declare.
1397 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
1398 static.
1399 (_initialize_ppc_linux_tdep): Declare.
1400 * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
1401 (m32r_insert_watchpoint, m32r_remove_watchpoint)
1402 (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
1403 static.
1404 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
1405 * rs6000-nat.c: Include xcoffread.h.
1406 (find_toc_address): Don't extern declare get_toc_offset. Adjust
1407 to call xcoff_get_to_offset.
1408 * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
1409 (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
1410 (rs6000_skip_trampoline_code): Make static.
1411 * s390-tdep.c (s390_regset_from_core_section): Ditto.
1412 * sh-tdep.c (sh_register_reggroup_p): Ditto.
1413 * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
1414 (_initialize_shnbsd_tdep): Declare.
1415 * solib-frv.c (displacement_from_map): Make static.
1416 (_initialize_frv_solib): Declare.
1417 * solib-irix.c (fetch_lm_info): Make static.
1418 (_initialize_irix_solib): Declare.
1419 * solib-som.c: Include solib-som.h.
1420 (som_solib_select): Line break.
1421 * sparc-tdep.c (sparc_regset_from_core_section): Make static.
1422 * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
1423 (_initialize_sparcnbsd_tdep): ... this.
1424 * spu-tdep.c (spu_software_single_step): Make it static.
1425 (_initialize_spu_tdep): Declare.
1426 * vax-tdep.c (vax_frame_cache): Make it static.
1427 * xcoffread.c: Include xcoffread.h.
1428 (get_toc_offset): Rename to ...
1429 (xcoff_get_toc_offset): ... this.
1430 (_initialize_xcoffread): Declare.
1431 * xcoffread.h: New.
1432 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
1433 * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
1434 static.
1435 (_initialize_xtensa_tdep): Declare.
1436
1437 2008-02-21 Pedro Alves <pedro@codesorcery.com>
1438
1439 Silence a few -Wmissing-prototypes warnings.
1440
1441 PR build/9877:
1442 * amd64-nat.c: Include "amd64-nat.h".
1443 * fork-child.c (_initialize_fork_child): Ditto.
1444 * gcore.c (_initialize_gcore): Ditto.
1445 * inf-ptrace.c: Include "inf-ptrace.h".
1446 (inf_ptrace_store_registers): Make it static.
1447 * linux-nat.c (linux_nat_terminal_ours): Make it static.
1448 (_initialize_linux_nat): Declare before definition.
1449 * linux-tdep.c: Include "linux-tdep.h".
1450 * linux-thread-db.c (_initialize_thread_db): Declare before
1451 definition.
1452 * proc-service.c (_initialize_proc_service): Ditto.
1453 * remote.c (remote_send_printf): Make it static.
1454 * solib.c: Include "solib.h".
1455 * symfile-mem.c (_initialize_symfile_mem): Declare before
1456 definition.
1457 * ada-lang.c (ada_la_decode, ada_match_name)
1458 (ada_suppress_symbol_printing, ada_is_array_type)
1459 (ada_value_ptr_subscript, ada_array_length)
1460 (ada_to_static_fixed_value): Make them static.
1461 (_initialize_ada_language): Declare before definition.
1462 * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
1463 (ada_task_list_changed, ada_new_objfile_observer): Make them
1464 static.
1465 (_initialize_tasks): Declare before definition.
1466 * addrmap.c (_initialize_addrmap): Declare before definition.
1467 * auxv.c (default_auxv_parse): Make it static.
1468 * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
1469 them static.
1470 * breakpoint.c (remove_sal): Add line break.
1471 (expand_line_sal_maybe): Make it static.
1472 * cp-name-parser.y: Include "cp-support.h".
1473 * cp-valprint.c (cp_find_class_member): Make it static.
1474 * eval.c (value_f90_subarray): Ditto.
1475 * exceptions.c (print_any_exception): Ditto.
1476 * findcmd.c (_initialize_mem_search): Declare before definition.
1477 * frame.c (frame_observer_target_changed): Make it static.
1478 * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
1479 * inf-child.c: Include "inf-child.h".
1480 * inferior.h (valid_inferior_id): Rename to ...
1481 (valid_gdb_inferior_id): ... this.
1482 * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
1483 Make them static.
1484 * jv-lang.c (java_language_arch_info): Make it static.
1485 * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
1486 * osdata.c (info_osdata_command): Make it static.
1487 * regcache.c (regcache_observer_target_changed): Make it static.
1488 * reverse.c (_initialize_reverse): Declare before definition.
1489 * stabsread.c (cleanup_undefined_types_noname)
1490 (cleanup_undefined_types_1): Make them static.
1491 * symfile.c (place_section): Make it static.
1492 * symtab.c (find_pc_sect_psymtab_closer): Make it static.
1493 * target-descriptions.c (_initialize_target_descriptions): Declare
1494 before definition.
1495 * target.c (default_get_ada_task_ptid, find_default_can_async_p)
1496 (find_default_is_async_p, find_default_supports_non_stop): Make
1497 them static.
1498 (target_supports_non_stop): Add prototype.
1499 (dummy_pid_to_str): Make it static.
1500 * utils.c (_initialize_utils): Declare before definition.
1501 * ada-exp.y (_initialize_ada_exp): Declare before definition.
1502 * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
1503 * target.h (struct target_ops): Add a prototype to the
1504 to_can_execute_reverse callback.
1505 * macroscope.c (_initialize_macroscope): Declare before definition.
1506 * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
1507 * python/python.c (_initialize_python): Declare before definition.
1508 * tui/tui-command.c: Include "tui/tui-command.h".
1509 * tui/tui-data.c (init_content_element, init_win_info): Make them
1510 static.
1511 * tui/tui-disasm.c: Include "tui/tui-disasm.h".
1512 * tui/tui-interp.c (_initialize_tui_interp): Declare before
1513 definition.
1514 * tui/tui-layout.c: Include "tui/tui-layout.h".
1515 (_initialize_tui_layout): Declare before definition.
1516 * tui/tui-regs.c: Include "tui/tui-regs.h".
1517 (tui_display_reg_element_at_line): Make it static.
1518 (_initialize_tui_regs): Declare before definition.
1519 * tui/tui-stack.c (_initialize_tui_stack): Declare before
1520 definition.
1521 * tui/tui-win.c: Include "tui/tui-win.h".
1522 (_initialize_tui_win): Declare before definition.
1523 (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
1524 * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
1525 (tui_get_cmd_list): Add a prototype.
1526 * tui/tui-windata.c: Include tui-windata.h.
1527 * tui/tui-wingeneral.c (box_win): Make it static.
1528 * cli/cli-logging.c (show_logging_command): Make it static.
1529 (_initialize_cli_logging): Declare before definition.
1530 * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
1531 definition.
1532
1533 2009-02-20 Pierre Muller <muller@ics.u-strasbg.fr>
1534
1535 Extend use of i386_use_watchpoints to all i386 native files
1536 using hardware watchpoints.
1537 * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
1538 * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
1539 * windows-nat.c (init_windows_ops): Ditto.
1540 * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
1541 * config/i386/nm-cygwin64.h: Ditto.
1542 * config/i386/nm-fbsd.h: Ditto.
1543 * config/i386/nm-go32.h: Ditto.
1544
1545 2009-02-19 Joel Brobecker <brobecker@adacore.com>
1546
1547 * ada-typeprint.c (ada_typedef_print): Remove. Unused.
1548
1549 2009-02-18 Vladimir Prus <vladimir@codesourcery.com>
1550
1551 * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
1552 (mi_interpreter_init): Register the above.
1553 * solib.c (clear_solib): Notify solib unload.
1554 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
1555 disable breakpoints on a.out targets.
1556
1557 2009-02-17 Vladimir Prus <vladimir@codesourcery.com>
1558
1559 * observer.c (observer_test_first_notification_function)
1560 (observer_test_second_notification_function)
1561 (observer_test_third_notification_function): Adjust prototype.
1562
1563 2009-02-17 Pedro Alves <pedro@codesourcery.com>
1564
1565 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
1566 (ALL_TARGET_OBS): Add dicos-tdep.o.
1567 (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
1568 * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
1569 gdb_target_obs.
1570 (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
1571 gdb_target_obs.
1572 * dicos-tdep.h, dicos-tdep.c: New.
1573 * amd64-dicos-tdep.c: New.
1574 * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
1575 inferior.h. Include dicos-tdep.h.
1576 (i386_dicos_init_abi): Call dicos_init_abi.
1577 (i386_dicos_bfd_has_symbol_p): Delete.
1578 (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
1579
1580 * NEWS: Mention x86-64 DICOS target support.
1581
1582 2009-02-16 Doug Evans <dje@google.com>
1583
1584 * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
1585 All callers updated.
1586 (amd64_get_insn_details): Handle more 3-byte opcode insns.
1587 (amd64_breakpoint_p): Delete.
1588 (amd64_displaced_step_fixup): When fixing up after stepping an int3,
1589 don't back up pc to the start of the int3.
1590 * i386-tdep.c: #include opcode/i386.h.
1591 (i386_skip_prefixes): New function.
1592 (i386_absolute_jmp_p): Constify argument.
1593 (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
1594 (i386_breakpoint_p): Delete.
1595 (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
1596 When fixing up after stepping an int3, don't back up pc to the start
1597 of the int3.
1598
1599 2009-02-16 Pedro Alves <pedro@codesourcery.com>
1600
1601 * corelow.c (core_close): Don't hardcode the core's pid.
1602 (core_open): Find core threads before calling
1603 post_create_inferior.
1604 (add_to_thread_list, get_core_register_section): Take into account
1605 systems where the regset section names encode the pid of the
1606 inferior.
1607
1608 * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
1609 * gdbarch.h, gdbarch.c: Regenerate.
1610
1611 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
1612 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
1613 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
1614 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
1615
1616 2009-02-14 Vladimir Prus <vladimir@codesourcery.com>
1617
1618 Include frame information for *stopped due to CLI commands.
1619
1620 * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
1621 * infcmd.c (finish_command_continuation): Pass '1' for
1622 'print_frame' parameter to the observer.
1623 * infrun.c (normal_stop): Don't print mi-specific information
1624 here. Pass 'stop_print_frame' to the 'print_frame' parameter
1625 of the observer.
1626 * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
1627 If we need to print frame, and current uiout is not the MI one,
1628 print frame again.
1629
1630 2009-02-13 Pierre Muller <muller@ics.u-strasbg.fr>
1631
1632 * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
1633 Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
1634
1635 2009-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1636
1637 PR fortran/9806
1638 * dwarf2read.c (process_die <DW_TAG_module>, read_module)
1639 (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
1640
1641 2009-02-11 Pierre Muller <muller@ics.u-strasbg.fr>
1642
1643 * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
1644 for DW_ATE_signed_char and DW_ATE_unsigned_char
1645 for pascal language.
1646
1647 2009-02-11 Jim Meyering <meyering@redhat.com>
1648 Jan Kratochvil <jan.kratochvil@redhat.com>
1649
1650 Avoid NULL dereference.
1651 * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
1652 New variable func_type.
1653
1654 2009-02-11 Pedro Alves <pedro@codesourcery.com>
1655
1656 * gdbarch.c: Regenerate.
1657
1658 2009-02-10 Pierre Muller <muller@ics.u-strasbg.fr>
1659
1660 * p-lang.c (is_pascal_string_type): Fix comment.
1661 Determine exact size of char elements for GPC
1662 strings.
1663 (pascal_printstr): Handle char width of 2 or 4.
1664 * p-valprint.c (pascal_val_print): Handle char
1665 of width 2 or 4.
1666
1667 2009-02-07 Daniel Jacobowitz <dan@codesourcery.com>
1668
1669 * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
1670 inside the loop. Only call addrmap_set_empty if the compilation unit
1671 had DW_AT_high_pc and DW_AT_low_pc. Update call to
1672 scan_partial_symbols.
1673 (scan_partial_symbols): Take NEED_PC argument and pass it along with
1674 LOWPC and HIGHPC.
1675 (add_partial_namespace): Take NEED_PC argument and pass it through.
1676 (add_partial_subprogram): Take NEED_PC argument. Update the addrmap
1677 if necessary.
1678
1679 2009-02-07 Pedro Alves <pedro@codesourcery.com>
1680
1681 * NEWS: Mention inspecting extra signal information, $_siginfo,
1682 and the qXfer:siginfo:read and qXfer:siginfo:write packets.
1683
1684 2009-02-07 Pedro Alves <pedro@codesourcery.com>
1685
1686 * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
1687 isn't defined.
1688
1689 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1690
1691 * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
1692 (compat_timer_t, compat_clock_t, struct compat_timeval)
1693 (compat_sigval_t, compat_siginfo_t): New types.
1694 (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
1695 (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
1696 (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
1697 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1698 (amd64_linux_siginfo_fixup): New.
1699 * linux-nat.c (linux_nat_siginfo_fixup): New.
1700 (siginfo_fixup): New.
1701 (linux_xfer_siginfo): Use siginfo_fixup to convert between the
1702 siginfo layout expected by ptrace and the siginfo layout of the
1703 inferior.
1704 (linux_nat_set_siginfo_fixup): New.
1705 * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
1706
1707 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1708
1709 * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
1710 * infrun.c (siginfo_value_read, siginfo_value_write): New.
1711 (siginfo_value_funcs): New.
1712 (siginfo_make_value): New.
1713 (_initialize_infrun): Create the $_siginfo convenience variable.
1714 * gdbtypes.h (append_composite_type_field_aligned): Declare.
1715 * gdbtypes.c (append_composite_type_field): Rename to...
1716 (append_composite_type_field_aligned): ... this. Add ALIGNMENT
1717 argument. Handle it.
1718 (append_composite_type_field): Rewrite on top of
1719 append_composite_type_field_aligned.
1720 * value.h (internalvar_make_value): New typedef.
1721 (struct internalvar) <make_value>: New field.
1722 (create_internalvar_type_lazy): Declare.
1723 * value.c (create_internalvar): Clear make_value.
1724 (create_internalvar_type_lazy): New.
1725 (value_of_internalvar): If make_value is set use it.
1726 (preserve_values): Skip internal variables that don't have a
1727 value.
1728 * gdbarch.sh (get_siginfo_type): New.
1729 * gdbarch.h, gdbarch.c: Regenerate.
1730
1731 * linux-tdep.h, linux-tdep.c: New.
1732 * amd64-linux-tdep.c: Include "linux-tdep.h".
1733 (amd64_linux_init_abi): Register linux_get_siginfo_type and
1734 linux_get_siginfo_mapper.
1735 * i386-linux-tdep.c: Include "linux-tdep.h".
1736 (i386_linux_init_abi): Register linux_get_siginfo_type and
1737 linux_get_siginfo_mapper.
1738 * arm-linux-tdep.c: Include "linux-tdep.h".
1739 (i386_linux_init_abi): Register linux_get_siginfo_type and
1740 linux_get_siginfo_mapper.
1741
1742 * linux-nat.c (linux_xfer_siginfo): New.
1743 (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
1744 * remote.c (PACKET_qXfer_siginfo_read)
1745 (PACKET_qXfer_siginfo_write): New.
1746 (feature remote_protocol_features): Add "qXfer:siginfo:read" and
1747 "qXfer:siginfo:write" features.
1748 (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
1749 (_initialize_remote): Add "set/show remote read-siginfo-object"
1750 and "set/show remote write-siginfo-object" commands.
1751
1752 * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
1753 (HFILES_NO_SRCDIR): Add linux-tdep.h.
1754 (ALLDEPFILES): Add linux-tdep.c.
1755
1756 * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
1757 (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
1758 gdb_target_obs.
1759
1760 2009-02-06 Jim Blandy <jimb@codesourcery.com>
1761 Daniel Jacobowitz <dan@codesourcery.com>
1762 Vladimir Prus <vladimir@codesourcery.com>
1763 Pedro Alves <pedro@codesourcery.com>
1764
1765 * defs.h (enum lval_type): New value: lval_computed.
1766 * value.h (struct lval_funcs): New type.
1767 (allocate_computed_value, value_computed_funcs)
1768 (value_computed_closure): New declarations.
1769 * value.c (struct value): Add a structure to the location union
1770 for computed lvalues, containing 'funcs' and 'closure' members.
1771 (allocate_computed_value, value_computed_funcs)
1772 (value_computed_closure): New functions.
1773 (value_free): For computed lvalues, call the closure's
1774 'free_closure' function before freeing the value itself.
1775 (value_copy): If we're copying an lval_computed value, call the
1776 closure's 'copy_closure' function.
1777 (set_value_component_location): If the original value is a
1778 computed lvalue, then call the closure's 'copy_closure' function.
1779 (value_of_internalvar): If an internal variable's value is a
1780 computed lvalue, make retrieving its value produce an equivalent
1781 computed lvalue.
1782 * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
1783 their read function.
1784 (value_assign): Assign to computed lvalues by calling their write
1785 function.
1786
1787 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1788
1789 * linux-nat.c (linux_nat_wait): Adjust.
1790 (linux_nat_pid_to_str): Adjust. Remove call to thread_db_init.
1791 * linux-nat.h (thread_db_init): Delete declaration.
1792 * linux-thread-db.c (target_beneath): Delete.
1793 (thread_db_init): Delete.
1794 (thread_db_detach): Use find_target_beneath.
1795 (thread_db_wait): Adjust interface. Use find_target_beneath.
1796 (thread_db_mourn_inferior): Use find_target_beneath.
1797 (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
1798 (thread_db_async_mask): Delete.
1799 (thread_db_pid_to_str): Adjust interface. Use
1800 find_target_beneath.
1801 (thread_db_get_thread_local_address): Adjust interface. Use
1802 find_target_beneath.
1803 (init_thread_db_ops): Delete references to delete functions.
1804 * target.c (update_current_target): Don't inherit or default
1805 to_wait. Don't inherit to_pid_to_str and
1806 to_get_thread_local_address.
1807 (target_translate_tls_address): Look for a pushed target that
1808 implements to_get_thread_local_address, and use it instead of
1809 checking for target_get_thread_local_address_p.
1810 (target_wait, target_pid_to_str): Reimplement as functions.
1811 (dummy_pid_to_str): New.
1812 (init_dummy_target): Register it.
1813 (debug_to_wait): Delete.
1814 * target.h (struct target_ops): Make to_wait, to_pid_to_str and
1815 to_get_thread_local_address accept a pointer to struct target_ops.
1816 (target_wait): Delete macro, and declare as function.
1817 (target_pid_to_str): Likewise.
1818 (target_get_thread_local_address)
1819 (target_get_thread_local_address_p): Delete.
1820 (noprocess): Add NORETURN and ATTR_NORETURN tags.
1821 * inf-ptrace.c (inf_ptrace_wait): Adjust.
1822 (inf_ptrace_pid_to_str): New.
1823 (inf_ptrace_target): Use inf_ptrace_pid_to_str.
1824 * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
1825 * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
1826 * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
1827 Adjust.
1828 * corelow.c (core_pid_to_str): Adjust.
1829 * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
1830 * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
1831 * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
1832 * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
1833 * hpux-thread.c (hpux_thread_wait): Adjust.
1834 * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
1835 * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
1836 * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
1837 * procfs.c (procfs_pid_to_str): Adjust.
1838 * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
1839 * remote-mips.c (mips_wait): Adjust.
1840 * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
1841 * remote.c (remote_wait, remote_pid_to_str)
1842 (remote_get_thread_local_address): Adjust.
1843 * rs6000-nat.c (rs6000_wait): Adjust.
1844 * sol-thread.c (procfs_pid_to_str): Adjust declaration.
1845 (sol_thread_wait, solaris_pid_to_str): Adjust.
1846 * spu-linux-nat.c (spu_child_wait): Adjust.
1847 * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
1848
1849 2009-02-06 Tom Tromey <tromey@redhat.com>
1850
1851 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
1852 (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
1853 (python-cmd.o): New target.
1854 * cli/cli-decode.c (set_cmd_completer): Add self parameter to
1855 completer prototype.
1856 (add_cmd): Initialize destroyer member of cmd_list_element. Use
1857 make_symbol_completion_list_fn as completer.
1858 (delete_cmd): Call destroyer if one is set.
1859 * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
1860 completer member. Add destroyer member.
1861 (set_cmd_completer): Add self parameter to
1862 completer prototype.
1863 * command.h (set_cmd_completer): Add cmd parameter to
1864 completer prototype.
1865 * completer.c (noop_completer, filename_completer,
1866 location_completer, expression_completer, command_completer): Adapt
1867 to new completer prototype.
1868 (complete_line_internal): Pass new parameter to completer function.
1869 * completer.h (noop_completer, filename_completer,
1870 location_completer, expression_completer, command_completer): Adapt
1871 prototypes to new completer prototype.
1872 * interps.c (interpreter_completer): Adapt to new completer
1873 prototype.
1874 * python/python-cmd.c: New file.
1875 * python/python-internal.h (gdbpy_initialize_commands): Add
1876 prototype.
1877 (gdbpy_doc_cst): Add forward declaration.
1878 * python/python.c (gdbpy_doc_cst): Declare.
1879 (_initialize_python): Call gdbpy_initialize_commands. Initialize
1880 gdbpy_doc_cst.
1881 * symtab.c (make_symbol_completion_list_fn): New function.
1882 * symtab.h (make_symbol_completion_list_fn): Add prototype.
1883
1884 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1885
1886 * target.c (target_get_osdata): Check for equal or higher than
1887 process_stratum, not dummy_stratum.
1888
1889 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1890
1891 * remote.c (extended_remote_can_run): Delete.
1892 (init_remote_ops): Don't register it.
1893 * target.c (target_get_osdata): Don't check for target_can_run.
1894 Instead any target that has already been pushed, otherwise
1895 fallback to the default run target.
1896
1897 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1898
1899 * target.c (target_create_inferior, target_detach)
1900 (target_mourn_inferior, target_attach, target_close): Do target
1901 debug output.
1902 (debug_to_attach, debug_to_detach, debug_to_create_inferior)
1903 (debug_to_mourn_inferior, debug_to_close): Delete.
1904 (setup_target_debug): Adjust.
1905
1906 2009-02-05 Pedro Alves <pedro@codesourcery.com>
1907
1908 * target.h (target_stopped_data_address_p): Delete declaration,
1909 and don't define as macro.
1910 * target.c (target_stopped_data_address_p): Delete.
1911
1912 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
1913 Tom Tromey <tromey@redhat.com>
1914
1915 * python/python-utils.c (target_string_to_unicode): New function.
1916 * python/python-internal.h (target_string_to_unicode): New prototype.
1917 * python/python-value.c (valpy_string): New function.
1918 (value_object_methods): Add `string' entry.
1919
1920 2009-02-05 Pedro Alves <pedro@codesourcery.com>
1921
1922 * target.h (target_tid_to_str): Delete.
1923 * thread.c (print_thread_info, thread_apply_all_command)
1924 (thread_apply_command, thread_command, do_captured_thread_select):
1925 Use target_pid_to_str instead of target_tid_to_str.
1926 * linux-fork.c (delete_fork_command): Likewise.
1927
1928 2009-02-05 Pedro Alves <pedro@codesourcery.com>
1929
1930 * frame.c (has_stack_frames): Make public.
1931 (get_prev_frame): Don't allow a NULL this_frame anymore.
1932 * frame.h (has_stack_frames): Declare.
1933 * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
1934 to get_prev_frame, instead start at get_current_frame.
1935 (varobj_create): Check has_stack_frames before getting any frame;
1936 eliminate one usage of deprecated_safe_get_selected_frame.
1937
1938 2009-02-05 Tom Tromey <tromey@redhat.com>
1939 Thiago Jung Bauermann <bauerman@br.ibm.com>
1940
1941 * python/python.c (GdbMethods): Move to bottom of file.
1942 (get_parameter, execute_gdb_command, gdbpy_write,
1943 gdbpy_flush): Remove forward declarations.
1944 (eval_python_from_control_command): Fix error checking of function
1945 PyRun_SimpleString. Fix error string.
1946 (python_command): Likewise.
1947 (execute_gdb_command): Added from_tty argument.
1948
1949 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
1950
1951 * language.h (language_dfn): Add la_get_string member.
1952 (LA_GET_STRING): New macro.
1953 (default_get_string): New prototype.
1954 * language.c (default_get_string): New function.
1955 (unknown_language_defn, auto_language_defn, local_language_defn): Use
1956 default_get_string for la_get_string.
1957 * c-lang.c (c_get_string): New function.
1958 (c_language_defn, cplus_language_defn, asm_language_defn): Use
1959 c_get_string for la_get_string.
1960 (minimal_language_defn): Likewise
1961 * ada-lang.c (ada_language_defn): Likewise.
1962 * f-lang.c (f_language_defn): Use default_get_string for
1963 la_get_string.
1964 * jv-lang.c (java_language_defn): Likewise.
1965 * m2-lang.c (m2_language_defn): Likewise.
1966 * objc-lang.c (objc_language_defn): Likewise.
1967 * p-lang.c (p_language_defn): Likewise.
1968 * scm-lang.c (scm_language_defn): Likewise.
1969 * typeprint.c (type_to_string): New function.
1970 * value.h (type_to_string): New prototype.
1971 * valprint.c (val_print_string): Factor out code for reading string
1972 from the inferior into its own function. Put 2 spaces after period
1973 in comments.
1974 (read_string): New function.
1975 * valprint.h (read_string): New prototype.
1976
1977 2009-01-07 Pierre Muller <muller@ics.u-strasbg.fr>
1978 Tom Tromey <tromey@redhat.com>
1979
1980 PR breakpoints/8079:
1981 * breakpoint.c (print_one_breakpoint): Use exp_string field
1982 to display expression of watchpoints.
1983 (mention): Likewise.
1984 (watch_command_1): Remove trailing whitespace from expression.
1985 * printcmd.c (struct display) <exp_string>: New field.
1986 (display_command): Set exp_string.
1987 (free_display): Free exp_string.
1988 (clear_displays): Use free_display.
1989 (do_one_display): Print exp_string.
1990 (display_info): Likewise.
1991
1992 2009-02-04 Tom Tromey <tromey@redhat.com>
1993 Thiago Jung Bauermann <bauerman@br.ibm.com>
1994 Phil Muldoon <pmuldoon@redhat.com>
1995
1996 * python/python-internal.h (gdbpy_get_value_from_history): Rename
1997 prototype to gdbpy_history.
1998 (gdbpy_is_string): Declare.
1999 (python_string_to_host_string): Declare.
2000 * python/python-utils.c (gdbpy_is_string): New function.
2001 (unicode_to_encoded_string): New function.
2002 (unicode_to_target_string): Use it.
2003 (python_string_to_host_string): New function.
2004 * python/python-value.c (valpy_address): New function.
2005 (convert_value_from_python): Use gdbpy_is_string. Change to throw
2006 Python exception instead of a GDB exception on error. Properly check
2007 Python booleans.
2008 (valpy_getitem): Convert field name to host string. Handle array
2009 accesses. Adapt to new behaviour of convert_value_from_python.
2010 (valpy_new): Adapt to new behaviour of convert_value_from_python.
2011 (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
2012 VALPY_BITXOR, VALPY_BITOR>: New constants.
2013 (valpy_binop): Update. Adapt to new behaviour of
2014 convert_value_from_python.
2015 (valpy_invert): New function.
2016 (valpy_lsh): Likewise.
2017 (valpy_rsh): Likewise.
2018 (valpy_and): Likewise.
2019 (valpy_or): Likewise.
2020 (valpy_xor): Likewise.
2021 (valpy_richcompare): Call convert_value_from_python instead of doing
2022 conversions itself.
2023 (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
2024 (gdbpy_get_value_from_history): Rename
2025 function to gdbpy_history.
2026 (gdbpy_initialize_values): Don't set tp_new.
2027 (value_object_type): Add valpy_new.
2028 (value_object_methods): Add `address' entry.
2029 (value_object_as_number): Update for new methods.
2030 * python/python.c (GdbMethods): Rename entry from
2031 `get_value_from_history' to `history'.
2032
2033 2009-02-04 Jerome Guitton <guitton@adacore.com>
2034
2035 * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
2036 of type to guard against a crash.
2037
2038 2009-02-04 Jerome Guitton <guitton@adacore.com>
2039
2040 * value.c (value_from_contents_and_address): Always return
2041 a lval_memory value, even if address is null.
2042
2043 2009-02-04 Tristan Gingold <gingold@adacore.com>
2044
2045 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
2046 (amd64_darwin_sigcontext_addr): Ditto.
2047 (darwin_dwarf_signal_frame_p): Ditto.
2048 (i386_darwin_init_abi): Handle signal frames, use the const for
2049 sc_num_regs.
2050 (x86_darwin_init_abi_64): Ditto.
2051
2052 2009-02-04 Tristan Gingold <gingold@adacore.com>
2053
2054 * i386-tdep.c (i386_sigtramp_p): Make it public.
2055 * i386-tdep.h (i386_sigtramp_p): Declare.
2056
2057 2009-02-04 Tristan Gingold <gingold@adacore.com>
2058
2059 * machoread.c (macho_symfile_read): Read minsymtab also from
2060 shared libraries.
2061 (macho_symfile_read): Try to read dwarf2 frame info from main
2062 object file, but not from OSO files.
2063 (macho_symfile_offsets): Update section names for latest BFD
2064 changes.
2065 * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
2066 (x86_darwin_init_abi_64): Ditto.
2067 * solib-darwin.c: New file.
2068 * solib-darwin.h: New file.
2069 * configure.tgt: Add solib.o solib-darwin.o for Darwin.
2070
2071 2009-02-04 Tristan Gingold <gingold@adacore.com>
2072
2073 * solist.h (struct target_so_ops): Comment fallback behavior for
2074 operation same.
2075
2076 2009-02-03 Tom Tromey <tromey@redhat.com>
2077
2078 * completer.c (add_struct_fields): Check type_name against NULL
2079 before use.
2080
2081 2009-02-03 Joel Brobecker <brobecker@adacore.com>
2082
2083 * MAINTAINERS: Update Elena's email address.
2084
2085 2009-02-02 Joel Brobecker <brobecker@adacore.com>
2086
2087 * breakpoint (update_watchpoint): Minor comment adjustment.
2088
2089 2009-02-02 Tom Tromey <tromey@redhat.com>
2090
2091 PR gdb/9594:
2092 * completer.c (count_struct_fields): Count method names.
2093 (add_struct_fields): Add matching method names.
2094
2095 2009-02-02 Doug Evans <dje@google.com>
2096
2097 * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
2098 doing any further tcl/tk configury. Don't configure gdbtk if
2099 tcl or tk check fails.
2100 * aclocal.m4: Regenerate.
2101 * configure: Regenerate.
2102
2103 2009-02-02 Tom Tromey <tromey@redhat.com>
2104
2105 PR exp/9059:
2106 * valops.c (find_overload_match): Follow typedefs before taking
2107 address of object argument.
2108
2109 2009-02-01 Doug Evans <dje@google.com>
2110
2111 * target.h (target_waitstatus_to_string): Declare.
2112 * target.c (target_waitstatus_to_string): New function. Copied from
2113 debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
2114 TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
2115 TARGET_WAITKIND_NO_HISTORY.
2116 (debug_to_wait): Call it.
2117 * infrun.c (wait_for_inferior): If debug_infrun, print result of
2118 target_wait.
2119 (fetch_inferior_event): Ditto.
2120
2121 2009-01-30 Tom Tromey <tromey@redhat.com>
2122
2123 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
2124
2125 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
2126
2127 PR 8145.
2128 * thread.c (do_captured_list_thread_ids): Report the current
2129 thread id.
2130
2131 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
2132
2133 * breakpoint.c (create_breakpoint, create_breakpoints)
2134 (break_command_really, set_breakpoint): New parameter enabled.
2135 (create_breakpoint, break_command_really): Make breakpoint
2136 disabled if so requested.
2137 * breakpoint.h (set_breakpoint): New parameter enabled.
2138 * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
2139
2140 2009-01-28 Doug Evans <dje@google.com>
2141
2142 * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
2143 (amd64_displaced_step_fixup): Declare.
2144 * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
2145 (amd64_arch_regmap): Move out of amd64_analyze_stack_align
2146 and make static global.
2147 (amd64_arch_regmap_len): New static global.
2148 (amd64_arch_reg_to_regnum): New function.
2149 (struct amd64_insn): New struct.
2150 (struct displaced_step_closure): New struct.
2151 (onebyte_has_modrm,twobyte_has_modrm): New static globals.
2152 (rex_prefix_p,skip_prefixes)
2153 (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
2154 (amd64_insn_length,amd64_get_unused_input_int_reg)
2155 (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
2156 (amd64_displaced_step_copy_insn)
2157 (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
2158 (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
2159 (amd64_displaced_step_fixup): New functions.
2160 * amd64-linux-tdep.c: #include arch-utils.h.
2161 (amd64_linux_init_abi): Install displaced stepping support.
2162
2163 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2164 Jerome Guitton <guitton@adacore.com>
2165
2166 * configure, config.in: Regenerated.
2167 * configure.ac: Add --with-system-gdbinit.
2168 * main.c (get_init_files): New.
2169 (captured_main): Use get_init_files. Load system gdbinit before
2170 $HOME/.gdbinit.
2171 (print_gdb_help): Print location of init files.
2172
2173 2009-01-28 Pedro Alves <pedro@codesourcery.com>
2174
2175 * corefile.c (generic_search): Delete disabled code.
2176 * gdbcore.h (generic_search): Delete declaration.
2177
2178 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2179
2180 * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
2181 parent to the child.
2182 * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
2183 * inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use
2184 remove_breakpoints to remove breakpoints from the parent.
2185
2186 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2187
2188 PR backtrace/9458, PR backtrace/8864:
2189 * frame.c (create_new_frame): Update the frame's cached PC before
2190 finding its unwinder. Use frame_id_build to build the new frame's
2191 id.
2192 * stack.c (parse_frame_specification_1): Correct setting ``addrs''
2193 array values from the ``args'' array values.
2194
2195 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2196
2197 * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
2198 (create_array_type, create_set_type, init_flags_type)
2199 (copy_type_recursive): Replace pairs of calls to XALLOC and memset
2200 with a call to XZALLOC or XCALLOC, and pairs of calls to
2201 obstack_alloc and memset with a call to OBSTACK_ZALLOC.
2202
2203 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2204
2205 Add "maint set|show internal-error|internal-warning quit|corefile
2206 ask|yes|no" commands.
2207
2208 PR gdb/7580:
2209 * utils.c (internal_problem_ask, internal_problem_yes)
2210 (internal_problem_no, internal_problem_modes): New.
2211 (struct internal_problem): Remove FIXME. Make should_quit and
2212 should_dump_core types to char *.
2213 (internal_vproblem, internal_error_problem)
2214 (internal_warning_problem): Adjust.
2215 (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
2216 functions.
2217 (add_internal_problem_command): New.
2218 (_initialize_utils): New.
2219
2220 2009-01-25 Pedro Alves <pedro@codesourcery.com>
2221
2222 * infcmd.c (program_info): Use paddress instead of casting stop_pc
2223 to unsigned long.
2224
2225 2009-01-24 Pedro Alves <pedro@codesourcery.com>
2226
2227 * infrun.c (normal_stop): Don't call
2228 deprecated_update_frame_pc_hack.
2229 * frame.c (deprecated_update_frame_pc_hack)
2230 (deprecated_update_frame_base_hack): Delete, and ...
2231 (create_new_frame): ... inline here.
2232 * frame.h (deprecated_update_frame_pc_hack)
2233 (deprecated_update_frame_base_hack): Delete declarations.
2234
2235 2009-01-23 Pedro Alves <pedro@codesourcery.com>
2236
2237 * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
2238 * cli/cli-setshow.c (do_setshow_command): Handle it.
2239 * command.h (enum var_types): Add var_zuinteger.
2240 (add_setshow_zuinteger_cmd): Declare.
2241
2242 * valprint.c (_initialize_valprint): Change the set input-radix
2243 and set output-radix commands to zuinteger type.
2244
2245 2009-01-23 Pedro Alves <pedro@codesourcery.com>
2246
2247 PR gdb/9664:
2248 * infrun.c (normal_stop): Tag threads as stopped, and run the
2249 hook-stop before printing the stack frame.
2250
2251 2009-01-22 Pedro Alves <pedro@codesourcery.com>
2252
2253 PR c++/9631:
2254 * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
2255 vbasetype.
2256
2257 2009-01-20 Kazu Hirata <kazu@codesourcery.com>
2258
2259 * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
2260 unsigned long.
2261
2262 2009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
2263
2264 PR gdb/9346
2265 * infcmd.c (signal_command): Do not specify a resume PC.
2266
2267 2009-01-19 Doug Evans <dje@google.com>
2268
2269 * dummy-frame.c (dummy_frame): Replace regcache member with
2270 caller_state.
2271 (dummy_frame_push): Replace caller_regcache arg with caller_state.
2272 All callers updated.
2273 (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
2274 (dummy_frame_pop): Rewrite. Verify requested frame is in the
2275 dummy frame stack. Restore program state.
2276 (cleanup_dummy_frames): Rewrite.
2277 (dummy_frame_sniffer): Update. Make static.
2278 * dummy-frame.h (regcache,frame_info): Delete forward decls.
2279 (inferior_thread_state): New forward decl.
2280 (dummy_frame_push): Update prototype.
2281 * frame.c (frame_pop): dummy_frame_pop now does all the work for
2282 DUMMY_FRAMEs.
2283 * infcall.c (breakpoint_auto_delete_contents): Delete.
2284 (get_function_name,run_inferior_call): New fns.
2285 (call_function_by_hand): Simplify by moving some code to
2286 get_function_name, run_inferior_call. Inferior function call wrapped
2287 in TRY_CATCH so there's less need for cleanups and all exits from
2288 proceed are handled similarily. Detect program exit.
2289 Detect program stopping in a different thread.
2290 Make error messages more consistent.
2291 * inferior.h (inferior_thread_state): Declare (opaque type).
2292 (save_inferior_thread_state,restore_inferior_thread_state,
2293 make_cleanup_restore_inferior_thread_state,
2294 discard_inferior_thread_state, get_inferior_thread_state_regcache):
2295 Declare.
2296 (save_inferior_status): Update prototype.
2297 * infrun.c: (normal_stop): When stopped for the completion of an
2298 inferior function call, verify the expected stack frame kind.
2299 (inferior_thread_state): New struct.
2300 (save_inferior_thread_state,restore_inferior_thread_state,
2301 do_restore_inferior_thread_state_cleanup,
2302 make_cleanup_restore_inferior_thread_state,
2303 discard_inferior_thread_state,
2304 get_inferior_thread_state_regcache): New functions.
2305 (inferior_status): Move stop_signal, stop_pc, registers to
2306 inferior_thread_state. Remove restore_stack_info.
2307 (save_inferior_status): Remove arg restore_stack_info.
2308 All callers updated. Remove saving of state now saved by
2309 save_inferior_thread_state.
2310 (restore_inferior_status): Remove restoration of state now done by
2311 restore_inferior_thread_state.
2312 (discard_inferior_status): Remove freeing of registers, now done by
2313 discard_inferior_thread_state.
2314
2315 2009-01-18 Pedro Alves <pedro@codesourcery.com>
2316
2317 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
2318 at a time, times NUM_TO_SCROLL.
2319 * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
2320 fetch the selected frame if there is no stack.
2321
2322 2009-01-18 Pedro Alves <pedro@codesourcery.com>
2323
2324 PR gdb/9747:
2325 * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
2326 Declare.
2327 * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
2328 * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
2329 is thrown while handling an event, finish the thread state.
2330 (normal_stop): Use finish_thread_state cleanup.
2331 * infcmd.c (run_command_1): If an error is thrown while starting
2332 the inferior, finish the thread state.
2333
2334 2009-01-18 Pedro Alves <pedro@codesourcery.com>
2335
2336 * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
2337 skip breakpoints without a location (pending breakpoints).
2338
2339 2009-01-18 Pedro Alves <pedro@codesourcery.com>
2340
2341 PR build/9186:
2342 * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
2343
2344 2009-01-18 Nick Roberts <nickrob@snap.net.nz>
2345
2346 * thread.c (thread_command): Move call to annotate_thread_changed
2347 to...
2348 (do_captured_thread_select): ... here, to avoid printing an
2349 annotation if the thread change generates an exception.
2350
2351 2009-01-16 Joel Brobecker <brobecker@adacore.com>
2352
2353 * NEWS: Document x86_64/MinGW as a new native configuration.
2354
2355 2009-01-16 Joel Brobecker <brobecker@adacore.com>
2356
2357 * NEWS: Move the documentation of "info os processes" to
2358 the appropriate section (documenting the new commands).
2359
2360 2009-01-15 Doug Evans <dje@google.com>
2361
2362 * target.h (target_signal_to_string): Make return type const char *.
2363 (target_signal_to_name): Ditto.
2364 (target_signal_from_name): Make arg const char *.
2365 * infrun.c (sig_print_info): Update.
2366 * signals/signals.c (signals): Make array and struct members const.
2367 (target_signal_to_string): Make return type const char *.
2368 (target_signal_to_name): Ditto.
2369 (target_signal_from_name): Make arg const char *.
2370
2371 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
2372 Tristan Gingold <gingold@adacore.com>
2373
2374 * solist.h (struct target_so_ops): New member bfd_open.
2375 (solib_find): Add prototype.
2376 (solib_bfd_fopen): Add prototype.
2377 * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
2378 from solib_bfd_open.
2379 (solib_bfd_open): Use ops->bfd_open override if present. Call
2380 solib_find and solib_bfd_open otherwise.
2381
2382 * objfiles.h (OBJF_KEEPBFD): New define.
2383 * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
2384 objfile flag is set.
2385 * solib.c (symbol_add_stub): Do not allocate second BFD for
2386 shared library; use OBJF_KEEPBFD flag on solib objfile.
2387
2388 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
2389
2390 * frame.c (get_frame_arch): Abort if called with NULL this_frame.
2391
2392 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
2393
2394 * value.h (address_of_variable): Add prototype.
2395 (locate_var_value): Remove prototype.
2396
2397 * findvar.c (read_var_value): Do not attempt to default frame
2398 to selected frame.
2399 (locate_var_value): Remove function.
2400 * valops.c (value_of_variable): Retrieve selected frame for
2401 symbols that require a frame when called with NULL block.
2402 * valops.c (address_of_variable): New function.
2403
2404 * eval.c (evaluate_subexp_for_address): Call address_of_variable
2405 instead of calling locate_var_value.
2406 (evaluate_subexp_with_coercion): Likewise.
2407
2408 2009-01-14 Daniel Jacobowitz <dan@codesourcery.com>
2409
2410 * NEWS: Document "define" for prefixed commands.
2411 * cli/cli-cmds.c (show_user): Update calls to show_user_1. Call
2412 show_user_1 for prefix commands.
2413 * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
2414 * cli/cli-script.c (validate_comname): Rewrite to handle prefix
2415 commands. Return the containing command list.
2416 (define_command, document_command): Update to handle prefix commands.
2417 (show_user_1): Add prefix and name arguments. Handle prefix
2418 commands.
2419 * cli/cli-script.h (show_user_1): Update prototype.
2420
2421 2009-01-14 Kai Tietz <kai.tietz@onevision.com>
2422
2423 * mingw-ser.c (console_select_thread): Add return to make
2424 compiler happy.
2425 (pipe_select_thread): Likewise.
2426 (file_select_thread): Likewise.
2427
2428 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2429
2430 * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
2431 previous change.
2432
2433 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2434
2435 * remote.c (extended_remote_mourn_1): Invalidate our notion of
2436 current general thread.
2437
2438 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2439
2440 * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
2441 without a live selected thread.
2442
2443 2009-01-14 Joel Brobecker <brobecker@adacore.com>
2444
2445 Update the copyright notice of some of the files I missed
2446 in the previous copyright update.
2447
2448 2009-01-14 Joel Brobecker <brobecker@adacore.com>
2449
2450 * windows-nat.c (handle_unload_dll): Use %p to print the DLL
2451 base address instead of casting it to DWORD.
2452
2453 2009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
2454
2455 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
2456 for NULL frame pointers.
2457
2458 2009-01-13 Mark Kettenis <kettenis@gnu.org>
2459
2460 * utils.c (host_address_to_string): Reimplement in a way that
2461 avoids the cast of the address to long.
2462
2463 2009-01-13 Joel Brobecker <brobecker@adacore.com>
2464
2465 * mdebugread.c (parse_symbol): Save the symbol private data
2466 using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
2467 (psymtab_to_symtab_1): Likewise.
2468 (parse_procedure): Declare variable "e" only in the scope
2469 where it is used. Extract the symbol private data using
2470 SYMBOL_VALUE_BYTES.
2471
2472 2009-01-13 Jim Blandy <jimb@codesourcery.com>
2473
2474 Abstract out common code for copying value locations.
2475
2476 * value.h (set_value_component_location): New declaration.
2477 * value.c (set_value_component_location): New function.
2478 (value_primitive_field): Use it.
2479 * valarith.c (value_subscript, value_subscripted_rvalue): Same.
2480 * valops.c (search_struct_field, value_slice): Same.
2481 * ada-lang.c (coerce_unspec_val_to_type)
2482 (ada_value_primitive_packed_val): Same.
2483
2484 2009-01-13 Joel Brobecker <brobecker@adacore.com>
2485
2486 * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
2487
2488 2009-01-12 Christopher Faylor <me+cygwin@cgf.cx>
2489
2490 * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
2491 throughout.
2492 * i386-cygwin-tdep.c: Ditto.
2493 * i386-windows-nat.c: Ditto.
2494 * windows-nat.h: Ditto.
2495 * windows-tdep.c: Ditto.
2496 * windows-tdep.h: Ditto.
2497 * windows-nat.c: Ditto.
2498 (cygwin_load_start): Redefine as CORE_ADDR.
2499 (cygwin_load_end): Ditto.
2500 (windows_make_so): Coerce result of address arithmetic to uintptr_t
2501 before coercing to CORE_ADDR to avoid a compiler warning.
2502 (handle_exception): Define addr as CORE_ADDR and coerce
2503 ExceptionAddress to uintptr_t before assigining to avoid a compiler
2504 warning.
2505 * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
2506 files.
2507
2508 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2509
2510 Fix linking with --enable-targets=all:
2511 * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
2512 (HFILES_NO_SRCDIR): Add windows-tdep.h.
2513 (ALLDEPFILES): Add windows-tdep.c.
2514
2515 2009-01-11 Chris Faylor <me.gdb@cgf.cx>
2516
2517 * win32-nat.h: Delete.
2518 * windows-nat.h: Rename from win32-nat.h.
2519 * win32-nat.c: Delete.
2520 * windows-nat.c: Rename from win32-nat.c.
2521 * win32-termcap.c: Delete.
2522 * windows-termcap.c: Rename from win32-termcap.c.
2523 * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
2524 * configure.ac: Handle rename from win32-termcap.c ->
2525 windows-termcap.c.
2526 * configure: Regenerate.
2527 * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
2528 -> windows-termcap.c.
2529 * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
2530 windows-tdep.h.
2531 * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
2532 * windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
2533 windows-tdep.h.
2534 (win32_make_so): Handle cygwin compiler warning due to change of
2535 load_addr from DWORD to LPVOID.
2536 (handle_load_dll): Use %p in format string to properly print address
2537 and avoid a compiler warning.
2538 (DEBUG_EXCEPTION_SIMPLE): Ditto.
2539 (handle_exception): Ditto.
2540 * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
2541 * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
2542 windows-nat.o.
2543 * config/i386/mingw.mh: Ditto.
2544 * config/i386/mingw64.mh: Ditto.
2545
2546 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2547
2548 * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
2549 arrayprint_recurse_level to a parameter. Update all the callers. New
2550 comment at autovariables.
2551
2552 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2553
2554 * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
2555 coding style.
2556
2557 2009-01-11 Joel Brobecker <brobecker@adacore.com>
2558
2559 * target.c (target_xfer_partial): Use host_address_to_string to
2560 print the address of readbuf and writebuf. Cast the address of
2561 elements inside the myaddr buffer into intptr_t.
2562 (deprecated_debug_xfer_memory): Use paddress to print memaddr.
2563 Cast the address of elements inside the myaddr buffer into
2564 intptr_t.
2565
2566 2009-01-11 Joel Brobecker <brobecker@adacore.com>
2567
2568 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
2569 * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
2570 * configure.host, configure.tgt: Add handling for x86_64/windows.
2571 * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
2572 and amd64-windows-tdep.c.
2573
2574 2009-01-11 Joel Brobecker <brobecker@adacore.com>
2575
2576 * win32-tdep.h, win32-tdep.c: New files.
2577 * i386-cygwin-tdep.h: Delete.
2578 * i386-cygwin-tdep.c: Include win32-tdep.h instead of
2579 i386-cygwin-tdep.h.
2580 (win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
2581 * win32-nat.c: Likewise.
2582 * configure.tgt: Add win32-tdep.o to the list of target object
2583 files for i386-cygwin and i386-mingw targets.
2584
2585 2009-01-11 Joel Brobecker <brobecker@adacore.com>
2586
2587 * win32-nat.h: New file.
2588 * win32-nat.c (mappings): Initialize to NULL.
2589 (win32_set_context_register_offsets): New function.
2590 * i386-windows-nat.c: New file.
2591 (mappings): Moved here from win32-nat.c.
2592 (_initialize_i386_windows_nat): New function.
2593 * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
2594 * config/i386/cygwin.mh (NATDEPFILES): Likewise.
2595
2596 2009-01-09 Andreas Schwab <schwab@suse.de>
2597
2598 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
2599
2600 2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2601
2602 * gdbtypes.c (append_composite_type_field): Correct the location of
2603 appended fields.
2604
2605 2009-01-09 Pedro Alves <pedro@codesourcery.com>
2606
2607 * defs.h (deprecated_error_hook): Delete declaration.
2608 * interps.c (clear_interpreter_hooks): Adjust.
2609 * remote-sim.c (gdb_os_error): Don't try to call
2610 deprecated_error_hook. No need to call exit anymore.
2611 * top.c (deprecated_error_hook): Delete.
2612
2613 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2614
2615 * arch-utils.c (gdbarch_update_p): Use host_address_to_string
2616 to print the address of the gdbarch pointer.
2617
2618 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2619
2620 * gdbarch.sh: Fix all the compilation errors on amd64-windows
2621 due to casting a pointer to a long when printing a function
2622 address. Instead, use host_address_to_string to convert our
2623 address to a string.
2624 * gdbarch.c: Regenerate.
2625
2626 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2627
2628 * event-top.c (async_disconnect, async_stop_sig): use "raise"
2629 instead of "kill" to raise a signal.
2630
2631 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2632
2633 * win32-nat.c (get_module_name): Change the type of parameter
2634 "base_address" to LPVOID. Remove unnecessary cast.
2635 (struct lm_info): Change type of load_addr to LPVOID.
2636 (win32_make_so): Change the type of parameter "load_addr"
2637 to LPVOID. Remove some unnecessary casts.
2638 (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
2639 (win32_xfer_shared_libraries): Add missing cast.
2640
2641 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2642
2643 * win32-nat.c (has_detach_ability, set_process_privilege):
2644 Cast the result of GetProcAddress to (void *) to avoid
2645 a compilation warning.
2646
2647 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2648
2649 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
2650 already defined.
2651
2652 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2653
2654 * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
2655 definition of local variable "done".
2656 (info_w32_command, handle_exception): Remove unnecessary cast.
2657
2658 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2659
2660 * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
2661 DebugSetProcessKillOnExit. Update all uses in this file.
2662 (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
2663 Update all uses in this file.
2664
2665 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2666
2667 * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
2668 and use it when pushing the target.
2669 (win32_attach, win32_create_inferior): Update call to
2670 do_initial_win32_stuff.
2671 (win32_detach, win32_mourn_inferior): Use our ops parameter
2672 instead of the global win32_ops to unpush the target.
2673
2674 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2675
2676 * ser-mingw.c (ser_windows_open): Use proper type when casting
2677 in call to _open_osfhandle.
2678
2679 2009-01-09 Kai Tietz <kai.tietz@onevision.com>
2680
2681 * coff-pe-read.c (read_pe_exported_syms): Fix typo.
2682
2683 2009-01-09 Joel Brobecker <brobecker@adacore.com>
2684
2685 * CONTRIBUTE: Minor reformatting.
2686
2687 2009-01-08 Kai Tietz <kai.tietz@onevision.com>
2688
2689 * MAINTAINERS: Add myself to Write After Approval.
2690 * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
2691 export directory.
2692
2693 2009-01-08 Nathan Froyd <froydnj@codesourcery.com>
2694
2695 * remote-sim.c (gdb_os_error): Mark as a noreturn function.
2696 Call exit to make it obvious to GCC.
2697
2698 2009-01-08 Tom Tromey <tromey@redhat.com>
2699
2700 PR breakpoints/9350:
2701 * varobj.c (varobj_invalidate): Unconditionally free
2702 all_rootvarobj.
2703 * symfile.c (syms_from_objfile): Free local_addr when returning
2704 normally.
2705 * exec.c (exec_file_attach): Do cleanups before returning.
2706 (exec_file_command): Likewise.
2707 * corefile.c (reopen_exec_file): Do cleanups before returning.
2708 * breakpoint.c (insert_breakpoint_locations): Do cleanups before
2709 returning.
2710 (do_vec_free): New function.
2711 (update_global_location_list): Make a cleanup for old_locations.
2712 Do cleanups before returning. Remove unused variable 'e'.
2713 (find_condition_and_thread): Free result of parsing the
2714 expression.
2715 (print_it_typical): Do cleanups before returning.
2716 (breakpoint_re_set_one): Always free sals.sals.
2717
2718 2009-01-08 Joel Brobecker <brobecker@adacore.com>
2719 Emi Suzuki <emi-suzuki@tjsys.co.jp>
2720
2721 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
2722 watchpoints.
2723
2724 2009-01-07 Doug Evans <dje@google.com>
2725
2726 * top.c (gdb_prompt_string): Delete, unused.
2727
2728 2009-01-07 Pedro Alves <pedro@codesourcery.com>
2729
2730 Delete ONE_PROCESS_WRITETEXT leftovers.
2731
2732 * breakpoint.c (insert_bp_location): Delete process_warning
2733 argument. Adjust.
2734 (insert_breakpoint_locations): Adjust.
2735 (reattach_breakpoints): Adjust.
2736 * infrun.c (normal_stop): Drop "It might be running in another
2737 process" notice.
2738
2739 2009-01-07 Stan Shebs <stan@codesourcery.com>
2740
2741 * config/pa/linux.mh (XDEPFILES): Remove.
2742
2743 2009-01-07 Doug Evans <dje@google.com>
2744
2745 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
2746
2747 2009-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2748
2749 * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
2750 spacing, a regression from 2008-04-22.
2751
2752 2009-01-07 Joel Brobecker <brobecker@adacore.com>
2753
2754 * utils.c (gdb_print_host_address): Adjust implementation to
2755 reuse host_address_to_string. Move comment explaining the conversion
2756 from host address to string from here...
2757 (host_address_to_string): ... to there.
2758
2759 2009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
2760
2761 * MAINTAINERS: Add myself for write after approval privileges.
2762
2763 2009-01-06 Tom Tromey <tromey@redhat.com>
2764
2765 * value.c (set_internalvar): Use value_free, not xfree.
2766
2767 2009-01-06 Jim Blandy <jimb@red-bean.com>
2768
2769 Check return values of functions declared with warn_unused_result
2770 attribute in GLIBC 2.8.
2771 * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
2772 * inflow.c (check_syscall): New function.
2773 (new_tty): Use check_syscall to check return values from open and dup.
2774 * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
2775 * main.c (captured_main): Call cwd after setting up gdb_stderr;
2776 check for errors from getcwd.
2777 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
2778 * ui-file.c (stdio_file_write): Ignore return value from fwrite.
2779 (stdio_file_fputs): Same.
2780 * utils.c (internal_vproblem): abort if last-ditch error message
2781 write fails.
2782
2783 * top.c (gdb_init): Don't set the current directory here; that's
2784 already been done in captured_main.
2785
2786 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
2787
2788 * ser-tcp.c: Adjust includes.
2789 (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
2790 (tcp_auto_retry, tcp_retry_limit): Declare.
2791 (TIMEOUT): Remove, in favor of tcp_retry_limit.
2792 (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
2793 (wait_for_connect): New function.
2794 (net_open): Use it. Add auto-retry logic.
2795 (set_tcp_cmd, show_tcp_cmd): New functions.
2796 (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
2797 and "set/show tcp connect-timeout" commands.
2798 * NEWS: Document new commands.
2799
2800 2009-01-05 Tom Tromey <tromey@redhat.com>
2801
2802 * python/python-internal.h (Py_ssize_t): Define as int.
2803
2804 2009-01-05 Jim Blandy <jimb@red-bean.com>
2805
2806 * MAINTAINERS: Fix my e-mail address as steering committee member.
2807
2808 2009-01-03 Joel Brobecker <brobecker@adacore.com>
2809
2810 Updated copyright notices for most files.
2811
2812 2009-01-03 Joel Brobecker <brobecker@adacore.com>
2813
2814 * top.c (print_gdb_version): Update copyright year.
2815
2816 2009-01-03 Joel Brobecker <brobecker@adacore.com>
2817
2818 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
2819
2820 2009-01-01 Pedro Alves <pedro@codesourcery.com>
2821
2822 PR breakpoints/9681:
2823 * exceptions.h (enum errors): New error type, MEMORY_ERROR.
2824 * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
2825 * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
2826 retrow all other exceptions.
2827
2828 For older changes see ChangeLog-2008.
2829 \f
2830 Local Variables:
2831 mode: change-log
2832 left-margin: 8
2833 fill-column: 74
2834 version-control: never
2835 coding: utf-8
2836 End: