1 2004-12-13 Kevin Buettner <kevinb@redhat.com>
3 * thread-db.c (thread_db_get_thread_reg): Don't allow a successful
4 return without first initializing ``reg''.
5 (thread_db_set_thread_reg): Remove code intended to for
6 thread_db_get_thread_reg().
8 2004-12-09 Jim Blandy <jimb@redhat.com>
10 * aclocal.m4, configure: Regenerated.
12 2004-11-18 Kevin Buettner <kevinb@redhat.com>
14 * thread-db.c (thread_db_set_thread_reg): Don't allow a successful
15 return without first initializing ``reg''.
17 2004-10-20 Jim Blandy <jimb@redhat.com>
19 Use the libthread_db 'td_symbol_list' function to look up all the
20 symbols libthread_db will need when invited to by GDB.
21 * thread-db.c (add_symbol_to_list): Make 'name' argument const.
22 (td_symbol_list_p): New libthread_db function pointer.
23 (thread_db_dlopen): Initialize it.
24 (thread_db_attach): Use td_symbol_list to pre-load our symbol
25 cache with the names of all the symbols libthread_db will ever
28 * thread-db.c (thread_db_get_gen): There's no reason to try to
29 open a thread agent until we've at least requested values for all
30 the symbols we know about.
32 * server.c (usage): Don't include the entire pathname in the usage
35 2004-10-19 Jim Blandy <jimb@redhat.com>
37 * thread-db.c (get_thread_signals): Doc fix.
39 * thread-db.c (enum symbol_cache_defined): Move this definition
40 above that of (struct symbol_cache), and give it a name.
41 (struct symbol_cache): Use that enum as the type of 'defined_p', so
42 the debugger will print symbol cache entries more helpfully.
44 * ptrace-target.c (ptrace_create_child): Don't use sys_nerr to
45 check that errno is in a valid range. The use sys_nerr is
46 deprecated on GNU/Linux, and according to the ISO C standard and
47 POSIX, strerror always returns a valid string, even for invalid
50 2004-10-07 Jim Blandy <jimb@redhat.com>
52 * Makefile.am (rda_DEPENDENCIES): Add ../lib/librda.la.
53 * Makefile.in: Regenerated.
55 * server.c (main): Check for an error return from
58 2004-09-22 Jim Blandy <jimb@theseus.home>
60 * thread-db.c (thread_db_open, thread_db_get_gen): Doc fixes.
62 * thread-db.c (thread_db_detach, thread_db_set_gen,
63 thread_db_thread_id): Make these functions static.
65 2004-09-13 Jim Blandy <jimb@theseus.home>
67 * solaris-target.c (solaris_detach, solaris_attach): Change
70 2004-08-11 Corinna Vinschen <vinschen@redhat.com>
72 * linux-target.c (linux_write_reg): Print process->pid in case of
75 2004-07-19 Kevin Buettner <kevinb@redhat.com>
77 * server.c (main): Set ``server_quit_p'' when debugged process
80 2004-06-03 Kevin Buettner <kevinb@redhat.com>
82 * server.c (main): Ensure that thread related realtime signals
85 2004-04-20 Kevin Buettner <kevinb@redhat.com>
87 * thread-db.c (lookup_sym): New function.
88 (thread_db_open): Print diagnostic message for failed dlopen()
89 call. Call lookup_sym() which will print diagnostic for failed
92 2004-04-20 Kevin Buettner <kevinb@redhat.com>
94 * server.c (main): Ignore realtime signals.
96 2004-04-05 Kevin Buettner <kevinb@redhat.com>
98 * linux-target.c (reginfo) [FRV_LINUX_TARGET]: Add support for
99 registers fsr0, acc0-acc7, accg0-accg7, msr0, msr1, gner0, gner1,
102 2004-03-19 Kevin Buettner <kevinb@redhat.com>
104 * ptrace-target.c (ptrace_exit_program): Cause main loop to exit.
105 * server.c (sys/types.h, sys/stat.h, fcntl.h, string.h, unistd.h)
106 (ctype.h, termios.h): Include.
107 (close_device, tty_raw, invalid_speed, parse_speed): New functions.
108 (speed_table): New static global.
109 (usage): Update usage message.
110 (main): Add support for connecting to serial devices.
112 2004-03-10 Kevin Buettner <kevinb@redhat.com>
114 * linux-target.c (enum regset): Add constant OTHERREGS.
115 (struct peekuser_pokeuser_reginfo): Add new field,
116 alternate_register_read_write_method. Adjust all initializers
118 (frv_fdpic_loadmap_addresses): New function.
119 (PTRACE_GETFDPIC, PTRACE_GETFDPIC_EXEC, PTRACE_GETFDPIC_INTERP):
121 (reginfo) [FRV_LINUX_TARGET]: Use slots 132 and 133 for the
124 2004-03-10 Kevin Buettner <kevinb@redhat.com>
126 * configure.in: Add "frv*linux*" to list of targets with thread
128 * configure: Regenerate.
129 * Makefile.in: Regenerate using "automake --cygnus --ignore-deps".
131 2004-03-10 Kevin Buettner <kevinb@redhat.com>
133 * ptrace-target.c (ptrace_create_child): Use vfork() instead of
134 fork(). Use PTRACE_ATTACH to attach to an existing process.
135 * server.c (usage): Update to include text about "-a".
136 (main): Allow use of -a switch to attach to an existing process.
138 2003-11-14 Kevin Buettner <kevinb@redhat.com>
140 * config.in (FRV_LINUX_TARGET): Add.
141 * configure.in (sys/user.h): Don't check for this header; it's
143 (frv*linux*): Add rudimentary support for FR-V Linux.
144 * linux-target.c (PEEKUSER_POKEUSER_REGINFO, NUM_REGS, PC_REGNUM)
145 (sign_extend, greg_offset_and_size, fpreg_offset_and_size)
146 (noreg_offset_and_size, reginfo) [FRV_LINUX_TARGET]: Define.
147 * configure, Makefile.in: Regenerate.
149 2003-09-10 Kevin Buettner <kevinb@redhat.com>
151 From Jimi Xenidis <jimix@watson.ibm.com>:
152 * linux-target.c (reginfo): The MQ register is for IBM POWER
153 (pre-PowerPC) architecture, and is undefined in PPC GNU/Linux
156 2003-05-09 Kevin Buettner <kevinb@redhat.com>
158 * linux-target.c (mips_singlestep): Don't any consider cop0 or cop1x
159 instructions to be conditional branches. Expand set of cop1
160 opcodes considered to be conditional branches.
162 2003-05-08 Kevin Buettner <kevinb@redhat.com>
164 * linux-target.c (mips_singlestep): Don't interpret all coprocessor
165 instructions as conditional branches.
167 2003-04-10 Kevin Buettner <kevinb@redhat.com>
169 * linux-target.c (NUM_REGS) [MIPS_LINUX_TARGET, MIPS64_LINUX_TARGET]:
171 (struct peekuser_pokeuser_reginfo) [MIPS_LINUX_TARGET]: Use
172 PROTO_SIZE for ``bad'' and ``cause''.
173 (struct peekuser_pokeuser_reginfo) [MIPS_LINUX_TARGET]
174 [MIPS64_LINUX_TARGET]: Add ``fir'' register.
176 2003-02-07 Kevin Buettner <kevinb@redhat.com>
178 * gdbserv-thread-db.h (singlestep_lwp): Add ``struct gdbserv *''
179 argument. Adjust all callers.
180 (mips_singlestep) [MIPS_LINUX_TARGET, MIPS64_LINUX_TARGET]: New
182 * linux-target.c (reginfo) [MIPS64_LINUX_TARGET]: Adjust some
183 of the fpregset/gregset related constants in this table.
184 (mips_get_reg): Add ``struct gdbserv *'' argument. Adjust all
186 (mips_addr_as_reg, mips_peek_instruction, mips_poke_instruction):
188 (mips_singlestep_program): Move bulk of implementation to and call...
189 (mips_singlestep): ...new function. This new function no longer
190 makes any direct PTRACE_PEEKTEXT or PTRACE_POKETEXT operations.
191 Shadow breakpoint information is also stored in a slightly different
193 * ptrace-target.c (server.h, ptrace-target.h): Adjust location
194 of #include statements so that gdbserv.h is included first.
195 (handle_waitstatus): Call ptrace_set_mem() instead of invoking
196 ptrace() directly. Also adjust code to use somewhat different
197 shadow breakpoint structs.
198 (ptrace_set_mem, ptrace_get_mem): Remove ``static'' qualifier
199 from function declarators.
200 (singlestep_lwp): Add ``struct gdbserv *'' argument.
201 * ptrace-target.h (ptrace_get_mem, ptrace_set_mem): Declare.
202 * server.c (gdbserv.h): Include.
203 * server.h (struct ss_save): Add field ``in_use''. Change
204 type of field ``ss_addr'' to struct ``gdbserv_reg''.
205 * thread-db.c (wait_all_threads): Revise diagnostic message to
206 print signal number for SIGDEBUG signal.
207 (singlestep_thread): Add ``struct gdbserv *'' argument. Adjust
210 2003-01-22 Kevin Buettner <kevinb@redhat.com>
212 * linux-target.c (struct peekuser_pokeuser_reginfo)
213 [MIPS64_LINUX_TARGET, MIPS_LINUX_TARGET]: Disable registers ``cause''
214 and ``bad'' since they are not writable via ptrace().
216 2003-01-19 Alexandre Oliva <aoliva@redhat.com>
218 * linux-target.c: Don't assume asm-mips/ is available, use just
221 2003-01-17 Kevin Buettner <kevinb@redhat.com>
223 * configure.in (mips64*linux*n64, mips64*linux*n32, mips64*linux*o32):
224 Remove cases. Instead, use compiler's preprocessor symbols to test
225 which ABI is being used.
226 * configure: Regenerate.
228 2003-01-16 Kevin Buettner <kevinb@redhat.com>
230 * config.in (LIBTHREAD_DB_SO): New macro.
231 * configure.in (mips64*linux*): Remove no-threads.o from
232 TARGET_MODULES list. Add thread-db.o to this list.
233 * configure: Regenerate.
235 2003-01-10 Kevin Buettner <kevinb@redhat.com>
237 * Makefile.in: Regenerate using "automake --cygnus --ignore-deps".
238 Someday, when ``depcomp'' is added to the top level, the
239 --ignore-deps flag can be discarded.
241 2002-12-18 Kevin Buettner <kevinb@redhat.com>
243 * ptrace-target.h, ptrace-target.c (ptrace_write_user)
244 (ptrace_read_user): Add struct gdbserv argument.
245 * linux-target.c: Fix all callers.
246 * ptrace-target.c (ptrace_write_user, ptrace_read_user): Add
248 (ptrace_xfer_mem): Fix debugging printf()s so that they'll print
249 useful results when sizeof (long long) is the same as
250 sizeof (ptrace_xfer_type).
251 (ptrace_xfer_mem): Decode address using gdbserv_host_bytes_from_reg()
252 instead of gdbserv_reg_to_ulong().
254 2002-12-02 Kevin Buettner <kevinb@redhat.com>
256 * linux-target.c (linux_get_reg, linux_set_reg, reg_from_regset)
257 (reg_to_regset, get_regset, put_regset reg_from_gregset)
258 (reg_to_gregset, reg_from_fpregset, reg_to_fpregset)
259 (reg_from_xregset, reg_to_xregset): Adjust all calls to
260 gdbserv_host_bytes_to_reg() and gdbserv_host_bytes_from_reg()
261 to account for change in interface. Remove code which is
262 no longer needed due to improvements in the aforementioned
264 (sign_extend): New constant.
265 (FPR_BASE, PC, CAUSE, BADVADDR, MMHI, MMLO, FPC_CSR, FPC_EIR):
266 Make sure these are defined.
267 (PROTO_SIZE): Define.
268 (reginfo) [MIPS_LINUX_TARGET]: Use PROTO_SIZE to initialize
269 table with size (width) of registers to use when communicating
271 (NUM_REGS, PC_REGNUM, reginfo) [MIPS64_LINUX_TARGET]: Define.
273 2002-11-19 Michael Snyder <msnyder@redhat.com>
275 * ptrace-target.c: Fix typo in copyright.
277 2002-08-23 Kevin Buettner <kevinb@redhat.com>
279 * linux-target.c (linux_get_reg, linux_set_reg): Print an
280 error message for out of bound registers.
282 2002-08-23 Kevin Buettner <kevinb@redhat.com>
284 * linux-target.c (NUM_REGS) [X86_LINUX_TARGET]: Bump to 42.
285 (getregs_setregs_reginfo) [X86_LINUX_TARGET]: Add entry for
286 register ``orig_eax''.
287 (linux_get_reg, linux_set_reg): Make sure ``regno'' value is valid.
288 (linux_detach, linux_attach, decr_pc_after_break): Call fprintf()
290 (linux_detach, linux_attach): Don't always print informational
292 * ptrace-target.c (handle_waitstatus, ptrace_detach, ptrace_attach):
293 Don't always print informational messages. Use fprintf() instead
295 (noop_get_trap_number, noop_compute_signal, noop_exit_program)
296 (noop_signlestep_program, noop_break_program): Delete.
297 (ptrace_flush_i_cache): Renamed from noop_flush_i_cache. Update
298 reference in ptrace_attach().
299 (continue_lwp, singlestep_lwp, attach_lwp, stop_lwp, ps_pstop)
300 (ps_continue, ps_lstop): Use fprintf() instead of printf().
301 * server.c (errno.h): Include.
302 (usage): New function.
303 (main): Add option processing code.
304 * server.h (struct child_process): Add new field,
305 ``debug_informational''.
306 * thread-db.c (ps_plog, select_pending_event, send_pending_signals)
307 (wait_all_threads, thread_db_check_child_state): Use fprintf()
309 (thread_db_detach): Conditionally print informational messages.
310 Use fprintf() instead of printf().
312 2002-08-21 Kevin Buettner <kevinb@redhat.com>
314 * Makefile.am, configure.in, dummy-target.c, linux-target.c,
315 ptrace-target.c, ptrace-target.h, server.h, solaris-target.c,
316 thread-db.c: Change ``libremote'' references into ``RDA''
318 * Makefile.in, configure: Regenerate.
320 2002-08-15 Kevin Buettner <kevinb@redhat.com>
322 * dummy-target.c, gdb_proc_service.h, gdbserv-thread-db.h,
323 linux-target.c, no-threads.c, ptrace-target.c,
324 ptrace-target.h, server.c, server.h, solaris-target.c,
325 thread-db.c: Update copyright notices.
327 2002-05-16 Kevin Buettner <kevinb@redhat.com>
329 * config.in (GREGSET_T): Renamed from GDB_GREGSET_T.
330 (FPREGSET_T): Renamed from GDB_FPREGSET_T.
331 * configure.in: Likewise.
332 * gdbserv-thread-db.h: Likewise.
333 * linux-target.c: Likewise.
334 * thread-db.c: Likewise.
335 * gdb_proc_service.h: Remove everything that's not absolutely
338 2002-02-01 Kevin Buettner <kevinb@redhat.com>
340 * configure.in (arm32): Change to ``yes''.
341 * configure: Regenerate.
343 2002-01-30 Kevin Buettner <kevinb@redhat.com>
345 * linux-target.c (linux_get_reg) [GETREGS_SETREGS_REGINFO]: Add
347 (linux_set_reg) [GETREGS_SETREGS_REGINFO]: Likewise.
349 2002-01-28 Kevin Buettner <kevinb@redhat.com>
351 * linux-target.c (write_reg_bytes): Print return status in
352 ptrace failure message.
353 * ptrace-target.c (ptrace_write_user): Enable existing
354 Linux/MIPS related kernel bug workaround when MIPS_LINUX_TARGET
355 is defined (which is in addition to _MIPSEL).
357 2002-01-28 Kevin Buettner <kevinb@redhat.com>
359 * thread-db.c (struct regset_cache): New struct declaration.
360 (thread_db_map_id2thr_cache_valid, fpregset_cache, gregset_cache):
362 (thread_db_map_id2thr, thread_db_invalidate_map_id2thr_cache)
363 (initialize_regset_cache, initialize_regset_caches)
364 (thread_db_flush_regset_cache, thread_db_flush_regset_caches)
365 (thread_db_get_regset, thread_db_set_regset)
366 (thread_db_invalidate_regset_cache, thread_db_invalidate_regset_caches)
367 (thread_db_invalidate_caches, thread_db_getfpregs)
368 (thread_db_set_fpregs, thread_db_getgregs, thread_db_setgregs)
369 (td_thr_getfpregs_wrapper, td_thr_getgregs_wrapper)
370 (td_thr_setfpregs_wrapper, td_thr_setgregs_wrapper):
372 (update_thread_list, thread_db_get_thread_reg)
373 (thread_db_set_thread_reg): Call thread_db_map_id2thr() instead of
374 td_ta_map_id2thr_p().
375 (thread_db_get_thread_reg): Call thread_db_getfpregs() instead
376 of td_thr_getfpregs_p(). Call thread_db_getgregs() instead of
378 (thread_db_set_thread_reg): Likewise. Also, call
379 thread_db_setfpregs() instead of td_thr_setfpregs_p() and
380 call thread_db_setgregs() instead of td_thr_setgregs_p().
381 (continue_thread, thread_db_continue_program)
382 (thread_db_singlestep_program, thread_db_continue_thread)
383 (singlestep_thread): Call thread_db_flush_regset_caches() at
384 beginning of function and thread_db_invalidate_caches() at
386 (thread_db_attach): Initialize regset caches.
388 2002-01-15 Kevin Buettner <kevinb@redhat.com>
390 * config.in (Generated automatically comment): Revise to note
391 that this file was generated automatically at one time, but is
393 (LINUX_TARGET, SOLARIS_TARGET): Fix comments.
394 (MIPS_LINUX_TARGET): Add.
395 * configure.in (i?86*linux*, powerpc*linux*, arm*linux*, mips*linux*):
396 Eliminate unnecessary duplication.
397 (mips*linux*): Target is MIPS_LINUX_TARGET, not SH_LINUX_TARGET.
398 * gdbserv-thread-db.h (is_gp_reg): New function.
399 (is_fp_reg, is_extended_reg): Revise comments.
400 * linux-target.c (enum regset): Add new constant NOREGS.
401 (is_gp_reg): New function.
402 (PEEKUSER_POKEUSER_REGINFO) [MIPS_LINUX_TARGET]: Define.
403 (SIZEOF_REGMAP, SIZEOF_MAPPEDREG) [MIPS_LINUX_TARGET]: Delete.
404 (NUM_REGS) [MIPS_LINUX_TARGET]: Change from 38 to 70 to account
405 for addition of floating point support.
406 (regmap) [MIPS_LINUX_TARGET]: Delete this array.
407 (is_fp_reg, is_extended_reg) [MIPS_LINUX_TARGET]: Delete.
408 (reginfo) [MIPS_LINUX_TARGET]: Define.
409 (DEBUG): Delete this macro definition.
410 (disp_gdb_mesg, ptrace_get_mem, ptrace_set_mem): Delete function
412 (linux_get_reg, linux_set_reg) [PEEKUSER_POKEUSER_REGINFO]: Add
414 (put_regset) [PEEKUSER_POKEUSER_REGINFO]: Add missing return
416 (mips_get_reg): Use read_reg_bytes() to fetch the register.
417 (mips_singlestep_program): Eliminate unused variables ``u_regs_base'',
418 ``temp_reg''. Fix fprintf related format warning.
419 * ptrace-target.h (ptrace_check_child_state): Declare.
420 * thread-db.c (thread_db_get_thread_reg, thread_db_set_thread_reg):
421 Handle case of target not supporting one or more registers.
423 2001-10-15 Kevin Buettner <kevinb@redhat.com>
425 * gdbserv-thread-db.h (is_extended_reg, reg_to_xregset)
426 (reg_from_xregset): New functions.
427 (debug_get_pc, decr_pc_after_break): Add declaration.
428 * linux-target.c (sys/procfs.h): Include.
429 (MAX_REG_SIZE): New anonymous enum constant.
430 (enum regset): New enum.
431 (getregs_setregs_reginfo, peekuser_pokeuser_reginfo): New structs.
432 (offsetof, fieldsize): New macros.
433 (ARM_LINUX_TARGET, X86_LINUX_TARGET, PPC_LINUX_TARGET): Deleted
434 old data structures defining register maps for these registers.
435 Replaced with new tables using either getregs_setregs_reginfo
436 or peekuser_pokeuser_reginfo structs. Other architectures
437 remain the same, though reoranized somewhat.
438 (linux_next_gg_reg, linux_gg_reg_nr): Revise comments. Use
439 NUM_REGS instead of NUM_G_PACKET_REGS.
440 (get_xregsetsize): New function.
441 (linux_reg_format, linux_sizeof_reg, is_fp_reg, is_extended_reg)
442 [PEEKUSER_POKEUSER_REGINFO, GETREGS_SETREGS_REGINFO]: New functions.
443 (read_reg_bytes, write_reg_bytes, debug_get_reg, debug_get_pc)
444 (linux_get_reg, linux_set_reg, reg_from_regset, reg_to_regset)
445 (reg_from_gregset, reg_to_gregset, reg_from_fpregset, reg_to_fpregset)
446 (reg_from_xregset, reg_to_xregset, get_regset, put_regset, get_gregset)
447 (put_gregset, get_fpregset, put_fpregset, get_xregset, put_xregset)
448 [PEEKUSER_POKEUSER_REGINFO]: New functions.
449 (read_reg_as_ulong, write_reg_as_ulong, debug_get_reg, debug_get_pc)
450 (linux_get_reg, linux_set_reg, regs_from_gregset, regs_to_gregset)
451 (reg_from_fpregset, reg_to_fpregset, reg_from_xregset, reg_to_xregset)
452 (get_gregset, put_gregset, get_fpregset, put_fpregset, get_xregset)
453 (put_xregset) [GETREGS_SETREGS_REGINFO]: New functions.
454 (linux_process_get_regs, linux_process_get_reg, linux_process_set_reg)
455 (linux_process_set_regs, ppc_linux_process_set_reg)
456 (ppc_linux_process_get_reg, ppc_linux_process_set_regs)
457 (ppc_linux_process_get_regs): Deleted.
458 (linux_attach): Reorganize initializations.
459 (generic_linux_set_reg): Renamed to linux_set_reg.
460 (generic_linux_get_reg): Renamed to linux_get_reg.
461 (generic_linux_sizeof_reg): Renamed to linux_sizeof_reg.
462 (generic_linux_gg_reg_nr): Renamed to linux_gg_reg_nr.
463 (generic_linux_next_gg_reg): Renamed to linux_next_gg_reg.
464 (generic_linux_reg_format): Renamed to linux_reg_format.
465 (decr_pc_after_break): Consolidated versions of this function
466 down to two; one for x86 and one for everything else. Also,
467 add ``serv'' parameter and fix all callers.
468 (debug_get_pc, debug_get_reg): Now only three versions of
469 this function, one for PEEKUSER_POKEUSER_REGINFO code,
470 one for GETREGS_SETREGS_REGINFO code, and one for legacy
471 code. Also, debug_get_pc() now takes a ``serv'' parameter.
473 (ps_lgetregs): Use new get_gregset() interface.
474 (ps_lsetregs): Use new put_gregset() interface.
475 (ps_lgetfpregs, ps_lsetfpregs, ps_lgetxregsize, ps_lgetxregs)
476 (ps_lsetxregs): Implement.
477 * ptrace-target.c (ptrace_read_user, ptrace_write_user): Make
478 ``buff'' argument of type ``void *'' instead of ``char *''.
479 (ptrace_get_gregs): Add new parameter ``alt_pid''.
480 (ptrace_set_gregs): Likewise.
481 (ptrace_get_fpregs): Add new parameter alt_pid. Also fix call
482 to ptrace() so parameters are in correct order.
483 (ptrace_set_fpregs): Likewise.
484 (ptrace_get_fpxregs, ptrace_set_fpxregs): New functions.
485 * ptrace-target.h (ptrace_write_user, ptrace_read_user)
486 (ptrace_get_gregs, ptrace_set_gregs, ptrace_get_fpregs)
487 (ptrace_set_fpregs, ptrace_get_fpxregs, ptrace_set_fpxregs):
489 * thread-db.c (td_thr_getxregsize_p, td_thr_getxregs_p)
490 (td_thr_setxregs_p): New function pointers.
491 (thread_db_dlopen): Initialize new function pointers.
492 (send_pending_signals): Add ``process'' parameter so that
493 decr_pc_after_break() can get the ``serv'' argument. Fix all
495 (thread_db_get_thread_reg, thread_db_set_thread_reg): Add xregset
498 2001-10-14 Kevin Buettner <kevinb@redhat.com>
500 * ptrace-target.c (unistd.h): Include.
501 (close_open_files): New function.
502 (ptrace_create_child): In newly forked child process, call
503 close_open_files() before invoking execv().
505 2001-10-13 Kevin Buettner <kevinb@redhat.com>
507 * server.c (signal.h): Include.
508 (chld_handler): New function.
509 (main): Establish chld_handler as the SIGCHLD signal handler.
510 Also, wait 1 second instead of 0 seconds to avoid busy waiting.
512 2001-09-26 Louis Hamilton <hamilton@redhat.com>
514 * configure.in: Use thread-db.c for ARM.
515 * configure: Regenerated.
516 * linux-target.c (ARM_R11, ARM_R12): Added to regmap[].
517 (ARM_FP, ARM_CPSR): Revised mappings of these ARM registers.
518 (debug_get_reg, debug_get_pc, decr_pc_after_break) [ARM_LINUX_TARGET]:
521 2001-09-20 Kevin Buettner <kevinb@redhat.com>
523 * configure.in: Use thread-db.c for Linux/PPC too.
524 * configure: Regenerated.
525 * linux-target.c (linux_read_reg): Add forward declaration.
526 (debug_get_reg, debug_get_pc, decr_pc_after_break) [PPC_LINUX_TARGET]:
529 2001-09-20 Kevin Buettner <kevinb@redhat.com>
531 * linux-target.c (SIZEOF_MAPPEDREG) [PPC_LINUX_TARGET]: Add comment.
532 (PC_REGNUM) [PPC_LINUX_TARGET]: Remove FIXME comment.
533 (is_fp_reg) [PPC_LINUX_TARGET]: Revise upper bound on floating
534 point register numbers.
535 (ppc_linux_getset_reg): Rewritten to use regmap[] to fetch
536 ptrace() offsets. This'll handle the (previously unsupported)
537 floating point registers, cr, lr, ctr, and xer.
538 (ppc_linux_process_set_regs, ppc_linux_process_get_regs): Don't
539 hardcode loop upper bound.
540 (ppc_linux_process_get_regs): Revise declarator to match
541 process_get_regs member in struct gdbserv_target.
543 2001-09-18 Andrew Haley <aph@cambridge.redhat.com>
545 * server.c (main): Work around SIGCHLD problem.
547 2001-08-05 Michael Chastain <chastain@redhat.com>
549 * ptrace-target.c (ptrace_write_user): Ignore ESRCH on MIPS,
550 because mips linux kernel 2.4 has a bug where PTRACE_POKEUSER
551 returns -ESRCH even when it succeeds.
553 2001-08-03 Michael Keezer <mkeezer@redhat.com>
555 * configure.in: Add am33_2.0 & mn10300.
556 * config.in: Add AM33_LINUX_TARGET & AM33_2_0_LINUX_TARGET.
557 * linux-target.c: am33_2.0 & mn10300 support.
559 2001-07-23 David Howells <dhowells@redhat.com>
561 * ptrace-target.c: Added big-endian MIPS support.
562 * linux-target.c: ditto.
565 2001-06-25 Michael Snyder <msnyder@redhat.com>
567 * ptrace-target.c (ptrace_compute_signal): Implement conversion
568 from native signals to GDB's signal numbering.
569 (ptrace_process_signal): Implement conversion from GDB's signal
570 numbering to native signals.
571 (stop_lwp): Comment out debugging output of SIGSTOP signals.
572 * linix-target.c (linux_fromtarget_break): Call compute_signal.
573 (linux_fromtarget_terminate): Ditto.
574 * thread-db.c (thread_db_check_child_state): Don't do any conversion
575 when passing a signal directly back to the inferior; just copy from
576 stop_signal to signal_to_send.
577 (thread_db_fromtarget_thread_break): Convert signal from native
578 numbering to GDB's numbering.
580 2001-06-18 Michael Snyder <msnyder@redhat.com>
582 * linux-target.c (generic_linux_set_reg): Fix typo.
583 (decr_pc_after_break): Mute the debugging output.
585 2001-06-15 Michael Snyder <msnyder@redhat.com>
587 * thread_db.c: Disable noisy debugging output.
588 (select_pending_event): Add new selection criterion, giving
589 preference to a thread that is being single-stepped. This
590 avoids the problem of deciding whether to decrement the pc if
591 we don't know whether a SIGTRAP was caused by stepping or by
592 hitting a breakpoint.
594 2001-06-14 Michael Snyder <msnyder@redhat.com>
596 * thread-db.c (thread_db_set_gen, thread_db_get_gen): Rewrite
597 syntax for qSymbol messages.
598 * gdb_proc_service.h: New file.
599 * Makefile.am (INCLUDES): Remove $(srcdir)/../../include.
600 * Makefile.in: Regenerate.
602 2001-05-31 Michael Snyder <msnyder@redhat.com>
604 * thread-db.c (add_thread_to_list): Return explicit value!
606 2001-05-23 Jackie Smith Cashion <jsmith@redhat.com>
608 * linux-target.c: Change MIPS SIZEOF_MAPPEDREG from 1 to 4.
609 (linux_register_offset): For MIPS return regmap[regnum] instead of
610 SIZEOF_MAPPEDREG * regmap[regnum].
611 (mips_get_reg): Pass pid as argument to ptrace_read_user instead of
614 2001-05-22 Michael Snyder <msnyder@redhat.com>
616 * no-threads.c: New file.
617 * configure.in: Use thread-db.c only for specified architectures,
618 (including x86); otherwise default to using no-threads.c.
619 * configure: Regenerate.
621 2001-05-10 Martin M. Hunt <hunt@redhat.com>
623 * linux-target.c (is_fp_reg): New function for mips.
626 Merged changes from symbol branch with appropriate modifications.
628 Mon Mar 26 08:54:41 PST 2001 Brendan Conoboy <blc@redhat.com>
630 * configure.in: Added mipsvr4181el* target
631 * configure: regenerate
633 2001-01-26 Rudy Folden <rfolden@redhat.com>
635 * server.c: Changed name from gdbgeneral_xxx to gdbconnect_xx.
637 2001-01-24 Rudy Folden <rfolden@redhat.com>
639 * configure: Added mipsel* target.
640 * linux-target.c: Add support for MIPS processor, including single-
641 stepping which doesn't exist in mips ptrace.
642 * ptrace-target.c (ptrace_handle_waitstatus): Added single-stepping
643 instruction restore for mips.
644 (ptrace_attach): Added single stepping initialization code.
645 * server (main): Added generic interfaces, gdbgeneral_startup/shutdown
646 for serial or tcp/ip selection. Also added server_quit_p to X and W
647 for serial support (no socket shutdown).
648 * server.h (child_process): Added mips instruction save area for
651 2001-01-10 Rudy Folden <rfolden@redhat.com>
652 * ptrace-target.c (enum): Added U_REGS_OFFSET to processor
655 2001-04-26 Michael Snyder <msnyder@redhat.com>
657 * linux-target.c (is_fp_reg): New function.
658 (reg_from_fpregset, reg_to_fpregset): New functions.
659 Support for thread_db_get_thread_reg floating point regs.
660 * thread-db.c (thread_db_get_thread_reg, thread_db_set_thread_reg):
661 Infrastructure for support of floating point regs.
662 (Attach_thread): New function, abstracted from below.
663 (find_new_threads_callback): Call attach_thread.
664 (stop_thread): New function, abstracted from stop_all_threads.
665 (stop_all_threads): Call stop_thread.
666 (continue_thread): Test for lwp == 0 before calling continue_lwp.
667 * ptrace-target.c (stop_lwp): New function.
668 * gdbserv-thread-db.h (reg_to_regnum, reg_from_regnu): Declare.
670 2001-04-25 Michael Snyder <msnyder@redhat.com>
672 Move all ptrace references out of thread-db.c.
673 * gdbserv-thread-db.h: New file.
674 * thread-db.c (struct ps_prochandle): Move to gdbserv-thread-db.h.
675 (gdb_ps_prochandle_t): Ditto.
676 (gdb_ps_read_buf_t, gdb_ps_write_buf_t, gdb_ps_size_t): Ditto.
677 (ps_pstop, ps_pcontinue): Move to ptrace-target.c.
678 (ps_lstop, ps_lcontinue): Ditto.
679 (ps_pdread, ps_pdwrite, ps_ptread, ps_ptwrite): Ditto.
680 (ps_lgetxregsize): Move to linux-target.c.
681 (ps_lgetxregs, ps_lsetxregs, ps_getpid): Ditto.
682 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Ditto.
683 (find_new_threads_callback): Abstract attach bits into new function
684 attach_lwp, and move that to ptrace-target.c.
685 (wait_all_threads): Call continue_lwp instead of ptrace.
686 (continue_pid): Rename as continue_lwp, move into ptrace-target.c.
687 (singlestep_pid): Rename as continue_lwp, move into ptrace-target.c.
688 (struct symbol_cache): Change value to a paddr_t.
689 (add_symbol_to_list, lookup_cached_symbol): Ditto.
690 * linux-target.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
691 ps_lsetfpregs, ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs,
692 ps_getpid): Moved to here from thread-db.c.
693 * ptrace-target.c (continue_lwp, singlestep_lwp, attach_lwp,
694 (ps_pstop, ps_pcontinue, ps_lstop, ps_lcontinue, ps_pdread,
695 ps_pdwrite, ps_ptread, ps_ptwrite): Moved here from thread-db.c.
696 (ptrace_handle_waitstatus): Renamed as handle_waitstatus.
697 (ps_lcontinue): Implement (untested).
698 * server.c (main): Check server_quit_p after calling gdbloop_poll.
701 2001-04-24 Michael Snyder <msnyder@redhat.com>
703 * thread-db.c (continue_pid, continue_thread): New functions.
704 (singlestep_pid, singlestep_thread): New functions.
705 (continue_all_threads): Use new function continue_thread.
706 (thread_db_continue_program): Ditto.
707 (thread_db_singlestep_program): Ditto.
708 (thread_db_continue_thread): Ditto.
709 (thread_db_singlestep_thread): Ditto.
711 * thread-db.c: Remove some debugging printfs.
712 Add activation and handling of the thread debug signal.
713 (get_thread_signals): Get the debug signal as well as the others.
714 Set target flag to activate the debug signal.
715 (set_target_int_by_name): New function.
716 (struct gdbserv_thread): Rename "sigstopped" flag to just "stopped".
717 (stop_all_threads): Mark the event thread "stopped".
718 (wait_all_threads): Mark the event thread "waited".
719 Don't stash the debug signal (throw it away).
720 (continue_all_threads): Always send the restart signal to any
721 thread that has just been attached.
722 (thread_db_check_child_state): Make two calls to waitpid (one with
723 WCLONE, one without) instead of alternating every other time.
724 Add debug_signal to the list of events to ignore.
725 (thread_db_attach): Add "__pthread_threads_debug" to list of symbols.
727 2001-04-20 Michael Snyder <msnyder@redhat.com>
729 * thread-db.c (thread_db_check_child_state): Add SIGCHLD to the
730 list of signals to ignore. When a thread exits, make sure that
731 the other threads get restarted.
733 2001-04-19 Michael Snyder <msnyder@redhat.com>
735 * thread-db.c (wait_all_threads): Save exit and term events.
736 Save SIGINT like any other signal event.
737 (send_pending_signals): Don't send SIGINT.
738 (select_pending_event): Give preference to SIGINT.
739 (thread_db_check_child_state): Move special handling of
740 cancel and restart signals to after the stop_all_threads
741 and wait_all_threads calls, so we can catch these signals
742 even if they aren't the first signal we get notification of.
744 2001-04-19 Michael Snyder <msnyder@redhat.com>
746 Major change to select an event so as to avoid starvation.
747 * thread-db.c (select_pending_event): New function. Choose an
748 event from the list of pending events, and make its thread the
750 (stop_all_threads): Don't mark the event thread. That will now
751 be done by select_pending_event.
752 (struct signal_list): Rename to event_list. Save the thread and
753 the entire wait status, so that all events (not just signals)
755 (add_pending_signal): Rename to add_pending_event.
756 (send_pending_signals): Ignore non-signal events.
757 Ignore the selected event (which will be returned to the debugger).
758 Push back breakpoint events (moved here from wait_all_threads).
759 (wait_all_threads): Remove special handling for SIGTRAP (moved
760 into send_pending_signals). Call select_pending_event.
761 (thread_db_check_child_status): Add initial event to event list.
763 2001-04-16 Michael Snyder <msnyder@redhat.com>
764 * thread-db.c (thread_db_continue_thread): Handle the signal param.
765 (thread_db_singlestep_thread): Ditto.
766 (thread_db_check_child_state): Handle exit and termination separately.
768 2001-04-13 Michael Snyder <msnyder@redhat.com>
770 * thread-db.c (find_new_threads_callback): Account for dead threads.
771 (update_thread_list): Keep zombie threads in thread list, but
772 delete them if they've been joined or detached.
773 (stop_all_threads): Don't stop dead threads.
774 (continue_all_threads): Don't continue if not waited.
775 (thread_db_check_child_state): Move handling of terminate and
776 exit earlier. Handle termination or exit of children specially.
777 (thread_db_get_thread_reg): Test for defunct threads.
778 (thread_db_set_thread_reg): Ditto.
779 * ptrace-target.c (ptrace_xfer_mem): Don't be noisy about ptrace
780 errors caused by illegal memory accesses.
782 2001-04-12 Andrew Cagney <ac131313@redhat.com>
784 * server.c: Include "gdbloop.h". Replace gdbsocket_poll with
786 * ptrace-target.c, linux-target.c, solaris-target.c:
787 * dummy-target.c: Update comments.
789 2001-04-11 Michael Snyder <msnyder@redhat.com>
791 * thread-db.c (struct gdbserv_thread): Add new flag 'stepping'.
792 (stop_all_threads): Add parameter 'process'.
793 Set the process->event_thread here, instead of in check_child_state.
794 (wait_all_threads): Accept process as a parameter instead of eventpid.
795 Handle SIGTRAP differently if the thread was singlestepping.
796 (thread_db_singlestep_program): Clear flags for event thread.
797 (thread_db_singlestep_thread): Ditto.
798 (thread_db_continue_program): Ditto.
799 (thread_db_continue_thread): Ditto.
800 (thread_db_check_child_state): Cancel the stepping flag.
801 Don't set the event thread, this is now done in stop_all_threads.
802 * linux-target.c (debug_get_reg, debug_get_pc): New functions.
803 Purely for debugging output. Architecture dependent.
805 2001-04-09 Michael Snyder <msnyder@redhat.com>
807 * thread_db.c (thread_db_continue_thread): Continue the actual
808 thread given, not necessarily the event thread.
809 (thread_db_singlestep_thread): Step the actual thread given,
810 not necessarily the event thread.
812 2001-04-09 Michael Snyder <msnyder@redhat.com>
814 * thread-db.c (stop_all_threads): Do not send SIGSTOP to a thread
815 if it has already been sigstopped.
816 (thread_db_continue_thread): New function. Continue a single thread.
817 (thread_db_singlestep_thread): New function. Step a single thread.
818 (thread_db_attach): Set up continue_thread, singlestep_thread methods.
820 2001-04-09 Michael Snyder <msnyder@redhat.com>
822 * linux-target.c (PC_REGNUM): New enum, define.
823 (decr_pc_after_break): New function. Architecture dependent.
824 This version will probably serve for all targets for which
825 DECR_PC_AFTER_BREAK is one. Those for which it is zero will
826 want to define a no-op version of this function.
827 * thread-db.c (first_thread_in_list): New function.
828 (update_thread_list, stop_all_threads, wait_all_threads,
829 continue_all_threads): Use first_thread_in_list in for loops.
830 (wait_all_threads): Handle SIGINT and SIGTRAP specially.
831 Throw away SIGINT for all threads but the event thread.
832 For SIGTRAP in other than the event thread, call decr_pc_after_break
833 (giving the thread a chance to hit the trap again later).
834 (thread_db_continue_program, thread_db_singlestep_program):
835 Continue the event thread before all the others.
837 2001-04-05 Michael Snyder <msnyder@redhat.com>
839 * thread-db.c (add_pending_signal, send_pending_signals):
840 New functions. Allow wait_all_threads to collect any signals
841 other than SIGSTOP from the threads and defer them.
842 (wait_all_threads): Loop on each thread and call waitpid until
843 we get SIGSTOP. Any other signals are pended by throwing them
844 into a list, and then sending them back to the threads using kill.
845 (thread_db_get_thread_reg): Remove temporary hack for libthread_db
846 bug. (thread_db_set_thread_reg): Ditto.
848 2001-04-04 Michael Snyder <msnyder@redhat.com>
850 * server.h (struct child_process): Add a 'running' flag.
851 * thread_db.c (continue_all_threads): Take gdbserv as argument.
852 Use it to find the current thread, and don't continue that one
853 (leave it up to the parent method to continue the event thread.)
854 (thread_db_continue_program): Child is running -- set a flag.
855 (thread_db_singlestep_program): Ditto.
856 (thread_db_check_child_state): Return immediately unles the child
857 is running. Because this is a polling routine, we don't want to
858 return any new events unles the child is officially running.
859 Call waitpid with -1 instead of the process->pid, so that we
860 can get events from the threads. Alternately use __WCLONE.
861 (thread_db_get_thread_reg): If thread is not specified, use
862 the event thread (if possible). Temporarily hack around a
863 bug in the thread_db library.
864 (thread_db_set_thread_reg): Ditto.
866 2001-04-04 Michael Snyder <msnyder@redhat.com>
868 * thread-db.c (continue_all_threads): Zero the attached, stopped,
869 and waited flags only if thread is successfully continued.
870 * linux-target.c: Fix broken endif directive.
871 * configure.in: Test for sys/procfs.h.
872 * config.in: Define HAVE_SYS_PROCFS_H.
873 * configure: Regenerate.
874 * thread-db.c (thread_list_lookup_by_pid): New function.
875 (thread_db_check_child_state): Cache the event thread.
876 (thread_db_fromtarget_thread_break): New function. Call
877 gdbserv_fromtarget_thread_break with the event thread.
878 (thread_db_attach): Take over the fromtarget_break vector.
879 * server.h (struct child_process): Add event_thread field.
881 2001-04-02 Michael Snyder <msnyder@redhat.com>
883 * thread-db.c: include errno.h for error reporting.
884 (struct gdbserv_thread): Add flag 'waited'.
885 (thread_db_type_str): New function for thread_extra_info.
886 (find_new_threads_callback): Use errno for error reporting.
887 (thread_db_thread_info): New function, for thread_extra_info.
888 (wait_all_threads): New function. Call waitpid on all threads
889 that have been attached or sigstopped. Incomplete -- needs to
890 push back any signals other than SIGSTOP.
891 (continue_all_threads): Send PTRACE_CONT only to threads that
892 have been attached or sigstopped.
893 (check_child_state): Call wait_all_threads.
894 (thread_db_attach): Activate thread_info vector.
896 2001-03-30 Michael Snyder <msnyder@redhat.com>
898 * linux-target.c (linux_read_reg, linux_write_reg): New functions.
899 Abstract out the code to actually read a register value, so that
900 it can be shared by several methods.
901 (get_gregset): Use sizeof (GREGSET_T).
902 (generic_linux_gg_reg_nr): New function. Support new reg methods.
903 (generic_linux_next_gg_reg): Ditto.
904 (generic_linux_sizeof_reg): Ditto.
905 (generic_linux_reg_format): Ditto.
906 (generic_linux_get_reg): New function. Newer register method,
907 non-thread-aware version.
908 (linux_attach): Use new register method in target vector.
909 * thread-db.c: Remove some developmental ifdef code.
910 (thread_db_get_thread_reg): Fall back on parentvec.get_reg
911 if no thread or no thread_agent available.
912 (thread_db_attach): Replace get_reg vector with get_thread_reg.
914 * ptrace-target.c (ptrace_write_user): For X86 target, skip
915 write-protected location in user/context address space.
916 * linux-target.c (linux_process_get_reg): Use linux_read_reg.
917 (linux_process_set_reg): Use linux_write_reg.
918 (put_gregset): New function. Write child's gregset.
919 (generic_linux_get_reg): Use SIZEOF_MAPPEDREG.
920 (generic_linux_set_reg): New function. Newer register method.
921 (linux_attach): Add set_reg to target vector, not process_set_reg.
922 * thread-db.c (ps_lsetregs): Implement by calling put_gregset.
923 (thread_db_set_thread_reg): New function. Implement set_thread_reg.
924 (thread_db_attach): Add set_thread_reg to target vector.
926 2001-03-29 Michael Snyder <msnyder@redhat.com>
928 * ptrace-target.c (ptrace_read_user, ptrace_write_user):
929 Accept an explicit pid instead of a struct gdbserv.
930 * linux-target.c: Include gdb_proc_service.h for gregset_t
931 (FIXME: better place to get it from?)
932 (linux_register_offset): Return signed long to facilitate
933 test for -1 error return value.
934 (ppc_linux_xfer_reg, linux_process_get_reg, linux_process_set_reg):
935 Calls to ptrace_read_user and ptrace_write_user now need a pid
936 argument instead of a struct gdbserv.
937 (reg_from_gregset): New function.
938 (reg_to_gregset): New function.
939 (get_gregset): New function. Read child's gregset.
940 * thread-db.c (ps_lgetregs): Implement by calling get_gregset.
941 (thread_db_dlopen, thread_db_open, thread_db_attach): Change
942 sense of return: -1 now means failure, 0 means success.
943 (thread_db_get_thread_reg): Call reg_from_gregset.
945 2001-03-29 Michael Snyder <msnyder@redhat.com>
947 * thread-db.c: Include signal.h, sys/ptrace.h (FIXME ptrace).
948 (struct symbol_cache): Make value (address) unsigned.
949 (add_symbol_to_list, lookup_cached_symbol): Ditto.
950 (struct gdbserv_thread): Add attached, stopped flags to thread.
951 (add_thread_to_list): Return pointer to new thread in list.
952 (delete_thread_from_list): New function.
953 (ps_pglobal_lookup, ps_pdread, ps_pdwrite, ps_ptread, ps_ptwrite):
954 Muffle debugging output.
955 (find_new_threads_callback): Muffle debugging output.
956 Add thread to list only if it isn't already there.
957 Use ptrace to attach to new threads. (FIXME explicit ptrace).
958 (update_thread_list): New function. Only place where td_ta_thr_iter
959 is called. Builds up the thread list, prunes it of any dead threads.
960 (thread_db_thread_next): Call update_thread_list.
961 (get_thread_signals): Read the values of the cancel and restart
962 signals from the target using hardcoded symbol names.
963 (stop_all_threads): New function. First cut. Deliver SIGSTOP
964 to all threads except the event thread and any new threads that
965 have just been attached.
966 (continue_all_threads): New function. First cut. Deliver
967 PTRACE_CONT to all threads except the main thread. Needs work.
968 (thread_db_continue_program): New function.
969 (thread_db_singlestep_program): New function.
970 (thread_db_get_thread_reg): New function, incomplete.
971 (thread_db_attach): Take over continue_program, singlestep_program.
972 Muffle some debugging output.
974 2001-03-26 Michael Snyder <msnyder@redhat.com>
976 * thread-db.c: New file. Linux thread debugging layer.
977 * linux-target.c (linux_attach): Call thread_db_attach.
978 * ptrace-target.c: Export ptrace_handle_waitstatus for
980 * configure.in: Add thread-db.c to linux target modules.
981 (GREGSET_T, FPREGSET_T, HAVE_LWPID_T, HAVE_PSADDR_T,
982 HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, LINUX_TARGET): Define.
983 * config.in (GREGSET_T, FPREGSET_T, HAVE_LWPID_T,
984 HAVE_PSADDR_T, HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, LINUX_TARGET):
986 * configure: Regenerate.
987 * Makefile.am (INCLUDES): Add $(srcdir)/../../include
988 (devo/include), so that header files can be shared with gdb.
989 (server_LDFLAGS): Add -ldl -rdynamic (FIXME configure).
990 * Makefile.in: Regenerate.
992 2001-03-22 Andrew Cagney <ac131313@redhat.com>
994 * server.c (main): Pass gdbserver.attach and process to
995 gdbserver_startup instead of gdbserver_poll.
997 2001-03-16 Michael Snyder <msnyder@redhat.com>
999 * linux-target.c (linux_detach): Pass new parameter to ptrace_detach.
1000 Fix file header comment typo. Update copyright.
1002 2001-03-16 Elena Zannoni <ezannoni@cygnus.com>
1004 * dummy-target.c (dummy_detach): Add new parameter.
1005 * linux-target.c (linux_detach): Ditto.
1006 * ptrace-target.c (ptrace_detach): Ditto.
1007 * solaris-target.c (solaris_detach): Ditto.
1009 2001-03-14 Andrew Cagney <ac131313@redhat.com>
1011 * ChangeLog: Move to here from ../native.
1012 * Makefile.am: Ditto.
1013 * aclocal.m4: Ditto.
1014 * configure.in: Ditto.
1015 * dummy-target.c: Ditto.
1016 * linux-target.c: Ditto.
1017 * ptrace-target.c: Ditto.
1018 * ptrace-target.h: Ditto.
1021 * solaris-target.c: Ditto.
1022 * Makefile.in: Regenerate.
1026 2001-03-14 Andrew Cagney <ac131313@redhat.com>
1028 * Makefile.am (INCLUDES): Update. Headers moved to ../include.
1029 * Makefile.in: Regenerate.
1031 2000-11-27 Michael Snyder <msnyder@happy.cygnus.com>
1033 * ptrace-target.c (ptrace_xfer_mem): Return -1 on error.
1035 2000-11-21 Michael Snyder <msnyder@cleaver.cygnus.com>
1037 * ptrace-target.c (noop_flush_i_cache): Comment out superfluous
1039 * linux-target.c (linux_process_get_reg): Return value of
1040 linux_register_offset is unsigned (can't be less than zero).
1041 (linux_process_rcmd): Just use '1' and '0' to control debug output.
1043 2000-11-06 Michael Snyder <msnyder@cleaver.cygnus.com>
1045 * dummy-target.c (dummy_attach): Fix order of memset args.
1046 * linux-target.c (linux_attach): Ditto.
1047 * ptrace-target.c (ptrace_attach): Ditto.
1048 * solaris-target.c (solaris_attach): Ditto.
1050 2000-10-19 Belinda Brazelle <brazelle@redhat.com>
1052 * linux-target.c: Add support for Arm processor.
1054 2000-10-12 Michael Snyder <msnyder@cleaver.cygnus.com>
1056 * ptrace-target.c (ptrace_handle_waitstatus): Save exitstatus
1057 in process->stop_signal.
1059 2000-09-14 Michael Snyder <msnyder@michael.wirespeed.com>
1061 * linux-target.c: Define regmap etc. for SH target.
1062 * configure.in: Add defines for SH target.
1063 * configure: Rebuild.
1065 2000-09-13 Michael Snyder <msnyder@michael.wirespeed.com>
1067 * server.h (fromtarget_terminate): New field. Also fix up
1068 some overlooked function prototypes in the existing fields.
1069 (struct client_process): Rename to struct child_process.
1070 * linux-target.c (linux_fromtarget_terminate): New function.
1071 Called from main when child terminates abnormally.
1072 (linux_process_rcmd): New function. Catches "qRcmd" requests,
1073 which are currently used just to turn on debug output.
1074 * ptrace-target.c (ptrace_handle_waitstatus): Set stop_signal
1075 for the WIFSTOPPED case. (ptrace_process_signal): Return zero
1076 instead of the signal number, to let libremote know that we have
1077 handled the signal. (ptrace_xfer_memory): Fix off-by-one error.
1078 * solaris-target.c (solaris_fromtarget_terminate): New function.
1079 * server.c (main): Call fromtarget_terminate for the 'T' case.
1080 Do not request a one-second delay from gdbsocket_poll.
1082 2000-09-08 Michael Snyder <msnyder@cleaver.cygnus.com>
1084 * solaris-target.c: New file. Just a prototype, doesn't actually
1085 work. Used to confirm configurability to multiple targets.
1086 * dummy-target.c: New file. Dummy back-end for implementing new
1087 targets such as solaris-target.c (above), before actually having
1088 a working back-end. The dummy target works just like the sample
1089 target in the samples directory.
1090 * configure.in: Add AC_SUBST(TARGET_MODULES) to add the
1091 appropriate target modules to the Makefile. Add solaris target.
1092 * configure: Regenerate.
1093 * Makefile.am: Move *-target.c into EXTRA_server_SOURCES.
1094 Add TARGET_MODULES to server_LDADD. Define server_DEPENDENCIES.
1095 * Makefile.in: Regenerate.
1096 * ptrace-target.h: New file. Defines needed only by ptrace.
1097 * server.h: Remove ptrace-specific defines to ptrace-target.h.
1098 (struct server_vector): New, for target entry points.
1099 (struct nativeserver): Rename to struct client_process.
1100 * server.c: Use client_process for entry points, and server_vector.
1101 * linux-target.c: Include ptrace-target.h.
1102 (ppc_linux_get_reg): Rename to ppc_linux_process_get_reg.
1103 (ppc_linux_set_reg): Rename to ppc_linux_process_set_reg.
1104 (ppc_linux_get_regs): Rename to ppc_linux_process_get_regs.
1105 (ppc_linux_set_regs): Rename to ppc_linux_process_set_regs.
1106 (linux_get_reg): Rename to linux_process_get_reg.
1107 (linux_set_reg): Rename to linux_process_set_reg.
1108 (linux_get_regs): Rename to linux_process_get_regs.
1109 (linux_set_regs): Rename to linux_process_set_regs.
1110 (gdbserver_check_child_state): Rename to linux_check_child_state.
1111 (gdbserver_fromtarget_break): Rename to linux_fromtarget_break.
1112 (gdbserver_fromtarget_exit): Rename to linux_fromtarget_exit.
1113 (struct server_vector gdbserver): New, defines entry points.
1114 * ptrace-target.c: Include ptrace-target.h.
1115 * aclocal.m4: New file.
1117 2000-09-08 Michael Snyder <msnyder@cleaver.cygnus.com>
1119 * linux-target.c (linux_get_reg, linux_set_reg): Remove direct
1120 calls to ptrace; instead use service call into ptrace-target.c.
1121 (linux_get_regs, linux_set_regs): Remove ifdef PPC; instead use
1122 an ifdef in linux_attach to set up the target vector pointers.
1123 (linux_attach): If PPC_LINUX_TARGET, use PPC versions of register
1124 functions instead of generic ones. Define process_set_reg, so
1125 that the "P" command is now handled.
1127 2000-09-07 Michael Snyder <msnyder@cleaver.cygnus.com>
1129 * ptrace-target.c (ptrace_read_user, ptrace_write_user): New
1130 functions. Exported so that linux-target does not have to
1131 call ptrace directly. (ptrace_get_gregs, ptrace_set_gregs,
1132 ptrace_get_fpregs, ptrace_set_fpregs): New functions.
1133 Exported for use by targets that use these methods.
1134 (ptrace_xfer_mem): Use ptrace_arg3_type instead of long.
1135 Add address to error messages.
1136 * linux-target.c: Start using config macros, port to alpha and ppc.
1137 (ppc_linux_xfer_reg, ppc_linux_getset_reg, ppc_linux_get_reg,
1138 ppc_linux_set_reg, ppc_linux_get_regs, ppc_linux_set_regs):
1139 New functions. Explicit knowledge of ppc linux register layout.
1140 (linux_get_reg): Catch undefined regmap offsets.
1141 (linux_set_reg): Ditto.
1142 (linux_get_regs): Conditionally call ppc_linux_get_regs.
1143 (linux_set_regs): Ditto.
1144 * configure.in: Add PPC target, and export target defines.
1145 * configure: Regenerate.
1146 * config.in: Add new target defines.
1148 2000-09-06 Michael Snyder <msnyder@cleaver.cygnus.com>
1150 * Makefile.am: Define CC and CFLAGS.
1151 * Makefile.in: Regenerate.
1152 * configure.in: New file. Detect all manner of things.
1153 * config.in: New file. Input file for config.h.
1154 * configure: Generate.
1155 * ptrace-target.c (ptrace_xfer_type): Move def'n into server.h.
1156 (PTRACE_XFER_SIZE): Ditto.
1157 * linux-target.c (ptrace_xfer_type): Move def'n into server.h.
1158 (ptrace_arg3_type): Ditto.
1159 * server.h: Use config macros to determine definitions of
1160 ptrace_xfer_type, ptrace_arg1_type, ptrace_arg2_type,
1161 ptrace_arg3_type, ptrace_arg4_type.
1163 2000-09-05 Michael Snyder <msnyder@cleaver.cygnus.com>
1165 * server.c (main): Detect exit status, and call fromtarget_exit
1166 instead of fromtarget_break.
1167 * linux-target.c (gdbserver_fromtarget_exit): New function.
1168 * ptrace-target.c (ptrace_kill_program, ptrace_sigkill_program):
1169 New functions. Send signals to the child.
1170 (ptrace_exit_program): New function.
1172 2000-09-05 Michael Snyder <msnyder@cleaver.cygnus.com>
1174 * linux-target.c (linux_attach): Activate process_signal vector.
1175 (gdbserver_check_child_state): Send real received signal, instead
1177 * ptrace-target.c (ptrace_break_program): New function. Implement
1178 control-c interrupt from host.
1179 (ptrace_process_signal): Implement continuation signal.
1180 (ptrace_singlestep_program): Ditto.
1181 (ptrace_continue_program): Ditto.
1182 (ptrace_get_trap_number): New function. Return signal to libremote.
1183 (ptrace_compute_signal): Ditto.
1184 (ptrace_attach): Activate break_program, process_signal, compute_signal
1185 and get_trap_number vectors.
1186 server.h (struct nativeserver): add signal_to_send field.
1187 Rename stop_sig to stop_signal.
1189 2000-09-05 Michael Snyder <msnyder@cleaver.cygnus.com>
1191 * ptrace-target.c (ptrace_singlestep_program): Make ptrace args long.
1192 FIXME: needs to be configurable.
1193 * linux-target.c (linux_get_reg, linux_set_reg): Make regaddr and
1194 regval configurable types. FIXME needs real configury.
1196 2000-09-01 Michael Snyder <msnyder@cleaver.cygnus.com>
1197 New directory "native" for native gdbserver in libremote.
1198 * server.c: New file. Entry point and main event loop.
1199 * server.h: New file. Shared declarations.
1200 * linux-target.c: New file. Linux version of libremote native stub.
1201 * ptrace-target.c: New file. Ptrace operations for libremote stub.
1202 * Makefile.am: New file. Automake source.
1203 * Makefile.in: New file. Automake-generated makefile source.
1204 Note: this work is incomplete and only partially working.