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