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