* target.h (target_signal_to_string): Make return type const char *.
[external/binutils.git] / gdb / ChangeLog
1 2009-01-15  Doug Evans  <dje@google.com>
2
3         * target.h (target_signal_to_string): Make return type const char *.
4         (target_signal_to_name): Ditto.
5         (target_signal_from_name): Make arg const char *.
6         * thread-db.c (thread_db_err_str): Make return type const char *.
7         * utils.c (perror_with_name): Make arg const char *.
8         * infrun.c (sig_print_info): Update.
9
10         * signals/signals.c (signals): Make array and struct members const.
11         (target_signal_to_string): Make return type const char *.
12         (target_signal_to_name): Ditto.
13         (target_signal_from_name): Make arg const char *.
14
15 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
16             Tristan Gingold  <gingold@adacore.com>
17
18         * solist.h (struct target_so_ops): New member bfd_open.
19         (solib_find): Add prototype.
20         (solib_bfd_fopen): Add prototype.
21         * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
22         from solib_bfd_open.
23         (solib_bfd_open): Use ops->bfd_open override if present.  Call
24         solib_find and solib_bfd_open otherwise.
25
26         * objfiles.h (OBJF_KEEPBFD): New define.
27         * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
28         objfile flag is set.
29         * solib.c (symbol_add_stub): Do not allocate second BFD for
30         shared library; use OBJF_KEEPBFD flag on solib objfile.
31
32 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
33
34         * frame.c (get_frame_arch): Abort if called with NULL this_frame.
35
36 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
37
38         * value.h (address_of_variable): Add prototype.
39         (locate_var_value): Remove prototype.
40
41         * findvar.c (read_var_value): Do not attempt to default frame
42         to selected frame.
43         (locate_var_value): Remove function.
44         * valops.c (value_of_variable): Retrieve selected frame for
45         symbols that require a frame when called with NULL block.
46         * valops.c (address_of_variable): New function.
47
48         * eval.c (evaluate_subexp_for_address): Call address_of_variable
49         instead of calling locate_var_value.
50         (evaluate_subexp_with_coercion): Likewise.
51
52 2009-01-14  Daniel Jacobowitz  <dan@codesourcery.com>
53
54         * NEWS: Document "define" for prefixed commands.
55         * cli/cli-cmds.c (show_user): Update calls to show_user_1.  Call
56         show_user_1 for prefix commands.
57         * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
58         * cli/cli-script.c (validate_comname): Rewrite to handle prefix
59         commands.  Return the containing command list.
60         (define_command, document_command): Update to handle prefix commands.
61         (show_user_1): Add prefix and name arguments.  Handle prefix
62         commands.
63         * cli/cli-script.h (show_user_1): Update prototype.
64
65 2009-01-14  Kai Tietz  <kai.tietz@onevision.com>
66
67         * mingw-ser.c (console_select_thread): Add return to make
68         compiler happy.
69         (pipe_select_thread): Likewise.
70         (file_select_thread): Likewise.
71
72 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
73
74         * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
75         previous change.
76
77 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
78
79         * remote.c (extended_remote_mourn_1): Invalidate our notion of
80         current general thread.
81
82 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
83
84         * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
85         without a live selected thread.
86
87 2009-01-14  Joel Brobecker  <brobecker@adacore.com>
88
89         Update the copyright notice of some of the files I missed
90         in the previous copyright update.
91
92 2009-01-14  Joel Brobecker  <brobecker@adacore.com>
93
94         * windows-nat.c (handle_unload_dll): Use %p to print the DLL
95         base address instead of casting it to DWORD.
96
97 2009-01-13  Ulrich Weigand  <uweigand@de.ibm.com>
98
99         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
100         for NULL frame pointers.
101
102 2009-01-13  Mark Kettenis  <kettenis@gnu.org>
103
104         * utils.c (host_address_to_string): Reimplement in a way that
105         avoids the cast of the address to long.
106
107 2009-01-13  Joel Brobecker  <brobecker@adacore.com>
108
109         * mdebugread.c (parse_symbol): Save the symbol private data
110         using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
111         (psymtab_to_symtab_1): Likewise.
112         (parse_procedure): Declare variable "e" only in the scope
113         where it is used. Extract the symbol private data using
114         SYMBOL_VALUE_BYTES.
115
116 2009-01-13  Jim Blandy  <jimb@codesourcery.com>
117
118         Abstract out common code for copying value locations.
119
120         * value.h (set_value_component_location): New declaration.
121         * value.c (set_value_component_location): New function.
122         (value_primitive_field): Use it.
123         * valarith.c (value_subscript, value_subscripted_rvalue): Same.
124         * valops.c (search_struct_field, value_slice): Same.
125         * ada-lang.c (coerce_unspec_val_to_type)
126         (ada_value_primitive_packed_val): Same.
127
128 2009-01-13  Joel Brobecker  <brobecker@adacore.com>
129
130         * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
131
132 2009-01-12  Christopher Faylor  <me+cygwin@cgf.cx>
133
134         * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
135         throughout.
136         * i386-cygwin-tdep.c: Ditto.
137         * i386-windows-nat.c: Ditto.
138         * windows-nat.h: Ditto.
139         * windows-tdep.c: Ditto.
140         * windows-tdep.h: Ditto.
141         * windows-nat.c: Ditto.
142         (cygwin_load_start): Redefine as CORE_ADDR.
143         (cygwin_load_end): Ditto.
144         (windows_make_so): Coerce result of address arithmetic to to uintptr_t
145         before coercing to CORE_ADDR to avoid a compiler warning.
146         (handle_exception): Define addr as CORE_ADDR and coerce
147         ExceptionAddress to uintptr_t before assigining to avoid a compiler
148         warning.
149         * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
150         files.
151
152 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
153
154         Fix linking with --enable-targets=all:
155         * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
156         (HFILES_NO_SRCDIR): Add windows-tdep.h.
157         (ALLDEPFILES): Add windows-tdep.c.
158
159 2009-01-11  Christ Faylor  <me.gdb@cgf.cx>
160
161         * win32-nat.h: Delete.
162         * windows-nat.h: Rename from win32-nat.h.
163         * win32-nat.c: Delete.
164         * windows-nat.c: Rename from win32-nat.c.
165         * win32-termcap.c: Delete.
166         * windows-termcap.c: Rename from win32-termcap.c.
167         * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
168         * configure.ac: Handle rename from win32-termcap.c ->
169         windows-termcap.c.
170         * configure: Regenerate.
171         * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
172         -> windows-termcap.c.
173         * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
174         windows-tdep.h.
175         * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
176         * windows-nat.c: Ditto.  Also reflect rename from from win32-tdep.h ->
177         windows-tdep.h.
178         (win32_make_so): Handle cygwin compiler warning due to change of
179         load_addr from DWORD to LPVOID.
180         (handle_load_dll): Use %p in format string to properly print address
181         and avoid a compiler warning.
182         (DEBUG_EXCEPTION_SIMPLE): Ditto.
183         (handle_exception): Ditto.
184         * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
185         * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
186         windows-nat.o.
187         * config/i386/mingw.mh: Ditto.
188         * config/i386/mingw64.mh: Ditto.
189
190 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
191
192         * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
193         arrayprint_recurse_level to a parameter.  Update all the callers.  New
194         comment at autovariables.
195
196 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
197
198         * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
199         coding style.
200
201 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
202
203         * target.c (target_xfer_partial): Use host_address_to_string to
204         print the address of readbuf and writebuf. Cast the address of
205         elements inside the myaddr buffer into intptr_t.
206         (deprecated_debug_xfer_memory): Use paddress to print memaddr.
207         Cast the address of elements inside the myaddr buffer into
208         intptr_t.
209
210 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
211
212         * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
213         * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
214         * configure.host, configure.tgt: Add handling for x86_64/windows.
215         * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
216         and amd64-windows-tdep.c.
217
218 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
219
220         * win32-tdep.h, win32-tdep.c: New files.
221         * i386-cygwin-tdep.h: Delete.
222         * i386-cygwin-tdep.c: Include win32-tdep.h instead of
223         i386-cygwin-tdep.h.
224         (win32_xfer_shared_library): Delete.  Moved to win32-tdep.c.
225         * win32-nat.c: Likewise.
226         * configure.tgt: Add win32-tdep.o to the list of target object
227         files for i386-cygwin and i386-mingw targets.
228
229 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
230
231         * win32-nat.h: New file.
232         * win32-nat.c (mappings): Initialize to NULL.
233         (win32_set_context_register_offsets): New function.
234         * i386-windows-nat.c: New file.
235         (mappings): Moved here from win32-nat.c.
236         (_initialize_i386_windows_nat): New function.
237         * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
238         * config/i386/cygwin.mh (NATDEPFILES): Likewise.
239
240 2009-01-09  Andreas Schwab  <schwab@suse.de>
241
242         * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
243
244 2009-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
245
246         * gdbtypes.c (append_composite_type_field): Correct the location of
247         appended fields.
248
249 2009-01-09  Pedro Alves  <pedro@codesourcery.com>
250
251         * defs.h (deprecated_error_hook): Delete declaration.
252         * interps.c (clear_interpreter_hooks): Adjust.
253         * remote-sim.c (gdb_os_error): Don't try to call
254         deprecated_error_hook.  No need to call exit anymore.
255         * top.c (deprecated_error_hook): Delete.
256
257 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
258
259         * arch-utils.c (gdbarch_update_p): Use host_address_to_string
260         to print the address of the gdbarch pointer.
261
262 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
263
264         * gdbarch.sh: Fix all the compilation errors on amd64-windows
265         due to casting a pointer to a long when printing a function
266         address. Instead, use host_address_to_string to convert our
267         address to a string.
268         * gdbarch.c: Regenerate.
269
270 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
271
272         * event-top.c (async_disconnect, async_stop_sig): use "raise"
273         instead of "kill" to raise a signal.
274
275 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
276
277         * win32-nat.c (get_module_name): Change the type of parameter
278         "base_address" to LPVOID.  Remove unnecessary cast.
279         (struct lm_info): Change type of load_addr to LPVOID.
280         (win32_make_so): Change the type of parameter "load_addr"
281         to LPVOID.  Remove some unnecessary casts.
282         (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
283         (win32_xfer_shared_libraries): Add missing cast.
284
285 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
286
287         * win32-nat.c (has_detach_ability, set_process_privilege):
288         Cast the result of GetProcAddress to (void *) to avoid
289         a compilation warning.
290
291 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
292
293         * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
294         already defined.
295
296 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
297
298         * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
299         definition of local variable "done".
300         (info_w32_command, handle_exception): Remove unnecessary cast.
301
302 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
303
304         * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
305         DebugSetProcessKillOnExit.  Update all uses in this file.
306         (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
307         Update all uses in this file.
308
309 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
310
311         * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
312         and use it when pushing the target.
313         (win32_attach, win32_create_inferior): Update call to
314         do_initial_win32_stuff.
315         (win32_detach, win32_mourn_inferior): Use our ops parameter
316         instead of the global win32_ops to unpush the target.
317
318 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
319
320         * ser-mingw.c (ser_windows_open): Use proper type when casting
321         in call to _open_osfhandle.
322
323 2009-01-09  Kai Tietz  <kai.tietz@onevision.com>
324
325         * coff-pe-read.c (read_pe_exported_syms): Fix typo.
326
327 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
328
329         * CONTRIBUTE: Minor reformatting.
330
331 2009-01-08  Kai Tietz  <kai.tietz@onevision.com>
332
333         * MAINTAINERS: Add myself to Write After Approval.
334         * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
335         export directory.
336
337 2009-01-08  Nathan Froyd  <froydnj@codesourcery.com>
338
339         * remote-sim.c (gdb_os_error): Mark as a noreturn function.
340         Call exit to make it obvious to GCC.
341
342 2009-01-08  Tom Tromey  <tromey@redhat.com>
343
344         PR breakpoints/9350:
345         * varobj.c (varobj_invalidate): Unconditionally free
346         all_rootvarobj.
347         * symfile.c (syms_from_objfile): Free local_addr when returning
348         normally.
349         * exec.c (exec_file_attach): Do cleanups before returning.
350         (exec_file_command): Likewise.
351         * corefile.c (reopen_exec_file): Do cleanups before returning.
352         * breakpoint.c (insert_breakpoint_locations): Do cleanups before
353         returning. 
354         (do_vec_free): New function.
355         (update_global_location_list): Make a cleanup for old_locations.
356         Do cleanups before returning.  Remove unused variable 'e'.
357         (find_condition_and_thread): Free result of parsing the
358         expression.
359         (print_it_typical): Do cleanups before returning.
360         (breakpoint_re_set_one): Always free sals.sals.
361
362 2009-01-08  Joel Brobecker  <brobecker@adacore.com>
363             Emi Suzuki  <emi-suzuki@tjsys.co.jp>
364  
365         * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
366         watchpoints.
367
368 2009-01-07  Doug Evans  <dje@google.com>
369
370         * top.c (gdb_prompt_string): Delete, unused.
371
372 2009-01-07  Pedro Alves  <pedro@codesourcery.com>
373
374         Delete ONE_PROCESS_WRITETEXT leftovers.
375
376         * breakpoint.c (insert_bp_location): Delete process_warning
377         argument.  Adjust.
378         (insert_breakpoint_locations): Adjust.
379         (reattach_breakpoints): Adjust.
380         * infrun.c (normal_stop): Drop "It might be running in another
381         process" notice.
382
383 2009-01-07  Stan Shebs  <stan@codesourcery.com>
384
385         * config/pa/linux.mh (XDEPFILES): Remove.
386
387 2009-01-07  Doug Evans  <dje@google.com>
388
389         * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
390
391 2009-01-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
392
393         * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
394         spacing, a regression from 2008-04-22.
395
396 2009-01-07  Joel Brobecker  <brobecker@adacore.com>
397
398         * utils.c (gdb_print_host_address): Adjust implementation to
399         reuse host_address_to_string. Move comment explaining the conversion
400         from host address to string from here...
401         (host_address_to_string): ... to there.
402
403 2009-01-07  Emi Suzuki  <emi-suzuki@tjsys.co.jp>
404
405         * MAINTAINERS: Add myself for write after approval privileges.
406
407 2009-01-06  Tom Tromey  <tromey@redhat.com>
408
409         * value.c (set_internalvar): Use value_free, not xfree.
410
411 2009-01-06  Jim Blandy  <jimb@red-bean.com>
412
413         Check return values of functions declared with warn_unused_result
414         attribute in GLIBC 2.8.
415         * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
416         * inflow.c (check_syscall): New function.
417         (new_tty): Use check_syscall to check return values from open and dup.
418         * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
419         * main.c (captured_main): Call cwd after setting up gdb_stderr;
420         check for errors from getcwd.
421         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
422         * ui-file.c (stdio_file_write): Ignore return value from fwrite.
423         (stdio_file_fputs): Same.
424         * utils.c (internal_vproblem): abort if last-ditch error message
425         write fails.
426
427         * top.c (gdb_init): Don't set the current directory here; that's
428         already been done in captured_main.
429
430 2009-01-06  Sandra Loosemore  <sandra@codesourcery.com>
431
432         * ser-tcp.c: Adjust includes.
433         (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
434         (tcp_auto_retry, tcp_retry_limit): Declare.
435         (TIMEOUT): Remove, in favor of tcp_retry_limit.
436         (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
437         (wait_for_connect): New function.
438         (net_open): Use it.  Add auto-retry logic.
439         (set_tcp_cmd, show_tcp_cmd): New functions.
440         (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
441         and "set/show tcp connect-timeout" commands.
442         * NEWS: Document new commands.
443
444 2009-01-05  Tom Tromey  <tromey@redhat.com>
445
446         * python/python-internal.h (Py_ssize_t): Define as int.
447
448 2009-01-05  Jim Blandy  <jimb@red-bean.com>
449
450         * MAINTAINERS: Fix my e-mail address as steering committee member.
451
452 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
453
454         Updated copyright notices for most files.
455
456 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
457
458         * top.c (print_gdb_version): Update copyright year.
459
460 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
461
462         * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
463
464 2009-01-01  Pedro Alves  <pedro@codesourcery.com>
465
466         PR breakpoints/9681:
467         * exceptions.h (enum errors): New error type, MEMORY_ERROR.
468         * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
469         * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
470         retrow all other exceptions.
471
472 For older changes see ChangeLog-2008.
473 \f
474 Local Variables:
475 mode: change-log
476 left-margin: 8
477 fill-column: 74
478 version-control: never
479 coding: utf-8
480 End: