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