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