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