* linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
92b72907
UW
12010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5
fa593d66
PA
62010-06-01 Pedro Alves <pedro@codesourcery.com>
7 Stan Shebs <stan@codesourcery.com>
8
9 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10 (all): Depend on $(extra_libraries).
11 (install-only): Install the IPA.
12 (IPA_OBJS, IPA_LIB): New.
13 (clean): Remove the IPA lib.
14 (IPAGENT_CFLAGS): New.
15 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
18 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
19 * configure.ac: Check for atomic builtins support in the compiler.
20 (IPA_DEPFILES, extra_libraries): Define.
21 * configure.srv (ipa_obj): Add description.
22 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
23 (i[34567]86-*-linux*): Set ipa_obj.
24 (x86_64-*-linux*): Set ipa_obj.
25 * linux-low.c (stabilizing_threads): New.
26 (supports_fast_tracepoints): New.
27 (linux_detach): Stabilize threads before detaching.
28 (handle_tracepoints): Handle internal tracing breakpoints. Assert
29 the lwp is either not stabilizing, or is moving out of a jump pad.
30 (linux_fast_tracepoint_collecting): New.
31 (maybe_move_out_of_jump_pad): New.
32 (enqueue_one_deferred_signal): New.
33 (dequeue_one_deferred_signal): New.
34 (linux_wait_for_event_1): If moving out of a jump pad, defer
35 pending signals to later.
36 (linux_stabilize_threads): New.
37 (linux_wait_1): Check if threads need moving out of jump pads, and
38 do it if so.
39 (stuck_in_jump_pad_callback): New.
40 (move_out_of_jump_pad_callback): New.
41 (lwp_running): New.
42 (linux_resume_one_lwp): Handle moving out of jump pads.
43 (linux_set_resume_request): Dequeue deferred signals.
44 (need_step_over_p): Also step over fast tracepoint jumps.
45 (start_step_over): Also uninsert fast tracepoint jumps.
46 (finish_step_over): Also reinsert fast tracepoint jumps.
47 (linux_install_fast_tracepoint_jump): New.
48 (linux_target_ops): Install linux_stabilize_threads and
49 linux_install_fast_tracepoint_jump_pad.
50 * linux-low.h (linux_target_ops) <get_thread_area,
51 install_fast_tracepoint_jump_pad>: New fields.
52 (struct lwp_info) <collecting_fast_tracepoint,
53 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
54 (linux_get_thread_area): Declare.
55 * linux-x86-low.c (jump_insn): New.
56 (x86_get_thread_area): New.
57 (append_insns): New.
58 (push_opcode): New.
59 (amd64_install_fast_tracepoint_jump_pad): New.
60 (i386_install_fast_tracepoint_jump_pad): New.
61 (x86_install_fast_tracepoint_jump_pad): New.
62 (the_low_target): Install x86_get_thread_area and
63 x86_install_fast_tracepoint_jump_pad.
64 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
65 (struct fast_tracepoint_jump): New.
66 (fast_tracepoint_jump_insn): New.
67 (fast_tracepoint_jump_shadow): New.
68 (find_fast_tracepoint_jump_at): New.
69 (fast_tracepoint_jump_here): New.
70 (delete_fast_tracepoint_jump): New.
71 (set_fast_tracepoint_jump): New.
72 (uninsert_fast_tracepoint_jumps_at): New.
73 (reinsert_fast_tracepoint_jumps_at): New.
74 (set_breakpoint_at): Use write_inferior_memory.
75 (uninsert_raw_breakpoint): Use write_inferior_memory.
76 (check_mem_read): Mask out fast tracepoint jumps.
77 (check_mem_write): Mask out fast tracepoint jumps.
78 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
79 (set_fast_tracepoint_jump): Declare.
80 (delete_fast_tracepoint_jump)
81 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
82 (reinsert_fast_tracepoint_jumps_at): Declare.
83 * regcache.c: Don't compile many functions when building the
84 in-process agent library.
85 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
86 the register buffer in the heap.
87 (free_register_cache): If the register buffer isn't owned by the
88 regcache, don't free it.
89 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
90 pre-existing register caches.
91 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
92 type.
93 (convert_ascii_to_int): : Constify `from' parameter type.
94 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
95 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
96 the needed buffer in-place.
97 (relocate_instruction): New.
98 * server.c (handle_query) <qSymbols>: If the target supports
99 tracepoints, give it a chance of looking up symbols. Report
100 support for fast tracepoints.
101 (handle_status): Stabilize threads.
102 (process_serial_event): Adjust.
103 * server.h (struct fast_tracepoint_jump): Forward declare.
104 (struct process_info) <fast_tracepoint_jumps>: New field.
105 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
106 (decode_X_packet, decode_M_packet): Adjust.
107 (relocate_instruction): Declare.
108 (in_process_agent_loaded): Declare.
109 (tracepoint_look_up_symbols): Declare.
110 (struct fast_tpoint_collect_status): Declare.
111 (fast_tracepoint_collecting): Declare.
112 (force_unlock_trace_buffer): Declare.
113 (handle_tracepoint_bkpts): Declare.
114 (initialize_low_tracepoint)
115 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
116 * target.h (struct target_ops) <stabilize_threads,
117 install_fast_tracepoint_jump_pad>: New fields.
118 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
119 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
120 [HAVE_STDINT_H]: Include stdint.h.
121 (trace_debug_1): Rename to ...
122 (trace_vdebug): ... this.
123 (trace_debug): Rename to ...
124 (trace_debug_1): ... this. Add `level' parameter.
125 (trace_debug): New.
126 (ATTR_USED, ATTR_NOINLINE): New.
127 (IP_AGENT_EXPORT): New.
128 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
129 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
130 (about_to_request_buffer_space, trace_buffer_is_full)
131 (stopping_tracepoint, expr_eval_result, error_tracepoint)
132 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
133 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
134 (traceframe_write_count, traceframes_created)
135 (trace_state_variables)
136 New renaming defines.
137 (struct ipa_sym_addresses): New.
138 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
139 (symbol_list): New.
140 (ipa_sym_addrs): New.
141 (all_tracepoint_symbols_looked_up): New.
142 (in_process_agent_loaded): New.
143 (write_e_ipa_not_loaded): New.
144 (maybe_write_ipa_not_loaded): New.
145 (tracepoint_look_up_symbols): New.
146 (debug_threads) [IN_PROCESS_AGENT]: New.
147 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
148 (UNKNOWN_SIDE_EFFECTS): New.
149 (stop_tracing): New.
150 (flush_trace_buffer): New.
151 (stop_tracing_bkpt): New.
152 (flush_trace_buffer_bkpt): New.
153 (read_inferior_integer): New.
154 (read_inferior_uinteger): New.
155 (read_inferior_data_pointer): New.
156 (write_inferior_data_pointer): New.
157 (write_inferior_integer): New.
158 (write_inferior_uinteger): New.
159 (struct collect_static_trace_data_action): Delete.
160 (enum tracepoint_type): New.
161 (struct tracepoint) <type>: New field `type'.
162 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
163 <orig_size, obj_addr_on_target, adjusted_insn_addr>
164 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
165 (tracepoints): Use IP_AGENT_EXPORT.
166 (last_tracepoint): Don't include in the IPA.
167 (stopping_tracepoint): Use IP_AGENT_EXPORT.
168 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
169 (alloced_trace_state_variables): New.
170 (trace_state_variables): Use IP_AGENT_EXPORT.
171 (traceframe_t): Delete unused variable.
172 (circular_trace_buffer): Don't include in the IPA.
173 (trace_buffer_start): Delete.
174 (struct trace_buffer_control): New.
175 (trace_buffer_free): Delete.
176 (struct ipa_trace_buffer_control): New.
177 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
178 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
179 New.
180 (trace_buffer_ctrl): New.
181 (TRACE_BUFFER_CTRL_CURR): New.
182 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
183 Reimplement as macros.
184 (trace_buffer_wrap): Delete.
185 (traceframe_write_count, traceframe_read_count)
186 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
187 (struct tracepoint_hit_ctx) <type>: New field.
188 (struct fast_tracepoint_ctx): New.
189 (memory_barrier): New.
190 (cmpxchg): New.
191 (record_tracepoint_error): Update atomically in the IPA.
192 (clear_inferior_trace_buffer): New.
193 (about_to_request_buffer_space): New.
194 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
195 updating the same buffer.
196 (add_tracepoint): Default the tracepoint's type to trap
197 tracepoint, and orig_size to -1.
198 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
199 internal variables.
200 (create_trace_state_variable): New parameter `gdb'. Handle it.
201 (clear_installed_tracepoints): Clear fast tracepoint jumps.
202 (cmd_qtdp): Handle fast tracepoints.
203 (cmd_qtdv): Adjust.
204 (max_jump_pad_size): New.
205 (gdb_jump_pad_head): New.
206 (get_jump_space_head): New.
207 (claim_jump_space): New.
208 (sort_tracepoints): New.
209 (MAX_JUMP_SIZE): New.
210 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
211 IPA.
212 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
213 support. Upload fast traceframes, and delete internal IPA
214 breakpoints.
215 (stop_tracing_handler): New.
216 (flush_trace_buffer_handler): New.
217 (cmd_qtstop): Upload fast tracepoints.
218 (response_tracepoint): Handle fast tracepoints.
219 (tracepoint_finished_step): Upload fast traceframes. Set the
220 tracepoint hit context's tracepoint type.
221 (handle_tracepoint_bkpts): New.
222 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
223 type. Add comment about fast tracepoints.
224 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
225 non-existing action_str field.
226 (get_context_regcache): Handle fast tracepoints.
227 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
228 to the regcache.
229 (fast_tracepoint_from_jump_pad_address): New.
230 (fast_tracepoint_from_ipa_tpoint_address): New.
231 (collecting_t): New.
232 (force_unlock_trace_buffer): New.
233 (fast_tracepoint_collecting): New.
234 (collecting): New.
235 (gdb_collect): New.
236 (write_inferior_data_ptr): New.
237 (target_tp_heap): New.
238 (target_malloc): New.
239 (download_agent_expr): New.
240 (UALIGN): New.
241 (download_tracepoints): New.
242 (download_trace_state_variables): New.
243 (upload_fast_traceframes): New.
244 (IPA_FIRST_TRACEFRAME): New.
245 (IPA_NEXT_TRACEFRAME_1): New.
246 (IPA_NEXT_TRACEFRAME): New.
247 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
248 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
249 (gdb_jump_pad_buffer_end): New.
250 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
251 (initialize_tracepoint): Adjust.
252 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
253 buffer. Initialize the low module.
254 * utils.c (PREFIX, TOOLNAME): New.
255 (malloc_failure): Use PREFIX.
256 (error): In the IPA, an error causes an exit.
257 (fatal, warning): Use PREFIX.
258 (internal_error): Use TOOLNAME.
259 (NUMCELLS): Increase to 10.
260 * configure, config.in: Regenerate.
261
d149dd1d
PA
2622010-06-01 Pedro Alves <pedro@codesourcery.com>
263
264 * server.c (handle_query) <qSupported>: Do two passes over the
265 qSupported string to avoid nesting strtok.
266
f6528abd
JK
2672010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
268
269 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
270 (CDEPS): New.
271 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
272 -Wl,--dynamic-list.
273 * configure: Regenerate.
274 * proc-service.list: New.
275
ca2a87a0
JK
2762010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
277
278 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
279 New comment.
280
363a6e9f
OS
2812010-05-26 Ozkan Sezer <sezeroz@gmail.com>
282
283 * gdbreplay.c (remote_open): Check error return from socket() call by
284 its equality to -1 not by it being negative.
285 * remote-utils.c (remote_open): Likewise.
286
d23b6cb1
PA
2872010-05-23 Pedro Alves <pedro@codesourcery.com>
288
289 * config.h: Regenerate.
290
28d3cf85
MK
2912010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
292
293 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
294 doesn't provide PTRACE_GET_THREAD_AREA.
295
fea36a59
MK
2962010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
297
298 * linux-m68k-low.c: Include <asm/ptrace.h>
299 (ps_get_thread_area): Implement.
300
24b066ba
DE
3012010-05-03 Doug Evans <dje@google.com>
302
303 * event-loop.c (struct callback_event): New struct.
304 (callback_list): New global.
305 (append_callback_event, delete_callback_event): New functions.
306 (process_callback): New function.
307 (start_event_loop): Call it.
308 * remote-utils.c (NOT_SCHEDULED): Define.
309 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
310 moved out of readchar.
311 (readchar): Rewrite. Call reschedule before returning.
312 (reset_readchar): New function.
313 (remote_close): Call it.
314 (process_remaining, reschedule): New functions.
315 * server.h (callback_handler_func): New typedef.
316 (append_callback_event, delete_callback_event): Declare.
317
9836d6ea
PA
3182010-05-03 Pedro Alves <pedro@codesourcery.com>
319
320 * proc-service.c (ps_pglobal_lookup): Use
321 thread_db_look_up_one_symbol.
322 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
323 parameter. Use it instead of all_symbols_looked_up.
324 * server.h (struct process_info) <all_symbols_looked_up>: Delete
325 field.
326 (all_symbols_looked_up): Don't declare.
327 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
328 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
329 field.
330 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
331 Set all_symbols_looked_up here.
332 (thread_db_look_up_one_symbol): New.
333 (thread_db_get_tls_address): Adjust.
334 (thread_db_load_search, try_thread_db_load_1): Always allocate the
335 thread_db object on the heap, and tentatively set it in the
336 process structure.
337 (thread_db_init): Don't set all_symbols_looked_up here.
338 * linux-low.h (thread_db_look_up_one_symbol): Declare.
339
7984d532
PA
3402010-05-03 Pedro Alves <pedro@codesourcery.com>
341
342 * linux-low.c (linux_kill, linux_detach): Adjust.
343 (status_pending_p_callback): Remove redundant statement. Check
344 for !TARGET_WAITIKIND_IGNORE, instead of
345 TARGET_WAITKIND_STOPPED.
346 (handle_tracepoints): Make sure LWP is locked. Adjust.
347 (linux_wait_for_event_1): Adjust.
348 (linux_cancel_breakpoints): New.
349 (unsuspend_one_lwp): New.
350 (unsuspend_all_lwps): New.
351 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
352 (send_sigstop_callback): Change return type to int, add new
353 `except' parameter and handle it.
354 (suspend_and_send_sigstop_callback): New.
355 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
356 pass them down. If SUSPEND, also increment the lwp's suspend
357 count.
358 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
359 (need_step_over_p): Don't consider suspended LWPs.
360 (start_step_over): Adjust.
361 (proceed_one_lwp): Change return type to int, add new `except'
362 parameter and handle it.
363 (unsuspend_and_proceed_one_lwp): New.
364 (proceed_all_lwps): Use find_inferior instead of
365 for_each_inferior.
366 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
367 also decrement the suspend count of LWPs. Pass `except' down,
368 instead of hacking its suspend count.
369 (linux_pause_all): Add `freeze' parameter. Adjust.
370 (linux_unpause_all): New.
371 (linux_target_ops): Install linux_unpause_all.
372 * server.c (handle_status): Adjust.
373 * target.h (struct target_ops): New fields `unpause_all' and
374 `cancel_breakpoints'. Add new parameter to `pause_all'.
375 (pause_all): Add new `freeze' parameter.
376 (unpause_all): New.
377 (cancel_breakpoints): New.
378 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
379 cancel breakpoints.
380 (cmd_qtstart): Pause threads.
381 (stop_tracing): Pause threads, and cancel breakpoints.
382 * win32-low.c (win32_target_ops): Adjust.
383
e471f25b
PA
3842010-05-03 Pedro Alves <pedro@codesourcery.com>
385
386 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
387 the inferior right away from here...
388 (linux_wait_1): ... to here, and adjust to check the thread's
389 last_resume_kind instead of the lwp's step or stop_expected flags.
390
1915ef4f
PA
3912010-05-02 Pedro Alves <pedro@codesourcery.com>
392
393 * README: Use consistent `GDB' and `GDBserver' spellings.
394
f9e39928
PA
3952010-05-02 Pedro Alves <pedro@codesourcery.com>
396
397 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
398 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
399 (linux_detach_one_lwp): Assume the lwp is stopped.
400 (any_thread_of): Delete.
401 (linux_detach): Stop all lwps here. Don't blindly delete all
402 breakpoints.
403 (delete_lwp_callback): New.
404 (linux_mourn): Delete all lwps of the process that is gone.
405 (linux_wait_1): Don't delete the last lwp of the process here.
406 * mem-break.h (mark_breakpoints_out): Declare.
407 * mem-break.c (mark_breakpoints_out): New.
408 (free_all_breakpoints): Use it.
409 * server.c (handle_target_event): If the process is gone, mark
410 breakpoints out.
411 * thread-db.c (struct thread_db) <create_bp>: New field.
412 (thread_db_enable_reporting): Fix prototype. Store a thread event
413 breakpoint reference in the thread_db struct.
414 (thread_db_load_search): Clear the thread_db object.
415 (try_thread_db_load_1): Ditto.
416 (switch_to_process): New.
417 (disable_thread_event_reporting): Use it.
418 (remove_thread_event_breakpoints): New.
419 (thread_db_detach, thread_db_mourn): Use it.
420
1e7fc18c
PA
4212010-05-01 Pedro Alves <pedro@codesourcery.com>
422
423 * linux-low.c (linux_enable_event_reporting): New.
424 (linux_wait_for_event_1, handle_extended_wait): Use it.
425
02fc4de7
PA
4262010-04-30 Pedro Alves <pedro@codesourcery.com>
427
428 * linux-low.c (linux_kill_one_lwp, linux_kill)
429 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
430 (send_sigstop): Take an lwp_info as parameter instead. Queue a
431 SIGSTOP even if the LWP is stopped.
432 (send_sigstop_callback): New.
433 (stop_all_lwps): Use send_sigstop_callback instead.
434 (linux_resume_one_thread): Adjust.
435 (proceed_one_lwp): Still proceed an LWP that the client has
436 requested to stop, if we haven't reported it as stopped yet. Make
437 sure that LWPs the client want stopped, have a pending SIGSTOP.
438
bc3b5632
DE
4392010-04-26 Doug Evans <dje@google.com>
440
ae1ada35
DE
441 * server.c (handle_general_set): Make static.
442
bc3b5632
DE
443 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
444 Print received char after testing for error/eof instead of before.
445 (input_interrupt): Tweak comment.
446
65730243
DE
4472010-04-23 Doug Evans <dje@google.com>
448
449 * server.c (start_inferior): Print inferior argv if --debug.
450
a8ae7dc0
AR
4512010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
452
453 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
454 * nto-x86-low.c: Include server.h
455
1c07cc19
PM
4562010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
457
458 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
459 be consistent with other sources of this directory.
460 (init_registers_amd64): Correct name of source file of this function
461 in the comment.
462
e0a61e09
PM
4632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
464
465 * configure.srv (x86_64-*-mingw*): New configuration for Windows
466 64-bit executables.
467
54709339
PM
4682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
469
470 * win32-i386-low.c: Add 64-bit support.
471 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
472 (init_registers_amd64): Declare.
473 (mappings): Add 64-bit version of array.
474 (init_windows_x86): New function.
475 (the_low_target): Change init_arch field to init_windows_x86.
476
e8f0053d
PM
4772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
478
479 * win32-low.c: Adapt to support also 64-bit architecture.
480 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
481 (get_image_name): Use SIZE_T type for local variable `done'.
482 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
483 (toolhelp_get_dll_name): Idem.
484 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
485 Use uintptr_t typecast to avoid warning.
486 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
487 (handle_exception): Use phex_nz to avoid warning.
488 (win32_wait): Remove unused local variable `process'.
489
c481e77e
PM
4902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
491
492 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
493 `amd64-avx.o'.
494
12ea4b69
PM
4952010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
496
497 * configure.ac: Use `ws2_32' library for srv_mingw.
498 * configure: Regenerate.
499 * gdbreplay.c: Include winsock2.h instead of winsock.h.
500 * remote-utils.c: Likewise.
501
f6d1620c
L
5022010-04-17 H.J. Lu <hongjiu.lu@intel.com>
503
504 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
505 if __x86_64__ is defined.
506
8e642873
PM
5072010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
508
509 * configure: Regenerate.
510
711e434b
PM
5112010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
512
513 * server.c (handle_query): Handle 'qGetTIBAddr' query.
514 * target.h (target_ops): New get_tib_address field.
515 * win32-low.h (win32_thread_info): Add thread_local_base field.
516 * win32-low.c (child_add_thread): Add tlb argument.
517 Set thread_local_base field to TLB.
518 (get_child_debug_event): Adapt to child_add_thread change.
519 (win32_get_tib_address): New function.
520 (win32_target_ops): Set get_tib_address field to
521 win32_get_tib_address.
522 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
523
505106cd
PA
5242010-04-12 Pedro Alves <pedro@codesourcery.com>
525
505106cd
PA
526 * linux-low.c (linux_mourn): Also remove the process.
527 * server.c (handle_target_event): Don't remove the process here.
528 * nto-low.c (nto_mourn): New.
529 (nto_target_ops): Install it.
530 * spu-low.c (spu_mourn): New.
531 (spu_target_ops): Install it.
532 * win32-low.c (win32_mourn): New.
533 (win32_target_ops): Install it.
534
e8470a06
PA
5352010-04-12 Pedro Alves <pedro@codesourcery.com>
536
537 * server.h (buffer_xml_printf): Remove redundant `;'.
538
45ba0d02
PA
5392010-04-12 Pedro Alves <pedro@codesourcery.com>
540
541 * regcache.c (set_register_cache): Invalidate regcaches before
542 changing the register cache layout.
543 (regcache_invalidate_one): Allow a NULL regcache.
544 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
545 regcaches before changing the register cache layout or the target
546 regsets.
547
59e04013
L
5482010-04-12 H.J. Lu <hongjiu.lu@intel.com>
549
550 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
551 variable warning on Linux/x86-64.
552
8336d594
PA
5532010-04-11 Pedro Alves <pedro@codesourcery.com>
554
555 GDBserver disconnected tracing support.
556
557 * linux-low.c (linux_remove_process): Delete.
558 (add_lwp): Don't set last_resume_kind here.
559 (linux_kill): Use `mourn'.
560 (linux_detach): Use `thread_db_detach', and `mourn'.
561 (linux_mourn): New.
562 (linux_attach_lwp_1): Adjust comment.
563 (linux_attach): last_resume_kind moved the thread_info; adjust.
564 (status_pending_p_callback): Adjust.
565 (linux_wait_for_event_1): Adjust.
566 (count_events_callback, select_singlestep_lwp_callback)
567 (select_event_lwp_callback, cancel_breakpoints_callback)
568 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
569 (proceed_one_lwp): Adjust.
570 (linux_async): Add debug output.
571 (linux_thread_stopped): New.
572 (linux_pause_all): New.
573 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
574 linux_pause_all.
575 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
576 (thread_db_free): Delete declaration.
577 (thread_db_detach, thread_db_mourn): Declare.
578 * thread-db.c (thread_db_init): Use thread_db_mourn.
579 (thread_db_free): Delete, split in two.
580 (disable_thread_event_reporting): New.
581 (thread_db_detach): New.
582 (thread_db_mourn): New.
583
584 * server.h (struct thread_info) <last_resume_kind>: New field.
585 <attached>: Add comment.
586 <gdb_detached>: New field.
587 (handler_func): Change return type to int.
588 (handle_serial_event, handle_target_event): Ditto.
589 (gdb_connected): Declare.
590 (tracing): Delete.
591 (disconnected_tracing): Declare.
592 (stop_tracing): Declare.
593
594 * server.c (handle_query) <qSupported>: Report support for
595 disconnected tracing.
596 (queue_stop_reply_callback): Account for running threads.
597 (gdb_wants_thread_stopped): New.
598 (gdb_wants_all_threads_stopped): New.
599 (gdb_reattached_process): New.
600 (handle_status): Clear the `gdb_detached' flag of all processes.
601 In all-stop, stop all threads.
602 (main): Be sure to leave tfind mode. Handle disconnected tracing.
603 (process_serial_event): If the remote connection breaks, or if an
604 exit was forced with "monitor exit", force an event loop exit.
605 Handle disconnected tracing on detach.
606 (handle_serial_event): Adjust.
607 (handle_target_event): If GDB isn't connected, forward events back
608 to the inferior, unless the last process exited, in which case,
609 exit gdbserver. Adjust interface.
610
611 * remote-utils.c (remote_open): Don't block in accept. Instead
612 register an event loop source on the listen socket file
613 descriptor. Refactor bits into ...
614 (listen_desc): ... this new global.
615 (gdb_connected): ... this new function.
616 (enable_async_notification): ... this new function.
617 (handle_accept_event): ... this new function.
618 (remote_close): Clear remote_desc.
619
620 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
621
622 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
623 New fields.
624 (mourn_inferior): Define.
625 (target_process_qsupported): Avoid the dangling else problem.
626 (thread_stopped): Define.
627 (pause_all): Define.
628 (target_waitstatus_to_string): Declare.
629 * target.c (target_waitstatus_to_string): New.
630
631 * tracepoint.c (tracing): Make extern.
632 (disconnected_tracing): New.
633 (stop_tracing): Make extern. Handle tracing stops due to GDB
634 disconnecting.
635 (cmd_qtdisconnected): New.
636 (cmd_qtstatus): Report disconnected tracing status in trace reply.
637 (handle_tracepoint_general_set): Handle QTDisconnected.
638
639 * event-loop.c (event_handler_func): Change return type to int.
640 (process_event): Bail out if the event handler wants the event
641 loop to stop.
642 (handle_file_event): Ditto.
643 (start_event_loop): Bail out if the event handler wants the event
644 loop to stop.
645
646 * nto-low.c (nto_target_ops): Adjust.
647 * spu-low.c (spu_wait): Don't remove the process here.
648 (spu_target_ops): Adjust.
649 * win32-low.c (win32_wait): Don't remove the process here.
650 (win32_target_ops): Adjust.
651
5d267c4c
PA
6522010-04-11 Pedro Alves <pedro@codesourcery.com>
653
654 * regcache.c (realloc_register_cache): Invalidate inferior's
655 regcache before recreating it.
656
623ccd72
PA
6572010-04-09 Pedro Alves <pedro@codesourcery.com>
658
659 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
660
219f2f23
PA
6612010-04-09 Stan Shebs <stan@codesourcery.com>
662 Pedro Alves <pedro@codesourcery.com>
663
664 * server.h (LONGEST): New.
665 (struct thread_info) <while_stepping>: New field.
666 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
667 Declare.
668 (initialize_tracepoint, handle_tracepoint_general_set)
669 (handle_tracepoint_query, tracepoint_finished_step)
670 (tracepoint_was_hit, release_while_stepping_state_list):
671 (current_traceframe): Declare.
672 * server.c (handle_general_set): Handle tracepoint packets.
673 (read_memory): New.
674 (write_memory): New.
675 (handle_search_memory_1): Use read_memory.
676 (handle_query): Report support for conditional tracepoints, trace
677 state variables, and tracepoint sources. Handle tracepoint
678 queries.
679 (main): Initialize the tracepoints module.
680 (process_serial_event): Handle traceframe reads/writes.
681
682 * linux-low.c (handle_tracepoints): New.
683 (linux_wait_1): Call it.
684 (linux_resume_one_lwp): Handle while-stepping.
685 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
686 (linux_target_ops): Install them.
687 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
688 New field.
689 * linux-x86-low.c (x86_supports_tracepoints): New.
690 (the_low_target). Install it.
691
692 * mem-break.h (delete_breakpoint): Declare.
693 * mem-break.c (delete_breakpoint): Make external.
694
695 * target.h (struct target_ops): Add `supports_tracepoints',
696 `read_pc', and `write_pc' fields.
697 (target_supports_tracepoints): Define.
698 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
699 (phex_nz): New.
700
701 * regcache.h (struct regcache) <registers_owned>: New field.
702 (init_register_cache, regcache_cpy): Declare.
703 (regcache_read_pc, regcache_write_pc): Declare.
704 (register_cache_size): Declare.
705 (supply_regblock): Declare.
706 * regcache.c (init_register_cache): New.
707 (new_register_cache): Use it.
708 (regcache_cpy): New.
709 (register_cache_size): New.
710 (supply_regblock): New.
711 (regcache_read_pc, regcache_write_pc): New.
712
713 * tracepoint.c: New.
714
715 * Makefile.in (OBS): Add tracepoint.o.
716 (tracepoint.o): New rule.
717
3a13a53b
L
7182010-04-08 H.J. Lu <hongjiu.lu@intel.com>
719
720 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
721 (i386-mmx.o): New.
722 (i386-mmx.c): Likewise.
723 (i386-mmx-linux.o): Likewise.
724 (i386-mmx-linux.c): Likewise.
725
726 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
727 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
728 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
729 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
730
731 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
732 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
733 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
734
1570b33e
L
7352010-04-07 H.J. Lu <hongjiu.lu@intel.com>
736
737 * Makefile.in (clean): Updated.
738 (i386-avx.o): New.
739 (i386-avx.c): Likewise.
740 (i386-avx-linux.o): Likewise.
741 (i386-avx-linux.c): Likewise.
742 (amd64-avx.o): Likewise.
743 (amd64-avx.c): Likewise.
744 (amd64-avx-linux.o): Likewise.
745 (amd64-avx-linux.c): Likewise.
746
747 * configure.srv (srv_i386_regobj): Add i386-avx.o.
748 (srv_i386_linux_regobj): Add i386-avx-linux.o.
749 (srv_amd64_regobj): Add amd64-avx.o.
750 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
751 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
752 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
753 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
754 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
755 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
756 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
757
758 * i387-fp.c: Include "i386-xstate.h".
759 (i387_xsave): New.
760 (i387_cache_to_xsave): Likewise.
761 (i387_xsave_to_cache): Likewise.
762 (x86_xcr0): Likewise.
763
764 * i387-fp.h (i387_cache_to_xsave): Likewise.
765 (i387_xsave_to_cache): Likewise.
766 (x86_xcr0): Likewise.
767
768 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
769 * linux-crisv32-low.c (target_regsets): Likewise.
770 * linux-m68k-low.c (target_regsets): Likewise.
771 * linux-mips-low.c (target_regsets): Likewise.
772 * linux-ppc-low.c (target_regsets): Likewise.
773 * linux-s390-low.c (target_regsets): Likewise.
774 * linux-sh-low.c (target_regsets): Likewise.
775 * linux-sparc-low.c (target_regsets): Likewise.
776 * linux-xtensa-low.c (target_regsets): Likewise.
777
778 * linux-low.c: Include <sys/uio.h>.
779 (regsets_fetch_inferior_registers): Support nt_type.
780 (regsets_store_inferior_registers): Likewise.
781 (linux_process_qsupported): New.
782 (linux_target_ops): Add linux_process_qsupported.
783
784 * linux-low.h (regset_info): Add nt_type.
785 (linux_target_ops): Add process_qsupported.
786
787 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
788 and <sys/uio.h>.
789 (init_registers_i386_avx_linux): New.
790 (init_registers_amd64_avx_linux): Likewise.
791 (xmltarget_i386_linux_no_xml): Likewise.
792 (xmltarget_amd64_linux_no_xml): Likewise.
793 (PTRACE_GETREGSET): Likewise.
794 (PTRACE_SETREGSET): Likewise.
795 (x86_fill_xstateregset): Likewise.
796 (x86_store_xstateregset): Likewise.
797 (use_xml): Likewise.
798 (x86_linux_update_xmltarget): Likewise.
799 (x86_linux_process_qsupported): Likewise.
800 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
801 (x86_arch_setup): Don't call init_registers_amd64_linux nor
802 init_registers_i386_linux here. Call
803 x86_linux_update_xmltarget.
804 (the_low_target): Add x86_linux_process_qsupported.
805
806 * server.c (handle_query): Call target_process_qsupported.
807
808 * target.h (target_ops): Add process_qsupported.
809 (target_process_qsupported): New.
810
fc7238bb
PA
8112010-04-03 Pedro Alves <pedro@codesourcery.com>
812
813 * inferiors.c (add_thread): Set last_status kind to
814 TARGET_WAITKIND_IGNORE.
815 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
816 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
817 (linux_wait_1): Move `thread' local definition to block that uses
818 it. Don't NULL initialize `event_child'.
819 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
820 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
821 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
822
bdabb078
PA
8232010-04-01 Pedro Alves <pedro@codesourcery.com>
824
825 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
826 an extended waitstatus, or by a watchpoint.
827 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
828 thread was stepping or has been stopped by a watchpoint.
829
d3bbe7a0
PA
8302010-04-01 Pedro Alves <pedro@codesourcery.com>
831
832 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
833 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
834 of another, then delete the previous, and validate all
835 breakpoints.
836 (validate_inserted_breakpoint): New.
837 (delete_disabled_breakpoints): New.
838 (validate_breakpoints): New.
839 (check_mem_read): Validate breakpoints before trusting their
840 shadow. Delete disabled breakpoints.
841 (check_mem_write): Validate breakpoints before trusting they
842 should be inserted. Delete disabled breakpoints.
843 * mem-break.h (validate_breakpoints):
844 * server.c (handle_query): Validate breakpoints when we see a
845 qSymbol query.
846
8b07ae33
PA
8472010-04-01 Pedro Alves <pedro@codesourcery.com>
848
849 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
850 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
851 if we could tell there's a GDB breakpoint at stop_pc.
852 (need_step_over_p): Don't do a step over if we find a GDB
853 breakpoint at the resume PC.
854
855 * mem-break.c (struct raw_breakpoint): New.
856 (enum bkpt_type): New type `gdb_breakpoint'.
857 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
858 fields. New field `raw'.
859 (find_raw_breakpoint_at): New.
860 (set_raw_breakpoint_at): Handle refcounting. Create a raw
861 breakpoint instead.
862 (set_breakpoint_at): Adjust.
863 (delete_raw_breakpoint): New.
864 (release_breakpoint): New.
865 (delete_breakpoint): Rename to...
866 (delete_breakpoint_1): ... this. Add proc parameter. Use
867 release_breakpoint. Return ENOENT.
868 (delete_breakpoint): Reimplement.
869 (find_breakpoint_at): Delete.
870 (find_gdb_breakpoint_at): New.
871 (delete_breakpoint_at): Delete.
872 (set_gdb_breakpoint_at): New.
873 (delete_gdb_breakpoint_at): New.
874 (gdb_breakpoint_here): New.
875 (set_reinsert_breakpoint): Use release_breakpoint.
876 (uninsert_breakpoint): Rename to ...
877 (uninsert_raw_breakpoint): ... this.
878 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
879 (reinsert_raw_breakpoint): Change parameter type to
880 raw_breakpoint.
881 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
882 instead.
883 (check_breakpoints): Adjust. Use release_breakpoint.
884 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
885 (breakpoint_inserted_here): Ditto.
886 (check_mem_read): Adjust to iterate over raw breakpoints instead.
887 Don't trust the breakpoint's shadow if it is not inserted.
888 (check_mem_write): Adjust to iterate over raw breakpoints instead.
889 (delete_all_breakpoints): Adjust.
890 (free_all_breakpoints): Mark all breakpoints as uninserted, and
891 use delete_breakpoint_1.
892
893 * mem-break.h (breakpoints_supported): Delete declaration.
894 (set_gdb_breakpoint_at): Declare.
895 (gdb_breakpoint_here): Declare.
896 (delete_breakpoint_at): Delete.
897 (delete_gdb_breakpoint_at): Declare.
898
899 * server.h (struct raw_breakpoint): Forward declare.
900 (struct process_info): New field `raw_breakpoints'.
901
902 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
903 breakpoints.
904
6bf5e0ba
PA
9052010-03-24 Pedro Alves <pedro@codesourcery.com>
906
907 * linux-low.c (status_pending_p_callback): Fix comment.
908 (linux_wait_for_event_1): Move most of the internal breakpoint
909 handling from here...
910 (linux_wait_1): ... to here.
911 (count_events_callback): New.
912 (select_singlestep_lwp_callback): New.
913 (select_event_lwp_callback): New.
914 (cancel_breakpoints_callback): New.
915 (select_event_lwp): New.
916 (linux_wait_1): Simplify internal breakpoint handling. Give equal
917 priority to all LWPs that have had events that should be reported
918 to the client. Cancel breakpoints when about to reporting the
919 event to the client, not while stopping lwps. No longer cancel
920 finished single-steps here.
921 (cancel_finished_single_step): Delete.
922 (cancel_finished_single_steps): Delete.
923
414a389f
PA
9242010-03-24 Pedro Alves <pedro@codesourcery.com>
925
926 * mem-break.c (enum bkpt_type): New.
927 (struct breakpoint): New field `type'.
928 (set_breakpoint_at): Change return type to struct breakpoint
929 pointer. Set type to `other_breakpoint' by default.
930 (delete_breakpoint): Rewrite, supporting more than one breakpoint
931 in the breakpoint list.
932 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
933 (reinsert_breakpoint): Rename to ...
934 (reinsert_raw_breakpoint): ... this.
935 (reinsert_breakpoints_at): Adjust.
936 * mem-break.h (struct breakpoint): Declare.
937 (set_breakpoint_at): Change return type to struct breakpoint
938 pointer.
939
2280c721
PA
9402010-03-24 Pedro Alves <pedro@codesourcery.com>
941
942 * server.c (handle_query): Assign, not compare.
943
d50171e4
PA
9442010-03-24 Pedro Alves <pedro@codesourcery.com>
945
946 Teach linux gdbserver to step-over-breakpoints.
947
948 * linux-low.c (can_hardware_single_step): New.
949 (supports_breakpoints): New.
950 (handle_extended_wait): If stopping threads, read the stop pc of
951 the new cloned LWP.
952 (get_pc): New.
953 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
954 low target doesn't support retrieving the PC.
955 (add_lwp): Set last_resume_kind to resume_continue.
956 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
957 (linux_attach): Don't clear stop_expected. Set the lwp's
958 last_resume_kind to resume_stop.
959 (linux_detach_one_lwp): Don't check for removed breakpoints.
960 (check_removed_breakpoint): Delete.
961 (status_pending_p): Rename to ...
962 (status_pending_p_callback): ... this. Don't check for removed
963 breakpoints. Don't consider threads that are stopped from GDB's
964 perspective.
965 (linux_wait_for_lwp): Always read the stop_pc here.
966 (cancel_breakpoint): New.
967 (step_over_bkpt): New global.
968 (linux_wait_for_event_1): Implement stepping over breakpoints.
969 (gdb_wants_lwp_stopped): New.
970 (gdb_wants_all_stopped): New.
971 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
972 single-step traps here. Store the thread's last reported target
973 wait status.
974 (send_sigstop): Don't clear stop_expected. Always set it,
975 instead.
976 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
977 (cancel_finished_single_step): New.
978 (cancel_finished_single_steps): New.
979 (wait_for_sigstop): Don't cancel finished single-step traps here.
980 (linux_resume_one_lwp): Don't check for removed breakpoints.
981 Don't set `step' on non-hardware step archs.
982 (linux_set_resume_request): Ignore resume_stop requests if already
983 stopping or stopped. Set the lwp's last_resume_kind.
984 (resume_status_pending_p): Don't check for removed breakpoints.
985 (need_step_over_p): New.
986 (start_step_over): New.
987 (finish_step_over): New.
988 (linux_resume_one_thread): Always queue a sigstop for resume_stop
989 requests. Clear the thread's last reported target waitstatus.
990 Don't use the `suspended' flag. Don't consider pending breakpoints.
991 (linux_resume): Start a step-over if necessary.
992 (proceed_one_lwp): New.
993 (proceed_all_lwps): New.
994 (unstop_all_lwps): New.
995 * linux-low.h (struct lwp_info): Rewrite comment for the
996 `suspended' flag. Add the `stop_pc' field. Delete the
997 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
998 Add `'last_resume_kind' and `need_step_over' fields.
999 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1000 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1001 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1002 (set_raw_breakpoint_at): New.
1003 (set_breakpoint_at): Rewrite to use it.
1004 (reinsert_breakpoint_handler): Delete.
1005 (set_reinsert_breakpoint): New.
1006 (reinsert_breakpoint_by_bp): Delete.
1007 (delete_reinsert_breakpoints): New.
1008 (uninsert_breakpoint): Rewrite.
1009 (uninsert_breakpoints_at): New.
1010 (reinsert_breakpoint): Rewrite.
1011 (reinsert_breakpoints_at): New.
1012 (check_breakpoints): Rewrite.
1013 (breakpoint_here): New.
1014 (breakpoint_inserted_here): New.
1015 (check_mem_read): Adjust.
1016 * mem-break.h (breakpoints_supported, breakpoint_here)
1017 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1018 (reinsert_breakpoint_by_bp): Delete declaration.
1019 (delete_reinsert_breakpoints): Declare.
1020 (reinsert_breakpoint): Delete declaration.
1021 (reinsert_breakpoints_at): Declare.
1022 (uninsert_breakpoint): Delete declaration.
1023 (uninsert_breakpoints_at): Declare.
1024 (check_breakpoints): Adjust prototype.
1025 * server.h: Adjust include order.
1026 (struct thread_info): Declare here. Add a `last_status' field.
1027
30ba68cb
MS
10282010-03-23 Michael Snyder <msnyder@vmware.com>
1029
1030 * server.c (crc32): New function.
1031 (handle_query): Add handling for 'qCRC:' request.
1032
b9a881c2
PA
10332010-03-23 Pedro Alves <pedro@codesourcery.com>
1034
1035 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1036 lwp had been stopped by a watchpoint.
1037
e92d13d5
PA
10382010-03-16 Pedro Alves <pedro@codesourcery.com>
1039
1040 * server.h (internal_error): Declare.
1041 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1042 * utils.c (internal_error): New function.
1043
64daa791
AS
10442010-03-15 Andreas Schwab <schwab@redhat.com>
1045
1046 * configure.srv: Fix typo setting srv_regobj.
1047
f52cd8cd
PA
10482010-03-15 Pedro Alves <pedro@codesourcery.com>
1049
1050 * linux-low.c (fetch_register): Avoid passing a non string literal
1051 format to `error'.
1052 (usr_store_inferior_registers): Ditto.
1053
93ae6fdc
PA
10542010-03-14 Pedro Alves <pedro@codesourcery.com>
1055
1056 * linux-low.c (linux_write_memory): Bail out early if peeking
1057 memory failed.
1058
c3adc08c
PA
10592010-03-14 Pedro Alves <pedro@codesourcery.com>
1060
1061 * linux-low.h (struct lwp_info): New fields
1062 `stopped_by_watchpoint' and `stopped_data_address'.
1063 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1064 here, and cache them in the lwp object.
1065 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1066 directly.
1067 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1068 field.
1069 (linux_stopped_by_watchpoint): Rewrite.
1070 (linux_stopped_data_address): Rewrite.
1071
bce522a2
PA
10722010-03-06 Simo Melenius <simo.melenius@iki.fi>
1073
1074 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1075 switching the current inferior, not before.
1076
90884b2b
L
10772010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1078
1079 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1080 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1081 i386-linux.c and amd64-linux.c.
1082 (reg-i386.o): Removed.
1083 (reg-i386.c): Likewise.
1084 (reg-i386-linux.o): Likewise.
1085 (reg-i386-linux.c): Likewise.
1086 (reg-x86-64.o): Likewise.
1087 (reg-x86-64.c): Likewise.
1088 (reg-x86-64-linux.o): Likewise.
1089 (reg-x86-64-linux.c): Likewise.
1090 (i386.o): New.
1091 (i386.c): Likewise.
1092 (i386-linux.o): Likewise.
1093 (i386-linux.c): Likewise.
1094 (amd64.o): Likewise.
1095 (amd64.c): Likewise.
1096 (amd64-linux.o): Likewise.
1097 (amd64-linux.c): Likewise.
1098
1099 * configure.srv (srv_i386_regobj): New.
1100 (srv_i386_linux_regobj): Likewise.
1101 (srv_amd64_regobj): Likewise.
1102 (srv_amd64_linux_regobj): Likewise.
1103 (srv_i386_32bit_xmlfiles): Likewise.
1104 (srv_i386_64bit_xmlfiles): Likewise.
1105 (srv_i386_xmlfiles): Likewise.
1106 (srv_amd64_xmlfiles): Likewise.
1107 (srv_i386_linux_xmlfiles): Likewise.
1108 (srv_amd64_linux_xmlfiles): Likewise.
1109 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1110 srv_xmlfiles to $srv_i386_xmlfiles.
1111 (i[34567]86-*-mingw32ce*): Likewise.
1112 (i[34567]86-*-mingw*): Likewise.
1113 (i[34567]86-*-nto*): Likewise.
1114 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1115 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1116 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1117 (x86_64-*-linux*): Likewise.
1118
1119 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1120 (init_registers_amd64_linux): New.
1121 (x86_arch_setup): Replace init_registers_x86_64_linux with
1122 init_registers_amd64_linux.
1123
193f13e6
MK
11242010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1125
1126 * configure.ac: Check for libdl. If it is not available link against
1127 static libthread_db.
1128 * configure: Regenerate.
1129
85d721b8
PA
11302010-02-22 Pedro Alves <pedro@codesourcery.com>
1131
1132 PR9605
1133
1134 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1135 handing a read watchpoint.
1136 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1137
6076632b
DE
11382010-02-12 Doug Evans <dje@google.com>
1139
1140 * linux-low.c (linux_supports_tracefork_flag): Document.
1141 (linux_look_up_symbols): Add comment.
1142
3327ccf7
L
11432010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1144
1145 * regcache.c (supply_register): Clear regcache if buf is NULL.
1146
0718675c 11472010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 1148 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
1149
1150 * inferiors.c (find_inferior): Add function documentation.
1151 (unloaded_dll): Handle the case where the unloaded dll has not
1152 been previously registered in the dll list.
1153
177321bd
DJ
11542010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1155
1156 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1157 (thumb2_breakpoint): New.
1158 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1159
2b009048
DJ
11602010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1161
1162 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1163 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1164 breakpoints.
1165
3be029c7
PA
11662010-01-21 Pedro Alves <pedro@codesourcery.com>
1167
1168 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1169
18f5de3b
JK
11702010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1171
1172 * linux-s390-low.c (s390_collect_ptrace_register)
1173 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1174
3743bb4f
DE
11752010-01-21 Doug Evans <dje@google.com>
1176
14ce3065
DE
1177 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1178 (PTRACE_ARG4_TYPE): New macro.
1179 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1180 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1181 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1182 (usr_store_inferior_registers): Ditto.
1183 (linux_read_memory, linux_write_memory): Ditto.
1184 (linux_test_for_tracefork): Ditto.
1185
3743bb4f
DE
1186 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1187 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1188
8b315be5
PA
11892010-01-21 Pedro Alves <pedro@codesourcery.com>
1190
1191 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1192 target.
1193
85492558
PA
11942010-01-21 Pedro Alves <pedro@codesourcery.com>
1195
1196 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1197 prototype to take a regcache. Adjust.
1198
442ea881
PA
11992010-01-20 Pedro Alves <pedro@codesourcery.com>
1200
1201 * regcache.h (struct thread_info): Forward declare.
1202 (struct regcache): New.
1203 (new_register_cache): Adjust prototype.
1204 (get_thread_regcache): Declare.
1205 (free_register_cache): Adjust prototype.
1206 (registers_to_string, registers_from_string): Ditto.
1207 (supply_register, supply_register_by_name, collect_register)
1208 (collect_register_as_string, collect_register_by_name): Ditto.
1209 * regcache.c (struct inferior_regcache_data): Delete.
1210 (get_regcache): Rename to ...
1211 (get_thread_regcache): ... this. Adjust. Switch inferior before
1212 fetching registers.
1213 (regcache_invalidate_one): Adjust.
1214 (regcache_invalidate): Fix prototype.
1215 (new_register_cache): Return the new register cache.
1216 (free_register_cache): Change prototype.
1217 (realloc_register_cache): Adjust.
1218 (registers_to_string): Change prototype to take a regcache. Adjust.
1219 (registers_from_string): Ditto.
1220 (register_data): Ditto.
1221 (supply_register): Ditto.
1222 (supply_register_by_name): Ditto.
1223 (collect_register): Ditto.
1224 (collect_register_as_string): Ditto.
1225 (collect_register_by_name): Ditto.
1226 * server.c (process_serial_event): Adjust.
1227 * linux-low.h (regset_fill_func, regset_store_func): Change
1228 prototype.
1229 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1230 Change prototype.
1231 * linux-low.c (get_stop_pc): Adjust.
1232 (check_removed_breakpoint): Adjust.
1233 (linux_wait_for_event): Adjust.
1234 (linux_resume_one_lwp): Adjust.
1235 (fetch_register): Add regcache parameter. Adjust.
1236 (usr_store_inferior_registers): Ditto.
1237 (regsets_fetch_inferior_registers): Ditto.
1238 (regsets_store_inferior_registers): Ditto.
1239 (linux_fetch_registers, linux_store_registers): Ditto.
1240 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1241 regcache. Adjust.
1242 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1243 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1244 prototype to take a regcache.
1245 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1246 * remote-utils.c (convert_ascii_to_int, outreg)
1247 (prepare_resume_reply): Change prototype to take a regcache.
1248 Adjust.
1249 * target.h (struct target_ops) <fetch_registers, store_registers>:
1250 Change prototype to take a regcache.
1251 (fetch_inferior_registers, store_inferior_registers): Change
1252 prototype to take a regcache. Adjust.
1253 * proc-service.c (ps_lgetregs): Adjust.
1254 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
1255 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
1256 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
1257 take a regcache. Adjust.
1258 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
1259 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1260 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
1261 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
1262 * linux-cris-low.c (cris_get_pc, cris_set_pc)
1263 (cris_cannot_fetch_register):
1264 (cris_breakpoint_at): Change prototype to take a regcache.
1265 Adjust.
1266 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
1267 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
1268 to take a regcache. Adjust.
1269 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
1270 Adjust.
1271 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
1272 take a regcache. Adjust.
1273 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
1274 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
1275 (m68k_set_pc): Change prototype to take a regcache. Adjust.
1276 * linux-mips-low.c (mips_get_pc):
1277 (mips_set_pc): Change prototype to take a regcache. Adjust.
1278 (mips_reinsert_addr): Adjust.
1279 (mips_collect_register): Change prototype to take a regcache.
1280 Adjust.
1281 (mips_supply_register):
1282 (mips_collect_register_32bit, mips_supply_register_32bit)
1283 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1284 (mips_store_fpregset): Ditto.
1285 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1286 Ditto.
1287 (parse_spufs_run): Adjust.
1288 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1289 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1290 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1291 take a regcache. Adjust.
1292 * linux-s390-low.c (s390_collect_ptrace_register)
1293 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1294 (s390_set_pc): Change prototype to take a regcache. Adjust.
1295 (s390_arch_setup): Adjust.
1296 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1297 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1298 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1299 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1300 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1301 regcache. Adjust.
1302 (sparc_breakpoint_at): Adjust.
1303 * linux-xtensa-low.c (xtensa_fill_gregset):
1304 (xtensa_store_gregset):
1305 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1306 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1307 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1308 prototype to take a regcache. Adjust.
1309 * win32-arm-low.c (arm_fetch_inferior_register)
1310 (arm_store_inferior_register): Change prototype to take a
1311 regcache. Adjust.
1312 * win32-i386-low.c (i386_fetch_inferior_register)
1313 (i386_store_inferior_register): Change prototype to take a
1314 regcache. Adjust.
1315 * win32-low.c (child_fetch_inferior_registers)
1316 (child_store_inferior_registers): Change prototype to take a
1317 regcache. Adjust.
1318 (win32_wait): Adjust.
1319 (win32_fetch_inferior_registers): Change prototype to take a
1320 regcache. Adjust.
1321 (win32_store_inferior_registers): Adjust.
1322 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1323 store_inferior_register>: Change prototype to take a regcache.
1324
60c3d7b0
DE
13252010-01-20 Doug Evans <dje@google.com>
1326
1327 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1328 #ifdef.
1329 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 1330 (W_STOPCODE): Provide definition if missing.
60c3d7b0 1331
dc146f7c
VP
13322010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1333
1334 * linux-low.c (linux_core_of_thread): New.
1335 (compare_ints, show_process, list_threads): New.
1336 (linux_qxfer_osdata): Report threads and cores.
1337 (linux_target_op): Register linux_core_of_thread.
1338 * remote-utils.c (prepare_resume_reply): Report the core.
1339 (buffer_xml_printf): Support %d specifier.
1340 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1341 New.
1342 (handle_query): Handle qXfer:threads. Announce availability
1343 thereof.
1344 * target.h (struct target_ops): New field core_of_thread.
1345
7803799a
UW
13462010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1347
1348 * Makefile.in (clean): Remove new generated files.
1349 (reg-s390.o, reg-s390.c): Remove rules.
1350 (reg-s390x.o, reg-s390x.c): Likewise.
1351 (s390-linux32.o, s390-linux32.c): Add rules.
1352 (s390-linux64.o, s390-linux64.c): Likewise.
1353 (s390x-linux64.o, s390x-linux64.c): Likewise.
1354 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1355 * linux-s390-low.c: Include <elf.h>.
1356 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1357 (init_registers_s390): Remove prototype.
1358 (init_registers_s390x): Likewise.
1359 (init_registers_s390_linux32): Add prototype.
1360 (init_registers_s390_linux64): Likewise.
1361 (init_registers_s390x_linux64): Likewise.
1362 (s390_num_regs_3264): New define.
1363 (s390_regmap_3264): New global variable.
1364 (s390_cannot_fetch_register): Remove obsolete check.
1365 (s390_cannot_store_register): Likewise.
1366 (s390_collect_ptrace_register): Handle upper/lower register halves.
1367 (s390_supply_ptrace_register): Likewise.
1368 (s390_fill_gregset): Update to register number changes.
1369 (s390_get_hwcap): New routine.
1370 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1371 Install appropriate regmap and register set.
1372
6e7ffa39
JB
13732010-01-01 Joel Brobecker <brobecker@adacore.com>
1374
1375 * server.c (gdbserver_version): Update copyright year to 2010.
1376 * gdbreplay.c (gdbreplay_version): Likewise.
1377
957f3f49
DE
13782009-12-28 Doug Evans <dje@google.com>
1379
1380 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1381 elf/external.h. Include <elf.h> instead but only if necessary.
1382
ca5c370d
PA
13832009-12-28 Pedro Alves <pedro@codesourcery.com>
1384
1385 * linux-low.c (linux_remove_process): Remove `detaching'
1386 parameter. Don't release/detach from thread_db here.
1387 (linux_kill): Release/detach from thread_db here, ...
1388 (linux_detach): ... and here, before actually detaching.
1389 (linux_wait_1): ... and here, when a process exits.
1390 * thread-db.c (any_thread_of): New.
1391 (thread_db_free): Switch the current inferior to a thread of the
1392 passed in process.
1393
4ee62156
DE
13942009-12-21 Doug Evans <dje@google.com>
1395
d90e6a88
DE
1396 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1397
c5f62d5f
DE
1398 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1399 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1400 warning ifndef __NR_tkill. Move setting of errno there too.
1401 Delete unnecessary resetting of errno after syscall.
1402 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1403
10e86dd7
DE
1404 * configure.ac: Check for dladdr.
1405 * config.in: Regenerate.
1406 * configure: Regenerate.
1407 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1408 (try_thread_db_load): Update.
1409
4ee62156
DE
1410 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1411
00f515da
DE
14122009-12-18 Doug Evans <dje@google.com>
1413
e9464885
DE
1414 * event-loop.c: Include unistd.h if it exists.
1415
07d4f67e
DE
1416 * linux-low.c (my_waitpid): Move definition away from being in
1417 between linux_tracefork_child/linux_test_for_tracefork.
1418
00f515da
DE
1419 * gdb_proc_service.h (psaddr_t): Fix type.
1420 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1421 signature to match glibc.
1422
1de1badb
DE
14232009-12-16 Doug Evans <dje@google.com>
1424
1425 * linux-low.c (linux_read_memory): Fix argument to read.
1426
aeeb81d1
PA
14272009-11-26 Pedro Alves <pedro@codesourcery.com>
1428
1429 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1430 events, don't leave current_inferior pointing at null.
1431
10357975
PA
14322009-11-26 Pedro Alves <pedro@codesourcery.com>
1433
1434 * win32-low.c (LOG): Delete.
1435 (OUTMSG): Output to stderr.
1436 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1437 on compile time LOG macro.
1438 (win32_wait): Fix debug output.
1439
cf6e3471
PA
14402009-11-26 Pedro Alves <pedro@codesourcery.com>
1441
1442 * win32-low.c (win32_add_one_solib): If the dll name is
1443 "ntdll.dll", prepend the system directory to the dll path.
1444
0c85e18e
MK
14452009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1446
1447 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1448
9ac544ce 14492009-11-17 Nathan Sidwell <nathan@codesourcery.com>
0c85e18e 1450 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
1451
1452 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1453 * configure.ac: Check for __mcoldfire__ and set
1454 gdb_cv_m68k_is_coldfire.
1455 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1456 reg-cf.o and reg-m68k.o.
1457 * configure: Regenerated.
1458
fd7dd3e6
PA
14592009-11-16 Pedro Alves <pedro@codesourcery.com>
1460
1461 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1462 Pass it to thread_db_free.
1463 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1464 proper `detaching' argument to linux_remove_process.
1465 * linux-low.h (thread_db_free): Add `detaching' parameter.
1466 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1467 to thread_db_free.
1468 (thread_db_free): Add `detaching' parameter. Only
1469 call td_ta_clear_event if detaching from process.
1470
75aa492e
MK
14712009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1472
1473 * thread-db.c (thread_db_free): Fix typo.
1474
21e1bee4
PP
14752009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1476
1477 PR gdb/10838
1478 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1479
8838b45e
NS
14802009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1481
1482 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1483 with an i686 compiler.
1484 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1485 needed.
1486 * configure: Rebuilt.
1487
8a35fb51
SL
14882009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1489
1490 PR gdb/10783
1491
1492 * server.c (handle_search_memory_1): Correct read_addr initialization
1493 in loop for searching subsequent chunks.
1494
96f15937
PP
14952009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1496
1497 * configure.ac: New --with-libthread-db option.
1498 * thread-db.c: Allow direct dependence on libthread_db.
1499 (thread_db_free): Adjust.
1500 * config.in: Regenerate.
1501 * configure: Likewise.
1502
5f7d1694
PP
15032009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1504
1505 PR gdb/10757
1506 * thread-db.c (attach_thread): New function.
1507 (maybe_attach_thread): Return success/failure.
1508 (find_new_threads_callback): Adjust.
1509 (thread_db_find_new_threads): Loop until no new threads.
1510
88e3b899
PA
15112009-10-13 Pedro Alves <pedro@codesourcery.com>
1512
1513 * proc-service.c (ps_lgetregs): Formatting.
1514
cdbfd419
PP
15152009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1516
1517 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1518 * configure.ac: Adjust.
1519 * linux-low.h (struct process_info_private): Move members to struct
1520 thread_db.
1521 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1522 * linux-low.c (linux_remove_process): Adjust.
1523 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1524 * server.c (handle_query): Move code ...
1525 (handle_monitor_command): ... here. New function.
1526 * target.h (struct target_ops): New member.
1527 * thread-db.c (struct thread_db): New.
1528 (libthread_db_search_path): New variable.
1529 (thread_db_create_event, thread_db_enable_reporting)
1530 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1531 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1532 (try_thread_db_load_1, dladdr_to_soname): New functions.
1533 (try_thread_db_load, thread_db_load_search): New functions.
1534 (thread_db_init): Search for libthread_db.
1535 (thread_db_free): New function.
1536 (thread_db_handle_monitor_command): Likewise.
1537 * config.in: Regenerate.
1538 * configure: Regenerate.
1539
4168d2d6
UW
15402009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1541
1542 * spu-low.c (spu_kill): Wait for inferior to terminate.
1543 Call clear_inferiors.
1544 (spu_detach): Call clear_inferiors.
1545
81ecdfbb
RW
15462009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1547
1548 * aclocal.m4: Regenerate.
1549 * config.in: Likewise.
1550 * configure: Likewise.
1551
0b9ff2c0
UW
15522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1553
1554 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1555 (parse_spufs_run): New function.
1556 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1557 (ppc_breakpoint_at): Handle SPU breakpoints.
1558
efcbbd14
UW
15592009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1560
1561 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1562 (SPUFS_MAGIC): Define.
1563 (spu_enumerate_spu_ids): New function.
1564 (linux_qxfer_spu): New function.
1565 (linux_target_ops): Install linux_qxfer_spu.
1566
f4d9bade
UW
15672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1568
1569 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1570 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1571 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1572 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1573 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1574 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1575 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1576 (init_registers_powerpc_cell32l): Add prototype.
1577 (init_registers_powerpc_cell64l): Likewise.
1578 (ppc_arch_setup): Detect Cell/B.E. architecture.
1579
96e946ca
RW
15802009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1581
1582 * Makefile.in (datarootdir): New variable.
1583
58d6951d
DJ
15842009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1585
1586 * linux-low.c (linux_write_memory): Update debugging output.
1587 * Makefile.in (clean): Add new descriptions.
1588 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1589 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1590 * configure.srv: Add new files for arm*-*-linux*.
1591 * linux-arm-low.c: Add new declarations.
1592 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1593 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1594 (HWCAP_VFPv3D16): New.
1595 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1596 instead of __IWMMXT__.
1597 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1598 (arm_arch_setup): New.
1599 (target_regsets): Remove #ifdef. Add VFP regset.
1600 (the_low_target): Use arm_arch_setup.
1601
12b42a12
DJ
16022009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1603
1604 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1605 the main thread again.
1606
ac8c974e
AR
16072009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1608
1609 Adding Neutrino gdbserver.
1610 * configure: Regenerated.
1611 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1612 * configure.srv (i[34567]86-*-nto*): New target.
1613 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1614 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1615 (nto_comctrl) [__QNX__]: New function.
1616 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1617
4424e0c3 16182009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
1619
1620 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1621 srv_tgtobj.
1622
912cf4ba
PA
16232009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1624 Pedro Alves <pedro@codesourcery.com>
1625
1626 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1627 don't support CONTEXT_EXTENDED_REGISTERS.
1628 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1629 (the_low_target): Install them.
1630 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1631 failing with ERROR_PIPE_NOT_CONNECTED.
1632
aa5ca48f
DE
16332009-06-30 Doug Evans <dje@google.com>
1634 Pierre Muller <muller@ics.u-strasbg.fr>
1635
1636 Add h/w watchpoint support to x86-linux, win32-i386.
1637 * Makefile.in (SFILES): Add i386-low.c
1638 (i386_low_h): Define.
1639 (i386-low.o): Add dependencies.
1640 (linux-x86-low.o): Add i386-low.h dependency.
1641 (win32-i386-low.o): Ditto.
1642 * i386-low.c: New file.
1643 * i386-low.h: New file.
1644 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1645 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1646 * linux-low.c (linux_add_process): Initialize arch_private.
1647 (linux_remove_process): Free arch_private.
1648 (add_lwp): Initialize arch_private.
1649 (delete_lwp): Free arch_private.
1650 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1651 provided.
1652 * linux-low.h (process_info_private): New member arch_private.
1653 (lwp_info): New member arch_private.
1654 (linux_target_ops): New members new_process, new_thread,
1655 prepare_to_resume.
1656 (ptid_of): New macro.
1657 * linux-x86-low.c: Include stddef.h, i386-low.h.
1658 (arch_process_info): New struct.
1659 (arch_lwp_info): New struct.
1660 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1661 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1662 (i386_dr_low_get_status): New function.
1663 (x86_insert_point, x86_remove_point): New functions.
1664 (x86_stopped_by_watchpoint): New function.
1665 (x86_stopped_data_address): New function.
1666 (x86_linux_new_process, x86_linux_new_thread): New functions.
1667 (x86_linux_prepare_to_resume): New function.
1668 (the_low_target): Add entries for insert_point, remove_point,
1669 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1670 prepare_to_resume.
1671 * server.c (debug_hw_points): New global.
1672 (monitor_show_help): Document set debug-hw-points.
1673 (handle_query): Process "set debug-hw-points".
1674 * server.h (debug_hw_points): Declare.
1675 (paddress): Declare.
1676 * utils.c (NUMCELLS, CELLSIZE): New macros.
1677 (get_sell, xsnprintf, paddress): New functions.
1678 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1679 remove_point, stopped_by_watchpoint, stopped_data_address.
1680 * win32-i386-low.c: Include i386-low.h.
1681 (debug_reg_state): Replaces dr.
1682 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1683 (i386_dr_low_get_status): New function.
1684 (i386_insert_point, i386_remove_point): New functions.
1685 (i386_stopped_by_watchpoint): New function.
1686 (i386_stopped_data_address): New function.
1687 (i386_initial_stuff): Update.
1688 (get_thread_context,set_thread_context,i386_thread_added): Update.
1689 (the_low_target): Add entries for insert_point,
1690 remove_point, stopped_by_watchpoint, stopped_data_address.
1691 * win32-low.c (win32_insert_watchpoint): New function.
1692 (win32_remove_watchpoint): New function.
1693 (win32_stopped_by_watchpoint): New function.
1694 (win32_stopped_data_address): New function.
1695 (win32_target_ops): Add entries for insert_watchpoint,
1696 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1697 * win32-low.h (win32_target_ops): New members insert_point,
1698 remove_point, stopped_by_watchpoint, stopped_data_address.
1699
d993e290
PA
17002009-06-25 Pedro Alves <pedro@codesourcery.com>
1701
1702 * server.c (process_serial_event): Re-return unsupported, not
1703 error, if the type isn't recognized. Re-allow supporting only
1704 insert or remove packets. Also call require_running for
1705 breakpoints. Add missing break statement to default case. Tidy.
1706 * target.h (struct target_ops): Rename insert_watchpoint to
1707 insert_point, and remove_watchpoint to remove_point.
1708
1709 * linux-low.h (struct linux_target_ops): Likewise.
1710 * linux-low.c (linux_insert_watchpoint): Rename to ...
1711 (linux_insert_point): ... this. Adjust.
1712 (linux_remove_watchpoint): Rename to ...
1713 (linux_remove_point): ... this. Adjust.
1714 (linux_target_ops): Adjust.
1715 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1716 (cris_insert_point): ... this.
1717 (cris_remove_watchpoint): Rename to ...
1718 (cris_remove_point): ... this.
1719 (the_low_target): Adjust.
1720
0f54c268
PM
17212009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1722
1723 * server.c (handle_v_kill): Pass signal_pid to
1724 kill_inferior if multi_process is zero.
1725
c6314022
AR
17262009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1727
1728 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1729 * target.h (target_ops): Comment for *_watchpoint to make it clear
1730 the functions can get types '0' and '1'.
1731
4463ce24
AR
17322009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1733
1734 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1735 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1736 * regcache.c (get_regcache): Likewise.
1737 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1738 * win32-low.c (child_fetch_inferior_registers): Remove check for
1739 regno 0.
1740
cf8fd78b
PA
17412009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1742 Pedro Alves <pedro@codesourcery.com>
1743
1744 * target.h (struct target_ops) <supports_multi_process>: New
1745 callback.
1746 (target_supports_multi_process): New.
1747 * server.c (handle_query): Even if GDB reports support, only
1748 enable multi-process if the target also supports it. Report
1749 multi-process support only if the target backend supports it.
1750 * linux-low.c (linux_supports_multi_process): New function.
1751 (linux_target_ops): Install it as target_supports_multi_process
1752 callback.
1753
47c0c975
DE
17542009-05-24 Doug Evans <dje@google.com>
1755
e09875d4
DE
1756 Global renaming of find_thread_pid to find_thread_ptid.
1757 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1758 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1759 All callers updated.
1760
e27d73f6
DE
1761 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1762 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1763 directly.
1764
47c0c975
DE
1765 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1766 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1767 (linux_resume_one_lwp): Ditto.
1768
2acc282a
DE
17692009-05-23 Doug Evans <dje@google.com>
1770
1771 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1772 from struct inferior_list_entry * to struct lwp_info *.
1773 All callers updated.
1774
9f1036c1
DE
17752009-05-13 Doug Evans <dje@google.com>
1776
1777 * linux-x86-low.c: Don't include assert.h.
1778 (x86_siginfo_fixup): Use fatal, not assert.
1779 (x86_arch_setup): Fix comment.
1780
d0722149
DE
17812009-05-12 Doug Evans <dje@google.com>
1782
1783 Biarch support for i386/amd64 gdbserver.
1784 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1785 Add linux-x86-low.c.
1786 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1787 (linux-x86-low.o): Add.
1788 * linux-x86-64-low.c: Delete.
1789 * linux-i386-low.c: Delete.
1790 * linux-x86-low.c: New file.
1791 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1792 linux-x86-low.o.
1793 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1794 linux-x86-low.o.
1795 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1796 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1797 (linux_child_pid_to_exec_file): New function.
1798 (elf_64_header_p, elf_64_file_p): New functions.
1799 (siginfo_fixup): New function.
1800 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1801 give target a chance to convert layout.
1802 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1803 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1804
fdeb2a12
DE
18052009-05-07 Doug Evans <dje@google.com>
1806
1807 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1808 (regsets_store_inferior_registers): Ditto.
1809
a6dbe5df
PA
18102009-05-06 Pedro Alves <pedro@codesourcery.com>
1811
1812 PR server/10048
1813
1814 * linux-low.c (must_set_ptrace_flags): Delete.
1815 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1816 of the global.
1817 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1818 `lwp->must_set_ptrace_flags' instead.
ba42693b 1819 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
1820 (linux_wait_1): ... not here.
1821
5091eb23
DE
18222009-04-30 Doug Evans <dje@google.com>
1823
9f767825
DE
1824 * inferiors.c (started_inferior_callback): New function.
1825 (attached_inferior_callback): New function.
1826 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1827 * server.c (print_started_pid, print_attached_pid): New functions.
1828 (detach_or_kill_for_exit): New function.
1829 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1830 * server.h (have_started_inferiors_p): Declare.
1831 (have_attached_inferiors_p): Declare.
1832
5091eb23
DE
1833 * inferiors.c (remove_process): Fix memory leak, free process.
1834 * linux-low.c (linux_remove_process): New function.
1835 (linux_kill): Call it instead of remove_process.
1836 (linux_detach, linux_wait_1): Ditto.
1837
155c8968
PA
18382009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1839
1840 * configure.srv: Add x86 Windows CE target.
1841
7fe519cb
UW
18422009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1843
1844 * inferiors.c (get_thread_process): Make global.
1845 * server.h (get_thread_process): Add prototype.
1846 * thread-db.c (find_one_thread): Use get_thread_process
1847 instead of current_process.
1848 (thread_db_get_tls_address): Do not crash if called when
1849 thread layer is not yet initialized.
1850
5472f405
UW
18512009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1852
1853 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1854 * spu-low.c (current_tid): Rename to ...
1855 (current_ptid): ... this.
1856 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1857 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1858 ptid_get_lwp (current_ptid) instead of current_tid.
1859 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1860 instead of current_tid. Use find_process_pid to verify pid
1861 argument is valid. Pass proper argument to remove_process.
1862 (spu_thread_alive): Compare current_ptid instead of current_tid.
1863 (spu_resume): Likewise.
1864
55ac2b99
PA
18652009-04-02 Pedro Alves <pedro@codesourcery.com>
1866
1867 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1868 variable.
1869
95954743
PA
18702009-04-01 Pedro Alves <pedro@codesourcery.com>
1871
1872 Implement the multiprocess extensions, and add linux multiprocess
1873 support.
1874
1875 * server.h (ULONGEST): Declare.
1876 (struct ptid, ptid_t): New.
1877 (minus_one_ptid, null_ptid): Declare.
1878 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1879 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1880 (struct inferior_list_entry): Change `id' type from unsigned from
1881 to ptid_t.
1882 (struct sym_cache, struct breakpoint, struct
1883 process_info_private): Forward declare.
1884 (struct process_info): Declare.
1885 (current_process): Declare.
1886 (all_processes): Declare.
1887 (initialize_inferiors): Declare.
1888 (add_thread): Adjust to use ptid_t.
1889 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1890 (add_process, remove_process, find_thread_pid): Declare.
1891 (find_inferior_id): Adjust to use ptid_t.
1892 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1893 (multi_process): Declare.
1894 (push_event): Adjust to use ptid_t.
1895 (read_ptid, write_ptid): Declare.
1896 (prepare_resume_reply): Adjust to use ptid_t.
1897 (clear_symbol_cache): Declare.
1898 * inferiors.c (all_processes): New.
1899 (null_ptid, minus_one_ptid): New.
1900 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1901 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1902 (add_thread): Change unsigned long to ptid. Remove gdb_id
1903 parameter. Adjust.
1904 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1905 (gdb_id_to_thread): Rename to ...
1906 (find_thread_pid): ... this. Change unsigned long to ptid.
1907 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1908 (loaded_dll, pull_pid_from_list): Adjust.
1909 (add_process, remove_process, find_process_pid)
1910 (get_thread_process, current_process, initialize_inferiors): New.
1911 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1912 (struct target_waitstatus) <related_pid>: Ditto.
1913 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1914 return type to int.
1915 (struct target_ops) <join>: Add `pid' argument.
1916 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1917 (struct target_ops) <wait>: Add `ptid' field. Change return type
1918 to ptid.
1919 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1920 (mywait): Add `ptid' argument. Change return type to ptid_t.
1921 (target_pid_to_str): Declare.
1922 * target.c (set_desired_inferior): Adjust to use ptids.
1923 (mywait): Add new `ptid' argument. Adjust.
1924 (target_pid_to_str): New.
1925 * mem-break.h (free_all_breakpoints): Declare.
1926 * mem-break.c (breakpoints): Delelete.
1927 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1928 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1929 to use per-process breakpoint list.
1930 (free_all_breakpoints): New.
1931 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1932 (symbol_cache, all_symbols_looked_up): Delete.
1933 (hexchars): New.
1934 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1935 read_ptid): New.
1936 (prepare_resume_reply): Change ptid argument's type from unsigned
1937 long to ptid_t. Adjust. Implement W;process and X;process.
1938 (free_sym_cache, clear_symbol_cache): New.
1939 (look_up_one_symbol): Adjust to per-process symbol cache. *
1940 * server.c (cont_thread, general_thread, step_thread): Change type
1941 to ptid_t.
1942 (attached): Delete.
1943 (multi_process): New.
1944 (last_ptid): Change type to ptid_t.
1945 (struct vstop_notif) <ptid>: Change type to ptid_t.
1946 (queue_stop_reply, push_event): Change `ptid' argument's type to
1947 ptid_t.
1948 (discard_queued_stop_replies): Add `pid' argument.
1949 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1950 changes. Don't reference the `attached' global.
1951 (attach_inferior): Adjust to mywait interface changes.
1952 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1953 features. Handle and report "multiprocess+". Handle
1954 "qAttached:PID".
1955 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1956 changes.
1957 (handle_v_kill): New.
1958 (handle_v_stopped): Adjust to use target_pid_to_str.
1959 (handle_v_requests): Allow multiple attaches and runs when
1960 multiprocess extensions are in effect. Handle "vKill".
1961 (myresume): Adjust to use ptids.
1962 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1963 (handle_status): Adjust to discard_queued_stop_replies interface
1964 change.
1965 (first_thread_of, kill_inferior_callback)
1966 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1967 (main): Call initialize_inferiors. Adjust to use ptids, killing
1968 and detaching from all inferiors. Handle multiprocess packet
1969 variants.
1970 * linux-low.h: Include gdb_proc_service.h.
1971 (struct process_info_private): New.
1972 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1973 <lwpid_of>: Use ptid_get_lwp.
1974 (get_lwp_thread): Adjust.
1975 (struct lwp_info): Add `dead' member.
1976 (find_lwp_pid): Declare.
1977 * linux-low.c (thread_db_active): Delete.
1978 (new_inferior): Adjust comment.
1979 (inferior_pid): Delete.
1980 (linux_add_process): New.
1981 (handle_extended_wait): Adjust.
1982 (add_lwp): Change unsigned long to ptid.
1983 (linux_create_inferior): Add process to processes table. Adjust
1984 to use ptids. Don't set new_inferior here.
1985 (linux_attach_lwp): Rename to ...
1986 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1987 it. Adjust to use ptids.
1988 (linux_attach_lwp): New.
1989 (linux_attach): Add process to processes table. Don't set
1990 new_inferior here.
1991 (struct counter): New.
1992 (second_thread_of_pid_p, last_thread_of_process_p): New.
1993 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1994 multiple processes.
1995 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1996 processes. Remove process from process table.
1997 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1998 to multiple processes.
1999 (any_thread_of): New.
2000 (linux_detach): Add `pid' argument, and handle it. Remove process
2001 from processes table.
2002 (linux_join): Add `pid' argument. Handle it.
2003 (linux_thread_alive): Change unsighed long argument to ptid_t.
2004 Consider dead lwps as not being alive.
2005 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2006 threads we're not interested in.
2007 (same_lwp, find_lwp_pid): New.
2008 (linux_wait_for_lwp): Change `pid' argument's type from int to
2009 ptid_t. Adjust.
2010 (linux_wait_for_event): Rename to ...
2011 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2012 from int to ptid_t. Adjust.
2013 (linux_wait_for_event): New.
2014 (linux_wait_1): Add `ptid' argument. Change return type to
2015 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2016 that exit from the process table.
2017 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2018 Adjust.
2019 (mark_lwp_dead): New.
2020 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2021 stopping all threads, mark its main lwp as dead.
2022 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2023 ptids.
2024 (fetch_register, usr_store_inferior_registers)
2025 (regsets_fetch_inferior_registers)
2026 (regsets_store_inferior_registers, linux_read_memory)
2027 (linux_write_memory): Inline `inferior_pid'.
2028 (linux_look_up_symbols): Adjust to use per-process
2029 `thread_db_active'.
2030 (linux_request_interrupt): Adjust to use ptids.
2031 (linux_read_auxv): Inline `inferior_pid'.
2032 (initialize_low): Don't reference thread_db_active.
2033 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2034 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2035 (ps_getpid): Return the pid of the current inferior.
2036 * thread-db.c (proc_handle, thread_agent): Delete.
2037 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2038 per-process data.
2039 (find_one_thread): Change argument type to ptid_t. Adjust to
2040 per-process data.
2041 (maybe_attach_thread): Adjust to per-process data and ptids.
2042 (thread_db_find_new_threads): Ditto.
2043 (thread_db_init): Ditto.
2044 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2045 processes table. Adjust to use ptids.
2046 (spu_kill, spu_detach): Adjust interface. Remove process from
2047 processes table.
2048 (spu_join, spu_thread_alive): Adjust interface.
2049 (spu_wait): Adjust interface. Remove process from processes
2050 table. Adjust to use ptids.
2051 * win32-low.c (current_inferior_tid): Delete.
2052 (current_inferior_ptid): New.
2053 (debug_event_ptid): New.
2054 (thread_rec): Take a ptid. Adjust.
2055 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2056 (child_delete_thread): Ditto.
2057 (do_initial_child_stuff): Add `attached' argument. Add process to
2058 processes table.
2059 (child_fetch_inferior_registers, child_store_inferior_registers):
2060 Adjust.
2061 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2062 (win32_attach): Pass 1 to do_initial_child_stuff.
2063 (win32_kill): Adjust interface. Remove process from processes
2064 table.
2065 (win32_detach): Ditto.
2066 (win32_join): Adjust interface.
2067 (win32_thread_alive): Take a ptid.
2068 (win32_resume): Adjust to use ptids.
2069 (get_child_debug_event): Ditto.
2070 (win32_wait): Adjust interface. Remove exiting process from
2071 processes table.
2072
bd99dc85
PA
20732009-04-01 Pedro Alves <pedro@codesourcery.com>
2074
2075 Non-stop mode support.
2076
2077 * server.h (non_stop): Declare.
2078 (gdb_client_data, handler_func): Declare.
2079 (delete_file_handler, add_file_handler, start_event_loop):
2080 Declare.
2081 (handle_serial_event, handle_target_event, push_event)
2082 (putpkt_notif): Declare.
2083 * target.h (enum resume_kind): New.
2084 (struct thread_resume): Replace `step' field by `kind' field.
2085 (TARGET_WNOHANG): Define.
2086 (struct target_ops) <wait>: Add `options' argument.
2087 <supports_non_stop, async, start_non_stop>: New fields.
2088 (target_supports_non_stop, target_async): New.
2089 (start_non_stop): Declare.
2090 (mywait): Add `options' argument.
2091 * target.c (mywait): Add `options' argument. Print child exit
2092 notifications here.
2093 (start_non_stop): New.
2094 * server.c (non_stop, own_buf, mem_buf): New globals.
2095 (struct vstop_notif): New.
2096 (notif_queue): New global.
2097 (queue_stop_reply, push_event, discard_queued_stop_replies)
2098 (send_next_stop_reply): New.
2099 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2100 interface changes.
2101 (attach_inferior): In non-stop mode, don't wait for the target
2102 here.
2103 (handle_general_set): Handle QNonStop.
2104 (handle_query): When handling qC, return the current general
2105 thread, instead of the first thread of the list.
2106 (handle_query): If the backend supports non-stop mode, include
2107 QNonStop+ in the qSupported query response.
2108 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2109 and non-stop mode.
2110 (handle_v_attach, handle_v_run): Handle non-stop mode.
2111 (handle_v_stopped): New.
2112 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2113 (myresume): Adjust to use resume_kind. Handle non-stop.
2114 (queue_stop_reply_callback): New.
2115 (handle_status): Handle non-stop mode.
2116 (main): Clear non_stop flag on reconnection. Use the event-loop.
2117 Refactor serial protocol handling from here ...
2118 (process_serial_event): ... to this new function. When GDB
2119 selects any thread, select one here. In non-stop mode, wait until
2120 GDB acks all pending events before exiting.
2121 (handle_serial_event, handle_target_event): New.
2122 * remote-utils.c (remote_open): Install remote_desc in the event
2123 loop.
2124 (remote_close): Remove remote_desc from the event loop.
2125 (putpkt_binary): Rename to...
2126 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2127 (putpkt_binary): New as wrapper around putpkt_binary_1.
2128 (putpkt_notif): New.
2129 (prepare_resume_reply): In non-stop mode, don't change the
2130 general_thread.
2131 * event-loop.c: New.
2132 * Makefile.in (OBJ): Add event-loop.o.
2133 (event-loop.o): New rule.
2134
2135 * linux-low.h (pid_of): Moved here.
2136 (lwpid_of): New.
2137 (get_lwp_thread): Use lwpid_of.
2138 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2139 * linux-low.c (pid_of): Delete.
2140 (inferior_pid): Use lwpid_of.
2141 (linux_event_pipe): New.
2142 (target_is_async_p): New.
2143 (delete_lwp): New.
2144 (handle_extended_wait): Use lwpid_of.
2145 (add_lwp): Don't set lwpid field.
2146 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2147 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2148 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2149 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2150 first. Adjust to linux_wait_for_event interface changes. Use
2151 lwpid_of.
2152 (linux_detach): Don't delete the main lwp here.
2153 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2154 (status_pending_p): Don't consider explicitly suspended lwps.
2155 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2156 pointer. Add OPTIONS argument. Change return type to int. Use
2157 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2158 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2159 pointer. Add status pointer argument. Return a pid instead of a
2160 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2161 changes. In non-stop mode, don't switch to a random thread.
2162 (linux_wait): Rename to...
2163 (linux_wait_1): ... this. Add target_options argument, and handle
2164 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2165 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2166 clean exit and signal exit code. Don't stop all threads in
2167 non-stop mode. In all-stop mode, only stop all threads when
2168 reporting a stop to GDB. Handle explicit thread stop requests.
2169 (async_file_flush, async_file_mark): New.
2170 (linux_wait): New.
2171 (send_sigstop): Use lwpid_of.
2172 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2173 interface changes. In non-stop mode, don't switch to a random
2174 thread.
2175 (linux_resume_one_lwp): Use lwpid_of.
2176 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2177 (linux_resume_one_thread): ... this. Handle resume_stop. In
2178 non-stop mode, don't look for pending flag in all threads.
2179 (resume_status_pending_p): Don't consider explicitly suspended
2180 threads.
2181 (my_waitpid): Reimplement. Emulate __WALL.
2182 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2183 Use lwpid_of.
2184 (sigchld_handler, linux_supports_non_stop, linux_async)
2185 (linux_start_non_stop): New.
2186 (linux_target_ops): Register linux_supports_non_stop, linux_async
2187 and linux_start_non_stop.
2188 (initialize_low): Install SIGCHLD handler.
2189 * thread-db.c (thread_db_create_event, find_one_thread)
2190 (thread_db_get_tls_address): Use lwpid_of.
2191 * win32-low.c (win32_detach): Adjust to use resume_kind.
2192 (win32_wait): Add `options' argument.
2193 * spu-low.c (spu_resume): Adjust to use resume_kind.
2194 (spu_wait): Add `options' argument.
2195
5b1c542e
PA
21962009-04-01 Pedro Alves <pedro@codesourcery.com>
2197
2198 Decouple target code from remote protocol.
2199
2200 * target.h (enum target_waitkind): New.
2201 (struct target_waitstatus): New.
2202 (struct target_ops) <wait>: Return an unsigned long. Take a
2203 target_waitstatus pointer instead of a char pointer.
2204 (mywait): Likewise.
2205 * target.c (mywait): Change prototype to return an unsigned long.
2206 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2207 * server.h (thread_from_wait, old_thread_from_wait): Delete
2208 declarations.
2209 (prepare_resume_reply): Change prototype to take a
2210 target_waitstatus.
2211 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2212 (last_status, last_ptid): New.
2213 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2214 pid instead of a signal.
2215 (attach_inferior): Remove "status" and "signal" parameters.
2216 Adjust.
2217 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2218 not as an address.
2219 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2220 (handle_v_requests, myresume): Remove "status" and "signal"
2221 parameters. Adjust.
2222 (handle_status): New.
2223 (main): Delete local `status'. Adjust.
2224 * remote-utils.c: Include target.h.
2225 (prepare_resume_reply): Change prototype to take a
2226 target_waitstatus. Adjust.
2227
2228 * linux-low.c (linux_wait): Adjust to new target_ops->wait
2229 interface.
2230 * spu-low.c (spu_wait): Adjust.
2231 * win32-low.c (enum target_waitkind, struct target_waitstatus):
2232 Delete.
2233 (win32_wait): Adjust.
2234
2bd7c093
PA
22352009-04-01 Pedro Alves <pedro@codesourcery.com>
2236
2237 * target.h (struct thread_resume): Delete leave_stopped member.
2238 (struct target_ops): Add a `n' argument to the `resume' callback.
2239 * server.c (start_inferior): Adjust.
2240 (handle_v_cont, myresume): Adjust.
2241 * linux-low.c (check_removed_breakpoint): Adjust to resume
2242 interface change, and to removed leave_stopped field.
2243 (resume_ptr): Delete.
2244 (struct thread_resume_array): New.
2245 (linux_set_resume_request): Add new `arg' parameter. Adjust to
2246 resume interface change.
2247 (linux_continue_one_thread, linux_queue_one_thread)
2248 (resume_status_pending_p): Check if the resume field is NULL
2249 instead of checking the leave_stopped member.
2250 (linux_resume): Adjust to the target resume interface change.
2251 * spu-low.c (spu_resume): Adjust to the target resume interface
2252 change.
2253 * win32-low.c (win32_detach, win32_resume): Ditto.
2254
c35fafde
PA
22552009-04-01 Pedro Alves <pedro@codesourcery.com>
2256
2257 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
2258 flag.
2259 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
2260 pending.
2261 (linux_continue_one_thread): Only preserve the stepping flag if
2262 there's a pending breakpoint.
2263
0a59d50b
PA
22642009-03-31 Pedro Alves <pedro@codesourcery.com>
2265
2266 * server.c (main): After the inferior having exited, call
2267 remote_close before exiting gdbserver.
2268
f04c6d38
TJB
22692009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
2270
2271 Fix size of FPSCR in Power 7 processors.
2272 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
2273 (PPC_FEATURE_HAS_DFP): New #define.
2274 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
2275 size of the FPSCR.
2276
78e5cee6
PA
22772009-03-23 Pedro Alves <pedro@codesourcery.com>
2278
2279 * server.c (handle_query) Whitespace and formatting.
2280
1b3f6016
PA
22812009-03-22 Pedro Alves <pedro@codesourcery.com>
2282
2283 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2284 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2285 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2286 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2287 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2288 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2289 Makefile.in, configure.ac: Fix whitespace throughout.
2290 * configure: Regenerate.
2291
a07b2135
PA
22922009-03-22 Pedro Alves <pedro@codesourcery.com>
2293
2294 * inferiors.c (find_inferior): Make it safe for the callback
2295 function to delete the currently iterated inferior.
2296
67cc2626
PA
22972009-03-22 Pedro Alves <pedro@codesourcery.com>
2298
2299 * Makefile.in (linuw_low_h): Move higher.
2300 (thread-db.o): Depend on $(linux_low_h).
2301
54a0b537
PA
23022009-03-17 Pedro Alves <pedro@codesourcery.com>
2303
2304 Rename "process" to "lwp" throughout.
2305
2306 * linux-low.c (all_processes): Rename to...
2307 (all_lwps): ... this.
2308 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2309 (add_process): Rename to ...
2310 (add_lwp): ... this. Adjust.
2311 (linux_create_inferior): Adjust.
2312 (linux_attach_lwp): Adjust.
2313 (linux_attach): Adjust.
2314 (linux_kill_one_process): Rename to ...
2315 (linux_kill_one_lwp): ... this. Adjust.
2316 (linux_kill): Adjust.
2317 (linux_detach_one_process): Rename to ...
2318 (linux_detach_one_lwp): ... this. Adjust.
2319 (linux_detach): Adjust.
2320 (check_removed_breakpoint): Adjust.
2321 (status_pending_p): Adjust.
2322 (linux_wait_for_process): Rename to ...
2323 (linux_wait_for_lwp): ... this. Adjust.
2324 (linux_wait_for_event): Adjust.
2325 (send_sigstop): Adjust.
2326 (wait_for_sigstop): Adjust.
2327 (stop_all_processes): Rename to ...
2328 (stop_all_lwps): ... this.
2329 (linux_resume_one_process): Rename to ...
2330 (linux_resume_one_lwp): ... this. Adjust.
2331 (linux_set_resume_request, linux_continue_one_thread)
2332 (linux_queue_one_thread, resume_status_pending_p)
2333 (usr_store_inferior_registers, regsets_store_inferior_registers)
2334 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2335 Adjust.
2336 * linux-low.h (get_process): Rename to ...
2337 (get_lwp): ... this. Adjust.
2338 (get_thread_process): Rename to ...
2339 (get_thread_lwp): ... this. Adjust.
2340 (get_process_thread): Rename to ...
2341 (get_lwp_thread): ... this. Adjust.
2342 (struct process_info): Rename to ...
2343 (struct lwp_info): ... this.
2344 (all_processes): Rename to ...
2345 (all_lwps): ... this.
2346 * proc-service.c (ps_lgetregs): Adjust.
2347 * thread-db.c (thread_db_create_event, find_one_thread)
2348 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2349
0b16c5cf
PA
23502009-03-14 Pedro Alves <pedro@codesourcery.com>
2351
2352 * server.c (handle_query): Handle "qAttached".
2353
32de4b9d
NS
23542009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2355
2356 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2357 GPLv3, update license URL.
2358
2aecd87f
DE
23592009-03-01 Doug Evans <dje@google.com>
2360
93efd302 2361 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
2362 (server_h): Add gdb_signals.h.
2363 (signals.o): Update.
2364 * server.h (target_signal_from_host,target_signal_to_host_p)
2365 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2366
86b1f9c5
PM
23672009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2368
2369 * remote-utils.c (getpkt): Also generate remote-debug
2370 information if noack_mode is set.
2371
4aa995e1
PA
23722009-02-06 Pedro Alves <pedro@codesourcery.com>
2373
2374 * server.c (handle_query): Report qXfer:siginfo:read and
2375 qXfer:siginfo:write as supported and handle them.
2376 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2377 * linux-low.c (linux_xfer_siginfo): New.
2378 (linux_target_ops): Set it.
2379
62709adf
PA
23802009-01-26 Pedro Alves <pedro@codesourcery.com>
2381
2382 * server.c (gdbserver_usage): Mention --remote-debug.
2383 (main): Accept '--remote-debug' switch.
2384
aef93bd7
DE
23852009-01-18 Doug Evans <dje@google.com>
2386
2387 * regcache.c (new_register_cache): No need to check result of xcalloc.
2388 * server.c (handle_search_memory): Back out calls to xmalloc,
2389 result is checked and error is returned to user upon failure.
2390 (handle_query): Ditto. Add more checks for result of malloc.
2391 (handle_v_cont): Check result of malloc, report error back to
2392 user upon failure.
2393 (handle_v_run): Ditto. Call freeargv.
2394 * server.h (freeargv): Declare.
2395 * utils.c (freeargv): New fn.
2396
54363045
DE
23972009-01-15 Doug Evans <dje@google.com>
2398
f626972c
DE
2399 * gdbreplay.c (perror_with_name): Make arg const char *.
2400 * server.h (target_signal_to_name): Make return type const char *.
0842e787 2401 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 2402 * utils.c (perror_with_name): Make arg const char *.
54363045 2403
18aae699
PA
24042009-01-14 Pedro Alves <pedro@codesourcery.com>
2405
2406 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2407 when handling a EXIT_PROCESS_DEBUG_EVENT.
2408
ff703abe
JB
24092009-01-06 Joel Brobecker <brobecker@adacore.com>
2410
2411 * gdbreplay.c (gdbreplay_version): Update copyright year.
2412 * server.c (gdbserver_version): Likewise.
2413
f21cc1a2 24142009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
2415
2416 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 2417 (handle_extended_wait): Improve comment.
0e21c1ec 2418
bca929d3
DE
24192008-12-13 Doug Evans <dje@google.com>
2420
2421 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2422 * server.h (ATTR_MALLOC): New macro.
2423 (xmalloc,xcalloc,xstrdup): Declare.
2424 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2425 * inferiors.c: Ditto.
2426 * linux-low.c: Ditto.
2427 * mem-break.c: Ditto.
2428 * regcache.c: Ditto.
2429 * remote-utils.c: Ditto.
2430 * server.c: Ditto.
2431 * target.c: Ditto.
2432 * win32-low.c: Ditto.
2433
97438e3f
DE
24342008-12-12 Doug Evans <dje@google.com>
2435
896c7fbb
DE
2436 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2437 in debugging printf.
2438
97438e3f
DE
2439 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2440
e3b886f8
DE
24412008-12-09 Doug Evans <dje@google.com>
2442
2443 * linux-low.h (struct process_info): Delete member tid, unused.
2444 * thread-db.c (find_one_thread): Update.
2445 (maybe_attach_thread): Update.
2446
07e059b5
VP
24472008-12-02 Pedro Alves <pedro@codesourcery.com>
2448
2449 * target.h (struct target_ops): Add qxfer_osdata member.
2450 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2451 and dirent.h.
2452 (linux_qxfer_osdata): New functions.
2453 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2454 callback.
2455 * server.c (handle_query): Handle "qXfer:osdata:read:".
2456 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2457 (buffer_xml_printf): New functions.
2458 * server.h (struct buffer): New.
2459 (buffer_grow_str, buffer_grow_str0): New macros.
2460 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2461 (buffer_xml_printf): Declare.
2462
4cab47ab
DE
24632008-11-24 Doug Evans <dje@google.com>
2464
2465 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2466
f142445f
DJ
24672008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2468
2469 * server.c (handle_v_run): Always use the supplied argument list.
2470
d0107bb6
BW
24712008-11-19 Bob Wilson <bob.wilson@acm.org>
2472
2473 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2474 (xtensa_regmap_table): Add entry for scompare1.
2475
2c4ad781
TJB
24762008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2477
2478 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2479 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2480 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2481 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2482 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2483 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2484 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2485 XML target descriptions.
2486 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2487 when inferior is running on an ISA 2.05 or later processor. Add
2488 special case to return offset for full 64-bit slot of FPSCR when
2489 in 32-bits.
2490
dfb64f85
DJ
24912008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2492
2493 * Makefile.in (SFILES, clean): Added sparc64 files.
2494 (reg-sparc64.o, reg-sparc64.c): New.
2495 * configure.srv (sparc*-*-linux*): New configuration.
2496 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2497 syscall arguments for SPARC.
2498 (regsets_store_inferior_registers): Likewise.
2499 * linux-sparc-low.c: New file.
2500
66b6e1dd
DE
25012008-10-21 Doug Evans <dje@google.com>
2502
2503 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2504 (READLINE_DIR,READLINE_DEP): Delete.
2505 (INTERNAL_CFLAGS): Update.
2506 (LINTFLAGS): Update.
2507
9b710a42
PA
25082008-10-10 Pedro Alves <pedro@codesourcery.com>
2509
2510 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2511 whole argv from the last run, not just argv[0].
2512
5822d809
PA
25132008-09-08 Pedro Alves <pedro@codesourcery.com>
2514
2515 * regcache.c (new_register_cache): Return NULL if the register
2516 cache size isn't known yet.
2517 (free_register_cache): Avoid dereferencing a NULL regcache.
2518
74aac56f
DJ
25192008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2520
2521 * configure.srv: Merge MIPS and MIPS64.
2522
400b20f5
MR
25232008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2524
2525 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2526
677c5bb1
LM
25272008-08-18 Luis Machado <luisgpm@br.ibm.com>
2528
2529 * Makefile.in: Add required vsx dependencies.
2530
2531 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2532 Declare init_registers_powerpc_vsx32l.
2533 Declare init_registers_powerpc_vsx64l.
2534 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2535 (ppc_arch_setup): Check for VSX in hwcap.
2536 (ppc_fill_vsxregset): New function.
2537 (ppc_store_vsxregset): New function.
2538 Add new VSX entry in regset_info target_regsets.
2539
2540 * configure.srv: Add new VSX dependencies.
2541
a6f3e723
SL
25422008-08-12 Pedro Alves <pedro@codesourcery.com>
2543
2544 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2545 (remote_open): Set or clear transport_is_reliable.
2546 (putpkt_binary): Don't expect acks in noack mode.
2547 (getpkt): Don't send ack/nac in noack mode.
2548 * server.c (handle_general_set): Handle QStartNoAckMode.
2549 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2550 qSupported.
2551 (main): Reset noack_mode on every connection.
2552 * server.h (noack_mode): Declare.
2553
a417dc56
RW
25542008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2555
2556 * Makefile.in (GDBREPLAY_OBS): New variable.
2557 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2558
3221518c
UW
25592008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2560 Daniel Jacobowitz <dan@codesourcery.com>
2561
2562 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2563 (usr_store_inferior_registers): Likewise.
2564 (regsets_store_inferior_registers): Likewise.
2565
ec56be1b
PA
25662008-07-31 Rolf Jansen <rj@surtec.com>
2567 Pedro Alves <pedro@codesourcery.com>
2568
2569 * configure.ac: Check for memmem declaration.
2570 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2571 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2572 (disable_packet_qfThreadInfo): Unconditionally compile.
2573 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2574 * configure, config.in: Regenerate.
2575
2fe5e3ff
DE
25762008-07-28 Doug Kwan <dougkwan@google.com>
2577
2578 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2579 (linux_write_memory): Remove declaration of errno.
2580
836acd6d
UW
25812008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2582
2583 * linux-low.c (handle_extended_wait): Do not use "status"
2584 variable uninitialized.
2585
aeba519e
PA
25862008-07-07 Pedro Alves <pedro@codesourcery.com>
2587
2588 * server.c (handle_v_attach): Inhibit reporting dll changes.
2589
db42f210
PA
25902008-06-27 Pedro Alves <pedro@codesourcery.com>
2591
2592 * remote-utils.c (prepare_resume_reply): If requested, don't
2593 output "thread:TID" in the T stop reply.
2594
2595 * server.c (disable_packet_vCont, disable_packet_Tthread)
2596 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2597 (handle_query): If requested, disable support for qC, qfThreadInfo
2598 and qsThreadInfo.
2599 (handle_v_requests): If requested, disable support for vCont.
2600 (gdbserver_show_disableable): New.
2601 (main): Handle --disable-packet and --disable-packet=LIST.
2602
2603 * server.h (disable_packet_vCont, disable_packet_Tthread)
2604 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2605
8e4c5421
CD
26062008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2607
2608 * server.c (gdbserver_usage): Mention --version.
2609
6e23a804
DJ
26102008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2611
2612 * Makefile.in (gdbreplay.o): New rule.
2613
90aa6a40
JM
26142008-06-06 Joseph Myers <joseph@codesourcery.com>
2615
2616 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2617 message, not gdbserver.
2618
c16158bc
JM
26192008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2620 Nathan Sidwell <nathan@codesourcery.com>
2621 Joseph Myers <joseph@codesourcery.com>
2622
2623 * acinclude.m4: Include ../../config/acx.m4.
2624 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2625 * configure, config.in: Regenerate.
2626 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2627 * server.c (gdbserver_version): Print PKGVERSION.
2628 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2629 (main): Adjust gdbserver_usage calls.
2630 * gdbreplay.c (version, host_name): Add declarations.
2631 (gdbreplay_version, gdbreplay_usage): New.
2632 (main): Accept --version and --help options.
2633
aeb75bf5
DJ
26342008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2635
2636 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2637 (arm_breakpoint_at): Handle Thumb.
2638 (the_low_target): Add comment.
2639
76b233dd
UW
26402008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2641
2642 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2643
08388c79
DE
26442008-05-09 Doug Evans <dje@google.com>
2645
a3c83fae
DE
2646 * server.h (decode_search_memory_packet): Declare.
2647 * remote-utils.c (decode_search_memory_packet): New fn.
2648 * server.c (handle_search_memory_1): New fn.
08388c79
DE
2649 (handle_search_memory): New fn.
2650 (handle_query): Process qSearch:memory packets.
2651
bb9c3d36
UW
26522008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2653
2654 * regcache.c (registers_length): Remove.
2655 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2656 full register packet.
2657 * regcache.h (registers_length): Remove prototype.
2658 * server.h (PBUFSIZ): Define to 16384.
2659
7284e1be
UW
26602008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2661
2662 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2663 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2664 powerpc-64l.o, and powerpc-altivec64l.o.
2665 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2666 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2667 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2668 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2669 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2670 to srv_xmlfiles.
2671
2672 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2673 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2674 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2675 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2676 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2677 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2678 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2679 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2680 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2681 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2682 (clean): Update.
2683
2684 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2685 (init_registers_powerpc_32l): ... this new prototype.
2686 (init_registers_powerpc_32): Remove, replace by ...
2687 (init_registers_powerpc_altivec32l): ... this new prototype.
2688 (init_registers_powerpc_e500): Remove, replace by ...
2689 (init_registers_powerpc_e500l): ... this new prototype.
2690 (init_registers_ppc64): Remove, replace by ...
2691 (init_registers_powerpc_64l): ... this new prototype.
2692 (init_registers_powerpc_64): Remove, replace by ...
2693 (init_registers_powerpc_altivec64l): ... this new prototype.
2694 (ppc_num_regs): Set to 73.
2695 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2696 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2697 (ppc_cannot_store_register): Handle orig_r3 and trap.
2698 (ppc_arch_setup): Update init_registers_... calls.
2699 (ppc_fill_gregset): Handle orig_r3 and trap.
2700
2701 * inferiors.c (clear_inferiors): Reset current_inferior.
2702
fdc59709
PB
27032008-04-23 Paolo Bonzini <bonzini@gnu.org>
2704
2705 * acinclude.m4: Add override.m4.
2706 * configure: Regenerate.
2707
c9b2f845
UW
27082008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2709
2710 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2711 initial call to init_register_ppc64.
2712
550512b8
UW
27132008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2714
2715 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2716 powerpc*-*-linux* case.
2717 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2718
b6430ec3
UW
27192008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2720
2721 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2722 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2723 from reg_xmlfiles.
2724 * linux-ppc-low.c: Include <elf.h>.
2725 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2726 (ppc_hwcap): New global variable.
2727 (ppc_regmap): Remove __SPE__ #ifdef sections.
2728 (ppc_regmap_e500): New global variable.
2729 (ppc_cannot_store_register): Update __SPE__ special case.
2730 (ppc_get_hwcap): New function.
2731 (ppc_arch_setup): Use it to determine whether inferior supports
2732 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2733 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2734 Do not access registers if target does not support AltiVec.
2735 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2736 Do not access registers if target does not support SPE.
2737 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2738
52fa2412
UW
27392008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2740
2741 * linux-low.c (disabled_regsets, num_regsets): New.
2742 (use_regsets_p): Delete.
2743 (linux_wait_for_process): Clear disabled_regsets.
2744 (regsets_fetch_inferior_registers): Check and set it.
2745 (regsets_store_inferior_registers): Likewise.
2746 (linux_fetch_registers, linux_store_registers): Do not use
2747 use_regsets_p.
2748 (initialize_low): Allocate disabled_regsets.
2749
e28b3332
DJ
27502008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2751
2752 * Makefile.in (LIBOBJS): New.
2753 (OBS): Use LIBOBJS.
2754 (memmem.o): New rule.
2755 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2756 * configure: Regenerated.
2757
4536995d
UW
27582008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2759
2760 * server.c (handle_query): Never return "unsupported" for
2761 qXfer:features:read queries.
2762
221c031f
UW
27632008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2764
2765 * server.c (get_features_xml): Fix inverted condition.
2766 (handle_query): Always support qXfer:feature:read.
2767
ccd213ac
DJ
27682008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2769
2770 * server.c (wrapper_argv): New.
2771 (start_inferior): Handle wrapper_argv. If set, expect an extra
2772 trap.
2773 (gdbserver_usage): Document --wrapper.
2774 (main): Parse --wrapper.
2775
6fe305f7
UW
27762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2777
2778 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2779 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2780 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2781 (ppc_set_pc): Likewise.
2782 (ppc_arch_setup): New function.
2783 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2784 of collect_register.
2785 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2786
5b0a002e
UW
27872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2788
2789 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2790 instead of linux-ppc64-low.o.
2791 * linux-ppc64-low.c: Remove file.
2792 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2793 (linux-ppc64-low.o): Remove rule.
2794
2795 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2796 (init_registers_powerpc_64): Likewise.
2797 (ppc_regmap): Conditionally define depending on __powerpc64__.
2798 (ppc_cannot_store_register): Do not special-case "fpscr" when
2799 compiled on __powerpc64__.
2800 (ppc_collect_ptrace_register): New function.
2801 (ppc_supply_ptrace_register): New function.
2802 (ppc_breakpoint): Change type to "unsigned int".
2803 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2804 (the_low_target): Conditionally provide initializers for the
2805 arch_setup member depending on __powerpc64__. Install
2806 collect_ptrace_register and supply_ptrace_register members.
2807
9b4b61c8
UW
28082008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2809
2810 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2811 * server.c (gdbserver_xmltarget): Define.
2812 (get_features_xml): Use it to replace "target.xml" and arch_string.
2813
2814 * configure.srv: Remove srv_xmltarget. Add XML files that were
2815 mentioned there to srv_xmlfiles instead. Remove conditional tests
2816 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2817 srv_xmlfiles and srv_regobj to include all possible choices.
2818 * configure.ac (srv_xmltarget): Remove.
2819 (srv_xmlfiles): Do not add "target.xml".
2820 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2821 checks for supplementary target information.
2822 * configure: Regenerate.
2823 * Makefile.in (XML_TARGET): Remove.
2824 (target.xml): Remove rule.
2825 (clean): Do not clean up target.xml.
2826 (.PRECIOUS): Do not mention target.xml.
2827
2828 * target.h (struct target_ops): Remove arch_string member.
2829 * linux-low.c (linux_arch_string): Remove.
2830 (linux_target_ops): Remove arch_string initializer.
2831 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2832 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2833 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2834 * spu-low.c (spu_arch_string): Remove.
2835 (spu_target_ops): Remove arch_string initializer.
2836 * win32-low.c (win32_arch_string): Remove.
2837 (win32_target_ops): Remove arch_string initializer.
2838 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2839 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2840 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2841
ee1a7ae4
UW
28422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2843
2844 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2845 by collect_ptrace_register and supply_ptrace_register hooks.
2846 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2847 instead of checking for the_low_target.left_pad_xfer.
2848 (usr_store_inferior_registers): Use collect_ptrace_register callback
2849 instead of checking for the_low_target.left_pad_xfer.
2850
2851 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2852 (s390_supply_ptrace_register): Likewise.
2853 (s390_fill_gregset): Call s390_collect_ptrace_register.
2854 (the_low_target): Update.
2855
2856 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2857 (ppc_supply_ptrace_register): Likewise.
2858 (the_low_target): Update.
2859
2860 * linux-i386-low.c (the_low_target): Update.
2861 * linux-x86-64-low.c (the_low_target): Update.
2862
d61ddec4
UW
28632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2864
2865 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2866 reg-s390.o and reg-s390x.o.
2867
2868 * linux-low.c (new_inferior): New global variable.
2869 (linux_create_inferior, linux_attach): Set it.
2870 (linux_wait_for_process): Call the_low_target.arch_setup after the
2871 target has stopped for the first time.
2872 (initialize_low): Do not call the_low_target.arch_setup.
2873
2874 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2875 (s390_set_pc): Likewise.
2876 (s390_arch_setup): New function.
2877 (the_low_target): Use s390_arch_setup as arch_setup routine.
2878
2879 * regcache.c (realloc_register_cache): New function.
2880 (set_register_cache): Call it for each existing regcache.
2881
d05b4ac3
UW
28822008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2883
2884 * server.h (init_registers): Remove prototype.
2885
2886 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2887 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2888 instead of init_registers ().
2889 * linux-arm-low.c (init_registers_arm): Add prototype.
2890 (init_registers_arm_with_iwmmxt): Likewise.
2891 (the_low_target): Add initializer for arch_setup field.
2892 * linux-cris-low.c (init_registers_cris): Add prototype.
2893 (the_low_target): Add initializer for arch_setup field.
2894 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2895 (the_low_target): Add initializer for arch_setup field.
2896 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2897 (the_low_target): Add initializer for arch_setup field.
2898 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2899 (the_low_target): Add initializer for arch_setup field.
2900 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2901 (the_low_target): Add initializer for arch_setup field.
2902 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2903 (the_low_target): Add initializer for arch_setup field.
2904 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2905 (init_registers_mips64_linux): Likewise.
2906 (the_low_target): Add initializer for arch_setup field.
2907 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2908 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2909 (the_low_target): Add initializer for arch_setup field.
2910 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2911 (init_registers_powerpc_64): Likewise.
2912 (the_low_target): Add initializer for arch_setup field.
2913 * linux-s390-low.c (init_registers_s390): Add prototype.
2914 (init_registers_s390x): Likewise.
2915 (the_low_target): Add initializer for arch_setup field.
2916 * linux-sh-low.c (init_registers_sh): Add prototype.
2917 (the_low_target): Add initializer for arch_setup field.
2918 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2919 (the_low_target): Add initializer for arch_setup field.
2920 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2921 (the_low_target): Add initializer for arch_setup field.
2922
2923 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2924 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2925 instead of init_registers ().
2926 * win32-arm-low.c (init_registers_arm): Add prototype.
2927 (the_low_target): Add initializer for arch_setup field.
2928 * win32-i386-low.c (init_registers_i386): Add prototype.
2929 (the_low_target): Add initializer for arch_setup field.
2930
2931 * spu-low.c (init_registers_spu): Add prototype.
2932 (initialize_low): Call initialie_registers_spu () instead of
2933 initialize_registers ().
2934
fd96d250
PA
29352008-02-19 Pedro Alves <pedro@codesourcery.com>
2936
2937 * server.c (handle_v_requests): When handling the vRun and vAttach
2938 packets, if already debugging a process, don't kill it. Return an
2939 error instead.
2940
d41b6bb4
DJ
29412008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2942
2943 * server.c (handle_query): Correct length check.
2944
5ac588cf
PA
29452008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2946
2947 * win32-low.c (do_initial_child_stuff): Add process handle
2948 parameter. Set current_process_handle and current_process_id from the
2949 parameters. Clear globals.
2950 (win32_create_inferior): Don't set current_process_handle and
2951 current_process_id here. Instead pass them on the call to
2952 do_initial_child_stuff.
2953 (win32_attach): Likewise.
2954 (win32_clear_inferiors): New.
2955 (win32_kill): Don't close the current process handle or the
2956 current thread handle here. Instead call win32_clear_inferiors.
2957 (win32_detach): Don't open a new handle to the process. Call
2958 win32_clear_inferiors.
2959 (win32_join): Don't rely on current_process_handle; open a new
2960 handle using the process id.
2961 (win32_wait): Call win32_clear_inferiors when the inferior process
2962 has exited.
2963
ecd7ecbc
DJ
29642008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2965
2966 * server.c (monitor_show_help): Add "exit".
2967
1525d545
MG
29682008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2969
ecd7ecbc 2970 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
2971 (clean): Add reg-xtensa.c.
2972 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
2973 * configure.srv (xtensa*-*-linux*) New target.
2974 * linux-xtensa-low.c: New.
2975 * xtensa-xtregs.c: New.
1525d545 2976
59a016f0
PA
29772008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2978
2979 * hostio.c: Don't include errno.h.
2980 (errno_to_fileio_errno): Move to hostio-errno.
2981 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2982 error number outputting to the target->hostio_last_error callback.
2983 (hostio_packet_error): Use FILEIO_EINVAL directly.
2984 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2985 calls to hostio_error.
2986 * hostio-errno.c: New.
2987 * server.h (hostio_last_error_from_errno): Declare.
2988 * target.h (target_ops): Add hostio_last_error member.
2989 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2990 as hostio_last_error handler.
2991 * spu-low.c (spu_target_ops): Likewise.
2992 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2993 (wince_hostio_last_error): New functions.
2994 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2995 as hostio_last_error handler.
2996 (win32_target_ops) [!_WIN32_WCE]: Register
2997 hostio_last_error_from_errno as hostio_last_error handler.
2998 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2999 (hostio-errno.o): New rule.
3000 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3001 * configure.srv (srv_hostio_err_objs): New variable. Default to
3002 hostio-errno.o.
3003 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3004 * configure: Regenerate.
3005
2d717e4f
DJ
30062008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3007
3008 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3009 (linux_kill, linux_detach): Clean up the process list.
3010 * remote-utils.c (remote_open): Improve port number parsing.
3011 (putpkt_binary, input_interrupt): Only send interrupts if the target
3012 is running.
3013 * server.c (extended_protocol): Make static.
3014 (attached): Define earlier.
3015 (exit_requested, response_needed, program_argv): New variables.
3016 (target_running): New.
3017 (start_inferior): Clear attached here.
3018 (attach_inferior): Set attached here.
3019 (require_running): Define.
3020 (handle_query): Use require_running and target_running. Implement
3021 "monitor exit".
3022 (handle_v_attach, handle_v_run): New.
3023 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3024 (gdbserver_usage): Update.
3025 (main): Redo argument parsing. Handle --debug and --multi. Handle
3026 --attach along with other options or after the port. Save
3027 program_argv. Support no initial program. Resynchronize
3028 communication with GDB after an error. Handle "monitor exit".
3029 Use require_running and target_running. Always allow the extended
3030 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3031 restart in extended mode.
3032 * README: Refer to the GDB manual. Update --attach usage.
3033
7407e2de
AS
30342007-12-20 Andreas Schwab <schwab@suse.de>
3035
3036 * linux-low.c (STACK_SIZE): Define.
3037 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3038 (linux_test_for_tracefork): Likewise.
3039
b65d95c5
DJ
30402007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3041
3042 * linux-low.c (linux_wait_for_event): Update messages. Do not
3043 reinsert auto-delete breakpoints.
3044 * mem-break.c (struct breakpoint): Change return type of handler to
3045 int.
3046 (set_breakpoint_at): Update handler type.
3047 (reinsert_breakpoint_handler): Return 1 instead of calling
3048 delete_breakpoint.
3049 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3050 setting a new one.
3051 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3052 * mem-break.h (set_breakpoint_at): Update handler type.
3053 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3054 * win32-low.c (auto_delete_breakpoint): New.
3055 (get_child_debug_event): Use it.
3056
4e799345
DJ
30572007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3058
3059 * configure.ac: Check for pread and pwrite.
3060 * hostio.c (handle_pread): Fall back to lseek and read.
3061 (handle_pwrite): Fall back to lseek and write.
3062 * config.in, configure: Regenerated.
3063
27524b67
DJ
30642007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3065
3066 * server.c (myresume): Add own_buf argument.
3067 (main): Update calls.
3068
a20d5e98
DJ
30692007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3070
3071 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3072 * remote-utils.c (remote_open): Do not call disable_async_io.
3073 (block_async_io): Delete.
3074 (unblock_async_io): Make static.
3075 (initialize_async_io): New.
3076 * server.c (handle_v_cont): Handle async I/O here.
3077 (myresume): Likewise. Move other common resume tasks here...
3078 (main): ... from here. Call initialize_async_io. Disable async
3079 I/O before the main loop.
3080 * server.h (initialize_async_io): Declare.
3081 (block_async_io, unblock_async_io): Delete prototypes.
3082 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3083
b79d787e
DJ
30842007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3085
3086 * remote-utils.c (readchar): Allow binary data in received messages.
3087
d97903b2
PA
30882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3089
3090 * win32-low.c (attaching): New global.
3091 (win32_create_inferior): Clear the `attaching' global.
3092 (win32_attach): Set the `attaching' global.
3093 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3094 attaching. Only set a breakpoint at the entry point if not
3095 attaching.
3096
311de423
PA
30972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3098
3099 * server.c (main): Don't report dll events on the initial
3100 connection on attaches.
3101
6c2d16d2
PA
31022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3103
3104 * server.c (main): Relax numerical bases supported for the pid of
3105 the --attach command line argument.
3106
5ca906e6
PA
31072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3108
3109 * win32-low.c (win32_attach): Call OpenProcess before
3110 DebugActiveProcess, not after. Add last error output to error
3111 call.
3112
9c6c8194
PA
31132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3114
3115 * win32-low.c (win32_get_thread_context)
3116 (win32_set_thread_context): New functions.
3117 (thread_rec): Use win32_get_thread_context.
3118 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3119 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3120 field.
3121
4d5d1aaa
PA
31222007-12-03 Leo Zayas
3123 Pedro Alves <pedro_alves@portugalmail.pt>
3124
3125 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3126 global variables.
3127 (child_add_thread): Minor cleanup.
3128 (child_continue): Resume artificially suspended threads before
3129 calling ContinueDebugEvent.
3130 (suspend_one_thread): New.
3131 (fake_breakpoint_event): New.
3132 (get_child_debug_event): Change return type to int. Check here if
3133 gdb sent an interrupt request. If a soft interrupt was requested,
3134 fake a breakpoint event. Return 0 if there is no event to handle,
3135 and 1 otherwise.
3136 (win32_wait): Don't check here if gdb sent an interrupt request.
3137 Ensure there is a valid event to handle.
3138 (win32_request_interrupt): Add soft interruption method as last
3139 resort.
3140
c436e841
PA
31412007-12-03 Leo Zayas
3142 Pedro Alves <pedro_alves@portugalmail.pt>
3143
3144 * win32-low.h (win32_thread_info): Add descriptions to the
3145 structure members. Replace `suspend_count' counter by a
3146 `suspended' flag.
3147 * win32-low.c (thread_rec): Update condition of when to get the
3148 context from the inferior. Rely on ContextFlags being set if it
3149 has already been retrieved. Only suspend the inferior thread if
3150 we haven't already. Warn if that fails.
3151 (continue_one_thread): s/suspend_count/suspended/. Only call
3152 ResumeThread once. Warn if that fails.
3153
e7b5fa67
PA
31542007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3155
3156 * win32-low.c (win32_wait): Don't read from the inferior when it
3157 has already exited.
3158
a385171d
PA
31592007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3160
3161 * Makefile.in (win32_low_h): New variable.
3162 (win32-low.o): Add dependency on $(win32_low_h).
3163 (win32-arm-low.o, win32-i386-low.o): New rules.
3164
f80c84b3
DJ
31652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3166
3167 * hostio.c: Correct copyright year.
3168
a6b151f1
DJ
31692007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3170
3171 * Makefile.in (OBS): Add hostio.o.
3172 (hostio.o): New rule.
3173 * server.h (handle_vFile): Declare.
3174 * hostio.c: New file.
3175 * server.c (handle_v_requests): Take packet_len and new_packet_len
3176 for binary packets. Call handle_vFile.
3177 (main): Update call to handle_v_requests.
3178
f9387fc3
DJ
31792007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3180
3181 * linux-low.c: Include <sched.h>.
3182
51c2684e
DJ
31832007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3184
3185 * linux-low.c (linux_tracefork_grandchild): New.
3186 (linux_tracefork_child): Use clone.
3187 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3188
75f83163
JB
31892007-10-31 Joel Brobecker <brobecker@adacore.com>
3190
3191 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3192
da5898ce
DJ
31932007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3194
3195 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3196
24a09b5f
DJ
31972007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3198
3199 * inferiors.c (change_inferior_id): Delete.
3200 (add_pid_to_list, pull_pid_from_list): New.
3201 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3202 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3203 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3204 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3205 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3206 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3207 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3208 (using_threads): Always set to 1.
3209 (handle_extended_wait): New.
3210 (add_process): Do not set TID.
3211 (linux_create_inferior): Set must_set_ptrace_flags.
3212 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3213 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3214 (linux_thread_alive): Rename TID argument to LWPID.
3215 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3216 (linux_wait_for_event): Do not use TID or check using_threads. Update
3217 call to dead_thread_notify. Call handle_extended_wait.
3218 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3219 (send_sigstop): Delete sigstop_sent.
3220 (wait_for_sigstop): Avoid TID.
3221 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3222 (linux_test_for_tracefork): New.
3223 (linux_lookup_signals): Use thread_db_active and
3224 linux_supports_tracefork_flag.
3225 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3226 * linux-low.h (get_process_thread): Avoid TID.
3227 (struct process_ifo): Move thread_known and tid to the end. Remove
3228 sigstop_sent.
3229 (linux_attach_lwp, thread_db_init): Update prototypes.
3230 * server.h (change_inferior_id): Delete prototype.
3231 (add_pid_to_list, pull_pid_from_list): New prototypes.
3232 * thread-db.c (thread_db_use_events): New.
3233 (find_first_thread): Rename to...
3234 (find_one_thread): ...this. Update callers and messages. Do not
3235 call fatal. Check thread_db_use_events. Do not call
3236 change_inferior_id or new_thread_notify.
3237 (maybe_attach_thread): Update. Do not call new_thread_notify.
3238 (thread_db_init): Set thread_db_use_events. Check use_events.
3239 * utils.c (fatal, warning): Correct message prefix.
3240
30ed0a8f
DJ
32412007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
3242
3243 * Makefile.in (clean): Remove new files.
3244 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3245 (powerpc-64.o, powerpc-64.c): New rules.
3246 * configure.srv: Use alternate register sets for powerpc64-*-linux*
3247 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3248 with SPE.
3249 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3250 SPE targets.
3251 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3252 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3253 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3254 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
3255 (target_regsets): Add AltiVec and SPE register sets.
3256 * configure.ac: Check for AltiVec and SPE.
3257 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
3258 (ppc_fill_vrregset, ppc_store_vrregset): New.
3259 (target_regsets): Add AltiVec register set.
3260 * configure: Regenerated.
3261
fd462a61
DJ
32622007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3263
3264 * linux-low.c (O_LARGEFILE): Define.
3265 (linux_read_memory): Use /proc/PID/mem.
3266 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
3267 * configure, config.in: Regenerated.
3268
69f223ed
DJ
32692007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3270
3271 * linux-low.c (linux_wait_for_event): Do not pass signals while
3272 single-stepping.
3273
aec18585
PA
32742007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3275
3276 * win32-low.c (create_process): New.
3277 (win32_create_inferior): Use create_process instead of
3278 CreateProcess. If create_process failed retry appending an ".exe"
3279 suffix. Store the GetLastError result immediatelly after
3280 create_process calls and use it on the call to error.
3281
34d86ddd
PA
32822007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3283
3284 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3285
5a0e3bd0
JB
32862007-08-23 Joel Brobecker <brobecker@adacore.com>
3287
3288 * configure.ac: Switch license to GPLv3.
3289
f88c79e6
MS
32902007-08-01 Michael Snyder <msnyder@access-company.com>
3291
3292 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3293
6b3d9b83
PA
32942007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3295
3296 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3297 typedef.
3298 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3299 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3300 CloseToolhelp32Snapshot.
3301 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3302 CloseToolhelp32Snapshot.
3303
c588c53c
MS
33042007-07-27 Michael Snyder <michael.snyder@access-company.com>
3305
3306 * server.c (main): Check for inferior exit before main loop.
3307
aa0403d9
PA
33082007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3309
3310 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3311 instead of on tmp_desc.
3312
255e7678
DJ
33132007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3314 Daniel Jacobowitz <dan@codesourcery.com>
3315
3316 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3317 (add_thread): Minor cleanups.
3318 (clear_inferiors): Move lower in the file. Clear the DLL
3319 list.
3320 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3321 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3322 (xml_escape_text): New.
3323 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3324 for qSupported.
3325 (handle_v_cont): Report errors.
3326 (gdbserver_version): Update.
3327 (main): Correct size of own_buf. Do not report initial DLL events.
3328 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3329 (unloaded_dll, xml_escape_text): New.
3330 * win32-low.c (enum target_waitkind): Update comments.
3331 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3332 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3333 (win32_EnumProcessModules, win32_GetModuleInformation)
3334 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3335 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3336 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3337 (win32_Module32First, win32_Module32Next, load_toolhelp)
3338 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3339 (get_child_debug_event): Handle DLL events.
3340 (win32_wait): Likewise.
3341
0d37add9
DJ
33422007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3343
3344 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3345 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3346
45e2715e
PA
33472007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3348
3349 * win32-low.c (handle_output_debug_string): Ignore event if not
3350 waiting.
3351
c5674cf1
PA
33522007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3353
3354 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3355
2bbe3cc1
DJ
33562007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3357
3358 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3359
ae13219e
DJ
33602007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3361
3362 * inferiors.c (change_inferior_id): Add comment.
3363 * linux-low.c (check_removed_breakpoint): Add an early
3364 prototype. Improve debug output.
3365 (linux_attach): Doc update.
3366 (linux_detach_one_process, linux_detach): Clean up before releasing
3367 each process.
3368 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3369 * linux-low.h (struct process_info): Doc improvement.
3370 * mem-break.c (delete_all_breakpoints): New.
3371 * mem-break.h (delete_all_breakpoints): New prototype.
3372 * thread-db.c (find_first_thread): New.
3373 (thread_db_create_event): Call it instead of
3374 thread_db_find_new_threads. Clean up unused variables.
3375 (maybe_attach_thread): Remove first thread handling.
3376 (thread_db_find_new_threads): Use find_first_thread.
3377 (thread_db_get_tls_address): Likewise.
3378
4105de34
DJ
33792007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3380
3381 * thread-db.c (thread_db_find_new_threads): Add prototype.
3382 (thread_db_create_event): Check for the main thread before adding
3383 a new thread.
3384 (maybe_attach_thread): Only enable event reporting if TID == 0.
3385 (thread_db_get_tls_address): Check for new threads.
3386
2b876972
DJ
33872007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3388
3389 * linux-low.c (linux_create_inferior): Try execv before execvp.
3390 * spu-low.c (spu_create_inferior): Likewise.
3391
7a245884
DJ
33922007-06-13 Mike Frysinger <vapier@gentoo.org>
3393
3394 * linux-low.c (linux_create_inferior): Change execv to execvp.
3395 * spu-low.c (spu_create_inferior): Likewies.
3396
117ce543
DJ
33972007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3398
3399 * Makefile.in (clean): Clean new files instead of deleted ones.
3400 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3401 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3402 rules.
3403 * configure.srv: Specify XML files and new regformats for MIPS and
3404 MIPS64 GNU/Linux.
3405 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3406 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3407 an entry for the restart register.
3408 (mips_cannot_fetch_register, mips_cannot_store_register)
3409 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3410 register names to match the XML descriptions.
3411 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3412 restart register instead of $0.
3413
0e7f50da
UW
34142007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3415 Markus Deuling <deuling@de.ibm.com>
3416
3417 * remote-utils.c (decode_xfer_write): New function.
3418 * server.h (decode_xfer_write): Add prototype.
3419 * server.c (handle_query): Add PACKET_LEN argument. Support
3420 qXfer:spu:read and qXfer:spu:write packets.
3421 (main): Pass packet_len to handle_query.
3422 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3423 * target.h (target_ops): Add qxfer_spu.
3424
374c1d38
UW
34252007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3426
3427 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3428 accessing non-seekable spufs files.
3429
bb63802a
UW
34302007-05-16 Markus Deuling <deuling@de.ibm.com>
3431
3432 * server.c (handle_query): Add reply for qC packet.
3433
7390519e
PA
34342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3435 Leo Zayas <lerele@champenstudios@com>
3436
3437 * server.h (check_remote_input_interrupt_request): New function.
3438 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3439 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3440 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3441 (check_remote_input_interrupt_request): New function.
3442 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 3443 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
3444 winapi_GenerateConsoleCtrlEvent): New typedefs.
3445 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3446 to 250 ms.
3447 (win32_wait): Check for remote interrupt request
3448 with check_remote_input_interrupt_request.
3449 (win32_request_interrupt): New function.
3450 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3451
34b34921
PA
34522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3453
3454 * win32-low.c (debug_registers_changed,
3455 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3456 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3457 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3458 (thread_rec): Get context using the low target.
3459 (child_add_thread): Call thread_added on the low target,
3460 which does the same thing.
3461 (regptr): Delete.
3462 (do_initial_child_stuff): Remove debug registers references.
3463 Set context using the low target. Resume threads after
3464 setting the contexts.
3465 (child_continue): Remove dead variable. Remove debug
3466 registers references.
3467 (child_fetch_inferior_registers): Go through the low target.
3468 (do_child_store_inferior_registers): Remove.
3469 (child_store_inferior_registers): Go through the low target.
3470 (win32_resume): Remove debug registers references.
3471 Set context using the low target.
3472 (handle_exception): Change return type to void. Don't record
3473 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3474 first chance exception.
3475 (get_child_debug_event): Change return type to void. Remove
3476 goto loop. Always return after waiting for debug event.
3477 (win32_wait): Convert to switch statement. Handle spurious
3478 events.
3479
3480 * win32-i386-low.c (debug_registers_changed,
3481 debug_registers_used): New.
3482 (initial_stuff): Rename to ...
3483 (i386_initial_stuff): ... this. Clear debug registers
3484 state variables.
3485 (store_debug_registers): Delete.
3486 (i386_get_thread_context): New.
3487 (load_debug_registers): Delete.
3488 (i386_set_thread_context): New.
3489 (i386_thread_added): New.
3490 (single_step): Rename to ...
3491 (i386_single_step): ... this.
3492 (do_fetch_inferior_registers): Rename to ...
3493 (i386_fetch_inferior_register): ... this.
3494 (i386_store_inferior_register): New.
3495 (the_low_target): Adapt to new interface.
3496
3497 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3498 (arm_get_thread_context): New.
3499 (arm_set_thread_context): New.
3500 (regptr): New.
3501 (do_fetch_inferior_registers): Rename to ...
3502 (arm_fetch_inferior_register): ... this.
3503 (arm_store_inferior_register): New.
3504 (arm_wince_breakpoint): Reimplement as unsigned long.
3505 (arm_wince_breakpoint_len): Define.
3506 (the_low_target): Adapt to new interface.
3507
3508 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3509 load_debug_registers. Add get_thread_context, set_thread_context,
3510 thread_added and store_inferior_register. Rename
3511 fetch_inferior_registers to fetch_inferior_register.
3512 (regptr): Remove declaration.
3513
dd6953e1
PA
35142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3515
3516 * linux-low.c (linux_detach): Change return type to int. Return 0.
3517 * spu-low.c (spu_detach): Likewise.
3518
444d6139
PA
35192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3520
3521 * target.h (target_ops): Change return type of detach to int.
3522 Add join.
3523 (join_inferior): New.
3524 * server.c (main): Don't skip detach support on mingw32.
3525 If the inferior doesn't support detaching return error.
3526 Call join_inferior instead of using waitpid.
3527 * linux-low.c (linux_join): New.
3528 (linux_target_op): Add linux_join.
3529 * spu-low.c (spu_join): New.
3530 (spu_target_ops): Add spu_join.
3531 * win32-low.c (win32_detach): Adapt to new interface.
3532 Reopen current_process_handle before detaching. Issue a child
3533 resume before detaching.
3534 (win32_join): New.
3535 (win32_target_op): Add win32_join.
3536
1d5315fe
PA
35372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3538
3539 * win32-low.c (win32-attach): Fix return value.
3540 * target.h (target_ops): Describe ATTACH return values.
3541
bf914831
PA
35422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3543
3544 * win32-low.c (GETPROCADDRESS): Define.
3545 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3546 (winapi_DebugSetProcessKillOnExit): Likewise.
3547 (win32_create_inferior): Force usage of ansi CreateProcessA.
3548 (win32_attach): Use GETPROCADDRESS.
3549 (win32_detach): Likewise.
3550
f72f3e60
PA
35512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3552
3553 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3554
ed50f18f
PA
35552007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3556
3557 * win32-low.c: Commit leftover changes from 2007-03-29.
3558
0c2ead7e
DJ
35592007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3560
3561 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3562 fields short instead of int. Add explicit padding.
3563 (i387_cache_to_fsave): Remove unnecessary casts.
3564 (i387_fsave_to_cache): Doc fix.
3565 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3566
73725ff3
DJ
35672007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3568
3569 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3570 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3571
d99f33d8
PA
35722007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3573
3574 * configure.srv (arm*-*-mingw32ce*): Move near the other
3575 arm targets.
3576
68070c10
PA
35772007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3578
2482afc6 3579 * configure.ac: Add errno checking.
68070c10
PA
3580 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3581 sys/file.h and malloc.h.
3582 (AC_CHECK_DECLS): Add perror.
3583 (srv_mingwce): Handle.
2482afc6 3584 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
3585 win32-i386-low.o to srv_tgtobj.
3586 (i[34567]86-*-mingw*): Likewise.
3587 (arm*-*-mingw32ce*): Add case.
3588 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3589 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3590 [__MINGW32CE__] (strerror): New function.
3591 [__MINGW32CE__] (errno): Define to GetLastError.
3592 [__MINGW32CE__] (COUNTOF): New macro.
3593 (remote_open): Remove extra close call.
3594 * mem-break.c (delete_breakpoint_at): New function.
3595 * mem-break.h (delete_breakpoint_at): Declare.
3596 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3597 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3598 [USE_WIN32API] (read, write): Add char* casts.
3599 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3600 * server.h: Include wincecompat.h on Windows CE.
3601 [HAVE_ERRNO_H]: Check.
3602 (perror): Declare if not declared.
3603 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3604 (perror_with_name): Remove errno declaration.
3605 * wincecompat.h: New.
3606 * wincecompat.c: New.
3607 * win32-low.h: New.
3608 * win32-arm-low.c: New.
3609 * win32-i386-low.c: New.
3610 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3611 (OUTMSG2): Make it safe.
3612 (_T): New macro.
3613 (COUNTOF): New macro.
3614 (NUM_REGS): Get it from the low target.
3615 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3616 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3617 (thread_rec): Let low target handle debug registers.
3618 (child_add_thread): Likewise.
3619 (child_init_thread_list): Likewise.
3620 (continue_one_thread): Likewise.
3621 (regptr): New.
3622 (do_child_fetch_inferior_registers): Move to ...
3623 * win32-i386-low.c: ... here, and rename to ...
3624 (do_fetch_inferior_registers): ... this.
3625 * win32-low.c (child_fetch_inferior_registers):
3626 Go through the low target.
3627 (do_child_store_inferior_registers): Use regptr.
3628 (strwinerror): New function.
3629 (win32_create_inferior): Handle Windows CE.
3630 Use strwinerror instead of strerror on Windows error
3631 codes. Add program to the error output.
3632 Don't close the main thread handle on Windows CE.
3633 (win32_attach): Use coredll.dll on Windows CE.
3634 (win32_kill): Close current process and current
3635 thread handles.
3636 (win32_detach): Use coredll.dll on Windows CE.
3637 (win32_resume): Let low target handle debug registers, and
3638 step request.
3639 (handle_exception): Add/Remove initial breakpoint. Avoid
3640 non-existant WSTOPSIG on Windows CE.
3641 (win32_read_inferior_memory): Cast to remove warning.
3642 (win32_arch_string): Go through the low target.
3643 (initialize_low): Call set_breakpoint_data with the low
3644 target's breakpoint.
3645 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3646 FOP_REGNUM, mappings): Move to ...
3647 * win32-i386-low.c: ... here.
3648 * win32-low.c (win32_thread_info): Move to ...
3649 * win32-low.h: ... here.
3650 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3651 win32-arm-low.c and wincecompat.c.
3652 (all:): Add $EXEEXT.
3653 (install-only:): Likewise.
3654 (gdbserver:): Likewise.
3655 (gdbreplay:): Likewise.
3656 * config.in: Regenerate.
3657 * configure: Regenerate.
3658
41093d81
PA
36592007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3660
3661 * win32-low.c: Rename typedef thread_info to
3662 win32_thread_info throughout.
3663
544afa54
PA
36642007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3665
3666 * win32-i386-low.c: Rename to ...
3667 * win32-low.c: ... this.
3668 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3669 * Makefile.in: Likewise.
3670
bce7165d
PA
36712007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3672
3673 * remote-utils.c (monitor_output): Constify msg parameter.
3674 * server.h (monitor_output): Likewise.
3675 * win32-i386-low.c (handle_output_debug_string): New.
3676 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3677 handle_output_debug_string.
3678 (get_child_debug_event): Likewise.
3679
506c7aa0
DJ
36802007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3681
3682 * server.c (main): Correct strtoul check.
3683
42c81e2a
DJ
36842007-03-27 Jon Ringle <jon@ringle.org>
3685
3686 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3687
9453113a
DJ
36882007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3689
3690 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3691
64a69107
DJ
36922007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3693
3694 * terminal.h: Check HAVE_SGTTY_H.
3695
36962007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
3697
3698 * remote-utils.c (remote_open): Print out the assigned port number.
3699
c74d0ad8
DJ
37002007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3701
3702 * remote-utils.c (monitor_output): New function.
3703 * server.c (debug_threads): Define here.
3704 (monitor_show_help): New function.
3705 (handle_query): Handle qRcmd.
3706 (main): Do not handle 'd' packet.
3707 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3708 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3709 of debug_threads.
3710
de7c3b4a
PA
37112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3712
3713 * Makefile.in (EXEEXT): New.
3714 (clean): Use $(EXEEXT).
3715
ef57601b
PA
37162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3717
3718 * target.h (target_ops): Rename send_signal to request_interrupt,
3719 and remove enum target_signal parameter.
3720 * linux-low.c (linux_request_interrupt): Rename from
3721 linux_send_signal, and always send SIGINT.
3722 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3723 and always send SIGINT.
3724 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3725 of send_signal.
3726 (input_interrupt): Likewise.
3727
820f2bda
PA
37282007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3729
3730 * server.c (get_features_xml): Check if target implemented
3731 arch_string.
3732 * win32-i386-low.c (win32_arch_string): New.
3733 (win32_target_ops): Add win32_arch_string as arch_string member.
3734
ab39bf24
UW
37352007-02-22 Markus Deuling <deuling@de.ibm.com>
3736
3737 * spu-low.c (spu_arch_string): New.
3738 (spu_target_ops): Add spu_arch_string.
3739
61ff6e04
DJ
37402007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3741
3742 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3743 * configure.ac: Do not check for terminal.h.
3744 * configure, config.in: Regenerated.
3745
fb1e4ffc
DJ
37462007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3747
3748 * Makefile.in (OBS): Add $(XML_BUILTIN).
3749 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3750 (clean): Update.
3751 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3752 (arm-with-iwmmxt.c): New.
3753 * config.in, configure: Regenerate.
3754 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3755 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3756 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3757 (arm*-*-linux*): Add iWMMXt and regset support.
3758 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3759 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3760 (arm_store_wmmxregset, target_regsets): New.
3761 * server.c (get_features_xml): Take annex argument. Check builtin
3762 XML documents.
3763 (handle_query): Handle multiple annexes.
3764
0f48aa01
DJ
37652007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3766
3767 * remote-utils.c [USE_WIN32API] (read, write): Define.
3768 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3769 write.
3770
23181151
DJ
37712007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3772
3773 * linux-i386-low.c (the_low_target): Set arch_string.
3774 * linux-x86-64-low.c (the_low_target): Likewise.
3775 * linux-low.c (linux_arch_string): New.
3776 (linux_target_ops): Add it.
3777 * linux-low.h (struct linux_target_ops): Add arch_string.
3778 * server.c (write_qxfer_response): Use const void * for DATA.
3779 (get_features_xml): New.
3780 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3781 * target.h (struct target_ops): Add arch_string method.
3782
9d606399
DJ
37832007-01-03 Denis Pilat <denis.pilat@st.com>
3784 Daniel Jacobowitz <dan@codesourcery.com>
3785
3786 * linux-low.c (linux_kill): Handle being called with no threads.
3787 * win32-i386-low.c (win32_kill): Likewise.
3788 (get_child_debug_event): Clear current_process_handle.
3789
37902006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
3791 Daniel Jacobowitz <dan@codesourcery.com>
3792
3793 * remote-utils.c (remote_open): Check the type of specified
3794 serial port devices before opening them.
3795 * server.c (main): Kill the inferior if an error occurs during
3796 the first remote_open.
3797
a5e13d24
DJ
37982006-12-05 Markus Deuling <deuling@de.ibm.com>
3799
3800 * README: Update supported targets.
3801
186947f7
DJ
38022006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3803
3804 * Makefile.in (clean): Remove reg-mips64.c.
3805 (reg-mips64.c, reg-mips64.o): New rules.
3806 * configure.srv: Handle mips64. Include regset support for mips.
3807 * linux-mips-low.c (union mips_register): New.
3808 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3809 (mips_breakpoint, mips_breakpoint_at): Use int.
3810 (mips_collect_register, mips_supply_register)
3811 (mips_collect_register_32bit, mips_supply_register_32bit)
3812 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3813 (mips_store_fpregset, target_regsets): New.
3814 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3815
a13e2c95
UW
38162006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3817
3818 * configure.srv: Add target "spu*-*-*".
3819 * Makefile.in (clean): Remove reg-spu.c.
3820 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3821 * spu-low.c: New file.
3822
cb7283db
DJ
38232006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3824
3825 * configure.ac: Correct td_thr_tls_get_addr test.
3826 * configure: Regenerated.
3827
89be2091
DJ
38282006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3829
3830 * linux-low.c (linux_wait_for_event): Reformat. Use the
3831 pass_signals array.
3832 * remote-utils.c (decode_address_to_semicolon): New.
3833 * server.c (pass_signals, handle_general_set): New.
3834 (handle_query): Mention QPassSignals for qSupported.
3835 (main): Call handle_general_set.
3836 * server.h (pass_signals, decode_address_to_semicolon): New.
3837
000ef4f0
DJ
38382006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3839
3840 * server.c (handle_query): Correct error handling for read_auxv.
3841
b7149293
UW
38422005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3843
3844 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3845 and srv_linux_thread_db to yes.
3846 * linux-s390-low.c (s390_fill_gregset): New function.
3847 (target_regsets): Define data structure.
3848
dae5f5cf
DJ
38492006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3850
3851 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3852 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3853 * config.in, configure: Regenerated.
3854 * inferiors.c (gdb_id_to_thread): New function.
3855 (gdb_id_to_thread_id): Use it.
3856 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3857 * linux-low.h (struct process_info): Add th member.
3858 (thread_db_get_tls_address): New prototype.
3859 * remote-utils.c (decode_address): Make non-static.
3860 * server.c (handle_query): Handle qGetTLSAddr.
3861 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3862 * target.h (struct target_ops): Add get_tls_address.
3863 * thread-db.c (maybe_attach_thread): Save the thread handle.
3864 (thread_db_get_tls_address): New.
3865
32ca6d61
DJ
38662006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3867
3868 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3869 (linux_resume_one_process): Take a siginfo_t *. Update all
3870 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3871 (struct pending_signals): Add a siginfo_t.
3872 (linux_wait_for_process): Always set last_status.
3873 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3874 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3875 * linux-low.h (struct process_info): Add last_status.
3876
5ffff7c1
DJ
38772006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3878
3879 * remote-utils.c (try_rle): New function.
3880 (putpkt_binary): Use it.
3881
8695c747
DJ
38822006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3883
3884 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3885 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3886 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3887 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3888 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3889 point registers.
3890
290fadea
RS
38912006-08-08 Richard Sandiford <richard@codesourcery.com>
3892
3893 * server.c (terminal_fd): New variable.
3894 (old_foreground_pgrp): Likewise.
3895 (restore_old_foreground_pgrp): New function.
3896 (start_inferior): Record the terminal file descriptor in terminal_fd
3897 and its original foreground group in old_foreground_pgrp. Register
3898 restore_old_foreground_pgrp with atexit().
3899
9f2e1e63
DJ
39002006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3901
3902 * server.c (handle_query): Correct qPart to qXfer.
3903
b80864fb
DJ
39042006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3905
3906 * configure.ac: Check for more headers which are missing on
3907 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3908 * configure.srv: Add Cygwin and mingw32.
3909 * remote-utils.c: Don't include headers unconditionally which
3910 are missing on mingw32. Include <winsock.h> for mingw32.
3911 (remote_open): Adjust for mingw32 support. Flush
3912 standard error after writing to it.
3913 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3914 (unblock_async_io, enable_async_io, disable_async_io)
3915 (readchar, getpkt): Update for Winsock support.
3916 (prepare_resume_reply): Expect a protocol signal number.
3917 * server.c: Disable <sys/wait.h> on mingw32.
3918 (start_inferior): Adjust for mingw32 support. Flush
3919 standard error after writing to it.
3920 (attach_inferior): Likewise. Use protocol signal
3921 numbers.
3922 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3923 and names.
3924 * win32-i386-low.c: New file.
3925 * Makefile.in (XM_CLIBS): Set.
3926 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3927 (win32-i386-low.o): New dependency rule.
3928 * linux-low.c (linux_wait): Use target signal numbers.
3929 * target.h (struct target_ops): Doc fix.
3930 * server.h (target_signal_to_name): New prototype.
3931 * gdbreplay.c: Don't include headers unconditionally which
3932 are missing on mingw32. Include <winsock.h> for mingw32.
3933 (remote_close, remote_open): Adjust for Winsock support.
3934 * configure, config.in: Regenerated.
3935
0876f84a
DJ
39362006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3937
3938 * server.c (decode_xfer_read, write_qxfer_response): New.
3939 (handle_query): Take a packet length argument. Handle
3940 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3941 the qSupported response.
3942 (main): Update call to handle_query.
3943
01f9e8fa
DJ
39442006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3945
3946 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3947 (putpkt_binary): Renamed from putpkt and adjusted for binary
3948 data.
3949 (putpkt): New wrapper for putpkt_binary.
3950 (readchar): Don't mask off the high bit.
3951 (decode_X_packet): New function.
3952 * server.c (main): Call putpkt_binary if a handler sets the packet
3953 length. Save the length of the incoming packet. Handle 'X'.
3954 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3955
be2a5f71
DJ
39562006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3957
3958 * server.c (handle_query): Handle qSupported.
3959
ea025f5f
DJ
39602006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3961
3962 * remote-utils.c (all_symbols_looked_up): New variable.
3963 (look_up_one_symbol): Check it.
3964 * server.h (look_up_one_symbol): New declaration.
3965 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3966
9308fc88
DJ
39672006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3968
3969 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 3970 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
3971 (PTRACE_GET_THREAD_AREA): Define.
3972 (ps_get_thread_area): New function.
3973
52fb6437
NS
39742006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3975
3976 * configure.srv (m68k*-*-uclinux*): New target.
3977 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3978 (linux_resume_one_process): Remove extraneous cast.
3979 (linux_read_offsets): New.
3980 (linux_target_op): Add linux_read_offsets on mmuless systems.
3981 * server.c (handle_query): Add qOffsets logic.
3982 * target.h (struct target_ops): Add read_offsets.
3983
21b0f40c
DJ
39842006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3985
3986 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3987 (PTRACE_GET_THREAD_AREA): Define.
3988 (ps_get_thread_area): New function.
3989 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3990 (linux-x86-64-low.o): Update.
3991
0050a760
DJ
39922006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3993
3994 * configure.ac: Remove checks for prfpregset_t.
3995 * gdb_proc_service.h: New file.
3996 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3997 new "gdb_proc_service.h".
3998 * proc-service.c: Likewise.
3999 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4000 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4001 * Makefile.in (gdb_proc_service_h): Updated.
4002 * configure, config.in: Regenerated.
4003
b92a518e
DJ
40042006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4005
4006 * remote-utils.c (prepare_resume_reply): Move declaration
4007 of gdb_id_from_wait to the top of the block.
4008
545587ee
DJ
40092006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4010
4011 * linux-low.c (regsets_store_inferior_registers): Read the regset
4012 from the target before filling it.
4013
9db87ebd
DJ
40142006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4015
4016 * server.c (attach_inferior): Return SIGTRAP for a successful
4017 attach.
4018
dd24457d
DJ
40192006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4020
4021 * Makefile.in (OBS): Add version.o.
4022 (STAGESTUFF): Delete.
4023 (version.o): Add dependencies.
4024 (version.c): Replace rule.
4025 (clean): Remove version.c.
4026 * server.c (gdbserver_version): New.
4027 (gdbserver_usage): Use printf.
4028 (main): Handle --version and --help.
4029 * server.h (version, host_name): Add declarations.
4030
6f0f660e
EZ
40312005-12-23 Eli Zaretskii <eliz@gnu.org>
4032
4033 * linux-arm-low.c:
4034 * linux-arm-low.c:
4035 * inferiors.c:
4036 * i387-fp.h:
4037 * i387-fp.c:
4038 * gdbreplay.c:
4039 * regcache.c:
4040 * proc-service.c:
4041 * mem-break.h:
4042 * mem-break.c:
4043 * linux-x86-64-low.c:
4044 * linux-sh-low.c:
4045 * linux-s390-low.c:
4046 * linux-ppc64-low.c:
4047 * linux-ppc-low.c:
4048 * linux-mips-low.c:
4049 * linux-m68k-low.c:
4050 * linux-m32r-low.c:
4051 * linux-low.h:
4052 * linux-low.c:
4053 * linux-ia64-low.c:
4054 * linux-i386-low.c:
4055 * linux-crisv32-low.c:
4056 * thread-db.c:
4057 * terminal.h:
4058 * target.h:
4059 * target.c:
4060 * server.h:
4061 * server.c:
4062 * remote-utils.c:
4063 * regcache.h:
4064 * utils.c:
4065 * Makefile.in:
4066 * configure.ac:
4067 * gdbserver.1: Add (C) after Copyright. Update the FSF
4068 address.
4069
9d1fb177
DJ
40702005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4071
4072 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4073 (arm_breakpoint_at): Recognize both breakpoints.
4074 (the_low_target): Use the correct breakpoint instruction.
4075
011a70c2
DJ
40762005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4077
4078 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4079 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4080 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4081 (the_low_target): Update.
4082
7fb85e41
AS
40832005-10-25 Andreas Schwab <schwab@suse.de>
4084
4085 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4086
4087 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4088 (ia64_num_regs): Reduce to 462.
4089
3db0444b
DJ
40902005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4091
4092 * acinclude.m4: Correct quoting.
4093 * aclocal.m4: Regenerated.
4094
4095 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4096 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4097 (thread_db_init): Call thread_db_err_str.
4098 * configure.ac: Check for TD_VERSION.
4099 * config.in, configure: Regenerated.
4100
bee0189a
DJ
41012005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4102
4103 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4104
e9d25b98
DJ
41052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4106
4107 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4108 is not available. Define HAVE_PTRACE_GETREGS if it is.
4109 * config.in, configure: Regenerated.
4110 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4111 * linux-i386-low.c, linux-m68k-low.c: Update to use
4112 HAVE_PTRACE_GETREGS.
4113 * linux-low.c (regsets_fetch_inferior_registers)
4114 (regsets_store_inferior_registers): Only return 0 if we processed
4115 GENERAL_REGS.
4116 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4117 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4118
a06660f7
DJ
41192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4120
4121 * inferiors.c (struct thread_info): Add gdb_id.
4122 (add_thread): Add gdb_id argument.
4123 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4124 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4125 calls to add_thread.
4126 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4127 * server.c (handle_query): Use thread_to_gdb_id.
4128 (handle_v_cont, main): Use gdb_id_to_thread_id.
4129 * server.h (add_thread): Update prototype.
4130 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4131 prototypes.
4132
5a1f5858
DJ
41332005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4134
4135 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4136 left-padded registers.
4137 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4138 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4139
e122f1f5
SE
41402005-07-01 Steve Ellcey <sje@cup.hp.com>
4141
4142 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4143 * configure: Regenerate.
4144 * config.in: Regenerate.
4145 * server.h (NEED_DECLARATION_STRERROR):
4146 Replace with !HAVE_DECL_STRERROR.
4147
d592fa2f
DJ
41482005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4149
4150 * linux-low.c (linux_wait, linux_send_signal): Don't test
4151 an unsigned long variable for > 0 if it could be MAX_ULONG.
4152 * server.c (myresume): Likewise.
4153 * target.c (set_desired_inferior): Likewise.
4154
ccbd4912
MK
41552005-06-13 Mark Kettenis <kettenis@gnu.org>
4156
4157 * configure.ac: Simplify and improve check for socklen_t.
4158 * configure, config.in: Regenerate.
4159
f450004a
DJ
41602005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4161
4162 * acconfig.h: Remove.
4163 * configure.ac: Add a test for socklen_t. Use three-argument
4164 AC_DEFINE throughout.
4165 * config.in: Regenerated using autoheader 2.59.
4166 * configure: Regenerated.
4167
4168 * gdbreplay.c (socklen_t): Provide a default.
4169 (remote_open): Use socklen_t.
4170 * remote-utils.c (socklen_t): Provide a default.
4171 (remote_open): Use socklen_t.
4172 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4173 unsigned char.
4174
4175 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4176 char for buffers.
4177 * linux-low.c (linux_read_memory, linux_write_memory)
4178 (linux_read_auxv): Likewise.
4179 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4180 (check_mem_write): Likewise.
4181 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4182 Likewise.
4183 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4184 (registers_from_string, register_data): Likewise.
4185 * server.c (handle_query, main): Likewise.
4186 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4187 (decode_M_packet): Likewise.
4188 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4189 * target.h (struct target_ops): Update read_memory, write_memory,
4190 and read_auxv.
4191 (read_inferior_memory, write_inferior_memory): Update.
4192 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4193 to unsigned char *.
4194 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4195 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4196 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4197 linux-s390-low.c, linux-sh-low.c: Update for changes in
4198 read_inferior_memory and the_low_target->breakpoint.
4199
eee84df1
DJ
42002005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4201
4202 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4203 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4204 * configure.srv: Add powerpc64-*-linux*.
4205 * linux-ppc64-low.c: New file.
4206
45b134e5
OF
42072005-05-23 Orjan Friberg <orjanf@axis.com>
4208
4209 * linux-cris-low.c: New file with support for CRIS.
4210 * linux-crisv32-low.c: Ditto for CRISv32.
4211 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4212 (clean): Add reg-cris.c and reg-crisv32.c.
4213 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4214 reg-crisv32.o, and reg-crisv32.c to make rules.
4215 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4216 recognized targets.
4217
48d93c75
UW
42182005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4219
4220 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4221 of sizeof (PTRACE_XFER_TYPE).
4222 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4223
e013ee27
OF
42242005-05-12 Orjan Friberg <orjanf@axis.com>
4225
4226 * target.h (struct target_ops): Add insert_watchpoint,
4227 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4228 pointers for hardware watchpoint support.
4229 * linux-low.h (struct linux_target_ops): Ditto.
4230 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4231 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
4232 to linux_target_ops.
4233 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4234 reply packet.
4235 * server.c (main): Recognize 'Z' and 'z' packets.
4236
b0ded00b
UW
42372005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
4238
4239 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4240 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4241 (the_low_target): Add new members.
4242
8643e2ad
DJ
42432005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4244
4245 * proc-service.c (ps_lgetregs): Search all_processes instead of
4246 all_threads.
4247
fc620387
DJ
42482005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4249
4250 * server.c (start_inferior): Change return type to int.
4251 (attach_inferior): Change sigptr to int *.
4252 (handle_v_cont, handle_v_requests): Change signal to int *.
4253 (main): Change signal to int.
4254
42552005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
4256
4257 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
4258 * configure.srv: Add m32r*-*-linux*.
4259 * linux-m32r-low.c: New file.
4260
e0e76420
DJ
42612005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
4262
4263 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
4264
a1928bad
DJ
42652005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4266
4267 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
4268 Take unsigned long arguments for PIDs.
4269 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
4270 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
4271 (wait_for_sigstop, linux_resume_one_process)
4272 (regsets_fetch_inferior_registers, linux_send_signal)
4273 (linux_read_auxv): Likewise. Update the types of variables holding
4274 PIDs. Update format string specifiers.
4275 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
4276 * remote-utils.c (prepare_resume_reply): Likewise.
4277 * server.c (cont_thread, general_thread, step_thread)
4278 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4279 unsigned long.
4280 (handle_query): Update format specifiers.
4281 (handle_v_cont, main): Use strtoul for thread IDs.
4282 * server.h (struct inferior_list_entry): Use unsigned long for ID.
4283 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4284 (general_thread, step_thread, thread_from_wait)
4285 (old_thread_from_wait): Update.
4286 * target.h (struct thread_resume): Use unsigned long for THREAD.
4287 (struct target_ops): Use unsigned long for arguments to attach and
4288 thread_alive.
4289
dcdb98d2
DJ
42902005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4291
4292 * acinclude.m4: Include bfd/bfd.m4 directly.
4293 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4294 <agriffis@toolchain.org>.
4295 * aclocal.m4, configure: Regenerated.
4296
bec39cab
AC
42972005-01-07 Andrew Cagney <cagney@gnu.org>
4298
4299 * configure.ac: Rename configure.in, require autoconf 2.59.
4300 * configure: Re-generate.
4301
434c4c77
DJ
43022004-12-08 Daniel Jacobowitz <dan@debian.org>
4303
4304 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4305 LIBS when finished.
4306 * aclocal.m4: Regenerated.
4307 * configure: Regenerated.
4308
db1d3e1b
AS
43092004-11-21 Andreas Schwab <schwab@suse.de>
4310
4311 * linux-m68k-low.c (m68k_num_gregs): Define.
4312 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4313 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4314 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4315 (m68k_breakpoint_at): New. Add to the_low_target.
4316
4317 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4318 srv_linux_thread_db to yes.
4319
43360365
JB
43202004-10-20 Joel Brobecker <brobecker@gnat.com>
4321
4322 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4323 (ARCH_SET_FS): Likewise.
4324 (ARCH_GET_FS): Likewise.
4325 (ARCH_GET_GS): Likewise.
4326
fd500816
DJ
43272004-10-16 Daniel Jacobowitz <dan@debian.org>
4328
4329 * linux-i386-low.c (ps_get_thread_area): New.
4330 * linux-x86-64-low.c (ps_get_thread_area): New.
4331 * linux-low.c: Include <sys/syscall.h>.
4332 (linux_kill_one_process): Don't kill the first thread here.
4333 (linux_kill): Kill the first thread here.
4334 (kill_lwp): New function.
4335 (send_sigstop, linux_send_signal): Use it.
4336 * proc-service.c: Clean up #ifdefs.
4337 (fpregset_info): Delete.
4338 (ps_lgetregs): Update and enable implementation.
4339 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4340 implementations.
4341 * remote-utils.c (struct sym_cache, symbol_cache): New.
4342 (input_interrupt): Print a clearer message.
4343 (async_io_enabled): New variable.
4344 (enable_async_io, disable_async_io): Use it. Update comments.
4345 (look_up_one_symbol): Use the symbol cache.
4346 * thread-db.c (thread_db_look_up_symbols): New function.
4347 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4348
f6de3c42
DJ
43492004-10-16 Daniel Jacobowitz <dan@debian.org>
4350
4351 * configure.in: Test for -rdynamic.
4352 * configure: Regenerated.
4353 * Makefile (INTERNAL_LDFLAGS): New.
4354 (gdbserver, gdbreplay): Use it.
4355
2c0fc042
AC
43562004-09-02 Andrew Cagney <cagney@gnu.org>
4357
4358 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4359
075b3282
DJ
43602004-03-23 Daniel Jacobowitz <drow@mvista.com>
4361
4362 * linux-low.c (linux_wait): Clear all_processes list also.
4363
fa6a77dc
DJ
43642004-03-12 Daniel Jacobowitz <drow@mvista.com>
4365
4366 * linux-low.c: Include <errno.h>. Remove extern declaration of
4367 errno.
4368
6d782a97
DJ
43692004-03-12 Daniel Jacobowitz <drow@mvista.com>
4370
4371 * gdbreplay.c, server.h, utils.c: Update copyright years.
4372
3a7fb99b
DJ
43732004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4374
4375 * server.c (main): Print child status or termination signal from
4376 variable 'signal', not 'sig'.
4377
c3e735a6
DJ
43782004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4379
4380 * linux-low.c (linux_read_memory): Change return type to
4381 int. Check for and return error from ptrace().
4382 * target.c (read_inferior_memory): Change return type to int. Pass
4383 back return status from the_target->read_memory().
4384 * target.h (struct target_ops): Adapt *read_memory() prototype.
4385 Update comment.
4386 (read_inferior_memory): Adapt prototype.
4387 * server.c (main): Return an error packet if
4388 read_inferior_memory() returns an error.
4389
a59d1c82
DJ
43902004-03-04 Daniel Jacobowitz <drow@mvista.com>
4391
4392 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4393 Unify with other clean targets.
4394
dc3f8883
DJ
43952004-02-29 Daniel Jacobowitz <drow@mvista.com>
4396
4397 * server.c (handle_v_cont): Call set_desired_inferior.
4398
89a208da
DJ
43992004-02-29 Daniel Jacobowitz <drow@mvista.com>
4400
4401 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4402
62ea82f5
DJ
44032004-02-29 Daniel Jacobowitz <drow@mvista.com>
4404
4405 * linux-low.c (linux_wait): Unblock async I/O.
4406 (linux_resume): Block and enable async I/O.
4407 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4408 * server.h (block_async_io, unblock_async_io): Add prototypes.
4409
6910d122
DJ
44102004-02-29 Daniel Jacobowitz <drow@mvista.com>
4411
4412 * remote-utils.c (remote_open): Print a status notice after
4413 opening a TCP port.
4414 * server.c (attach_inferior): Print a status notice after
4415 attaching.
4416
44172004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
4418
4419 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4420
c89dc5d4
DJ
44212004-02-26 Daniel Jacobowitz <drow@mvista.com>
4422
4423 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4424 error packet.
4425 * server.c, target.h: Update copyright years.
4426
4b8dad4a
RM
44272004-02-25 Roland McGrath <roland@redhat.com>
4428
4429 * target.h (struct target_ops): New member `read_auxv'.
4430 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4431 * linux-low.c (linux_read_auxv): New function.
4432 (linux_target_ops): Initialize `read_auxv' member to that.
4433
d7446758
JB
44342004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4435
4436 Committed by Jim Blandy <jimb@redhat.com>.
4437
4438 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 4439 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
4440 instead of GPR_SIZE to distiguish s390 and s390x targets.
4441
5544ad89
DJ
44422004-01-31 Daniel Jacobowitz <drow@mvista.com>
4443
4444 * linux-low.c: Update copyright year.
4445 (check_removed_breakpoint): Clear pending_is_breakpoint.
4446 (linux_set_resume_request, linux_queue_one_thread)
4447 (resume_status_pending_p): New functions.
4448 (linux_continue_one_thread): Use process->resume.
4449 (linux_resume): Only resume threads if there are no pending events.
4450 * linux-low.h (struct process_info): Add resume request
4451 pointer.
4452
2a68b70e
DJ
44532004-01-30 Daniel Jacobowitz <drow@mvista.com>
4454
4455 * regcache.c (new_register_cache): Clear the allocated register
4456 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4457
64386c31
DJ
44582003-10-13 Daniel Jacobowitz <drow@mvista.com>
4459
4460 * linux-low.c (linux_resume): Take a struct thread_resume *
4461 argument.
4462 (linux_wait): Update call.
4463 (resume_ptr): New static variable.
4464 (linux_continue_one_thread): Renamed from
4465 linux_continue_one_process. Use resume_ptr.
4466 (linux_resume): Use linux_continue_one_thread.
4467 * server.c (handle_v_cont, handle_v_requests): New functions.
4468 (myresume): New function.
4469 (main): Handle 'v' case.
4470 * target.h (struct thread_resume): New type.
4471 (struct target_ops): Change argument of "resume" to struct
4472 thread_resume *.
4473 (myresume): Delete macro.
4474
c938e9b0
L
44752003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4476
4477 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4478 (uninstall): Support DESTDIR.
4479
7f313d07
BC
4480Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4481
4482 * configure.srv: Add xscale*linux copy of arm*linux entry.
4483
3b2fc2ea
DJ
44842003-07-24 Daniel Jacobowitz <drow@mvista.com>
4485
4486 * linux-arm-low.c (arm_reinsert_addr): New function.
4487 (the_low_target): Add arm_reinsert_addr.
4488
1c0a559e
MK
44892003-07-08 Mark Kettenis <kettenis@gnu.org>
4490
4491 * mem-break.c: Remove whitespace at end of file.
4492
43d5792c
DJ
44932003-06-28 Daniel Jacobowitz <drow@mvista.com>
4494
4495 * configure.in: Check whether we need to prototype strerror.
4496 * server.h: Optionally prototype strerror.
4497 * gdbreplay.c (perror_with_name): Use strerror.
4498 * linux-low.c (linux_attach_lwp): Use strerror.
4499 * utils.c (perror_with_name): Use strerror.
4500 * config.in, configure: Regenerated.
4501
c8a86edf
DJ
45022003-06-28 Daniel Jacobowitz <drow@mvista.com>
4503
4504 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4505 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4506
73d37363
DJ
45072003-06-20 Daniel Jacobowitz <drow@mvista.com>
4508
4509 * Makefile.in (SFILES): Update.
4510 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4511 low-sun3.c: Remove files.
4512
6ad8ae5c
DJ
45132003-06-17 Daniel Jacobowitz <drow@mvista.com>
4514
4515 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4516 (linux_detach_one_process, linux_detach): New functions.
4517 (linux_target_ops): Add linux_detach.
4518 * server.c (main): Handle 'D' packet.
4519 * target.h (struct target_ops): Add "detach" member.
4520 (detach_inferior): Define.
4521
1581182a
MK
45222003-06-13 Mark Kettenis <kettenis@gnu.org>
4523
4524 From Kelley Cook <kelleycook@wideopenwest.com>:
4525 * configure.srv: Accept i[34567]86 variants.
4526
e5379b03
DJ
45272003-06-05 Daniel Jacobowitz <drow@mvista.com>
4528
4529 * linux-low.c (linux_wait_for_event): Correct comment typos.
4530 (linux_resume_one_process): Call check_removed_breakpoint.
4531 (linux_send_signal): New function.
4532 (linux_target_ops): Add linux_send_signal.
4533 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4534 of kill.
4535 * target.h (struct target_ops): Add send_signal.
4536
2ff29de4
JB
45372003-05-29 Jim Blandy <jimb@redhat.com>
4538
4539 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4540 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4541 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4542 away part of the register's value.
4543
254787d4
DJ
45442003-03-26 Daniel Jacobowitz <drow@mvista.com>
4545
4546 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4547 (linux_wait_for_event, linux_init_signals): Likewise.
4548
94e10508
DJ
45492003-03-17 Daniel Jacobowitz <drow@mvista.com>
4550
4551 * configure.in: Check for stdlib.h.
4552 * configure: Regenerated.
4553 * config.in: Regenerated.
4554
4c0711e0
DJ
45552003-01-04 Andreas Schwab <schwab@suse.de>
4556
4557 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4558
ef66e766
AC
45592003-01-02 Andrew Cagney <ac131313@redhat.com>
4560
4561 * Makefile.in: Remove obsolete code.
4562
a1358604
DJ
45632002-11-20 Daniel Jacobowitz <drow@mvista.com>
4564
4565 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4566 defined(PT_FPR0_HI).
4567
23ce3b1c
DJ
45682002-11-17 Stuart Hughes <seh@zee2.com>
4569
4570 * linux-arm-low.c (arm_num_regs): Increase.
4571 (arm_regmap): Include status register.
4572
45732002-11-17 Daniel Jacobowitz <drow@mvista.com>
4574
4575 * linux-low.c (register_addr): Remove incorrect -1 check.
4576
a9fa9f7d
DJ
45772002-08-29 Daniel Jacobowitz <drow@mvista.com>
4578
4579 * linux-low.c (linux_create_inferior): Call setpgid. Return
4580 the new PID.
4581 (unstopped_p, linux_signal_pid): Remove.
4582 (linux_target_ops): Remove linux_signal_pid.
4583 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4584 global instead of target method.
4585 * target.h (struct target_ops): Remove signal_pid. Update comment
4586 for create_inferior.
4587 * server.c (signal_pid): New variable.
4588 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 4589 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
4590 (attach_inferior): Set signal_pid.
4591
17574093
DJ
45922002-08-23 Daniel Jacobowitz <drow@mvista.com>
4593
4594 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4595
45962002-08-20 Jim Blandy <jimb@redhat.com>
4597
4598 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4599 default for this.
4600
46012002-08-01 Andrew Cagney <cagney@redhat.com>
4602
4603 * Makefile.in: Make chill references obsolete.
4604
46052002-07-24 Kevin Buettner <kevinb@redhat.com>
4606
4607 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4608 * configure: Regenerate.
4609 * config.in: Regenerate.
4610
46112002-07-09 David O'Brien <obrien@FreeBSD.org>
4612
4613 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4614 (perror_with_name, remote_close, remote_open, expect, play): Static.
4615
46162002-07-04 Michal Ludvig <mludvig@suse.cz>
4617
4b8dad4a 4618 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
4619 byte offsets instead of an array of indexes.
4620 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4621
46222002-06-13 Daniel Jacobowitz <drow@mvista.com>
4623
4624 * regcache.c: Add comment.
4625
46262002-06-11 Daniel Jacobowitz <drow@mvista.com>
4627
4628 * thread-db.c: New file.
4629 * proc-service.c: New file.
4630 * acinclude.m4: New file.
4631 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4632 proc-service.o, and thread-db.o.
4633 (linux-low.o): Add USE_THREAD_DB.
4634 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4635 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4636 * aclocal.m4: Regenerated.
4637 * config.in: Regenerated.
4638 * configure: Regenerated.
4639 * configure.in: Check for proc_service.h, sys/procfs.h,
4640 thread_db.h, and linux/elf.h headrs.
4641 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4642 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4643 Check for -lthread_db and thread support.
4644 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4645 PowerPC, and SuperH.
4646 * i387-fp.c: Constify arguments.
4647 * i387-fp.h: Likewise.
4648 * inferiors.c: (struct thread_info): Renamed from
4649 `struct inferior_info'. Remove PID member. Use generic inferior
4650 list header. All uses updated.
4651 (inferiors, signal_pid): Removed.
4652 (all_threads): New variable.
4653 (get_thread): Define.
4654 (add_inferior_to_list): New function.
4655 (for_each_inferior): New function.
4656 (change_inferior_id): New function.
4657 (add_inferior): Removed.
4658 (remove_inferior): New function.
4659 (add_thread): New function.
4660 (free_one_thread): New function.
4661 (remove_thread): New function.
4662 (clear_inferiors): Use for_each_inferior and free_one_thread.
4663 (find_inferior): New function.
4664 (find_inferior_id): New function.
4665 (inferior_target_data): Update argument type.
4666 (set_inferior_target_data): Likewise.
4667 (inferior_regcache_data): Likewise.
4668 (set_inferior_regcache_data): Likewise.
4669 * linux-low.c (linux_bp_reinsert): Remove.
4670 (all_processes, stopping_threads, using_thrads)
4671 (struct pending_signals, debug_threads, pid_of): New.
4672 (inferior_pid): Replace with macro.
4673 (struct inferior_linux_data): Remove.
4674 (get_stop_pc, add_process): New functions.
4675 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4676 Use add_process and add_thread.
4677 (linux_attach_lwp): New function, based on old linux_attach. Use
4678 add_process and add_thread. Set stop_expected for new threads.
4679 (linux_attach): New function.
4680 (linux_kill_one_process): New function.
4681 (linux_kill): Kill all LWPs.
4682 (linux_thread_alive): Use find_inferior_id.
4683 (check_removed_breakpoints, status_pending_p): New functions.
4684 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4685 Update. Use WNOHANG. Wait for cloned processes also. Update process
4686 struct for the found process.
4687 (linux_wait_for_event): New function.
4688 (linux_wait): Use it. Support LWPs.
4689 (send_sigstop, wait_for_sigstop, stop_all_processes)
4690 (linux_resume_one_process, linux_continue_one_process): New functions.
4691 (linux_resume): Support LWPs.
4692 (REGISTER_RAW_SIZE): Remove.
4693 (fetch_register): Use register_size instead. Call supply_register.
4694 (usr_store_inferior_registers): Likewise. Call collect_register.
4695 Fix recursive case.
4696 (regsets_fetch_inferior_registers): Improve error message.
4697 (regsets_store_inferior_registers): Add debugging.
4698 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4699 (unstopped_p, linux_signal_pid): New functions.
4700 (linux_target_ops): Add linux_signal_pid.
4701 (linux_init_signals): New function.
4702 (initialize_low): Call it. Initialize using_threads.
4703 * regcache.c (inferior_regcache_data): Add valid
4704 flag.
4705 (get_regcache): Fetch registers lazily. Add fetch argument
4706 and update all callers.
4707 (regcache_invalidate_one, regcache_invalidate): New
4708 functions.
4709 (new_register_cache): Renamed from create_register_cache.
4710 Return the new regcache.
4711 (free_register_cache): Change argument to a void *.
4712 (registers_to_string, registers_from_string): Call get_regcache
4713 with fetch flag set.
4714 (register_data): Make static. Pass fetch flag to get_regcache.
4715 (supply_register): Call get_regcache with fetch flag clear.
4716 (collect_register): Call get_regcache with fetch flag set.
4717 (collect_register_as_string): New function.
4718 * regcache.h: Update.
4719 * remote-utils.c (putpkt): Flush after debug output and use
4720 stderr.
4721 Handle input interrupts while waiting for an ACK.
4722 (input_interrupt): Use signal_pid method.
4723 (getpkt): Flush after debug output and use stderr.
4724 (outreg): Use collect_register_as_string.
4725 (new_thread_notify, dead_thread_notify): New functions.
4726 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4727 and general_thread.
4728 (look_up_one_symbol): Flush after debug output.
4729 * server.c (step_thread, server_waiting): New variables.
4730 (start_inferior): Don't use signal_pid. Update call to mywait.
4731 (attach_inferior): Update call to mywait.
4732 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4733 (main): Don't fetch/store registers explicitly. Use
4734 set_desired_inferior. Support proposed ``Hs'' packet. Update
4735 calls to mywait.
4736 * server.h: Update.
4737 (struct inferior_list, struct_inferior_list_entry): New.
4738 * target.c (set_desired_inferior): New.
4739 (write_inferior_memory): Constify.
4740 (mywait): New function.
4741 * target.h: Update.
4742 (struct target_ops): New signal_pid method.
4743 (mywait): Removed macro, added prototype.
4744
4745 * linux-low.h (regset_func): Removed.
4746 (regset_fill_func, regset_store_func): New.
4747 (enum regset_type): New.
4748 (struct regset_info): Add type field. Use new operation types.
4749 (struct linux_target_ops): stop_pc renamed to get_pc.
4750 Add decr_pc_after_break and breakpoint_at.
4751 (get_process, get_thread_proess, get_process_thread)
4752 (strut process_info, all_processes, linux_attach_lwp)
4753 (thread_db_init): New.
4754
4755 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4756 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4757 (the_low_target): Add new members.
4758 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4759 (i386_store_fpxregset): Constify.
4760 (target_regsets): Add new kind identifier.
4761 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4762 (i386_set_pc): Add debugging.
4763 (i386_breakpoint_at): New function.
4764 (the_low_target): Add new members.
4765 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4766 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4767 (mips_breakpoint_at): New.
4768 (the_low_target): Add new members.
4769 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4770 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4771 (the_low_target): Add new members.
4772 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4773 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4774 (the_low_target): Add new members.
4775 * linux-x86-64-low.c (target_regsets): Add new kind
4776 identifier.
4777
47782002-05-15 Daniel Jacobowitz <drow@mvista.com>
4779
4780 From Martin Pool <mbp@samba.org>:
4781 * server.c (gdbserver_usage): New function.
4782 (main): Call it.
4783
47842002-05-14 Daniel Jacobowitz <drow@mvista.com>
4785
4786 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4787 stop_at -> stop_pc.
4788
47892002-05-04 Andrew Cagney <ac131313@redhat.com>
4790
4791 * Makefile.in: Remove obsolete code.
4792
47932002-04-24 Michal Ludvig <mludvig@suse.cz>
4794
4795 * linux-low.c (regsets_fetch_inferior_registers),
4796 (regsets_store_inferior_registers): Removed cast to int from
4797 ptrace() calls.
4798 * regcache.h: Added declaration of struct inferior_info.
4799
48002002-04-20 Daniel Jacobowitz <drow@mvista.com>
4801
4802 * inferiors.c (struct inferior_info): Add regcache_data.
4803 (add_inferior): Call create_register_cache.
4804 (clear_inferiors): Call free_register_cache.
4805 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4806 * regcache.c (struct inferior_regcache_data): New.
4807 (registers): Remove.
4808 (get_regcache): New function.
4809 (create_register_cache, free_register_cache): New functions.
4810 (set_register_cache): Don't initialize the register cache here.
4811 (registers_to_string, registers_from_string, register_data): Call
4812 get_regcache.
4813 * regcache.h: Add prototypes.
4814 * server.h: Likewise.
4815
48162002-04-20 Daniel Jacobowitz <drow@mvista.com>
4817
4818 * mem-break.c: New file.
4819 * mem-break.h: New file.
4820 * Makefile.in: Add mem-break.o rule; update server.h
4821 dependencies.
4822 * inferiors.c (struct inferior_info): Add target_data
4823 member.
4824 (clear_inferiors): Free target_data member if set.
4825 (inferior_target_data, set_inferior_target_data): New functions.
4826 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4827 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4828 * linux-low.c (linux_bp_reinsert): New variable.
4829 (struct inferior_linux_data): New.
4830 (linux_create_inferior): Use set_inferior_target_data.
4831 (linux_attach): Likewise. Call add_inferior.
4832 (linux_wait_for_one_inferior): New function.
4833 (linux_wait): Call it.
4834 (linux_write_memory): Add const.
4835 (initialize_low): Call set_breakpoint_data.
4836 * linux-low.h (struct linux_target_ops): Add breakpoint
4837 handling members.
4838 * server.c (attach_inferior): Remove extra add_inferior
4839 call.
4840 * server.h: Include mem-break.h. Update inferior.c
4841 prototypes.
4842 * target.c (read_inferior_memory)
4843 (write_inferior_memory): New functions.
4844 * target.h (read_inferior_memory)
4845 (write_inferior_memory): Change macros to prototypes.
4846 (struct target_ops): Update comments. Add const to write_memory
4847 definition.
4848
48492002-04-11 Daniel Jacobowitz <drow@mvista.com>
4850
4851 * linux-low.c (usr_store_inferior_registers): Support
4852 registers which are allowed to fail to store.
4853 * linux-low.h (linux_target_ops): Likewise.
4854 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4855 (ppc_cannot_store_register): FPSCR may not be storable.
4856
48572002-04-09 Daniel Jacobowitz <drow@mvista.com>
4858
4859 * server.h: Include <string.h> if HAVE_STRING_H.
4860 * ChangeLog: Correct paths in last ChangeLog entry.
4861
48622002-04-09 Daniel Jacobowitz <drow@mvista.com>
4863
4864 * linux-low.h: Remove obsolete prototypes.
4865 (struct linux_target_ops): New.
4866 (extern the_low_target): New.
4867 * linux-low.c (num_regs, regmap): Remove declarations.
4868 (register_addr): Use the_low_target explicitly.
4869 (fetch_register): Likewise.
4870 (usr_fetch_inferior_registers): Likewise.
4871 (usr_store_inferior_registers): Likewise.
4872 * linux-arm-low.c (num_regs): Remove.
4873 (arm_num_regs): Define.
4874 (arm_regmap): Renamed from regmap, made static.
4875 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4876 made static.
4877 (arm_cannot_store_register): Renamed from cannot_store_register,
4878 made static.
4879 (the_low_target): New.
4880 * linux-i386-low.c (num_regs): Remove.
4881 (i386_num_regs): Define.
4882 (i386_regmap): Renamed from regmap, made static.
4883 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4884 made static.
4885 (i386_cannot_store_register): Renamed from cannot_store_register,
4886 made static.
4887 (the_low_target): New.
4888 * linux-ia64-low.c (num_regs): Remove.
4889 (ia64_num_regs): Define.
4890 (ia64_regmap): Renamed from regmap, made static.
4891 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4892 made static.
4893 (ia64_cannot_store_register): Renamed from cannot_store_register,
4894 made static.
4895 (the_low_target): New.
4896 * linux-m68k-low.c (num_regs): Remove.
4897 (m68k_num_regs): Define.
4898 (m68k_regmap): Renamed from regmap, made static.
4899 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4900 made static.
4901 (m68k_cannot_store_register): Renamed from cannot_store_register,
4902 made static.
4903 (the_low_target): New.
4904 * linux-mips-low.c (num_regs): Remove.
4905 (mips_num_regs): Define.
4906 (mips_regmap): Renamed from regmap, made static.
4907 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4908 made static.
4909 (mips_cannot_store_register): Renamed from cannot_store_register,
4910 made static.
4911 (the_low_target): New.
4912 * linux-ppc-low.c (num_regs): Remove.
4913 (ppc_num_regs): Define.
4914 (ppc_regmap): Renamed from regmap, made static.
4915 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4916 made static.
4917 (ppc_cannot_store_register): Renamed from cannot_store_register,
4918 made static.
4919 (the_low_target): New.
4920 * linux-s390-low.c (num_regs): Remove.
4921 (s390_num_regs): Define.
4922 (s390_regmap): Renamed from regmap, made static.
4923 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4924 made static.
4925 (s390_cannot_store_register): Renamed from cannot_store_register,
4926 made static.
4927 (the_low_target): New.
4928 * linux-sh-low.c (num_regs): Remove.
4929 (sh_num_regs): Define.
4930 (sh_regmap): Renamed from regmap, made static.
4931 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4932 made static.
4933 (sh_cannot_store_register): Renamed from cannot_store_register,
4934 made static.
4935 (the_low_target): New.
4936 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4937 (the_low_target): New.
4938
49392002-04-09 Daniel Jacobowitz <drow@mvista.com>
4940
4941 * Makefile.in: Add stamp-h target.
4942 * configure.in: Create stamp-h.
4943 * configure: Regenerated.
4944
49452002-04-09 Daniel Jacobowitz <drow@mvista.com>
4946
4947 * inferiors.c: New file.
4948 * target.c: New file.
4949 * target.h: New file.
4950 * Makefile.in: Add target.o and inferiors.o. Update
4951 dependencies.
4952 * linux-low.c (inferior_pid): New static variable,
4953 moved from server.c.
4954 (linux_create_inferior): Renamed from create_inferior.
4955 Call add_inferior. Return 0 on success instead of a PID.
4956 (linux_attach): Renamed from myattach.
4957 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4958 (linux_thread_alive): Renamed from mythread_alive.
4959 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4960 child dies.
4961 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4962 (regsets_store_inferior_registers): Correct error message.
4963 Add missing ``return 0''.
4964 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4965 (linux_store_registers): Renamed from store_inferior_registers.
4966 (linux_read_memory): Renamed from read_inferior_memory.
4967 (linux_write_memory): Renamed from write_inferior_memory.
4968 (linux_target_ops): New structure.
4969 (initialize_low): Call set_target_ops ().
4970 * remote-utils.c (unhexify): New function.
4971 (hexify): New function.
4972 (input_interrupt): Send signals to ``signal_pid''.
4973 * server.c (inferior_pid): Remove.
4974 (start_inferior): Update create_inferior call.
4975 (attach_inferior): Call add_inferior.
4976 (handle_query): New function.
4977 (main): Call handle_query for `q' packets.
4978 * server.h: Include "target.h". Remove obsolete prototypes.
4979 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4980
49812002-04-09 Daniel Jacobowitz <drow@mvista.com>
4982
4983 * Makefile.in: Add WARN_CFLAGS. Update configury
4984 dependencies.
4985 * configure.in: Check for <string.h>
4986 * configure: Regenerate.
4987 * config.in: Regenerate.
4988 * gdbreplay.c: Include needed system headers.
4989 (remote_open): Remove strchr prototype.
4990 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4991 * regcache.c (supply_register): Change buf argument to const void *.
4992 (supply_register_by_name): Likewise.
4993 (collect_register): Change buf argument to void *.
4994 (collect_register_by_name): Likewise.
4995 * regcache.h: Add missing prototypes.
4996 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4997 * server.c (handle_query): New function.
4998 (attached): New static variable, moved out of main.
4999 (main): Quiet longjmp clobber warnings.
5000 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5001 * utils.c (error): Remove NORETURN.
5002 (fatal): Likewise.
This page took 0.836762 seconds and 4 git commands to generate.