]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
*** empty log message ***
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
aa5ca48f
DE
12009-06-30 Doug Evans <dje@google.com>
2 Pierre Muller <muller@ics.u-strasbg.fr>
3
4 Add h/w watchpoint support to x86-linux, win32-i386.
5 * Makefile.in (SFILES): Add i386-low.c
6 (i386_low_h): Define.
7 (i386-low.o): Add dependencies.
8 (linux-x86-low.o): Add i386-low.h dependency.
9 (win32-i386-low.o): Ditto.
10 * i386-low.c: New file.
11 * i386-low.h: New file.
12 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14 * linux-low.c (linux_add_process): Initialize arch_private.
15 (linux_remove_process): Free arch_private.
16 (add_lwp): Initialize arch_private.
17 (delete_lwp): Free arch_private.
18 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19 provided.
20 * linux-low.h (process_info_private): New member arch_private.
21 (lwp_info): New member arch_private.
22 (linux_target_ops): New members new_process, new_thread,
23 prepare_to_resume.
24 (ptid_of): New macro.
25 * linux-x86-low.c: Include stddef.h, i386-low.h.
26 (arch_process_info): New struct.
27 (arch_lwp_info): New struct.
28 (x86_linux_dr_get, x86_linux_dr_set): New functions.
29 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
30 (i386_dr_low_get_status): New function.
31 (x86_insert_point, x86_remove_point): New functions.
32 (x86_stopped_by_watchpoint): New function.
33 (x86_stopped_data_address): New function.
34 (x86_linux_new_process, x86_linux_new_thread): New functions.
35 (x86_linux_prepare_to_resume): New function.
36 (the_low_target): Add entries for insert_point, remove_point,
37 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
38 prepare_to_resume.
39 * server.c (debug_hw_points): New global.
40 (monitor_show_help): Document set debug-hw-points.
41 (handle_query): Process "set debug-hw-points".
42 * server.h (debug_hw_points): Declare.
43 (paddress): Declare.
44 * utils.c (NUMCELLS, CELLSIZE): New macros.
45 (get_sell, xsnprintf, paddress): New functions.
46 * win32-arm-low.c (the_low_target): Add entries for insert_point,
47 remove_point, stopped_by_watchpoint, stopped_data_address.
48 * win32-i386-low.c: Include i386-low.h.
49 (debug_reg_state): Replaces dr.
50 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
51 (i386_dr_low_get_status): New function.
52 (i386_insert_point, i386_remove_point): New functions.
53 (i386_stopped_by_watchpoint): New function.
54 (i386_stopped_data_address): New function.
55 (i386_initial_stuff): Update.
56 (get_thread_context,set_thread_context,i386_thread_added): Update.
57 (the_low_target): Add entries for insert_point,
58 remove_point, stopped_by_watchpoint, stopped_data_address.
59 * win32-low.c (win32_insert_watchpoint): New function.
60 (win32_remove_watchpoint): New function.
61 (win32_stopped_by_watchpoint): New function.
62 (win32_stopped_data_address): New function.
63 (win32_target_ops): Add entries for insert_watchpoint,
64 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
65 * win32-low.h (win32_target_ops): New members insert_point,
66 remove_point, stopped_by_watchpoint, stopped_data_address.
67
d993e290
PA
682009-06-25 Pedro Alves <pedro@codesourcery.com>
69
70 * server.c (process_serial_event): Re-return unsupported, not
71 error, if the type isn't recognized. Re-allow supporting only
72 insert or remove packets. Also call require_running for
73 breakpoints. Add missing break statement to default case. Tidy.
74 * target.h (struct target_ops): Rename insert_watchpoint to
75 insert_point, and remove_watchpoint to remove_point.
76
77 * linux-low.h (struct linux_target_ops): Likewise.
78 * linux-low.c (linux_insert_watchpoint): Rename to ...
79 (linux_insert_point): ... this. Adjust.
80 (linux_remove_watchpoint): Rename to ...
81 (linux_remove_point): ... this. Adjust.
82 (linux_target_ops): Adjust.
83 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
84 (cris_insert_point): ... this.
85 (cris_remove_watchpoint): Rename to ...
86 (cris_remove_point): ... this.
87 (the_low_target): Adjust.
88
0f54c268
PM
892009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
90
91 * server.c (handle_v_kill): Pass signal_pid to
92 kill_inferior if multi_process is zero.
93
c6314022
AR
942009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
95
96 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
97 * target.h (target_ops): Comment for *_watchpoint to make it clear
98 the functions can get types '0' and '1'.
99
4463ce24
AR
1002009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
101
102 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
103 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
104 * regcache.c (get_regcache): Likewise.
105 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
106 * win32-low.c (child_fetch_inferior_registers): Remove check for
107 regno 0.
108
cf8fd78b
PA
1092009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
110 Pedro Alves <pedro@codesourcery.com>
111
112 * target.h (struct target_ops) <supports_multi_process>: New
113 callback.
114 (target_supports_multi_process): New.
115 * server.c (handle_query): Even if GDB reports support, only
116 enable multi-process if the target also supports it. Report
117 multi-process support only if the target backend supports it.
118 * linux-low.c (linux_supports_multi_process): New function.
119 (linux_target_ops): Install it as target_supports_multi_process
120 callback.
121
47c0c975
DE
1222009-05-24 Doug Evans <dje@google.com>
123
e09875d4
DE
124 Global renaming of find_thread_pid to find_thread_ptid.
125 * server.h (find_thread_ptid): Renamed from find_thread_pid.
126 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
127 All callers updated.
128
e27d73f6
DE
129 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
130 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
131 directly.
132
47c0c975
DE
133 * linux-low.c (get_stop_pc): Print pc if debug_threads.
134 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
135 (linux_resume_one_lwp): Ditto.
136
2acc282a
DE
1372009-05-23 Doug Evans <dje@google.com>
138
139 * linux-low.c (linux_resume_one_lwp): Change type of first arg
140 from struct inferior_list_entry * to struct lwp_info *.
141 All callers updated.
142
9f1036c1
DE
1432009-05-13 Doug Evans <dje@google.com>
144
145 * linux-x86-low.c: Don't include assert.h.
146 (x86_siginfo_fixup): Use fatal, not assert.
147 (x86_arch_setup): Fix comment.
148
d0722149
DE
1492009-05-12 Doug Evans <dje@google.com>
150
151 Biarch support for i386/amd64 gdbserver.
152 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
153 Add linux-x86-low.c.
154 (linux-i386-low.o, linux-x86-64-low.o): Delete.
155 (linux-x86-low.o): Add.
156 * linux-x86-64-low.c: Delete.
157 * linux-i386-low.c: Delete.
158 * linux-x86-low.c: New file.
159 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
160 linux-x86-low.o.
161 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
162 linux-x86-low.o.
163 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
164 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
165 (linux_child_pid_to_exec_file): New function.
166 (elf_64_header_p, elf_64_file_p): New functions.
167 (siginfo_fixup): New function.
168 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
169 give target a chance to convert layout.
170 * linux-low.h (linux_target_ops): New member siginfo_fixup.
171 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
172
fdeb2a12
DE
1732009-05-07 Doug Evans <dje@google.com>
174
175 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
176 (regsets_store_inferior_registers): Ditto.
177
a6dbe5df
PA
1782009-05-06 Pedro Alves <pedro@codesourcery.com>
179
180 PR server/10048
181
182 * linux-low.c (must_set_ptrace_flags): Delete.
183 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
184 of the global.
185 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
186 `lwp->must_set_ptrace_flags' instead.
ba42693b 187 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
188 (linux_wait_1): ... not here.
189
5091eb23
DE
1902009-04-30 Doug Evans <dje@google.com>
191
9f767825
DE
192 * inferiors.c (started_inferior_callback): New function.
193 (attached_inferior_callback): New function.
194 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
195 * server.c (print_started_pid, print_attached_pid): New functions.
196 (detach_or_kill_for_exit): New function.
197 (main): Call it instead of for_each_inferior (kill_inferior_callback).
198 * server.h (have_started_inferiors_p): Declare.
199 (have_attached_inferiors_p): Declare.
200
5091eb23
DE
201 * inferiors.c (remove_process): Fix memory leak, free process.
202 * linux-low.c (linux_remove_process): New function.
203 (linux_kill): Call it instead of remove_process.
204 (linux_detach, linux_wait_1): Ditto.
205
155c8968
PA
2062009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
207
208 * configure.srv: Add x86 Windows CE target.
209
7fe519cb
UW
2102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
211
212 * inferiors.c (get_thread_process): Make global.
213 * server.h (get_thread_process): Add prototype.
214 * thread-db.c (find_one_thread): Use get_thread_process
215 instead of current_process.
216 (thread_db_get_tls_address): Do not crash if called when
217 thread layer is not yet initialized.
218
5472f405
UW
2192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
220
221 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
222 * spu-low.c (current_tid): Rename to ...
223 (current_ptid): ... this.
224 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
225 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
226 ptid_get_lwp (current_ptid) instead of current_tid.
227 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
228 instead of current_tid. Use find_process_pid to verify pid
229 argument is valid. Pass proper argument to remove_process.
230 (spu_thread_alive): Compare current_ptid instead of current_tid.
231 (spu_resume): Likewise.
232
55ac2b99
PA
2332009-04-02 Pedro Alves <pedro@codesourcery.com>
234
235 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
236 variable.
237
95954743
PA
2382009-04-01 Pedro Alves <pedro@codesourcery.com>
239
240 Implement the multiprocess extensions, and add linux multiprocess
241 support.
242
243 * server.h (ULONGEST): Declare.
244 (struct ptid, ptid_t): New.
245 (minus_one_ptid, null_ptid): Declare.
246 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
247 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
248 (struct inferior_list_entry): Change `id' type from unsigned from
249 to ptid_t.
250 (struct sym_cache, struct breakpoint, struct
251 process_info_private): Forward declare.
252 (struct process_info): Declare.
253 (current_process): Declare.
254 (all_processes): Declare.
255 (initialize_inferiors): Declare.
256 (add_thread): Adjust to use ptid_t.
257 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
258 (add_process, remove_process, find_thread_pid): Declare.
259 (find_inferior_id): Adjust to use ptid_t.
260 (cont_thread, general_thread, step_thread): Change type to ptid_t.
261 (multi_process): Declare.
262 (push_event): Adjust to use ptid_t.
263 (read_ptid, write_ptid): Declare.
264 (prepare_resume_reply): Adjust to use ptid_t.
265 (clear_symbol_cache): Declare.
266 * inferiors.c (all_processes): New.
267 (null_ptid, minus_one_ptid): New.
268 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
269 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
270 (add_thread): Change unsigned long to ptid. Remove gdb_id
271 parameter. Adjust.
272 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
273 (gdb_id_to_thread): Rename to ...
274 (find_thread_pid): ... this. Change unsigned long to ptid.
275 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
276 (loaded_dll, pull_pid_from_list): Adjust.
277 (add_process, remove_process, find_process_pid)
278 (get_thread_process, current_process, initialize_inferiors): New.
279 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
280 (struct target_waitstatus) <related_pid>: Ditto.
281 (struct target_ops) <kill, detach>: Add `pid' argument. Change
282 return type to int.
283 (struct target_ops) <join>: Add `pid' argument.
284 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
285 (struct target_ops) <wait>: Add `ptid' field. Change return type
286 to ptid.
287 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
288 (mywait): Add `ptid' argument. Change return type to ptid_t.
289 (target_pid_to_str): Declare.
290 * target.c (set_desired_inferior): Adjust to use ptids.
291 (mywait): Add new `ptid' argument. Adjust.
292 (target_pid_to_str): New.
293 * mem-break.h (free_all_breakpoints): Declare.
294 * mem-break.c (breakpoints): Delelete.
295 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
296 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
297 to use per-process breakpoint list.
298 (free_all_breakpoints): New.
299 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
300 (symbol_cache, all_symbols_looked_up): Delete.
301 (hexchars): New.
302 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
303 read_ptid): New.
304 (prepare_resume_reply): Change ptid argument's type from unsigned
305 long to ptid_t. Adjust. Implement W;process and X;process.
306 (free_sym_cache, clear_symbol_cache): New.
307 (look_up_one_symbol): Adjust to per-process symbol cache. *
308 * server.c (cont_thread, general_thread, step_thread): Change type
309 to ptid_t.
310 (attached): Delete.
311 (multi_process): New.
312 (last_ptid): Change type to ptid_t.
313 (struct vstop_notif) <ptid>: Change type to ptid_t.
314 (queue_stop_reply, push_event): Change `ptid' argument's type to
315 ptid_t.
316 (discard_queued_stop_replies): Add `pid' argument.
317 (start_inferior): Adjust to use ptids. Adjust to mywait interface
318 changes. Don't reference the `attached' global.
319 (attach_inferior): Adjust to mywait interface changes.
320 (handle_query): Adjust to use ptids. Parse GDB's qSupported
321 features. Handle and report "multiprocess+". Handle
322 "qAttached:PID".
323 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
324 changes.
325 (handle_v_kill): New.
326 (handle_v_stopped): Adjust to use target_pid_to_str.
327 (handle_v_requests): Allow multiple attaches and runs when
328 multiprocess extensions are in effect. Handle "vKill".
329 (myresume): Adjust to use ptids.
330 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
331 (handle_status): Adjust to discard_queued_stop_replies interface
332 change.
333 (first_thread_of, kill_inferior_callback)
334 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
335 (main): Call initialize_inferiors. Adjust to use ptids, killing
336 and detaching from all inferiors. Handle multiprocess packet
337 variants.
338 * linux-low.h: Include gdb_proc_service.h.
339 (struct process_info_private): New.
340 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
341 <lwpid_of>: Use ptid_get_lwp.
342 (get_lwp_thread): Adjust.
343 (struct lwp_info): Add `dead' member.
344 (find_lwp_pid): Declare.
345 * linux-low.c (thread_db_active): Delete.
346 (new_inferior): Adjust comment.
347 (inferior_pid): Delete.
348 (linux_add_process): New.
349 (handle_extended_wait): Adjust.
350 (add_lwp): Change unsigned long to ptid.
351 (linux_create_inferior): Add process to processes table. Adjust
352 to use ptids. Don't set new_inferior here.
353 (linux_attach_lwp): Rename to ...
354 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
355 it. Adjust to use ptids.
356 (linux_attach_lwp): New.
357 (linux_attach): Add process to processes table. Don't set
358 new_inferior here.
359 (struct counter): New.
360 (second_thread_of_pid_p, last_thread_of_process_p): New.
361 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
362 multiple processes.
363 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
364 processes. Remove process from process table.
365 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
366 to multiple processes.
367 (any_thread_of): New.
368 (linux_detach): Add `pid' argument, and handle it. Remove process
369 from processes table.
370 (linux_join): Add `pid' argument. Handle it.
371 (linux_thread_alive): Change unsighed long argument to ptid_t.
372 Consider dead lwps as not being alive.
373 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
374 threads we're not interested in.
375 (same_lwp, find_lwp_pid): New.
376 (linux_wait_for_lwp): Change `pid' argument's type from int to
377 ptid_t. Adjust.
378 (linux_wait_for_event): Rename to ...
379 (linux_wait_for_event_1): ... this. Change `pid' argument's type
380 from int to ptid_t. Adjust.
381 (linux_wait_for_event): New.
382 (linux_wait_1): Add `ptid' argument. Change return type to
383 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
384 that exit from the process table.
385 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
386 Adjust.
387 (mark_lwp_dead): New.
388 (wait_for_sigstop): Adjust to use ptids. If a process exits while
389 stopping all threads, mark its main lwp as dead.
390 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
391 ptids.
392 (fetch_register, usr_store_inferior_registers)
393 (regsets_fetch_inferior_registers)
394 (regsets_store_inferior_registers, linux_read_memory)
395 (linux_write_memory): Inline `inferior_pid'.
396 (linux_look_up_symbols): Adjust to use per-process
397 `thread_db_active'.
398 (linux_request_interrupt): Adjust to use ptids.
399 (linux_read_auxv): Inline `inferior_pid'.
400 (initialize_low): Don't reference thread_db_active.
401 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
402 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
403 (ps_getpid): Return the pid of the current inferior.
404 * thread-db.c (proc_handle, thread_agent): Delete.
405 (thread_db_create_event, thread_db_enable_reporting): Adjust to
406 per-process data.
407 (find_one_thread): Change argument type to ptid_t. Adjust to
408 per-process data.
409 (maybe_attach_thread): Adjust to per-process data and ptids.
410 (thread_db_find_new_threads): Ditto.
411 (thread_db_init): Ditto.
412 * spu-low.c (spu_create_inferior, spu_attach): Add process to
413 processes table. Adjust to use ptids.
414 (spu_kill, spu_detach): Adjust interface. Remove process from
415 processes table.
416 (spu_join, spu_thread_alive): Adjust interface.
417 (spu_wait): Adjust interface. Remove process from processes
418 table. Adjust to use ptids.
419 * win32-low.c (current_inferior_tid): Delete.
420 (current_inferior_ptid): New.
421 (debug_event_ptid): New.
422 (thread_rec): Take a ptid. Adjust.
423 (child_add_thread): Add `pid' argument. Adjust to use ptids.
424 (child_delete_thread): Ditto.
425 (do_initial_child_stuff): Add `attached' argument. Add process to
426 processes table.
427 (child_fetch_inferior_registers, child_store_inferior_registers):
428 Adjust.
429 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
430 (win32_attach): Pass 1 to do_initial_child_stuff.
431 (win32_kill): Adjust interface. Remove process from processes
432 table.
433 (win32_detach): Ditto.
434 (win32_join): Adjust interface.
435 (win32_thread_alive): Take a ptid.
436 (win32_resume): Adjust to use ptids.
437 (get_child_debug_event): Ditto.
438 (win32_wait): Adjust interface. Remove exiting process from
439 processes table.
440
bd99dc85
PA
4412009-04-01 Pedro Alves <pedro@codesourcery.com>
442
443 Non-stop mode support.
444
445 * server.h (non_stop): Declare.
446 (gdb_client_data, handler_func): Declare.
447 (delete_file_handler, add_file_handler, start_event_loop):
448 Declare.
449 (handle_serial_event, handle_target_event, push_event)
450 (putpkt_notif): Declare.
451 * target.h (enum resume_kind): New.
452 (struct thread_resume): Replace `step' field by `kind' field.
453 (TARGET_WNOHANG): Define.
454 (struct target_ops) <wait>: Add `options' argument.
455 <supports_non_stop, async, start_non_stop>: New fields.
456 (target_supports_non_stop, target_async): New.
457 (start_non_stop): Declare.
458 (mywait): Add `options' argument.
459 * target.c (mywait): Add `options' argument. Print child exit
460 notifications here.
461 (start_non_stop): New.
462 * server.c (non_stop, own_buf, mem_buf): New globals.
463 (struct vstop_notif): New.
464 (notif_queue): New global.
465 (queue_stop_reply, push_event, discard_queued_stop_replies)
466 (send_next_stop_reply): New.
467 (start_inferior): Adjust to use resume_kind. Adjust to mywait
468 interface changes.
469 (attach_inferior): In non-stop mode, don't wait for the target
470 here.
471 (handle_general_set): Handle QNonStop.
472 (handle_query): When handling qC, return the current general
473 thread, instead of the first thread of the list.
474 (handle_query): If the backend supports non-stop mode, include
475 QNonStop+ in the qSupported query response.
476 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
477 and non-stop mode.
478 (handle_v_attach, handle_v_run): Handle non-stop mode.
479 (handle_v_stopped): New.
480 (handle_v_requests): Report support for vCont;t. Handle vStopped.
481 (myresume): Adjust to use resume_kind. Handle non-stop.
482 (queue_stop_reply_callback): New.
483 (handle_status): Handle non-stop mode.
484 (main): Clear non_stop flag on reconnection. Use the event-loop.
485 Refactor serial protocol handling from here ...
486 (process_serial_event): ... to this new function. When GDB
487 selects any thread, select one here. In non-stop mode, wait until
488 GDB acks all pending events before exiting.
489 (handle_serial_event, handle_target_event): New.
490 * remote-utils.c (remote_open): Install remote_desc in the event
491 loop.
492 (remote_close): Remove remote_desc from the event loop.
493 (putpkt_binary): Rename to...
494 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
495 (putpkt_binary): New as wrapper around putpkt_binary_1.
496 (putpkt_notif): New.
497 (prepare_resume_reply): In non-stop mode, don't change the
498 general_thread.
499 * event-loop.c: New.
500 * Makefile.in (OBJ): Add event-loop.o.
501 (event-loop.o): New rule.
502
503 * linux-low.h (pid_of): Moved here.
504 (lwpid_of): New.
505 (get_lwp_thread): Use lwpid_of.
506 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
507 * linux-low.c (pid_of): Delete.
508 (inferior_pid): Use lwpid_of.
509 (linux_event_pipe): New.
510 (target_is_async_p): New.
511 (delete_lwp): New.
512 (handle_extended_wait): Use lwpid_of.
513 (add_lwp): Don't set lwpid field.
514 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
515 (linux_kill_one_lwp): If killing a running lwp, stop it first.
516 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
517 (linux_detach_one_lwp): If detaching from a running lwp, stop it
518 first. Adjust to linux_wait_for_event interface changes. Use
519 lwpid_of.
520 (linux_detach): Don't delete the main lwp here.
521 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
522 (status_pending_p): Don't consider explicitly suspended lwps.
523 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
524 pointer. Add OPTIONS argument. Change return type to int. Use
525 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
526 (linux_wait_for_event): Take an integer pid instead of a lwp_info
527 pointer. Add status pointer argument. Return a pid instead of a
528 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
529 changes. In non-stop mode, don't switch to a random thread.
530 (linux_wait): Rename to...
531 (linux_wait_1): ... this. Add target_options argument, and handle
532 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
533 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
534 clean exit and signal exit code. Don't stop all threads in
535 non-stop mode. In all-stop mode, only stop all threads when
536 reporting a stop to GDB. Handle explicit thread stop requests.
537 (async_file_flush, async_file_mark): New.
538 (linux_wait): New.
539 (send_sigstop): Use lwpid_of.
540 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
541 interface changes. In non-stop mode, don't switch to a random
542 thread.
543 (linux_resume_one_lwp): Use lwpid_of.
544 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
545 (linux_resume_one_thread): ... this. Handle resume_stop. In
546 non-stop mode, don't look for pending flag in all threads.
547 (resume_status_pending_p): Don't consider explicitly suspended
548 threads.
549 (my_waitpid): Reimplement. Emulate __WALL.
550 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
551 Use lwpid_of.
552 (sigchld_handler, linux_supports_non_stop, linux_async)
553 (linux_start_non_stop): New.
554 (linux_target_ops): Register linux_supports_non_stop, linux_async
555 and linux_start_non_stop.
556 (initialize_low): Install SIGCHLD handler.
557 * thread-db.c (thread_db_create_event, find_one_thread)
558 (thread_db_get_tls_address): Use lwpid_of.
559 * win32-low.c (win32_detach): Adjust to use resume_kind.
560 (win32_wait): Add `options' argument.
561 * spu-low.c (spu_resume): Adjust to use resume_kind.
562 (spu_wait): Add `options' argument.
563
5b1c542e
PA
5642009-04-01 Pedro Alves <pedro@codesourcery.com>
565
566 Decouple target code from remote protocol.
567
568 * target.h (enum target_waitkind): New.
569 (struct target_waitstatus): New.
570 (struct target_ops) <wait>: Return an unsigned long. Take a
571 target_waitstatus pointer instead of a char pointer.
572 (mywait): Likewise.
573 * target.c (mywait): Change prototype to return an unsigned long.
574 Take a target_waitstatus pointer instead of a char pointer. Adjust.
575 * server.h (thread_from_wait, old_thread_from_wait): Delete
576 declarations.
577 (prepare_resume_reply): Change prototype to take a
578 target_waitstatus.
579 * server.c (thread_from_wait, old_thread_from_wait): Delete.
580 (last_status, last_ptid): New.
581 (start_inferior): Remove "statusptr" argument. Adjust. Return a
582 pid instead of a signal.
583 (attach_inferior): Remove "status" and "signal" parameters.
584 Adjust.
585 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
586 not as an address.
587 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
588 (handle_v_requests, myresume): Remove "status" and "signal"
589 parameters. Adjust.
590 (handle_status): New.
591 (main): Delete local `status'. Adjust.
592 * remote-utils.c: Include target.h.
593 (prepare_resume_reply): Change prototype to take a
594 target_waitstatus. Adjust.
595
596 * linux-low.c (linux_wait): Adjust to new target_ops->wait
597 interface.
598 * spu-low.c (spu_wait): Adjust.
599 * win32-low.c (enum target_waitkind, struct target_waitstatus):
600 Delete.
601 (win32_wait): Adjust.
602
2bd7c093
PA
6032009-04-01 Pedro Alves <pedro@codesourcery.com>
604
605 * target.h (struct thread_resume): Delete leave_stopped member.
606 (struct target_ops): Add a `n' argument to the `resume' callback.
607 * server.c (start_inferior): Adjust.
608 (handle_v_cont, myresume): Adjust.
609 * linux-low.c (check_removed_breakpoint): Adjust to resume
610 interface change, and to removed leave_stopped field.
611 (resume_ptr): Delete.
612 (struct thread_resume_array): New.
613 (linux_set_resume_request): Add new `arg' parameter. Adjust to
614 resume interface change.
615 (linux_continue_one_thread, linux_queue_one_thread)
616 (resume_status_pending_p): Check if the resume field is NULL
617 instead of checking the leave_stopped member.
618 (linux_resume): Adjust to the target resume interface change.
619 * spu-low.c (spu_resume): Adjust to the target resume interface
620 change.
621 * win32-low.c (win32_detach, win32_resume): Ditto.
622
c35fafde
PA
6232009-04-01 Pedro Alves <pedro@codesourcery.com>
624
625 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
626 flag.
627 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
628 pending.
629 (linux_continue_one_thread): Only preserve the stepping flag if
630 there's a pending breakpoint.
631
0a59d50b
PA
6322009-03-31 Pedro Alves <pedro@codesourcery.com>
633
634 * server.c (main): After the inferior having exited, call
635 remote_close before exiting gdbserver.
636
f04c6d38
TJB
6372009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
638
639 Fix size of FPSCR in Power 7 processors.
640 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
641 (PPC_FEATURE_HAS_DFP): New #define.
642 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
643 size of the FPSCR.
644
78e5cee6
PA
6452009-03-23 Pedro Alves <pedro@codesourcery.com>
646
647 * server.c (handle_query) Whitespace and formatting.
648
1b3f6016
PA
6492009-03-22 Pedro Alves <pedro@codesourcery.com>
650
651 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
652 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
653 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
654 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
655 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
656 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
657 Makefile.in, configure.ac: Fix whitespace throughout.
658 * configure: Regenerate.
659
a07b2135
PA
6602009-03-22 Pedro Alves <pedro@codesourcery.com>
661
662 * inferiors.c (find_inferior): Make it safe for the callback
663 function to delete the currently iterated inferior.
664
67cc2626
PA
6652009-03-22 Pedro Alves <pedro@codesourcery.com>
666
667 * Makefile.in (linuw_low_h): Move higher.
668 (thread-db.o): Depend on $(linux_low_h).
669
54a0b537
PA
6702009-03-17 Pedro Alves <pedro@codesourcery.com>
671
672 Rename "process" to "lwp" throughout.
673
674 * linux-low.c (all_processes): Rename to...
675 (all_lwps): ... this.
676 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
677 (add_process): Rename to ...
678 (add_lwp): ... this. Adjust.
679 (linux_create_inferior): Adjust.
680 (linux_attach_lwp): Adjust.
681 (linux_attach): Adjust.
682 (linux_kill_one_process): Rename to ...
683 (linux_kill_one_lwp): ... this. Adjust.
684 (linux_kill): Adjust.
685 (linux_detach_one_process): Rename to ...
686 (linux_detach_one_lwp): ... this. Adjust.
687 (linux_detach): Adjust.
688 (check_removed_breakpoint): Adjust.
689 (status_pending_p): Adjust.
690 (linux_wait_for_process): Rename to ...
691 (linux_wait_for_lwp): ... this. Adjust.
692 (linux_wait_for_event): Adjust.
693 (send_sigstop): Adjust.
694 (wait_for_sigstop): Adjust.
695 (stop_all_processes): Rename to ...
696 (stop_all_lwps): ... this.
697 (linux_resume_one_process): Rename to ...
698 (linux_resume_one_lwp): ... this. Adjust.
699 (linux_set_resume_request, linux_continue_one_thread)
700 (linux_queue_one_thread, resume_status_pending_p)
701 (usr_store_inferior_registers, regsets_store_inferior_registers)
702 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
703 Adjust.
704 * linux-low.h (get_process): Rename to ...
705 (get_lwp): ... this. Adjust.
706 (get_thread_process): Rename to ...
707 (get_thread_lwp): ... this. Adjust.
708 (get_process_thread): Rename to ...
709 (get_lwp_thread): ... this. Adjust.
710 (struct process_info): Rename to ...
711 (struct lwp_info): ... this.
712 (all_processes): Rename to ...
713 (all_lwps): ... this.
714 * proc-service.c (ps_lgetregs): Adjust.
715 * thread-db.c (thread_db_create_event, find_one_thread)
716 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
717
0b16c5cf
PA
7182009-03-14 Pedro Alves <pedro@codesourcery.com>
719
720 * server.c (handle_query): Handle "qAttached".
721
32de4b9d
NS
7222009-03-13 Nathan Sidwell <nathan@codesourcery.com>
723
724 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
725 GPLv3, update license URL.
726
2aecd87f
DE
7272009-03-01 Doug Evans <dje@google.com>
728
93efd302 729 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
730 (server_h): Add gdb_signals.h.
731 (signals.o): Update.
732 * server.h (target_signal_from_host,target_signal_to_host_p)
733 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
734
86b1f9c5
PM
7352009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
736
737 * remote-utils.c (getpkt): Also generate remote-debug
738 information if noack_mode is set.
739
4aa995e1
PA
7402009-02-06 Pedro Alves <pedro@codesourcery.com>
741
742 * server.c (handle_query): Report qXfer:siginfo:read and
743 qXfer:siginfo:write as supported and handle them.
744 * target.h (struct target_ops) <qxfer_siginfo>: New field.
745 * linux-low.c (linux_xfer_siginfo): New.
746 (linux_target_ops): Set it.
747
62709adf
PA
7482009-01-26 Pedro Alves <pedro@codesourcery.com>
749
750 * server.c (gdbserver_usage): Mention --remote-debug.
751 (main): Accept '--remote-debug' switch.
752
aef93bd7
DE
7532009-01-18 Doug Evans <dje@google.com>
754
755 * regcache.c (new_register_cache): No need to check result of xcalloc.
756 * server.c (handle_search_memory): Back out calls to xmalloc,
757 result is checked and error is returned to user upon failure.
758 (handle_query): Ditto. Add more checks for result of malloc.
759 (handle_v_cont): Check result of malloc, report error back to
760 user upon failure.
761 (handle_v_run): Ditto. Call freeargv.
762 * server.h (freeargv): Declare.
763 * utils.c (freeargv): New fn.
764
54363045
DE
7652009-01-15 Doug Evans <dje@google.com>
766
f626972c
DE
767 * gdbreplay.c (perror_with_name): Make arg const char *.
768 * server.h (target_signal_to_name): Make return type const char *.
0842e787 769 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 770 * utils.c (perror_with_name): Make arg const char *.
54363045 771
18aae699
PA
7722009-01-14 Pedro Alves <pedro@codesourcery.com>
773
774 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
775 when handling a EXIT_PROCESS_DEBUG_EVENT.
776
ff703abe
JB
7772009-01-06 Joel Brobecker <brobecker@adacore.com>
778
779 * gdbreplay.c (gdbreplay_version): Update copyright year.
780 * server.c (gdbserver_version): Likewise.
781
f21cc1a2 7822009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
783
784 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 785 (handle_extended_wait): Improve comment.
0e21c1ec 786
bca929d3
DE
7872008-12-13 Doug Evans <dje@google.com>
788
789 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
790 * server.h (ATTR_MALLOC): New macro.
791 (xmalloc,xcalloc,xstrdup): Declare.
792 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
793 * inferiors.c: Ditto.
794 * linux-low.c: Ditto.
795 * mem-break.c: Ditto.
796 * regcache.c: Ditto.
797 * remote-utils.c: Ditto.
798 * server.c: Ditto.
799 * target.c: Ditto.
800 * win32-low.c: Ditto.
801
97438e3f
DE
8022008-12-12 Doug Evans <dje@google.com>
803
896c7fbb
DE
804 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
805 in debugging printf.
806
97438e3f
DE
807 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
808
e3b886f8
DE
8092008-12-09 Doug Evans <dje@google.com>
810
811 * linux-low.h (struct process_info): Delete member tid, unused.
812 * thread-db.c (find_one_thread): Update.
813 (maybe_attach_thread): Update.
814
07e059b5
VP
8152008-12-02 Pedro Alves <pedro@codesourcery.com>
816
817 * target.h (struct target_ops): Add qxfer_osdata member.
818 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
819 and dirent.h.
820 (linux_qxfer_osdata): New functions.
821 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
822 callback.
823 * server.c (handle_query): Handle "qXfer:osdata:read:".
824 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
825 (buffer_xml_printf): New functions.
826 * server.h (struct buffer): New.
827 (buffer_grow_str, buffer_grow_str0): New macros.
828 (buffer_grow, buffer_free, buffer_init, buffer_finish)
829 (buffer_xml_printf): Declare.
830
4cab47ab
DE
8312008-11-24 Doug Evans <dje@google.com>
832
833 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
834
f142445f
DJ
8352008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
836
837 * server.c (handle_v_run): Always use the supplied argument list.
838
d0107bb6
BW
8392008-11-19 Bob Wilson <bob.wilson@acm.org>
840
841 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
842 (xtensa_regmap_table): Add entry for scompare1.
843
2c4ad781
TJB
8442008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
845
846 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
847 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
848 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
849 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
850 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
851 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
852 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
853 XML target descriptions.
854 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
855 when inferior is running on an ISA 2.05 or later processor. Add
856 special case to return offset for full 64-bit slot of FPSCR when
857 in 32-bits.
858
dfb64f85
DJ
8592008-11-14 Daniel Gutson <dgutson@codesourcery.com>
860
861 * Makefile.in (SFILES, clean): Added sparc64 files.
862 (reg-sparc64.o, reg-sparc64.c): New.
863 * configure.srv (sparc*-*-linux*): New configuration.
864 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
865 syscall arguments for SPARC.
866 (regsets_store_inferior_registers): Likewise.
867 * linux-sparc-low.c: New file.
868
66b6e1dd
DE
8692008-10-21 Doug Evans <dje@google.com>
870
871 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
872 (READLINE_DIR,READLINE_DEP): Delete.
873 (INTERNAL_CFLAGS): Update.
874 (LINTFLAGS): Update.
875
9b710a42
PA
8762008-10-10 Pedro Alves <pedro@codesourcery.com>
877
878 * server.c (handle_v_run): If GDB didn't specify an argv, use the
879 whole argv from the last run, not just argv[0].
880
5822d809
PA
8812008-09-08 Pedro Alves <pedro@codesourcery.com>
882
883 * regcache.c (new_register_cache): Return NULL if the register
884 cache size isn't known yet.
885 (free_register_cache): Avoid dereferencing a NULL regcache.
886
74aac56f
DJ
8872008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
888
889 * configure.srv: Merge MIPS and MIPS64.
890
400b20f5
MR
8912008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
892
893 * Makefile.in (uninstall): Apply $(EXEEXT) too.
894
677c5bb1
LM
8952008-08-18 Luis Machado <luisgpm@br.ibm.com>
896
897 * Makefile.in: Add required vsx dependencies.
898
899 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
900 Declare init_registers_powerpc_vsx32l.
901 Declare init_registers_powerpc_vsx64l.
902 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
903 (ppc_arch_setup): Check for VSX in hwcap.
904 (ppc_fill_vsxregset): New function.
905 (ppc_store_vsxregset): New function.
906 Add new VSX entry in regset_info target_regsets.
907
908 * configure.srv: Add new VSX dependencies.
909
a6f3e723
SL
9102008-08-12 Pedro Alves <pedro@codesourcery.com>
911
912 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
913 (remote_open): Set or clear transport_is_reliable.
914 (putpkt_binary): Don't expect acks in noack mode.
915 (getpkt): Don't send ack/nac in noack mode.
916 * server.c (handle_general_set): Handle QStartNoAckMode.
917 (handle_query): If connected by tcp pass QStartNoAckMode+ in
918 qSupported.
919 (main): Reset noack_mode on every connection.
920 * server.h (noack_mode): Declare.
921
a417dc56
RW
9222008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
923
924 * Makefile.in (GDBREPLAY_OBS): New variable.
925 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
926
3221518c
UW
9272008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
928 Daniel Jacobowitz <dan@codesourcery.com>
929
930 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
931 (usr_store_inferior_registers): Likewise.
932 (regsets_store_inferior_registers): Likewise.
933
ec56be1b
PA
9342008-07-31 Rolf Jansen <rj@surtec.com>
935 Pedro Alves <pedro@codesourcery.com>
936
937 * configure.ac: Check for memmem declaration.
938 * server.c [HAVE_MALLOC_H]: Include malloc.h.
939 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
940 (disable_packet_qfThreadInfo): Unconditionally compile.
941 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
942 * configure, config.in: Regenerate.
943
2fe5e3ff
DE
9442008-07-28 Doug Kwan <dougkwan@google.com>
945
946 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
947 (linux_write_memory): Remove declaration of errno.
948
836acd6d
UW
9492008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
950
951 * linux-low.c (handle_extended_wait): Do not use "status"
952 variable uninitialized.
953
aeba519e
PA
9542008-07-07 Pedro Alves <pedro@codesourcery.com>
955
956 * server.c (handle_v_attach): Inhibit reporting dll changes.
957
db42f210
PA
9582008-06-27 Pedro Alves <pedro@codesourcery.com>
959
960 * remote-utils.c (prepare_resume_reply): If requested, don't
961 output "thread:TID" in the T stop reply.
962
963 * server.c (disable_packet_vCont, disable_packet_Tthread)
964 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
965 (handle_query): If requested, disable support for qC, qfThreadInfo
966 and qsThreadInfo.
967 (handle_v_requests): If requested, disable support for vCont.
968 (gdbserver_show_disableable): New.
969 (main): Handle --disable-packet and --disable-packet=LIST.
970
971 * server.h (disable_packet_vCont, disable_packet_Tthread)
972 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
973
8e4c5421
CD
9742008-06-20 Carlos O'Donell <carlos@codesourcery.com>
975
976 * server.c (gdbserver_usage): Mention --version.
977
6e23a804
DJ
9782008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
979
980 * Makefile.in (gdbreplay.o): New rule.
981
90aa6a40
JM
9822008-06-06 Joseph Myers <joseph@codesourcery.com>
983
984 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
985 message, not gdbserver.
986
c16158bc
JM
9872008-06-05 Vladimir Prus <vladimir@codesourcery.com>
988 Nathan Sidwell <nathan@codesourcery.com>
989 Joseph Myers <joseph@codesourcery.com>
990
991 * acinclude.m4: Include ../../config/acx.m4.
992 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
993 * configure, config.in: Regenerate.
994 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
995 * server.c (gdbserver_version): Print PKGVERSION.
996 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
997 (main): Adjust gdbserver_usage calls.
998 * gdbreplay.c (version, host_name): Add declarations.
999 (gdbreplay_version, gdbreplay_usage): New.
1000 (main): Accept --version and --help options.
1001
aeb75bf5
DJ
10022008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
1003
1004 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
1005 (arm_breakpoint_at): Handle Thumb.
1006 (the_low_target): Add comment.
1007
76b233dd
UW
10082008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
1009
1010 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
1011
08388c79
DE
10122008-05-09 Doug Evans <dje@google.com>
1013
a3c83fae
DE
1014 * server.h (decode_search_memory_packet): Declare.
1015 * remote-utils.c (decode_search_memory_packet): New fn.
1016 * server.c (handle_search_memory_1): New fn.
08388c79
DE
1017 (handle_search_memory): New fn.
1018 (handle_query): Process qSearch:memory packets.
1019
bb9c3d36
UW
10202008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
1021
1022 * regcache.c (registers_length): Remove.
1023 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
1024 full register packet.
1025 * regcache.h (registers_length): Remove prototype.
1026 * server.h (PBUFSIZ): Define to 16384.
1027
7284e1be
UW
10282008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
1029
1030 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
1031 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
1032 powerpc-64l.o, and powerpc-altivec64l.o.
1033 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
1034 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
1035 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
1036 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
1037 rs6000/power-linux.xml, and rs6000/power64-linux.xml
1038 to srv_xmlfiles.
1039
1040 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
1041 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
1042 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
1043 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
1044 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
1045 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
1046 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
1047 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
1048 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
1049 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
1050 (clean): Update.
1051
1052 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
1053 (init_registers_powerpc_32l): ... this new prototype.
1054 (init_registers_powerpc_32): Remove, replace by ...
1055 (init_registers_powerpc_altivec32l): ... this new prototype.
1056 (init_registers_powerpc_e500): Remove, replace by ...
1057 (init_registers_powerpc_e500l): ... this new prototype.
1058 (init_registers_ppc64): Remove, replace by ...
1059 (init_registers_powerpc_64l): ... this new prototype.
1060 (init_registers_powerpc_64): Remove, replace by ...
1061 (init_registers_powerpc_altivec64l): ... this new prototype.
1062 (ppc_num_regs): Set to 73.
1063 (PT_ORIG_R3, PT_TRAP): Define if necessary.
1064 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
1065 (ppc_cannot_store_register): Handle orig_r3 and trap.
1066 (ppc_arch_setup): Update init_registers_... calls.
1067 (ppc_fill_gregset): Handle orig_r3 and trap.
1068
1069 * inferiors.c (clear_inferiors): Reset current_inferior.
1070
fdc59709
PB
10712008-04-23 Paolo Bonzini <bonzini@gnu.org>
1072
1073 * acinclude.m4: Add override.m4.
1074 * configure: Regenerate.
1075
c9b2f845
UW
10762008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1077
1078 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
1079 initial call to init_register_ppc64.
1080
550512b8
UW
10812008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
1082
1083 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
1084 powerpc*-*-linux* case.
1085 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
1086
b6430ec3
UW
10872008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
1088
1089 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
1090 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
1091 from reg_xmlfiles.
1092 * linux-ppc-low.c: Include <elf.h>.
1093 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
1094 (ppc_hwcap): New global variable.
1095 (ppc_regmap): Remove __SPE__ #ifdef sections.
1096 (ppc_regmap_e500): New global variable.
1097 (ppc_cannot_store_register): Update __SPE__ special case.
1098 (ppc_get_hwcap): New function.
1099 (ppc_arch_setup): Use it to determine whether inferior supports
1100 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
1101 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
1102 Do not access registers if target does not support AltiVec.
1103 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
1104 Do not access registers if target does not support SPE.
1105 (target_regsets): Unconditionally include AltiVec and SPE regsets.
1106
52fa2412
UW
11072008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
1108
1109 * linux-low.c (disabled_regsets, num_regsets): New.
1110 (use_regsets_p): Delete.
1111 (linux_wait_for_process): Clear disabled_regsets.
1112 (regsets_fetch_inferior_registers): Check and set it.
1113 (regsets_store_inferior_registers): Likewise.
1114 (linux_fetch_registers, linux_store_registers): Do not use
1115 use_regsets_p.
1116 (initialize_low): Allocate disabled_regsets.
1117
e28b3332
DJ
11182008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
1119
1120 * Makefile.in (LIBOBJS): New.
1121 (OBS): Use LIBOBJS.
1122 (memmem.o): New rule.
1123 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
1124 * configure: Regenerated.
1125
4536995d
UW
11262008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
1127
1128 * server.c (handle_query): Never return "unsupported" for
1129 qXfer:features:read queries.
1130
221c031f
UW
11312008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
1132
1133 * server.c (get_features_xml): Fix inverted condition.
1134 (handle_query): Always support qXfer:feature:read.
1135
ccd213ac
DJ
11362008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
1137
1138 * server.c (wrapper_argv): New.
1139 (start_inferior): Handle wrapper_argv. If set, expect an extra
1140 trap.
1141 (gdbserver_usage): Document --wrapper.
1142 (main): Parse --wrapper.
1143
6fe305f7
UW
11442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1145
1146 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
1147 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
1148 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
1149 (ppc_set_pc): Likewise.
1150 (ppc_arch_setup): New function.
1151 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
1152 of collect_register.
1153 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
1154
5b0a002e
UW
11552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1156
1157 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
1158 instead of linux-ppc64-low.o.
1159 * linux-ppc64-low.c: Remove file.
1160 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
1161 (linux-ppc64-low.o): Remove rule.
1162
1163 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
1164 (init_registers_powerpc_64): Likewise.
1165 (ppc_regmap): Conditionally define depending on __powerpc64__.
1166 (ppc_cannot_store_register): Do not special-case "fpscr" when
1167 compiled on __powerpc64__.
1168 (ppc_collect_ptrace_register): New function.
1169 (ppc_supply_ptrace_register): New function.
1170 (ppc_breakpoint): Change type to "unsigned int".
1171 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
1172 (the_low_target): Conditionally provide initializers for the
1173 arch_setup member depending on __powerpc64__. Install
1174 collect_ptrace_register and supply_ptrace_register members.
1175
9b4b61c8
UW
11762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1177
1178 * regcache.h (gdbserver_xmltarget): Add extern declaration.
1179 * server.c (gdbserver_xmltarget): Define.
1180 (get_features_xml): Use it to replace "target.xml" and arch_string.
1181
1182 * configure.srv: Remove srv_xmltarget. Add XML files that were
1183 mentioned there to srv_xmlfiles instead. Remove conditional tests
1184 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
1185 srv_xmlfiles and srv_regobj to include all possible choices.
1186 * configure.ac (srv_xmltarget): Remove.
1187 (srv_xmlfiles): Do not add "target.xml".
1188 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
1189 checks for supplementary target information.
1190 * configure: Regenerate.
1191 * Makefile.in (XML_TARGET): Remove.
1192 (target.xml): Remove rule.
1193 (clean): Do not clean up target.xml.
1194 (.PRECIOUS): Do not mention target.xml.
1195
1196 * target.h (struct target_ops): Remove arch_string member.
1197 * linux-low.c (linux_arch_string): Remove.
1198 (linux_target_ops): Remove arch_string initializer.
1199 * linux-low.h (struct linux_target_ops): Remove arch_string member.
1200 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
1201 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
1202 * spu-low.c (spu_arch_string): Remove.
1203 (spu_target_ops): Remove arch_string initializer.
1204 * win32-low.c (win32_arch_string): Remove.
1205 (win32_target_ops): Remove arch_string initializer.
1206 * win32-low.h (struct win32_target_ops): Remove arch_string member.
1207 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
1208 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
1209
ee1a7ae4
UW
12102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1211
1212 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
1213 by collect_ptrace_register and supply_ptrace_register hooks.
1214 * linux-low.c (fetch_register): Use supply_ptrace_register callback
1215 instead of checking for the_low_target.left_pad_xfer.
1216 (usr_store_inferior_registers): Use collect_ptrace_register callback
1217 instead of checking for the_low_target.left_pad_xfer.
1218
1219 * linux-s390-low.c (s390_collect_ptrace_register): New function.
1220 (s390_supply_ptrace_register): Likewise.
1221 (s390_fill_gregset): Call s390_collect_ptrace_register.
1222 (the_low_target): Update.
1223
1224 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
1225 (ppc_supply_ptrace_register): Likewise.
1226 (the_low_target): Update.
1227
1228 * linux-i386-low.c (the_low_target): Update.
1229 * linux-x86-64-low.c (the_low_target): Update.
1230
d61ddec4
UW
12312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1232
1233 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
1234 reg-s390.o and reg-s390x.o.
1235
1236 * linux-low.c (new_inferior): New global variable.
1237 (linux_create_inferior, linux_attach): Set it.
1238 (linux_wait_for_process): Call the_low_target.arch_setup after the
1239 target has stopped for the first time.
1240 (initialize_low): Do not call the_low_target.arch_setup.
1241
1242 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
1243 (s390_set_pc): Likewise.
1244 (s390_arch_setup): New function.
1245 (the_low_target): Use s390_arch_setup as arch_setup routine.
1246
1247 * regcache.c (realloc_register_cache): New function.
1248 (set_register_cache): Call it for each existing regcache.
1249
d05b4ac3
UW
12502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
1251
1252 * server.h (init_registers): Remove prototype.
1253
1254 * linux-low.h (struct linux_target_ops): Add arch_setup field.
1255 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
1256 instead of init_registers ().
1257 * linux-arm-low.c (init_registers_arm): Add prototype.
1258 (init_registers_arm_with_iwmmxt): Likewise.
1259 (the_low_target): Add initializer for arch_setup field.
1260 * linux-cris-low.c (init_registers_cris): Add prototype.
1261 (the_low_target): Add initializer for arch_setup field.
1262 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
1263 (the_low_target): Add initializer for arch_setup field.
1264 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
1265 (the_low_target): Add initializer for arch_setup field.
1266 * linux-ia64-low.c (init_registers_ia64): Add prototype.
1267 (the_low_target): Add initializer for arch_setup field.
1268 * linux-m32r-low.c (init_registers_m32r): Add prototype.
1269 (the_low_target): Add initializer for arch_setup field.
1270 * linux-m68k-low.c (init_registers_m68k): Add prototype.
1271 (the_low_target): Add initializer for arch_setup field.
1272 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
1273 (init_registers_mips64_linux): Likewise.
1274 (the_low_target): Add initializer for arch_setup field.
1275 * linux-ppc-low.c (init_registers_ppc): Add prototype.
1276 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
1277 (the_low_target): Add initializer for arch_setup field.
1278 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
1279 (init_registers_powerpc_64): Likewise.
1280 (the_low_target): Add initializer for arch_setup field.
1281 * linux-s390-low.c (init_registers_s390): Add prototype.
1282 (init_registers_s390x): Likewise.
1283 (the_low_target): Add initializer for arch_setup field.
1284 * linux-sh-low.c (init_registers_sh): Add prototype.
1285 (the_low_target): Add initializer for arch_setup field.
1286 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
1287 (the_low_target): Add initializer for arch_setup field.
1288 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
1289 (the_low_target): Add initializer for arch_setup field.
1290
1291 * win32-low.h (struct win32_target_ops): Add arch_setup field.
1292 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
1293 instead of init_registers ().
1294 * win32-arm-low.c (init_registers_arm): Add prototype.
1295 (the_low_target): Add initializer for arch_setup field.
1296 * win32-i386-low.c (init_registers_i386): Add prototype.
1297 (the_low_target): Add initializer for arch_setup field.
1298
1299 * spu-low.c (init_registers_spu): Add prototype.
1300 (initialize_low): Call initialie_registers_spu () instead of
1301 initialize_registers ().
1302
fd96d250
PA
13032008-02-19 Pedro Alves <pedro@codesourcery.com>
1304
1305 * server.c (handle_v_requests): When handling the vRun and vAttach
1306 packets, if already debugging a process, don't kill it. Return an
1307 error instead.
1308
d41b6bb4
DJ
13092008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
1310
1311 * server.c (handle_query): Correct length check.
1312
5ac588cf
PA
13132008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
1314
1315 * win32-low.c (do_initial_child_stuff): Add process handle
1316 parameter. Set current_process_handle and current_process_id from the
1317 parameters. Clear globals.
1318 (win32_create_inferior): Don't set current_process_handle and
1319 current_process_id here. Instead pass them on the call to
1320 do_initial_child_stuff.
1321 (win32_attach): Likewise.
1322 (win32_clear_inferiors): New.
1323 (win32_kill): Don't close the current process handle or the
1324 current thread handle here. Instead call win32_clear_inferiors.
1325 (win32_detach): Don't open a new handle to the process. Call
1326 win32_clear_inferiors.
1327 (win32_join): Don't rely on current_process_handle; open a new
1328 handle using the process id.
1329 (win32_wait): Call win32_clear_inferiors when the inferior process
1330 has exited.
1331
ecd7ecbc
DJ
13322008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
1333
1334 * server.c (monitor_show_help): Add "exit".
1335
1525d545
MG
13362008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
1337
ecd7ecbc 1338 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
1339 (clean): Add reg-xtensa.c.
1340 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
1341 * configure.srv (xtensa*-*-linux*) New target.
1342 * linux-xtensa-low.c: New.
1343 * xtensa-xtregs.c: New.
1525d545 1344
59a016f0
PA
13452008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
1346
1347 * hostio.c: Don't include errno.h.
1348 (errno_to_fileio_errno): Move to hostio-errno.
1349 * hostio.c: (hostio_error): Remove the error parameter. Defer the
1350 error number outputting to the target->hostio_last_error callback.
1351 (hostio_packet_error): Use FILEIO_EINVAL directly.
1352 (handle_open, handle_pread, hostio_error, handle_unlink): Update
1353 calls to hostio_error.
1354 * hostio-errno.c: New.
1355 * server.h (hostio_last_error_from_errno): Declare.
1356 * target.h (target_ops): Add hostio_last_error member.
1357 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
1358 as hostio_last_error handler.
1359 * spu-low.c (spu_target_ops): Likewise.
1360 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
1361 (wince_hostio_last_error): New functions.
1362 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
1363 as hostio_last_error handler.
1364 (win32_target_ops) [!_WIN32_WCE]: Register
1365 hostio_last_error_from_errno as hostio_last_error handler.
1366 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
1367 (hostio-errno.o): New rule.
1368 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
1369 * configure.srv (srv_hostio_err_objs): New variable. Default to
1370 hostio-errno.o.
1371 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
1372 * configure: Regenerate.
1373
2d717e4f
DJ
13742008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1375
1376 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
1377 (linux_kill, linux_detach): Clean up the process list.
1378 * remote-utils.c (remote_open): Improve port number parsing.
1379 (putpkt_binary, input_interrupt): Only send interrupts if the target
1380 is running.
1381 * server.c (extended_protocol): Make static.
1382 (attached): Define earlier.
1383 (exit_requested, response_needed, program_argv): New variables.
1384 (target_running): New.
1385 (start_inferior): Clear attached here.
1386 (attach_inferior): Set attached here.
1387 (require_running): Define.
1388 (handle_query): Use require_running and target_running. Implement
1389 "monitor exit".
1390 (handle_v_attach, handle_v_run): New.
1391 (handle_v_requests): Use require_running. Handle vAttach and vRun.
1392 (gdbserver_usage): Update.
1393 (main): Redo argument parsing. Handle --debug and --multi. Handle
1394 --attach along with other options or after the port. Save
1395 program_argv. Support no initial program. Resynchronize
1396 communication with GDB after an error. Handle "monitor exit".
1397 Use require_running and target_running. Always allow the extended
1398 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
1399 restart in extended mode.
1400 * README: Refer to the GDB manual. Update --attach usage.
1401
7407e2de
AS
14022007-12-20 Andreas Schwab <schwab@suse.de>
1403
1404 * linux-low.c (STACK_SIZE): Define.
1405 (linux_tracefork_child): Use it. Use __clone2 on ia64.
1406 (linux_test_for_tracefork): Likewise.
1407
b65d95c5
DJ
14082007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
1409
1410 * linux-low.c (linux_wait_for_event): Update messages. Do not
1411 reinsert auto-delete breakpoints.
1412 * mem-break.c (struct breakpoint): Change return type of handler to
1413 int.
1414 (set_breakpoint_at): Update handler type.
1415 (reinsert_breakpoint_handler): Return 1 instead of calling
1416 delete_breakpoint.
1417 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
1418 setting a new one.
1419 (check_breakpoints): Delete auto-delete breakpoints and return 2.
1420 * mem-break.h (set_breakpoint_at): Update handler type.
1421 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
1422 * win32-low.c (auto_delete_breakpoint): New.
1423 (get_child_debug_event): Use it.
1424
4e799345
DJ
14252007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
1426
1427 * configure.ac: Check for pread and pwrite.
1428 * hostio.c (handle_pread): Fall back to lseek and read.
1429 (handle_pwrite): Fall back to lseek and write.
1430 * config.in, configure: Regenerated.
1431
27524b67
DJ
14322007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
1433
1434 * server.c (myresume): Add own_buf argument.
1435 (main): Update calls.
1436
a20d5e98
DJ
14372007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
1438
1439 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
1440 * remote-utils.c (remote_open): Do not call disable_async_io.
1441 (block_async_io): Delete.
1442 (unblock_async_io): Make static.
1443 (initialize_async_io): New.
1444 * server.c (handle_v_cont): Handle async I/O here.
1445 (myresume): Likewise. Move other common resume tasks here...
1446 (main): ... from here. Call initialize_async_io. Disable async
1447 I/O before the main loop.
1448 * server.h (initialize_async_io): Declare.
1449 (block_async_io, unblock_async_io): Delete prototypes.
1450 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
1451
b79d787e
DJ
14522007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
1453
1454 * remote-utils.c (readchar): Allow binary data in received messages.
1455
d97903b2
PA
14562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1457
1458 * win32-low.c (attaching): New global.
1459 (win32_create_inferior): Clear the `attaching' global.
1460 (win32_attach): Set the `attaching' global.
1461 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
1462 attaching. Only set a breakpoint at the entry point if not
1463 attaching.
1464
311de423
PA
14652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1466
1467 * server.c (main): Don't report dll events on the initial
1468 connection on attaches.
1469
6c2d16d2
PA
14702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1471
1472 * server.c (main): Relax numerical bases supported for the pid of
1473 the --attach command line argument.
1474
5ca906e6
PA
14752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1476
1477 * win32-low.c (win32_attach): Call OpenProcess before
1478 DebugActiveProcess, not after. Add last error output to error
1479 call.
1480
9c6c8194
PA
14812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
1482
1483 * win32-low.c (win32_get_thread_context)
1484 (win32_set_thread_context): New functions.
1485 (thread_rec): Use win32_get_thread_context.
1486 (continue_one_thread, win32_resume): Use win32_set_thread_context.
1487 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
1488 field.
1489
4d5d1aaa
PA
14902007-12-03 Leo Zayas
1491 Pedro Alves <pedro_alves@portugalmail.pt>
1492
1493 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
1494 global variables.
1495 (child_add_thread): Minor cleanup.
1496 (child_continue): Resume artificially suspended threads before
1497 calling ContinueDebugEvent.
1498 (suspend_one_thread): New.
1499 (fake_breakpoint_event): New.
1500 (get_child_debug_event): Change return type to int. Check here if
1501 gdb sent an interrupt request. If a soft interrupt was requested,
1502 fake a breakpoint event. Return 0 if there is no event to handle,
1503 and 1 otherwise.
1504 (win32_wait): Don't check here if gdb sent an interrupt request.
1505 Ensure there is a valid event to handle.
1506 (win32_request_interrupt): Add soft interruption method as last
1507 resort.
1508
c436e841
PA
15092007-12-03 Leo Zayas
1510 Pedro Alves <pedro_alves@portugalmail.pt>
1511
1512 * win32-low.h (win32_thread_info): Add descriptions to the
1513 structure members. Replace `suspend_count' counter by a
1514 `suspended' flag.
1515 * win32-low.c (thread_rec): Update condition of when to get the
1516 context from the inferior. Rely on ContextFlags being set if it
1517 has already been retrieved. Only suspend the inferior thread if
1518 we haven't already. Warn if that fails.
1519 (continue_one_thread): s/suspend_count/suspended/. Only call
1520 ResumeThread once. Warn if that fails.
1521
e7b5fa67
PA
15222007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1523
1524 * win32-low.c (win32_wait): Don't read from the inferior when it
1525 has already exited.
1526
a385171d
PA
15272007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
1528
1529 * Makefile.in (win32_low_h): New variable.
1530 (win32-low.o): Add dependency on $(win32_low_h).
1531 (win32-arm-low.o, win32-i386-low.o): New rules.
1532
f80c84b3
DJ
15332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1534
1535 * hostio.c: Correct copyright year.
1536
a6b151f1
DJ
15372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
1538
1539 * Makefile.in (OBS): Add hostio.o.
1540 (hostio.o): New rule.
1541 * server.h (handle_vFile): Declare.
1542 * hostio.c: New file.
1543 * server.c (handle_v_requests): Take packet_len and new_packet_len
1544 for binary packets. Call handle_vFile.
1545 (main): Update call to handle_v_requests.
1546
f9387fc3
DJ
15472007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1548
1549 * linux-low.c: Include <sched.h>.
1550
51c2684e
DJ
15512007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
1552
1553 * linux-low.c (linux_tracefork_grandchild): New.
1554 (linux_tracefork_child): Use clone.
1555 (linux_test_for_tracefork): Use clone; allocate and free a stack.
1556
75f83163
JB
15572007-10-31 Joel Brobecker <brobecker@adacore.com>
1558
1559 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
1560
da5898ce
DJ
15612007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
1562
1563 * linux-low.c (handle_extended_wait): Handle unexpected signals.
1564
24a09b5f
DJ
15652007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
1566
1567 * inferiors.c (change_inferior_id): Delete.
1568 (add_pid_to_list, pull_pid_from_list): New.
1569 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
1570 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
1571 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
1572 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
1573 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
1574 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
1575 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
1576 (using_threads): Always set to 1.
1577 (handle_extended_wait): New.
1578 (add_process): Do not set TID.
1579 (linux_create_inferior): Set must_set_ptrace_flags.
1580 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
1581 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
1582 (linux_thread_alive): Rename TID argument to LWPID.
1583 (linux_wait_for_process): Handle unknown processes. Do not use TID.
1584 (linux_wait_for_event): Do not use TID or check using_threads. Update
1585 call to dead_thread_notify. Call handle_extended_wait.
1586 (linux_create_inferior): Use PTRACE_SETOPTIONS.
1587 (send_sigstop): Delete sigstop_sent.
1588 (wait_for_sigstop): Avoid TID.
1589 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
1590 (linux_test_for_tracefork): New.
1591 (linux_lookup_signals): Use thread_db_active and
1592 linux_supports_tracefork_flag.
1593 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
1594 * linux-low.h (get_process_thread): Avoid TID.
1595 (struct process_ifo): Move thread_known and tid to the end. Remove
1596 sigstop_sent.
1597 (linux_attach_lwp, thread_db_init): Update prototypes.
1598 * server.h (change_inferior_id): Delete prototype.
1599 (add_pid_to_list, pull_pid_from_list): New prototypes.
1600 * thread-db.c (thread_db_use_events): New.
1601 (find_first_thread): Rename to...
1602 (find_one_thread): ...this. Update callers and messages. Do not
1603 call fatal. Check thread_db_use_events. Do not call
1604 change_inferior_id or new_thread_notify.
1605 (maybe_attach_thread): Update. Do not call new_thread_notify.
1606 (thread_db_init): Set thread_db_use_events. Check use_events.
1607 * utils.c (fatal, warning): Correct message prefix.
1608
30ed0a8f
DJ
16092007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
1610
1611 * Makefile.in (clean): Remove new files.
1612 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
1613 (powerpc-64.o, powerpc-64.c): New rules.
1614 * configure.srv: Use alternate register sets for powerpc64-*-linux*
1615 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
1616 with SPE.
1617 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
1618 SPE targets.
1619 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
1620 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
1621 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
1622 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
1623 (target_regsets): Add AltiVec and SPE register sets.
1624 * configure.ac: Check for AltiVec and SPE.
1625 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
1626 (ppc_fill_vrregset, ppc_store_vrregset): New.
1627 (target_regsets): Add AltiVec register set.
1628 * configure: Regenerated.
1629
fd462a61
DJ
16302007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
1631
1632 * linux-low.c (O_LARGEFILE): Define.
1633 (linux_read_memory): Use /proc/PID/mem.
1634 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
1635 * configure, config.in: Regenerated.
1636
69f223ed
DJ
16372007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1638
1639 * linux-low.c (linux_wait_for_event): Do not pass signals while
1640 single-stepping.
1641
aec18585
PA
16422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1643
1644 * win32-low.c (create_process): New.
1645 (win32_create_inferior): Use create_process instead of
1646 CreateProcess. If create_process failed retry appending an ".exe"
1647 suffix. Store the GetLastError result immediatelly after
1648 create_process calls and use it on the call to error.
1649
34d86ddd
PA
16502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
1651
1652 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
1653
5a0e3bd0
JB
16542007-08-23 Joel Brobecker <brobecker@adacore.com>
1655
1656 * configure.ac: Switch license to GPLv3.
1657
f88c79e6
MS
16582007-08-01 Michael Snyder <msnyder@access-company.com>
1659
1660 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
1661
6b3d9b83
PA
16622007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
1663
1664 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
1665 typedef.
1666 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
1667 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
1668 CloseToolhelp32Snapshot.
1669 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
1670 CloseToolhelp32Snapshot.
1671
c588c53c
MS
16722007-07-27 Michael Snyder <michael.snyder@access-company.com>
1673
1674 * server.c (main): Check for inferior exit before main loop.
1675
aa0403d9
PA
16762007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
1677
1678 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
1679 instead of on tmp_desc.
1680
255e7678
DJ
16812007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
1682 Daniel Jacobowitz <dan@codesourcery.com>
1683
1684 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
1685 (add_thread): Minor cleanups.
1686 (clear_inferiors): Move lower in the file. Clear the DLL
1687 list.
1688 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
1689 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
1690 (xml_escape_text): New.
1691 * server.c (handle_query): Handle qXfer:libraries:read. Report it
1692 for qSupported.
1693 (handle_v_cont): Report errors.
1694 (gdbserver_version): Update.
1695 (main): Correct size of own_buf. Do not report initial DLL events.
1696 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
1697 (unloaded_dll, xml_escape_text): New.
1698 * win32-low.c (enum target_waitkind): Update comments.
1699 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
1700 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
1701 (win32_EnumProcessModules, win32_GetModuleInformation)
1702 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
1703 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
1704 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
1705 (win32_Module32First, win32_Module32Next, load_toolhelp)
1706 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
1707 (get_child_debug_event): Handle DLL events.
1708 (win32_wait): Likewise.
1709
0d37add9
DJ
17102007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1711
1712 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
1713 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
1714
45e2715e
PA
17152007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1716
1717 * win32-low.c (handle_output_debug_string): Ignore event if not
1718 waiting.
1719
c5674cf1
PA
17202007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
1721
1722 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
1723
2bbe3cc1
DJ
17242007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
1725
1726 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
1727
ae13219e
DJ
17282007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
1729
1730 * inferiors.c (change_inferior_id): Add comment.
1731 * linux-low.c (check_removed_breakpoint): Add an early
1732 prototype. Improve debug output.
1733 (linux_attach): Doc update.
1734 (linux_detach_one_process, linux_detach): Clean up before releasing
1735 each process.
1736 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
1737 * linux-low.h (struct process_info): Doc improvement.
1738 * mem-break.c (delete_all_breakpoints): New.
1739 * mem-break.h (delete_all_breakpoints): New prototype.
1740 * thread-db.c (find_first_thread): New.
1741 (thread_db_create_event): Call it instead of
1742 thread_db_find_new_threads. Clean up unused variables.
1743 (maybe_attach_thread): Remove first thread handling.
1744 (thread_db_find_new_threads): Use find_first_thread.
1745 (thread_db_get_tls_address): Likewise.
1746
4105de34
DJ
17472007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1748
1749 * thread-db.c (thread_db_find_new_threads): Add prototype.
1750 (thread_db_create_event): Check for the main thread before adding
1751 a new thread.
1752 (maybe_attach_thread): Only enable event reporting if TID == 0.
1753 (thread_db_get_tls_address): Check for new threads.
1754
2b876972
DJ
17552007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1756
1757 * linux-low.c (linux_create_inferior): Try execv before execvp.
1758 * spu-low.c (spu_create_inferior): Likewise.
1759
7a245884
DJ
17602007-06-13 Mike Frysinger <vapier@gentoo.org>
1761
1762 * linux-low.c (linux_create_inferior): Change execv to execvp.
1763 * spu-low.c (spu_create_inferior): Likewies.
1764
117ce543
DJ
17652007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1766
1767 * Makefile.in (clean): Clean new files instead of deleted ones.
1768 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1769 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1770 rules.
1771 * configure.srv: Specify XML files and new regformats for MIPS and
1772 MIPS64 GNU/Linux.
1773 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1774 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1775 an entry for the restart register.
1776 (mips_cannot_fetch_register, mips_cannot_store_register)
1777 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1778 register names to match the XML descriptions.
1779 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1780 restart register instead of $0.
1781
0e7f50da
UW
17822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1783 Markus Deuling <deuling@de.ibm.com>
1784
1785 * remote-utils.c (decode_xfer_write): New function.
1786 * server.h (decode_xfer_write): Add prototype.
1787 * server.c (handle_query): Add PACKET_LEN argument. Support
1788 qXfer:spu:read and qXfer:spu:write packets.
1789 (main): Pass packet_len to handle_query.
1790 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1791 * target.h (target_ops): Add qxfer_spu.
1792
374c1d38
UW
17932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1794
1795 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1796 accessing non-seekable spufs files.
1797
bb63802a
UW
17982007-05-16 Markus Deuling <deuling@de.ibm.com>
1799
1800 * server.c (handle_query): Add reply for qC packet.
1801
7390519e
PA
18022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1803 Leo Zayas <lerele@champenstudios@com>
1804
1805 * server.h (check_remote_input_interrupt_request): New function.
1806 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1807 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1808 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1809 (check_remote_input_interrupt_request): New function.
1810 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 1811 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
1812 winapi_GenerateConsoleCtrlEvent): New typedefs.
1813 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1814 to 250 ms.
1815 (win32_wait): Check for remote interrupt request
1816 with check_remote_input_interrupt_request.
1817 (win32_request_interrupt): New function.
1818 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1819
34b34921
PA
18202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1821
1822 * win32-low.c (debug_registers_changed,
1823 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1824 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1825 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1826 (thread_rec): Get context using the low target.
1827 (child_add_thread): Call thread_added on the low target,
1828 which does the same thing.
1829 (regptr): Delete.
1830 (do_initial_child_stuff): Remove debug registers references.
1831 Set context using the low target. Resume threads after
1832 setting the contexts.
1833 (child_continue): Remove dead variable. Remove debug
1834 registers references.
1835 (child_fetch_inferior_registers): Go through the low target.
1836 (do_child_store_inferior_registers): Remove.
1837 (child_store_inferior_registers): Go through the low target.
1838 (win32_resume): Remove debug registers references.
1839 Set context using the low target.
1840 (handle_exception): Change return type to void. Don't record
1841 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1842 first chance exception.
1843 (get_child_debug_event): Change return type to void. Remove
1844 goto loop. Always return after waiting for debug event.
1845 (win32_wait): Convert to switch statement. Handle spurious
1846 events.
1847
1848 * win32-i386-low.c (debug_registers_changed,
1849 debug_registers_used): New.
1850 (initial_stuff): Rename to ...
1851 (i386_initial_stuff): ... this. Clear debug registers
1852 state variables.
1853 (store_debug_registers): Delete.
1854 (i386_get_thread_context): New.
1855 (load_debug_registers): Delete.
1856 (i386_set_thread_context): New.
1857 (i386_thread_added): New.
1858 (single_step): Rename to ...
1859 (i386_single_step): ... this.
1860 (do_fetch_inferior_registers): Rename to ...
1861 (i386_fetch_inferior_register): ... this.
1862 (i386_store_inferior_register): New.
1863 (the_low_target): Adapt to new interface.
1864
1865 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1866 (arm_get_thread_context): New.
1867 (arm_set_thread_context): New.
1868 (regptr): New.
1869 (do_fetch_inferior_registers): Rename to ...
1870 (arm_fetch_inferior_register): ... this.
1871 (arm_store_inferior_register): New.
1872 (arm_wince_breakpoint): Reimplement as unsigned long.
1873 (arm_wince_breakpoint_len): Define.
1874 (the_low_target): Adapt to new interface.
1875
1876 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1877 load_debug_registers. Add get_thread_context, set_thread_context,
1878 thread_added and store_inferior_register. Rename
1879 fetch_inferior_registers to fetch_inferior_register.
1880 (regptr): Remove declaration.
1881
dd6953e1
PA
18822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1883
1884 * linux-low.c (linux_detach): Change return type to int. Return 0.
1885 * spu-low.c (spu_detach): Likewise.
1886
444d6139
PA
18872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1888
1889 * target.h (target_ops): Change return type of detach to int.
1890 Add join.
1891 (join_inferior): New.
1892 * server.c (main): Don't skip detach support on mingw32.
1893 If the inferior doesn't support detaching return error.
1894 Call join_inferior instead of using waitpid.
1895 * linux-low.c (linux_join): New.
1896 (linux_target_op): Add linux_join.
1897 * spu-low.c (spu_join): New.
1898 (spu_target_ops): Add spu_join.
1899 * win32-low.c (win32_detach): Adapt to new interface.
1900 Reopen current_process_handle before detaching. Issue a child
1901 resume before detaching.
1902 (win32_join): New.
1903 (win32_target_op): Add win32_join.
1904
1d5315fe
PA
19052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1906
1907 * win32-low.c (win32-attach): Fix return value.
1908 * target.h (target_ops): Describe ATTACH return values.
1909
bf914831
PA
19102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1911
1912 * win32-low.c (GETPROCADDRESS): Define.
1913 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1914 (winapi_DebugSetProcessKillOnExit): Likewise.
1915 (win32_create_inferior): Force usage of ansi CreateProcessA.
1916 (win32_attach): Use GETPROCADDRESS.
1917 (win32_detach): Likewise.
1918
f72f3e60
PA
19192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1920
1921 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1922
ed50f18f
PA
19232007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1924
1925 * win32-low.c: Commit leftover changes from 2007-03-29.
1926
0c2ead7e
DJ
19272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1928
1929 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1930 fields short instead of int. Add explicit padding.
1931 (i387_cache_to_fsave): Remove unnecessary casts.
1932 (i387_fsave_to_cache): Doc fix.
1933 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1934
73725ff3
DJ
19352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1936
1937 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1938 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1939
d99f33d8
PA
19402007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1941
1942 * configure.srv (arm*-*-mingw32ce*): Move near the other
1943 arm targets.
1944
68070c10
PA
19452007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1946
2482afc6 1947 * configure.ac: Add errno checking.
68070c10
PA
1948 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1949 sys/file.h and malloc.h.
1950 (AC_CHECK_DECLS): Add perror.
1951 (srv_mingwce): Handle.
2482afc6 1952 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
1953 win32-i386-low.o to srv_tgtobj.
1954 (i[34567]86-*-mingw*): Likewise.
1955 (arm*-*-mingw32ce*): Add case.
1956 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1957 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1958 [__MINGW32CE__] (strerror): New function.
1959 [__MINGW32CE__] (errno): Define to GetLastError.
1960 [__MINGW32CE__] (COUNTOF): New macro.
1961 (remote_open): Remove extra close call.
1962 * mem-break.c (delete_breakpoint_at): New function.
1963 * mem-break.h (delete_breakpoint_at): Declare.
1964 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1965 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1966 [USE_WIN32API] (read, write): Add char* casts.
1967 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1968 * server.h: Include wincecompat.h on Windows CE.
1969 [HAVE_ERRNO_H]: Check.
1970 (perror): Declare if not declared.
1971 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1972 (perror_with_name): Remove errno declaration.
1973 * wincecompat.h: New.
1974 * wincecompat.c: New.
1975 * win32-low.h: New.
1976 * win32-arm-low.c: New.
1977 * win32-i386-low.c: New.
1978 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1979 (OUTMSG2): Make it safe.
1980 (_T): New macro.
1981 (COUNTOF): New macro.
1982 (NUM_REGS): Get it from the low target.
1983 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1984 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1985 (thread_rec): Let low target handle debug registers.
1986 (child_add_thread): Likewise.
1987 (child_init_thread_list): Likewise.
1988 (continue_one_thread): Likewise.
1989 (regptr): New.
1990 (do_child_fetch_inferior_registers): Move to ...
1991 * win32-i386-low.c: ... here, and rename to ...
1992 (do_fetch_inferior_registers): ... this.
1993 * win32-low.c (child_fetch_inferior_registers):
1994 Go through the low target.
1995 (do_child_store_inferior_registers): Use regptr.
1996 (strwinerror): New function.
1997 (win32_create_inferior): Handle Windows CE.
1998 Use strwinerror instead of strerror on Windows error
1999 codes. Add program to the error output.
2000 Don't close the main thread handle on Windows CE.
2001 (win32_attach): Use coredll.dll on Windows CE.
2002 (win32_kill): Close current process and current
2003 thread handles.
2004 (win32_detach): Use coredll.dll on Windows CE.
2005 (win32_resume): Let low target handle debug registers, and
2006 step request.
2007 (handle_exception): Add/Remove initial breakpoint. Avoid
2008 non-existant WSTOPSIG on Windows CE.
2009 (win32_read_inferior_memory): Cast to remove warning.
2010 (win32_arch_string): Go through the low target.
2011 (initialize_low): Call set_breakpoint_data with the low
2012 target's breakpoint.
2013 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
2014 FOP_REGNUM, mappings): Move to ...
2015 * win32-i386-low.c: ... here.
2016 * win32-low.c (win32_thread_info): Move to ...
2017 * win32-low.h: ... here.
2018 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
2019 win32-arm-low.c and wincecompat.c.
2020 (all:): Add $EXEEXT.
2021 (install-only:): Likewise.
2022 (gdbserver:): Likewise.
2023 (gdbreplay:): Likewise.
2024 * config.in: Regenerate.
2025 * configure: Regenerate.
2026
41093d81
PA
20272007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2028
2029 * win32-low.c: Rename typedef thread_info to
2030 win32_thread_info throughout.
2031
544afa54
PA
20322007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
2033
2034 * win32-i386-low.c: Rename to ...
2035 * win32-low.c: ... this.
2036 * configure.srv: Replace win32-i386-low.o with win32-low.o.
2037 * Makefile.in: Likewise.
2038
bce7165d
PA
20392007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
2040
2041 * remote-utils.c (monitor_output): Constify msg parameter.
2042 * server.h (monitor_output): Likewise.
2043 * win32-i386-low.c (handle_output_debug_string): New.
2044 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
2045 handle_output_debug_string.
2046 (get_child_debug_event): Likewise.
2047
506c7aa0
DJ
20482007-03-27 Mat Hostetter <mat@lcs.mit.edu>
2049
2050 * server.c (main): Correct strtoul check.
2051
42c81e2a
DJ
20522007-03-27 Jon Ringle <jon@ringle.org>
2053
2054 * linux-low.c: Check __ARCH_HAS_MMU__ also.
2055
9453113a
DJ
20562007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
2057
2058 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
2059
64a69107
DJ
20602007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2061
2062 * terminal.h: Check HAVE_SGTTY_H.
2063
20642007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
2065
2066 * remote-utils.c (remote_open): Print out the assigned port number.
2067
c74d0ad8
DJ
20682007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
2069
2070 * remote-utils.c (monitor_output): New function.
2071 * server.c (debug_threads): Define here.
2072 (monitor_show_help): New function.
2073 (handle_query): Handle qRcmd.
2074 (main): Do not handle 'd' packet.
2075 * server.h (debug_threads, remote_debug, monitor_output): Declare.
2076 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
2077 of debug_threads.
2078
de7c3b4a
PA
20792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2080
2081 * Makefile.in (EXEEXT): New.
2082 (clean): Use $(EXEEXT).
2083
ef57601b
PA
20842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2085
2086 * target.h (target_ops): Rename send_signal to request_interrupt,
2087 and remove enum target_signal parameter.
2088 * linux-low.c (linux_request_interrupt): Rename from
2089 linux_send_signal, and always send SIGINT.
2090 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
2091 and always send SIGINT.
2092 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
2093 of send_signal.
2094 (input_interrupt): Likewise.
2095
820f2bda
PA
20962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
2097
2098 * server.c (get_features_xml): Check if target implemented
2099 arch_string.
2100 * win32-i386-low.c (win32_arch_string): New.
2101 (win32_target_ops): Add win32_arch_string as arch_string member.
2102
ab39bf24
UW
21032007-02-22 Markus Deuling <deuling@de.ibm.com>
2104
2105 * spu-low.c (spu_arch_string): New.
2106 (spu_target_ops): Add spu_arch_string.
2107
61ff6e04
DJ
21082007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
2109
2110 * remote-utils.c: Remove HAVE_TERMINAL_H check.
2111 * configure.ac: Do not check for terminal.h.
2112 * configure, config.in: Regenerated.
2113
fb1e4ffc
DJ
21142007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2115
2116 * Makefile.in (OBS): Add $(XML_BUILTIN).
2117 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
2118 (clean): Update.
2119 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
2120 (arm-with-iwmmxt.c): New.
2121 * config.in, configure: Regenerate.
2122 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
2123 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
2124 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
2125 (arm*-*-linux*): Add iWMMXt and regset support.
2126 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
2127 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
2128 (arm_store_wmmxregset, target_regsets): New.
2129 * server.c (get_features_xml): Take annex argument. Check builtin
2130 XML documents.
2131 (handle_query): Handle multiple annexes.
2132
0f48aa01
DJ
21332007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2134
2135 * remote-utils.c [USE_WIN32API] (read, write): Define.
2136 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
2137 write.
2138
23181151
DJ
21392007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
2140
2141 * linux-i386-low.c (the_low_target): Set arch_string.
2142 * linux-x86-64-low.c (the_low_target): Likewise.
2143 * linux-low.c (linux_arch_string): New.
2144 (linux_target_ops): Add it.
2145 * linux-low.h (struct linux_target_ops): Add arch_string.
2146 * server.c (write_qxfer_response): Use const void * for DATA.
2147 (get_features_xml): New.
2148 (handle_query): Handle qXfer:features:read. Report it for qSupported.
2149 * target.h (struct target_ops): Add arch_string method.
2150
9d606399
DJ
21512007-01-03 Denis Pilat <denis.pilat@st.com>
2152 Daniel Jacobowitz <dan@codesourcery.com>
2153
2154 * linux-low.c (linux_kill): Handle being called with no threads.
2155 * win32-i386-low.c (win32_kill): Likewise.
2156 (get_child_debug_event): Clear current_process_handle.
2157
21582006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
2159 Daniel Jacobowitz <dan@codesourcery.com>
2160
2161 * remote-utils.c (remote_open): Check the type of specified
2162 serial port devices before opening them.
2163 * server.c (main): Kill the inferior if an error occurs during
2164 the first remote_open.
2165
a5e13d24
DJ
21662006-12-05 Markus Deuling <deuling@de.ibm.com>
2167
2168 * README: Update supported targets.
2169
186947f7
DJ
21702006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
2171
2172 * Makefile.in (clean): Remove reg-mips64.c.
2173 (reg-mips64.c, reg-mips64.o): New rules.
2174 * configure.srv: Handle mips64. Include regset support for mips.
2175 * linux-mips-low.c (union mips_register): New.
2176 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
2177 (mips_breakpoint, mips_breakpoint_at): Use int.
2178 (mips_collect_register, mips_supply_register)
2179 (mips_collect_register_32bit, mips_supply_register_32bit)
2180 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2181 (mips_store_fpregset, target_regsets): New.
2182 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
2183
a13e2c95
UW
21842006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2185
2186 * configure.srv: Add target "spu*-*-*".
2187 * Makefile.in (clean): Remove reg-spu.c.
2188 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
2189 * spu-low.c: New file.
2190
cb7283db
DJ
21912006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2192
2193 * configure.ac: Correct td_thr_tls_get_addr test.
2194 * configure: Regenerated.
2195
89be2091
DJ
21962006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
2197
2198 * linux-low.c (linux_wait_for_event): Reformat. Use the
2199 pass_signals array.
2200 * remote-utils.c (decode_address_to_semicolon): New.
2201 * server.c (pass_signals, handle_general_set): New.
2202 (handle_query): Mention QPassSignals for qSupported.
2203 (main): Call handle_general_set.
2204 * server.h (pass_signals, decode_address_to_semicolon): New.
2205
000ef4f0
DJ
22062006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
2207
2208 * server.c (handle_query): Correct error handling for read_auxv.
2209
b7149293
UW
22102005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
2211
2212 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
2213 and srv_linux_thread_db to yes.
2214 * linux-s390-low.c (s390_fill_gregset): New function.
2215 (target_regsets): Define data structure.
2216
dae5f5cf
DJ
22172006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
2218
2219 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
2220 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
2221 * config.in, configure: Regenerated.
2222 * inferiors.c (gdb_id_to_thread): New function.
2223 (gdb_id_to_thread_id): Use it.
2224 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
2225 * linux-low.h (struct process_info): Add th member.
2226 (thread_db_get_tls_address): New prototype.
2227 * remote-utils.c (decode_address): Make non-static.
2228 * server.c (handle_query): Handle qGetTLSAddr.
2229 * server.h (gdb_id_to_thread, decode_address): New prototypes.
2230 * target.h (struct target_ops): Add get_tls_address.
2231 * thread-db.c (maybe_attach_thread): Save the thread handle.
2232 (thread_db_get_tls_address): New.
2233
32ca6d61
DJ
22342006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
2235
2236 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
2237 (linux_resume_one_process): Take a siginfo_t *. Update all
2238 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
2239 (struct pending_signals): Add a siginfo_t.
2240 (linux_wait_for_process): Always set last_status.
2241 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
2242 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
2243 * linux-low.h (struct process_info): Add last_status.
2244
5ffff7c1
DJ
22452006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
2246
2247 * remote-utils.c (try_rle): New function.
2248 (putpkt_binary): Use it.
2249
8695c747
DJ
22502006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
2251
2252 * Makefile.in (clean): Clean reg-x86-64-linux.c.
2253 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
2254 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
2255 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
2256 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
2257 point registers.
2258
290fadea
RS
22592006-08-08 Richard Sandiford <richard@codesourcery.com>
2260
2261 * server.c (terminal_fd): New variable.
2262 (old_foreground_pgrp): Likewise.
2263 (restore_old_foreground_pgrp): New function.
2264 (start_inferior): Record the terminal file descriptor in terminal_fd
2265 and its original foreground group in old_foreground_pgrp. Register
2266 restore_old_foreground_pgrp with atexit().
2267
9f2e1e63
DJ
22682006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
2269
2270 * server.c (handle_query): Correct qPart to qXfer.
2271
b80864fb
DJ
22722006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
2273
2274 * configure.ac: Check for more headers which are missing on
2275 Windows. Automatically supply -lwsock32 and USE_WIN32API.
2276 * configure.srv: Add Cygwin and mingw32.
2277 * remote-utils.c: Don't include headers unconditionally which
2278 are missing on mingw32. Include <winsock.h> for mingw32.
2279 (remote_open): Adjust for mingw32 support. Flush
2280 standard error after writing to it.
2281 (remote_close, putpkt_binary, input_interrupt, block_async_io)
2282 (unblock_async_io, enable_async_io, disable_async_io)
2283 (readchar, getpkt): Update for Winsock support.
2284 (prepare_resume_reply): Expect a protocol signal number.
2285 * server.c: Disable <sys/wait.h> on mingw32.
2286 (start_inferior): Adjust for mingw32 support. Flush
2287 standard error after writing to it.
2288 (attach_inferior): Likewise. Use protocol signal
2289 numbers.
2290 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
2291 and names.
2292 * win32-i386-low.c: New file.
2293 * Makefile.in (XM_CLIBS): Set.
2294 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
2295 (win32-i386-low.o): New dependency rule.
2296 * linux-low.c (linux_wait): Use target signal numbers.
2297 * target.h (struct target_ops): Doc fix.
2298 * server.h (target_signal_to_name): New prototype.
2299 * gdbreplay.c: Don't include headers unconditionally which
2300 are missing on mingw32. Include <winsock.h> for mingw32.
2301 (remote_close, remote_open): Adjust for Winsock support.
2302 * configure, config.in: Regenerated.
2303
0876f84a
DJ
23042006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2305
2306 * server.c (decode_xfer_read, write_qxfer_response): New.
2307 (handle_query): Take a packet length argument. Handle
2308 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
2309 the qSupported response.
2310 (main): Update call to handle_query.
2311
01f9e8fa
DJ
23122006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
2313
2314 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
2315 (putpkt_binary): Renamed from putpkt and adjusted for binary
2316 data.
2317 (putpkt): New wrapper for putpkt_binary.
2318 (readchar): Don't mask off the high bit.
2319 (decode_X_packet): New function.
2320 * server.c (main): Call putpkt_binary if a handler sets the packet
2321 length. Save the length of the incoming packet. Handle 'X'.
2322 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
2323
be2a5f71
DJ
23242006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
2325
2326 * server.c (handle_query): Handle qSupported.
2327
ea025f5f
DJ
23282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2329
2330 * remote-utils.c (all_symbols_looked_up): New variable.
2331 (look_up_one_symbol): Check it.
2332 * server.h (look_up_one_symbol): New declaration.
2333 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
2334
9308fc88
DJ
23352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
2336
2337 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 2338 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
2339 (PTRACE_GET_THREAD_AREA): Define.
2340 (ps_get_thread_area): New function.
2341
52fb6437
NS
23422006-05-09 Nathan Sidwell <nathan@codesourcery.com>
2343
2344 * configure.srv (m68k*-*-uclinux*): New target.
2345 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
2346 (linux_resume_one_process): Remove extraneous cast.
2347 (linux_read_offsets): New.
2348 (linux_target_op): Add linux_read_offsets on mmuless systems.
2349 * server.c (handle_query): Add qOffsets logic.
2350 * target.h (struct target_ops): Add read_offsets.
2351
21b0f40c
DJ
23522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2353
2354 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
2355 (PTRACE_GET_THREAD_AREA): Define.
2356 (ps_get_thread_area): New function.
2357 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
2358 (linux-x86-64-low.o): Update.
2359
0050a760
DJ
23602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
2361
2362 * configure.ac: Remove checks for prfpregset_t.
2363 * gdb_proc_service.h: New file.
2364 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
2365 new "gdb_proc_service.h".
2366 * proc-service.c: Likewise.
2367 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
2368 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
2369 * Makefile.in (gdb_proc_service_h): Updated.
2370 * configure, config.in: Regenerated.
2371
b92a518e
DJ
23722006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2373
2374 * remote-utils.c (prepare_resume_reply): Move declaration
2375 of gdb_id_from_wait to the top of the block.
2376
545587ee
DJ
23772006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
2378
2379 * linux-low.c (regsets_store_inferior_registers): Read the regset
2380 from the target before filling it.
2381
9db87ebd
DJ
23822006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
2383
2384 * server.c (attach_inferior): Return SIGTRAP for a successful
2385 attach.
2386
dd24457d
DJ
23872006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2388
2389 * Makefile.in (OBS): Add version.o.
2390 (STAGESTUFF): Delete.
2391 (version.o): Add dependencies.
2392 (version.c): Replace rule.
2393 (clean): Remove version.c.
2394 * server.c (gdbserver_version): New.
2395 (gdbserver_usage): Use printf.
2396 (main): Handle --version and --help.
2397 * server.h (version, host_name): Add declarations.
2398
6f0f660e
EZ
23992005-12-23 Eli Zaretskii <eliz@gnu.org>
2400
2401 * linux-arm-low.c:
2402 * linux-arm-low.c:
2403 * inferiors.c:
2404 * i387-fp.h:
2405 * i387-fp.c:
2406 * gdbreplay.c:
2407 * regcache.c:
2408 * proc-service.c:
2409 * mem-break.h:
2410 * mem-break.c:
2411 * linux-x86-64-low.c:
2412 * linux-sh-low.c:
2413 * linux-s390-low.c:
2414 * linux-ppc64-low.c:
2415 * linux-ppc-low.c:
2416 * linux-mips-low.c:
2417 * linux-m68k-low.c:
2418 * linux-m32r-low.c:
2419 * linux-low.h:
2420 * linux-low.c:
2421 * linux-ia64-low.c:
2422 * linux-i386-low.c:
2423 * linux-crisv32-low.c:
2424 * thread-db.c:
2425 * terminal.h:
2426 * target.h:
2427 * target.c:
2428 * server.h:
2429 * server.c:
2430 * remote-utils.c:
2431 * regcache.h:
2432 * utils.c:
2433 * Makefile.in:
2434 * configure.ac:
2435 * gdbserver.1: Add (C) after Copyright. Update the FSF
2436 address.
2437
9d1fb177
DJ
24382005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
2439
2440 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
2441 (arm_breakpoint_at): Recognize both breakpoints.
2442 (the_low_target): Use the correct breakpoint instruction.
2443
011a70c2
DJ
24442005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
2445
2446 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
2447 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
2448 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
2449 (the_low_target): Update.
2450
7fb85e41
AS
24512005-10-25 Andreas Schwab <schwab@suse.de>
2452
2453 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
2454
2455 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
2456 (ia64_num_regs): Reduce to 462.
2457
3db0444b
DJ
24582005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
2459
2460 * acinclude.m4: Correct quoting.
2461 * aclocal.m4: Regenerated.
2462
2463 Suggested by SZOKOVACS Robert <szo@ies.hu>:
2464 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
2465 (thread_db_init): Call thread_db_err_str.
2466 * configure.ac: Check for TD_VERSION.
2467 * config.in, configure: Regenerated.
2468
bee0189a
DJ
24692005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2470
2471 * server.h (error, fatal, warning): Add ATTR_FORMAT.
2472
e9d25b98
DJ
24732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2474
2475 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
2476 is not available. Define HAVE_PTRACE_GETREGS if it is.
2477 * config.in, configure: Regenerated.
2478 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
2479 * linux-i386-low.c, linux-m68k-low.c: Update to use
2480 HAVE_PTRACE_GETREGS.
2481 * linux-low.c (regsets_fetch_inferior_registers)
2482 (regsets_store_inferior_registers): Only return 0 if we processed
2483 GENERAL_REGS.
2484 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
2485 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
2486
a06660f7
DJ
24872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2488
2489 * inferiors.c (struct thread_info): Add gdb_id.
2490 (add_thread): Add gdb_id argument.
2491 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
2492 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
2493 calls to add_thread.
2494 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
2495 * server.c (handle_query): Use thread_to_gdb_id.
2496 (handle_v_cont, main): Use gdb_id_to_thread_id.
2497 * server.h (add_thread): Update prototype.
2498 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
2499 prototypes.
2500
5a1f5858
DJ
25012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
2502
2503 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
2504 left-padded registers.
2505 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
2506 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
2507
e122f1f5
SE
25082005-07-01 Steve Ellcey <sje@cup.hp.com>
2509
2510 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
2511 * configure: Regenerate.
2512 * config.in: Regenerate.
2513 * server.h (NEED_DECLARATION_STRERROR):
2514 Replace with !HAVE_DECL_STRERROR.
2515
d592fa2f
DJ
25162005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
2517
2518 * linux-low.c (linux_wait, linux_send_signal): Don't test
2519 an unsigned long variable for > 0 if it could be MAX_ULONG.
2520 * server.c (myresume): Likewise.
2521 * target.c (set_desired_inferior): Likewise.
2522
ccbd4912
MK
25232005-06-13 Mark Kettenis <kettenis@gnu.org>
2524
2525 * configure.ac: Simplify and improve check for socklen_t.
2526 * configure, config.in: Regenerate.
2527
f450004a
DJ
25282005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
2529
2530 * acconfig.h: Remove.
2531 * configure.ac: Add a test for socklen_t. Use three-argument
2532 AC_DEFINE throughout.
2533 * config.in: Regenerated using autoheader 2.59.
2534 * configure: Regenerated.
2535
2536 * gdbreplay.c (socklen_t): Provide a default.
2537 (remote_open): Use socklen_t.
2538 * remote-utils.c (socklen_t): Provide a default.
2539 (remote_open): Use socklen_t.
2540 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
2541 unsigned char.
2542
2543 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
2544 char for buffers.
2545 * linux-low.c (linux_read_memory, linux_write_memory)
2546 (linux_read_auxv): Likewise.
2547 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
2548 (check_mem_write): Likewise.
2549 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
2550 Likewise.
2551 * regcache.c (struct inferior_rgcache_data, registers_to_string)
2552 (registers_from_string, register_data): Likewise.
2553 * server.c (handle_query, main): Likewise.
2554 * server.h (convert_ascii_to_int, convert_int_to_ascii)
2555 (decode_M_packet): Likewise.
2556 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
2557 * target.h (struct target_ops): Update read_memory, write_memory,
2558 and read_auxv.
2559 (read_inferior_memory, write_inferior_memory): Update.
2560 * linux-low.h (struct linux_target_ops): Change type of breakpoint
2561 to unsigned char *.
2562 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
2563 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
2564 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
2565 linux-s390-low.c, linux-sh-low.c: Update for changes in
2566 read_inferior_memory and the_low_target->breakpoint.
2567
eee84df1
DJ
25682005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
2569
2570 * Makefile.in (SFILES): Add linux-ppc64-low.c.
2571 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
2572 * configure.srv: Add powerpc64-*-linux*.
2573 * linux-ppc64-low.c: New file.
2574
45b134e5
OF
25752005-05-23 Orjan Friberg <orjanf@axis.com>
2576
2577 * linux-cris-low.c: New file with support for CRIS.
2578 * linux-crisv32-low.c: Ditto for CRISv32.
2579 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
2580 (clean): Add reg-cris.c and reg-crisv32.c.
2581 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
2582 reg-crisv32.o, and reg-crisv32.c to make rules.
2583 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
2584 recognized targets.
2585
48d93c75
UW
25862005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
2587
2588 * linux-low.c (fetch_register): Ensure buffer size is a multiple
2589 of sizeof (PTRACE_XFER_TYPE).
2590 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
2591
e013ee27
OF
25922005-05-12 Orjan Friberg <orjanf@axis.com>
2593
2594 * target.h (struct target_ops): Add insert_watchpoint,
2595 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
2596 pointers for hardware watchpoint support.
2597 * linux-low.h (struct linux_target_ops): Ditto.
2598 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
2599 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
2600 to linux_target_ops.
2601 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
2602 reply packet.
2603 * server.c (main): Recognize 'Z' and 'z' packets.
2604
b0ded00b
UW
26052005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
2606
2607 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
2608 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
2609 (the_low_target): Add new members.
2610
8643e2ad
DJ
26112005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2612
2613 * proc-service.c (ps_lgetregs): Search all_processes instead of
2614 all_threads.
2615
fc620387
DJ
26162005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
2617
2618 * server.c (start_inferior): Change return type to int.
2619 (attach_inferior): Change sigptr to int *.
2620 (handle_v_cont, handle_v_requests): Change signal to int *.
2621 (main): Change signal to int.
2622
26232005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
2624
2625 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
2626 * configure.srv: Add m32r*-*-linux*.
2627 * linux-m32r-low.c: New file.
2628
e0e76420
DJ
26292005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2630
2631 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
2632
a1928bad
DJ
26332005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2634
2635 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
2636 Take unsigned long arguments for PIDs.
2637 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
2638 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
2639 (wait_for_sigstop, linux_resume_one_process)
2640 (regsets_fetch_inferior_registers, linux_send_signal)
2641 (linux_read_auxv): Likewise. Update the types of variables holding
2642 PIDs. Update format string specifiers.
2643 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
2644 * remote-utils.c (prepare_resume_reply): Likewise.
2645 * server.c (cont_thread, general_thread, step_thread)
2646 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
2647 unsigned long.
2648 (handle_query): Update format specifiers.
2649 (handle_v_cont, main): Use strtoul for thread IDs.
2650 * server.h (struct inferior_list_entry): Use unsigned long for ID.
2651 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
2652 (general_thread, step_thread, thread_from_wait)
2653 (old_thread_from_wait): Update.
2654 * target.h (struct thread_resume): Use unsigned long for THREAD.
2655 (struct target_ops): Use unsigned long for arguments to attach and
2656 thread_alive.
2657
dcdb98d2
DJ
26582005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2659
2660 * acinclude.m4: Include bfd/bfd.m4 directly.
2661 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
2662 <agriffis@toolchain.org>.
2663 * aclocal.m4, configure: Regenerated.
2664
bec39cab
AC
26652005-01-07 Andrew Cagney <cagney@gnu.org>
2666
2667 * configure.ac: Rename configure.in, require autoconf 2.59.
2668 * configure: Re-generate.
2669
434c4c77
DJ
26702004-12-08 Daniel Jacobowitz <dan@debian.org>
2671
2672 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
2673 LIBS when finished.
2674 * aclocal.m4: Regenerated.
2675 * configure: Regenerated.
2676
db1d3e1b
AS
26772004-11-21 Andreas Schwab <schwab@suse.de>
2678
2679 * linux-m68k-low.c (m68k_num_gregs): Define.
2680 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
2681 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
2682 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
2683 (m68k_breakpoint_at): New. Add to the_low_target.
2684
2685 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
2686 srv_linux_thread_db to yes.
2687
43360365
JB
26882004-10-20 Joel Brobecker <brobecker@gnat.com>
2689
2690 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
2691 (ARCH_SET_FS): Likewise.
2692 (ARCH_GET_FS): Likewise.
2693 (ARCH_GET_GS): Likewise.
2694
fd500816
DJ
26952004-10-16 Daniel Jacobowitz <dan@debian.org>
2696
2697 * linux-i386-low.c (ps_get_thread_area): New.
2698 * linux-x86-64-low.c (ps_get_thread_area): New.
2699 * linux-low.c: Include <sys/syscall.h>.
2700 (linux_kill_one_process): Don't kill the first thread here.
2701 (linux_kill): Kill the first thread here.
2702 (kill_lwp): New function.
2703 (send_sigstop, linux_send_signal): Use it.
2704 * proc-service.c: Clean up #ifdefs.
2705 (fpregset_info): Delete.
2706 (ps_lgetregs): Update and enable implementation.
2707 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
2708 implementations.
2709 * remote-utils.c (struct sym_cache, symbol_cache): New.
2710 (input_interrupt): Print a clearer message.
2711 (async_io_enabled): New variable.
2712 (enable_async_io, disable_async_io): Use it. Update comments.
2713 (look_up_one_symbol): Use the symbol cache.
2714 * thread-db.c (thread_db_look_up_symbols): New function.
2715 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
2716
f6de3c42
DJ
27172004-10-16 Daniel Jacobowitz <dan@debian.org>
2718
2719 * configure.in: Test for -rdynamic.
2720 * configure: Regenerated.
2721 * Makefile (INTERNAL_LDFLAGS): New.
2722 (gdbserver, gdbreplay): Use it.
2723
2c0fc042
AC
27242004-09-02 Andrew Cagney <cagney@gnu.org>
2725
2726 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
2727
075b3282
DJ
27282004-03-23 Daniel Jacobowitz <drow@mvista.com>
2729
2730 * linux-low.c (linux_wait): Clear all_processes list also.
2731
fa6a77dc
DJ
27322004-03-12 Daniel Jacobowitz <drow@mvista.com>
2733
2734 * linux-low.c: Include <errno.h>. Remove extern declaration of
2735 errno.
2736
6d782a97
DJ
27372004-03-12 Daniel Jacobowitz <drow@mvista.com>
2738
2739 * gdbreplay.c, server.h, utils.c: Update copyright years.
2740
3a7fb99b
DJ
27412004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2742
2743 * server.c (main): Print child status or termination signal from
2744 variable 'signal', not 'sig'.
2745
c3e735a6
DJ
27462004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2747
2748 * linux-low.c (linux_read_memory): Change return type to
2749 int. Check for and return error from ptrace().
2750 * target.c (read_inferior_memory): Change return type to int. Pass
2751 back return status from the_target->read_memory().
2752 * target.h (struct target_ops): Adapt *read_memory() prototype.
2753 Update comment.
2754 (read_inferior_memory): Adapt prototype.
2755 * server.c (main): Return an error packet if
2756 read_inferior_memory() returns an error.
2757
a59d1c82
DJ
27582004-03-04 Daniel Jacobowitz <drow@mvista.com>
2759
2760 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2761 Unify with other clean targets.
2762
dc3f8883
DJ
27632004-02-29 Daniel Jacobowitz <drow@mvista.com>
2764
2765 * server.c (handle_v_cont): Call set_desired_inferior.
2766
89a208da
DJ
27672004-02-29 Daniel Jacobowitz <drow@mvista.com>
2768
2769 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2770
62ea82f5
DJ
27712004-02-29 Daniel Jacobowitz <drow@mvista.com>
2772
2773 * linux-low.c (linux_wait): Unblock async I/O.
2774 (linux_resume): Block and enable async I/O.
2775 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2776 * server.h (block_async_io, unblock_async_io): Add prototypes.
2777
6910d122
DJ
27782004-02-29 Daniel Jacobowitz <drow@mvista.com>
2779
2780 * remote-utils.c (remote_open): Print a status notice after
2781 opening a TCP port.
2782 * server.c (attach_inferior): Print a status notice after
2783 attaching.
2784
27852004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
2786
2787 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2788
c89dc5d4
DJ
27892004-02-26 Daniel Jacobowitz <drow@mvista.com>
2790
2791 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2792 error packet.
2793 * server.c, target.h: Update copyright years.
2794
4b8dad4a
RM
27952004-02-25 Roland McGrath <roland@redhat.com>
2796
2797 * target.h (struct target_ops): New member `read_auxv'.
2798 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2799 * linux-low.c (linux_read_auxv): New function.
2800 (linux_target_ops): Initialize `read_auxv' member to that.
2801
d7446758
JB
28022004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2803
2804 Committed by Jim Blandy <jimb@redhat.com>.
2805
2806 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 2807 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
2808 instead of GPR_SIZE to distiguish s390 and s390x targets.
2809
5544ad89
DJ
28102004-01-31 Daniel Jacobowitz <drow@mvista.com>
2811
2812 * linux-low.c: Update copyright year.
2813 (check_removed_breakpoint): Clear pending_is_breakpoint.
2814 (linux_set_resume_request, linux_queue_one_thread)
2815 (resume_status_pending_p): New functions.
2816 (linux_continue_one_thread): Use process->resume.
2817 (linux_resume): Only resume threads if there are no pending events.
2818 * linux-low.h (struct process_info): Add resume request
2819 pointer.
2820
2a68b70e
DJ
28212004-01-30 Daniel Jacobowitz <drow@mvista.com>
2822
2823 * regcache.c (new_register_cache): Clear the allocated register
2824 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2825
64386c31
DJ
28262003-10-13 Daniel Jacobowitz <drow@mvista.com>
2827
2828 * linux-low.c (linux_resume): Take a struct thread_resume *
2829 argument.
2830 (linux_wait): Update call.
2831 (resume_ptr): New static variable.
2832 (linux_continue_one_thread): Renamed from
2833 linux_continue_one_process. Use resume_ptr.
2834 (linux_resume): Use linux_continue_one_thread.
2835 * server.c (handle_v_cont, handle_v_requests): New functions.
2836 (myresume): New function.
2837 (main): Handle 'v' case.
2838 * target.h (struct thread_resume): New type.
2839 (struct target_ops): Change argument of "resume" to struct
2840 thread_resume *.
2841 (myresume): Delete macro.
2842
c938e9b0
L
28432003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2844
2845 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2846 (uninstall): Support DESTDIR.
2847
7f313d07
BC
2848Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2849
2850 * configure.srv: Add xscale*linux copy of arm*linux entry.
2851
3b2fc2ea
DJ
28522003-07-24 Daniel Jacobowitz <drow@mvista.com>
2853
2854 * linux-arm-low.c (arm_reinsert_addr): New function.
2855 (the_low_target): Add arm_reinsert_addr.
2856
1c0a559e
MK
28572003-07-08 Mark Kettenis <kettenis@gnu.org>
2858
2859 * mem-break.c: Remove whitespace at end of file.
2860
43d5792c
DJ
28612003-06-28 Daniel Jacobowitz <drow@mvista.com>
2862
2863 * configure.in: Check whether we need to prototype strerror.
2864 * server.h: Optionally prototype strerror.
2865 * gdbreplay.c (perror_with_name): Use strerror.
2866 * linux-low.c (linux_attach_lwp): Use strerror.
2867 * utils.c (perror_with_name): Use strerror.
2868 * config.in, configure: Regenerated.
2869
c8a86edf
DJ
28702003-06-28 Daniel Jacobowitz <drow@mvista.com>
2871
2872 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2873 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2874
73d37363
DJ
28752003-06-20 Daniel Jacobowitz <drow@mvista.com>
2876
2877 * Makefile.in (SFILES): Update.
2878 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2879 low-sun3.c: Remove files.
2880
6ad8ae5c
DJ
28812003-06-17 Daniel Jacobowitz <drow@mvista.com>
2882
2883 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2884 (linux_detach_one_process, linux_detach): New functions.
2885 (linux_target_ops): Add linux_detach.
2886 * server.c (main): Handle 'D' packet.
2887 * target.h (struct target_ops): Add "detach" member.
2888 (detach_inferior): Define.
2889
1581182a
MK
28902003-06-13 Mark Kettenis <kettenis@gnu.org>
2891
2892 From Kelley Cook <kelleycook@wideopenwest.com>:
2893 * configure.srv: Accept i[34567]86 variants.
2894
e5379b03
DJ
28952003-06-05 Daniel Jacobowitz <drow@mvista.com>
2896
2897 * linux-low.c (linux_wait_for_event): Correct comment typos.
2898 (linux_resume_one_process): Call check_removed_breakpoint.
2899 (linux_send_signal): New function.
2900 (linux_target_ops): Add linux_send_signal.
2901 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2902 of kill.
2903 * target.h (struct target_ops): Add send_signal.
2904
2ff29de4
JB
29052003-05-29 Jim Blandy <jimb@redhat.com>
2906
2907 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2908 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2909 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2910 away part of the register's value.
2911
254787d4
DJ
29122003-03-26 Daniel Jacobowitz <drow@mvista.com>
2913
2914 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2915 (linux_wait_for_event, linux_init_signals): Likewise.
2916
94e10508
DJ
29172003-03-17 Daniel Jacobowitz <drow@mvista.com>
2918
2919 * configure.in: Check for stdlib.h.
2920 * configure: Regenerated.
2921 * config.in: Regenerated.
2922
4c0711e0
DJ
29232003-01-04 Andreas Schwab <schwab@suse.de>
2924
2925 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2926
ef66e766
AC
29272003-01-02 Andrew Cagney <ac131313@redhat.com>
2928
2929 * Makefile.in: Remove obsolete code.
2930
a1358604
DJ
29312002-11-20 Daniel Jacobowitz <drow@mvista.com>
2932
2933 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2934 defined(PT_FPR0_HI).
2935
23ce3b1c
DJ
29362002-11-17 Stuart Hughes <seh@zee2.com>
2937
2938 * linux-arm-low.c (arm_num_regs): Increase.
2939 (arm_regmap): Include status register.
2940
29412002-11-17 Daniel Jacobowitz <drow@mvista.com>
2942
2943 * linux-low.c (register_addr): Remove incorrect -1 check.
2944
a9fa9f7d
DJ
29452002-08-29 Daniel Jacobowitz <drow@mvista.com>
2946
2947 * linux-low.c (linux_create_inferior): Call setpgid. Return
2948 the new PID.
2949 (unstopped_p, linux_signal_pid): Remove.
2950 (linux_target_ops): Remove linux_signal_pid.
2951 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2952 global instead of target method.
2953 * target.h (struct target_ops): Remove signal_pid. Update comment
2954 for create_inferior.
2955 * server.c (signal_pid): New variable.
2956 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 2957 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
2958 (attach_inferior): Set signal_pid.
2959
17574093
DJ
29602002-08-23 Daniel Jacobowitz <drow@mvista.com>
2961
2962 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2963
29642002-08-20 Jim Blandy <jimb@redhat.com>
2965
2966 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2967 default for this.
2968
29692002-08-01 Andrew Cagney <cagney@redhat.com>
2970
2971 * Makefile.in: Make chill references obsolete.
2972
29732002-07-24 Kevin Buettner <kevinb@redhat.com>
2974
2975 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2976 * configure: Regenerate.
2977 * config.in: Regenerate.
2978
29792002-07-09 David O'Brien <obrien@FreeBSD.org>
2980
2981 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2982 (perror_with_name, remote_close, remote_open, expect, play): Static.
2983
29842002-07-04 Michal Ludvig <mludvig@suse.cz>
2985
4b8dad4a 2986 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
2987 byte offsets instead of an array of indexes.
2988 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2989
29902002-06-13 Daniel Jacobowitz <drow@mvista.com>
2991
2992 * regcache.c: Add comment.
2993
29942002-06-11 Daniel Jacobowitz <drow@mvista.com>
2995
2996 * thread-db.c: New file.
2997 * proc-service.c: New file.
2998 * acinclude.m4: New file.
2999 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
3000 proc-service.o, and thread-db.o.
3001 (linux-low.o): Add USE_THREAD_DB.
3002 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
3003 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
3004 * aclocal.m4: Regenerated.
3005 * config.in: Regenerated.
3006 * configure: Regenerated.
3007 * configure.in: Check for proc_service.h, sys/procfs.h,
3008 thread_db.h, and linux/elf.h headrs.
3009 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
3010 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
3011 Check for -lthread_db and thread support.
3012 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
3013 PowerPC, and SuperH.
3014 * i387-fp.c: Constify arguments.
3015 * i387-fp.h: Likewise.
3016 * inferiors.c: (struct thread_info): Renamed from
3017 `struct inferior_info'. Remove PID member. Use generic inferior
3018 list header. All uses updated.
3019 (inferiors, signal_pid): Removed.
3020 (all_threads): New variable.
3021 (get_thread): Define.
3022 (add_inferior_to_list): New function.
3023 (for_each_inferior): New function.
3024 (change_inferior_id): New function.
3025 (add_inferior): Removed.
3026 (remove_inferior): New function.
3027 (add_thread): New function.
3028 (free_one_thread): New function.
3029 (remove_thread): New function.
3030 (clear_inferiors): Use for_each_inferior and free_one_thread.
3031 (find_inferior): New function.
3032 (find_inferior_id): New function.
3033 (inferior_target_data): Update argument type.
3034 (set_inferior_target_data): Likewise.
3035 (inferior_regcache_data): Likewise.
3036 (set_inferior_regcache_data): Likewise.
3037 * linux-low.c (linux_bp_reinsert): Remove.
3038 (all_processes, stopping_threads, using_thrads)
3039 (struct pending_signals, debug_threads, pid_of): New.
3040 (inferior_pid): Replace with macro.
3041 (struct inferior_linux_data): Remove.
3042 (get_stop_pc, add_process): New functions.
3043 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
3044 Use add_process and add_thread.
3045 (linux_attach_lwp): New function, based on old linux_attach. Use
3046 add_process and add_thread. Set stop_expected for new threads.
3047 (linux_attach): New function.
3048 (linux_kill_one_process): New function.
3049 (linux_kill): Kill all LWPs.
3050 (linux_thread_alive): Use find_inferior_id.
3051 (check_removed_breakpoints, status_pending_p): New functions.
3052 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
3053 Update. Use WNOHANG. Wait for cloned processes also. Update process
3054 struct for the found process.
3055 (linux_wait_for_event): New function.
3056 (linux_wait): Use it. Support LWPs.
3057 (send_sigstop, wait_for_sigstop, stop_all_processes)
3058 (linux_resume_one_process, linux_continue_one_process): New functions.
3059 (linux_resume): Support LWPs.
3060 (REGISTER_RAW_SIZE): Remove.
3061 (fetch_register): Use register_size instead. Call supply_register.
3062 (usr_store_inferior_registers): Likewise. Call collect_register.
3063 Fix recursive case.
3064 (regsets_fetch_inferior_registers): Improve error message.
3065 (regsets_store_inferior_registers): Add debugging.
3066 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
3067 (unstopped_p, linux_signal_pid): New functions.
3068 (linux_target_ops): Add linux_signal_pid.
3069 (linux_init_signals): New function.
3070 (initialize_low): Call it. Initialize using_threads.
3071 * regcache.c (inferior_regcache_data): Add valid
3072 flag.
3073 (get_regcache): Fetch registers lazily. Add fetch argument
3074 and update all callers.
3075 (regcache_invalidate_one, regcache_invalidate): New
3076 functions.
3077 (new_register_cache): Renamed from create_register_cache.
3078 Return the new regcache.
3079 (free_register_cache): Change argument to a void *.
3080 (registers_to_string, registers_from_string): Call get_regcache
3081 with fetch flag set.
3082 (register_data): Make static. Pass fetch flag to get_regcache.
3083 (supply_register): Call get_regcache with fetch flag clear.
3084 (collect_register): Call get_regcache with fetch flag set.
3085 (collect_register_as_string): New function.
3086 * regcache.h: Update.
3087 * remote-utils.c (putpkt): Flush after debug output and use
3088 stderr.
3089 Handle input interrupts while waiting for an ACK.
3090 (input_interrupt): Use signal_pid method.
3091 (getpkt): Flush after debug output and use stderr.
3092 (outreg): Use collect_register_as_string.
3093 (new_thread_notify, dead_thread_notify): New functions.
3094 (prepare_resume_reply): Check using_threads. Set thread_from_wait
3095 and general_thread.
3096 (look_up_one_symbol): Flush after debug output.
3097 * server.c (step_thread, server_waiting): New variables.
3098 (start_inferior): Don't use signal_pid. Update call to mywait.
3099 (attach_inferior): Update call to mywait.
3100 (handle_query): Handle qfThreadInfo and qsThreadInfo.
3101 (main): Don't fetch/store registers explicitly. Use
3102 set_desired_inferior. Support proposed ``Hs'' packet. Update
3103 calls to mywait.
3104 * server.h: Update.
3105 (struct inferior_list, struct_inferior_list_entry): New.
3106 * target.c (set_desired_inferior): New.
3107 (write_inferior_memory): Constify.
3108 (mywait): New function.
3109 * target.h: Update.
3110 (struct target_ops): New signal_pid method.
3111 (mywait): Removed macro, added prototype.
3112
3113 * linux-low.h (regset_func): Removed.
3114 (regset_fill_func, regset_store_func): New.
3115 (enum regset_type): New.
3116 (struct regset_info): Add type field. Use new operation types.
3117 (struct linux_target_ops): stop_pc renamed to get_pc.
3118 Add decr_pc_after_break and breakpoint_at.
3119 (get_process, get_thread_proess, get_process_thread)
3120 (strut process_info, all_processes, linux_attach_lwp)
3121 (thread_db_init): New.
3122
3123 * linux-arm-low.c (arm_get_pc, arm_set_pc,
3124 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
3125 (the_low_target): Add new members.
3126 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
3127 (i386_store_fpxregset): Constify.
3128 (target_regsets): Add new kind identifier.
3129 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
3130 (i386_set_pc): Add debugging.
3131 (i386_breakpoint_at): New function.
3132 (the_low_target): Add new members.
3133 * linux-mips-low.c (mips_get_pc, mips_set_pc)
3134 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
3135 (mips_breakpoint_at): New.
3136 (the_low_target): Add new members.
3137 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
3138 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
3139 (the_low_target): Add new members.
3140 * linux-sh-low.c (sh_get_pc, sh_set_pc)
3141 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
3142 (the_low_target): Add new members.
3143 * linux-x86-64-low.c (target_regsets): Add new kind
3144 identifier.
3145
31462002-05-15 Daniel Jacobowitz <drow@mvista.com>
3147
3148 From Martin Pool <mbp@samba.org>:
3149 * server.c (gdbserver_usage): New function.
3150 (main): Call it.
3151
31522002-05-14 Daniel Jacobowitz <drow@mvista.com>
3153
3154 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
3155 stop_at -> stop_pc.
3156
31572002-05-04 Andrew Cagney <ac131313@redhat.com>
3158
3159 * Makefile.in: Remove obsolete code.
3160
31612002-04-24 Michal Ludvig <mludvig@suse.cz>
3162
3163 * linux-low.c (regsets_fetch_inferior_registers),
3164 (regsets_store_inferior_registers): Removed cast to int from
3165 ptrace() calls.
3166 * regcache.h: Added declaration of struct inferior_info.
3167
31682002-04-20 Daniel Jacobowitz <drow@mvista.com>
3169
3170 * inferiors.c (struct inferior_info): Add regcache_data.
3171 (add_inferior): Call create_register_cache.
3172 (clear_inferiors): Call free_register_cache.
3173 (inferior_regcache_data, set_inferior_regcache_data): New functions.
3174 * regcache.c (struct inferior_regcache_data): New.
3175 (registers): Remove.
3176 (get_regcache): New function.
3177 (create_register_cache, free_register_cache): New functions.
3178 (set_register_cache): Don't initialize the register cache here.
3179 (registers_to_string, registers_from_string, register_data): Call
3180 get_regcache.
3181 * regcache.h: Add prototypes.
3182 * server.h: Likewise.
3183
31842002-04-20 Daniel Jacobowitz <drow@mvista.com>
3185
3186 * mem-break.c: New file.
3187 * mem-break.h: New file.
3188 * Makefile.in: Add mem-break.o rule; update server.h
3189 dependencies.
3190 * inferiors.c (struct inferior_info): Add target_data
3191 member.
3192 (clear_inferiors): Free target_data member if set.
3193 (inferior_target_data, set_inferior_target_data): New functions.
3194 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
3195 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
3196 * linux-low.c (linux_bp_reinsert): New variable.
3197 (struct inferior_linux_data): New.
3198 (linux_create_inferior): Use set_inferior_target_data.
3199 (linux_attach): Likewise. Call add_inferior.
3200 (linux_wait_for_one_inferior): New function.
3201 (linux_wait): Call it.
3202 (linux_write_memory): Add const.
3203 (initialize_low): Call set_breakpoint_data.
3204 * linux-low.h (struct linux_target_ops): Add breakpoint
3205 handling members.
3206 * server.c (attach_inferior): Remove extra add_inferior
3207 call.
3208 * server.h: Include mem-break.h. Update inferior.c
3209 prototypes.
3210 * target.c (read_inferior_memory)
3211 (write_inferior_memory): New functions.
3212 * target.h (read_inferior_memory)
3213 (write_inferior_memory): Change macros to prototypes.
3214 (struct target_ops): Update comments. Add const to write_memory
3215 definition.
3216
32172002-04-11 Daniel Jacobowitz <drow@mvista.com>
3218
3219 * linux-low.c (usr_store_inferior_registers): Support
3220 registers which are allowed to fail to store.
3221 * linux-low.h (linux_target_ops): Likewise.
3222 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
3223 (ppc_cannot_store_register): FPSCR may not be storable.
3224
32252002-04-09 Daniel Jacobowitz <drow@mvista.com>
3226
3227 * server.h: Include <string.h> if HAVE_STRING_H.
3228 * ChangeLog: Correct paths in last ChangeLog entry.
3229
32302002-04-09 Daniel Jacobowitz <drow@mvista.com>
3231
3232 * linux-low.h: Remove obsolete prototypes.
3233 (struct linux_target_ops): New.
3234 (extern the_low_target): New.
3235 * linux-low.c (num_regs, regmap): Remove declarations.
3236 (register_addr): Use the_low_target explicitly.
3237 (fetch_register): Likewise.
3238 (usr_fetch_inferior_registers): Likewise.
3239 (usr_store_inferior_registers): Likewise.
3240 * linux-arm-low.c (num_regs): Remove.
3241 (arm_num_regs): Define.
3242 (arm_regmap): Renamed from regmap, made static.
3243 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
3244 made static.
3245 (arm_cannot_store_register): Renamed from cannot_store_register,
3246 made static.
3247 (the_low_target): New.
3248 * linux-i386-low.c (num_regs): Remove.
3249 (i386_num_regs): Define.
3250 (i386_regmap): Renamed from regmap, made static.
3251 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
3252 made static.
3253 (i386_cannot_store_register): Renamed from cannot_store_register,
3254 made static.
3255 (the_low_target): New.
3256 * linux-ia64-low.c (num_regs): Remove.
3257 (ia64_num_regs): Define.
3258 (ia64_regmap): Renamed from regmap, made static.
3259 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
3260 made static.
3261 (ia64_cannot_store_register): Renamed from cannot_store_register,
3262 made static.
3263 (the_low_target): New.
3264 * linux-m68k-low.c (num_regs): Remove.
3265 (m68k_num_regs): Define.
3266 (m68k_regmap): Renamed from regmap, made static.
3267 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
3268 made static.
3269 (m68k_cannot_store_register): Renamed from cannot_store_register,
3270 made static.
3271 (the_low_target): New.
3272 * linux-mips-low.c (num_regs): Remove.
3273 (mips_num_regs): Define.
3274 (mips_regmap): Renamed from regmap, made static.
3275 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
3276 made static.
3277 (mips_cannot_store_register): Renamed from cannot_store_register,
3278 made static.
3279 (the_low_target): New.
3280 * linux-ppc-low.c (num_regs): Remove.
3281 (ppc_num_regs): Define.
3282 (ppc_regmap): Renamed from regmap, made static.
3283 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
3284 made static.
3285 (ppc_cannot_store_register): Renamed from cannot_store_register,
3286 made static.
3287 (the_low_target): New.
3288 * linux-s390-low.c (num_regs): Remove.
3289 (s390_num_regs): Define.
3290 (s390_regmap): Renamed from regmap, made static.
3291 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
3292 made static.
3293 (s390_cannot_store_register): Renamed from cannot_store_register,
3294 made static.
3295 (the_low_target): New.
3296 * linux-sh-low.c (num_regs): Remove.
3297 (sh_num_regs): Define.
3298 (sh_regmap): Renamed from regmap, made static.
3299 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
3300 made static.
3301 (sh_cannot_store_register): Renamed from cannot_store_register,
3302 made static.
3303 (the_low_target): New.
3304 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
3305 (the_low_target): New.
3306
33072002-04-09 Daniel Jacobowitz <drow@mvista.com>
3308
3309 * Makefile.in: Add stamp-h target.
3310 * configure.in: Create stamp-h.
3311 * configure: Regenerated.
3312
33132002-04-09 Daniel Jacobowitz <drow@mvista.com>
3314
3315 * inferiors.c: New file.
3316 * target.c: New file.
3317 * target.h: New file.
3318 * Makefile.in: Add target.o and inferiors.o. Update
3319 dependencies.
3320 * linux-low.c (inferior_pid): New static variable,
3321 moved from server.c.
3322 (linux_create_inferior): Renamed from create_inferior.
3323 Call add_inferior. Return 0 on success instead of a PID.
3324 (linux_attach): Renamed from myattach.
3325 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
3326 (linux_thread_alive): Renamed from mythread_alive.
3327 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
3328 child dies.
3329 (linux_resume): Renamed from myresume. Add missing ``return 0''.
3330 (regsets_store_inferior_registers): Correct error message.
3331 Add missing ``return 0''.
3332 (linux_fetch_registers): Renamed from fetch_inferior_registers.
3333 (linux_store_registers): Renamed from store_inferior_registers.
3334 (linux_read_memory): Renamed from read_inferior_memory.
3335 (linux_write_memory): Renamed from write_inferior_memory.
3336 (linux_target_ops): New structure.
3337 (initialize_low): Call set_target_ops ().
3338 * remote-utils.c (unhexify): New function.
3339 (hexify): New function.
3340 (input_interrupt): Send signals to ``signal_pid''.
3341 * server.c (inferior_pid): Remove.
3342 (start_inferior): Update create_inferior call.
3343 (attach_inferior): Call add_inferior.
3344 (handle_query): New function.
3345 (main): Call handle_query for `q' packets.
3346 * server.h: Include "target.h". Remove obsolete prototypes.
3347 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
3348
33492002-04-09 Daniel Jacobowitz <drow@mvista.com>
3350
3351 * Makefile.in: Add WARN_CFLAGS. Update configury
3352 dependencies.
3353 * configure.in: Check for <string.h>
3354 * configure: Regenerate.
3355 * config.in: Regenerate.
3356 * gdbreplay.c: Include needed system headers.
3357 (remote_open): Remove strchr prototype.
3358 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
3359 * regcache.c (supply_register): Change buf argument to const void *.
3360 (supply_register_by_name): Likewise.
3361 (collect_register): Change buf argument to void *.
3362 (collect_register_by_name): Likewise.
3363 * regcache.h: Add missing prototypes.
3364 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
3365 * server.c (handle_query): New function.
3366 (attached): New static variable, moved out of main.
3367 (main): Quiet longjmp clobber warnings.
3368 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
3369 * utils.c (error): Remove NORETURN.
3370 (fatal): Likewise.