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