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