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