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