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