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