1 2009-01-20 Kazu Hirata <kazu@codesourcery.com>
3 * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
6 2009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
9 * infcmd.c (signal_command): Do not specify a resume PC.
11 2009-01-19 Doug Evans <dje@google.com>
13 * dummy-frame.c (dummy_frame): Replace regcache member with
15 (dummy_frame_push): Replace caller_regcache arg with caller_state.
17 (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
18 (dummy_frame_pop): Rewrite. Verify requested frame is in the
19 dummy frame stack. Restore program state.
20 (cleanup_dummy_frames): Rewrite.
21 (dummy_frame_sniffer): Update. Make static.
22 * dummy-frame.h (regcache,frame_info): Delete forward decls.
23 (inferior_thread_state): New forward decl.
24 (dummy_frame_push): Update prototype.
25 * frame.c (frame_pop): dummy_frame_pop now does all the work for
27 * infcall.c (breakpoint_auto_delete_contents): Delete.
28 (get_function_name,run_inferior_call): New fns.
29 (call_function_by_hand): Simplify by moving some code to
30 get_function_name, run_inferior_call. Inferior function call wrapped
31 in TRY_CATCH so there's less need for cleanups and all exits from
32 proceed are handled similarily. Detect program exit.
33 Detect program stopping in a different thread.
34 Make error messages more consistent.
35 * inferior.h (inferior_thread_state): Declare (opaque type).
36 (save_inferior_thread_state,restore_inferior_thread_state,
37 make_cleanup_restore_inferior_thread_state,
38 discard_inferior_thread_state, get_inferior_thread_state_regcache):
40 (save_inferior_status): Update prototype.
41 * infrun.c: (normal_stop): When stopped for the completion of an
42 inferior function call, verify the expected stack frame kind.
43 (inferior_thread_state): New struct.
44 (save_inferior_thread_state,restore_inferior_thread_state,
45 do_restore_inferior_thread_state_cleanup,
46 make_cleanup_restore_inferior_thread_state,
47 discard_inferior_thread_state,
48 get_inferior_thread_state_regcache): New functions.
49 (inferior_status): Move stop_signal, stop_pc, registers to
50 inferior_thread_state. Remove restore_stack_info.
51 (save_inferior_status): Remove arg restore_stack_info.
52 All callers updated. Remove saving of state now saved by
53 save_inferior_thread_state.
54 (restore_inferior_status): Remove restoration of state now done by
55 restore_inferior_thread_state.
56 (discard_inferior_status): Remove freeing of registers, now done by
57 discard_inferior_thread_state.
59 2009-01-18 Pedro Alves <pedro@codesourcery.com>
61 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
62 at a time, times NUM_TO_SCROLL.
63 * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
64 fetch the selected frame if there is no stack.
66 2009-01-18 Pedro Alves <pedro@codesourcery.com>
69 * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
71 * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
72 * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
73 is thrown while handling an event, finish the thread state.
74 (normal_stop): Use finish_thread_state cleanup.
75 * infcmd.c (run_command_1): If an error is thrown while starting
76 the inferior, finish the thread state.
78 2009-01-18 Pedro Alves <pedro@codesourcery.com>
80 * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
81 skip breakpoints without a location (pending breakpoints).
83 2009-01-18 Pedro Alves <pedro@codesourcery.com>
86 * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
88 2009-01-18 Nick Roberts <nickrob@snap.net.nz>
90 * thread.c (thread_command): Move call to annotate_thread_changed
92 (do_captured_thread_select): ... here, to avoid printing an
93 annotation if the thread change generates an exception.
95 2009-01-16 Joel Brobecker <brobecker@adacore.com>
97 * NEWS: Document x86_64/MinGW as a new native configuration.
99 2009-01-16 Joel Brobecker <brobecker@adacore.com>
101 * NEWS: Move the documentation of "info os processes" to
102 the appropriate section (documenting the new commands).
104 2009-01-15 Doug Evans <dje@google.com>
106 * target.h (target_signal_to_string): Make return type const char *.
107 (target_signal_to_name): Ditto.
108 (target_signal_from_name): Make arg const char *.
109 * infrun.c (sig_print_info): Update.
110 * signals/signals.c (signals): Make array and struct members const.
111 (target_signal_to_string): Make return type const char *.
112 (target_signal_to_name): Ditto.
113 (target_signal_from_name): Make arg const char *.
115 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
116 Tristan Gingold <gingold@adacore.com>
118 * solist.h (struct target_so_ops): New member bfd_open.
119 (solib_find): Add prototype.
120 (solib_bfd_fopen): Add prototype.
121 * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
123 (solib_bfd_open): Use ops->bfd_open override if present. Call
124 solib_find and solib_bfd_open otherwise.
126 * objfiles.h (OBJF_KEEPBFD): New define.
127 * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
129 * solib.c (symbol_add_stub): Do not allocate second BFD for
130 shared library; use OBJF_KEEPBFD flag on solib objfile.
132 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
134 * frame.c (get_frame_arch): Abort if called with NULL this_frame.
136 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
138 * value.h (address_of_variable): Add prototype.
139 (locate_var_value): Remove prototype.
141 * findvar.c (read_var_value): Do not attempt to default frame
143 (locate_var_value): Remove function.
144 * valops.c (value_of_variable): Retrieve selected frame for
145 symbols that require a frame when called with NULL block.
146 * valops.c (address_of_variable): New function.
148 * eval.c (evaluate_subexp_for_address): Call address_of_variable
149 instead of calling locate_var_value.
150 (evaluate_subexp_with_coercion): Likewise.
152 2009-01-14 Daniel Jacobowitz <dan@codesourcery.com>
154 * NEWS: Document "define" for prefixed commands.
155 * cli/cli-cmds.c (show_user): Update calls to show_user_1. Call
156 show_user_1 for prefix commands.
157 * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
158 * cli/cli-script.c (validate_comname): Rewrite to handle prefix
159 commands. Return the containing command list.
160 (define_command, document_command): Update to handle prefix commands.
161 (show_user_1): Add prefix and name arguments. Handle prefix
163 * cli/cli-script.h (show_user_1): Update prototype.
165 2009-01-14 Kai Tietz <kai.tietz@onevision.com>
167 * mingw-ser.c (console_select_thread): Add return to make
169 (pipe_select_thread): Likewise.
170 (file_select_thread): Likewise.
172 2009-01-14 Pedro Alves <pedro@codesourcery.com>
174 * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
177 2009-01-14 Pedro Alves <pedro@codesourcery.com>
179 * remote.c (extended_remote_mourn_1): Invalidate our notion of
180 current general thread.
182 2009-01-14 Pedro Alves <pedro@codesourcery.com>
184 * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
185 without a live selected thread.
187 2009-01-14 Joel Brobecker <brobecker@adacore.com>
189 Update the copyright notice of some of the files I missed
190 in the previous copyright update.
192 2009-01-14 Joel Brobecker <brobecker@adacore.com>
194 * windows-nat.c (handle_unload_dll): Use %p to print the DLL
195 base address instead of casting it to DWORD.
197 2009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
199 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
200 for NULL frame pointers.
202 2009-01-13 Mark Kettenis <kettenis@gnu.org>
204 * utils.c (host_address_to_string): Reimplement in a way that
205 avoids the cast of the address to long.
207 2009-01-13 Joel Brobecker <brobecker@adacore.com>
209 * mdebugread.c (parse_symbol): Save the symbol private data
210 using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
211 (psymtab_to_symtab_1): Likewise.
212 (parse_procedure): Declare variable "e" only in the scope
213 where it is used. Extract the symbol private data using
216 2009-01-13 Jim Blandy <jimb@codesourcery.com>
218 Abstract out common code for copying value locations.
220 * value.h (set_value_component_location): New declaration.
221 * value.c (set_value_component_location): New function.
222 (value_primitive_field): Use it.
223 * valarith.c (value_subscript, value_subscripted_rvalue): Same.
224 * valops.c (search_struct_field, value_slice): Same.
225 * ada-lang.c (coerce_unspec_val_to_type)
226 (ada_value_primitive_packed_val): Same.
228 2009-01-13 Joel Brobecker <brobecker@adacore.com>
230 * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
232 2009-01-12 Christopher Faylor <me+cygwin@cgf.cx>
234 * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
236 * i386-cygwin-tdep.c: Ditto.
237 * i386-windows-nat.c: Ditto.
238 * windows-nat.h: Ditto.
239 * windows-tdep.c: Ditto.
240 * windows-tdep.h: Ditto.
241 * windows-nat.c: Ditto.
242 (cygwin_load_start): Redefine as CORE_ADDR.
243 (cygwin_load_end): Ditto.
244 (windows_make_so): Coerce result of address arithmetic to to uintptr_t
245 before coercing to CORE_ADDR to avoid a compiler warning.
246 (handle_exception): Define addr as CORE_ADDR and coerce
247 ExceptionAddress to uintptr_t before assigining to avoid a compiler
249 * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
252 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
254 Fix linking with --enable-targets=all:
255 * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
256 (HFILES_NO_SRCDIR): Add windows-tdep.h.
257 (ALLDEPFILES): Add windows-tdep.c.
259 2009-01-11 Christ Faylor <me.gdb@cgf.cx>
261 * win32-nat.h: Delete.
262 * windows-nat.h: Rename from win32-nat.h.
263 * win32-nat.c: Delete.
264 * windows-nat.c: Rename from win32-nat.c.
265 * win32-termcap.c: Delete.
266 * windows-termcap.c: Rename from win32-termcap.c.
267 * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
268 * configure.ac: Handle rename from win32-termcap.c ->
270 * configure: Regenerate.
271 * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
272 -> windows-termcap.c.
273 * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
275 * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
276 * windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
278 (win32_make_so): Handle cygwin compiler warning due to change of
279 load_addr from DWORD to LPVOID.
280 (handle_load_dll): Use %p in format string to properly print address
281 and avoid a compiler warning.
282 (DEBUG_EXCEPTION_SIMPLE): Ditto.
283 (handle_exception): Ditto.
284 * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
285 * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
287 * config/i386/mingw.mh: Ditto.
288 * config/i386/mingw64.mh: Ditto.
290 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
292 * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
293 arrayprint_recurse_level to a parameter. Update all the callers. New
294 comment at autovariables.
296 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
298 * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
301 2009-01-11 Joel Brobecker <brobecker@adacore.com>
303 * target.c (target_xfer_partial): Use host_address_to_string to
304 print the address of readbuf and writebuf. Cast the address of
305 elements inside the myaddr buffer into intptr_t.
306 (deprecated_debug_xfer_memory): Use paddress to print memaddr.
307 Cast the address of elements inside the myaddr buffer into
310 2009-01-11 Joel Brobecker <brobecker@adacore.com>
312 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
313 * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
314 * configure.host, configure.tgt: Add handling for x86_64/windows.
315 * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
316 and amd64-windows-tdep.c.
318 2009-01-11 Joel Brobecker <brobecker@adacore.com>
320 * win32-tdep.h, win32-tdep.c: New files.
321 * i386-cygwin-tdep.h: Delete.
322 * i386-cygwin-tdep.c: Include win32-tdep.h instead of
324 (win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
325 * win32-nat.c: Likewise.
326 * configure.tgt: Add win32-tdep.o to the list of target object
327 files for i386-cygwin and i386-mingw targets.
329 2009-01-11 Joel Brobecker <brobecker@adacore.com>
331 * win32-nat.h: New file.
332 * win32-nat.c (mappings): Initialize to NULL.
333 (win32_set_context_register_offsets): New function.
334 * i386-windows-nat.c: New file.
335 (mappings): Moved here from win32-nat.c.
336 (_initialize_i386_windows_nat): New function.
337 * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
338 * config/i386/cygwin.mh (NATDEPFILES): Likewise.
340 2009-01-09 Andreas Schwab <schwab@suse.de>
342 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
344 2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
346 * gdbtypes.c (append_composite_type_field): Correct the location of
349 2009-01-09 Pedro Alves <pedro@codesourcery.com>
351 * defs.h (deprecated_error_hook): Delete declaration.
352 * interps.c (clear_interpreter_hooks): Adjust.
353 * remote-sim.c (gdb_os_error): Don't try to call
354 deprecated_error_hook. No need to call exit anymore.
355 * top.c (deprecated_error_hook): Delete.
357 2009-01-09 Joel Brobecker <brobecker@adacore.com>
359 * arch-utils.c (gdbarch_update_p): Use host_address_to_string
360 to print the address of the gdbarch pointer.
362 2009-01-09 Joel Brobecker <brobecker@adacore.com>
364 * gdbarch.sh: Fix all the compilation errors on amd64-windows
365 due to casting a pointer to a long when printing a function
366 address. Instead, use host_address_to_string to convert our
368 * gdbarch.c: Regenerate.
370 2009-01-09 Joel Brobecker <brobecker@adacore.com>
372 * event-top.c (async_disconnect, async_stop_sig): use "raise"
373 instead of "kill" to raise a signal.
375 2009-01-09 Joel Brobecker <brobecker@adacore.com>
377 * win32-nat.c (get_module_name): Change the type of parameter
378 "base_address" to LPVOID. Remove unnecessary cast.
379 (struct lm_info): Change type of load_addr to LPVOID.
380 (win32_make_so): Change the type of parameter "load_addr"
381 to LPVOID. Remove some unnecessary casts.
382 (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
383 (win32_xfer_shared_libraries): Add missing cast.
385 2009-01-09 Joel Brobecker <brobecker@adacore.com>
387 * win32-nat.c (has_detach_ability, set_process_privilege):
388 Cast the result of GetProcAddress to (void *) to avoid
389 a compilation warning.
391 2009-01-09 Joel Brobecker <brobecker@adacore.com>
393 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
396 2009-01-09 Joel Brobecker <brobecker@adacore.com>
398 * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
399 definition of local variable "done".
400 (info_w32_command, handle_exception): Remove unnecessary cast.
402 2009-01-09 Joel Brobecker <brobecker@adacore.com>
404 * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
405 DebugSetProcessKillOnExit. Update all uses in this file.
406 (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
407 Update all uses in this file.
409 2009-01-09 Joel Brobecker <brobecker@adacore.com>
411 * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
412 and use it when pushing the target.
413 (win32_attach, win32_create_inferior): Update call to
414 do_initial_win32_stuff.
415 (win32_detach, win32_mourn_inferior): Use our ops parameter
416 instead of the global win32_ops to unpush the target.
418 2009-01-09 Joel Brobecker <brobecker@adacore.com>
420 * ser-mingw.c (ser_windows_open): Use proper type when casting
421 in call to _open_osfhandle.
423 2009-01-09 Kai Tietz <kai.tietz@onevision.com>
425 * coff-pe-read.c (read_pe_exported_syms): Fix typo.
427 2009-01-09 Joel Brobecker <brobecker@adacore.com>
429 * CONTRIBUTE: Minor reformatting.
431 2009-01-08 Kai Tietz <kai.tietz@onevision.com>
433 * MAINTAINERS: Add myself to Write After Approval.
434 * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
437 2009-01-08 Nathan Froyd <froydnj@codesourcery.com>
439 * remote-sim.c (gdb_os_error): Mark as a noreturn function.
440 Call exit to make it obvious to GCC.
442 2009-01-08 Tom Tromey <tromey@redhat.com>
445 * varobj.c (varobj_invalidate): Unconditionally free
447 * symfile.c (syms_from_objfile): Free local_addr when returning
449 * exec.c (exec_file_attach): Do cleanups before returning.
450 (exec_file_command): Likewise.
451 * corefile.c (reopen_exec_file): Do cleanups before returning.
452 * breakpoint.c (insert_breakpoint_locations): Do cleanups before
454 (do_vec_free): New function.
455 (update_global_location_list): Make a cleanup for old_locations.
456 Do cleanups before returning. Remove unused variable 'e'.
457 (find_condition_and_thread): Free result of parsing the
459 (print_it_typical): Do cleanups before returning.
460 (breakpoint_re_set_one): Always free sals.sals.
462 2009-01-08 Joel Brobecker <brobecker@adacore.com>
463 Emi Suzuki <emi-suzuki@tjsys.co.jp>
465 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
468 2009-01-07 Doug Evans <dje@google.com>
470 * top.c (gdb_prompt_string): Delete, unused.
472 2009-01-07 Pedro Alves <pedro@codesourcery.com>
474 Delete ONE_PROCESS_WRITETEXT leftovers.
476 * breakpoint.c (insert_bp_location): Delete process_warning
478 (insert_breakpoint_locations): Adjust.
479 (reattach_breakpoints): Adjust.
480 * infrun.c (normal_stop): Drop "It might be running in another
483 2009-01-07 Stan Shebs <stan@codesourcery.com>
485 * config/pa/linux.mh (XDEPFILES): Remove.
487 2009-01-07 Doug Evans <dje@google.com>
489 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
491 2009-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
493 * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
494 spacing, a regression from 2008-04-22.
496 2009-01-07 Joel Brobecker <brobecker@adacore.com>
498 * utils.c (gdb_print_host_address): Adjust implementation to
499 reuse host_address_to_string. Move comment explaining the conversion
500 from host address to string from here...
501 (host_address_to_string): ... to there.
503 2009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
505 * MAINTAINERS: Add myself for write after approval privileges.
507 2009-01-06 Tom Tromey <tromey@redhat.com>
509 * value.c (set_internalvar): Use value_free, not xfree.
511 2009-01-06 Jim Blandy <jimb@red-bean.com>
513 Check return values of functions declared with warn_unused_result
514 attribute in GLIBC 2.8.
515 * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
516 * inflow.c (check_syscall): New function.
517 (new_tty): Use check_syscall to check return values from open and dup.
518 * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
519 * main.c (captured_main): Call cwd after setting up gdb_stderr;
520 check for errors from getcwd.
521 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
522 * ui-file.c (stdio_file_write): Ignore return value from fwrite.
523 (stdio_file_fputs): Same.
524 * utils.c (internal_vproblem): abort if last-ditch error message
527 * top.c (gdb_init): Don't set the current directory here; that's
528 already been done in captured_main.
530 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
532 * ser-tcp.c: Adjust includes.
533 (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
534 (tcp_auto_retry, tcp_retry_limit): Declare.
535 (TIMEOUT): Remove, in favor of tcp_retry_limit.
536 (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
537 (wait_for_connect): New function.
538 (net_open): Use it. Add auto-retry logic.
539 (set_tcp_cmd, show_tcp_cmd): New functions.
540 (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
541 and "set/show tcp connect-timeout" commands.
542 * NEWS: Document new commands.
544 2009-01-05 Tom Tromey <tromey@redhat.com>
546 * python/python-internal.h (Py_ssize_t): Define as int.
548 2009-01-05 Jim Blandy <jimb@red-bean.com>
550 * MAINTAINERS: Fix my e-mail address as steering committee member.
552 2009-01-03 Joel Brobecker <brobecker@adacore.com>
554 Updated copyright notices for most files.
556 2009-01-03 Joel Brobecker <brobecker@adacore.com>
558 * top.c (print_gdb_version): Update copyright year.
560 2009-01-03 Joel Brobecker <brobecker@adacore.com>
562 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
564 2009-01-01 Pedro Alves <pedro@codesourcery.com>
567 * exceptions.h (enum errors): New error type, MEMORY_ERROR.
568 * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
569 * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
570 retrow all other exceptions.
572 For older changes see ChangeLog-2008.
578 version-control: never