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