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