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