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