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