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