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