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