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