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