* defs.h: Include build-gnulib/config.h
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2012-08-22 Keith Seitz <keiths@redhat.com>
2
3 * server.h: Include build-gnulib-gbserver/config.h.
4 * gdbreplay.c: Likewise.
5
6 2012-08-08 Doug Evans <dje@google.com>
7
8 * Makefile.in (SFILES): Add gdb_vecs.c.
9 (OBS): Add gdb_vecs.o.
10 (gdb_vecs_h, host_defs_h): New variables.
11 (thread-db.o): Add $(gdb_vecs_h) dependency.
12 (gdb_vecs.o): New rule.
13 * thread-db.c: #include "gdb_vecs.h".
14 (thread_db_load_search): Use a vector to iterate over path elements.
15 Handle text appearing after "$pdir".
16
17 * configure.ac: Add check for strstr.
18 * config.in: Regenerate.
19 * configure: Regenerate.
20
21 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
22
23 * hostio.c (handle_pread): If pread fails, fall back to attempting
24 lseek/read.
25 (handle_pwrite): Likewise for pwrite.
26
27 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
28
29 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
30 between unsupported TYPE and unimplementable ADDR/LEN combination.
31 (arm_insert_point): Act on new return value.
32
33 2012-07-31 Pedro Alves <palves@redhat.com>
34
35 * server.c (process_point_options): Only skip tokens if we find
36 one that is unrecognized. Don't treat 'X' specially while
37 skipping unrecognized tokens.
38
39 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
40
41 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
42 to 4-byte-align HW breakpoint addresses for Thumb.
43
44 2012-07-27 Yao Qi <yao@codesourcery.com>
45
46 PR remote/14161.
47
48 * server.h: Declare gdb_agent_about_to_close.
49 * target.c (kill_inferior): Include "agent.h".
50 New. Send command 'kill'.
51 * target.h (kill_inferior): Removed macro.
52 * tracepoint.c (gdb_agent_about_to_close): New.
53 (gdb_agent_helper_thread): Handle command 'close'.
54 Wait endlessly until the inferior stops.
55 Install gdb_agent_remove_socket to atexit hook.
56 (agent_socket_name): New static variable.
57 (gdb_agent_socket_init): Replace local variable 'name' with
58 'agent_socket_name'.
59 (gdb_agent_remove_socket): New.
60
61 2012-07-27 Yao Qi <yao@codesourcery.com>
62
63 * server.c (process_point_options): Stop at 'X' when parsing.
64
65 2012-07-19 Michael Eager <eager@eagercon.com>
66
67 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
68 to hw_execute.
69 * linux-x86-low.c (x86_insert_point, x86_remove_point):
70 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
71 hardware breakpoint.
72
73 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
74
75 * gdbserver/linux-low.c (initialize_low): Call
76 linux_ptrace_init_warnings.
77
78 2012-07-02 Doug Evans <dje@google.com>
79
80 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
81 pointer to int.
82
83 2012-07-02 Stan Shebs <stan@codesourcery.com>
84
85 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
86 (ax.o): Add it to build rule.
87 (ax-ipa.o): Ditto.
88 (OBS): Add format.o.
89 (IPA_OBS): Add format.o.
90 * server.c (handle_query): Claim support for breakpoint commands.
91 (process_point_options): Add command case.
92 (process_serial_event): Leave running if there are printfs in
93 effect.
94 * mem-break.h (any_persistent_commands): Declare.
95 (add_breakpoint_commands): Declare.
96 (gdb_no_commands_at_breakpoint): Declare.
97 (run_breakpoint_commands): Declare.
98 * mem-break.c (struct point_command_list): New struct.
99 (struct breakpoint): New field command_list.
100 (any_persistent_commands): New function.
101 (add_commands_to_breakpoint): New function.
102 (add_breakpoint_commands): New function.
103 (gdb_no_commands_at_breakpoint): New function.
104 (run_breakpoint_commands): New function.
105 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
106 locally.
107 * ax.c: Include format.h.
108 (ax_printf): New function.
109 (gdb_eval_agent_expr): Add printf opcode.
110
111 2012-06-13 Yao Qi <yao@codesourcery.com>
112
113 * server.c (start_inferior): Remove duplicated writes to fields
114 'last_resume_kind' and 'last_status' of 'current_inferior'.
115
116 2012-06-12 Yao Qi <yao@codesourcery.com>
117 Pedro Alves <palves@redhat.com>
118
119 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
120 comment.
121 * server.c (handle_v_cont): Extend comment.
122
123 2012-06-11 Yao Qi <yao@codesourcery.com>
124
125 * linux-low.c (linux_attach): Add 'static'.
126
127 2012-06-06 Yao Qi <yao@codesourcery.com>
128
129 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
130
131 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
132
133 Fix gcc -flto compilation warning.
134 * server.c (main): Make variable multi_mode and attach volatile.
135
136 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
137
138 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
139 if the platform doesn't know about it.
140
141 2012-05-30 Jeff Kenton <jkenton@tilera.com>
142
143 * Makefile.in (SFILES): Add linux-tile-low.c.
144 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
145 * configure.srv: Handle tilegx-*-linux*.
146 * linux-tile-low.c: New file.
147
148 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
149
150 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
151
152 2012-05-24 Pedro Alves <palves@redhat.com>
153
154 PR gdb/7205
155
156 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
157
158 2012-05-24 Pedro Alves <palves@redhat.com>
159
160 PR gdb/7205
161
162 Replace target_signal with gdb_signal throughout.
163
164 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
165
166 * linux-low.c (linux_store_registers): Avoid the copying sequence
167 when no data has been retrieved by ptrace.
168
169 2012-05-22 Will Deacon <will.deacon@arm.com>
170
171 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
172 Include asm/ptrace.h.
173 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
174 already defined.
175
176 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
177
178 * linux-low.c (linux_store_registers): Don't re-retrieve data
179 with ptrace that has already been obtained from /proc. Always
180 copy any data retrieved with ptrace to the buffer supplied.
181
182 2012-05-11 Yao Qi <yao@codesourcery.com>
183 Pedro Alves <palves@redhat.com>
184
185 * linux-low.c (enum stopping_threads_kind): New.
186 (stopping_threads): Change type to `enum stopping_threads_kind'.
187 (handle_extended_wait): If stopping and suspending threads, leave
188 the new_lwp suspended too.
189 (linux_wait_for_event): Adjust.
190 (stop_all_lwps): Set `stopping_threads' to
191 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
192 whether we're suspending threads or just stopping them. Assert no
193 recursion happens.
194
195 2012-04-29 Yao Qi <yao@codesourcery.com>
196
197 * server.h: Move some code to ...
198 * gdbthread.h: ... here. New.
199 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
200 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
201 (nto-low.o, win32-low.o): Likewise.
202 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
203 * regcache.c, remote-utils.c, server.c: Likewise.
204 * target.c, tracepoint.c, win32-low.c: Likewise.
205
206 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
207
208 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
209 (PTRACE_ARG4_TYPE): Likewise.
210 (PTRACE_XFER_TYPE): Likewise.
211 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
212 ptrace to PTRACE_ARG3_TYPE.
213 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
214 (PTRACE_ARG4_TYPE): Likewise.
215 (PTRACE_XFER_TYPE): Likewise.
216 (linux_detach_one_lwp): Cast fourth argument of
217 ptrace to long then PTRACE_ARG4_TYPE.
218 (regsets_fetch_inferior_registers): Cast third argument of
219 ptrace to long then PTRACE_ARG3_TYPE.
220 (regsets_store_inferior_registers): Likewise.
221
222 2012-04-20 Pedro Alves <palves@redhat.com>
223
224 * configure: Regenerate.
225
226 2012-04-19 Pedro Alves <palves@redhat.com>
227
228 * Makefile.in (GNULIB_BUILDDIR): New.
229 (LIBGNU, INCGNU, GNULIB_H): Adjust.
230 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
231 (all, install-only, uninstall, clean-info, all-lib, clean): No
232 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
233 (maintainer-clean realclean distclean): Use subdir_do.
234 (subdir_do): New.
235 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
236 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
237 * acinclude.m4: Include acx_configure_dir.m4.
238 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
239 calls. Call AC_PROG_RANLIB. Configure gnulib using
240 ACX_CONFIGURE_DIR.
241 (GNULIB): New.
242 (GNULIB_STDINT_H): Adjust.
243 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
244 * gdbreplay.c: Include build-gnulib/config.h.
245 * server.h: Likewise.
246 * aclocal.m4: Regenerate.
247 * config.in: Regenerate.
248 * configure: Regenerate.
249
250 2012-04-19 Pedro Alves <palves@redhat.com>
251
252 * Makefile.in (LIBGNU, INCGNU): Adjust.
253 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
254 (all, install-only, uninstall, clean-info, all-lib, clean)
255 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
256 * configure.ac: Adjust AC_OUTPUT output.
257 * aclocal.m4: Regenerate.
258 * configure: Regenerate.
259
260 2012-04-19 Pedro Alves <palves@redhat.com>
261
262 * Makefile.in (generated_files): New.
263 (server_h): Remove the explicit dependency on config.h, and depend
264 on $generated_files.
265
266 2012-04-19 Pedro Alves <palves@redhat.com>
267
268 * Makefile.in (INCGNU): Add -Ignulib.
269
270 2012-04-19 Pedro Alves <palves@redhat.com>
271
272 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
273 (INCGNU): ... this, and spell out -I here.
274 (GNULIB_LIB): Rename to ...
275 (LIBGNU): ... this.
276 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
277
278 2012-04-19 Pedro Alves <palves@redhat.com>
279
280 * config.in: Regenerate.
281
282 2012-04-19 Pedro Alves <palves@redhat.com>
283
284 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
285 * server.h (memmem): Remove declaration.
286 * config.in: Regenerate.
287 * configure: Regenerate.
288
289 2012-04-19 Yao Qi <yao@codesourcery.com>
290
291 * Makefile.in (SFILES): Add common/vec.c.
292 (OBS): Add vec.o.
293 (vec.o): New rule.
294
295 2012-04-19 Yao Qi <yao@codesourcery.com>
296
297 * remote-utils.c (prepare_resume_reply): Replace with macro
298 target_core_of_thread.
299 * server.c (handle_qxfer_threads_proper): Likewise.
300 * target.h (traget_core_of_thread): New macro.
301
302 2012-04-18 Pedro Alves <palves@redhat.com>
303
304 * aclocal.m4: Regenerate.
305 * configure: Regenerate.
306
307 2012-04-16 Yao Qi <yao@codesourcery.com>
308
309 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
310 duplicated on address.
311
312 2012-04-16 Yao Qi <yao@codesourcery.com>
313
314 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
315 (struct tracepoint_action_ops) <send>: New field.
316 (m_tracepoint_action_send, r_tracepoint_action_send): New.
317 (agent_expr_send, x_tracepoint_action_send): New.
318 (l_tracepoint_action_send): New.
319 (cmd_qtdp): Download and install tracepoint
320 according to `use_agent'.
321 (run_inferior_command): Add one more parameter `len'.
322 Update callers.
323 (tracepoint_send_agent): New.
324 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
325
326 2012-04-16 Yao Qi <yao@codesourcery.com>
327
328 * tracepoint.c (download_tracepoints): Moved to ...
329 (cmd_qtstart): ... here.
330
331 2012-04-14 Yao Qi <yao@codesourcery.com>
332
333 * tracepoint.c: Include inttypes.h.
334 (struct collect_memory_action): Use sized types.
335 (struct tracepoint): Likewise.
336 (cmd_qtdp, stop_tracing): Update print specifiers.
337 (cmd_qtp, response_tracepoint): Likewise.
338 (collect_data_at_tracepoint): Likewise.
339 (collect_data_at_step): Likewise.
340
341 2012-04-14 Yao Qi <yao@codesourcery.com>
342
343 Import gnulib module inttypes.
344 * aclocal.m4, config.in, configure: Regenerated.
345
346 2012-04-14 Yao Qi <yao@codesourcery.com>
347
348 * Makefile.in (maintainer-clean, realclean, distclean): Remove
349 Makefile and config.status at last.
350
351 2012-04-13 Yao Qi <yao@codesourcery.com>
352
353 * tracepoint.c: Include stdint.h unconditionally.
354
355 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
356
357 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
358 on BFD_HAVE_SYS_PROCFS_TYPE.
359 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
360 * configure: Regenerate.
361 * config.in: Likewise.
362
363 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
364
365 * Makefile.in (clean): Also remove x32.c x32-linux.c
366 x32-avx.c x32-avx-linux.c.
367 (x32.o): New target.
368 (x32.c): Likewise.
369 (x32-linux.o): Likewise.
370 (x32-linux.c): Likewise.
371 (x32-avx.o): Likewise.
372 (x32-avx.c): Likewise.
373 (x32-avx-linux.o): Likewise.
374 (x32-avx-linux.c): Likewise.
375
376 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
377 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
378 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
379 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
380 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
381 i386/x32-avx-linux.xml.
382
383 * linux-x86-low.c (init_registers_x32_linux): New prototype.
384 (init_registers_x32_avx_linux): Likwise.
385 (x86_linux_update_xmltarget): Call init_registers_x32_linux
386 or init_registers_x32_avx_linux if linux_is_elf64 is false.
387
388 2012-04-13 Pedro Alves <palves@redhat.com>
389
390 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
391 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
392 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
393 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
394 the sub-make.
395
396 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
397
398 * linux-x86-low.c (compat_x32_clock_t): New.
399 (compat_x32_siginfo_t): Likewise.
400 (compat_x32_siginfo_from_siginfo): Likewise.
401 (siginfo_from_compat_x32_siginfo): Likewise.
402 (linux_is_elf64): Likewise.
403 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
404 and siginfo_from_compat_x32_siginfo for x32.
405 (x86_arch_setup): Set linux_is_elf64.
406
407 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
408
409 PR gdb/13969
410 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
411 e_machine field.
412 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
413 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
414 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
415 compatible with process.
416
417 2012-04-12 Yao Qi <yao@codesourcery.com>
418
419 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
420 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
421 (install-only, install-info, clean): Handle sub dir gnulib.
422 (all-lib, am--refresh): New targets.
423 (memmem.o): Remove target.
424 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
425 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
426 (AC_REPLACE_FUNCS): Remove memmem.
427 Invoke gl_INIT and AM_INIT_AUTOMAKE.
428 (AC_OUTPUT): Generate Makefile in gnulib/.
429 * aclocal.m4, config.in, configure: Regenerated.
430
431 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
432
433 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
434
435 2012-04-05 Pedro Alves <palves@redhat.com>
436
437 -Werror=strict-aliasing
438
439 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
440 pointer.
441
442 2012-04-04 Pedro Alves <palves@redhat.com>
443
444 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
445 (sparc_store_gregset_from_stack, sparc_store_gregset)
446 (sparc_breakpoint_at): Fix formatting.
447
448 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
449
450 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
451 are available.
452 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
453 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
454 * config.in: Regenerate.
455 * configure: Likewise.
456
457 2012-03-29 Pedro Alves <palves@redhat.com>
458
459 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
460 Correct ptrace arguments.
461
462 2012-03-28 Pedro Alves <palves@redhat.com>
463
464 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
465 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
466 (IA64_FR1_REGNUM): New defines.
467 (ia64_fetch_register): New.
468 (the_low_target): Install it.
469 * linux-low.h (struct linux_target_ops) <fetch_register>: New
470 field.
471 * linux-low.c (linux_fetch_registers): Try the
472 the_low_target.fetch_register hook first.
473
474 * linux-arm-low.c (the_low_target): Adjust.
475 * linux-bfin-low.c (the_low_target): Adjust.
476 * linux-cris-low.c (the_low_target): Adjust.
477 * linux-crisv32-low.c (the_low_target): Adjust.
478 * linux-m32r-low.c (the_low_target): Adjust.
479 * linux-m68k-low.c (the_low_target): Adjust.
480 * linux-mips-low.c (the_low_target): Adjust.
481 * linux-ppc-low.c (the_low_target): Adjust.
482 * linux-s390-low.c (the_low_target): Adjust.
483 * linux-sh-low.c (the_low_target): Adjust.
484 * linux-sparc-low.c (the_low_target): Adjust.
485 * linux-tic6x-low.c (the_low_target): Adjust.
486 * linux-x86-low.c (the_low_target): Adjust.
487 * linux-xtensa-low.c (the_low_target): Adjust.
488
489 2012-03-26 Pedro Alves <palves@redhat.com>
490
491 * server.c (handle_qxfer_libraries): Don't bail early if
492 the_target->qxfer_libraries_svr4 is not NULL.
493
494 2012-03-26 Pedro Alves <palves@redhat.com>
495
496 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
497
498 2012-03-23 Pedro Alves <palves@redhat.com>
499
500 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
501 "library-list-svr4" element's start tag when the the DSO list is
502 empty.
503
504 2012-03-23 Pedro Alves <palves@redhat.com>
505
506 * linux-low.c (read_one_ptr): Read the inferior's pointer through
507 a variable whose type size is the same as the inferior's pointer
508 size.
509
510 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
511
512 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
513 struct siginfo.
514 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
515 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
516 * linux-low.h: Include <signal.h>.
517 (struct siginfo): Remove forward declaration.
518 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
519 struct siginfo.
520
521 2012-03-21 Mike Frysinger <vapier@gentoo.org>
522
523 * .gitignore: Ignore more files.
524
525 2012-03-19 Pedro Alves <palves@redhat.com>
526 Jan Kratochvil <jan.kratochvil@redhat.com>
527
528 * server.c (cont_thread, general_thread): Add describing comments.
529 (start_inferior): Clear `cont_thread'.
530 (handle_v_cont): Don't set `cont_thread' if resuming all threads
531 of a process.
532
533 2012-03-15 Yao Qi <yao@codesourcery.com>
534
535 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
536 handling to ...
537 (cmd_qtdp): ... here.
538
539 2012-03-15 Yao Qi <yao@codesourcery.com>
540
541 * tracepoint.c (struct tracepoint_action_ops): New.
542 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
543 (m_tracepoint_action_download): New.
544 (r_tracepoint_action_download): New.
545 (x_tracepoint_action_download): New.
546 (l_tracepoint_action_download): New.
547 (add_tracepoint_action): Install `action->ops' according type.
548 (download_tracepoint_1): Move code `download' function pointer
549 of various tracepoint_action_ops.
550
551 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
552
553 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
554 linux_ptrace_attach_warnings.
555
556 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
557
558 * Makefile.in (linux-ptrace.o): New.
559 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
560 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
561 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
562 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
563 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
564 of these targets.
565 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
566
567 2012-03-08 Yao Qi <yao@codesourcery.com>
568 Pedro Alves <palves@redhat.com>
569
570 Fix PR server/13392.
571 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
572 offset of JMP insn.
573 * tracepoint.c (remove_tracepoint): New.
574 (cmd_qtdp): Call remove_tracepoint when failed to install.
575
576 2012-03-07 Pedro Alves <palves@redhat.com>
577
578 * linux-low.c (get_detach_signal): New.
579 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
580 Pass on pending signals to PTRACE_DETACH. Check the result of the
581 ptrace call.
582 * server.c (program_signals, program_signals_p): New.
583 (handle_general_set): Handle QProgramSignals.
584 * server.h (program_signals, program_signals_p): Declare.
585
586 2012-03-05 Pedro Alves <palves@redhat.com>
587 Jan Kratochvil <jan.kratochvil@redhat.com>
588
589 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
590 New comment why.
591
592 2012-03-03 Yao Qi <yao@codesourcery.com>
593
594 * tracepoint.c (tracepoint_look_up_symbols): Update call to
595 agent_look_up_symbols.
596
597 2012-03-03 Yao Qi <yao@codesourcery.com>
598
599 * Makefile.in (linux-low.o): Keep dependence on agent.h.
600 (linux-x86-low.o): Likewise.
601 * server.h: Remove in_process_agent_loaded.
602 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
603 common/agent.c.
604 Update callers.
605
606 2012-03-03 Yao Qi <yao@codesourcery.com>
607
608 * tracepoint.c (gdb_agent_capability): New global.
609 (in_process_agent_loaded_ust): Renamed to
610 `in_process_agent_supports_ust'.
611 Update callers.
612 (in_process_agent_supports_ust): Call agent_capability_check.
613 (clear_installed_tracepoints): Assert that agent supports
614 agent.
615
616 2012-03-03 Yao Qi <yao@codesourcery.com>
617
618 * linux-low.c (linux_supports_agent): New.
619 (linux_target_ops): Initialize field `supports_agent' with
620 linux_supports_agent.
621 * target.h (struct target_ops) <supports_agent>: New.
622 (target_supports_agent): New macro.
623 * server.c (handle_general_set): Handle packet 'QAgent'.
624 (handle_query): Send `QAgent+'.
625 * Makefile.in (server.o): Depends on agent.h.
626
627 2012-03-03 Yao Qi <yao@codesourcery.com>
628
629 * Makefile.in (OBS): Add agent.o.
630 Add new rule for agent.o.
631 Track dependence of tracepoint.c on agent.h.
632 * tracepoint.c (run_inferior_command_1):
633 (run_inferior_command): Call agent_run_command.
634 (gdb_ust_connect_sync_socket): Deleted. Move it to
635 common/agent.c.
636 (resume_thread, stop_thread): Likewise.
637 (gdb_ust_socket_init): Renamed to ...
638 (gdb_agent_socket_init): ... New.
639 (gdb_ust_thread): Renamed to ...
640 (gdb_agent_helper_thread): ... New.
641 (gdb_ust_init): Move some code to ...
642 (gdb_agent_init): ... here. New.
643 [HAVE_UST]: Call gdb_ust_init.
644 (initialize_tracepoint_ftlib): Call gdb_agent_init.
645 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
646 * config.in, configure: Regenerated.
647
648 2012-03-02 Pedro Alves <palves@redhat.com>
649
650 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
651 * linux-low.c (struct simple_pid_list): New.
652 (stopped_pids): New a struct simple_pid_list pointer.
653 (add_to_pid_list, pull_pid_from_list): New.
654 (handle_extended_wait): Don't assume the first signal new children
655 report is SIGSTOP. Adjust call to pull_pid_from_list.
656 (linux_wait_for_lwp): Adjust.
657
658 2012-03-02 Yao Qi <yao@codesourcery.com>
659
660 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
661 debug log.
662
663 2012-03-02 Yao Qi <yao@codesourcery.com>
664
665 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
666 `stop_pc' and `tpoint'. Update caller.
667
668 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
669
670 * linux-low.h (linux_target_ops): Add regset_bitmap member.
671 * linux-low.c (use_linux_regsets): New macro.
672 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
673 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
674 (linux_register_in_regsets): New function.
675 (usr_fetch_inferior_registers): Skip registers covered by
676 regsets.
677 (usr_store_inferior_registers): Likewise.
678 (usr_fetch_inferior_registers): New macro.
679 (usr_store_inferior_registers): Likewise.
680 (linux_fetch_registers): Handle mixed regset/non-regset targets.
681 (linux_store_registers): Likewise.
682 * linux-mips-low.c (init_registers_mips_dsp_linux): New
683 prototype.
684 (init_registers_mips64_dsp_linux): Likewise.
685 (init_registers_mips_linux): New macro.
686 (init_registers_mips_dsp_linux): Likewise.
687 (mips_dsp_num_regs): Likewise.
688 (DSP_BASE, DSP_CONTROL): New fallback macros.
689 (mips_base_regs): New macro.
690 (mips_regmap): Use it. Fix the size.
691 (mips_dsp_regmap): New variable.
692 (mips_dsp_regset_bitmap): Likewise.
693 (mips_arch_setup): New function.
694 (mips_cannot_fetch_register): Use the_low_target.regmap rather
695 than mips_regmap.
696 (mips_cannot_store_register): Likewise.
697 (the_low_target): Update .arch_setup, .num_regs and .regmap
698 initializers. Add .regset_bitmap initializer.
699 * linux-arm-low.c (the_low_target): Add .regset_bitmap
700 initializer.
701 * linux-bfin-low.c (the_low_target): Likewise.
702 * linux-cris-low.c (the_low_target): Likewise.
703 * linux-crisv32-low.c (the_low_target): Likewise.
704 * linux-ia64-low.c (the_low_target): Likewise.
705 * linux-m32r-low.c (the_low_target): Likewise.
706 * linux-m68k-low.c (the_low_target): Likewise.
707 * linux-ppc-low.c (the_low_target): Likewise.
708 * linux-s390-low.c (the_low_target): Likewise.
709 * linux-sh-low.c (the_low_target): Likewise.
710 * linux-sparc-low.c (the_low_target): Likewise.
711 * linux-tic6x-low.c (the_low_target): Likewise.
712 * linux-x86-low.c (the_low_target): Likewise.
713 * linux-xtensa-low.c (the_low_target): Likewise.
714 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
715 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
716 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
717 srv_xmlfiles.
718 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
719 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
720
721 2012-02-29 Yao Qi <yao@codesourcery.com>
722 Pedro Alves <palves@redhat.com>
723
724 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
725 `step_over_finished' is true.
726
727 2012-02-27 Pedro Alves <palves@redhat.com>
728
729 * linux-low.c (pid_is_stopped): Delete, moved to common/.
730 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
731
732 2012-02-27 Pedro Alves <palves@redhat.com>
733
734 PR server/9684
735 * linux-low.c (pid_is_stopped): New.
736 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
737
738 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
739
740 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
741 of conditions.
742
743 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
744
745 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
746
747 2012-02-24 Luis Machado <lgustavo@codesourcery>
748
749 * server.c (handle_query): Advertise support for target-side
750 breakpoint condition evaluation.
751 (process_point_options): New function.
752 (process_serial_event): When inserting a breakpoint, check for
753 a target-side condition that should be evaluated.
754
755 * mem-break.c: Include regcache.h and ax.h.
756 (point_cond_list_t): New data structure.
757 (breakpoint) <cond_list>: New field.
758 (find_gdb_breakpoint_at): Make non-static.
759 (delete_gdb_breakpoint_at): Clear any target-side
760 conditions.
761 (clear_gdb_breakpoint_conditions): New function.
762 (add_condition_to_breakpoint): Likewise.
763 (add_breakpoint_condition): Likewise.
764 (gdb_condition_true_at_breakpoint): Likewise.
765 (gdb_breakpoint_here): Return result directly instead
766 of going through a local variable.
767
768 * mem-break.h (find_gdb_breakpoint_at): New prototype.
769 (clear_gdb_breakpoint_conditions): Likewise.
770 (add_breakpoint_condition): Likewise.
771 (gdb_condition_true_at_breakpoint): Likewise.
772
773 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
774 (need_step_over_p): Take target-side breakpoint condition into
775 consideration.
776
777 2012-02-24 Luis Machado <lgustavo@codesourcery>
778
779 * server.h: Include tracepoint.h.
780 (agent_mem_read, agent_get_trace_state_variable_value,
781 agent_set_trace_state_variable_value,
782 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
783 get_set_tsv_func_addr): New prototypes.
784
785 * ax.h: New include file.
786 * ax.c: New source file.
787
788 * tracepoint.c: Include ax.h.
789 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
790 agent_expr, eval_result_type): Move to ax.h.
791 (parse_agent_expr): Rename to ...
792 (gdb_parse_agent_expr): ... this, make it non-static and move
793 to ax.h.
794 (unparse_agent_expr) Rename to ...
795 (gdb_unparse_agent_expr): ... this, make it non-static and move
796 to ax.h.
797 (eval_agent_expr): Rename to ...
798 (eval_tracepoint_agent_expr): ... this.
799 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
800 forward declarations.
801 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
802 (agent_get_trace_state_variable_value): New function.
803 (agent_set_trace_state_variable_value): New function.
804 (cmd_qtdp): Call gdb_parse_agent_expr (...).
805 (response_tracepoint): Call gdb_unparse_agent_expr (...).
806 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
807 (condition_true_at_tracepoint): Likewise.
808 (parse_agent_expr): Rename to ...
809 (gdb_parse_agent_expr): ... this and move to ax.c.
810 (unparse_agent_expr): Rename to ...
811 (gdb_unparse_agent_expr): ... this and move to ax.c.
812 (gdb_agent_op_name): Move to ax.c.
813 (eval_agent_expr): Rename to ...
814 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
815 and move to ax.c.
816 (eval_tracepoint_agent_expr): New function.
817 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
818 non-static.
819 (current_insn_ptr, emit_error, struct bytecode_address): Move to
820 ax.c.
821 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
822 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
823 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
824 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
825 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
826 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
827 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
828 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
829 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
830 (compile_bytecodes): Remove forward declaration.
831 (is_goto_target): Move to ax.c.
832 (compile_bytecodes): Move to ax.c and call
833 agent_get_trace_state_variable_value (...) and
834 agent_set_trace_state_variable_value (...).
835
836 * Makefile.in: Update ax.c and IPA dependencies.
837
838 2012-02-24 Pedro Alves <palves@redhat.com>
839
840 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
841 (cmd_bigqtbuffer_circular): ... this. Only handle
842 'QTBuffer:circular:'.
843 (handle_tracepoint_general_set): Adjust.
844
845 2012-02-16 Yao Qi <yao@codesourcery.com>
846
847 * inferiors.c: Move code to ...
848 * dll.c: .... here. New.
849 * server.h: Declare clear_dlls.
850 * Makefile.in (SFILES): Add dll.c.
851 (OBS): Add dll.o
852 (dll.o): New rule.
853
854 2012-02-11 Yao Qi <yao@codesourcery.com>
855
856 * server.c: (handle_monitor_command): Add a new parameter
857 `own_buf'.
858 (handle_query): Update caller.
859
860 2012-02-09 Joel Brobecker <brobecker@adacore.com>
861
862 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
863 * configure, config.in: Regenerate.
864 * hostio.c: Provide an alternate implementation if HAVE_READLINK
865 is not defined.
866
867 2012-02-02 Pedro Alves <palves@redhat.com>
868
869 Try SIGKILL first, then PTRACE_KILL.
870 * linux-low.c (linux_kill_one_lwp): New.
871 (linux_kill_one_lwp): Rename to ...
872 (kill_one_lwp_callback): ... this. Use the new
873 linux_kill_one_lwp.
874
875 2012-02-02 Pedro Alves <palves@redhat.com>
876
877 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
878 inferior.
879
880 2012-01-27 Pedro Alves <palves@redhat.com>
881
882 * linux-low.c (linux_child_pid_to_exec_file): Delete.
883 (elf_64_file_p): Make static.
884 (linux_pid_exe_is_elf_64_file): New.
885 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
886 Delete declarations.
887 (linux_pid_exe_is_elf_64_file): Declare.
888 * linux-x86-low.c (x86_arch_setup): Use
889 linux_pid_exe_is_elf_64_file.
890
891 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
892
893 * linux-low.c (linux_wait_for_event_1): Rename to ...
894 (linux_wait_for_event): ... here and merge it with former
895 linux_wait_for_event - new variable wait_ptid, use it.
896 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
897
898 2012-01-23 Pedro Alves <palves@redhat.com>
899
900 * server.c (main): Avoid yet another case of infinite loop while
901 detaching/killing after a longjmp.
902
903 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
904
905 Code cleanup.
906 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
907
908 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
909
910 * hostio.c (handle_readlink): New function.
911 (handle_vFile): Call it to handle "vFile:readlink" packets.
912
913 2012-01-20 Pedro Alves <palves@redhat.com>
914 Ulrich Weigand <ulrich.weigand@linaro.org>
915
916 * server.c (handle_v_requests): Only support vAttach and vRun to
917 start multiple processes when in extended protocol mode.
918
919 2012-01-17 Pedro Alves <palves@redhat.com>
920
921 * tracepoint.c (initialize_tracepoint): Use mmap instead of
922 memalign plus mprotect to allocate the scratch buffer.
923
924 2012-01-13 Pedro Alves <palves@redhat.com>
925
926 * server.c (attach_inferior): Clear `cont_thread'.
927
928 2012-01-13 Pedro Alves <palves@redhat.com>
929
930 * server.c (main): Avoid infinite loop while detaching/killing
931 after a longjmp.
932
933 2012-01-09 Doug Evans <dje@google.com>
934
935 * server.c (start_inferior): Set last_ptid in --wrapper case.
936
937 2012-01-06 Yao Qi <yao@codesourcery.com>
938
939 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
940 defined.
941 [IN_PROCESS_AGENT] (debug_agent): New global variable.
942
943 2012-01-04 Yao Qi <yao@codesourcery.com>
944
945 * tracepoint.c (cmd_qtdp): Print debug message
946 for static tracepoint.
947
948 2012-01-04 Yao Qi <yao@codesourcery.com>
949
950 * tracepoint.c (trace_vdebug): Differentiate debug message
951 between gdbserver and IPA.
952
953 2012-01-03 Yao Qi <yao@codesourcery.com>
954
955 * tracepoint.c (tracepoint_was_hit): Don't collect for
956 static tracepoint.
957
958 2012-01-02 Joel Brobecker <brobecker@adacore.com>
959
960 * terminal.h: Reformat copyright header.
961
962 2012-01-02 Joel Brobecker <brobecker@adacore.com>
963
964 * server.c (gdbserver_version): Update copyright year.
965 * gdbreplay.c (gdbreplay_version): Likewise.
966
967 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
968
969 * linux-low.c (linux_create_inferior): Put empty if clause for write.
970
971 Revert:
972 2011-12-18 Hui Zhu <teawater@gmail.com>
973 * linux-low.c (linux_create_inferior): Save return value to ret.
974
975 2011-12-18 Hui Zhu <teawater@gmail.com>
976
977 * linux-low.c (linux_create_inferior): Save return value to ret.
978
979 2011-12-16 Doug Evans <dje@google.com>
980
981 * linux-low.c (linux_create_inferior): If stdio connection,
982 redirect stdin from /dev/null, stdout to stderr.
983 * remote-utils.c (remote_is_stdio): New static global.
984 (remote_connection_is_stdio): New function.
985 (remote_prepare): Handle stdio connection.
986 (remote_open): Ditto.
987 (remote_close): Don't close stdin for stdio connections.
988 (read_prim,write_prim): New functions. Replace all calls to
989 read/write to these.
990 * server.c (main): Watch for "-" argument. Move call to
991 remote_prepare before start_inferior.
992 * server.h (STDIO_CONNECTION_NAME): New macro.
993 (remote_connection_is_stdio): Declare.
994
995 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
996 in debugging output.
997
998 2011-12-15 Yao Qi <yao@codesourcery.com>
999
1000 * tracepoint.c: Include sys/syscall.h.
1001 (gdb_ust_thread): Remove preprocessor conditional.
1002
1003 2011-12-14 Pedro Alves <pedro@codesourcery.com>
1004
1005 * linux-low.c (linux_detach_one_lwp): Call
1006 the_low_target.prepare_to_resume before detaching.
1007
1008 2011-12-14 Yao Qi <yao@codesourcery.com>
1009
1010 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1011 of write.
1012
1013 2011-12-14 Yao Qi <yao@codesourcery.com>
1014
1015 * i386-low.c (i386_low_stopped_data_address): Initialize local
1016 variable `control'.
1017
1018 2011-12-13 Pedro Alves <pedro@codesourcery.com>
1019
1020 PR remote/13492
1021
1022 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1023 DR_CONTROL unless necessary. Extend comments.
1024 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1025 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1026
1027 2011-12-13 Yao Qi <yao@codesourcery.com>
1028
1029 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1030 macros.
1031 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1032
1033 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1034
1035 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1036 Print new debug message for such case.
1037
1038 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1039
1040 Fix overlapping memcpy.
1041 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1042 the read_inferior_memory transfer.
1043 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1044 write_inferior_memory transfer.
1045 (set_fast_tracepoint_jump): New variable buf. Use it for the
1046 read_inferior_memory and write_inferior_memory transfers.
1047 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1048 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1049 Use it for the write_inferior_memory transfer.
1050 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1051 buffers.
1052
1053 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1054
1055 * linux-low.c (fetch_register, store_register): Make code
1056 consistent, fix formatting.
1057
1058 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1059
1060 * linux-low.c (usr_store_inferior_registers): Factor out code
1061 to handle individual registers into...
1062 (store_register): ... this new function.
1063
1064 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1065
1066 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1067 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1068 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1069 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1070 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1071 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1072 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1073 (srv_xmlfiles): Add new XML files.
1074
1075 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1076 and <sys/uio.h>.
1077 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1078 (init_registers_s390_linux32v1): Add prototype.
1079 (init_registers_s390_linux32v2): Likewise.
1080 (init_registers_s390_linux64v1): Likewise.
1081 (init_registers_s390_linux64v2): Likewise.
1082 (init_registers_s390x_linux64v1): Likewise.
1083 (init_registers_s390x_linux64v2): Likewise.
1084 (s390_num_regs): Increment to 52.
1085 (s390_regmap): Add orig_r2 register.
1086 (s390_num_regs_3264): Increment to 68.
1087 (s390_regmap_3264): Add orig_r2 register.
1088 (s390_collect_ptrace_register): Handle orig_r2 register.
1089 (s390_supply_ptrace_register): Likewise.
1090 (s390_fill_last_break): New function.
1091 (s390_store_last_break): Likewise.
1092 (s390_fill_system_call): New function.
1093 (s390_store_system_call): Likewise.
1094 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1095 register sets.
1096 (s390_check_regset): New function.
1097 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1098 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1099 Update target_regsets for available register sets.
1100
1101 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1102 Jan Kratochvil <jan.kratochvil@redhat.com>
1103
1104 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1105 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1106 New.
1107 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1108 * linux-low.h (struct process_info_private): New member r_debug.
1109 * server.c (handle_qxfer_libraries): Call
1110 the_target->qxfer_libraries_svr4.
1111 (handle_qxfer_libraries_svr4): New function.
1112 (qxfer_packets): New entry "libraries-svr4".
1113 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1114 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1115 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1116 PACKET_qXfer_libraries_svr4.
1117
1118 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1119
1120 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1121 PSW address/mask between 8-byte and 16-byte formats.
1122 (s390_supply_ptrace_register): Likewise.
1123 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1124 basic addressing mode bit.
1125
1126 2011-11-24 Stan Shebs <stan@codesourcery.com>
1127
1128 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1129
1130 2011-11-17 Stan Shebs <stan@codesourcery.com>
1131
1132 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1133 (tracing_start_time): New global.
1134 (tracing_stop_time): New global.
1135 (tracing_user_name): New global.
1136 (tracing_notes): New global.
1137 (tracing_stop_note): New global.
1138 (cmd_qtstart): Set traceframe_usage, start_time.
1139 (stop_tracing): Set stop_time.
1140 (cmd_qtstatus): Report additional status.
1141 (cmd_qtp): New function.
1142 (handle_tracepoint_query): Call it.
1143 (cmd_qtnotes): New function.
1144 (handle_tracepoint_general_set): Call it.
1145 (get_timestamp): Rename from tsv_get_timestamp.
1146
1147 2011-11-14 Stan Shebs <stan@codesourcery.com>
1148 Kwok Cheung Yeung <kcy@codesourcery.com>
1149
1150 * linux-x86-low.c (small_jump_insn): New.
1151 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1152 trampoline and error message, build a trampoline and issue a small
1153 jump instruction to it.
1154 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1155 trampoline and error message.
1156 (x86_get_min_fast_tracepoint_insn_len): New.
1157 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1158 * linux-low.h (struct linux_target_ops): Add arguments to
1159 install_fast_tracepoint_jump_pad operation, add new operation.
1160 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1161 arguments.
1162 (linux_get_min_fast_tracepoint_insn_len): New function.
1163 (linux_target_op): Add new operation.
1164 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1165 (gdb_trampoline_buffer_end): Ditto.
1166 (gdb_trampoline_buffer_error): Ditto.
1167 (struct ipa_sym_addresses): Add fields for new IPA variables.
1168 (symbol_list): Add entries for new IPA variables.
1169 (struct tracepoint): Add fields to hold the address range of the
1170 trampoline used by the tracepoint.
1171 (trampoline_buffer_head): New static variable.
1172 (trampoline_buffer_tail): Ditto.
1173 (claim_trampoline_space): New function.
1174 (have_fast_tracepoint_trampoline_buffer): New function.
1175 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1176 structure.
1177 (install_fast_tracepoint): Ditto, also add error buffer argument.
1178 (cmd_qtminftpilen): New function.
1179 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1180 (fast_tracepoint_from_trampoline_address): New function.
1181 (fast_tracepoint_collecting): Handle trampoline as part of jump
1182 pad space.
1183 (set_trampoline_buffer_space): New function.
1184 (initialize_tracepoint): Initialize new IPA variables.
1185 * target.h (struct target_ops): Add arguments to
1186 install_fast_tracepoint_jump_pad operation, add new
1187 get_min_fast_tracepoint_insn_len operation.
1188 (target_get_min_fast_tracepoint_insn_len): New.
1189 (install_fast_tracepoint_jump_pad): Add arguments.
1190 * server.h (IPA_BUFSIZ): Define.
1191 * linux-i386-ipa.c: Include extra header files.
1192 (initialize_fast_tracepoint_trampoline_buffer): New function.
1193 (initialize_low_tracepoint): Call it.
1194 * server.h (set_trampoline_buffer_space): Declare.
1195 (claim_trampoline_space): Ditto.
1196 (have_fast_tracepoint_trampoline_buffer): Ditto.
1197
1198 2011-11-14 Yao Qi <yao@codesourcery.com>
1199
1200 * server.c (handle_query): Handle InstallInTrace for qSupported.
1201 * tracepoint.c (add_tracepoint): Sort list.
1202 (install_tracepoint, download_tracepoint): New.
1203 (cmd_qtdp): Call them to install and download tracepoints.
1204 (sort_tracepoints): Removed.
1205 (cmd_qtstart): Update.
1206
1207 2011-11-14 Yao Qi <yao@codesourcery.com>
1208
1209 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1210 * mem-break.h: Declare.
1211 * tracepoint.c (cmd_qtstart): Move some code to ...
1212 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1213 New.
1214 (download_tracepoints): Move some code to ...
1215 (download_tracepoint_1): ... here. New.
1216
1217 2011-11-08 Yao Qi <yao@codesourcery.com>
1218
1219 * remote-utils.c (relocate_instruction): A comment fix.
1220
1221 2011-11-07 Joel Brobecker <brobecker@adacore.com>
1222
1223 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1224 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1225 dr_status_mirror and dr_control_mirror from debug_reg_state.
1226 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1227 (i386_initial_stuff): Remove use of deleted globals.
1228 (i386_get_thread_context, i386_set_thread_context,
1229 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1230 from debug_reg_state.
1231
1232 2011-11-05 Yao Qi <yao@codesourcery.com>
1233
1234 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1235 address as TPOINT's.
1236
1237 2011-11-02 Stan Shebs <stan@codesourcery.com>
1238
1239 * tracepoint.c (agent_mem_read_string): New function.
1240 (eval_agent_expr): Call it for tracenz.
1241 * server.c (handle_query): Report support for tracenz.
1242
1243 2011-11-02 Yao Qi <yao@codesourcery.com>
1244
1245 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1246
1247 2011-11-02 Yao Qi <yao@codesourcery.com>
1248
1249 * target.h: Fix a typo in comment.
1250
1251 2011-10-31 Pedro Alves <pedro@codesourcery.com>
1252
1253 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1254 clobber the breakpoints' shadows with fast tracepoint jumps.
1255 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1256 * target.c (write_inferior_memory): Also pass MYADDR down to
1257 check_mem_write.
1258
1259 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1260
1261 * configure.ac: Check support for personality routine.
1262 * configure: Regenerate.
1263 * config.in: Likewise.
1264 * linux-low.c: Include <sys/personality.h>.
1265 Define ADDR_NO_RANDOMIZE if necessary.
1266 (linux_create_inferior): Disable address space randomization when
1267 forking inferior, if requested.
1268 (linux_supports_disable_randomization): New function.
1269 (linux_target_ops): Install it.
1270 * server.h (disable_randomization): Declare.
1271 * server.c (disable_randomization): New global variable.
1272 (handle_general_set): Handle QDisableRandomization.
1273 (handle_query): Likewise for qSupported.
1274 (main): Support --disable-randomization and --no-disable-randomization
1275 command line arguments.
1276 * target.h (struct target_ops): Add supports_disable_randomization.
1277 (target_supports_disable_randomization): New macro.
1278
1279 2011-09-29 Mike Frysinger <vapier@gentoo.org>
1280
1281 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1282 ifdef check.
1283 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1284 [!PT_GETDSBT] (target_loadmap): New definition.
1285 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1286 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1287 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1288 and PT_GETDSBT to LINUX_LOADMAP.
1289 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1290 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1291
1292 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1293
1294 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1295 (arm_linux_hwbp_cap): New static variable.
1296 (arm_linux_get_hwbp_cap): Replace by ...
1297 (arm_linux_init_hwbp_cap): ... this new function.
1298 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1299 (arm_linux_get_hw_watchpoint_count): Likewise.
1300 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1301 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1302 (arm_prepare_to_resume): Use perror_with_name instead of error.
1303
1304 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1305
1306 * linux-arm-low.c: Include <signal.h>.
1307 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1308 (struct arm_linux_hwbp_cap): New data type.
1309 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1310 (struct arm_linux_hw_breakpoint): New data type.
1311 (MAX_BPTS, MAX_WPTS): Define.
1312 (struct arch_process_info, struct arch_lwp_info): New data types.
1313 (arm_linux_get_hwbp_cap): New function.
1314 (arm_linux_get_hw_breakpoint_count): Likewise.
1315 (arm_linux_get_hw_watchpoint_count): Likewise.
1316 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1317 (arm_hwbp_control_initialize): Likewise.
1318 (arm_hwbp_control_is_enabled): Likewise.
1319 (arm_hwbp_control_is_initialized): Likewise.
1320 (arm_hwbp_control_disable): Likewise.
1321 (arm_linux_hw_breakpoint_equal): Likewise.
1322 (arm_linux_hw_point_initialize): Likewise.
1323 (struct update_registers_data): New data structure.
1324 (update_registers_callback: New function.
1325 (arm_insert_point): Likewise.
1326 (arm_remove_point): Likewise.
1327 (arm_stopped_by_watchpoint): Likewise.
1328 (arm_stopped_data_address): Likewise.
1329 (arm_new_process): Likewise.
1330 (arm_new_thread): Likewise.
1331 (arm_prepare_to_resume): Likewise.
1332 (the_low_target): Register arm_insert_point, arm_remove_point,
1333 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1334 arm_new_thread, and arm_prepare_to_resume.
1335
1336 2011-09-15 Stan Shebs <stan@codesourcery.com>
1337
1338 * server.h (struct emit_ops): Add compare-goto fields.
1339 * tracepoint.c (gdb_agent_op_sizes): New table.
1340 (emit_eq_goto): New function.
1341 (emit_ne_goto): New function.
1342 (emit_lt_goto): New function.
1343 (emit_le_goto): New function.
1344 (emit_gt_goto): New function.
1345 (emit_ge_goto): New function.
1346 (is_goto_target): New function.
1347 (compile_bytecodes): Recognize special cases of compare-goto
1348 combinations and call specialized emitters for them.
1349 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1350 (amd64_emit_ne_goto): New function.
1351 (amd64_emit_lt_goto): New function.
1352 (amd64_emit_le_goto): New function.
1353 (amd64_emit_gt_goto): New function.
1354 (amd64_emit_ge_goto): New function.
1355 (amd64_emit_ops): Add the new functions.
1356 (i386_emit_eq_goto): New function.
1357 (i386_emit_ne_goto): New function.
1358 (i386_emit_lt_goto): New function.
1359 (i386_emit_le_goto): New function.
1360 (i386_emit_gt_goto): New function.
1361 (i386_emit_ge_goto): New function.
1362 (i386_emit_ops): Add the new functions.
1363
1364 2011-09-08 Stan Shebs <stan@codesourcery.com>
1365
1366 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1367 (i386_emit_epilogue): Restore %ebx.
1368
1369 2011-08-31 Jie Zhang <jzhang918@gmail.com>
1370
1371 * server.c (step_thread): Remove definition.
1372 (process_serial_event): Don't handle Hs.
1373 * server.h (step_thread): Remove declaration.
1374 * target.c (set_desired_inferior): Remove use of step_thread.
1375
1376 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1377
1378 * linux-low.c: Include linux-procfs.h.
1379 (linux_attach_lwp_1): Update comments.
1380 (linux_attach): Scan for existing threads when attaching to a
1381 process that is the tgid.
1382 * Makefile.in: Update dependencies.
1383
1384 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
1385
1386 * configure.srv: Add linux-procfs.o dependencies.
1387
1388 2011-08-14 Yao Qi <yao@codesourcery.com>
1389
1390 * target.h (struct target_ops): Fix indent.
1391 * win32-low.c (win32_target_ops): Fix comment.
1392
1393 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
1394 Yao Qi <yao@codesourcery.com>
1395
1396 * Makefile.in (clean): Remove tic6x-*.c files.
1397 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1398 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1399 (tic6x-c64xp-linux.c): Likewise.
1400 * configure.srv: Add support for tic6x-*-uclinux.
1401 * linux-tic6x-low.c: New.
1402 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1403
1404 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1405 Yao Qi <yao@codesourcery.com>
1406
1407 * target.h (struct target_ops): Add read_loadmap.
1408 * linux-low.c (struct target_loadseg): New type.
1409 (struct target_loadmap): New type.
1410 (linux_read_loadmap): New function.
1411 (linux_target_ops): Add linux_read_loadmap.
1412 * server.c (handle_query): Support qXfer:fdpic:read packet.
1413 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1414
1415 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1416
1417 * win32-low.c: Include <stdint.h>.
1418
1419 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1420
1421 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1422 to the inferior here.
1423 (i386_remove_aligned_watchpoint): Ditto.
1424 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1425 fit part of the watchpoint in the debug registers.
1426 (i386_update_inferior_debug_regs): New.
1427 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1428 registers, and only update the inferior on success.
1429 (i386_low_remove_watchpoint): Ditto.
1430
1431 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1432
1433 * linux-low.c (compare_ints, unique, list_threads, show_process,
1434 linux_core_of_thread): Delete.
1435 (linux_target_ops): Change linux_core_of_thread to
1436 linux_common_core_of_thread.
1437 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1438 * utils.c (malloc_failure): Change type of argument.
1439 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1440 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1441 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1442 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1443 (IPA_OBJS): Add common-utils-ipa.o.
1444 (ptid_h, linux_osdata_h): New macros.
1445 (server_h): Add common/common-utils.h, common/xml-utils.h,
1446 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1447 common/ptid.h.
1448 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1449 ptid.o, buffer.o): New rules.
1450 (linux-low.o): Add common/linux-osdata.h as a dependency.
1451 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1452 * configure.ac: Add AC_HEADER_DIRENT check.
1453 * config.in: Regenerate.
1454 * configure: Regenerate.
1455 * remote-utils.c (xml_escape_text): Delete.
1456 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1457 buffer_xml_printf): Move to common/buffer.c.
1458 * server.c (main): Remove call to initialize_inferiors.
1459 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1460 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1461 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1462 internal_error, gdb_assert, gdb_assert_fail): Delete.
1463 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1464 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1465 common/buffer.h.
1466 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1467 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1468 initialize_inferiors): Delete.
1469
1470 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1471
1472 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1473 symbol error.
1474
1475 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1476
1477 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1478 assertion.
1479 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1480
1481 2011-05-26 Yao Qi <yao@codesourcery.com>
1482
1483 * Makefile.in (thread-db.o): Track dependence to
1484 common/gdb_thread_db.h.
1485 * thread-db.c: include gdb_thread_db.h from right place.
1486
1487 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1488
1489 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1490 __FILE__ and __LINE__ to internal_error.
1491
1492 2011-05-13 Doug Evans <dje@google.com>
1493
1494 * thread-db.c (try_thread_db_load_from_sdir): New function.
1495 (try_thread_db_load_from_dir): New function.
1496 (thread_db_load_search): Handle $sdir, ignore $pdir.
1497 Remove trying of system directories if search of
1498 libthread-db-search-path fails, that is now done via $sdir.
1499
1500 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1501
1502 * server.c (handle_query): Add EnableDisableTracepoints to the list
1503 of supported features.
1504 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1505 tracepoints.
1506 (cmd_qtenable_disable): New.
1507 (cmd_qtstart): Install tracepoints even if disabled.
1508 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1509 receiving a QTEnable or QTDisable packet.
1510 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1511 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1512 tracepoints.
1513 (gdb_probe): Skip data collection if static tracepoint is disabled.
1514
1515 2011-05-10 Doug Evans <dje@google.com>
1516
1517 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1518
1519 2011-05-04 Doug Evans <dje@google.com>
1520
1521 * linux-low.c (linux_join): Skip process lookup.
1522 * spu-low.c (spu_join): Ditto.
1523 * server.c (join_inferiors_callback): Delete.
1524 (process_serial_event): For 'D' packet (detach) call join_inferior
1525 directly.
1526
1527 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1528
1529 * README: Don't mention xscale*-*-linux*.
1530 * configure.srv (xscale*-*-linux*): Don't handle target.
1531
1532 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1533
1534 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1535 casting pointers.
1536 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1537 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1538 (i386_emit_void_call_2): Likewise.
1539
1540 2011-04-26 Yao Qi <yao@codesourcery.com>
1541
1542 * linux-low.c: Move common macros to linux-ptrace.h.
1543 Include linux-ptrace.h.
1544 * Makefile.in (linux_ptrace_h): New.
1545 (linux-low.o): Depends on linux-ptrace.h.
1546
1547 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1548
1549 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1550 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1551 (remote_prepare): New function with most of the TCP code from ...
1552 (remote_open): ... here. Detect PORT here unconditionally. Move also
1553 setting transport_is_reliable.
1554 * server.c (run_once): New variable.
1555 (gdbserver_usage): Document it.
1556 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1557 the first run if RUN_ONCE.
1558 * server.h (run_once, remote_prepare): New declarations.
1559
1560 2011-04-19 Tom Tromey <tromey@redhat.com>
1561
1562 * win32-low.c (handle_load_dll): Remove duplicate "the".
1563
1564 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1565
1566 Remove support for old Cygwin 1.5 versions.
1567 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1568 function to avoid warning.
1569 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1570 warning.
1571
1572 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1573
1574 * gdbserver/server.h (Macro _): Define it if not available.
1575
1576 2011-03-14 Michael Snyder <msnyder@vmware.com>
1577
1578 * hostio.c (handle_close): Remove unnecessary null test.
1579
1580 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1581
1582 * Makefile.in (maintainer-clean realclean distclean): Remove
1583 "make ... subdir_do" command.
1584
1585 2011-03-10 Michael Snyder <msnyder@vmware.com>
1586
1587 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1588
1589 * server.c (handle_v_run): Free alloced buffer on early return.
1590
1591 2011-03-09 Yao Qi <yao@codesourcery.com>
1592
1593 Revert:
1594 2011-03-04 Yao Qi <yao@codesourcery.com>
1595
1596 * Makefile.in: Remove GNU make feature --directory.
1597
1598 2011-03-05 Yao Qi <yao@codesourcery.com>
1599
1600 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1601 (subdir_do): New make target. Copied from gdb/Makefile.
1602 (maintainer-clean, realclean, distclean, clean): Call corresponding
1603 make targets in common/Makefile.
1604
1605 2011-02-11 Yao Qi <yao@codesourcery.com>
1606
1607 * configure.ac: Call AC_PROG_RANLIB.
1608 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1609 * configure: Regenerate.
1610
1611 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1612
1613 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1614
1615 2011-03-06 Yao Qi <yao@codesourcery.com>
1616
1617 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1618
1619 2011-03-05 Yao Qi <yao@codesourcery.com>
1620
1621 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1622 (subdir_do): New make target. Copied from gdb/Makefile.
1623 (maintainer-clean, realclean, distclean, clean): Call corresponding
1624 make targets in common/Makefile.
1625
1626 2011-03-04 Yao Qi <yao@codesourcery.com>
1627
1628 * Makefile.in: Remove GNU make feature --directory.
1629
1630 2011-03-04 Michael Snyder <msnyder@vmware.com>
1631
1632 * server.c (queue_stop_reply): Call xmalloc not malloc.
1633
1634 2011-03-02 Michael Snyder <msnyder@vmware.com>
1635
1636 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1637
1638 2011-02-28 Michael Snyder <msnyder@vmware.com>
1639
1640 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1641 (cmd_qtframe): Ditto.
1642 (cmd_qtbuffer): Ditto.
1643 (cmd_bigqtbuffer): Ditto.
1644
1645 * utils.c (decimal2str): Initialize 'width' to nine, then
1646 don't mess with it.
1647
1648 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1649
1650 * hostio.c (require_data): Free *data, not data.
1651
1652 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1653
1654 * hostio.c (require_data): Use free, not xfree.
1655
1656 2011-02-27 Michael Snyder <msnyder@vmware.com>
1657
1658 * server.c (handle_query): Discard unused value.
1659
1660 * hostio.c (require_data): Free malloc memory before returning
1661 error.
1662
1663 2011-02-26 Michael Snyder <msnyder@vmware.com>
1664
1665 * linux-low.c (list_threads): Call closedir for dirent.
1666
1667 2011-02-27 Michael Snyder <msnyder@vmware.com>
1668
1669 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1670 a case statement falls through.
1671
1672 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1673
1674 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1675 in comparison.
1676
1677 2011-02-26 Michael Snyder <msnyder@vmware.com>
1678
1679 * utils.c (decimal2str): Eliminate dead code and dead param.
1680 (pulongest): Drop dead param from call to decimal2str.
1681 (plongest): Ditto.
1682
1683 2011-02-24 Joel Brobecker <brobecker@adacore.com>
1684
1685 Revert the following patch (not approved yet):
1686 2011-02-21 Hui Zhu <teawater@gmail.com>
1687 * tracepoint.c (tp_printf): New function.
1688 (eval_agent_expr): Handle gdb_agent_op_printf.
1689
1690 2011-02-21 Hui Zhu <teawater@gmail.com>
1691
1692 * tracepoint.c (tp_printf): New function.
1693 (eval_agent_expr): Handle gdb_agent_op_printf.
1694
1695 2011-02-18 Tom Tromey <tromey@redhat.com>
1696
1697 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1698 (tracepoint.o): Likewise.
1699 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1700 (gdb_agent_op_names): Likewise.
1701
1702 2011-02-18 Tom Tromey <tromey@redhat.com>
1703
1704 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1705 gdb_agent_op_rot>: New constants.
1706 (gdb_agent_op_names): Add pick and roll.
1707 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1708 cases.
1709
1710 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1711
1712 * aclocal.m4: Regenerated with aclocal-1.11.1.
1713
1714 2011-02-14 Pedro Alves <pedro@codesourcery.com>
1715
1716 * server.c (handle_qxfer_traceframe_info): New.
1717 (qxfer_packets): Register "traceframe-info".
1718 (handle_query): Report support for qXfer:traceframe-info:read+.
1719 * tracepoint.c (match_blocktype): New.
1720 (traceframe_find_block_type): Rename to ...
1721 (traceframe_walk_blocks): ... this. Add callback filter argument,
1722 and use it.
1723 (traceframe_find_block_type): New, reimplemented on top of
1724 traceframe_walk_blocks.
1725 (build_traceframe_info_xml): New.
1726 (traceframe_read_info): New.
1727 * server.h (traceframe_read_info): Declare.
1728
1729 2011-02-11 Yao Qi <yao@codesourcery.com>
1730
1731 * configure.ac: Call AC_PROG_RANLIB.
1732 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1733 * configure: Regenerate.
1734
1735 2011-02-07 Pedro Alves <pedro@codesourcery.com>
1736
1737 * server.c (gdb_read_memory): Change return semantics to allow
1738 partial transfers.
1739 (handle_search_memory_1): Adjust.
1740 (process_serial_event) <'m' packet>: Handle partial transfers.
1741 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1742
1743 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1744
1745 * regcache.c (init_register_cache): Initialize
1746 regcache->register_status.
1747 (free_register_cache): Release regcache->register_status.
1748 (regcache_cpy): Copy register_status.
1749 (registers_to_string): Print 'x's for unavailable registers.
1750 (supply_register): Mark the register's status valid or
1751 unavailable, depending on whether a buffer was passed in or not.
1752 (supply_register_zeroed): New.
1753 (supply_regblock): Mark the registers' status valid or
1754 unavailable, depending on whether a buffer was passed in or not.
1755 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1756 (struct regcache): New `register_status' field.
1757 (supply_register_zeroed): Declare.
1758 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1759 supply_register_zeroed, rather than passing a NULL buffer to
1760 supply_register.
1761 * tracepoint.c (fetch_traceframe_registers): Update comment.
1762
1763 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1764
1765 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1766 buffer explicit.
1767
1768 2011-01-25 Pedro Alves <pedro@codesourcery.com>
1769
1770 * server.h (decode_xfer_write): Change prototype.
1771 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1772 and don't extract the annex here.
1773 * server.c (decode_xfer_read): Remove `annex' parameter,
1774 and don't extract the annex here.
1775 (decode_xfer): New.
1776 (struct qxfer): New.
1777 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1778 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1779 (handle_qxfer_statictrace): New functions, abstracted out from
1780 handle_query, and made to use the struct qxfer interface.
1781 (handle_threads_qxfer_proper): Rename to ...
1782 (handle_qxfer_threads_proper): ... this.
1783 (handle_threads_qxfer): Rename to ...
1784 (handle_qxfer_threads): ... this. Adjust.
1785 (qxfer_packets): New array.
1786 (handle_qxfer): New function.
1787 (handle_query): Use handle_qxfer.
1788
1789 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1790
1791 * gdbreplay.c: Shorten lines of >= 80 columns.
1792 * linux-low.c: Ditto.
1793 * linux-ppc-low.c: Ditto.
1794 * linux-s390-low.c: Ditto.
1795 * linux-sparc-low.c: Ditto.
1796 * linux-x86-low.c: Ditto.
1797 * linux-xtensa-low.c: Ditto.
1798 * mem-break.c: Ditto.
1799 * nto-low.c: Ditto.
1800 * regcache.h: Ditto.
1801 * remote-utils.c: Ditto.
1802 * server.c: Ditto.
1803 * server.h: Ditto.
1804 * thread-db.c: Ditto.
1805 * tracepoint.c: Ditto.
1806 * utils.c: Ditto.
1807 * win32-low.h: Ditto.
1808
1809 2011-01-05 Joel Brobecker <brobecker@adacore.com>
1810
1811 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1812 update.
1813
1814 2011-01-01 Joel Brobecker <brobecker@adacore.com>
1815
1816 * server.c (gdbserver_version): Update copyright year in version
1817 output.
1818 * gdbreplay.c (gdbreplay_version): Ditto.
1819
1820 2010-12-29 Jie Zhang <jie.zhang@analog.com>
1821
1822 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1823 * linux-bfin-low.c: New file.
1824 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1825 PT_DATA_ADDR for BFIN targets.
1826 * Makefile.in (SFILES): Add linux-bfin-low.c.
1827 (clean): Remove reg-bfin.c.
1828 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1829 * README: Mention supported Blackfin targets.
1830
1831 2010-12-23 Mike Frysinger <vapier@gentoo.org>
1832
1833 * .gitignore: New file.
1834
1835 2010-11-16 Mike Frysinger <vapier@gentoo.org>
1836
1837 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1838
1839 2010-10-22 Jie Zhang <jie@codesourcery.com>
1840
1841 * Makefile.in: Add FLAGS_TO_PASS variable.
1842 (install): Remove dependency of install-only and recursively
1843 invoke make for install-only.
1844
1845 2010-10-04 Doug Evans <dje@google.com>
1846
1847 * Makefile.in (uninstall): Use $(DESTDIR).
1848
1849 2010-09-24 Pedro Alves <pedro@codesourcery.com>
1850
1851 PR gdb/11842
1852
1853 * linux-x86-low.c (compat_siginfo_from_siginfo)
1854 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1855 si_code is < 0. Check for si_code == SI_TIMER before checking for
1856 si_code < 0.
1857
1858 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1859
1860 * lynx-i386-low.c: New file.
1861 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1862
1863 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1864
1865 * lynx-low.c (ptrace_request_to_str): Remove handling for
1866 request values that have been removed in LynxOS 5.x.
1867
1868 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1869
1870 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1871 <ptrace.h>
1872
1873 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1874
1875 * configure.ac: Add --enable-inprocess-agent option.
1876 * configure: Rebuilt.
1877
1878 2010-09-06 Yao Qi <yao@codesourcery.com>
1879
1880 * linux-low.c (linux_kill): Remove unused variable.
1881 (linux_stabilize_threads): Likewise.
1882 * server.c (start_inferior): Likewise.
1883 (queue_stop_reply_callback): Likewise.
1884 * tracepoint.c (do_action_at_tracepoint): Likewise.
1885
1886 2010-09-06 Yao Qi <yao@codesourcery.com>
1887
1888 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1889 on return.
1890
1891 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1892
1893 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1894
1895 2010-09-06 Pedro Alves <pedro@codesourcery.com>
1896
1897 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1898 "$(IPA_DEPFILES)".
1899
1900 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1901
1902 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1903 gdbserver/lynx-ppc-low.c: New files.
1904 * Makefile.in (lynx_low_h): New variable.
1905 (lynx-low.o, lynx-ppc-low.o): New rules.
1906 * configure.ac: On LynxOS, link with -lnetinet.
1907 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1908 * configure: regenerate.
1909
1910 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1911
1912 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1913 * configure.ac: Add check for vasprintf and vsnprintf.
1914 * configure, config.in: Regenerate.
1915 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1916
1917 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1918
1919 * gdbreplay.c: Move include of alloca.h up, next to include of
1920 malloc.h.
1921 * server.h: Add include of malloc.h.
1922 * mem-break.c: Remove include of malloc.h.
1923 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1924
1925 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1926
1927 * Makefile.in (memmem.o): Build with -Wno-error.
1928
1929 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1930
1931 * utils.c (xsnprintf): Make non-static.
1932 * server.h: Add xsnprintf declaration.
1933 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1934 replace calls to snprintf by calls to xsnprintf throughout.
1935
1936 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1937
1938 * configure.ac: Add configure check for alloca.
1939 * configure, config.in: Regenerate.
1940 * server.h: Include alloca.h if it exists.
1941 * gdbreplay.c: Include alloca.h if it exists.
1942
1943 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1944
1945 * linux-low.c (__SIGRTMIN): Define if not already defined.
1946 (linux_create_inferior): Check for __ANDROID__ rather than
1947 __SIGRTMIN.
1948 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1949 are already deferred.
1950 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1951 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1952 stopped and already has a pending signal to report.
1953 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1954 a pending signal to report or is moving out of a jump pad.
1955 (linux_init_signals): Check for __ANDROID__ rather than
1956 __SIGRTMIN.
1957
1958 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1959
1960 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1961 debug_threads check. Avoid a linear search when not doing debug
1962 output.
1963
1964 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1965
1966 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1967 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1968 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1969 (process_event): Change local fd's type to gdb_fildes_t.
1970 (create_file_handler): Adjust prototype.
1971 (delete_file_handler): Adjust prototype.
1972 (handle_file_event): Adjust prototype. Use pfildes.
1973 (create_file_event): Adjsut prototype.
1974 * remote-utils.c (remote_desc, listen_desc): Change type to
1975 gdb_fildes_t.
1976 * server.h: New gdb_fildes_t typedef.
1977 [USE_WIN32API]: Include winsock2.h.
1978 (delete_file_handler, add_file_handler): Adjust prototypes.
1979 (pfildes): Declare.
1980 * utils.c (pfildes): New.
1981
1982 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1983
1984 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1985 * configure: Regenerate.
1986
1987 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1988
1989 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1990 (linux_done_accessing_memory): ... this.
1991 (linux_target_ops): Adjust.
1992 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1993 * nto-low.c (nto_target_ops): Adjust comment.
1994 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1995 * spu-low.c (spu_target_ops): Adjust comment.
1996 * target.h (target_ops): Rename unprepare_to_access_memory field
1997 to done_accessing_memory.
1998 (unprepare_to_access_memory): Rename to ...
1999 (done_accessing_memory): ... this.
2000
2001 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2002
2003 * linux-low.c (linux_prepare_to_access_memory): New.
2004 (linux_unprepare_to_access_memory): New.
2005 (linux_target_ops): Install them.
2006 * server.c (read_memory): Rename to ...
2007 (gdb_read_memory): ... this. Use
2008 prepare_to_access_memory/prepare_to_access_memory.
2009 (write_memory): Rename to ...
2010 (gdb_write_memory): ... this. Use
2011 prepare_to_access_memory/prepare_to_access_memory.
2012 (handle_search_memory_1): Adjust.
2013 (process_serial_event): Adjust.
2014 * target.h (struct target_ops): New fields
2015 prepare_to_access_memory and unprepare_to_access_memory.
2016 (prepare_to_access_memory, unprepare_to_access_memory): New.
2017 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2018 prepare_to_access_memory/prepare_to_access_memory.
2019 * nto-low.c (nto_target_ops): Adjust.
2020 * spu-low.c (spu_target_ops): Adjust.
2021 * win32-low.c (win32_target_ops): Adjust.
2022
2023 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2024
2025 * Makefile.in (WARN_CFLAGS): Get it from configure.
2026 (WERROR_CFLAGS): New.
2027 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2028 * configure.ac: Introduce --enable-werror, which adds -Werror to
2029 the compiler command line. Enabled by default. Disable with
2030 --disable-werror. Add -Wdeclaration-after-statement
2031 Wpointer-arith and -Wformat-nonliteral to warning flags.
2032 * configure: Regenerate.
2033
2034 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2035
2036 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2037
2038 2010-08-26 Pedro Alves <pedro@codesourcery.com>
2039
2040 * gdbreplay.c (remote_error): New.
2041 (gdbchar): New.
2042 (expect): Use gdbchar. Check for error reading from GDB.
2043 Clarify sync error output.
2044 (play): Check for errors writing to GDB.
2045 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2046 * remote-utils.c (getpkt): Check for errors writing to the remote
2047 descriptor.
2048
2049 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2050
2051 * linux-low.c (linux_wait_1): Move non-debugging code out of
2052 `debug_threads' control.
2053
2054 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2055
2056 * linux-low.c (linux_wait_1): Don't set last_status here.
2057 * server.c (push_event, queue_stop_reply_callback): Assert we're
2058 not pushing a TARGET_WAITKIND_IGNORE event.
2059 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2060 (myresume, handle_target_event): Set the thread's last_resume_kind
2061 and last_status from the target returned status.
2062
2063 2010-08-25 Pedro Alves <pedro@codesourcery.com>
2064
2065 PR threads/10729
2066
2067 * linux-x86-low.c (update_debug_registers_callback): New.
2068 (i386_dr_low_set_addr): Use it.
2069 (i386_dr_low_get_addr): New.
2070 (i386_dr_low_set_control): Use update_debug_registers_callback.
2071 (i386_dr_low_get_control): New.
2072 (i386_dr_low_get_status): Adjust.
2073 * linux-low.c (linux_stop_lwp): New.
2074 * linux-low.h (linux_stop_lwp): Declare.
2075
2076 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2077 argument instead of a i386_debug_reg_state.
2078 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2079 a i386_debug_reg_state.
2080 (i386_insert_aligned_watchpoint): Adjust.
2081 (i386_remove_aligned_watchpoint): Adjust.
2082 (i386_low_stopped_data_address): Read the debug registers from the
2083 inferior instead of from the mirrors.
2084 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2085 (i386_dr_low_get_addr): Declare.
2086 (i386_dr_low_get_control): Declare.
2087 (i386_dr_low_get_status): Change prototype.
2088
2089 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2090 (i386_dr_low_get_addr): New.
2091 (i386_dr_low_get_control): New.
2092 (i386_dr_low_get_status): Adjust prototype. Return
2093 dr_status_mirror.
2094 (i386_initial_stuff): Clear dr_status_mirror and
2095 dr_control_mirror.
2096 (i386_get_thread_context): Adjust.
2097 (i386_set_thread_context): Adjust.
2098 (i386_thread_added): Adjust.
2099
2100 2010-08-24 Pedro Alves <pedro@codesourcery.com>
2101
2102 * linux-low.h (linux_thread_area): Delete declaration.
2103
2104 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2105
2106 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2107 after its termination.
2108
2109 2010-08-09 Pedro Alves <pedro@codesourcery.com>
2110
2111 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2112 (gdb_wants_all_stopped): Delete.
2113 (linux_wait_1): Don't call them.
2114 * server.c (handle_v_cont): Tag all threads as want-stopped.
2115 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2116 stopped as "client-wants-stopped".
2117
2118 2010-07-31 Pedro Alves <pedro@codesourcery.com>
2119
2120 * Makefile.in (signals_h): New.
2121 (server_h): Depend on it.
2122 (server.o): Don't depend on $(signals_def).
2123 (signals.o): Depend on $(signals_def).
2124
2125 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2126
2127 * Makefile.in (signals_def): New.
2128 (server_h): Append include/gdb/signals.h and signals_def.
2129 (server.o): Append signals_def.
2130
2131 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2132
2133 * server.c (handle_target_event): Use target_signal_to_host for
2134 resume_info.sig initialization.
2135 * target.h (struct thread_resume) <sig>: New comment.
2136
2137 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2138
2139 * server.c (handle_query): strcpy() the returned string from paddress()
2140 instead of sprintf().
2141 * utils.c (paddress): Return phex_nz().
2142
2143 2010-07-07 Joel Brobecker <brobecker@adacore.com>
2144
2145 * server.c (handle_v_cont): Call mourn_inferior if process
2146 just exited.
2147 (myresume): Likewise.
2148
2149 2010-07-01 Pedro Alves <pedro@codesourcery.com>
2150
2151 Static tracepoints, and integration with UST.
2152
2153 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2154 * mem-break.c (uninsert_all_breakpoints)
2155 (reinsert_all_breakpoints): New.
2156 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2157 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2158 (gdb_agent_ust_loaded, helper_thread_id)
2159 (gdb_agent_helper_thread_id): New macros.
2160 (struct ipa_sym_addresses): Add addr_ust_loaded,
2161 addr_helper_thread_id, addr_cmd_buf.
2162 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2163 (in_process_agent_loaded_ust): New.
2164 (write_e_ust_not_loaded): New.
2165 (maybe_write_ipa_ust_not_loaded): New.
2166 (struct collect_static_trace_data_action): New.
2167 (enum tracepoint_type) <static_tracepoint>: New.
2168 (struct tracepoint) <handle>: Mention static tracepoints.
2169 (struct static_tracepoint_ctx): New.
2170 (CMD_BUF_SIZE): New.
2171 (add_tracepoint_action): Handle static tracepoint actions.
2172 (unprobe_marker_at): New.
2173 (clear_installed_tracepoints): Handle static tracepoints.
2174 (cmd_qtdp): Handle static tracepoints.
2175 (probe_marker_at): New.
2176 (cmd_qtstart): Handle static tracepoints.
2177 (response_tracepoint): Handle static tracepoints.
2178 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2179 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2180 (get_context_regcache): Handle static tracepoints.
2181 (do_action_at_tracepoint): Handle static tracepoint actions.
2182 (traceframe_find_block_type): Handle static trace data blocks.
2183 (traceframe_read_sdata): New.
2184 (download_tracepoints): Download static tracepoint actions.
2185 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2186 (GDB_PROBE_NAME): New.
2187 (ust_ops): New.
2188 (GET_UST_SYM): New.
2189 (USTF): New.
2190 (dlsym_ust): New.
2191 (ust_marker_to_static_tracepoint): New.
2192 (gdb_probe): New.
2193 (collect_ust_data_at_tracepoint): New.
2194 (gdb_ust_probe): New.
2195 (UNIX_PATH_MAX, SOCK_DIR): New.
2196 (gdb_ust_connect_sync_socket): New.
2197 (resume_thread, stop_thread): New.
2198 (run_inferior_command): New.
2199 (init_named_socket): New.
2200 (gdb_ust_socket_init): New.
2201 (cstr_to_hexstr): New.
2202 (next_st): New.
2203 (first_marker, next_marker): New.
2204 (response_ust_marker): New.
2205 (cmd_qtfstm, cmd_qtsstm): New.
2206 (unprobe_marker_at, probe_marker_at): New.
2207 (cmd_qtstmat, gdb_ust_thread): New.
2208 (gdb_ust_init): New.
2209 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2210 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2211 (ST_REGENTRY): New.
2212 (x86_64_st_collect_regmap): New.
2213 (X86_64_NUM_ST_COLLECT_GREGS): New.
2214 (AMD64_RIP_REGNUM): New.
2215 (supply_static_tracepoint_registers): New.
2216 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2217 (ST_REGENTRY): New.
2218 (i386_st_collect_regmap): New.
2219 (i386_NUM_ST_COLLECT_GREGS): New.
2220 (supply_static_tracepoint_registers): New.
2221 * server.c (handle_query): Handle qXfer:statictrace:read.
2222 <qSupported>: Report support for StaticTracepoints, and
2223 qXfer:statictrace:read features.
2224 * server.h (traceframe_read_sdata)
2225 (supply_static_tracepoint_registers): Declare.
2226 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2227 (unpack_varlen_hex): Include in IPA build.
2228 * Makefile.in (ustlibs, ustinc): New.
2229 (IPA_OBJS): Add remote-utils-ipa.o.
2230 ($(IPA_LIB)): Link -ldl and -lpthread.
2231 (UST_CFLAGS): New.
2232 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2233 * config.in, configure: Regenerate.
2234
2235 2010-06-20 Ian Lance Taylor <iant@google.com>
2236 Pedro Alves <pedro@codesourcery.com>
2237
2238 * linux-x86-low.c (always_true): Delete.
2239 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2240 trying to fool the compiler with always_true.
2241
2242 2010-06-20 Pedro Alves <pedro@codesourcery.com>
2243
2244 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2245 conditions in gdbserver.
2246
2247 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2248
2249 * spu-low.c (spu_read_memory): Wrap around local store limit.
2250 (spu_write_memory): Likewise.
2251
2252 2010-06-15 Pedro Alves <pedro@codesourcery.com>
2253
2254 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2255 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2256 LONGEST uses.
2257 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2258 uses.
2259 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2260 uses with LONGEST uses.
2261
2262 2010-06-14 Stan Shebs <stan@codesourcery.com>
2263 Pedro Alves <pedro@codesourcery.com>
2264
2265 Bytecode compiler.
2266
2267 * linux-x86-low.c: Include limits.h.
2268 (add_insns): New.
2269 (always_true): New.
2270 (EMIT_ASM): New.
2271 (EMIT_ASM32): New.
2272 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2273 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2274 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2275 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2276 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2277 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2278 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2279 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2280 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2281 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2282 (amd64_emit_void_call_2): New.
2283 (amd64_emit_ops): New.
2284 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2285 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2286 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2287 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2288 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2289 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2290 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2291 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2292 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2293 (i386_emit_stack_adjust, i386_emit_int_call_1)
2294 (i386_emit_void_call_2): New.
2295 (i386_emit_ops): New.
2296 (x86_emit_ops): New.
2297 (the_low_target): Install x86_emit_ops.
2298 * server.h (struct emit_ops): New.
2299 (get_raw_reg_func_addr): Declare.
2300 (current_insn_ptr, emit_error): Declare.
2301 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2302 (set_trace_state_variable_value): New defines.
2303 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2304 addr_get_trace_state_variable_value and
2305 addr_set_trace_state_variable_value.
2306 (symbol_list): New fields for get_raw_reg,
2307 get_trace_state_variable_value and set_trace_state_variable_value.
2308 (condfn): New typedef.
2309 (struct tracepoint): New field `compiled_cond'.
2310 (do_action_at_tracepoint): Clear compiled_cond.
2311 (get_trace_state_variable_value, set_trace_state_variable_value):
2312 Export in the IPA.
2313 (condition_true_at_tracepoint): If there's a compiled condition,
2314 run that.
2315 (current_insn_ptr, emit_error): New globals.
2316 (struct bytecode_address): New.
2317 (get_raw_reg_func_addr): New.
2318 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2319 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2320 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2321 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2322 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2323 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2324 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2325 (compile_tracepoint_condition, compile_bytecodes): New.
2326 * target.h (emit_ops): Forward declare.
2327 (struct target_ops): New field emit_ops.
2328 (target_emit_ops): New.
2329 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2330 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2331 * linux-low.c (linux_emit_ops): New.
2332 (linux_target_ops): Install it.
2333 * linux-low.h (struct linux_target_ops): New field emit_ops.
2334
2335 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2336
2337 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2338 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2339
2340 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2341 Stan Shebs <stan@codesourcery.com>
2342
2343 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2344 (all): Depend on $(extra_libraries).
2345 (install-only): Install the IPA.
2346 (IPA_OBJS, IPA_LIB): New.
2347 (clean): Remove the IPA lib.
2348 (IPAGENT_CFLAGS): New.
2349 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2350 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2351 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2352 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2353 * configure.ac: Check for atomic builtins support in the compiler.
2354 (IPA_DEPFILES, extra_libraries): Define.
2355 * configure.srv (ipa_obj): Add description.
2356 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2357 (i[34567]86-*-linux*): Set ipa_obj.
2358 (x86_64-*-linux*): Set ipa_obj.
2359 * linux-low.c (stabilizing_threads): New.
2360 (supports_fast_tracepoints): New.
2361 (linux_detach): Stabilize threads before detaching.
2362 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2363 the lwp is either not stabilizing, or is moving out of a jump pad.
2364 (linux_fast_tracepoint_collecting): New.
2365 (maybe_move_out_of_jump_pad): New.
2366 (enqueue_one_deferred_signal): New.
2367 (dequeue_one_deferred_signal): New.
2368 (linux_wait_for_event_1): If moving out of a jump pad, defer
2369 pending signals to later.
2370 (linux_stabilize_threads): New.
2371 (linux_wait_1): Check if threads need moving out of jump pads, and
2372 do it if so.
2373 (stuck_in_jump_pad_callback): New.
2374 (move_out_of_jump_pad_callback): New.
2375 (lwp_running): New.
2376 (linux_resume_one_lwp): Handle moving out of jump pads.
2377 (linux_set_resume_request): Dequeue deferred signals.
2378 (need_step_over_p): Also step over fast tracepoint jumps.
2379 (start_step_over): Also uninsert fast tracepoint jumps.
2380 (finish_step_over): Also reinsert fast tracepoint jumps.
2381 (linux_install_fast_tracepoint_jump): New.
2382 (linux_target_ops): Install linux_stabilize_threads and
2383 linux_install_fast_tracepoint_jump_pad.
2384 * linux-low.h (linux_target_ops) <get_thread_area,
2385 install_fast_tracepoint_jump_pad>: New fields.
2386 (struct lwp_info) <collecting_fast_tracepoint,
2387 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2388 (linux_get_thread_area): Declare.
2389 * linux-x86-low.c (jump_insn): New.
2390 (x86_get_thread_area): New.
2391 (append_insns): New.
2392 (push_opcode): New.
2393 (amd64_install_fast_tracepoint_jump_pad): New.
2394 (i386_install_fast_tracepoint_jump_pad): New.
2395 (x86_install_fast_tracepoint_jump_pad): New.
2396 (the_low_target): Install x86_get_thread_area and
2397 x86_install_fast_tracepoint_jump_pad.
2398 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2399 (struct fast_tracepoint_jump): New.
2400 (fast_tracepoint_jump_insn): New.
2401 (fast_tracepoint_jump_shadow): New.
2402 (find_fast_tracepoint_jump_at): New.
2403 (fast_tracepoint_jump_here): New.
2404 (delete_fast_tracepoint_jump): New.
2405 (set_fast_tracepoint_jump): New.
2406 (uninsert_fast_tracepoint_jumps_at): New.
2407 (reinsert_fast_tracepoint_jumps_at): New.
2408 (set_breakpoint_at): Use write_inferior_memory.
2409 (uninsert_raw_breakpoint): Use write_inferior_memory.
2410 (check_mem_read): Mask out fast tracepoint jumps.
2411 (check_mem_write): Mask out fast tracepoint jumps.
2412 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2413 (set_fast_tracepoint_jump): Declare.
2414 (delete_fast_tracepoint_jump)
2415 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2416 (reinsert_fast_tracepoint_jumps_at): Declare.
2417 * regcache.c: Don't compile many functions when building the
2418 in-process agent library.
2419 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2420 the register buffer in the heap.
2421 (free_register_cache): If the register buffer isn't owned by the
2422 regcache, don't free it.
2423 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2424 pre-existing register caches.
2425 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2426 type.
2427 (convert_ascii_to_int): : Constify `from' parameter type.
2428 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2429 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2430 the needed buffer in-place.
2431 (relocate_instruction): New.
2432 * server.c (handle_query) <qSymbols>: If the target supports
2433 tracepoints, give it a chance of looking up symbols. Report
2434 support for fast tracepoints.
2435 (handle_status): Stabilize threads.
2436 (process_serial_event): Adjust.
2437 * server.h (struct fast_tracepoint_jump): Forward declare.
2438 (struct process_info) <fast_tracepoint_jumps>: New field.
2439 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2440 (decode_X_packet, decode_M_packet): Adjust.
2441 (relocate_instruction): Declare.
2442 (in_process_agent_loaded): Declare.
2443 (tracepoint_look_up_symbols): Declare.
2444 (struct fast_tpoint_collect_status): Declare.
2445 (fast_tracepoint_collecting): Declare.
2446 (force_unlock_trace_buffer): Declare.
2447 (handle_tracepoint_bkpts): Declare.
2448 (initialize_low_tracepoint)
2449 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2450 * target.h (struct target_ops) <stabilize_threads,
2451 install_fast_tracepoint_jump_pad>: New fields.
2452 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2453 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2454 [HAVE_STDINT_H]: Include stdint.h.
2455 (trace_debug_1): Rename to ...
2456 (trace_vdebug): ... this.
2457 (trace_debug): Rename to ...
2458 (trace_debug_1): ... this. Add `level' parameter.
2459 (trace_debug): New.
2460 (ATTR_USED, ATTR_NOINLINE): New.
2461 (IP_AGENT_EXPORT): New.
2462 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2463 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2464 (about_to_request_buffer_space, trace_buffer_is_full)
2465 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2466 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2467 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2468 (traceframe_write_count, traceframes_created)
2469 (trace_state_variables)
2470 New renaming defines.
2471 (struct ipa_sym_addresses): New.
2472 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2473 (symbol_list): New.
2474 (ipa_sym_addrs): New.
2475 (all_tracepoint_symbols_looked_up): New.
2476 (in_process_agent_loaded): New.
2477 (write_e_ipa_not_loaded): New.
2478 (maybe_write_ipa_not_loaded): New.
2479 (tracepoint_look_up_symbols): New.
2480 (debug_threads) [IN_PROCESS_AGENT]: New.
2481 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2482 (UNKNOWN_SIDE_EFFECTS): New.
2483 (stop_tracing): New.
2484 (flush_trace_buffer): New.
2485 (stop_tracing_bkpt): New.
2486 (flush_trace_buffer_bkpt): New.
2487 (read_inferior_integer): New.
2488 (read_inferior_uinteger): New.
2489 (read_inferior_data_pointer): New.
2490 (write_inferior_data_pointer): New.
2491 (write_inferior_integer): New.
2492 (write_inferior_uinteger): New.
2493 (struct collect_static_trace_data_action): Delete.
2494 (enum tracepoint_type): New.
2495 (struct tracepoint) <type>: New field `type'.
2496 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2497 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2498 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2499 (tracepoints): Use IP_AGENT_EXPORT.
2500 (last_tracepoint): Don't include in the IPA.
2501 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2502 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2503 (alloced_trace_state_variables): New.
2504 (trace_state_variables): Use IP_AGENT_EXPORT.
2505 (traceframe_t): Delete unused variable.
2506 (circular_trace_buffer): Don't include in the IPA.
2507 (trace_buffer_start): Delete.
2508 (struct trace_buffer_control): New.
2509 (trace_buffer_free): Delete.
2510 (struct ipa_trace_buffer_control): New.
2511 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2512 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2513 New.
2514 (trace_buffer_ctrl): New.
2515 (TRACE_BUFFER_CTRL_CURR): New.
2516 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2517 Reimplement as macros.
2518 (trace_buffer_wrap): Delete.
2519 (traceframe_write_count, traceframe_read_count)
2520 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2521 (struct tracepoint_hit_ctx) <type>: New field.
2522 (struct fast_tracepoint_ctx): New.
2523 (memory_barrier): New.
2524 (cmpxchg): New.
2525 (record_tracepoint_error): Update atomically in the IPA.
2526 (clear_inferior_trace_buffer): New.
2527 (about_to_request_buffer_space): New.
2528 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2529 updating the same buffer.
2530 (add_tracepoint): Default the tracepoint's type to trap
2531 tracepoint, and orig_size to -1.
2532 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2533 internal variables.
2534 (create_trace_state_variable): New parameter `gdb'. Handle it.
2535 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2536 (cmd_qtdp): Handle fast tracepoints.
2537 (cmd_qtdv): Adjust.
2538 (max_jump_pad_size): New.
2539 (gdb_jump_pad_head): New.
2540 (get_jump_space_head): New.
2541 (claim_jump_space): New.
2542 (sort_tracepoints): New.
2543 (MAX_JUMP_SIZE): New.
2544 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2545 IPA.
2546 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2547 support. Upload fast traceframes, and delete internal IPA
2548 breakpoints.
2549 (stop_tracing_handler): New.
2550 (flush_trace_buffer_handler): New.
2551 (cmd_qtstop): Upload fast tracepoints.
2552 (response_tracepoint): Handle fast tracepoints.
2553 (tracepoint_finished_step): Upload fast traceframes. Set the
2554 tracepoint hit context's tracepoint type.
2555 (handle_tracepoint_bkpts): New.
2556 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2557 type. Add comment about fast tracepoints.
2558 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2559 non-existing action_str field.
2560 (get_context_regcache): Handle fast tracepoints.
2561 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2562 to the regcache.
2563 (fast_tracepoint_from_jump_pad_address): New.
2564 (fast_tracepoint_from_ipa_tpoint_address): New.
2565 (collecting_t): New.
2566 (force_unlock_trace_buffer): New.
2567 (fast_tracepoint_collecting): New.
2568 (collecting): New.
2569 (gdb_collect): New.
2570 (write_inferior_data_ptr): New.
2571 (target_tp_heap): New.
2572 (target_malloc): New.
2573 (download_agent_expr): New.
2574 (UALIGN): New.
2575 (download_tracepoints): New.
2576 (download_trace_state_variables): New.
2577 (upload_fast_traceframes): New.
2578 (IPA_FIRST_TRACEFRAME): New.
2579 (IPA_NEXT_TRACEFRAME_1): New.
2580 (IPA_NEXT_TRACEFRAME): New.
2581 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2582 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2583 (gdb_jump_pad_buffer_end): New.
2584 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2585 (initialize_tracepoint): Adjust.
2586 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2587 buffer. Initialize the low module.
2588 * utils.c (PREFIX, TOOLNAME): New.
2589 (malloc_failure): Use PREFIX.
2590 (error): In the IPA, an error causes an exit.
2591 (fatal, warning): Use PREFIX.
2592 (internal_error): Use TOOLNAME.
2593 (NUMCELLS): Increase to 10.
2594 * configure, config.in: Regenerate.
2595
2596 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2597
2598 * server.c (handle_query) <qSupported>: Do two passes over the
2599 qSupported string to avoid nesting strtok.
2600
2601 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2602
2603 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2604 (CDEPS): New.
2605 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2606 -Wl,--dynamic-list.
2607 * configure: Regenerate.
2608 * proc-service.list: New.
2609
2610 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2611
2612 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2613 New comment.
2614
2615 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2616
2617 * gdbreplay.c (remote_open): Check error return from socket() call by
2618 its equality to -1 not by it being negative.
2619 * remote-utils.c (remote_open): Likewise.
2620
2621 2010-05-23 Pedro Alves <pedro@codesourcery.com>
2622
2623 * config.h: Regenerate.
2624
2625 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2626
2627 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2628 doesn't provide PTRACE_GET_THREAD_AREA.
2629
2630 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2631
2632 * linux-m68k-low.c: Include <asm/ptrace.h>
2633 (ps_get_thread_area): Implement.
2634
2635 2010-05-03 Doug Evans <dje@google.com>
2636
2637 * event-loop.c (struct callback_event): New struct.
2638 (callback_list): New global.
2639 (append_callback_event, delete_callback_event): New functions.
2640 (process_callback): New function.
2641 (start_event_loop): Call it.
2642 * remote-utils.c (NOT_SCHEDULED): Define.
2643 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2644 moved out of readchar.
2645 (readchar): Rewrite. Call reschedule before returning.
2646 (reset_readchar): New function.
2647 (remote_close): Call it.
2648 (process_remaining, reschedule): New functions.
2649 * server.h (callback_handler_func): New typedef.
2650 (append_callback_event, delete_callback_event): Declare.
2651
2652 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2653
2654 * proc-service.c (ps_pglobal_lookup): Use
2655 thread_db_look_up_one_symbol.
2656 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2657 parameter. Use it instead of all_symbols_looked_up.
2658 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2659 field.
2660 (all_symbols_looked_up): Don't declare.
2661 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2662 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2663 field.
2664 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2665 Set all_symbols_looked_up here.
2666 (thread_db_look_up_one_symbol): New.
2667 (thread_db_get_tls_address): Adjust.
2668 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2669 thread_db object on the heap, and tentatively set it in the
2670 process structure.
2671 (thread_db_init): Don't set all_symbols_looked_up here.
2672 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2673
2674 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2675
2676 * linux-low.c (linux_kill, linux_detach): Adjust.
2677 (status_pending_p_callback): Remove redundant statement. Check
2678 for !TARGET_WAITIKIND_IGNORE, instead of
2679 TARGET_WAITKIND_STOPPED.
2680 (handle_tracepoints): Make sure LWP is locked. Adjust.
2681 (linux_wait_for_event_1): Adjust.
2682 (linux_cancel_breakpoints): New.
2683 (unsuspend_one_lwp): New.
2684 (unsuspend_all_lwps): New.
2685 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2686 (send_sigstop_callback): Change return type to int, add new
2687 `except' parameter and handle it.
2688 (suspend_and_send_sigstop_callback): New.
2689 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2690 pass them down. If SUSPEND, also increment the lwp's suspend
2691 count.
2692 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2693 (need_step_over_p): Don't consider suspended LWPs.
2694 (start_step_over): Adjust.
2695 (proceed_one_lwp): Change return type to int, add new `except'
2696 parameter and handle it.
2697 (unsuspend_and_proceed_one_lwp): New.
2698 (proceed_all_lwps): Use find_inferior instead of
2699 for_each_inferior.
2700 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2701 also decrement the suspend count of LWPs. Pass `except' down,
2702 instead of hacking its suspend count.
2703 (linux_pause_all): Add `freeze' parameter. Adjust.
2704 (linux_unpause_all): New.
2705 (linux_target_ops): Install linux_unpause_all.
2706 * server.c (handle_status): Adjust.
2707 * target.h (struct target_ops): New fields `unpause_all' and
2708 `cancel_breakpoints'. Add new parameter to `pause_all'.
2709 (pause_all): Add new `freeze' parameter.
2710 (unpause_all): New.
2711 (cancel_breakpoints): New.
2712 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2713 cancel breakpoints.
2714 (cmd_qtstart): Pause threads.
2715 (stop_tracing): Pause threads, and cancel breakpoints.
2716 * win32-low.c (win32_target_ops): Adjust.
2717
2718 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2719
2720 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2721 the inferior right away from here...
2722 (linux_wait_1): ... to here, and adjust to check the thread's
2723 last_resume_kind instead of the lwp's step or stop_expected flags.
2724
2725 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2726
2727 * README: Use consistent `GDB' and `GDBserver' spellings.
2728
2729 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2730
2731 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2732 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2733 (linux_detach_one_lwp): Assume the lwp is stopped.
2734 (any_thread_of): Delete.
2735 (linux_detach): Stop all lwps here. Don't blindly delete all
2736 breakpoints.
2737 (delete_lwp_callback): New.
2738 (linux_mourn): Delete all lwps of the process that is gone.
2739 (linux_wait_1): Don't delete the last lwp of the process here.
2740 * mem-break.h (mark_breakpoints_out): Declare.
2741 * mem-break.c (mark_breakpoints_out): New.
2742 (free_all_breakpoints): Use it.
2743 * server.c (handle_target_event): If the process is gone, mark
2744 breakpoints out.
2745 * thread-db.c (struct thread_db) <create_bp>: New field.
2746 (thread_db_enable_reporting): Fix prototype. Store a thread event
2747 breakpoint reference in the thread_db struct.
2748 (thread_db_load_search): Clear the thread_db object.
2749 (try_thread_db_load_1): Ditto.
2750 (switch_to_process): New.
2751 (disable_thread_event_reporting): Use it.
2752 (remove_thread_event_breakpoints): New.
2753 (thread_db_detach, thread_db_mourn): Use it.
2754
2755 2010-05-01 Pedro Alves <pedro@codesourcery.com>
2756
2757 * linux-low.c (linux_enable_event_reporting): New.
2758 (linux_wait_for_event_1, handle_extended_wait): Use it.
2759
2760 2010-04-30 Pedro Alves <pedro@codesourcery.com>
2761
2762 * linux-low.c (linux_kill_one_lwp, linux_kill)
2763 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2764 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2765 SIGSTOP even if the LWP is stopped.
2766 (send_sigstop_callback): New.
2767 (stop_all_lwps): Use send_sigstop_callback instead.
2768 (linux_resume_one_thread): Adjust.
2769 (proceed_one_lwp): Still proceed an LWP that the client has
2770 requested to stop, if we haven't reported it as stopped yet. Make
2771 sure that LWPs the client want stopped, have a pending SIGSTOP.
2772
2773 2010-04-26 Doug Evans <dje@google.com>
2774
2775 * server.c (handle_general_set): Make static.
2776
2777 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2778 Print received char after testing for error/eof instead of before.
2779 (input_interrupt): Tweak comment.
2780
2781 2010-04-23 Doug Evans <dje@google.com>
2782
2783 * server.c (start_inferior): Print inferior argv if --debug.
2784
2785 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2786
2787 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2788 * nto-x86-low.c: Include server.h
2789
2790 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2791
2792 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2793 be consistent with other sources of this directory.
2794 (init_registers_amd64): Correct name of source file of this function
2795 in the comment.
2796
2797 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2798
2799 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2800 64-bit executables.
2801
2802 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2803
2804 * win32-i386-low.c: Add 64-bit support.
2805 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2806 (init_registers_amd64): Declare.
2807 (mappings): Add 64-bit version of array.
2808 (init_windows_x86): New function.
2809 (the_low_target): Change init_arch field to init_windows_x86.
2810
2811 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2812
2813 * win32-low.c: Adapt to support also 64-bit architecture.
2814 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2815 (get_image_name): Use SIZE_T type for local variable `done'.
2816 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2817 (toolhelp_get_dll_name): Idem.
2818 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2819 Use uintptr_t typecast to avoid warning.
2820 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2821 (handle_exception): Use phex_nz to avoid warning.
2822 (win32_wait): Remove unused local variable `process'.
2823
2824 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2825
2826 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2827 `amd64-avx.o'.
2828
2829 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2830
2831 * configure.ac: Use `ws2_32' library for srv_mingw.
2832 * configure: Regenerate.
2833 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2834 * remote-utils.c: Likewise.
2835
2836 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2837
2838 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2839 if __x86_64__ is defined.
2840
2841 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2842
2843 * configure: Regenerate.
2844
2845 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2846
2847 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2848 * target.h (target_ops): New get_tib_address field.
2849 * win32-low.h (win32_thread_info): Add thread_local_base field.
2850 * win32-low.c (child_add_thread): Add tlb argument.
2851 Set thread_local_base field to TLB.
2852 (get_child_debug_event): Adapt to child_add_thread change.
2853 (win32_get_tib_address): New function.
2854 (win32_target_ops): Set get_tib_address field to
2855 win32_get_tib_address.
2856 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2857
2858 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2859
2860 * linux-low.c (linux_mourn): Also remove the process.
2861 * server.c (handle_target_event): Don't remove the process here.
2862 * nto-low.c (nto_mourn): New.
2863 (nto_target_ops): Install it.
2864 * spu-low.c (spu_mourn): New.
2865 (spu_target_ops): Install it.
2866 * win32-low.c (win32_mourn): New.
2867 (win32_target_ops): Install it.
2868
2869 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2870
2871 * server.h (buffer_xml_printf): Remove redundant `;'.
2872
2873 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2874
2875 * regcache.c (set_register_cache): Invalidate regcaches before
2876 changing the register cache layout.
2877 (regcache_invalidate_one): Allow a NULL regcache.
2878 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2879 regcaches before changing the register cache layout or the target
2880 regsets.
2881
2882 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2883
2884 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2885 variable warning on Linux/x86-64.
2886
2887 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2888
2889 GDBserver disconnected tracing support.
2890
2891 * linux-low.c (linux_remove_process): Delete.
2892 (add_lwp): Don't set last_resume_kind here.
2893 (linux_kill): Use `mourn'.
2894 (linux_detach): Use `thread_db_detach', and `mourn'.
2895 (linux_mourn): New.
2896 (linux_attach_lwp_1): Adjust comment.
2897 (linux_attach): last_resume_kind moved the thread_info; adjust.
2898 (status_pending_p_callback): Adjust.
2899 (linux_wait_for_event_1): Adjust.
2900 (count_events_callback, select_singlestep_lwp_callback)
2901 (select_event_lwp_callback, cancel_breakpoints_callback)
2902 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2903 (proceed_one_lwp): Adjust.
2904 (linux_async): Add debug output.
2905 (linux_thread_stopped): New.
2906 (linux_pause_all): New.
2907 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2908 linux_pause_all.
2909 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2910 (thread_db_free): Delete declaration.
2911 (thread_db_detach, thread_db_mourn): Declare.
2912 * thread-db.c (thread_db_init): Use thread_db_mourn.
2913 (thread_db_free): Delete, split in two.
2914 (disable_thread_event_reporting): New.
2915 (thread_db_detach): New.
2916 (thread_db_mourn): New.
2917
2918 * server.h (struct thread_info) <last_resume_kind>: New field.
2919 <attached>: Add comment.
2920 <gdb_detached>: New field.
2921 (handler_func): Change return type to int.
2922 (handle_serial_event, handle_target_event): Ditto.
2923 (gdb_connected): Declare.
2924 (tracing): Delete.
2925 (disconnected_tracing): Declare.
2926 (stop_tracing): Declare.
2927
2928 * server.c (handle_query) <qSupported>: Report support for
2929 disconnected tracing.
2930 (queue_stop_reply_callback): Account for running threads.
2931 (gdb_wants_thread_stopped): New.
2932 (gdb_wants_all_threads_stopped): New.
2933 (gdb_reattached_process): New.
2934 (handle_status): Clear the `gdb_detached' flag of all processes.
2935 In all-stop, stop all threads.
2936 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2937 (process_serial_event): If the remote connection breaks, or if an
2938 exit was forced with "monitor exit", force an event loop exit.
2939 Handle disconnected tracing on detach.
2940 (handle_serial_event): Adjust.
2941 (handle_target_event): If GDB isn't connected, forward events back
2942 to the inferior, unless the last process exited, in which case,
2943 exit gdbserver. Adjust interface.
2944
2945 * remote-utils.c (remote_open): Don't block in accept. Instead
2946 register an event loop source on the listen socket file
2947 descriptor. Refactor bits into ...
2948 (listen_desc): ... this new global.
2949 (gdb_connected): ... this new function.
2950 (enable_async_notification): ... this new function.
2951 (handle_accept_event): ... this new function.
2952 (remote_close): Clear remote_desc.
2953
2954 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2955
2956 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2957 New fields.
2958 (mourn_inferior): Define.
2959 (target_process_qsupported): Avoid the dangling else problem.
2960 (thread_stopped): Define.
2961 (pause_all): Define.
2962 (target_waitstatus_to_string): Declare.
2963 * target.c (target_waitstatus_to_string): New.
2964
2965 * tracepoint.c (tracing): Make extern.
2966 (disconnected_tracing): New.
2967 (stop_tracing): Make extern. Handle tracing stops due to GDB
2968 disconnecting.
2969 (cmd_qtdisconnected): New.
2970 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2971 (handle_tracepoint_general_set): Handle QTDisconnected.
2972
2973 * event-loop.c (event_handler_func): Change return type to int.
2974 (process_event): Bail out if the event handler wants the event
2975 loop to stop.
2976 (handle_file_event): Ditto.
2977 (start_event_loop): Bail out if the event handler wants the event
2978 loop to stop.
2979
2980 * nto-low.c (nto_target_ops): Adjust.
2981 * spu-low.c (spu_wait): Don't remove the process here.
2982 (spu_target_ops): Adjust.
2983 * win32-low.c (win32_wait): Don't remove the process here.
2984 (win32_target_ops): Adjust.
2985
2986 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2987
2988 * regcache.c (realloc_register_cache): Invalidate inferior's
2989 regcache before recreating it.
2990
2991 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2992
2993 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2994
2995 2010-04-09 Stan Shebs <stan@codesourcery.com>
2996 Pedro Alves <pedro@codesourcery.com>
2997
2998 * server.h (LONGEST): New.
2999 (struct thread_info) <while_stepping>: New field.
3000 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3001 Declare.
3002 (initialize_tracepoint, handle_tracepoint_general_set)
3003 (handle_tracepoint_query, tracepoint_finished_step)
3004 (tracepoint_was_hit, release_while_stepping_state_list):
3005 (current_traceframe): Declare.
3006 * server.c (handle_general_set): Handle tracepoint packets.
3007 (read_memory): New.
3008 (write_memory): New.
3009 (handle_search_memory_1): Use read_memory.
3010 (handle_query): Report support for conditional tracepoints, trace
3011 state variables, and tracepoint sources. Handle tracepoint
3012 queries.
3013 (main): Initialize the tracepoints module.
3014 (process_serial_event): Handle traceframe reads/writes.
3015
3016 * linux-low.c (handle_tracepoints): New.
3017 (linux_wait_1): Call it.
3018 (linux_resume_one_lwp): Handle while-stepping.
3019 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3020 (linux_target_ops): Install them.
3021 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3022 New field.
3023 * linux-x86-low.c (x86_supports_tracepoints): New.
3024 (the_low_target). Install it.
3025
3026 * mem-break.h (delete_breakpoint): Declare.
3027 * mem-break.c (delete_breakpoint): Make external.
3028
3029 * target.h (struct target_ops): Add `supports_tracepoints',
3030 `read_pc', and `write_pc' fields.
3031 (target_supports_tracepoints): Define.
3032 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3033 (phex_nz): New.
3034
3035 * regcache.h (struct regcache) <registers_owned>: New field.
3036 (init_register_cache, regcache_cpy): Declare.
3037 (regcache_read_pc, regcache_write_pc): Declare.
3038 (register_cache_size): Declare.
3039 (supply_regblock): Declare.
3040 * regcache.c (init_register_cache): New.
3041 (new_register_cache): Use it.
3042 (regcache_cpy): New.
3043 (register_cache_size): New.
3044 (supply_regblock): New.
3045 (regcache_read_pc, regcache_write_pc): New.
3046
3047 * tracepoint.c: New.
3048
3049 * Makefile.in (OBS): Add tracepoint.o.
3050 (tracepoint.o): New rule.
3051
3052 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3053
3054 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3055 (i386-mmx.o): New.
3056 (i386-mmx.c): Likewise.
3057 (i386-mmx-linux.o): Likewise.
3058 (i386-mmx-linux.c): Likewise.
3059
3060 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3061 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3062 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3063 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3064
3065 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3066 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3067 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3068
3069 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3070
3071 * Makefile.in (clean): Updated.
3072 (i386-avx.o): New.
3073 (i386-avx.c): Likewise.
3074 (i386-avx-linux.o): Likewise.
3075 (i386-avx-linux.c): Likewise.
3076 (amd64-avx.o): Likewise.
3077 (amd64-avx.c): Likewise.
3078 (amd64-avx-linux.o): Likewise.
3079 (amd64-avx-linux.c): Likewise.
3080
3081 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3082 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3083 (srv_amd64_regobj): Add amd64-avx.o.
3084 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3085 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3086 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3087 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3088 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3089 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3090 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3091
3092 * i387-fp.c: Include "i386-xstate.h".
3093 (i387_xsave): New.
3094 (i387_cache_to_xsave): Likewise.
3095 (i387_xsave_to_cache): Likewise.
3096 (x86_xcr0): Likewise.
3097
3098 * i387-fp.h (i387_cache_to_xsave): Likewise.
3099 (i387_xsave_to_cache): Likewise.
3100 (x86_xcr0): Likewise.
3101
3102 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3103 * linux-crisv32-low.c (target_regsets): Likewise.
3104 * linux-m68k-low.c (target_regsets): Likewise.
3105 * linux-mips-low.c (target_regsets): Likewise.
3106 * linux-ppc-low.c (target_regsets): Likewise.
3107 * linux-s390-low.c (target_regsets): Likewise.
3108 * linux-sh-low.c (target_regsets): Likewise.
3109 * linux-sparc-low.c (target_regsets): Likewise.
3110 * linux-xtensa-low.c (target_regsets): Likewise.
3111
3112 * linux-low.c: Include <sys/uio.h>.
3113 (regsets_fetch_inferior_registers): Support nt_type.
3114 (regsets_store_inferior_registers): Likewise.
3115 (linux_process_qsupported): New.
3116 (linux_target_ops): Add linux_process_qsupported.
3117
3118 * linux-low.h (regset_info): Add nt_type.
3119 (linux_target_ops): Add process_qsupported.
3120
3121 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3122 and <sys/uio.h>.
3123 (init_registers_i386_avx_linux): New.
3124 (init_registers_amd64_avx_linux): Likewise.
3125 (xmltarget_i386_linux_no_xml): Likewise.
3126 (xmltarget_amd64_linux_no_xml): Likewise.
3127 (PTRACE_GETREGSET): Likewise.
3128 (PTRACE_SETREGSET): Likewise.
3129 (x86_fill_xstateregset): Likewise.
3130 (x86_store_xstateregset): Likewise.
3131 (use_xml): Likewise.
3132 (x86_linux_update_xmltarget): Likewise.
3133 (x86_linux_process_qsupported): Likewise.
3134 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3135 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3136 init_registers_i386_linux here. Call
3137 x86_linux_update_xmltarget.
3138 (the_low_target): Add x86_linux_process_qsupported.
3139
3140 * server.c (handle_query): Call target_process_qsupported.
3141
3142 * target.h (target_ops): Add process_qsupported.
3143 (target_process_qsupported): New.
3144
3145 2010-04-03 Pedro Alves <pedro@codesourcery.com>
3146
3147 * inferiors.c (add_thread): Set last_status kind to
3148 TARGET_WAITKIND_IGNORE.
3149 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3150 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3151 (linux_wait_1): Move `thread' local definition to block that uses
3152 it. Don't NULL initialize `event_child'.
3153 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3154 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3155 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3156
3157 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3158
3159 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3160 an extended waitstatus, or by a watchpoint.
3161 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3162 thread was stepping or has been stopped by a watchpoint.
3163
3164 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3165
3166 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3167 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3168 of another, then delete the previous, and validate all
3169 breakpoints.
3170 (validate_inserted_breakpoint): New.
3171 (delete_disabled_breakpoints): New.
3172 (validate_breakpoints): New.
3173 (check_mem_read): Validate breakpoints before trusting their
3174 shadow. Delete disabled breakpoints.
3175 (check_mem_write): Validate breakpoints before trusting they
3176 should be inserted. Delete disabled breakpoints.
3177 * mem-break.h (validate_breakpoints):
3178 * server.c (handle_query): Validate breakpoints when we see a
3179 qSymbol query.
3180
3181 2010-04-01 Pedro Alves <pedro@codesourcery.com>
3182
3183 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3184 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3185 if we could tell there's a GDB breakpoint at stop_pc.
3186 (need_step_over_p): Don't do a step over if we find a GDB
3187 breakpoint at the resume PC.
3188
3189 * mem-break.c (struct raw_breakpoint): New.
3190 (enum bkpt_type): New type `gdb_breakpoint'.
3191 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3192 fields. New field `raw'.
3193 (find_raw_breakpoint_at): New.
3194 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3195 breakpoint instead.
3196 (set_breakpoint_at): Adjust.
3197 (delete_raw_breakpoint): New.
3198 (release_breakpoint): New.
3199 (delete_breakpoint): Rename to...
3200 (delete_breakpoint_1): ... this. Add proc parameter. Use
3201 release_breakpoint. Return ENOENT.
3202 (delete_breakpoint): Reimplement.
3203 (find_breakpoint_at): Delete.
3204 (find_gdb_breakpoint_at): New.
3205 (delete_breakpoint_at): Delete.
3206 (set_gdb_breakpoint_at): New.
3207 (delete_gdb_breakpoint_at): New.
3208 (gdb_breakpoint_here): New.
3209 (set_reinsert_breakpoint): Use release_breakpoint.
3210 (uninsert_breakpoint): Rename to ...
3211 (uninsert_raw_breakpoint): ... this.
3212 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3213 (reinsert_raw_breakpoint): Change parameter type to
3214 raw_breakpoint.
3215 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3216 instead.
3217 (check_breakpoints): Adjust. Use release_breakpoint.
3218 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3219 (breakpoint_inserted_here): Ditto.
3220 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3221 Don't trust the breakpoint's shadow if it is not inserted.
3222 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3223 (delete_all_breakpoints): Adjust.
3224 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3225 use delete_breakpoint_1.
3226
3227 * mem-break.h (breakpoints_supported): Delete declaration.
3228 (set_gdb_breakpoint_at): Declare.
3229 (gdb_breakpoint_here): Declare.
3230 (delete_breakpoint_at): Delete.
3231 (delete_gdb_breakpoint_at): Declare.
3232
3233 * server.h (struct raw_breakpoint): Forward declare.
3234 (struct process_info): New field `raw_breakpoints'.
3235
3236 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3237 breakpoints.
3238
3239 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3240
3241 * linux-low.c (status_pending_p_callback): Fix comment.
3242 (linux_wait_for_event_1): Move most of the internal breakpoint
3243 handling from here...
3244 (linux_wait_1): ... to here.
3245 (count_events_callback): New.
3246 (select_singlestep_lwp_callback): New.
3247 (select_event_lwp_callback): New.
3248 (cancel_breakpoints_callback): New.
3249 (select_event_lwp): New.
3250 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3251 priority to all LWPs that have had events that should be reported
3252 to the client. Cancel breakpoints when about to reporting the
3253 event to the client, not while stopping lwps. No longer cancel
3254 finished single-steps here.
3255 (cancel_finished_single_step): Delete.
3256 (cancel_finished_single_steps): Delete.
3257
3258 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3259
3260 * mem-break.c (enum bkpt_type): New.
3261 (struct breakpoint): New field `type'.
3262 (set_breakpoint_at): Change return type to struct breakpoint
3263 pointer. Set type to `other_breakpoint' by default.
3264 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3265 in the breakpoint list.
3266 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3267 (reinsert_breakpoint): Rename to ...
3268 (reinsert_raw_breakpoint): ... this.
3269 (reinsert_breakpoints_at): Adjust.
3270 * mem-break.h (struct breakpoint): Declare.
3271 (set_breakpoint_at): Change return type to struct breakpoint
3272 pointer.
3273
3274 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3275
3276 * server.c (handle_query): Assign, not compare.
3277
3278 2010-03-24 Pedro Alves <pedro@codesourcery.com>
3279
3280 Teach linux gdbserver to step-over-breakpoints.
3281
3282 * linux-low.c (can_hardware_single_step): New.
3283 (supports_breakpoints): New.
3284 (handle_extended_wait): If stopping threads, read the stop pc of
3285 the new cloned LWP.
3286 (get_pc): New.
3287 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3288 low target doesn't support retrieving the PC.
3289 (add_lwp): Set last_resume_kind to resume_continue.
3290 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3291 (linux_attach): Don't clear stop_expected. Set the lwp's
3292 last_resume_kind to resume_stop.
3293 (linux_detach_one_lwp): Don't check for removed breakpoints.
3294 (check_removed_breakpoint): Delete.
3295 (status_pending_p): Rename to ...
3296 (status_pending_p_callback): ... this. Don't check for removed
3297 breakpoints. Don't consider threads that are stopped from GDB's
3298 perspective.
3299 (linux_wait_for_lwp): Always read the stop_pc here.
3300 (cancel_breakpoint): New.
3301 (step_over_bkpt): New global.
3302 (linux_wait_for_event_1): Implement stepping over breakpoints.
3303 (gdb_wants_lwp_stopped): New.
3304 (gdb_wants_all_stopped): New.
3305 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3306 single-step traps here. Store the thread's last reported target
3307 wait status.
3308 (send_sigstop): Don't clear stop_expected. Always set it,
3309 instead.
3310 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3311 (cancel_finished_single_step): New.
3312 (cancel_finished_single_steps): New.
3313 (wait_for_sigstop): Don't cancel finished single-step traps here.
3314 (linux_resume_one_lwp): Don't check for removed breakpoints.
3315 Don't set `step' on non-hardware step archs.
3316 (linux_set_resume_request): Ignore resume_stop requests if already
3317 stopping or stopped. Set the lwp's last_resume_kind.
3318 (resume_status_pending_p): Don't check for removed breakpoints.
3319 (need_step_over_p): New.
3320 (start_step_over): New.
3321 (finish_step_over): New.
3322 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3323 requests. Clear the thread's last reported target waitstatus.
3324 Don't use the `suspended' flag. Don't consider pending breakpoints.
3325 (linux_resume): Start a step-over if necessary.
3326 (proceed_one_lwp): New.
3327 (proceed_all_lwps): New.
3328 (unstop_all_lwps): New.
3329 * linux-low.h (struct lwp_info): Rewrite comment for the
3330 `suspended' flag. Add the `stop_pc' field. Delete the
3331 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3332 Add `'last_resume_kind' and `need_step_over' fields.
3333 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3334 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3335 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3336 (set_raw_breakpoint_at): New.
3337 (set_breakpoint_at): Rewrite to use it.
3338 (reinsert_breakpoint_handler): Delete.
3339 (set_reinsert_breakpoint): New.
3340 (reinsert_breakpoint_by_bp): Delete.
3341 (delete_reinsert_breakpoints): New.
3342 (uninsert_breakpoint): Rewrite.
3343 (uninsert_breakpoints_at): New.
3344 (reinsert_breakpoint): Rewrite.
3345 (reinsert_breakpoints_at): New.
3346 (check_breakpoints): Rewrite.
3347 (breakpoint_here): New.
3348 (breakpoint_inserted_here): New.
3349 (check_mem_read): Adjust.
3350 * mem-break.h (breakpoints_supported, breakpoint_here)
3351 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3352 (reinsert_breakpoint_by_bp): Delete declaration.
3353 (delete_reinsert_breakpoints): Declare.
3354 (reinsert_breakpoint): Delete declaration.
3355 (reinsert_breakpoints_at): Declare.
3356 (uninsert_breakpoint): Delete declaration.
3357 (uninsert_breakpoints_at): Declare.
3358 (check_breakpoints): Adjust prototype.
3359 * server.h: Adjust include order.
3360 (struct thread_info): Declare here. Add a `last_status' field.
3361
3362 2010-03-23 Michael Snyder <msnyder@vmware.com>
3363
3364 * server.c (crc32): New function.
3365 (handle_query): Add handling for 'qCRC:' request.
3366
3367 2010-03-23 Pedro Alves <pedro@codesourcery.com>
3368
3369 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3370 lwp had been stopped by a watchpoint.
3371
3372 2010-03-16 Pedro Alves <pedro@codesourcery.com>
3373
3374 * server.h (internal_error): Declare.
3375 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3376 * utils.c (internal_error): New function.
3377
3378 2010-03-15 Andreas Schwab <schwab@redhat.com>
3379
3380 * configure.srv: Fix typo setting srv_regobj.
3381
3382 2010-03-15 Pedro Alves <pedro@codesourcery.com>
3383
3384 * linux-low.c (fetch_register): Avoid passing a non string literal
3385 format to `error'.
3386 (usr_store_inferior_registers): Ditto.
3387
3388 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3389
3390 * linux-low.c (linux_write_memory): Bail out early if peeking
3391 memory failed.
3392
3393 2010-03-14 Pedro Alves <pedro@codesourcery.com>
3394
3395 * linux-low.h (struct lwp_info): New fields
3396 `stopped_by_watchpoint' and `stopped_data_address'.
3397 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3398 here, and cache them in the lwp object.
3399 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3400 directly.
3401 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3402 field.
3403 (linux_stopped_by_watchpoint): Rewrite.
3404 (linux_stopped_data_address): Rewrite.
3405
3406 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3407
3408 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3409 switching the current inferior, not before.
3410
3411 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3412
3413 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3414 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3415 i386-linux.c and amd64-linux.c.
3416 (reg-i386.o): Removed.
3417 (reg-i386.c): Likewise.
3418 (reg-i386-linux.o): Likewise.
3419 (reg-i386-linux.c): Likewise.
3420 (reg-x86-64.o): Likewise.
3421 (reg-x86-64.c): Likewise.
3422 (reg-x86-64-linux.o): Likewise.
3423 (reg-x86-64-linux.c): Likewise.
3424 (i386.o): New.
3425 (i386.c): Likewise.
3426 (i386-linux.o): Likewise.
3427 (i386-linux.c): Likewise.
3428 (amd64.o): Likewise.
3429 (amd64.c): Likewise.
3430 (amd64-linux.o): Likewise.
3431 (amd64-linux.c): Likewise.
3432
3433 * configure.srv (srv_i386_regobj): New.
3434 (srv_i386_linux_regobj): Likewise.
3435 (srv_amd64_regobj): Likewise.
3436 (srv_amd64_linux_regobj): Likewise.
3437 (srv_i386_32bit_xmlfiles): Likewise.
3438 (srv_i386_64bit_xmlfiles): Likewise.
3439 (srv_i386_xmlfiles): Likewise.
3440 (srv_amd64_xmlfiles): Likewise.
3441 (srv_i386_linux_xmlfiles): Likewise.
3442 (srv_amd64_linux_xmlfiles): Likewise.
3443 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3444 srv_xmlfiles to $srv_i386_xmlfiles.
3445 (i[34567]86-*-mingw32ce*): Likewise.
3446 (i[34567]86-*-mingw*): Likewise.
3447 (i[34567]86-*-nto*): Likewise.
3448 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3449 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3450 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3451 (x86_64-*-linux*): Likewise.
3452
3453 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3454 (init_registers_amd64_linux): New.
3455 (x86_arch_setup): Replace init_registers_x86_64_linux with
3456 init_registers_amd64_linux.
3457
3458 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3459
3460 * configure.ac: Check for libdl. If it is not available link against
3461 static libthread_db.
3462 * configure: Regenerate.
3463
3464 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3465
3466 PR9605
3467
3468 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3469 handing a read watchpoint.
3470 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3471
3472 2010-02-12 Doug Evans <dje@google.com>
3473
3474 * linux-low.c (linux_supports_tracefork_flag): Document.
3475 (linux_look_up_symbols): Add comment.
3476
3477 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3478
3479 * regcache.c (supply_register): Clear regcache if buf is NULL.
3480
3481 2010-02-02 Nicolas Roche <roche@sourceware.org>
3482 Joel Brobecker <brobecker@adacore.com>
3483
3484 * inferiors.c (find_inferior): Add function documentation.
3485 (unloaded_dll): Handle the case where the unloaded dll has not
3486 been previously registered in the dll list.
3487
3488 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3489
3490 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3491 (thumb2_breakpoint): New.
3492 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3493
3494 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3495
3496 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3497 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3498 breakpoints.
3499
3500 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3501
3502 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3503
3504 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3505
3506 * linux-s390-low.c (s390_collect_ptrace_register)
3507 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3508
3509 2010-01-21 Doug Evans <dje@google.com>
3510
3511 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3512 (PTRACE_ARG4_TYPE): New macro.
3513 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3514 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3515 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3516 (usr_store_inferior_registers): Ditto.
3517 (linux_read_memory, linux_write_memory): Ditto.
3518 (linux_test_for_tracefork): Ditto.
3519
3520 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3521 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3522
3523 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3524
3525 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3526 target.
3527
3528 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3529
3530 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3531 prototype to take a regcache. Adjust.
3532
3533 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3534
3535 * regcache.h (struct thread_info): Forward declare.
3536 (struct regcache): New.
3537 (new_register_cache): Adjust prototype.
3538 (get_thread_regcache): Declare.
3539 (free_register_cache): Adjust prototype.
3540 (registers_to_string, registers_from_string): Ditto.
3541 (supply_register, supply_register_by_name, collect_register)
3542 (collect_register_as_string, collect_register_by_name): Ditto.
3543 * regcache.c (struct inferior_regcache_data): Delete.
3544 (get_regcache): Rename to ...
3545 (get_thread_regcache): ... this. Adjust. Switch inferior before
3546 fetching registers.
3547 (regcache_invalidate_one): Adjust.
3548 (regcache_invalidate): Fix prototype.
3549 (new_register_cache): Return the new register cache.
3550 (free_register_cache): Change prototype.
3551 (realloc_register_cache): Adjust.
3552 (registers_to_string): Change prototype to take a regcache. Adjust.
3553 (registers_from_string): Ditto.
3554 (register_data): Ditto.
3555 (supply_register): Ditto.
3556 (supply_register_by_name): Ditto.
3557 (collect_register): Ditto.
3558 (collect_register_as_string): Ditto.
3559 (collect_register_by_name): Ditto.
3560 * server.c (process_serial_event): Adjust.
3561 * linux-low.h (regset_fill_func, regset_store_func): Change
3562 prototype.
3563 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3564 Change prototype.
3565 * linux-low.c (get_stop_pc): Adjust.
3566 (check_removed_breakpoint): Adjust.
3567 (linux_wait_for_event): Adjust.
3568 (linux_resume_one_lwp): Adjust.
3569 (fetch_register): Add regcache parameter. Adjust.
3570 (usr_store_inferior_registers): Ditto.
3571 (regsets_fetch_inferior_registers): Ditto.
3572 (regsets_store_inferior_registers): Ditto.
3573 (linux_fetch_registers, linux_store_registers): Ditto.
3574 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3575 regcache. Adjust.
3576 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3577 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3578 prototype to take a regcache.
3579 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3580 * remote-utils.c (convert_ascii_to_int, outreg)
3581 (prepare_resume_reply): Change prototype to take a regcache.
3582 Adjust.
3583 * target.h (struct target_ops) <fetch_registers, store_registers>:
3584 Change prototype to take a regcache.
3585 (fetch_inferior_registers, store_inferior_registers): Change
3586 prototype to take a regcache. Adjust.
3587 * proc-service.c (ps_lgetregs): Adjust.
3588 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3589 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3590 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3591 take a regcache. Adjust.
3592 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3593 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3594 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3595 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3596 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3597 (cris_cannot_fetch_register):
3598 (cris_breakpoint_at): Change prototype to take a regcache.
3599 Adjust.
3600 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3601 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3602 to take a regcache. Adjust.
3603 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3604 Adjust.
3605 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3606 take a regcache. Adjust.
3607 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3608 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3609 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3610 * linux-mips-low.c (mips_get_pc):
3611 (mips_set_pc): Change prototype to take a regcache. Adjust.
3612 (mips_reinsert_addr): Adjust.
3613 (mips_collect_register): Change prototype to take a regcache.
3614 Adjust.
3615 (mips_supply_register):
3616 (mips_collect_register_32bit, mips_supply_register_32bit)
3617 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3618 (mips_store_fpregset): Ditto.
3619 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3620 Ditto.
3621 (parse_spufs_run): Adjust.
3622 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3623 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3624 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3625 take a regcache. Adjust.
3626 * linux-s390-low.c (s390_collect_ptrace_register)
3627 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3628 (s390_set_pc): Change prototype to take a regcache. Adjust.
3629 (s390_arch_setup): Adjust.
3630 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3631 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3632 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3633 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3634 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3635 regcache. Adjust.
3636 (sparc_breakpoint_at): Adjust.
3637 * linux-xtensa-low.c (xtensa_fill_gregset):
3638 (xtensa_store_gregset):
3639 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3640 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3641 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3642 prototype to take a regcache. Adjust.
3643 * win32-arm-low.c (arm_fetch_inferior_register)
3644 (arm_store_inferior_register): Change prototype to take a
3645 regcache. Adjust.
3646 * win32-i386-low.c (i386_fetch_inferior_register)
3647 (i386_store_inferior_register): Change prototype to take a
3648 regcache. Adjust.
3649 * win32-low.c (child_fetch_inferior_registers)
3650 (child_store_inferior_registers): Change prototype to take a
3651 regcache. Adjust.
3652 (win32_wait): Adjust.
3653 (win32_fetch_inferior_registers): Change prototype to take a
3654 regcache. Adjust.
3655 (win32_store_inferior_registers): Adjust.
3656 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3657 store_inferior_register>: Change prototype to take a regcache.
3658
3659 2010-01-20 Doug Evans <dje@google.com>
3660
3661 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3662 #ifdef.
3663 (linux_wait_for_event1, linux_init_signals): Ditto.
3664 (W_STOPCODE): Provide definition if missing.
3665
3666 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3667
3668 * linux-low.c (linux_core_of_thread): New.
3669 (compare_ints, show_process, list_threads): New.
3670 (linux_qxfer_osdata): Report threads and cores.
3671 (linux_target_op): Register linux_core_of_thread.
3672 * remote-utils.c (prepare_resume_reply): Report the core.
3673 (buffer_xml_printf): Support %d specifier.
3674 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3675 New.
3676 (handle_query): Handle qXfer:threads. Announce availability
3677 thereof.
3678 * target.h (struct target_ops): New field core_of_thread.
3679
3680 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3681
3682 * Makefile.in (clean): Remove new generated files.
3683 (reg-s390.o, reg-s390.c): Remove rules.
3684 (reg-s390x.o, reg-s390x.c): Likewise.
3685 (s390-linux32.o, s390-linux32.c): Add rules.
3686 (s390-linux64.o, s390-linux64.c): Likewise.
3687 (s390x-linux64.o, s390x-linux64.c): Likewise.
3688 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3689 * linux-s390-low.c: Include <elf.h>.
3690 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3691 (init_registers_s390): Remove prototype.
3692 (init_registers_s390x): Likewise.
3693 (init_registers_s390_linux32): Add prototype.
3694 (init_registers_s390_linux64): Likewise.
3695 (init_registers_s390x_linux64): Likewise.
3696 (s390_num_regs_3264): New define.
3697 (s390_regmap_3264): New global variable.
3698 (s390_cannot_fetch_register): Remove obsolete check.
3699 (s390_cannot_store_register): Likewise.
3700 (s390_collect_ptrace_register): Handle upper/lower register halves.
3701 (s390_supply_ptrace_register): Likewise.
3702 (s390_fill_gregset): Update to register number changes.
3703 (s390_get_hwcap): New routine.
3704 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3705 Install appropriate regmap and register set.
3706
3707 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3708
3709 * server.c (gdbserver_version): Update copyright year to 2010.
3710 * gdbreplay.c (gdbreplay_version): Likewise.
3711
3712 2009-12-28 Doug Evans <dje@google.com>
3713
3714 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3715 elf/external.h. Include <elf.h> instead but only if necessary.
3716
3717 2009-12-28 Pedro Alves <pedro@codesourcery.com>
3718
3719 * linux-low.c (linux_remove_process): Remove `detaching'
3720 parameter. Don't release/detach from thread_db here.
3721 (linux_kill): Release/detach from thread_db here, ...
3722 (linux_detach): ... and here, before actually detaching.
3723 (linux_wait_1): ... and here, when a process exits.
3724 * thread-db.c (any_thread_of): New.
3725 (thread_db_free): Switch the current inferior to a thread of the
3726 passed in process.
3727
3728 2009-12-21 Doug Evans <dje@google.com>
3729
3730 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3731
3732 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3733 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3734 warning ifndef __NR_tkill. Move setting of errno there too.
3735 Delete unnecessary resetting of errno after syscall.
3736 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3737
3738 * configure.ac: Check for dladdr.
3739 * config.in: Regenerate.
3740 * configure: Regenerate.
3741 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3742 (try_thread_db_load): Update.
3743
3744 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3745
3746 2009-12-18 Doug Evans <dje@google.com>
3747
3748 * event-loop.c: Include unistd.h if it exists.
3749
3750 * linux-low.c (my_waitpid): Move definition away from being in
3751 between linux_tracefork_child/linux_test_for_tracefork.
3752
3753 * gdb_proc_service.h (psaddr_t): Fix type.
3754 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3755 signature to match glibc.
3756
3757 2009-12-16 Doug Evans <dje@google.com>
3758
3759 * linux-low.c (linux_read_memory): Fix argument to read.
3760
3761 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3762
3763 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3764 events, don't leave current_inferior pointing at null.
3765
3766 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3767
3768 * win32-low.c (LOG): Delete.
3769 (OUTMSG): Output to stderr.
3770 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3771 on compile time LOG macro.
3772 (win32_wait): Fix debug output.
3773
3774 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3775
3776 * win32-low.c (win32_add_one_solib): If the dll name is
3777 "ntdll.dll", prepend the system directory to the dll path.
3778
3779 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3780
3781 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3782
3783 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
3784 Vladimir Prus <vladimir@codesourcery.com>
3785
3786 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3787 * configure.ac: Check for __mcoldfire__ and set
3788 gdb_cv_m68k_is_coldfire.
3789 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3790 reg-cf.o and reg-m68k.o.
3791 * configure: Regenerated.
3792
3793 2009-11-16 Pedro Alves <pedro@codesourcery.com>
3794
3795 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3796 Pass it to thread_db_free.
3797 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3798 proper `detaching' argument to linux_remove_process.
3799 * linux-low.h (thread_db_free): Add `detaching' parameter.
3800 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3801 to thread_db_free.
3802 (thread_db_free): Add `detaching' parameter. Only
3803 call td_ta_clear_event if detaching from process.
3804
3805 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3806
3807 * thread-db.c (thread_db_free): Fix typo.
3808
3809 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3810
3811 PR gdb/10838
3812 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3813
3814 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3815
3816 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3817 with an i686 compiler.
3818 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3819 needed.
3820 * configure: Rebuilt.
3821
3822 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3823
3824 PR gdb/10783
3825
3826 * server.c (handle_search_memory_1): Correct read_addr initialization
3827 in loop for searching subsequent chunks.
3828
3829 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3830
3831 * configure.ac: New --with-libthread-db option.
3832 * thread-db.c: Allow direct dependence on libthread_db.
3833 (thread_db_free): Adjust.
3834 * config.in: Regenerate.
3835 * configure: Likewise.
3836
3837 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3838
3839 PR gdb/10757
3840 * thread-db.c (attach_thread): New function.
3841 (maybe_attach_thread): Return success/failure.
3842 (find_new_threads_callback): Adjust.
3843 (thread_db_find_new_threads): Loop until no new threads.
3844
3845 2009-10-13 Pedro Alves <pedro@codesourcery.com>
3846
3847 * proc-service.c (ps_lgetregs): Formatting.
3848
3849 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3850
3851 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3852 * configure.ac: Adjust.
3853 * linux-low.h (struct process_info_private): Move members to struct
3854 thread_db.
3855 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3856 * linux-low.c (linux_remove_process): Adjust.
3857 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3858 * server.c (handle_query): Move code ...
3859 (handle_monitor_command): ... here. New function.
3860 * target.h (struct target_ops): New member.
3861 * thread-db.c (struct thread_db): New.
3862 (libthread_db_search_path): New variable.
3863 (thread_db_create_event, thread_db_enable_reporting)
3864 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3865 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3866 (try_thread_db_load_1, dladdr_to_soname): New functions.
3867 (try_thread_db_load, thread_db_load_search): New functions.
3868 (thread_db_init): Search for libthread_db.
3869 (thread_db_free): New function.
3870 (thread_db_handle_monitor_command): Likewise.
3871 * config.in: Regenerate.
3872 * configure: Regenerate.
3873
3874 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3875
3876 * spu-low.c (spu_kill): Wait for inferior to terminate.
3877 Call clear_inferiors.
3878 (spu_detach): Call clear_inferiors.
3879
3880 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3881
3882 * aclocal.m4: Regenerate.
3883 * config.in: Likewise.
3884 * configure: Likewise.
3885
3886 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3887
3888 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3889 (parse_spufs_run): New function.
3890 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3891 (ppc_breakpoint_at): Handle SPU breakpoints.
3892
3893 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3894
3895 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3896 (SPUFS_MAGIC): Define.
3897 (spu_enumerate_spu_ids): New function.
3898 (linux_qxfer_spu): New function.
3899 (linux_target_ops): Install linux_qxfer_spu.
3900
3901 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3902
3903 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3904 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3905 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3906 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3907 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3908 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3909 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3910 (init_registers_powerpc_cell32l): Add prototype.
3911 (init_registers_powerpc_cell64l): Likewise.
3912 (ppc_arch_setup): Detect Cell/B.E. architecture.
3913
3914 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3915
3916 * Makefile.in (datarootdir): New variable.
3917
3918 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3919
3920 * linux-low.c (linux_write_memory): Update debugging output.
3921 * Makefile.in (clean): Add new descriptions.
3922 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3923 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3924 * configure.srv: Add new files for arm*-*-linux*.
3925 * linux-arm-low.c: Add new declarations.
3926 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3927 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3928 (HWCAP_VFPv3D16): New.
3929 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3930 instead of __IWMMXT__.
3931 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3932 (arm_arch_setup): New.
3933 (target_regsets): Remove #ifdef. Add VFP regset.
3934 (the_low_target): Use arm_arch_setup.
3935
3936 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3937
3938 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3939 the main thread again.
3940
3941 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3942
3943 Adding Neutrino gdbserver.
3944 * configure: Regenerated.
3945 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3946 * configure.srv (i[34567]86-*-nto*): New target.
3947 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3948 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3949 (nto_comctrl) [__QNX__]: New function.
3950 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3951
3952 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
3953
3954 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3955 srv_tgtobj.
3956
3957 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3958 Pedro Alves <pedro@codesourcery.com>
3959
3960 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3961 don't support CONTEXT_EXTENDED_REGISTERS.
3962 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3963 (the_low_target): Install them.
3964 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3965 failing with ERROR_PIPE_NOT_CONNECTED.
3966
3967 2009-06-30 Doug Evans <dje@google.com>
3968 Pierre Muller <muller@ics.u-strasbg.fr>
3969
3970 Add h/w watchpoint support to x86-linux, win32-i386.
3971 * Makefile.in (SFILES): Add i386-low.c
3972 (i386_low_h): Define.
3973 (i386-low.o): Add dependencies.
3974 (linux-x86-low.o): Add i386-low.h dependency.
3975 (win32-i386-low.o): Ditto.
3976 * i386-low.c: New file.
3977 * i386-low.h: New file.
3978 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3979 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3980 * linux-low.c (linux_add_process): Initialize arch_private.
3981 (linux_remove_process): Free arch_private.
3982 (add_lwp): Initialize arch_private.
3983 (delete_lwp): Free arch_private.
3984 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3985 provided.
3986 * linux-low.h (process_info_private): New member arch_private.
3987 (lwp_info): New member arch_private.
3988 (linux_target_ops): New members new_process, new_thread,
3989 prepare_to_resume.
3990 (ptid_of): New macro.
3991 * linux-x86-low.c: Include stddef.h, i386-low.h.
3992 (arch_process_info): New struct.
3993 (arch_lwp_info): New struct.
3994 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3995 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3996 (i386_dr_low_get_status): New function.
3997 (x86_insert_point, x86_remove_point): New functions.
3998 (x86_stopped_by_watchpoint): New function.
3999 (x86_stopped_data_address): New function.
4000 (x86_linux_new_process, x86_linux_new_thread): New functions.
4001 (x86_linux_prepare_to_resume): New function.
4002 (the_low_target): Add entries for insert_point, remove_point,
4003 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4004 prepare_to_resume.
4005 * server.c (debug_hw_points): New global.
4006 (monitor_show_help): Document set debug-hw-points.
4007 (handle_query): Process "set debug-hw-points".
4008 * server.h (debug_hw_points): Declare.
4009 (paddress): Declare.
4010 * utils.c (NUMCELLS, CELLSIZE): New macros.
4011 (get_sell, xsnprintf, paddress): New functions.
4012 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4013 remove_point, stopped_by_watchpoint, stopped_data_address.
4014 * win32-i386-low.c: Include i386-low.h.
4015 (debug_reg_state): Replaces dr.
4016 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4017 (i386_dr_low_get_status): New function.
4018 (i386_insert_point, i386_remove_point): New functions.
4019 (i386_stopped_by_watchpoint): New function.
4020 (i386_stopped_data_address): New function.
4021 (i386_initial_stuff): Update.
4022 (get_thread_context,set_thread_context,i386_thread_added): Update.
4023 (the_low_target): Add entries for insert_point,
4024 remove_point, stopped_by_watchpoint, stopped_data_address.
4025 * win32-low.c (win32_insert_watchpoint): New function.
4026 (win32_remove_watchpoint): New function.
4027 (win32_stopped_by_watchpoint): New function.
4028 (win32_stopped_data_address): New function.
4029 (win32_target_ops): Add entries for insert_watchpoint,
4030 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4031 * win32-low.h (win32_target_ops): New members insert_point,
4032 remove_point, stopped_by_watchpoint, stopped_data_address.
4033
4034 2009-06-25 Pedro Alves <pedro@codesourcery.com>
4035
4036 * server.c (process_serial_event): Re-return unsupported, not
4037 error, if the type isn't recognized. Re-allow supporting only
4038 insert or remove packets. Also call require_running for
4039 breakpoints. Add missing break statement to default case. Tidy.
4040 * target.h (struct target_ops): Rename insert_watchpoint to
4041 insert_point, and remove_watchpoint to remove_point.
4042
4043 * linux-low.h (struct linux_target_ops): Likewise.
4044 * linux-low.c (linux_insert_watchpoint): Rename to ...
4045 (linux_insert_point): ... this. Adjust.
4046 (linux_remove_watchpoint): Rename to ...
4047 (linux_remove_point): ... this. Adjust.
4048 (linux_target_ops): Adjust.
4049 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4050 (cris_insert_point): ... this.
4051 (cris_remove_watchpoint): Rename to ...
4052 (cris_remove_point): ... this.
4053 (the_low_target): Adjust.
4054
4055 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4056
4057 * server.c (handle_v_kill): Pass signal_pid to
4058 kill_inferior if multi_process is zero.
4059
4060 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4061
4062 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4063 * target.h (target_ops): Comment for *_watchpoint to make it clear
4064 the functions can get types '0' and '1'.
4065
4066 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4067
4068 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4069 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4070 * regcache.c (get_regcache): Likewise.
4071 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4072 * win32-low.c (child_fetch_inferior_registers): Remove check for
4073 regno 0.
4074
4075 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4076 Pedro Alves <pedro@codesourcery.com>
4077
4078 * target.h (struct target_ops) <supports_multi_process>: New
4079 callback.
4080 (target_supports_multi_process): New.
4081 * server.c (handle_query): Even if GDB reports support, only
4082 enable multi-process if the target also supports it. Report
4083 multi-process support only if the target backend supports it.
4084 * linux-low.c (linux_supports_multi_process): New function.
4085 (linux_target_ops): Install it as target_supports_multi_process
4086 callback.
4087
4088 2009-05-24 Doug Evans <dje@google.com>
4089
4090 Global renaming of find_thread_pid to find_thread_ptid.
4091 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4092 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4093 All callers updated.
4094
4095 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4096 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4097 directly.
4098
4099 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4100 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4101 (linux_resume_one_lwp): Ditto.
4102
4103 2009-05-23 Doug Evans <dje@google.com>
4104
4105 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4106 from struct inferior_list_entry * to struct lwp_info *.
4107 All callers updated.
4108
4109 2009-05-13 Doug Evans <dje@google.com>
4110
4111 * linux-x86-low.c: Don't include assert.h.
4112 (x86_siginfo_fixup): Use fatal, not assert.
4113 (x86_arch_setup): Fix comment.
4114
4115 2009-05-12 Doug Evans <dje@google.com>
4116
4117 Biarch support for i386/amd64 gdbserver.
4118 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4119 Add linux-x86-low.c.
4120 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4121 (linux-x86-low.o): Add.
4122 * linux-x86-64-low.c: Delete.
4123 * linux-i386-low.c: Delete.
4124 * linux-x86-low.c: New file.
4125 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4126 linux-x86-low.o.
4127 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4128 linux-x86-low.o.
4129 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4130 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4131 (linux_child_pid_to_exec_file): New function.
4132 (elf_64_header_p, elf_64_file_p): New functions.
4133 (siginfo_fixup): New function.
4134 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4135 give target a chance to convert layout.
4136 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4137 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4138
4139 2009-05-07 Doug Evans <dje@google.com>
4140
4141 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4142 (regsets_store_inferior_registers): Ditto.
4143
4144 2009-05-06 Pedro Alves <pedro@codesourcery.com>
4145
4146 PR server/10048
4147
4148 * linux-low.c (must_set_ptrace_flags): Delete.
4149 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4150 of the global.
4151 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4152 `lwp->must_set_ptrace_flags' instead.
4153 (linux_wait_for_event_1): Set ptrace options here.
4154 (linux_wait_1): ... not here.
4155
4156 2009-04-30 Doug Evans <dje@google.com>
4157
4158 * inferiors.c (started_inferior_callback): New function.
4159 (attached_inferior_callback): New function.
4160 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4161 * server.c (print_started_pid, print_attached_pid): New functions.
4162 (detach_or_kill_for_exit): New function.
4163 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4164 * server.h (have_started_inferiors_p): Declare.
4165 (have_attached_inferiors_p): Declare.
4166
4167 * inferiors.c (remove_process): Fix memory leak, free process.
4168 * linux-low.c (linux_remove_process): New function.
4169 (linux_kill): Call it instead of remove_process.
4170 (linux_detach, linux_wait_1): Ditto.
4171
4172 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4173
4174 * configure.srv: Add x86 Windows CE target.
4175
4176 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4177
4178 * inferiors.c (get_thread_process): Make global.
4179 * server.h (get_thread_process): Add prototype.
4180 * thread-db.c (find_one_thread): Use get_thread_process
4181 instead of current_process.
4182 (thread_db_get_tls_address): Do not crash if called when
4183 thread layer is not yet initialized.
4184
4185 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4186
4187 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4188 * spu-low.c (current_tid): Rename to ...
4189 (current_ptid): ... this.
4190 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4191 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4192 ptid_get_lwp (current_ptid) instead of current_tid.
4193 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4194 instead of current_tid. Use find_process_pid to verify pid
4195 argument is valid. Pass proper argument to remove_process.
4196 (spu_thread_alive): Compare current_ptid instead of current_tid.
4197 (spu_resume): Likewise.
4198
4199 2009-04-02 Pedro Alves <pedro@codesourcery.com>
4200
4201 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4202 variable.
4203
4204 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4205
4206 Implement the multiprocess extensions, and add linux multiprocess
4207 support.
4208
4209 * server.h (ULONGEST): Declare.
4210 (struct ptid, ptid_t): New.
4211 (minus_one_ptid, null_ptid): Declare.
4212 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4213 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4214 (struct inferior_list_entry): Change `id' type from unsigned from
4215 to ptid_t.
4216 (struct sym_cache, struct breakpoint, struct
4217 process_info_private): Forward declare.
4218 (struct process_info): Declare.
4219 (current_process): Declare.
4220 (all_processes): Declare.
4221 (initialize_inferiors): Declare.
4222 (add_thread): Adjust to use ptid_t.
4223 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4224 (add_process, remove_process, find_thread_pid): Declare.
4225 (find_inferior_id): Adjust to use ptid_t.
4226 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4227 (multi_process): Declare.
4228 (push_event): Adjust to use ptid_t.
4229 (read_ptid, write_ptid): Declare.
4230 (prepare_resume_reply): Adjust to use ptid_t.
4231 (clear_symbol_cache): Declare.
4232 * inferiors.c (all_processes): New.
4233 (null_ptid, minus_one_ptid): New.
4234 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4235 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4236 (add_thread): Change unsigned long to ptid. Remove gdb_id
4237 parameter. Adjust.
4238 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4239 (gdb_id_to_thread): Rename to ...
4240 (find_thread_pid): ... this. Change unsigned long to ptid.
4241 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4242 (loaded_dll, pull_pid_from_list): Adjust.
4243 (add_process, remove_process, find_process_pid)
4244 (get_thread_process, current_process, initialize_inferiors): New.
4245 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4246 (struct target_waitstatus) <related_pid>: Ditto.
4247 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4248 return type to int.
4249 (struct target_ops) <join>: Add `pid' argument.
4250 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4251 (struct target_ops) <wait>: Add `ptid' field. Change return type
4252 to ptid.
4253 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4254 (mywait): Add `ptid' argument. Change return type to ptid_t.
4255 (target_pid_to_str): Declare.
4256 * target.c (set_desired_inferior): Adjust to use ptids.
4257 (mywait): Add new `ptid' argument. Adjust.
4258 (target_pid_to_str): New.
4259 * mem-break.h (free_all_breakpoints): Declare.
4260 * mem-break.c (breakpoints): Delelete.
4261 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4262 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4263 to use per-process breakpoint list.
4264 (free_all_breakpoints): New.
4265 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4266 (symbol_cache, all_symbols_looked_up): Delete.
4267 (hexchars): New.
4268 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4269 read_ptid): New.
4270 (prepare_resume_reply): Change ptid argument's type from unsigned
4271 long to ptid_t. Adjust. Implement W;process and X;process.
4272 (free_sym_cache, clear_symbol_cache): New.
4273 (look_up_one_symbol): Adjust to per-process symbol cache. *
4274 * server.c (cont_thread, general_thread, step_thread): Change type
4275 to ptid_t.
4276 (attached): Delete.
4277 (multi_process): New.
4278 (last_ptid): Change type to ptid_t.
4279 (struct vstop_notif) <ptid>: Change type to ptid_t.
4280 (queue_stop_reply, push_event): Change `ptid' argument's type to
4281 ptid_t.
4282 (discard_queued_stop_replies): Add `pid' argument.
4283 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4284 changes. Don't reference the `attached' global.
4285 (attach_inferior): Adjust to mywait interface changes.
4286 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4287 features. Handle and report "multiprocess+". Handle
4288 "qAttached:PID".
4289 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4290 changes.
4291 (handle_v_kill): New.
4292 (handle_v_stopped): Adjust to use target_pid_to_str.
4293 (handle_v_requests): Allow multiple attaches and runs when
4294 multiprocess extensions are in effect. Handle "vKill".
4295 (myresume): Adjust to use ptids.
4296 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4297 (handle_status): Adjust to discard_queued_stop_replies interface
4298 change.
4299 (first_thread_of, kill_inferior_callback)
4300 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4301 (main): Call initialize_inferiors. Adjust to use ptids, killing
4302 and detaching from all inferiors. Handle multiprocess packet
4303 variants.
4304 * linux-low.h: Include gdb_proc_service.h.
4305 (struct process_info_private): New.
4306 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4307 <lwpid_of>: Use ptid_get_lwp.
4308 (get_lwp_thread): Adjust.
4309 (struct lwp_info): Add `dead' member.
4310 (find_lwp_pid): Declare.
4311 * linux-low.c (thread_db_active): Delete.
4312 (new_inferior): Adjust comment.
4313 (inferior_pid): Delete.
4314 (linux_add_process): New.
4315 (handle_extended_wait): Adjust.
4316 (add_lwp): Change unsigned long to ptid.
4317 (linux_create_inferior): Add process to processes table. Adjust
4318 to use ptids. Don't set new_inferior here.
4319 (linux_attach_lwp): Rename to ...
4320 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4321 it. Adjust to use ptids.
4322 (linux_attach_lwp): New.
4323 (linux_attach): Add process to processes table. Don't set
4324 new_inferior here.
4325 (struct counter): New.
4326 (second_thread_of_pid_p, last_thread_of_process_p): New.
4327 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4328 multiple processes.
4329 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4330 processes. Remove process from process table.
4331 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4332 to multiple processes.
4333 (any_thread_of): New.
4334 (linux_detach): Add `pid' argument, and handle it. Remove process
4335 from processes table.
4336 (linux_join): Add `pid' argument. Handle it.
4337 (linux_thread_alive): Change unsighed long argument to ptid_t.
4338 Consider dead lwps as not being alive.
4339 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4340 threads we're not interested in.
4341 (same_lwp, find_lwp_pid): New.
4342 (linux_wait_for_lwp): Change `pid' argument's type from int to
4343 ptid_t. Adjust.
4344 (linux_wait_for_event): Rename to ...
4345 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4346 from int to ptid_t. Adjust.
4347 (linux_wait_for_event): New.
4348 (linux_wait_1): Add `ptid' argument. Change return type to
4349 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4350 that exit from the process table.
4351 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4352 Adjust.
4353 (mark_lwp_dead): New.
4354 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4355 stopping all threads, mark its main lwp as dead.
4356 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4357 ptids.
4358 (fetch_register, usr_store_inferior_registers)
4359 (regsets_fetch_inferior_registers)
4360 (regsets_store_inferior_registers, linux_read_memory)
4361 (linux_write_memory): Inline `inferior_pid'.
4362 (linux_look_up_symbols): Adjust to use per-process
4363 `thread_db_active'.
4364 (linux_request_interrupt): Adjust to use ptids.
4365 (linux_read_auxv): Inline `inferior_pid'.
4366 (initialize_low): Don't reference thread_db_active.
4367 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4368 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4369 (ps_getpid): Return the pid of the current inferior.
4370 * thread-db.c (proc_handle, thread_agent): Delete.
4371 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4372 per-process data.
4373 (find_one_thread): Change argument type to ptid_t. Adjust to
4374 per-process data.
4375 (maybe_attach_thread): Adjust to per-process data and ptids.
4376 (thread_db_find_new_threads): Ditto.
4377 (thread_db_init): Ditto.
4378 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4379 processes table. Adjust to use ptids.
4380 (spu_kill, spu_detach): Adjust interface. Remove process from
4381 processes table.
4382 (spu_join, spu_thread_alive): Adjust interface.
4383 (spu_wait): Adjust interface. Remove process from processes
4384 table. Adjust to use ptids.
4385 * win32-low.c (current_inferior_tid): Delete.
4386 (current_inferior_ptid): New.
4387 (debug_event_ptid): New.
4388 (thread_rec): Take a ptid. Adjust.
4389 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4390 (child_delete_thread): Ditto.
4391 (do_initial_child_stuff): Add `attached' argument. Add process to
4392 processes table.
4393 (child_fetch_inferior_registers, child_store_inferior_registers):
4394 Adjust.
4395 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4396 (win32_attach): Pass 1 to do_initial_child_stuff.
4397 (win32_kill): Adjust interface. Remove process from processes
4398 table.
4399 (win32_detach): Ditto.
4400 (win32_join): Adjust interface.
4401 (win32_thread_alive): Take a ptid.
4402 (win32_resume): Adjust to use ptids.
4403 (get_child_debug_event): Ditto.
4404 (win32_wait): Adjust interface. Remove exiting process from
4405 processes table.
4406
4407 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4408
4409 Non-stop mode support.
4410
4411 * server.h (non_stop): Declare.
4412 (gdb_client_data, handler_func): Declare.
4413 (delete_file_handler, add_file_handler, start_event_loop):
4414 Declare.
4415 (handle_serial_event, handle_target_event, push_event)
4416 (putpkt_notif): Declare.
4417 * target.h (enum resume_kind): New.
4418 (struct thread_resume): Replace `step' field by `kind' field.
4419 (TARGET_WNOHANG): Define.
4420 (struct target_ops) <wait>: Add `options' argument.
4421 <supports_non_stop, async, start_non_stop>: New fields.
4422 (target_supports_non_stop, target_async): New.
4423 (start_non_stop): Declare.
4424 (mywait): Add `options' argument.
4425 * target.c (mywait): Add `options' argument. Print child exit
4426 notifications here.
4427 (start_non_stop): New.
4428 * server.c (non_stop, own_buf, mem_buf): New globals.
4429 (struct vstop_notif): New.
4430 (notif_queue): New global.
4431 (queue_stop_reply, push_event, discard_queued_stop_replies)
4432 (send_next_stop_reply): New.
4433 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4434 interface changes.
4435 (attach_inferior): In non-stop mode, don't wait for the target
4436 here.
4437 (handle_general_set): Handle QNonStop.
4438 (handle_query): When handling qC, return the current general
4439 thread, instead of the first thread of the list.
4440 (handle_query): If the backend supports non-stop mode, include
4441 QNonStop+ in the qSupported query response.
4442 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4443 and non-stop mode.
4444 (handle_v_attach, handle_v_run): Handle non-stop mode.
4445 (handle_v_stopped): New.
4446 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4447 (myresume): Adjust to use resume_kind. Handle non-stop.
4448 (queue_stop_reply_callback): New.
4449 (handle_status): Handle non-stop mode.
4450 (main): Clear non_stop flag on reconnection. Use the event-loop.
4451 Refactor serial protocol handling from here ...
4452 (process_serial_event): ... to this new function. When GDB
4453 selects any thread, select one here. In non-stop mode, wait until
4454 GDB acks all pending events before exiting.
4455 (handle_serial_event, handle_target_event): New.
4456 * remote-utils.c (remote_open): Install remote_desc in the event
4457 loop.
4458 (remote_close): Remove remote_desc from the event loop.
4459 (putpkt_binary): Rename to...
4460 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4461 (putpkt_binary): New as wrapper around putpkt_binary_1.
4462 (putpkt_notif): New.
4463 (prepare_resume_reply): In non-stop mode, don't change the
4464 general_thread.
4465 * event-loop.c: New.
4466 * Makefile.in (OBJ): Add event-loop.o.
4467 (event-loop.o): New rule.
4468
4469 * linux-low.h (pid_of): Moved here.
4470 (lwpid_of): New.
4471 (get_lwp_thread): Use lwpid_of.
4472 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4473 * linux-low.c (pid_of): Delete.
4474 (inferior_pid): Use lwpid_of.
4475 (linux_event_pipe): New.
4476 (target_is_async_p): New.
4477 (delete_lwp): New.
4478 (handle_extended_wait): Use lwpid_of.
4479 (add_lwp): Don't set lwpid field.
4480 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4481 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4482 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4483 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4484 first. Adjust to linux_wait_for_event interface changes. Use
4485 lwpid_of.
4486 (linux_detach): Don't delete the main lwp here.
4487 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4488 (status_pending_p): Don't consider explicitly suspended lwps.
4489 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4490 pointer. Add OPTIONS argument. Change return type to int. Use
4491 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4492 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4493 pointer. Add status pointer argument. Return a pid instead of a
4494 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4495 changes. In non-stop mode, don't switch to a random thread.
4496 (linux_wait): Rename to...
4497 (linux_wait_1): ... this. Add target_options argument, and handle
4498 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4499 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4500 clean exit and signal exit code. Don't stop all threads in
4501 non-stop mode. In all-stop mode, only stop all threads when
4502 reporting a stop to GDB. Handle explicit thread stop requests.
4503 (async_file_flush, async_file_mark): New.
4504 (linux_wait): New.
4505 (send_sigstop): Use lwpid_of.
4506 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4507 interface changes. In non-stop mode, don't switch to a random
4508 thread.
4509 (linux_resume_one_lwp): Use lwpid_of.
4510 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4511 (linux_resume_one_thread): ... this. Handle resume_stop. In
4512 non-stop mode, don't look for pending flag in all threads.
4513 (resume_status_pending_p): Don't consider explicitly suspended
4514 threads.
4515 (my_waitpid): Reimplement. Emulate __WALL.
4516 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4517 Use lwpid_of.
4518 (sigchld_handler, linux_supports_non_stop, linux_async)
4519 (linux_start_non_stop): New.
4520 (linux_target_ops): Register linux_supports_non_stop, linux_async
4521 and linux_start_non_stop.
4522 (initialize_low): Install SIGCHLD handler.
4523 * thread-db.c (thread_db_create_event, find_one_thread)
4524 (thread_db_get_tls_address): Use lwpid_of.
4525 * win32-low.c (win32_detach): Adjust to use resume_kind.
4526 (win32_wait): Add `options' argument.
4527 * spu-low.c (spu_resume): Adjust to use resume_kind.
4528 (spu_wait): Add `options' argument.
4529
4530 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4531
4532 Decouple target code from remote protocol.
4533
4534 * target.h (enum target_waitkind): New.
4535 (struct target_waitstatus): New.
4536 (struct target_ops) <wait>: Return an unsigned long. Take a
4537 target_waitstatus pointer instead of a char pointer.
4538 (mywait): Likewise.
4539 * target.c (mywait): Change prototype to return an unsigned long.
4540 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4541 * server.h (thread_from_wait, old_thread_from_wait): Delete
4542 declarations.
4543 (prepare_resume_reply): Change prototype to take a
4544 target_waitstatus.
4545 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4546 (last_status, last_ptid): New.
4547 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4548 pid instead of a signal.
4549 (attach_inferior): Remove "status" and "signal" parameters.
4550 Adjust.
4551 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4552 not as an address.
4553 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4554 (handle_v_requests, myresume): Remove "status" and "signal"
4555 parameters. Adjust.
4556 (handle_status): New.
4557 (main): Delete local `status'. Adjust.
4558 * remote-utils.c: Include target.h.
4559 (prepare_resume_reply): Change prototype to take a
4560 target_waitstatus. Adjust.
4561
4562 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4563 interface.
4564 * spu-low.c (spu_wait): Adjust.
4565 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4566 Delete.
4567 (win32_wait): Adjust.
4568
4569 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4570
4571 * target.h (struct thread_resume): Delete leave_stopped member.
4572 (struct target_ops): Add a `n' argument to the `resume' callback.
4573 * server.c (start_inferior): Adjust.
4574 (handle_v_cont, myresume): Adjust.
4575 * linux-low.c (check_removed_breakpoint): Adjust to resume
4576 interface change, and to removed leave_stopped field.
4577 (resume_ptr): Delete.
4578 (struct thread_resume_array): New.
4579 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4580 resume interface change.
4581 (linux_continue_one_thread, linux_queue_one_thread)
4582 (resume_status_pending_p): Check if the resume field is NULL
4583 instead of checking the leave_stopped member.
4584 (linux_resume): Adjust to the target resume interface change.
4585 * spu-low.c (spu_resume): Adjust to the target resume interface
4586 change.
4587 * win32-low.c (win32_detach, win32_resume): Ditto.
4588
4589 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4590
4591 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4592 flag.
4593 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4594 pending.
4595 (linux_continue_one_thread): Only preserve the stepping flag if
4596 there's a pending breakpoint.
4597
4598 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4599
4600 * server.c (main): After the inferior having exited, call
4601 remote_close before exiting gdbserver.
4602
4603 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4604
4605 Fix size of FPSCR in Power 7 processors.
4606 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4607 (PPC_FEATURE_HAS_DFP): New #define.
4608 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4609 size of the FPSCR.
4610
4611 2009-03-23 Pedro Alves <pedro@codesourcery.com>
4612
4613 * server.c (handle_query) Whitespace and formatting.
4614
4615 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4616
4617 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4618 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4619 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4620 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4621 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4622 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4623 Makefile.in, configure.ac: Fix whitespace throughout.
4624 * configure: Regenerate.
4625
4626 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4627
4628 * inferiors.c (find_inferior): Make it safe for the callback
4629 function to delete the currently iterated inferior.
4630
4631 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4632
4633 * Makefile.in (linuw_low_h): Move higher.
4634 (thread-db.o): Depend on $(linux_low_h).
4635
4636 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4637
4638 Rename "process" to "lwp" throughout.
4639
4640 * linux-low.c (all_processes): Rename to...
4641 (all_lwps): ... this.
4642 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4643 (add_process): Rename to ...
4644 (add_lwp): ... this. Adjust.
4645 (linux_create_inferior): Adjust.
4646 (linux_attach_lwp): Adjust.
4647 (linux_attach): Adjust.
4648 (linux_kill_one_process): Rename to ...
4649 (linux_kill_one_lwp): ... this. Adjust.
4650 (linux_kill): Adjust.
4651 (linux_detach_one_process): Rename to ...
4652 (linux_detach_one_lwp): ... this. Adjust.
4653 (linux_detach): Adjust.
4654 (check_removed_breakpoint): Adjust.
4655 (status_pending_p): Adjust.
4656 (linux_wait_for_process): Rename to ...
4657 (linux_wait_for_lwp): ... this. Adjust.
4658 (linux_wait_for_event): Adjust.
4659 (send_sigstop): Adjust.
4660 (wait_for_sigstop): Adjust.
4661 (stop_all_processes): Rename to ...
4662 (stop_all_lwps): ... this.
4663 (linux_resume_one_process): Rename to ...
4664 (linux_resume_one_lwp): ... this. Adjust.
4665 (linux_set_resume_request, linux_continue_one_thread)
4666 (linux_queue_one_thread, resume_status_pending_p)
4667 (usr_store_inferior_registers, regsets_store_inferior_registers)
4668 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4669 Adjust.
4670 * linux-low.h (get_process): Rename to ...
4671 (get_lwp): ... this. Adjust.
4672 (get_thread_process): Rename to ...
4673 (get_thread_lwp): ... this. Adjust.
4674 (get_process_thread): Rename to ...
4675 (get_lwp_thread): ... this. Adjust.
4676 (struct process_info): Rename to ...
4677 (struct lwp_info): ... this.
4678 (all_processes): Rename to ...
4679 (all_lwps): ... this.
4680 * proc-service.c (ps_lgetregs): Adjust.
4681 * thread-db.c (thread_db_create_event, find_one_thread)
4682 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4683
4684 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4685
4686 * server.c (handle_query): Handle "qAttached".
4687
4688 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4689
4690 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4691 GPLv3, update license URL.
4692
4693 2009-03-01 Doug Evans <dje@google.com>
4694
4695 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
4696 (server_h): Add gdb_signals.h.
4697 (signals.o): Update.
4698 * server.h (target_signal_from_host,target_signal_to_host_p)
4699 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4700
4701 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4702
4703 * remote-utils.c (getpkt): Also generate remote-debug
4704 information if noack_mode is set.
4705
4706 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4707
4708 * server.c (handle_query): Report qXfer:siginfo:read and
4709 qXfer:siginfo:write as supported and handle them.
4710 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4711 * linux-low.c (linux_xfer_siginfo): New.
4712 (linux_target_ops): Set it.
4713
4714 2009-01-26 Pedro Alves <pedro@codesourcery.com>
4715
4716 * server.c (gdbserver_usage): Mention --remote-debug.
4717 (main): Accept '--remote-debug' switch.
4718
4719 2009-01-18 Doug Evans <dje@google.com>
4720
4721 * regcache.c (new_register_cache): No need to check result of xcalloc.
4722 * server.c (handle_search_memory): Back out calls to xmalloc,
4723 result is checked and error is returned to user upon failure.
4724 (handle_query): Ditto. Add more checks for result of malloc.
4725 (handle_v_cont): Check result of malloc, report error back to
4726 user upon failure.
4727 (handle_v_run): Ditto. Call freeargv.
4728 * server.h (freeargv): Declare.
4729 * utils.c (freeargv): New fn.
4730
4731 2009-01-15 Doug Evans <dje@google.com>
4732
4733 * gdbreplay.c (perror_with_name): Make arg const char *.
4734 * server.h (target_signal_to_name): Make return type const char *.
4735 * thread-db.c (thread_db_err_str): Make return type const char *.
4736 * utils.c (perror_with_name): Make arg const char *.
4737
4738 2009-01-14 Pedro Alves <pedro@codesourcery.com>
4739
4740 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4741 when handling a EXIT_PROCESS_DEBUG_EVENT.
4742
4743 2009-01-06 Joel Brobecker <brobecker@adacore.com>
4744
4745 * gdbreplay.c (gdbreplay_version): Update copyright year.
4746 * server.c (gdbserver_version): Likewise.
4747
4748 2009-01-05 Doug Evans <dje@google.com>
4749
4750 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
4751 (handle_extended_wait): Improve comment.
4752
4753 2008-12-13 Doug Evans <dje@google.com>
4754
4755 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4756 * server.h (ATTR_MALLOC): New macro.
4757 (xmalloc,xcalloc,xstrdup): Declare.
4758 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4759 * inferiors.c: Ditto.
4760 * linux-low.c: Ditto.
4761 * mem-break.c: Ditto.
4762 * regcache.c: Ditto.
4763 * remote-utils.c: Ditto.
4764 * server.c: Ditto.
4765 * target.c: Ditto.
4766 * win32-low.c: Ditto.
4767
4768 2008-12-12 Doug Evans <dje@google.com>
4769
4770 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4771 in debugging printf.
4772
4773 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4774
4775 2008-12-09 Doug Evans <dje@google.com>
4776
4777 * linux-low.h (struct process_info): Delete member tid, unused.
4778 * thread-db.c (find_one_thread): Update.
4779 (maybe_attach_thread): Update.
4780
4781 2008-12-02 Pedro Alves <pedro@codesourcery.com>
4782
4783 * target.h (struct target_ops): Add qxfer_osdata member.
4784 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4785 and dirent.h.
4786 (linux_qxfer_osdata): New functions.
4787 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4788 callback.
4789 * server.c (handle_query): Handle "qXfer:osdata:read:".
4790 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4791 (buffer_xml_printf): New functions.
4792 * server.h (struct buffer): New.
4793 (buffer_grow_str, buffer_grow_str0): New macros.
4794 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4795 (buffer_xml_printf): Declare.
4796
4797 2008-11-24 Doug Evans <dje@google.com>
4798
4799 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4800
4801 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4802
4803 * server.c (handle_v_run): Always use the supplied argument list.
4804
4805 2008-11-19 Bob Wilson <bob.wilson@acm.org>
4806
4807 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4808 (xtensa_regmap_table): Add entry for scompare1.
4809
4810 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4811
4812 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4813 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4814 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4815 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4816 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4817 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4818 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4819 XML target descriptions.
4820 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4821 when inferior is running on an ISA 2.05 or later processor. Add
4822 special case to return offset for full 64-bit slot of FPSCR when
4823 in 32-bits.
4824
4825 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4826
4827 * Makefile.in (SFILES, clean): Added sparc64 files.
4828 (reg-sparc64.o, reg-sparc64.c): New.
4829 * configure.srv (sparc*-*-linux*): New configuration.
4830 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4831 syscall arguments for SPARC.
4832 (regsets_store_inferior_registers): Likewise.
4833 * linux-sparc-low.c: New file.
4834
4835 2008-10-21 Doug Evans <dje@google.com>
4836
4837 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4838 (READLINE_DIR,READLINE_DEP): Delete.
4839 (INTERNAL_CFLAGS): Update.
4840 (LINTFLAGS): Update.
4841
4842 2008-10-10 Pedro Alves <pedro@codesourcery.com>
4843
4844 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4845 whole argv from the last run, not just argv[0].
4846
4847 2008-09-08 Pedro Alves <pedro@codesourcery.com>
4848
4849 * regcache.c (new_register_cache): Return NULL if the register
4850 cache size isn't known yet.
4851 (free_register_cache): Avoid dereferencing a NULL regcache.
4852
4853 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4854
4855 * configure.srv: Merge MIPS and MIPS64.
4856
4857 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4858
4859 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4860
4861 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
4862
4863 * Makefile.in: Add required vsx dependencies.
4864
4865 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4866 Declare init_registers_powerpc_vsx32l.
4867 Declare init_registers_powerpc_vsx64l.
4868 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4869 (ppc_arch_setup): Check for VSX in hwcap.
4870 (ppc_fill_vsxregset): New function.
4871 (ppc_store_vsxregset): New function.
4872 Add new VSX entry in regset_info target_regsets.
4873
4874 * configure.srv: Add new VSX dependencies.
4875
4876 2008-08-12 Pedro Alves <pedro@codesourcery.com>
4877
4878 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4879 (remote_open): Set or clear transport_is_reliable.
4880 (putpkt_binary): Don't expect acks in noack mode.
4881 (getpkt): Don't send ack/nac in noack mode.
4882 * server.c (handle_general_set): Handle QStartNoAckMode.
4883 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4884 qSupported.
4885 (main): Reset noack_mode on every connection.
4886 * server.h (noack_mode): Declare.
4887
4888 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4889
4890 * Makefile.in (GDBREPLAY_OBS): New variable.
4891 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4892
4893 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4894 Daniel Jacobowitz <dan@codesourcery.com>
4895
4896 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4897 (usr_store_inferior_registers): Likewise.
4898 (regsets_store_inferior_registers): Likewise.
4899
4900 2008-07-31 Rolf Jansen <rj@surtec.com>
4901 Pedro Alves <pedro@codesourcery.com>
4902
4903 * configure.ac: Check for memmem declaration.
4904 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4905 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4906 (disable_packet_qfThreadInfo): Unconditionally compile.
4907 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4908 * configure, config.in: Regenerate.
4909
4910 2008-07-28 Doug Kwan <dougkwan@google.com>
4911
4912 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4913 (linux_write_memory): Remove declaration of errno.
4914
4915 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4916
4917 * linux-low.c (handle_extended_wait): Do not use "status"
4918 variable uninitialized.
4919
4920 2008-07-07 Pedro Alves <pedro@codesourcery.com>
4921
4922 * server.c (handle_v_attach): Inhibit reporting dll changes.
4923
4924 2008-06-27 Pedro Alves <pedro@codesourcery.com>
4925
4926 * remote-utils.c (prepare_resume_reply): If requested, don't
4927 output "thread:TID" in the T stop reply.
4928
4929 * server.c (disable_packet_vCont, disable_packet_Tthread)
4930 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4931 (handle_query): If requested, disable support for qC, qfThreadInfo
4932 and qsThreadInfo.
4933 (handle_v_requests): If requested, disable support for vCont.
4934 (gdbserver_show_disableable): New.
4935 (main): Handle --disable-packet and --disable-packet=LIST.
4936
4937 * server.h (disable_packet_vCont, disable_packet_Tthread)
4938 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4939
4940 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4941
4942 * server.c (gdbserver_usage): Mention --version.
4943
4944 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4945
4946 * Makefile.in (gdbreplay.o): New rule.
4947
4948 2008-06-06 Joseph Myers <joseph@codesourcery.com>
4949
4950 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4951 message, not gdbserver.
4952
4953 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
4954 Nathan Sidwell <nathan@codesourcery.com>
4955 Joseph Myers <joseph@codesourcery.com>
4956
4957 * acinclude.m4: Include ../../config/acx.m4.
4958 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4959 * configure, config.in: Regenerate.
4960 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4961 * server.c (gdbserver_version): Print PKGVERSION.
4962 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4963 (main): Adjust gdbserver_usage calls.
4964 * gdbreplay.c (version, host_name): Add declarations.
4965 (gdbreplay_version, gdbreplay_usage): New.
4966 (main): Accept --version and --help options.
4967
4968 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4969
4970 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4971 (arm_breakpoint_at): Handle Thumb.
4972 (the_low_target): Add comment.
4973
4974 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4975
4976 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4977
4978 2008-05-09 Doug Evans <dje@google.com>
4979
4980 * server.h (decode_search_memory_packet): Declare.
4981 * remote-utils.c (decode_search_memory_packet): New fn.
4982 * server.c (handle_search_memory_1): New fn.
4983 (handle_search_memory): New fn.
4984 (handle_query): Process qSearch:memory packets.
4985
4986 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4987
4988 * regcache.c (registers_length): Remove.
4989 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4990 full register packet.
4991 * regcache.h (registers_length): Remove prototype.
4992 * server.h (PBUFSIZ): Define to 16384.
4993
4994 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4995
4996 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4997 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4998 powerpc-64l.o, and powerpc-altivec64l.o.
4999 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5000 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5001 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5002 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5003 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5004 to srv_xmlfiles.
5005
5006 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5007 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5008 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5009 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5010 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5011 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5012 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5013 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5014 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5015 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5016 (clean): Update.
5017
5018 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5019 (init_registers_powerpc_32l): ... this new prototype.
5020 (init_registers_powerpc_32): Remove, replace by ...
5021 (init_registers_powerpc_altivec32l): ... this new prototype.
5022 (init_registers_powerpc_e500): Remove, replace by ...
5023 (init_registers_powerpc_e500l): ... this new prototype.
5024 (init_registers_ppc64): Remove, replace by ...
5025 (init_registers_powerpc_64l): ... this new prototype.
5026 (init_registers_powerpc_64): Remove, replace by ...
5027 (init_registers_powerpc_altivec64l): ... this new prototype.
5028 (ppc_num_regs): Set to 73.
5029 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5030 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5031 (ppc_cannot_store_register): Handle orig_r3 and trap.
5032 (ppc_arch_setup): Update init_registers_... calls.
5033 (ppc_fill_gregset): Handle orig_r3 and trap.
5034
5035 * inferiors.c (clear_inferiors): Reset current_inferior.
5036
5037 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
5038
5039 * acinclude.m4: Add override.m4.
5040 * configure: Regenerate.
5041
5042 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5043
5044 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5045 initial call to init_register_ppc64.
5046
5047 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5048
5049 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
5050 powerpc*-*-linux* case.
5051 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5052
5053 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5054
5055 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
5056 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
5057 from reg_xmlfiles.
5058 * linux-ppc-low.c: Include <elf.h>.
5059 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5060 (ppc_hwcap): New global variable.
5061 (ppc_regmap): Remove __SPE__ #ifdef sections.
5062 (ppc_regmap_e500): New global variable.
5063 (ppc_cannot_store_register): Update __SPE__ special case.
5064 (ppc_get_hwcap): New function.
5065 (ppc_arch_setup): Use it to determine whether inferior supports
5066 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5067 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5068 Do not access registers if target does not support AltiVec.
5069 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5070 Do not access registers if target does not support SPE.
5071 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5072
5073 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5074
5075 * linux-low.c (disabled_regsets, num_regsets): New.
5076 (use_regsets_p): Delete.
5077 (linux_wait_for_process): Clear disabled_regsets.
5078 (regsets_fetch_inferior_registers): Check and set it.
5079 (regsets_store_inferior_registers): Likewise.
5080 (linux_fetch_registers, linux_store_registers): Do not use
5081 use_regsets_p.
5082 (initialize_low): Allocate disabled_regsets.
5083
5084 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5085
5086 * Makefile.in (LIBOBJS): New.
5087 (OBS): Use LIBOBJS.
5088 (memmem.o): New rule.
5089 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5090 * configure: Regenerated.
5091
5092 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5093
5094 * server.c (handle_query): Never return "unsupported" for
5095 qXfer:features:read queries.
5096
5097 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5098
5099 * server.c (get_features_xml): Fix inverted condition.
5100 (handle_query): Always support qXfer:feature:read.
5101
5102 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5103
5104 * server.c (wrapper_argv): New.
5105 (start_inferior): Handle wrapper_argv. If set, expect an extra
5106 trap.
5107 (gdbserver_usage): Document --wrapper.
5108 (main): Parse --wrapper.
5109
5110 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5111
5112 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5113 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5114 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5115 (ppc_set_pc): Likewise.
5116 (ppc_arch_setup): New function.
5117 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5118 of collect_register.
5119 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
5120
5121 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5122
5123 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5124 instead of linux-ppc64-low.o.
5125 * linux-ppc64-low.c: Remove file.
5126 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5127 (linux-ppc64-low.o): Remove rule.
5128
5129 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5130 (init_registers_powerpc_64): Likewise.
5131 (ppc_regmap): Conditionally define depending on __powerpc64__.
5132 (ppc_cannot_store_register): Do not special-case "fpscr" when
5133 compiled on __powerpc64__.
5134 (ppc_collect_ptrace_register): New function.
5135 (ppc_supply_ptrace_register): New function.
5136 (ppc_breakpoint): Change type to "unsigned int".
5137 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5138 (the_low_target): Conditionally provide initializers for the
5139 arch_setup member depending on __powerpc64__. Install
5140 collect_ptrace_register and supply_ptrace_register members.
5141
5142 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5143
5144 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5145 * server.c (gdbserver_xmltarget): Define.
5146 (get_features_xml): Use it to replace "target.xml" and arch_string.
5147
5148 * configure.srv: Remove srv_xmltarget. Add XML files that were
5149 mentioned there to srv_xmlfiles instead. Remove conditional tests
5150 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5151 srv_xmlfiles and srv_regobj to include all possible choices.
5152 * configure.ac (srv_xmltarget): Remove.
5153 (srv_xmlfiles): Do not add "target.xml".
5154 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5155 checks for supplementary target information.
5156 * configure: Regenerate.
5157 * Makefile.in (XML_TARGET): Remove.
5158 (target.xml): Remove rule.
5159 (clean): Do not clean up target.xml.
5160 (.PRECIOUS): Do not mention target.xml.
5161
5162 * target.h (struct target_ops): Remove arch_string member.
5163 * linux-low.c (linux_arch_string): Remove.
5164 (linux_target_ops): Remove arch_string initializer.
5165 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5166 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5167 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5168 * spu-low.c (spu_arch_string): Remove.
5169 (spu_target_ops): Remove arch_string initializer.
5170 * win32-low.c (win32_arch_string): Remove.
5171 (win32_target_ops): Remove arch_string initializer.
5172 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5173 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5174 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5175
5176 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5177
5178 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5179 by collect_ptrace_register and supply_ptrace_register hooks.
5180 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5181 instead of checking for the_low_target.left_pad_xfer.
5182 (usr_store_inferior_registers): Use collect_ptrace_register callback
5183 instead of checking for the_low_target.left_pad_xfer.
5184
5185 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5186 (s390_supply_ptrace_register): Likewise.
5187 (s390_fill_gregset): Call s390_collect_ptrace_register.
5188 (the_low_target): Update.
5189
5190 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5191 (ppc_supply_ptrace_register): Likewise.
5192 (the_low_target): Update.
5193
5194 * linux-i386-low.c (the_low_target): Update.
5195 * linux-x86-64-low.c (the_low_target): Update.
5196
5197 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5198
5199 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5200 reg-s390.o and reg-s390x.o.
5201
5202 * linux-low.c (new_inferior): New global variable.
5203 (linux_create_inferior, linux_attach): Set it.
5204 (linux_wait_for_process): Call the_low_target.arch_setup after the
5205 target has stopped for the first time.
5206 (initialize_low): Do not call the_low_target.arch_setup.
5207
5208 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5209 (s390_set_pc): Likewise.
5210 (s390_arch_setup): New function.
5211 (the_low_target): Use s390_arch_setup as arch_setup routine.
5212
5213 * regcache.c (realloc_register_cache): New function.
5214 (set_register_cache): Call it for each existing regcache.
5215
5216 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5217
5218 * server.h (init_registers): Remove prototype.
5219
5220 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5221 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5222 instead of init_registers ().
5223 * linux-arm-low.c (init_registers_arm): Add prototype.
5224 (init_registers_arm_with_iwmmxt): Likewise.
5225 (the_low_target): Add initializer for arch_setup field.
5226 * linux-cris-low.c (init_registers_cris): Add prototype.
5227 (the_low_target): Add initializer for arch_setup field.
5228 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5229 (the_low_target): Add initializer for arch_setup field.
5230 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5231 (the_low_target): Add initializer for arch_setup field.
5232 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5233 (the_low_target): Add initializer for arch_setup field.
5234 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5235 (the_low_target): Add initializer for arch_setup field.
5236 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5237 (the_low_target): Add initializer for arch_setup field.
5238 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5239 (init_registers_mips64_linux): Likewise.
5240 (the_low_target): Add initializer for arch_setup field.
5241 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5242 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5243 (the_low_target): Add initializer for arch_setup field.
5244 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5245 (init_registers_powerpc_64): Likewise.
5246 (the_low_target): Add initializer for arch_setup field.
5247 * linux-s390-low.c (init_registers_s390): Add prototype.
5248 (init_registers_s390x): Likewise.
5249 (the_low_target): Add initializer for arch_setup field.
5250 * linux-sh-low.c (init_registers_sh): Add prototype.
5251 (the_low_target): Add initializer for arch_setup field.
5252 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5253 (the_low_target): Add initializer for arch_setup field.
5254 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5255 (the_low_target): Add initializer for arch_setup field.
5256
5257 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5258 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5259 instead of init_registers ().
5260 * win32-arm-low.c (init_registers_arm): Add prototype.
5261 (the_low_target): Add initializer for arch_setup field.
5262 * win32-i386-low.c (init_registers_i386): Add prototype.
5263 (the_low_target): Add initializer for arch_setup field.
5264
5265 * spu-low.c (init_registers_spu): Add prototype.
5266 (initialize_low): Call initialie_registers_spu () instead of
5267 initialize_registers ().
5268
5269 2008-02-19 Pedro Alves <pedro@codesourcery.com>
5270
5271 * server.c (handle_v_requests): When handling the vRun and vAttach
5272 packets, if already debugging a process, don't kill it. Return an
5273 error instead.
5274
5275 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5276
5277 * server.c (handle_query): Correct length check.
5278
5279 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5280
5281 * win32-low.c (do_initial_child_stuff): Add process handle
5282 parameter. Set current_process_handle and current_process_id from the
5283 parameters. Clear globals.
5284 (win32_create_inferior): Don't set current_process_handle and
5285 current_process_id here. Instead pass them on the call to
5286 do_initial_child_stuff.
5287 (win32_attach): Likewise.
5288 (win32_clear_inferiors): New.
5289 (win32_kill): Don't close the current process handle or the
5290 current thread handle here. Instead call win32_clear_inferiors.
5291 (win32_detach): Don't open a new handle to the process. Call
5292 win32_clear_inferiors.
5293 (win32_join): Don't rely on current_process_handle; open a new
5294 handle using the process id.
5295 (win32_wait): Call win32_clear_inferiors when the inferior process
5296 has exited.
5297
5298 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5299
5300 * server.c (monitor_show_help): Add "exit".
5301
5302 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5303
5304 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5305 (clean): Add reg-xtensa.c.
5306 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5307 * configure.srv (xtensa*-*-linux*) New target.
5308 * linux-xtensa-low.c: New.
5309 * xtensa-xtregs.c: New.
5310
5311 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5312
5313 * hostio.c: Don't include errno.h.
5314 (errno_to_fileio_errno): Move to hostio-errno.
5315 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5316 error number outputting to the target->hostio_last_error callback.
5317 (hostio_packet_error): Use FILEIO_EINVAL directly.
5318 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5319 calls to hostio_error.
5320 * hostio-errno.c: New.
5321 * server.h (hostio_last_error_from_errno): Declare.
5322 * target.h (target_ops): Add hostio_last_error member.
5323 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5324 as hostio_last_error handler.
5325 * spu-low.c (spu_target_ops): Likewise.
5326 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5327 (wince_hostio_last_error): New functions.
5328 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5329 as hostio_last_error handler.
5330 (win32_target_ops) [!_WIN32_WCE]: Register
5331 hostio_last_error_from_errno as hostio_last_error handler.
5332 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5333 (hostio-errno.o): New rule.
5334 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5335 * configure.srv (srv_hostio_err_objs): New variable. Default to
5336 hostio-errno.o.
5337 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5338 * configure: Regenerate.
5339
5340 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5341
5342 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5343 (linux_kill, linux_detach): Clean up the process list.
5344 * remote-utils.c (remote_open): Improve port number parsing.
5345 (putpkt_binary, input_interrupt): Only send interrupts if the target
5346 is running.
5347 * server.c (extended_protocol): Make static.
5348 (attached): Define earlier.
5349 (exit_requested, response_needed, program_argv): New variables.
5350 (target_running): New.
5351 (start_inferior): Clear attached here.
5352 (attach_inferior): Set attached here.
5353 (require_running): Define.
5354 (handle_query): Use require_running and target_running. Implement
5355 "monitor exit".
5356 (handle_v_attach, handle_v_run): New.
5357 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5358 (gdbserver_usage): Update.
5359 (main): Redo argument parsing. Handle --debug and --multi. Handle
5360 --attach along with other options or after the port. Save
5361 program_argv. Support no initial program. Resynchronize
5362 communication with GDB after an error. Handle "monitor exit".
5363 Use require_running and target_running. Always allow the extended
5364 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5365 restart in extended mode.
5366 * README: Refer to the GDB manual. Update --attach usage.
5367
5368 2007-12-20 Andreas Schwab <schwab@suse.de>
5369
5370 * linux-low.c (STACK_SIZE): Define.
5371 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5372 (linux_test_for_tracefork): Likewise.
5373
5374 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5375
5376 * linux-low.c (linux_wait_for_event): Update messages. Do not
5377 reinsert auto-delete breakpoints.
5378 * mem-break.c (struct breakpoint): Change return type of handler to
5379 int.
5380 (set_breakpoint_at): Update handler type.
5381 (reinsert_breakpoint_handler): Return 1 instead of calling
5382 delete_breakpoint.
5383 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5384 setting a new one.
5385 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5386 * mem-break.h (set_breakpoint_at): Update handler type.
5387 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5388 * win32-low.c (auto_delete_breakpoint): New.
5389 (get_child_debug_event): Use it.
5390
5391 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5392
5393 * configure.ac: Check for pread and pwrite.
5394 * hostio.c (handle_pread): Fall back to lseek and read.
5395 (handle_pwrite): Fall back to lseek and write.
5396 * config.in, configure: Regenerated.
5397
5398 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5399
5400 * server.c (myresume): Add own_buf argument.
5401 (main): Update calls.
5402
5403 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5404
5405 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5406 * remote-utils.c (remote_open): Do not call disable_async_io.
5407 (block_async_io): Delete.
5408 (unblock_async_io): Make static.
5409 (initialize_async_io): New.
5410 * server.c (handle_v_cont): Handle async I/O here.
5411 (myresume): Likewise. Move other common resume tasks here...
5412 (main): ... from here. Call initialize_async_io. Disable async
5413 I/O before the main loop.
5414 * server.h (initialize_async_io): Declare.
5415 (block_async_io, unblock_async_io): Delete prototypes.
5416 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5417
5418 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5419
5420 * remote-utils.c (readchar): Allow binary data in received messages.
5421
5422 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5423
5424 * win32-low.c (attaching): New global.
5425 (win32_create_inferior): Clear the `attaching' global.
5426 (win32_attach): Set the `attaching' global.
5427 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5428 attaching. Only set a breakpoint at the entry point if not
5429 attaching.
5430
5431 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5432
5433 * server.c (main): Don't report dll events on the initial
5434 connection on attaches.
5435
5436 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5437
5438 * server.c (main): Relax numerical bases supported for the pid of
5439 the --attach command line argument.
5440
5441 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5442
5443 * win32-low.c (win32_attach): Call OpenProcess before
5444 DebugActiveProcess, not after. Add last error output to error
5445 call.
5446
5447 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5448
5449 * win32-low.c (win32_get_thread_context)
5450 (win32_set_thread_context): New functions.
5451 (thread_rec): Use win32_get_thread_context.
5452 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5453 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5454 field.
5455
5456 2007-12-03 Leo Zayas
5457 Pedro Alves <pedro_alves@portugalmail.pt>
5458
5459 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5460 global variables.
5461 (child_add_thread): Minor cleanup.
5462 (child_continue): Resume artificially suspended threads before
5463 calling ContinueDebugEvent.
5464 (suspend_one_thread): New.
5465 (fake_breakpoint_event): New.
5466 (get_child_debug_event): Change return type to int. Check here if
5467 gdb sent an interrupt request. If a soft interrupt was requested,
5468 fake a breakpoint event. Return 0 if there is no event to handle,
5469 and 1 otherwise.
5470 (win32_wait): Don't check here if gdb sent an interrupt request.
5471 Ensure there is a valid event to handle.
5472 (win32_request_interrupt): Add soft interruption method as last
5473 resort.
5474
5475 2007-12-03 Leo Zayas
5476 Pedro Alves <pedro_alves@portugalmail.pt>
5477
5478 * win32-low.h (win32_thread_info): Add descriptions to the
5479 structure members. Replace `suspend_count' counter by a
5480 `suspended' flag.
5481 * win32-low.c (thread_rec): Update condition of when to get the
5482 context from the inferior. Rely on ContextFlags being set if it
5483 has already been retrieved. Only suspend the inferior thread if
5484 we haven't already. Warn if that fails.
5485 (continue_one_thread): s/suspend_count/suspended/. Only call
5486 ResumeThread once. Warn if that fails.
5487
5488 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5489
5490 * win32-low.c (win32_wait): Don't read from the inferior when it
5491 has already exited.
5492
5493 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5494
5495 * Makefile.in (win32_low_h): New variable.
5496 (win32-low.o): Add dependency on $(win32_low_h).
5497 (win32-arm-low.o, win32-i386-low.o): New rules.
5498
5499 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5500
5501 * hostio.c: Correct copyright year.
5502
5503 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5504
5505 * Makefile.in (OBS): Add hostio.o.
5506 (hostio.o): New rule.
5507 * server.h (handle_vFile): Declare.
5508 * hostio.c: New file.
5509 * server.c (handle_v_requests): Take packet_len and new_packet_len
5510 for binary packets. Call handle_vFile.
5511 (main): Update call to handle_v_requests.
5512
5513 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5514
5515 * linux-low.c: Include <sched.h>.
5516
5517 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5518
5519 * linux-low.c (linux_tracefork_grandchild): New.
5520 (linux_tracefork_child): Use clone.
5521 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5522
5523 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5524
5525 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5526
5527 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5528
5529 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5530
5531 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5532
5533 * inferiors.c (change_inferior_id): Delete.
5534 (add_pid_to_list, pull_pid_from_list): New.
5535 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5536 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5537 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5538 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5539 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5540 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5541 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5542 (using_threads): Always set to 1.
5543 (handle_extended_wait): New.
5544 (add_process): Do not set TID.
5545 (linux_create_inferior): Set must_set_ptrace_flags.
5546 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5547 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5548 (linux_thread_alive): Rename TID argument to LWPID.
5549 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5550 (linux_wait_for_event): Do not use TID or check using_threads. Update
5551 call to dead_thread_notify. Call handle_extended_wait.
5552 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5553 (send_sigstop): Delete sigstop_sent.
5554 (wait_for_sigstop): Avoid TID.
5555 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5556 (linux_test_for_tracefork): New.
5557 (linux_lookup_signals): Use thread_db_active and
5558 linux_supports_tracefork_flag.
5559 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5560 * linux-low.h (get_process_thread): Avoid TID.
5561 (struct process_ifo): Move thread_known and tid to the end. Remove
5562 sigstop_sent.
5563 (linux_attach_lwp, thread_db_init): Update prototypes.
5564 * server.h (change_inferior_id): Delete prototype.
5565 (add_pid_to_list, pull_pid_from_list): New prototypes.
5566 * thread-db.c (thread_db_use_events): New.
5567 (find_first_thread): Rename to...
5568 (find_one_thread): ...this. Update callers and messages. Do not
5569 call fatal. Check thread_db_use_events. Do not call
5570 change_inferior_id or new_thread_notify.
5571 (maybe_attach_thread): Update. Do not call new_thread_notify.
5572 (thread_db_init): Set thread_db_use_events. Check use_events.
5573 * utils.c (fatal, warning): Correct message prefix.
5574
5575 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5576
5577 * Makefile.in (clean): Remove new files.
5578 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5579 (powerpc-64.o, powerpc-64.c): New rules.
5580 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5581 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5582 with SPE.
5583 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5584 SPE targets.
5585 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5586 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5587 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5588 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5589 (target_regsets): Add AltiVec and SPE register sets.
5590 * configure.ac: Check for AltiVec and SPE.
5591 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5592 (ppc_fill_vrregset, ppc_store_vrregset): New.
5593 (target_regsets): Add AltiVec register set.
5594 * configure: Regenerated.
5595
5596 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5597
5598 * linux-low.c (O_LARGEFILE): Define.
5599 (linux_read_memory): Use /proc/PID/mem.
5600 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5601 * configure, config.in: Regenerated.
5602
5603 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5604
5605 * linux-low.c (linux_wait_for_event): Do not pass signals while
5606 single-stepping.
5607
5608 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5609
5610 * win32-low.c (create_process): New.
5611 (win32_create_inferior): Use create_process instead of
5612 CreateProcess. If create_process failed retry appending an ".exe"
5613 suffix. Store the GetLastError result immediatelly after
5614 create_process calls and use it on the call to error.
5615
5616 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5617
5618 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5619
5620 2007-08-23 Joel Brobecker <brobecker@adacore.com>
5621
5622 * configure.ac: Switch license to GPLv3.
5623
5624 2007-08-01 Michael Snyder <msnyder@access-company.com>
5625
5626 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5627
5628 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5629
5630 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5631 typedef.
5632 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5633 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5634 CloseToolhelp32Snapshot.
5635 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5636 CloseToolhelp32Snapshot.
5637
5638 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
5639
5640 * server.c (main): Check for inferior exit before main loop.
5641
5642 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5643
5644 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5645 instead of on tmp_desc.
5646
5647 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5648 Daniel Jacobowitz <dan@codesourcery.com>
5649
5650 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5651 (add_thread): Minor cleanups.
5652 (clear_inferiors): Move lower in the file. Clear the DLL
5653 list.
5654 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5655 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5656 (xml_escape_text): New.
5657 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5658 for qSupported.
5659 (handle_v_cont): Report errors.
5660 (gdbserver_version): Update.
5661 (main): Correct size of own_buf. Do not report initial DLL events.
5662 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5663 (unloaded_dll, xml_escape_text): New.
5664 * win32-low.c (enum target_waitkind): Update comments.
5665 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5666 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5667 (win32_EnumProcessModules, win32_GetModuleInformation)
5668 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5669 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5670 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5671 (win32_Module32First, win32_Module32Next, load_toolhelp)
5672 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5673 (get_child_debug_event): Handle DLL events.
5674 (win32_wait): Likewise.
5675
5676 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5677
5678 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5679 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5680
5681 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5682
5683 * win32-low.c (handle_output_debug_string): Ignore event if not
5684 waiting.
5685
5686 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5687
5688 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5689
5690 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5691
5692 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5693
5694 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5695
5696 * inferiors.c (change_inferior_id): Add comment.
5697 * linux-low.c (check_removed_breakpoint): Add an early
5698 prototype. Improve debug output.
5699 (linux_attach): Doc update.
5700 (linux_detach_one_process, linux_detach): Clean up before releasing
5701 each process.
5702 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5703 * linux-low.h (struct process_info): Doc improvement.
5704 * mem-break.c (delete_all_breakpoints): New.
5705 * mem-break.h (delete_all_breakpoints): New prototype.
5706 * thread-db.c (find_first_thread): New.
5707 (thread_db_create_event): Call it instead of
5708 thread_db_find_new_threads. Clean up unused variables.
5709 (maybe_attach_thread): Remove first thread handling.
5710 (thread_db_find_new_threads): Use find_first_thread.
5711 (thread_db_get_tls_address): Likewise.
5712
5713 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5714
5715 * thread-db.c (thread_db_find_new_threads): Add prototype.
5716 (thread_db_create_event): Check for the main thread before adding
5717 a new thread.
5718 (maybe_attach_thread): Only enable event reporting if TID == 0.
5719 (thread_db_get_tls_address): Check for new threads.
5720
5721 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5722
5723 * linux-low.c (linux_create_inferior): Try execv before execvp.
5724 * spu-low.c (spu_create_inferior): Likewise.
5725
5726 2007-06-13 Mike Frysinger <vapier@gentoo.org>
5727
5728 * linux-low.c (linux_create_inferior): Change execv to execvp.
5729 * spu-low.c (spu_create_inferior): Likewies.
5730
5731 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5732
5733 * Makefile.in (clean): Clean new files instead of deleted ones.
5734 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5735 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5736 rules.
5737 * configure.srv: Specify XML files and new regformats for MIPS and
5738 MIPS64 GNU/Linux.
5739 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5740 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5741 an entry for the restart register.
5742 (mips_cannot_fetch_register, mips_cannot_store_register)
5743 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5744 register names to match the XML descriptions.
5745 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5746 restart register instead of $0.
5747
5748 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5749 Markus Deuling <deuling@de.ibm.com>
5750
5751 * remote-utils.c (decode_xfer_write): New function.
5752 * server.h (decode_xfer_write): Add prototype.
5753 * server.c (handle_query): Add PACKET_LEN argument. Support
5754 qXfer:spu:read and qXfer:spu:write packets.
5755 (main): Pass packet_len to handle_query.
5756 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5757 * target.h (target_ops): Add qxfer_spu.
5758
5759 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5760
5761 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5762 accessing non-seekable spufs files.
5763
5764 2007-05-16 Markus Deuling <deuling@de.ibm.com>
5765
5766 * server.c (handle_query): Add reply for qC packet.
5767
5768 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5769 Leo Zayas <lerele@champenstudios@com>
5770
5771 * server.h (check_remote_input_interrupt_request): New function.
5772 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5773 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5774 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5775 (check_remote_input_interrupt_request): New function.
5776 * server.h (check_remote_input_interrupt_request): Declare.
5777 * win32-low.c (winapi_DebugBreakProcess,
5778 winapi_GenerateConsoleCtrlEvent): New typedefs.
5779 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5780 to 250 ms.
5781 (win32_wait): Check for remote interrupt request
5782 with check_remote_input_interrupt_request.
5783 (win32_request_interrupt): New function.
5784 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5785
5786 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5787
5788 * win32-low.c (debug_registers_changed,
5789 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5790 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5791 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5792 (thread_rec): Get context using the low target.
5793 (child_add_thread): Call thread_added on the low target,
5794 which does the same thing.
5795 (regptr): Delete.
5796 (do_initial_child_stuff): Remove debug registers references.
5797 Set context using the low target. Resume threads after
5798 setting the contexts.
5799 (child_continue): Remove dead variable. Remove debug
5800 registers references.
5801 (child_fetch_inferior_registers): Go through the low target.
5802 (do_child_store_inferior_registers): Remove.
5803 (child_store_inferior_registers): Go through the low target.
5804 (win32_resume): Remove debug registers references.
5805 Set context using the low target.
5806 (handle_exception): Change return type to void. Don't record
5807 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5808 first chance exception.
5809 (get_child_debug_event): Change return type to void. Remove
5810 goto loop. Always return after waiting for debug event.
5811 (win32_wait): Convert to switch statement. Handle spurious
5812 events.
5813
5814 * win32-i386-low.c (debug_registers_changed,
5815 debug_registers_used): New.
5816 (initial_stuff): Rename to ...
5817 (i386_initial_stuff): ... this. Clear debug registers
5818 state variables.
5819 (store_debug_registers): Delete.
5820 (i386_get_thread_context): New.
5821 (load_debug_registers): Delete.
5822 (i386_set_thread_context): New.
5823 (i386_thread_added): New.
5824 (single_step): Rename to ...
5825 (i386_single_step): ... this.
5826 (do_fetch_inferior_registers): Rename to ...
5827 (i386_fetch_inferior_register): ... this.
5828 (i386_store_inferior_register): New.
5829 (the_low_target): Adapt to new interface.
5830
5831 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5832 (arm_get_thread_context): New.
5833 (arm_set_thread_context): New.
5834 (regptr): New.
5835 (do_fetch_inferior_registers): Rename to ...
5836 (arm_fetch_inferior_register): ... this.
5837 (arm_store_inferior_register): New.
5838 (arm_wince_breakpoint): Reimplement as unsigned long.
5839 (arm_wince_breakpoint_len): Define.
5840 (the_low_target): Adapt to new interface.
5841
5842 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5843 load_debug_registers. Add get_thread_context, set_thread_context,
5844 thread_added and store_inferior_register. Rename
5845 fetch_inferior_registers to fetch_inferior_register.
5846 (regptr): Remove declaration.
5847
5848 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5849
5850 * linux-low.c (linux_detach): Change return type to int. Return 0.
5851 * spu-low.c (spu_detach): Likewise.
5852
5853 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5854
5855 * target.h (target_ops): Change return type of detach to int.
5856 Add join.
5857 (join_inferior): New.
5858 * server.c (main): Don't skip detach support on mingw32.
5859 If the inferior doesn't support detaching return error.
5860 Call join_inferior instead of using waitpid.
5861 * linux-low.c (linux_join): New.
5862 (linux_target_op): Add linux_join.
5863 * spu-low.c (spu_join): New.
5864 (spu_target_ops): Add spu_join.
5865 * win32-low.c (win32_detach): Adapt to new interface.
5866 Reopen current_process_handle before detaching. Issue a child
5867 resume before detaching.
5868 (win32_join): New.
5869 (win32_target_op): Add win32_join.
5870
5871 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5872
5873 * win32-low.c (win32-attach): Fix return value.
5874 * target.h (target_ops): Describe ATTACH return values.
5875
5876 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5877
5878 * win32-low.c (GETPROCADDRESS): Define.
5879 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5880 (winapi_DebugSetProcessKillOnExit): Likewise.
5881 (win32_create_inferior): Force usage of ansi CreateProcessA.
5882 (win32_attach): Use GETPROCADDRESS.
5883 (win32_detach): Likewise.
5884
5885 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5886
5887 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5888
5889 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5890
5891 * win32-low.c: Commit leftover changes from 2007-03-29.
5892
5893 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5894
5895 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5896 fields short instead of int. Add explicit padding.
5897 (i387_cache_to_fsave): Remove unnecessary casts.
5898 (i387_fsave_to_cache): Doc fix.
5899 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5900
5901 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5902
5903 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5904 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5905
5906 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5907
5908 * configure.srv (arm*-*-mingw32ce*): Move near the other
5909 arm targets.
5910
5911 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5912
5913 * configure.ac: Add errno checking.
5914 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5915 sys/file.h and malloc.h.
5916 (AC_CHECK_DECLS): Add perror.
5917 (srv_mingwce): Handle.
5918 * configure.srv (i[34567]86-*-cygwin*): Add
5919 win32-i386-low.o to srv_tgtobj.
5920 (i[34567]86-*-mingw*): Likewise.
5921 (arm*-*-mingw32ce*): Add case.
5922 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5923 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5924 [__MINGW32CE__] (strerror): New function.
5925 [__MINGW32CE__] (errno): Define to GetLastError.
5926 [__MINGW32CE__] (COUNTOF): New macro.
5927 (remote_open): Remove extra close call.
5928 * mem-break.c (delete_breakpoint_at): New function.
5929 * mem-break.h (delete_breakpoint_at): Declare.
5930 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5931 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5932 [USE_WIN32API] (read, write): Add char* casts.
5933 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5934 * server.h: Include wincecompat.h on Windows CE.
5935 [HAVE_ERRNO_H]: Check.
5936 (perror): Declare if not declared.
5937 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5938 (perror_with_name): Remove errno declaration.
5939 * wincecompat.h: New.
5940 * wincecompat.c: New.
5941 * win32-low.h: New.
5942 * win32-arm-low.c: New.
5943 * win32-i386-low.c: New.
5944 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5945 (OUTMSG2): Make it safe.
5946 (_T): New macro.
5947 (COUNTOF): New macro.
5948 (NUM_REGS): Get it from the low target.
5949 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5950 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5951 (thread_rec): Let low target handle debug registers.
5952 (child_add_thread): Likewise.
5953 (child_init_thread_list): Likewise.
5954 (continue_one_thread): Likewise.
5955 (regptr): New.
5956 (do_child_fetch_inferior_registers): Move to ...
5957 * win32-i386-low.c: ... here, and rename to ...
5958 (do_fetch_inferior_registers): ... this.
5959 * win32-low.c (child_fetch_inferior_registers):
5960 Go through the low target.
5961 (do_child_store_inferior_registers): Use regptr.
5962 (strwinerror): New function.
5963 (win32_create_inferior): Handle Windows CE.
5964 Use strwinerror instead of strerror on Windows error
5965 codes. Add program to the error output.
5966 Don't close the main thread handle on Windows CE.
5967 (win32_attach): Use coredll.dll on Windows CE.
5968 (win32_kill): Close current process and current
5969 thread handles.
5970 (win32_detach): Use coredll.dll on Windows CE.
5971 (win32_resume): Let low target handle debug registers, and
5972 step request.
5973 (handle_exception): Add/Remove initial breakpoint. Avoid
5974 non-existant WSTOPSIG on Windows CE.
5975 (win32_read_inferior_memory): Cast to remove warning.
5976 (win32_arch_string): Go through the low target.
5977 (initialize_low): Call set_breakpoint_data with the low
5978 target's breakpoint.
5979 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5980 FOP_REGNUM, mappings): Move to ...
5981 * win32-i386-low.c: ... here.
5982 * win32-low.c (win32_thread_info): Move to ...
5983 * win32-low.h: ... here.
5984 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5985 win32-arm-low.c and wincecompat.c.
5986 (all:): Add $EXEEXT.
5987 (install-only:): Likewise.
5988 (gdbserver:): Likewise.
5989 (gdbreplay:): Likewise.
5990 * config.in: Regenerate.
5991 * configure: Regenerate.
5992
5993 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5994
5995 * win32-low.c: Rename typedef thread_info to
5996 win32_thread_info throughout.
5997
5998 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5999
6000 * win32-i386-low.c: Rename to ...
6001 * win32-low.c: ... this.
6002 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6003 * Makefile.in: Likewise.
6004
6005 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6006
6007 * remote-utils.c (monitor_output): Constify msg parameter.
6008 * server.h (monitor_output): Likewise.
6009 * win32-i386-low.c (handle_output_debug_string): New.
6010 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6011 handle_output_debug_string.
6012 (get_child_debug_event): Likewise.
6013
6014 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6015
6016 * server.c (main): Correct strtoul check.
6017
6018 2007-03-27 Jon Ringle <jon@ringle.org>
6019
6020 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6021
6022 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6023
6024 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6025
6026 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6027
6028 * terminal.h: Check HAVE_SGTTY_H.
6029
6030 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6031
6032 * remote-utils.c (remote_open): Print out the assigned port number.
6033
6034 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6035
6036 * remote-utils.c (monitor_output): New function.
6037 * server.c (debug_threads): Define here.
6038 (monitor_show_help): New function.
6039 (handle_query): Handle qRcmd.
6040 (main): Do not handle 'd' packet.
6041 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6042 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6043 of debug_threads.
6044
6045 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6046
6047 * Makefile.in (EXEEXT): New.
6048 (clean): Use $(EXEEXT).
6049
6050 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6051
6052 * target.h (target_ops): Rename send_signal to request_interrupt,
6053 and remove enum target_signal parameter.
6054 * linux-low.c (linux_request_interrupt): Rename from
6055 linux_send_signal, and always send SIGINT.
6056 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6057 and always send SIGINT.
6058 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6059 of send_signal.
6060 (input_interrupt): Likewise.
6061
6062 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6063
6064 * server.c (get_features_xml): Check if target implemented
6065 arch_string.
6066 * win32-i386-low.c (win32_arch_string): New.
6067 (win32_target_ops): Add win32_arch_string as arch_string member.
6068
6069 2007-02-22 Markus Deuling <deuling@de.ibm.com>
6070
6071 * spu-low.c (spu_arch_string): New.
6072 (spu_target_ops): Add spu_arch_string.
6073
6074 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6075
6076 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6077 * configure.ac: Do not check for terminal.h.
6078 * configure, config.in: Regenerated.
6079
6080 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6081
6082 * Makefile.in (OBS): Add $(XML_BUILTIN).
6083 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6084 (clean): Update.
6085 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6086 (arm-with-iwmmxt.c): New.
6087 * config.in, configure: Regenerate.
6088 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6089 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6090 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6091 (arm*-*-linux*): Add iWMMXt and regset support.
6092 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6093 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6094 (arm_store_wmmxregset, target_regsets): New.
6095 * server.c (get_features_xml): Take annex argument. Check builtin
6096 XML documents.
6097 (handle_query): Handle multiple annexes.
6098
6099 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6100
6101 * remote-utils.c [USE_WIN32API] (read, write): Define.
6102 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6103 write.
6104
6105 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6106
6107 * linux-i386-low.c (the_low_target): Set arch_string.
6108 * linux-x86-64-low.c (the_low_target): Likewise.
6109 * linux-low.c (linux_arch_string): New.
6110 (linux_target_ops): Add it.
6111 * linux-low.h (struct linux_target_ops): Add arch_string.
6112 * server.c (write_qxfer_response): Use const void * for DATA.
6113 (get_features_xml): New.
6114 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6115 * target.h (struct target_ops): Add arch_string method.
6116
6117 2007-01-03 Denis Pilat <denis.pilat@st.com>
6118 Daniel Jacobowitz <dan@codesourcery.com>
6119
6120 * linux-low.c (linux_kill): Handle being called with no threads.
6121 * win32-i386-low.c (win32_kill): Likewise.
6122 (get_child_debug_event): Clear current_process_handle.
6123
6124 2006-12-30 Denis PILAT <denis.pilat@st.com>
6125 Daniel Jacobowitz <dan@codesourcery.com>
6126
6127 * remote-utils.c (remote_open): Check the type of specified
6128 serial port devices before opening them.
6129 * server.c (main): Kill the inferior if an error occurs during
6130 the first remote_open.
6131
6132 2006-12-05 Markus Deuling <deuling@de.ibm.com>
6133
6134 * README: Update supported targets.
6135
6136 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6137
6138 * Makefile.in (clean): Remove reg-mips64.c.
6139 (reg-mips64.c, reg-mips64.o): New rules.
6140 * configure.srv: Handle mips64. Include regset support for mips.
6141 * linux-mips-low.c (union mips_register): New.
6142 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6143 (mips_breakpoint, mips_breakpoint_at): Use int.
6144 (mips_collect_register, mips_supply_register)
6145 (mips_collect_register_32bit, mips_supply_register_32bit)
6146 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6147 (mips_store_fpregset, target_regsets): New.
6148 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6149
6150 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6151
6152 * configure.srv: Add target "spu*-*-*".
6153 * Makefile.in (clean): Remove reg-spu.c.
6154 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6155 * spu-low.c: New file.
6156
6157 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6158
6159 * configure.ac: Correct td_thr_tls_get_addr test.
6160 * configure: Regenerated.
6161
6162 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6163
6164 * linux-low.c (linux_wait_for_event): Reformat. Use the
6165 pass_signals array.
6166 * remote-utils.c (decode_address_to_semicolon): New.
6167 * server.c (pass_signals, handle_general_set): New.
6168 (handle_query): Mention QPassSignals for qSupported.
6169 (main): Call handle_general_set.
6170 * server.h (pass_signals, decode_address_to_semicolon): New.
6171
6172 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6173
6174 * server.c (handle_query): Correct error handling for read_auxv.
6175
6176 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6177
6178 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6179 and srv_linux_thread_db to yes.
6180 * linux-s390-low.c (s390_fill_gregset): New function.
6181 (target_regsets): Define data structure.
6182
6183 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6184
6185 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6186 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6187 * config.in, configure: Regenerated.
6188 * inferiors.c (gdb_id_to_thread): New function.
6189 (gdb_id_to_thread_id): Use it.
6190 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6191 * linux-low.h (struct process_info): Add th member.
6192 (thread_db_get_tls_address): New prototype.
6193 * remote-utils.c (decode_address): Make non-static.
6194 * server.c (handle_query): Handle qGetTLSAddr.
6195 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6196 * target.h (struct target_ops): Add get_tls_address.
6197 * thread-db.c (maybe_attach_thread): Save the thread handle.
6198 (thread_db_get_tls_address): New.
6199
6200 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6201
6202 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6203 (linux_resume_one_process): Take a siginfo_t *. Update all
6204 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6205 (struct pending_signals): Add a siginfo_t.
6206 (linux_wait_for_process): Always set last_status.
6207 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6208 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6209 * linux-low.h (struct process_info): Add last_status.
6210
6211 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6212
6213 * remote-utils.c (try_rle): New function.
6214 (putpkt_binary): Use it.
6215
6216 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6217
6218 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6219 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6220 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6221 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6222 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6223 point registers.
6224
6225 2006-08-08 Richard Sandiford <richard@codesourcery.com>
6226
6227 * server.c (terminal_fd): New variable.
6228 (old_foreground_pgrp): Likewise.
6229 (restore_old_foreground_pgrp): New function.
6230 (start_inferior): Record the terminal file descriptor in terminal_fd
6231 and its original foreground group in old_foreground_pgrp. Register
6232 restore_old_foreground_pgrp with atexit().
6233
6234 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6235
6236 * server.c (handle_query): Correct qPart to qXfer.
6237
6238 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6239
6240 * configure.ac: Check for more headers which are missing on
6241 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6242 * configure.srv: Add Cygwin and mingw32.
6243 * remote-utils.c: Don't include headers unconditionally which
6244 are missing on mingw32. Include <winsock.h> for mingw32.
6245 (remote_open): Adjust for mingw32 support. Flush
6246 standard error after writing to it.
6247 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6248 (unblock_async_io, enable_async_io, disable_async_io)
6249 (readchar, getpkt): Update for Winsock support.
6250 (prepare_resume_reply): Expect a protocol signal number.
6251 * server.c: Disable <sys/wait.h> on mingw32.
6252 (start_inferior): Adjust for mingw32 support. Flush
6253 standard error after writing to it.
6254 (attach_inferior): Likewise. Use protocol signal
6255 numbers.
6256 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6257 and names.
6258 * win32-i386-low.c: New file.
6259 * Makefile.in (XM_CLIBS): Set.
6260 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6261 (win32-i386-low.o): New dependency rule.
6262 * linux-low.c (linux_wait): Use target signal numbers.
6263 * target.h (struct target_ops): Doc fix.
6264 * server.h (target_signal_to_name): New prototype.
6265 * gdbreplay.c: Don't include headers unconditionally which
6266 are missing on mingw32. Include <winsock.h> for mingw32.
6267 (remote_close, remote_open): Adjust for Winsock support.
6268 * configure, config.in: Regenerated.
6269
6270 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6271
6272 * server.c (decode_xfer_read, write_qxfer_response): New.
6273 (handle_query): Take a packet length argument. Handle
6274 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6275 the qSupported response.
6276 (main): Update call to handle_query.
6277
6278 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6279
6280 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6281 (putpkt_binary): Renamed from putpkt and adjusted for binary
6282 data.
6283 (putpkt): New wrapper for putpkt_binary.
6284 (readchar): Don't mask off the high bit.
6285 (decode_X_packet): New function.
6286 * server.c (main): Call putpkt_binary if a handler sets the packet
6287 length. Save the length of the incoming packet. Handle 'X'.
6288 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6289
6290 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6291
6292 * server.c (handle_query): Handle qSupported.
6293
6294 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6295
6296 * remote-utils.c (all_symbols_looked_up): New variable.
6297 (look_up_one_symbol): Check it.
6298 * server.h (look_up_one_symbol): New declaration.
6299 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6300
6301 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6302
6303 * Makefile.in (linux-arm-low.o): Update dependencies.
6304 * linux-arm-low.c: Include "gdb_proc_service.h".
6305 (PTRACE_GET_THREAD_AREA): Define.
6306 (ps_get_thread_area): New function.
6307
6308 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6309
6310 * configure.srv (m68k*-*-uclinux*): New target.
6311 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6312 (linux_resume_one_process): Remove extraneous cast.
6313 (linux_read_offsets): New.
6314 (linux_target_op): Add linux_read_offsets on mmuless systems.
6315 * server.c (handle_query): Add qOffsets logic.
6316 * target.h (struct target_ops): Add read_offsets.
6317
6318 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6319
6320 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6321 (PTRACE_GET_THREAD_AREA): Define.
6322 (ps_get_thread_area): New function.
6323 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6324 (linux-x86-64-low.o): Update.
6325
6326 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6327
6328 * configure.ac: Remove checks for prfpregset_t.
6329 * gdb_proc_service.h: New file.
6330 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6331 new "gdb_proc_service.h".
6332 * proc-service.c: Likewise.
6333 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6334 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6335 * Makefile.in (gdb_proc_service_h): Updated.
6336 * configure, config.in: Regenerated.
6337
6338 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6339
6340 * remote-utils.c (prepare_resume_reply): Move declaration
6341 of gdb_id_from_wait to the top of the block.
6342
6343 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6344
6345 * linux-low.c (regsets_store_inferior_registers): Read the regset
6346 from the target before filling it.
6347
6348 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6349
6350 * server.c (attach_inferior): Return SIGTRAP for a successful
6351 attach.
6352
6353 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6354
6355 * Makefile.in (OBS): Add version.o.
6356 (STAGESTUFF): Delete.
6357 (version.o): Add dependencies.
6358 (version.c): Replace rule.
6359 (clean): Remove version.c.
6360 * server.c (gdbserver_version): New.
6361 (gdbserver_usage): Use printf.
6362 (main): Handle --version and --help.
6363 * server.h (version, host_name): Add declarations.
6364
6365 2005-12-23 Eli Zaretskii <eliz@gnu.org>
6366
6367 * linux-arm-low.c:
6368 * linux-arm-low.c:
6369 * inferiors.c:
6370 * i387-fp.h:
6371 * i387-fp.c:
6372 * gdbreplay.c:
6373 * regcache.c:
6374 * proc-service.c:
6375 * mem-break.h:
6376 * mem-break.c:
6377 * linux-x86-64-low.c:
6378 * linux-sh-low.c:
6379 * linux-s390-low.c:
6380 * linux-ppc64-low.c:
6381 * linux-ppc-low.c:
6382 * linux-mips-low.c:
6383 * linux-m68k-low.c:
6384 * linux-m32r-low.c:
6385 * linux-low.h:
6386 * linux-low.c:
6387 * linux-ia64-low.c:
6388 * linux-i386-low.c:
6389 * linux-crisv32-low.c:
6390 * thread-db.c:
6391 * terminal.h:
6392 * target.h:
6393 * target.c:
6394 * server.h:
6395 * server.c:
6396 * remote-utils.c:
6397 * regcache.h:
6398 * utils.c:
6399 * Makefile.in:
6400 * configure.ac:
6401 * gdbserver.1: Add (C) after Copyright. Update the FSF
6402 address.
6403
6404 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6405
6406 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6407 (arm_breakpoint_at): Recognize both breakpoints.
6408 (the_low_target): Use the correct breakpoint instruction.
6409
6410 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6411
6412 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6413 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6414 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6415 (the_low_target): Update.
6416
6417 2005-10-25 Andreas Schwab <schwab@suse.de>
6418
6419 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6420
6421 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6422 (ia64_num_regs): Reduce to 462.
6423
6424 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6425
6426 * acinclude.m4: Correct quoting.
6427 * aclocal.m4: Regenerated.
6428
6429 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6430 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6431 (thread_db_init): Call thread_db_err_str.
6432 * configure.ac: Check for TD_VERSION.
6433 * config.in, configure: Regenerated.
6434
6435 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6436
6437 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6438
6439 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6440
6441 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6442 is not available. Define HAVE_PTRACE_GETREGS if it is.
6443 * config.in, configure: Regenerated.
6444 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6445 * linux-i386-low.c, linux-m68k-low.c: Update to use
6446 HAVE_PTRACE_GETREGS.
6447 * linux-low.c (regsets_fetch_inferior_registers)
6448 (regsets_store_inferior_registers): Only return 0 if we processed
6449 GENERAL_REGS.
6450 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6451 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6452
6453 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6454
6455 * inferiors.c (struct thread_info): Add gdb_id.
6456 (add_thread): Add gdb_id argument.
6457 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6458 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6459 calls to add_thread.
6460 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6461 * server.c (handle_query): Use thread_to_gdb_id.
6462 (handle_v_cont, main): Use gdb_id_to_thread_id.
6463 * server.h (add_thread): Update prototype.
6464 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6465 prototypes.
6466
6467 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6468
6469 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6470 left-padded registers.
6471 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6472 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6473
6474 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6475
6476 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6477 * configure: Regenerate.
6478 * config.in: Regenerate.
6479 * server.h (NEED_DECLARATION_STRERROR):
6480 Replace with !HAVE_DECL_STRERROR.
6481
6482 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6483
6484 * linux-low.c (linux_wait, linux_send_signal): Don't test
6485 an unsigned long variable for > 0 if it could be MAX_ULONG.
6486 * server.c (myresume): Likewise.
6487 * target.c (set_desired_inferior): Likewise.
6488
6489 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6490
6491 * configure.ac: Simplify and improve check for socklen_t.
6492 * configure, config.in: Regenerate.
6493
6494 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6495
6496 * acconfig.h: Remove.
6497 * configure.ac: Add a test for socklen_t. Use three-argument
6498 AC_DEFINE throughout.
6499 * config.in: Regenerated using autoheader 2.59.
6500 * configure: Regenerated.
6501
6502 * gdbreplay.c (socklen_t): Provide a default.
6503 (remote_open): Use socklen_t.
6504 * remote-utils.c (socklen_t): Provide a default.
6505 (remote_open): Use socklen_t.
6506 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6507 unsigned char.
6508
6509 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6510 char for buffers.
6511 * linux-low.c (linux_read_memory, linux_write_memory)
6512 (linux_read_auxv): Likewise.
6513 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6514 (check_mem_write): Likewise.
6515 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6516 Likewise.
6517 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6518 (registers_from_string, register_data): Likewise.
6519 * server.c (handle_query, main): Likewise.
6520 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6521 (decode_M_packet): Likewise.
6522 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6523 * target.h (struct target_ops): Update read_memory, write_memory,
6524 and read_auxv.
6525 (read_inferior_memory, write_inferior_memory): Update.
6526 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6527 to unsigned char *.
6528 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6529 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6530 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6531 linux-s390-low.c, linux-sh-low.c: Update for changes in
6532 read_inferior_memory and the_low_target->breakpoint.
6533
6534 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6535
6536 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6537 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6538 * configure.srv: Add powerpc64-*-linux*.
6539 * linux-ppc64-low.c: New file.
6540
6541 2005-05-23 Orjan Friberg <orjanf@axis.com>
6542
6543 * linux-cris-low.c: New file with support for CRIS.
6544 * linux-crisv32-low.c: Ditto for CRISv32.
6545 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6546 (clean): Add reg-cris.c and reg-crisv32.c.
6547 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6548 reg-crisv32.o, and reg-crisv32.c to make rules.
6549 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6550 recognized targets.
6551
6552 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6553
6554 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6555 of sizeof (PTRACE_XFER_TYPE).
6556 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6557
6558 2005-05-12 Orjan Friberg <orjanf@axis.com>
6559
6560 * target.h (struct target_ops): Add insert_watchpoint,
6561 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6562 pointers for hardware watchpoint support.
6563 * linux-low.h (struct linux_target_ops): Ditto.
6564 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6565 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6566 to linux_target_ops.
6567 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6568 reply packet.
6569 * server.c (main): Recognize 'Z' and 'z' packets.
6570
6571 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6572
6573 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6574 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6575 (the_low_target): Add new members.
6576
6577 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6578
6579 * proc-service.c (ps_lgetregs): Search all_processes instead of
6580 all_threads.
6581
6582 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6583
6584 * server.c (start_inferior): Change return type to int.
6585 (attach_inferior): Change sigptr to int *.
6586 (handle_v_cont, handle_v_requests): Change signal to int *.
6587 (main): Change signal to int.
6588
6589 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6590
6591 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6592 * configure.srv: Add m32r*-*-linux*.
6593 * linux-m32r-low.c: New file.
6594
6595 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6596
6597 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6598
6599 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6600
6601 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6602 Take unsigned long arguments for PIDs.
6603 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6604 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6605 (wait_for_sigstop, linux_resume_one_process)
6606 (regsets_fetch_inferior_registers, linux_send_signal)
6607 (linux_read_auxv): Likewise. Update the types of variables holding
6608 PIDs. Update format string specifiers.
6609 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6610 * remote-utils.c (prepare_resume_reply): Likewise.
6611 * server.c (cont_thread, general_thread, step_thread)
6612 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6613 unsigned long.
6614 (handle_query): Update format specifiers.
6615 (handle_v_cont, main): Use strtoul for thread IDs.
6616 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6617 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6618 (general_thread, step_thread, thread_from_wait)
6619 (old_thread_from_wait): Update.
6620 * target.h (struct thread_resume): Use unsigned long for THREAD.
6621 (struct target_ops): Use unsigned long for arguments to attach and
6622 thread_alive.
6623
6624 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6625
6626 * acinclude.m4: Include bfd/bfd.m4 directly.
6627 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6628 <agriffis@toolchain.org>.
6629 * aclocal.m4, configure: Regenerated.
6630
6631 2005-01-07 Andrew Cagney <cagney@gnu.org>
6632
6633 * configure.ac: Rename configure.in, require autoconf 2.59.
6634 * configure: Re-generate.
6635
6636 2004-12-08 Daniel Jacobowitz <dan@debian.org>
6637
6638 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6639 LIBS when finished.
6640 * aclocal.m4: Regenerated.
6641 * configure: Regenerated.
6642
6643 2004-11-21 Andreas Schwab <schwab@suse.de>
6644
6645 * linux-m68k-low.c (m68k_num_gregs): Define.
6646 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6647 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6648 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6649 (m68k_breakpoint_at): New. Add to the_low_target.
6650
6651 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6652 srv_linux_thread_db to yes.
6653
6654 2004-10-20 Joel Brobecker <brobecker@gnat.com>
6655
6656 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6657 (ARCH_SET_FS): Likewise.
6658 (ARCH_GET_FS): Likewise.
6659 (ARCH_GET_GS): Likewise.
6660
6661 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6662
6663 * linux-i386-low.c (ps_get_thread_area): New.
6664 * linux-x86-64-low.c (ps_get_thread_area): New.
6665 * linux-low.c: Include <sys/syscall.h>.
6666 (linux_kill_one_process): Don't kill the first thread here.
6667 (linux_kill): Kill the first thread here.
6668 (kill_lwp): New function.
6669 (send_sigstop, linux_send_signal): Use it.
6670 * proc-service.c: Clean up #ifdefs.
6671 (fpregset_info): Delete.
6672 (ps_lgetregs): Update and enable implementation.
6673 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6674 implementations.
6675 * remote-utils.c (struct sym_cache, symbol_cache): New.
6676 (input_interrupt): Print a clearer message.
6677 (async_io_enabled): New variable.
6678 (enable_async_io, disable_async_io): Use it. Update comments.
6679 (look_up_one_symbol): Use the symbol cache.
6680 * thread-db.c (thread_db_look_up_symbols): New function.
6681 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6682
6683 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6684
6685 * configure.in: Test for -rdynamic.
6686 * configure: Regenerated.
6687 * Makefile (INTERNAL_LDFLAGS): New.
6688 (gdbserver, gdbreplay): Use it.
6689
6690 2004-09-02 Andrew Cagney <cagney@gnu.org>
6691
6692 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6693
6694 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
6695
6696 * linux-low.c (linux_wait): Clear all_processes list also.
6697
6698 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6699
6700 * linux-low.c: Include <errno.h>. Remove extern declaration of
6701 errno.
6702
6703 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6704
6705 * gdbreplay.c, server.h, utils.c: Update copyright years.
6706
6707 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6708
6709 * server.c (main): Print child status or termination signal from
6710 variable 'signal', not 'sig'.
6711
6712 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6713
6714 * linux-low.c (linux_read_memory): Change return type to
6715 int. Check for and return error from ptrace().
6716 * target.c (read_inferior_memory): Change return type to int. Pass
6717 back return status from the_target->read_memory().
6718 * target.h (struct target_ops): Adapt *read_memory() prototype.
6719 Update comment.
6720 (read_inferior_memory): Adapt prototype.
6721 * server.c (main): Return an error packet if
6722 read_inferior_memory() returns an error.
6723
6724 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
6725
6726 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6727 Unify with other clean targets.
6728
6729 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6730
6731 * server.c (handle_v_cont): Call set_desired_inferior.
6732
6733 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6734
6735 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6736
6737 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6738
6739 * linux-low.c (linux_wait): Unblock async I/O.
6740 (linux_resume): Block and enable async I/O.
6741 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6742 * server.h (block_async_io, unblock_async_io): Add prototypes.
6743
6744 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6745
6746 * remote-utils.c (remote_open): Print a status notice after
6747 opening a TCP port.
6748 * server.c (attach_inferior): Print a status notice after
6749 attaching.
6750
6751 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6752
6753 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6754
6755 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
6756
6757 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6758 error packet.
6759 * server.c, target.h: Update copyright years.
6760
6761 2004-02-25 Roland McGrath <roland@redhat.com>
6762
6763 * target.h (struct target_ops): New member `read_auxv'.
6764 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6765 * linux-low.c (linux_read_auxv): New function.
6766 (linux_target_ops): Initialize `read_auxv' member to that.
6767
6768 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6769
6770 Committed by Jim Blandy <jimb@redhat.com>.
6771
6772 * linux-s390-low.c (s390_num_regs): Update.
6773 (s390_regmap): Remove control registers. Use __s390x__ predefine
6774 instead of GPR_SIZE to distiguish s390 and s390x targets.
6775
6776 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
6777
6778 * linux-low.c: Update copyright year.
6779 (check_removed_breakpoint): Clear pending_is_breakpoint.
6780 (linux_set_resume_request, linux_queue_one_thread)
6781 (resume_status_pending_p): New functions.
6782 (linux_continue_one_thread): Use process->resume.
6783 (linux_resume): Only resume threads if there are no pending events.
6784 * linux-low.h (struct process_info): Add resume request
6785 pointer.
6786
6787 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
6788
6789 * regcache.c (new_register_cache): Clear the allocated register
6790 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6791
6792 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
6793
6794 * linux-low.c (linux_resume): Take a struct thread_resume *
6795 argument.
6796 (linux_wait): Update call.
6797 (resume_ptr): New static variable.
6798 (linux_continue_one_thread): Renamed from
6799 linux_continue_one_process. Use resume_ptr.
6800 (linux_resume): Use linux_continue_one_thread.
6801 * server.c (handle_v_cont, handle_v_requests): New functions.
6802 (myresume): New function.
6803 (main): Handle 'v' case.
6804 * target.h (struct thread_resume): New type.
6805 (struct target_ops): Change argument of "resume" to struct
6806 thread_resume *.
6807 (myresume): Delete macro.
6808
6809 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6810
6811 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6812 (uninstall): Support DESTDIR.
6813
6814 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6815
6816 * configure.srv: Add xscale*linux copy of arm*linux entry.
6817
6818 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
6819
6820 * linux-arm-low.c (arm_reinsert_addr): New function.
6821 (the_low_target): Add arm_reinsert_addr.
6822
6823 2003-07-08 Mark Kettenis <kettenis@gnu.org>
6824
6825 * mem-break.c: Remove whitespace at end of file.
6826
6827 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6828
6829 * configure.in: Check whether we need to prototype strerror.
6830 * server.h: Optionally prototype strerror.
6831 * gdbreplay.c (perror_with_name): Use strerror.
6832 * linux-low.c (linux_attach_lwp): Use strerror.
6833 * utils.c (perror_with_name): Use strerror.
6834 * config.in, configure: Regenerated.
6835
6836 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6837
6838 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6839 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6840
6841 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
6842
6843 * Makefile.in (SFILES): Update.
6844 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6845 low-sun3.c: Remove files.
6846
6847 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
6848
6849 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6850 (linux_detach_one_process, linux_detach): New functions.
6851 (linux_target_ops): Add linux_detach.
6852 * server.c (main): Handle 'D' packet.
6853 * target.h (struct target_ops): Add "detach" member.
6854 (detach_inferior): Define.
6855
6856 2003-06-13 Mark Kettenis <kettenis@gnu.org>
6857
6858 From Kelley Cook <kelleycook@wideopenwest.com>:
6859 * configure.srv: Accept i[34567]86 variants.
6860
6861 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
6862
6863 * linux-low.c (linux_wait_for_event): Correct comment typos.
6864 (linux_resume_one_process): Call check_removed_breakpoint.
6865 (linux_send_signal): New function.
6866 (linux_target_ops): Add linux_send_signal.
6867 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6868 of kill.
6869 * target.h (struct target_ops): Add send_signal.
6870
6871 2003-05-29 Jim Blandy <jimb@redhat.com>
6872
6873 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6874 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6875 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6876 away part of the register's value.
6877
6878 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
6879
6880 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6881 (linux_wait_for_event, linux_init_signals): Likewise.
6882
6883 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
6884
6885 * configure.in: Check for stdlib.h.
6886 * configure: Regenerated.
6887 * config.in: Regenerated.
6888
6889 2003-01-04 Andreas Schwab <schwab@suse.de>
6890
6891 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6892
6893 2003-01-02 Andrew Cagney <ac131313@redhat.com>
6894
6895 * Makefile.in: Remove obsolete code.
6896
6897 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
6898
6899 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6900 defined(PT_FPR0_HI).
6901
6902 2002-11-17 Stuart Hughes <seh@zee2.com>
6903
6904 * linux-arm-low.c (arm_num_regs): Increase.
6905 (arm_regmap): Include status register.
6906
6907 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
6908
6909 * linux-low.c (register_addr): Remove incorrect -1 check.
6910
6911 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
6912
6913 * linux-low.c (linux_create_inferior): Call setpgid. Return
6914 the new PID.
6915 (unstopped_p, linux_signal_pid): Remove.
6916 (linux_target_ops): Remove linux_signal_pid.
6917 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6918 global instead of target method.
6919 * target.h (struct target_ops): Remove signal_pid. Update comment
6920 for create_inferior.
6921 * server.c (signal_pid): New variable.
6922 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
6923 gdbserver. Set the child to be the foreground process group.
6924 (attach_inferior): Set signal_pid.
6925
6926 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
6927
6928 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6929
6930 2002-08-20 Jim Blandy <jimb@redhat.com>
6931
6932 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6933 default for this.
6934
6935 2002-08-01 Andrew Cagney <cagney@redhat.com>
6936
6937 * Makefile.in: Make chill references obsolete.
6938
6939 2002-07-24 Kevin Buettner <kevinb@redhat.com>
6940
6941 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6942 * configure: Regenerate.
6943 * config.in: Regenerate.
6944
6945 2002-07-09 David O'Brien <obrien@FreeBSD.org>
6946
6947 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6948 (perror_with_name, remote_close, remote_open, expect, play): Static.
6949
6950 2002-07-04 Michal Ludvig <mludvig@suse.cz>
6951
6952 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
6953 byte offsets instead of an array of indexes.
6954 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6955
6956 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
6957
6958 * regcache.c: Add comment.
6959
6960 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
6961
6962 * thread-db.c: New file.
6963 * proc-service.c: New file.
6964 * acinclude.m4: New file.
6965 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6966 proc-service.o, and thread-db.o.
6967 (linux-low.o): Add USE_THREAD_DB.
6968 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6969 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6970 * aclocal.m4: Regenerated.
6971 * config.in: Regenerated.
6972 * configure: Regenerated.
6973 * configure.in: Check for proc_service.h, sys/procfs.h,
6974 thread_db.h, and linux/elf.h headrs.
6975 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6976 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6977 Check for -lthread_db and thread support.
6978 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6979 PowerPC, and SuperH.
6980 * i387-fp.c: Constify arguments.
6981 * i387-fp.h: Likewise.
6982 * inferiors.c: (struct thread_info): Renamed from
6983 `struct inferior_info'. Remove PID member. Use generic inferior
6984 list header. All uses updated.
6985 (inferiors, signal_pid): Removed.
6986 (all_threads): New variable.
6987 (get_thread): Define.
6988 (add_inferior_to_list): New function.
6989 (for_each_inferior): New function.
6990 (change_inferior_id): New function.
6991 (add_inferior): Removed.
6992 (remove_inferior): New function.
6993 (add_thread): New function.
6994 (free_one_thread): New function.
6995 (remove_thread): New function.
6996 (clear_inferiors): Use for_each_inferior and free_one_thread.
6997 (find_inferior): New function.
6998 (find_inferior_id): New function.
6999 (inferior_target_data): Update argument type.
7000 (set_inferior_target_data): Likewise.
7001 (inferior_regcache_data): Likewise.
7002 (set_inferior_regcache_data): Likewise.
7003 * linux-low.c (linux_bp_reinsert): Remove.
7004 (all_processes, stopping_threads, using_thrads)
7005 (struct pending_signals, debug_threads, pid_of): New.
7006 (inferior_pid): Replace with macro.
7007 (struct inferior_linux_data): Remove.
7008 (get_stop_pc, add_process): New functions.
7009 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7010 Use add_process and add_thread.
7011 (linux_attach_lwp): New function, based on old linux_attach. Use
7012 add_process and add_thread. Set stop_expected for new threads.
7013 (linux_attach): New function.
7014 (linux_kill_one_process): New function.
7015 (linux_kill): Kill all LWPs.
7016 (linux_thread_alive): Use find_inferior_id.
7017 (check_removed_breakpoints, status_pending_p): New functions.
7018 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7019 Update. Use WNOHANG. Wait for cloned processes also. Update process
7020 struct for the found process.
7021 (linux_wait_for_event): New function.
7022 (linux_wait): Use it. Support LWPs.
7023 (send_sigstop, wait_for_sigstop, stop_all_processes)
7024 (linux_resume_one_process, linux_continue_one_process): New functions.
7025 (linux_resume): Support LWPs.
7026 (REGISTER_RAW_SIZE): Remove.
7027 (fetch_register): Use register_size instead. Call supply_register.
7028 (usr_store_inferior_registers): Likewise. Call collect_register.
7029 Fix recursive case.
7030 (regsets_fetch_inferior_registers): Improve error message.
7031 (regsets_store_inferior_registers): Add debugging.
7032 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7033 (unstopped_p, linux_signal_pid): New functions.
7034 (linux_target_ops): Add linux_signal_pid.
7035 (linux_init_signals): New function.
7036 (initialize_low): Call it. Initialize using_threads.
7037 * regcache.c (inferior_regcache_data): Add valid
7038 flag.
7039 (get_regcache): Fetch registers lazily. Add fetch argument
7040 and update all callers.
7041 (regcache_invalidate_one, regcache_invalidate): New
7042 functions.
7043 (new_register_cache): Renamed from create_register_cache.
7044 Return the new regcache.
7045 (free_register_cache): Change argument to a void *.
7046 (registers_to_string, registers_from_string): Call get_regcache
7047 with fetch flag set.
7048 (register_data): Make static. Pass fetch flag to get_regcache.
7049 (supply_register): Call get_regcache with fetch flag clear.
7050 (collect_register): Call get_regcache with fetch flag set.
7051 (collect_register_as_string): New function.
7052 * regcache.h: Update.
7053 * remote-utils.c (putpkt): Flush after debug output and use
7054 stderr.
7055 Handle input interrupts while waiting for an ACK.
7056 (input_interrupt): Use signal_pid method.
7057 (getpkt): Flush after debug output and use stderr.
7058 (outreg): Use collect_register_as_string.
7059 (new_thread_notify, dead_thread_notify): New functions.
7060 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7061 and general_thread.
7062 (look_up_one_symbol): Flush after debug output.
7063 * server.c (step_thread, server_waiting): New variables.
7064 (start_inferior): Don't use signal_pid. Update call to mywait.
7065 (attach_inferior): Update call to mywait.
7066 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7067 (main): Don't fetch/store registers explicitly. Use
7068 set_desired_inferior. Support proposed ``Hs'' packet. Update
7069 calls to mywait.
7070 * server.h: Update.
7071 (struct inferior_list, struct_inferior_list_entry): New.
7072 * target.c (set_desired_inferior): New.
7073 (write_inferior_memory): Constify.
7074 (mywait): New function.
7075 * target.h: Update.
7076 (struct target_ops): New signal_pid method.
7077 (mywait): Removed macro, added prototype.
7078
7079 * linux-low.h (regset_func): Removed.
7080 (regset_fill_func, regset_store_func): New.
7081 (enum regset_type): New.
7082 (struct regset_info): Add type field. Use new operation types.
7083 (struct linux_target_ops): stop_pc renamed to get_pc.
7084 Add decr_pc_after_break and breakpoint_at.
7085 (get_process, get_thread_proess, get_process_thread)
7086 (strut process_info, all_processes, linux_attach_lwp)
7087 (thread_db_init): New.
7088
7089 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7090 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7091 (the_low_target): Add new members.
7092 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7093 (i386_store_fpxregset): Constify.
7094 (target_regsets): Add new kind identifier.
7095 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7096 (i386_set_pc): Add debugging.
7097 (i386_breakpoint_at): New function.
7098 (the_low_target): Add new members.
7099 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7100 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7101 (mips_breakpoint_at): New.
7102 (the_low_target): Add new members.
7103 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7104 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7105 (the_low_target): Add new members.
7106 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7107 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7108 (the_low_target): Add new members.
7109 * linux-x86-64-low.c (target_regsets): Add new kind
7110 identifier.
7111
7112 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
7113
7114 From Martin Pool <mbp@samba.org>:
7115 * server.c (gdbserver_usage): New function.
7116 (main): Call it.
7117
7118 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
7119
7120 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7121 stop_at -> stop_pc.
7122
7123 2002-05-04 Andrew Cagney <ac131313@redhat.com>
7124
7125 * Makefile.in: Remove obsolete code.
7126
7127 2002-04-24 Michal Ludvig <mludvig@suse.cz>
7128
7129 * linux-low.c (regsets_fetch_inferior_registers),
7130 (regsets_store_inferior_registers): Removed cast to int from
7131 ptrace() calls.
7132 * regcache.h: Added declaration of struct inferior_info.
7133
7134 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7135
7136 * inferiors.c (struct inferior_info): Add regcache_data.
7137 (add_inferior): Call create_register_cache.
7138 (clear_inferiors): Call free_register_cache.
7139 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7140 * regcache.c (struct inferior_regcache_data): New.
7141 (registers): Remove.
7142 (get_regcache): New function.
7143 (create_register_cache, free_register_cache): New functions.
7144 (set_register_cache): Don't initialize the register cache here.
7145 (registers_to_string, registers_from_string, register_data): Call
7146 get_regcache.
7147 * regcache.h: Add prototypes.
7148 * server.h: Likewise.
7149
7150 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
7151
7152 * mem-break.c: New file.
7153 * mem-break.h: New file.
7154 * Makefile.in: Add mem-break.o rule; update server.h
7155 dependencies.
7156 * inferiors.c (struct inferior_info): Add target_data
7157 member.
7158 (clear_inferiors): Free target_data member if set.
7159 (inferior_target_data, set_inferior_target_data): New functions.
7160 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7161 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7162 * linux-low.c (linux_bp_reinsert): New variable.
7163 (struct inferior_linux_data): New.
7164 (linux_create_inferior): Use set_inferior_target_data.
7165 (linux_attach): Likewise. Call add_inferior.
7166 (linux_wait_for_one_inferior): New function.
7167 (linux_wait): Call it.
7168 (linux_write_memory): Add const.
7169 (initialize_low): Call set_breakpoint_data.
7170 * linux-low.h (struct linux_target_ops): Add breakpoint
7171 handling members.
7172 * server.c (attach_inferior): Remove extra add_inferior
7173 call.
7174 * server.h: Include mem-break.h. Update inferior.c
7175 prototypes.
7176 * target.c (read_inferior_memory)
7177 (write_inferior_memory): New functions.
7178 * target.h (read_inferior_memory)
7179 (write_inferior_memory): Change macros to prototypes.
7180 (struct target_ops): Update comments. Add const to write_memory
7181 definition.
7182
7183 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
7184
7185 * linux-low.c (usr_store_inferior_registers): Support
7186 registers which are allowed to fail to store.
7187 * linux-low.h (linux_target_ops): Likewise.
7188 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7189 (ppc_cannot_store_register): FPSCR may not be storable.
7190
7191 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7192
7193 * server.h: Include <string.h> if HAVE_STRING_H.
7194 * ChangeLog: Correct paths in last ChangeLog entry.
7195
7196 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7197
7198 * linux-low.h: Remove obsolete prototypes.
7199 (struct linux_target_ops): New.
7200 (extern the_low_target): New.
7201 * linux-low.c (num_regs, regmap): Remove declarations.
7202 (register_addr): Use the_low_target explicitly.
7203 (fetch_register): Likewise.
7204 (usr_fetch_inferior_registers): Likewise.
7205 (usr_store_inferior_registers): Likewise.
7206 * linux-arm-low.c (num_regs): Remove.
7207 (arm_num_regs): Define.
7208 (arm_regmap): Renamed from regmap, made static.
7209 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7210 made static.
7211 (arm_cannot_store_register): Renamed from cannot_store_register,
7212 made static.
7213 (the_low_target): New.
7214 * linux-i386-low.c (num_regs): Remove.
7215 (i386_num_regs): Define.
7216 (i386_regmap): Renamed from regmap, made static.
7217 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7218 made static.
7219 (i386_cannot_store_register): Renamed from cannot_store_register,
7220 made static.
7221 (the_low_target): New.
7222 * linux-ia64-low.c (num_regs): Remove.
7223 (ia64_num_regs): Define.
7224 (ia64_regmap): Renamed from regmap, made static.
7225 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7226 made static.
7227 (ia64_cannot_store_register): Renamed from cannot_store_register,
7228 made static.
7229 (the_low_target): New.
7230 * linux-m68k-low.c (num_regs): Remove.
7231 (m68k_num_regs): Define.
7232 (m68k_regmap): Renamed from regmap, made static.
7233 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7234 made static.
7235 (m68k_cannot_store_register): Renamed from cannot_store_register,
7236 made static.
7237 (the_low_target): New.
7238 * linux-mips-low.c (num_regs): Remove.
7239 (mips_num_regs): Define.
7240 (mips_regmap): Renamed from regmap, made static.
7241 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7242 made static.
7243 (mips_cannot_store_register): Renamed from cannot_store_register,
7244 made static.
7245 (the_low_target): New.
7246 * linux-ppc-low.c (num_regs): Remove.
7247 (ppc_num_regs): Define.
7248 (ppc_regmap): Renamed from regmap, made static.
7249 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7250 made static.
7251 (ppc_cannot_store_register): Renamed from cannot_store_register,
7252 made static.
7253 (the_low_target): New.
7254 * linux-s390-low.c (num_regs): Remove.
7255 (s390_num_regs): Define.
7256 (s390_regmap): Renamed from regmap, made static.
7257 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7258 made static.
7259 (s390_cannot_store_register): Renamed from cannot_store_register,
7260 made static.
7261 (the_low_target): New.
7262 * linux-sh-low.c (num_regs): Remove.
7263 (sh_num_regs): Define.
7264 (sh_regmap): Renamed from regmap, made static.
7265 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7266 made static.
7267 (sh_cannot_store_register): Renamed from cannot_store_register,
7268 made static.
7269 (the_low_target): New.
7270 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7271 (the_low_target): New.
7272
7273 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7274
7275 * Makefile.in: Add stamp-h target.
7276 * configure.in: Create stamp-h.
7277 * configure: Regenerated.
7278
7279 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7280
7281 * inferiors.c: New file.
7282 * target.c: New file.
7283 * target.h: New file.
7284 * Makefile.in: Add target.o and inferiors.o. Update
7285 dependencies.
7286 * linux-low.c (inferior_pid): New static variable,
7287 moved from server.c.
7288 (linux_create_inferior): Renamed from create_inferior.
7289 Call add_inferior. Return 0 on success instead of a PID.
7290 (linux_attach): Renamed from myattach.
7291 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7292 (linux_thread_alive): Renamed from mythread_alive.
7293 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7294 child dies.
7295 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7296 (regsets_store_inferior_registers): Correct error message.
7297 Add missing ``return 0''.
7298 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7299 (linux_store_registers): Renamed from store_inferior_registers.
7300 (linux_read_memory): Renamed from read_inferior_memory.
7301 (linux_write_memory): Renamed from write_inferior_memory.
7302 (linux_target_ops): New structure.
7303 (initialize_low): Call set_target_ops ().
7304 * remote-utils.c (unhexify): New function.
7305 (hexify): New function.
7306 (input_interrupt): Send signals to ``signal_pid''.
7307 * server.c (inferior_pid): Remove.
7308 (start_inferior): Update create_inferior call.
7309 (attach_inferior): Call add_inferior.
7310 (handle_query): New function.
7311 (main): Call handle_query for `q' packets.
7312 * server.h: Include "target.h". Remove obsolete prototypes.
7313 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7314
7315 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
7316
7317 * Makefile.in: Add WARN_CFLAGS. Update configury
7318 dependencies.
7319 * configure.in: Check for <string.h>
7320 * configure: Regenerate.
7321 * config.in: Regenerate.
7322 * gdbreplay.c: Include needed system headers.
7323 (remote_open): Remove strchr prototype.
7324 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7325 * regcache.c (supply_register): Change buf argument to const void *.
7326 (supply_register_by_name): Likewise.
7327 (collect_register): Change buf argument to void *.
7328 (collect_register_by_name): Likewise.
7329 * regcache.h: Add missing prototypes.
7330 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7331 * server.c (handle_query): New function.
7332 (attached): New static variable, moved out of main.
7333 (main): Quiet longjmp clobber warnings.
7334 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7335 * utils.c (error): Remove NORETURN.
7336 (fatal): Likewise.
This page took 0.251035 seconds and 4 git commands to generate.