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