]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
daily update
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3360c0bf
LM
12013-07-24 Luis Machado <lgustavo@codesourcery.com>
2
3 * Makefile.in (SFILES): /common/target-common.c.
4 (OBS): Add target-common.o.
5 (server_h): Add $(srcdir)/../common/target-common.h.
6 (target-common.o): New target.
7 * server.c (queue_stop_reply_callback): Free
8 status string after use.
9 * target.c (target_waitstatus_to_string): Remove.
10 * target.h: Include target-common.h.
11 (resume_kind): Likewise.
12 (target_waitkind): Likewise.
13 (target_waitstatus): Likewise.
14 (TARGET_WNOHANG): Likewise.
15
bd885420
YQ
162013-07-04 Yao Qi <yao@codesourcery.com>
17
18 * Makefile.in (host_alias): Use @host_noncanonical@.
19 (target_alias): Use @target_noncanonical@.
20 * configure.ac: Use ACX_NONCANONICAL_TARGET and
21 ACX_NONCANONICAL_HOST.
22 * configure: Regenerated.
23
24 Revert:
25 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
26
27 * configure.ac (version_host, version_target): Set and AC_SUBST them.
28 * configure: Rebuild.
29 * Makefile.in (version_host, version_target): Get from configure.
30 (version.c): Use $(version_host) and $(version_target).
31
17ef446e
PA
322013-07-03 Pedro Alves <palves@redhat.com>
33
34 * Makefile.in (config.status): Depend on development.sh.
35 * acinclude.m4: Include libmcheck.m4.
36 * configure: Regenerate.
37
7a9a7487
MG
382013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
39
40 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
41 attribute inside the parentheses.
42 (winapi_DebugSetProcessKillOnExit): Ditto.
43 (winapi_DebugBreakProcess): Ditto.
44 (winapi_GenerateConsoleCtrlEvent): Ditto.
45
49b64de6
MG
462013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
47
48 * notif.h (notif_event): Add a dummy member to avoid compiler
49 errors.
50
d5749ee7
PA
512013-07-01 Pedro Alves <palves@redhat.com>
52
53 * hostio.c (HOSTIO_PATH_MAX): Define.
54 (require_filename, handle_open, handle_unlink, handle_readlink):
55 Use it.
56
d8d2a3ee
PA
572013-07-01 Pedro Alves <palves@redhat.com>
58
59 * server.h: Include "pathmax.h".
60 * linux-low.c: Don't include sys/param.h.
61 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
62 MAXPATHLEN.
63 * win32-low.c: Don't include sys/param.h.
64 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
65
bc7dea8d
PA
662013-07-01 Pedro Alves <palves@redhat.com>
67
68 * event-loop.c: Don't check HAVE_UNISTD_H before including
69 <unistd.h>.
70 * gdbreplay.c: Likewise.
71 * remote-utils.c: Likewise.
72 * server.c: Likewise.
73 * configure.ac: Don't check for unistd.h.
74 * configure: Regenerate.
75
d6c2da54
TT
762013-06-28 Tom Tromey <tromey@redhat.com>
77
78 * Makefile.in (version.c): Use version.in, not
79 common/version.in.
80
257b6bec
MG
812013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
82
83 * configure.ac (version_host, version_target): Set and AC_SUBST them.
84 * configure: Rebuild.
85 * Makefile.in (version_host, version_target): Get from configure.
86 (version.c): Use $(version_host) and $(version_target).
87
86ebe149
DK
882013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
89
90 Fix trace-status to output user name without trailing colon.
91 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
92
f30aa5af
DK
932013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
94
95 Fix trace-status to output proper start-time and stop-time.
96 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
97 output start time and stop time in hex as gdb expects.
98
28a93511
YQ
992013-06-26 Pedro Alves <pedro@codesourcery.com>
100
101 * tracepoint.c (build_traceframe_info_xml): Output trace state
102 variables present in the trace buffer.
103
01208463
TT
1042013-06-24 Tom Tromey <tromey@redhat.com>
105
106 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
107 create-version.sh.
108 (version.o): Remove.
109 * gdbreplay.c: Include version.h.
110 (version, host_name): Don't declare.
111 * server.h: Include version.h.
112 (version, host_name): Don't declare.
113
760256f9
PA
1142013-06-12 Pedro Alves <palves@redhat.com>
115
116 * linux-x86-low.c (linux_is_elf64): Delete global.
117 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
118 with local linux_pid_exe_is_elf_64_file use.
119
030031ee
PA
1202013-06-11 Pedro Alves <palves@redhat.com>
121
122 * linux-low.c (regset_disabled, disable_regset): New functions.
123 (regsets_fetch_inferior_registers)
124 (regsets_store_inferior_registers): Use them.
125 (initialize_regsets_info); Don't allocate the disabled_regsets
126 array here.
127 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
128 comment.
129
5da6eb0a
PA
1302013-06-11 Pedro Alves <palves@redhat.com>
131
132 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
133 xmalloc.
134
7e5aaa09
PA
1352013-06-11 Pedro Alves <palves@redhat.com>
136
137 * linux-x86-low.c (initialize_low_arch): Call
138 init_registers_x32_avx_linux.
139
d878444c
JK
1402013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
141
142 Fix compatibility with Android Bionic.
143 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
144 it is not empty.
145
3aee8918
PA
1462013-06-07 Pedro Alves <palves@redhat.com>
147
5f2b57b5 148 PR server/14823
3aee8918
PA
149 * Makefile.in (OBS): Add tdesc.o.
150 (IPA_OBJS): Add tdesc-ipa.o.
151 (tdesc-ipa.o): New rule.
152 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
153 interface.
154 * linux-low.c (new_inferior): Delete.
155 (disabled_regsets, num_regsets): Delete.
156 (linux_add_process): Adjust to set the new per-process
157 new_inferior flag.
158 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
159 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
160 was a stop. When calling arch_setup, switch the current inferior
161 to the thread that got an event.
162 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
163 (regsets_fetch_inferior_registers)
164 (regsets_store_inferior_registers): New regsets_info parameter.
165 Adjust to use it.
166 (linux_register_in_regsets): New regs_info parameter. Adjust to
167 use it.
168 (register_addr, fetch_register, store_register): New usrregs_info
169 parameter. Adjust to use it.
170 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
171 parameter regs_info. Adjust to use it.
172 (linux_fetch_registers): Get the current inferior's regs_info, and
173 adjust to use it.
174 (linux_store_registers): Ditto.
175 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
176 (initialize_low): Don't initialize the target_regsets here. Call
177 initialize_low_arch.
178 * linux-low.h (target_regsets): Delete declaration.
179 (struct regsets_info): New.
180 (struct usrregs_info): New.
181 (struct regs_info): New.
182 (struct process_info_private) <new_inferior>: New field.
183 (struct linux_target_ops): Delete the num_regs, regmap, and
184 regset_bitmap fields. New field regs_info.
185 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
186 * i387-fp.c (num_xmm_registers): Delete.
187 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
188 calls to new interface.
189 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
190 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
191 Infer the number of xmm registers from the regcache's target
192 description.
193 * i387-fp.h (num_xmm_registers): Delete.
194 * inferiors.c (add_thread): Don't install the thread's regcache
195 here.
196 * proc-service.c (gregset_info): Fetch the current inferior's
197 regs_info. Adjust to use it.
198 * regcache.c: Include tdesc.h.
199 (register_bytes, reg_defs, num_registers)
200 (gdbserver_expedite_regs): Delete.
201 (get_thread_regcache): If the thread doesn't have a regcache yet,
202 create one, instead of aborting gdbserver.
203 (regcache_invalidate_one): Rename to ...
204 (regcache_invalidate_thread): ... this.
205 (regcache_invalidate_one): New.
206 (regcache_invalidate): Only invalidate registers of the current
207 process.
208 (init_register_cache): Add target_desc parameter, and use it.
209 (new_register_cache): Ditto. Assert the target description has a
210 non zero registers_size.
211 (regcache_cpy): Add assertions. Adjust.
212 (realloc_register_cache, set_register_cache): Delete.
213 (registers_to_string, registers_from_string): Adjust.
214 (find_register_by_name, find_regno, find_register_by_number)
215 (register_cache_size): Add target_desc parameter, and use it.
216 (free_register_cache_thread, free_register_cache_thread_one)
217 (regcache_release, register_cache_size): New.
218 (register_size): Add target_desc parameter, and use it.
219 (register_data, supply_register, supply_register_zeroed)
220 (supply_regblock, supply_register_by_name, collect_register)
221 (collect_register_as_string, collect_register_by_name): Adjust.
222 * regcache.h (struct target_desc): Forward declare.
223 (struct regcache) <tdesc>: New field.
224 (init_register_cache, new_register_cache): Add target_desc
225 parameter.
226 (regcache_invalidate_thread): Declare.
227 (regcache_invalidate_one): Delete declaration.
228 (regcache_release): Declare.
229 (find_register_by_number, register_cache_size, register_size)
230 (find_regno): Add target_desc parameter.
231 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
232 declarations.
233 * remote-utils.c: Include tdesc.h.
234 (outreg, prepare_resume_reply): Adjust.
235 * server.c: Include tdesc.h.
236 (gdbserver_xmltarget): Delete declaration.
237 (get_features_xml, process_serial_event): Adjust.
238 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
239 declare.
240 (struct process_info) <tdesc>: New field.
241 (ipa_tdesc): Declare.
242 * tdesc.c: New file.
243 * tdesc.h: New file.
244 * tracepoint.c: Include tdesc.h.
245 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
246 (get_context_regcache): Adjust to pass ipa_tdesc down.
247 (do_action_at_tracepoint): Adjust to get the register cache size
248 from the context regcache's description.
249 (traceframe_walk_blocks): Adjust to get the register cache size
250 from the current trace frame's description.
251 (traceframe_get_pc): Adjust to get current trace frame's
252 description and pass it down.
253 (gdb_collect): Adjust to get the register cache size from the
254 IPA's description.
255 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
256 (gdbserver_xmltarget): Delete.
257 (initialize_low_tracepoint): Set the ipa's target description.
258 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
259 (initialize_low_tracepoint): Set the ipa's target description.
260 * linux-x86-low.c: Include tdesc.h.
261 [__x86_64__] (is_64bit_tdesc): New.
262 (ps_get_thread_area, x86_get_thread_area): Use it.
263 (i386_cannot_store_register): Rename to ...
264 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
265 (i386_cannot_fetch_register): Rename to ...
266 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
267 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
268 to new interface.
269 (target_regsets): Rename to ...
270 (x86_regsets): ... this.
271 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
272 interface.
273 (x86_siginfo_fixup): Use is_64bit_tdesc.
274 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
275 (tdesc_x32_avx_linux, tdesc_x32_linux)
276 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
277 Declare.
278 (x86_linux_update_xmltarget): Delete.
279 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
280 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
281 (AMD64_LINUX_USER64_CS): New.
282 (x86_linux_read_description): New, based on
283 x86_linux_update_xmltarget.
284 (same_process_callback): New.
285 (x86_arch_setup_process_callback): New.
286 (x86_linux_update_xmltarget): New.
287 (x86_regsets_info): New.
288 (amd64_linux_regs_info): New.
289 (i386_linux_usrregs_info): New.
290 (i386_linux_regs_info): New.
291 (x86_linux_regs_info): New.
292 (x86_arch_setup): Reimplement.
293 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
294 (x86_emit_ops): Ditto.
295 (the_low_target): Adjust. Install x86_linux_regs_info,
296 x86_cannot_fetch_register, and x86_cannot_store_register.
297 (initialize_low_arch): New.
298 * linux-ia64-low.c (tdesc_ia64): Declare.
299 (ia64_fetch_register): Adjust.
300 (ia64_usrregs_info, regs_info): New globals.
301 (ia64_regs_info): New function.
302 (the_low_target): Adjust.
303 (initialize_low_arch): New function.
304 * linux-sparc-low.c (tdesc_sparc64): Declare.
305 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
306 Adjust.
307 (sparc_arch_setup): New function.
308 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
309 (the_low_target): Adjust.
310 (initialize_low_arch): New function.
311 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
312 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
313 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
314 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
315 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
316 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
317 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
318 (tdesc_powerpc_isa205_vsx64l): Declare.
319 (ppc_cannot_store_register, ppc_collect_ptrace_register)
320 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
321 (ppc_set_pc, ppc_get_hwcap): Adjust.
322 (ppc_usrregs_info): Forward declare.
323 (!__powerpc64__) ppc_regmap_adjusted: New global.
324 (ppc_arch_setup): Adjust to the current process'es target
325 description.
326 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
327 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
328 (ppc_store_evrregset): Adjust.
329 (target_regsets): Rename to ...
330 (ppc_regsets): ... this, and make static.
331 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
332 (ppc_regs_info): New function.
333 (the_low_target): Adjust.
334 (initialize_low_arch): New function.
335 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
336 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
337 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
338 (tdesc_s390x_linux64v2): Declare.
339 (s390_collect_ptrace_register, s390_supply_ptrace_register)
340 (s390_fill_gregset, s390_store_last_break): Adjust.
341 (target_regsets): Rename to ...
342 (s390_regsets): ... this, and make static.
343 (s390_get_pc, s390_set_pc): Adjust.
344 (s390_get_hwcap): New target_desc parameter, and use it.
345 [__s390x__] (have_hwcap_s390_high_gprs): New global.
346 (s390_arch_setup): Adjust to set the current process'es target
347 description. Don't adjust the regmap.
348 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
349 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
350 (regs_info_3264): New globals.
351 (s390_regs_info): New function.
352 (the_low_target): Adjust.
353 (initialize_low_arch): New function.
354 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
355 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
356 [__mips64] (init_registers_mips_linux)
357 (init_registers_mips_dsp_linux): Delete defines.
358 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
359 (have_dsp): New global.
360 (mips_read_description): New, based on mips_arch_setup.
361 (mips_arch_setup): Reimplement.
362 (get_usrregs_info): New function.
363 (mips_cannot_fetch_register, mips_cannot_store_register)
364 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
365 (mips_fill_fpregset, mips_store_fpregset): Adjust.
366 (target_regsets): Rename to ...
367 (mips_regsets): ... this, and make static.
368 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
369 (dsp_regs_info, regs_info): New globals.
370 (mips_regs_info): New function.
371 (the_low_target): Adjust.
372 (initialize_low_arch): New function.
373 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
374 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
375 Declare.
376 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
377 (arm_read_description): New, with bits factored from
378 arm_arch_setup.
379 (arm_arch_setup): Reimplement.
380 (target_regsets): Rename to ...
381 (arm_regsets): ... this, and make static.
382 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
383 (arm_regs_info): New function.
384 (the_low_target): Adjust.
385 (initialize_low_arch): New function.
386 * linux-m68k-low.c (tdesc_m68k): Declare.
387 (target_regsets): Rename to ...
388 (m68k_regsets): ... this, and make static.
389 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
390 (m68k_regs_info): New function.
391 (m68k_arch_setup): New function.
392 (the_low_target): Adjust.
393 (initialize_low_arch): New function.
394 * linux-sh-low.c (tdesc_sharch): Declare.
395 (target_regsets): Rename to ...
396 (sh_regsets): ... this, and make static.
397 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
398 (sh_regs_info, sh_arch_setup): New functions.
399 (the_low_target): Adjust.
400 (initialize_low_arch): New function.
401 * linux-bfin-low.c (tdesc_bfin): Declare.
402 (bfin_arch_setup): New function.
403 (bfin_usrregs_info, regs_info): New globals.
404 (bfin_regs_info): New function.
405 (the_low_target): Adjust.
406 (initialize_low_arch): New function.
407 * linux-cris-low.c (tdesc_cris): Declare.
408 (cris_arch_setup): New function.
409 (cris_usrregs_info, regs_info): New globals.
410 (cris_regs_info): New function.
411 (the_low_target): Adjust.
412 (initialize_low_arch): New function.
413 * linux-cris-low.c (tdesc_crisv32): Declare.
414 (cris_arch_setup): New function.
415 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
416 (cris_regs_info): New function.
417 (the_low_target): Adjust.
418 (initialize_low_arch): New function.
419 * linux-m32r-low.c (tdesc_m32r): Declare.
420 (m32r_arch_setup): New function.
421 (m32r_usrregs_info, regs_info): New globals.
422 (m32r_regs_info): Adjust.
423 (initialize_low_arch): New function.
424 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
425 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
426 (tic6x_usrregs_info): Forward declare.
427 (tic6x_read_description): New function, based on ...
428 (tic6x_arch_setup): ... this. Reimplement.
429 (target_regsets): Rename to ...
430 (tic6x_regsets): ... this, and make static.
431 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
432 (tic6x_regs_info): New function.
433 (the_low_target): Adjust.
434 (initialize_low_arch): New function.
435 * linux-xtensa-low.c (tdesc_xtensa): Declare.
436 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
437 (target_regsets): Rename to ...
438 (xtensa_regsets): ... this, and make static.
439 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
440 globals.
441 (xtensa_arch_setup, xtensa_regs_info): New functions.
442 (the_low_target): Adjust.
443 (initialize_low_arch): New function.
444 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
445 (nios2_arch_setup): Set the current process'es tdesc.
446 (target_regsets): Rename to ...
447 (nios2_regsets): ... this.
448 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
449 (nios2_regs_info): New function.
450 (the_low_target): Adjust.
451 (initialize_low_arch): New function.
452 * linux-aarch64-low.c (tdesc_aarch64): Declare.
453 (aarch64_arch_setup): Set the current process'es tdesc.
454 (target_regsets): Rename to ...
455 (aarch64_regsets): ... this.
456 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
457 (aarch64_regs_info): New function.
458 (the_low_target): Adjust.
459 (initialize_low_arch): New function.
460 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
461 globals.
462 (target_regsets): Rename to ...
463 (tile_regsets): ... this.
464 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
465 (tile_regs_info): New function.
466 (tile_arch_setup): Set the current process'es tdesc.
467 (the_low_target): Adjust.
468 (initialize_low_arch): New function.
469 * spu-low.c (tdesc_spu): Declare.
470 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
471 * win32-arm-low.c (tdesc_arm): Declare.
472 (arm_arch_setup): New function.
473 (the_low_target): Install arm_arch_setup instead of
474 init_registers_arm.
475 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
476 (init_windows_x86): Rename to ...
477 (i386_arch_setup): ... this. Set `win32_tdesc'.
478 (the_low_target): Adjust.
479 * win32-low.c (win32_tdesc): New global.
480 (child_add_thread): Don't create the thread cache here.
481 (do_initial_child_stuff): Set the new process'es tdesc.
482 * win32-low.h (struct target_desc): Forward declare.
483 (win32_tdesc): Declare.
484 * lynx-i386-low.c (tdesc_i386): Declare global.
485 (lynx_i386_arch_setup): Set `lynx_tdesc'.
486 * lynx-low.c (lynx_tdesc): New global.
487 (lynx_add_process): Set the new process'es tdesc.
488 * lynx-low.h (struct target_desc): Forward declare.
489 (lynx_tdesc): Declare global.
490 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
491 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
492 * nto-low.c (nto_tdesc): New global.
493 (do_attach): Set the new process'es tdesc.
494 * nto-low.h (struct target_desc): Forward declare.
495 (nto_tdesc): Declare.
496 * nto-x86-low.c (tdesc_i386): Declare.
497 (nto_x86_arch_setup): Set `nto_tdesc'.
498
b1fbec62
GB
4992013-06-04 Gary Benson <gbenson@redhat.com>
500
501 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
502 to qSupported response when appropriate.
503 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
504 with nonzero-length annex.
505 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
506 arguments supplied in annex.
507
d1ec4ce7
DE
5082013-05-31 Doug Evans <dje@google.com>
509
ac44adcb 510 PR server/15594
d1ec4ce7
DE
511 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
512 64 bits in 64-cross-32 environment.
513
9b25f2d3
PA
5142013-05-28 Pedro Alves <palves@redhat.com>
515
516 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
517 (aarch64-without-fpu.c): Delete rule.
518 * configure.srv (aarch64*-*-linux*): Remove references to
519 aarch64-without-fpu.o and aarch64-without-fpu.xml.
520 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
521 declaration.
522
6740dc9c
PA
5232013-05-24 Pedro Alves <palves@redhat.com>
524
525 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
526 instead of strchr/decode_address. Error if the range isn't split
527 with a ','. Don't assume there's be a ':' in the action.
528
c2d6af84
PA
5292013-05-23 Yao Qi <yao@codesourcery.com>
530 Pedro Alves <palves@redhat.com>
531
532 * linux-low.c (lwp_in_step_range): New function.
533 (linux_wait_1): If the thread was range stepping and stopped
534 outside the stepping range, report the stop to GDB. Otherwise,
535 continue stepping. Add range stepping debug output.
536 (linux_set_resume_request): Copy the step range from the resume
537 request to the lwp.
538 (linux_supports_range_stepping): New.
539 (linux_target_ops) <supports_range_stepping>: Set to
540 linux_supports_range_stepping.
541 * linux-low.h (struct linux_target_ops)
542 <supports_range_stepping>: New field.
543 (struct lwp_info) <step_range_start, step_range_end>: New fields.
544 * linux-x86-low.c (x86_supports_range_stepping): New.
545 (the_low_target) <supports_range_stepping>: Set to
546 x86_supports_range_stepping.
547 * server.c (handle_v_cont): Handle 'r' action.
548 (handle_v_requests): Append ";r" if the target supports range
549 stepping.
550 * target.h (struct thread_resume) <step_range_start,
551 step_range_end>: New fields.
552 (struct target_ops) <supports_range_stepping>:
553 New field.
554 (target_supports_range_stepping): New macro.
555
58794e1a
JB
5562013-05-17 Joel Brobecker <brobecker@adacore.com>
557
558 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
559 confusion in comment.
560
d631c5a7
JB
5612013-05-17 Joel Brobecker <brobecker@adacore.com>
562
563 * lynx-low.c (struct process_info_private): New type.
564 (lynx_add_process): New function.
565 (lynx_create_inferior, lynx_attach): Replace calls to
566 add_process by calls to lynx_add_process.
567 (lynx_resume): If PTID is null, then try using
568 current_process()->private->last_wait_event_ptid.
569 Add comments.
570 (lynx_clear_inferiors): Delete. The contents of that function
571 has been inlined in lynx_mourn;
572 (lynx_wait_1): Save the ptid in the process's private data.
573 (lynx_mourn): Free the process' private data. Replace call
574 to lynx_clear_inferiors by call to clear_inferiors.
575
96f7a20f
YQ
5762013-05-17 Yao Qi <yao@codesourcery.com>
577
578 * i386-low.c (i386_length_and_rw_bits): Move the comment to
579 the right place.
580
db0dfaa0
LM
5812013-05-16 Luis Machado <lgustavo@codesourcery.com>
582
583 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
584 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
585 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
586 PT_TEXT_END_ADDR guards. Update comments.
587 (linux_target_op) <read_offsets>: Conditionally define to
588 linux_read_offsets if the target is UCLIBC and if it defines
589 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
590
68f5f838
SL
5912013-05-06 Sandra Loosemore <sandra@codesourcery.com>
592 Andrew Jenner <andrew@codesourcery.com>
593
594 * Makefile.in (SFILES): Add linux-nios2-low.c.
595 (clean): Add action to delete nios2-linux.c.
596 (nios2-linux.c): New rule.
597 * configure.srv: Add nios2*-*-linux*.
598 * linux-nios2-low.c: New.
599
1ebff1fd
HAQ
6002013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
601
602 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
603
f6150862
HZ
6042013-04-25 Hui Zhu <hui@codesourcery.com>
605
606 PR gdb/15186
f6150862
HZ
607 * ax.c (ax_printf): Add fflush.
608
614c279d
TT
6092013-04-22 Tom Tromey <tromey@redhat.com>
610
611 * Makefile.in (SFILES): Add filestuff.c.
612 (OBS): Add filestuff.o.
613 (filestuff.o): New target.
614 * config.in, configure: Rebuild.
615 * configure.ac: Check for fdwalk, pipe2.
616
7d4e5717
PA
6172013-04-17 Pedro Alves <palves@redhat.com>
618
619 * configure.ac (USE_THREAD_DB): Delete variable.
620 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
621 Don't AC_SUBST USE_THREAD_DB.
622 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
623 * config.in, configure: Regenerate.
624
d5c93e41
PA
6252013-04-16 Pedro Alves <palves@redhat.com>
626
627 * linux-low.h (struct lwp_info) <thread_known>: Move under
628 the USE_THREAD_DB #ifdef.
629
04f5fe89
PA
6302013-04-16 Pedro Alves <palves@redhat.com>
631
632 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
633 (linux-low.o): Delete rule.
634 * linux-low.h: Always include "gdb_thread_db.h" instead of
635 conditionally including thread_db.h.
636 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
637 HAVE_THREAD_DB_H.
638
480b27bf
JK
6392013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
640
641 * Makefile.in (install-only): Fix make install regression.
642
43662968
JK
6432013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
644
645 Convert man pages to texinfo, new gdbinit.5 texinfo page.
646 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
647 installation.
648 * gdbserver.1: Remove.
649
3e74e146
PA
6502013-03-22 Pedro Alves <palves@redhat.com>
651
652 * linux-low.c (handle_extended_wait): Don't call
653 linux_enable_event_reporting.
654
a8347a2a
TT
6552013-03-15 Tony Theodore <tonyt@logyst.com>
656
657 PR build/9098:
658 * Makefile.in (SHELL): Use @SHELL@.
659
eeb56fa7
SDJ
6602013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
661
662 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
663 compiler warning.
664
4fa7e2ff
JB
6652013-03-13 Joel Brobecker <brobecker@adacore.com>
666
667 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
668 Remove extraneous NULL element.
669
8ddb1965
YQ
6702013-03-13 Yao Qi <yao@codesourcery.com>
671
672 * tracepoint.c (traceframe_read_tsv): Look for the last matched
673 'V' block in trace frame.
674
9accd112
MM
6752013-03-11 Markus Metzger <markus.t.metzger@intel.com>
676
677 * target.h (struct target_ops): Add btrace ops.
678 (target_supports_btrace): New macro.
679 (target_enable_btrace): New macro.
680 (target_disable_btrace): New macro.
681 (target_read_btrace): New macro.
682 * gdbthread.h (struct thread_info): Add btrace field.
683 * server.c: Include btrace-common.h.
684 (handle_btrace_general_set): New function.
685 (handle_btrace_enable): New function.
686 (handle_btrace_disable): New function.
687 (handle_general_set): Call handle_btrace_general_set.
688 (handle_qxfer_btrace): New function.
689 (struct qxfer qxfer_packets[]): Add btrace entry.
690 * inferiors.c (remove_thread): Disable btrace.
691 * linux-low: Include linux-btrace.h.
692 (linux_low_enable_btrace): New function.
693 (linux_low_read_btrace): New function.
694 (linux_target_ops): Add btrace ops.
695 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
696 Add srv_linux_btrace=yes.
697 (x86_64-*-linux*): Add linux-btrace.o.
698 Add srv_linux_btrace=yes.
699 * configure.ac: Define HAVE_LINUX_BTRACE.
700 * config.in: Regenerated.
701 * configure: Regenerated.
702
5cc22e4c
MM
7032013-03-11 Markus Metzger <markus.t.metzger@intel.com>
704
705 * server.c (handle_qxfer): Preserve error message if -3 is
706 returned.
707 (qxfer): Document the -3 return value.
708
7c97f91e
MM
7092013-03-11 Markus Metzger <markus.t.metzger@intel.com>
710
711 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
712 (linux_btrace_h): New variable.
713 (linux-btrace.o): New rule.
714
be9a119c 7152013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
716 Hafiz Abid Qadeer <abidh@codesourcery.com>
717
718 * tracepoint.c (trace_buffer_size): New global.
719 (DEFAULT_TRACE_BUFFER_SIZE): New define.
720 (init_trace_buffer): Change to one-argument function. Allocate
721 trace buffer memory.
722 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
723 handle QTBuffer:size packet.
724 (cmd_bigqtbuffer_size): New function.
725 (initialize_tracepoint): Call init_trace_buffer with
726 DEFAULT_TRACE_BUFFER_SIZE.
727 * server.c (handle_query): Add QTBuffer:size in the
728 supported packets.
729
e64f7499
YQ
7302013-03-07 Yao Qi <yao@codesourcery.com>
731
732 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
733 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
734 of -1.
735 (cmd_qtsp): Adjust condition. Do post increment.
736 Set cur_action and cur_step_action back to 0.
737
f0ae6fc3
PA
7382013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
739
740 PR server/15236
741 * linux-low.c (linux_write_memory): Return early success if LEN is
742 zero.
743
b5b0b0af
CV
7442013-03-05 Corinna Vinschen <vinschen@redhat.de>
745
334ad4a8 746 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 747
589bc927
TT
7482013-02-28 Tom Tromey <tromey@redhat.com>
749
750 * configure.ac: Invoke AC_SYS_LARGEFILE.
751 * configure, config.in: Rebuild.
752
dfe07582
CV
7532013-02-28 Corinna Vinschen <vinschen@redhat.com>
754
755 * win32-low.c: Throughout, fix format strings and casts of
756 printf-like functions to avoid type related warnings on all
757 platforms.
758 (get_child_debug_event): Print dwDebugEventCode as hex since
759 that's how it's usually documented.
760
736cd585
YQ
7612013-02-28 Yao Qi <yao@codesourcery.com>
762
763 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
764 pulongest.
765
e1f58301
JW
7662013-02-27 Jiong Wang <jiwang@tilera.com>
767
768 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
769 (reg-tilegx32.c): New rule.
770 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
771 * linux-tile-low.c (tile_arch_setup): New function. Invoke
772 different register info initializer according to elf class.
773 (init_registers_tilgx32): New function. The tilegx32 register info
774 initializer.
775 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
776 (tile_store_gregset): Likewise.
777
d171ca78
YQ
7782013-02-27 Yao Qi <yao@codesourcery.com>
779
780 * server.c (process_point_options): Print debug message when
781 debug_threads is true.
782
282bbdf3
YQ
7832013-02-26 Yao Qi <yao@codesourcery.com>
784
785 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
786
aca22551
PA
7872013-02-19 Pedro Alves <palves@redhat.com>
788 Kai Tietz <ktietz@redhat.com>
789
790 PR gdb/15161
791
792 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
793 instead of strtoul to extract address from packet.
794 (process_serial_event) <'z'>: Likewise.
795
4f3cee1c
YQ
7962013-02-18 Yao Qi <yao@codesourcery.com>
797
798 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
799
8e1d55a3
PA
8002013-02-14 Pedro Alves <palves@redhat.com>
801
802 Plug memory leak.
803
804 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
805 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
806
458820da
PA
8072013-02-14 Pedro Alves <palves@redhat.com>
808
809 * tracepoint.c (cmd_qtdpsrc): Use savestring.
810
baea0dae
PA
8112013-02-14 Pedro Alves <palves@redhat.com>
812
813 * tracepoint.c (save_string): Delete.
814 (add_tracepoint_action): Use savestring instead of save_string.
815
0b1afbb3
PA
8162013-02-12 Pedro Alves <palves@redhat.com>
817
818 * linux-xtensa-low.c: Ditto.
819 * xtensa-xtregs.c: Ditto.
820
8a4ac37e
PA
8212013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
822
823 * thread-db.c (thread_db_get_tls_address): NULL pointer check
824 thread_db.
825
148de6bb
MS
8262013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
827
828 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
829 aarch64_num_wp_regs and aarch64_num_bp_regs to
830 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
831
55fac6e0
MS
8322013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
833
834 * linux-aarch64-low.c (ps_get_thread_area): Replace
835 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
836
176eb98c
MS
8372013-02-04 Jim MacArthur <jim.macarthur@arm.com>
838 Marcus Shawcroft <marcus.shawcroft@arm.com>
839 Nigel Stephens <nigel.stephens@arm.com>
840 Yufeng Zhang <yufeng.zhang@arm.com>
841
842 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
843 (aarch64.c, aarch64-without-fpu.c): New targets.
844 * configure.srv (aarch64*-*-linux*): New.
845 * linux-aarch64-low.c: New file.
846
56f7af9c
MS
8472013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
848
43aaf8b6 849 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
850 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
851 (dequeue_one_deferred_signal, linux_resume_one_thread)
852 (fetch_register, linux_write_memory, linux_enable_event_reporting)
853 (linux_tracefork_grandchild, linux_test_for_tracefork)
854 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
855 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
856 where the argument is 0.
857
60f662b0
YQ
8582013-01-25 Yao Qi <yao@codesourcery.com>
859
860 * event-loop.c: Include "queue.h".
861 (gdb_event_p): New typedef.
862 (struct gdb_event) <next_event>: Remove.
863 (event_queue): Change to QUEUE(gdb_event_p).
864 (async_queue_event): Remove.
865 (gdb_event_xfree): New.
866 (initialize_event_loop): New.
867 (process_event): Use API from QUEUE.
868 (wait_for_event): Likewise.
869 * server.c (main): Call initialize_event_loop.
870 * server.h (initialize_event_loop): Declare.
871
5ae4861a
YQ
8722013-01-18 Yao Qi <yao@codesourcery.com>
873
874 * ax.h (struct eval_agent_expr_context): New.
875 (gdb_eval_agent_expr): Update declaration.
876 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
877 TFRAME. Add new argument CTX.
878 * server.h (struct eval_agent_expr_context): Declare.
879 (agent_mem_read, agent_tsv_read): Update declaration.
880 (agent_mem_read_string): Likewise.
881 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
882 (add_traceframe_block): Add new argument TPOINT.
883 Increase TPOINT->traceframe_usage.
884 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
885 eval_tracepoint_agent_expr.
886 (condition_true_at_tracepoint): Likewise.
887 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
888 (agent_mem_read_string, agent_tsv_read): Likewise.
889
85e00e85
YQ
8902013-01-16 Yao Qi <yao@codesourcery.com>
891
892 * linux-low.c (linux_resume_one_lwp): Don't check
893 'lwp->bp_reinsert != 0'.
894
4039cf45
JB
8952013-01-07 Joel Brobecker <brobecker@adacore.com>
896 Pedro Alves <palves@redhat.com>
897
898 * lynx-low.c (ptrace_request_to_str): Define a temporary
899 macro and use it to simplify this function's implementation.
900
9044dee2
JB
9012013-01-07 Joel Brobecker <brobecker@adacore.com>
902
903 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
904 sets errno.
905
e6352c8f
JB
9062013-01-07 Joel Brobecker <brobecker@adacore.com>
907
908 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
909
50681a27
JB
9102013-01-07 Joel Brobecker <brobecker@adacore.com>
911
912 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
913
3f6e77ef
JB
9142013-01-07 Joel Brobecker <brobecker@adacore.com>
915
916 * lynx-low.c (lynx_resume): Use the resume_info parameter
917 to determine the ptid for the lynx_ptrace call, unless
918 it is equal to minus_one_ptid, in which case we use the
919 ptid of the current_inferior.
920 (lynx_wait_1): After having received a thread create/exit
921 event, resume the inferior's execution using the signaling
922 thread's ptid, rather than the old ptid.
923
7fda33ae
JB
9242013-01-07 Joel Brobecker <brobecker@adacore.com>
925
926 * lynx-low.c (lynx_resume): Delete variable ret.
927
b9786c74
JB
9282013-01-01 Joel Brobecker <brobecker@adacore.com>
929
930 * gdbreplay.c (gdbreplay_version): Update copyright year.
931 * server.c (gdbserver_version): Likewise.
932
8b93d60f
JB
9332012-12-17 Joel Brobecker <brobecker@adacore.com>
934
935 * lynx-low.c (lynx_wait_1): Add debug trace before adding
936 new thread.
937
037335a7
JB
9382012-12-17 Joel Brobecker <brobecker@adacore.com>
939
940 * lynx-low.c (ptrace_request_to_str): Add handling for
941 PTRACE_GETTRACESIG.
942
52d4cbd8
JB
9432012-12-17 Joel Brobecker <brobecker@adacore.com>
944
945 * lynx-low.c (lynx_attach): Delete variable new_process.
946
ab8f6ca9
JB
9472012-12-17 Joel Brobecker <brobecker@adacore.com>
948
949 * lynx-low.c (lynx_create_inferior): Delete variable
950 new_process.
951
78cbc024
JB
9522012-12-17 Joel Brobecker <brobecker@adacore.com>
953
954 * lynx-low.c (ptrace_request_to_str): Do not handle
955 PTRACE_GETTHREADLIST if this macro does not exist.
956
14a00470
YQ
9572012-12-15 Yao Qi <yao@codesourcery.com>
958
959 * Makefile.in (OBS): Add notif.o.
960 * notif.c, notif.h: New.
961 * server.c: Include "notif.h".
962 (struct vstop_notif) <next>: Remove.
963 <base>: New field.
964 (queue_stop_reply): Update.
965 (push_event, send_next_stop_reply): Remove.
966 (discard_queued_stop_replies): Update.
967 (notif_stop): New variable.
968 (handle_v_stopped): Remove.
969 (handle_v_requests): Don't call handle_v_stopped. Call
970 handle_ack_notif instead.
971 (queue_stop_reply_callback): Call notif_event_enque instead
972 of queue_stop_reply.
973 (handle_status): Don't call send_next_stop_reply, call
974 notif_write_event instead.
975 (kill_inferior_callback): Likewise.
976 (detach_or_kill_inferior_callback): Likewise.
977 (main): Call initialize_notif.
978 (process_serial_event): Call QUEUE_is_empty.
979 (handle_target_event): Call notif_push instead of push event.
980 * server.h (push_event): Remove declaration.
981
61c125b9
TT
9822012-12-10 Tom Tromey <tromey@redhat.com>
983
984 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
985 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
986 macros.
987 (.c.o): Rewrite.
988 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
989 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
990 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
991 (amd64-linux-ipa.o, ax.o): Rewrite.
992 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
993 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
994 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
995 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
996 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
997 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
998 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
999 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1000 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1001 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1002 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1003 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1004 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1005 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1006 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1007 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1008 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1009 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1010 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1011 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1012 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1013 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1014 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1015 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1016 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1017 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1018 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1019 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1020 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1021 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1022 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1023 (reg-tilegx.o): Remove.
1024 (all_object_files): New macro.
1025 Include .deps files.
1026 * aclocal.m4, configure: Rebuild.
1027 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1028 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1029 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1030
e90e9ad9
TT
10312012-12-05 Tom Tromey <tromey@redhat.com>
1032
1033 PR gdb/14917:
1034 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1035
02d403bf 10362012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
1037
1038 * configure.ac: Check for linux/perf_event.h.
1039 * config.in: Regenerated.
1040 * configure: Regenerated.
1041
0270a750
PA
10422012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1043
1044 * hostio.c (handle_readlink): Decrease buffer size
1045 parameter passed to readlink by one byte.
1046
8c29b58e
YQ
10472012-11-26 Yao Qi <yao@codesourcery.com>
1048
1049 * configure.ac (build_warnings): Append '-Wempty-body'.
1050 * configure: Regenerated.
1051 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1052 body.
1053
8bdce1ff
PM
10542012-11-15 Pierre Muller <muller@sourceware.org>
1055
1056 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1057 * config.in: Regenerate.
1058 * configure: Regenerate.
1059 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1060 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1061 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1062 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1063 header.
1064 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1065 instead of <sys/wait.h> header.
1066 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1067
02d403bf 10682012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
1069
1070 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1071 (various make rules): Remove -DGDBSERVER
1072
fbd5db48
YQ
10732012-11-09 Yao Qi <yao@codesourcery.com>
1074
1075 * spu-low.c (current_ptid): Move it to ..
1076 * gdbthread.h: ... here. New.
1077 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1078 * server.c (myresume, process_serial_event): Likewise.
1079 * thread-db.c (thread_db_find_new_threads): Likewise.
1080 * tracepoint.c (run_inferior_command): Likewise.
1081
b3dc46ff
AB
10822012-10-01 Andrew Burgess <aburgess@broadcom.com>
1083
1084 * server.c (handle_search_memory_1): Include access length in
1085 warning message.
1086
07c04788
HPN
10872012-09-05 Michael Brandt <michael.brandt@axis.com>
1088
1089 * linux-crisv32-low.c: Fix compile errors.
1090
918d227b
YQ
10912012-09-04 Yao Qi <yao@codesourcery.com>
1092
1093 * tracepoint.c (cmd_qtsv): Adjust debug message.
1094 Don't check CUR_TPOINT.
1095
18c1b81a
YQ
10962012-08-28 Yao Qi <yao@codesourcery.com>
1097
1098 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1099 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1100 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1101 Remove declarations of xmalloc, xreallloc, xstrdup and
1102 freeargv.
1103 * Makefile.in (libiberty_h): New.
1104 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1105 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1106
dc82f37b
YQ
11072012-08-23 Yao Qi <yao@codesourcery.com>
1108
1109 * server.h: Remove declaration of 'xsnprintf'.
1110
406b1477
KS
11112012-08-22 Keith Seitz <keiths@redhat.com>
1112
1113 * server.h: Include build-gnulib-gbserver/config.h.
1114 * gdbreplay.c: Likewise.
1115
e6712ff1
DE
11162012-08-08 Doug Evans <dje@google.com>
1117
1118 * Makefile.in (SFILES): Add gdb_vecs.c.
1119 (OBS): Add gdb_vecs.o.
1120 (gdb_vecs_h, host_defs_h): New variables.
1121 (thread-db.o): Add $(gdb_vecs_h) dependency.
1122 (gdb_vecs.o): New rule.
1123 * thread-db.c: #include "gdb_vecs.h".
1124 (thread_db_load_search): Use a vector to iterate over path elements.
1125 Handle text appearing after "$pdir".
1126
1127 * configure.ac: Add check for strstr.
1128 * config.in: Regenerate.
1129 * configure: Regenerate.
1130
7c3270ae
UW
11312012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1132
1133 * hostio.c (handle_pread): If pread fails, fall back to attempting
1134 lseek/read.
1135 (handle_pwrite): Likewise for pwrite.
1136
b62e2b27
UW
11372012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1138
1139 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1140 between unsupported TYPE and unimplementable ADDR/LEN combination.
1141 (arm_insert_point): Act on new return value.
1142
78a99e91
PA
11432012-07-31 Pedro Alves <palves@redhat.com>
1144
1145 * server.c (process_point_options): Only skip tokens if we find
1146 one that is unrecognized. Don't treat 'X' specially while
1147 skipping unrecognized tokens.
1148
fcf303ab
UW
11492012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1150
1151 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1152 to 4-byte-align HW breakpoint addresses for Thumb.
1153
7255706c
YQ
11542012-07-27 Yao Qi <yao@codesourcery.com>
1155
1156 PR remote/14161.
1157
1158 * server.h: Declare gdb_agent_about_to_close.
1159 * target.c (kill_inferior): Include "agent.h".
1160 New. Send command 'kill'.
1161 * target.h (kill_inferior): Removed macro.
1162 * tracepoint.c (gdb_agent_about_to_close): New.
1163 (gdb_agent_helper_thread): Handle command 'close'.
1164 Wait endlessly until the inferior stops.
1165 Install gdb_agent_remove_socket to atexit hook.
1166 (agent_socket_name): New static variable.
1167 (gdb_agent_socket_init): Replace local variable 'name' with
1168 'agent_socket_name'.
1169 (gdb_agent_remove_socket): New.
1170
5a3f286f
YQ
11712012-07-27 Yao Qi <yao@codesourcery.com>
1172
1173 * server.c (process_point_options): Stop at 'X' when parsing.
1174
961bd387
ME
11752012-07-19 Michael Eager <eager@eagercon.com>
1176
1177 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1178 to hw_execute.
1179 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1180 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1181 hardware breakpoint.
1182
aa7c7447
JK
11832012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1184
1185 * gdbserver/linux-low.c (initialize_low): Call
1186 linux_ptrace_init_warnings.
1187
7f216e7c
DE
11882012-07-02 Doug Evans <dje@google.com>
1189
1190 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1191 pointer to int.
1192
d3ce09f5
SS
11932012-07-02 Stan Shebs <stan@codesourcery.com>
1194
1195 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1196 (ax.o): Add it to build rule.
1197 (ax-ipa.o): Ditto.
1198 (OBS): Add format.o.
1199 (IPA_OBS): Add format.o.
1200 * server.c (handle_query): Claim support for breakpoint commands.
1201 (process_point_options): Add command case.
1202 (process_serial_event): Leave running if there are printfs in
1203 effect.
1204 * mem-break.h (any_persistent_commands): Declare.
1205 (add_breakpoint_commands): Declare.
1206 (gdb_no_commands_at_breakpoint): Declare.
1207 (run_breakpoint_commands): Declare.
1208 * mem-break.c (struct point_command_list): New struct.
1209 (struct breakpoint): New field command_list.
1210 (any_persistent_commands): New function.
1211 (add_commands_to_breakpoint): New function.
1212 (add_breakpoint_commands): New function.
1213 (gdb_no_commands_at_breakpoint): New function.
1214 (run_breakpoint_commands): New function.
1215 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1216 locally.
1217 * ax.c: Include format.h.
1218 (ax_printf): New function.
1219 (gdb_eval_agent_expr): Add printf opcode.
1220
2f8f6aed
YQ
12212012-06-13 Yao Qi <yao@codesourcery.com>
1222
1223 * server.c (start_inferior): Remove duplicated writes to fields
1224 'last_resume_kind' and 'last_status' of 'current_inferior'.
1225
0c9070b3
YQ
12262012-06-12 Yao Qi <yao@codesourcery.com>
1227 Pedro Alves <palves@redhat.com>
1228
1229 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1230 comment.
1231 * server.c (handle_v_cont): Extend comment.
1232
c52daf70
YQ
12332012-06-11 Yao Qi <yao@codesourcery.com>
1234
1235 * linux-low.c (linux_attach): Add 'static'.
1236
d38bbb0a
YQ
12372012-06-06 Yao Qi <yao@codesourcery.com>
1238
1239 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1240
89dc0afd
JK
12412012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1242
1243 Fix gcc -flto compilation warning.
1244 * server.c (main): Make variable multi_mode and attach volatile.
1245
75f62ce7
TJB
12462012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1247
1248 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1249 if the platform doesn't know about it.
1250
65f479b6
PA
12512012-05-30 Jeff Kenton <jkenton@tilera.com>
1252
1253 * Makefile.in (SFILES): Add linux-tile-low.c.
1254 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1255 * configure.srv: Handle tilegx-*-linux*.
1256 * linux-tile-low.c: New file.
1257
0c5bf5a9
JK
12582012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1259
1260 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1261
a493e3e2
PA
12622012-05-24 Pedro Alves <palves@redhat.com>
1263
1264 PR gdb/7205
1265
43aaf8b6 1266 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 1267
2ea28649
PA
12682012-05-24 Pedro Alves <palves@redhat.com>
1269
1270 PR gdb/7205
1271
1272 Replace target_signal with gdb_signal throughout.
1273
8d409d16
MR
12742012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1275
1276 * linux-low.c (linux_store_registers): Avoid the copying sequence
1277 when no data has been retrieved by ptrace.
1278
23512c01
MGD
12792012-05-22 Will Deacon <will.deacon@arm.com>
1280
1281 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1282 Include asm/ptrace.h.
1283 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1284 already defined.
1285
4934b29e
MR
12862012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1287
1288 * linux-low.c (linux_store_registers): Don't re-retrieve data
1289 with ptrace that has already been obtained from /proc. Always
1290 copy any data retrieved with ptrace to the buffer supplied.
1291
bde24c0a
PA
12922012-05-11 Yao Qi <yao@codesourcery.com>
1293 Pedro Alves <palves@redhat.com>
1294
1295 * linux-low.c (enum stopping_threads_kind): New.
1296 (stopping_threads): Change type to `enum stopping_threads_kind'.
1297 (handle_extended_wait): If stopping and suspending threads, leave
1298 the new_lwp suspended too.
1299 (linux_wait_for_event): Adjust.
1300 (stop_all_lwps): Set `stopping_threads' to
1301 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1302 whether we're suspending threads or just stopping them. Assert no
1303 recursion happens.
1304
623b6bdf
YQ
13052012-04-29 Yao Qi <yao@codesourcery.com>
1306
1307 * server.h: Move some code to ...
1308 * gdbthread.h: ... here. New.
1309 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1310 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1311 (nto-low.o, win32-low.o): Likewise.
1312 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1313 * regcache.c, remote-utils.c, server.c: Likewise.
1314 * target.c, tracepoint.c, win32-low.c: Likewise.
1315
f15f9948
TJB
13162012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1317
1318 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1319 (PTRACE_ARG4_TYPE): Likewise.
1320 (PTRACE_XFER_TYPE): Likewise.
1321 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1322 ptrace to PTRACE_ARG3_TYPE.
1323 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1324 (PTRACE_ARG4_TYPE): Likewise.
1325 (PTRACE_XFER_TYPE): Likewise.
1326 (linux_detach_one_lwp): Cast fourth argument of
1327 ptrace to long then PTRACE_ARG4_TYPE.
1328 (regsets_fetch_inferior_registers): Cast third argument of
1329 ptrace to long then PTRACE_ARG3_TYPE.
1330 (regsets_store_inferior_registers): Likewise.
1331
38ea300a
PA
13322012-04-20 Pedro Alves <palves@redhat.com>
1333
1334 * configure: Regenerate.
1335
c971b7fa
PA
13362012-04-19 Pedro Alves <palves@redhat.com>
1337
43aaf8b6 1338 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 1339 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
1340 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1341 (all, install-only, uninstall, clean-info, all-lib, clean): No
1342 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1343 (maintainer-clean realclean distclean): Use subdir_do.
1344 (subdir_do): New.
1345 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 1346 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
1347 * acinclude.m4: Include acx_configure_dir.m4.
1348 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1349 calls. Call AC_PROG_RANLIB. Configure gnulib using
1350 ACX_CONFIGURE_DIR.
1351 (GNULIB): New.
1352 (GNULIB_STDINT_H): Adjust.
1353 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1354 * gdbreplay.c: Include build-gnulib/config.h.
1355 * server.h: Likewise.
1356 * aclocal.m4: Regenerate.
1357 * config.in: Regenerate.
1358 * configure: Regenerate.
c971b7fa 1359
809277f8
PA
13602012-04-19 Pedro Alves <palves@redhat.com>
1361
1362 * Makefile.in (LIBGNU, INCGNU): Adjust.
1363 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1364 (all, install-only, uninstall, clean-info, all-lib, clean)
1365 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1366 * configure.ac: Adjust AC_OUTPUT output.
1367 * aclocal.m4: Regenerate.
1368 * configure: Regenerate.
1369
fd9bb8b8
PA
13702012-04-19 Pedro Alves <palves@redhat.com>
1371
1372 * Makefile.in (generated_files): New.
1373 (server_h): Remove the explicit dependency on config.h, and depend
1374 on $generated_files.
1375
1c298c66
PA
13762012-04-19 Pedro Alves <palves@redhat.com>
1377
1378 * Makefile.in (INCGNU): Add -Ignulib.
1379
57c4b50b
PA
13802012-04-19 Pedro Alves <palves@redhat.com>
1381
1382 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1383 (INCGNU): ... this, and spell out -I here.
1384 (GNULIB_LIB): Rename to ...
1385 (LIBGNU): ... this.
1386 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1387
1030e047
PA
13882012-04-19 Pedro Alves <palves@redhat.com>
1389
1390 * config.in: Regenerate.
1391
447d4319
PA
13922012-04-19 Pedro Alves <palves@redhat.com>
1393
1394 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1395 * server.h (memmem): Remove declaration.
1396 * config.in: Regenerate.
1397 * configure: Regenerate.
1398
aad9eab9
YQ
13992012-04-19 Yao Qi <yao@codesourcery.com>
1400
1401 * Makefile.in (SFILES): Add common/vec.c.
1402 (OBS): Add vec.o.
1403 (vec.o): New rule.
1404
3e10640f
YQ
14052012-04-19 Yao Qi <yao@codesourcery.com>
1406
1407 * remote-utils.c (prepare_resume_reply): Replace with macro
1408 target_core_of_thread.
1409 * server.c (handle_qxfer_threads_proper): Likewise.
1410 * target.h (traget_core_of_thread): New macro.
1411
71622373
PA
14122012-04-18 Pedro Alves <palves@redhat.com>
1413
1414 * aclocal.m4: Regenerate.
1415 * configure: Regenerate.
1416
80d26939
YQ
14172012-04-16 Yao Qi <yao@codesourcery.com>
1418
1419 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1420 duplicated on address.
1421
42476b70
YQ
14222012-04-16 Yao Qi <yao@codesourcery.com>
1423
1424 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1425 (struct tracepoint_action_ops) <send>: New field.
1426 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1427 (agent_expr_send, x_tracepoint_action_send): New.
1428 (l_tracepoint_action_send): New.
1429 (cmd_qtdp): Download and install tracepoint
1430 according to `use_agent'.
1431 (run_inferior_command): Add one more parameter `len'.
1432 Update callers.
1433 (tracepoint_send_agent): New.
1434 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1435
7bc83639
YQ
14362012-04-16 Yao Qi <yao@codesourcery.com>
1437
1438 * tracepoint.c (download_tracepoints): Moved to ...
1439 (cmd_qtstart): ... here.
1440
5f18041e
YQ
14412012-04-14 Yao Qi <yao@codesourcery.com>
1442
1443 * tracepoint.c: Include inttypes.h.
1444 (struct collect_memory_action): Use sized types.
1445 (struct tracepoint): Likewise.
1446 (cmd_qtdp, stop_tracing): Update print specifiers.
1447 (cmd_qtp, response_tracepoint): Likewise.
1448 (collect_data_at_tracepoint): Likewise.
1449 (collect_data_at_step): Likewise.
1450
55a8c076
YQ
14512012-04-14 Yao Qi <yao@codesourcery.com>
1452
1453 Import gnulib module inttypes.
1454 * aclocal.m4, config.in, configure: Regenerated.
1455
dc750257
YQ
14562012-04-14 Yao Qi <yao@codesourcery.com>
1457
1458 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1459 Makefile and config.status at last.
1460
0ab5faf9
YQ
14612012-04-13 Yao Qi <yao@codesourcery.com>
1462
1463 * tracepoint.c: Include stdint.h unconditionally.
1464
18f5fd81
TJB
14652012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1466
1467 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1468 on BFD_HAVE_SYS_PROCFS_TYPE.
1469 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1470 * configure: Regenerate.
1471 * config.in: Likewise.
1472
4d47af5c
L
14732012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1474
1475 * Makefile.in (clean): Also remove x32.c x32-linux.c
1476 x32-avx.c x32-avx-linux.c.
1477 (x32.o): New target.
1478 (x32.c): Likewise.
1479 (x32-linux.o): Likewise.
1480 (x32-linux.c): Likewise.
1481 (x32-avx.o): Likewise.
1482 (x32-avx.c): Likewise.
1483 (x32-avx-linux.o): Likewise.
1484 (x32-avx-linux.c): Likewise.
1485
1486 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1487 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1488 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1489 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1490 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1491 i386/x32-avx-linux.xml.
1492
1493 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1494 (init_registers_x32_avx_linux): Likwise.
1495 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1496 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1497
ecedbe58
PA
14982012-04-13 Pedro Alves <palves@redhat.com>
1499
1500 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1501 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1502 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1503 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1504 the sub-make.
1505
c92b5177
L
15062012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1507
1508 * linux-x86-low.c (compat_x32_clock_t): New.
1509 (compat_x32_siginfo_t): Likewise.
1510 (compat_x32_siginfo_from_siginfo): Likewise.
1511 (siginfo_from_compat_x32_siginfo): Likewise.
1512 (linux_is_elf64): Likewise.
1513 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1514 and siginfo_from_compat_x32_siginfo for x32.
1515 (x86_arch_setup): Set linux_is_elf64.
1516
214d508e
L
15172012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1518
1519 PR gdb/13969
1520 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1521 e_machine field.
1522 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1523 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1524 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1525 compatible with process.
1526
c9a1864a
YQ
15272012-04-12 Yao Qi <yao@codesourcery.com>
1528
1529 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1530 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1531 (install-only, install-info, clean): Handle sub dir gnulib.
1532 (all-lib, am--refresh): New targets.
1533 (memmem.o): Remove target.
1534 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1535 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1536 (AC_REPLACE_FUNCS): Remove memmem.
1537 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1538 (AC_OUTPUT): Generate Makefile in gnulib/.
1539 * aclocal.m4, config.in, configure: Regenerated.
1540
367ba2c2
MR
15412012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1542
1543 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1544
9d236627
PA
15452012-04-05 Pedro Alves <palves@redhat.com>
1546
1547 -Werror=strict-aliasing
1548
1549 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1550 pointer.
1551
111217b3
PA
15522012-04-04 Pedro Alves <palves@redhat.com>
1553
1554 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1555 (sparc_store_gregset_from_stack, sparc_store_gregset)
1556 (sparc_breakpoint_at): Fix formatting.
1557
8365dcf5
TJB
15582012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1559
1560 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1561 are available.
1562 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1563 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1564 * config.in: Regenerate.
1565 * configure: Likewise.
1566
689cc2ae
PA
15672012-03-29 Pedro Alves <palves@redhat.com>
1568
1569 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1570 Correct ptrace arguments.
1571
c14dfd32
PA
15722012-03-28 Pedro Alves <palves@redhat.com>
1573
1574 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1575 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1576 (IA64_FR1_REGNUM): New defines.
1577 (ia64_fetch_register): New.
1578 (the_low_target): Install it.
1579 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1580 field.
1581 * linux-low.c (linux_fetch_registers): Try the
1582 the_low_target.fetch_register hook first.
1583
1584 * linux-arm-low.c (the_low_target): Adjust.
1585 * linux-bfin-low.c (the_low_target): Adjust.
1586 * linux-cris-low.c (the_low_target): Adjust.
1587 * linux-crisv32-low.c (the_low_target): Adjust.
1588 * linux-m32r-low.c (the_low_target): Adjust.
1589 * linux-m68k-low.c (the_low_target): Adjust.
1590 * linux-mips-low.c (the_low_target): Adjust.
1591 * linux-ppc-low.c (the_low_target): Adjust.
1592 * linux-s390-low.c (the_low_target): Adjust.
1593 * linux-sh-low.c (the_low_target): Adjust.
1594 * linux-sparc-low.c (the_low_target): Adjust.
1595 * linux-tic6x-low.c (the_low_target): Adjust.
1596 * linux-x86-low.c (the_low_target): Adjust.
1597 * linux-xtensa-low.c (the_low_target): Adjust.
1598
63c88e13
PA
15992012-03-26 Pedro Alves <palves@redhat.com>
1600
1601 * server.c (handle_qxfer_libraries): Don't bail early if
1602 the_target->qxfer_libraries_svr4 is not NULL.
1603
fb723180
PA
16042012-03-26 Pedro Alves <palves@redhat.com>
1605
1606 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1607
0afae3cf
PA
16082012-03-23 Pedro Alves <palves@redhat.com>
1609
1610 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1611 "library-list-svr4" element's start tag when the the DSO list is
1612 empty.
1613
485f1ee4
PA
16142012-03-23 Pedro Alves <palves@redhat.com>
1615
1616 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1617 a variable whose type size is the same as the inferior's pointer
1618 size.
1619
a5362b9a
TS
16202012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1621
1622 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1623 struct siginfo.
1624 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1625 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1626 * linux-low.h: Include <signal.h>.
1627 (struct siginfo): Remove forward declaration.
1628 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1629 struct siginfo.
1630
d226c142
MF
16312012-03-21 Mike Frysinger <vapier@gentoo.org>
1632
1633 * .gitignore: Ignore more files.
1634
122f36ef
PA
16352012-03-19 Pedro Alves <palves@redhat.com>
1636 Jan Kratochvil <jan.kratochvil@redhat.com>
1637
1638 * server.c (cont_thread, general_thread): Add describing comments.
1639 (start_inferior): Clear `cont_thread'.
1640 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1641 of a process.
1642
fc3e5175
YQ
16432012-03-15 Yao Qi <yao@codesourcery.com>
1644
1645 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1646 handling to ...
1647 (cmd_qtdp): ... here.
1648
8d0d92cd
YQ
16492012-03-15 Yao Qi <yao@codesourcery.com>
1650
1651 * tracepoint.c (struct tracepoint_action_ops): New.
1652 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1653 (m_tracepoint_action_download): New.
1654 (r_tracepoint_action_download): New.
1655 (x_tracepoint_action_download): New.
1656 (l_tracepoint_action_download): New.
1657 (add_tracepoint_action): Install `action->ops' according type.
1658 (download_tracepoint_1): Move code `download' function pointer
1659 of various tracepoint_action_ops.
1660
87b0bb13
JK
16612012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1662
1663 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1664 linux_ptrace_attach_warnings.
1665
5f572dec
JK
16662012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1667
1668 * Makefile.in (linux-ptrace.o): New.
1669 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1670 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1671 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1672 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1673 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1674 of these targets.
1675 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1676
f4647387
YQ
16772012-03-08 Yao Qi <yao@codesourcery.com>
1678 Pedro Alves <palves@redhat.com>
1679
1680 Fix PR server/13392.
1681 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1682 offset of JMP insn.
1683 * tracepoint.c (remove_tracepoint): New.
1684 (cmd_qtdp): Call remove_tracepoint when failed to install.
1685
9b224c5e
PA
16862012-03-07 Pedro Alves <palves@redhat.com>
1687
1688 * linux-low.c (get_detach_signal): New.
1689 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1690 Pass on pending signals to PTRACE_DETACH. Check the result of the
1691 ptrace call.
1692 * server.c (program_signals, program_signals_p): New.
1693 (handle_general_set): Handle QProgramSignals.
1694 * server.h (program_signals, program_signals_p): Declare.
1695
e237a7e2
JK
16962012-03-05 Pedro Alves <palves@redhat.com>
1697 Jan Kratochvil <jan.kratochvil@redhat.com>
1698
1699 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1700 New comment why.
1701
5808517f
YQ
17022012-03-03 Yao Qi <yao@codesourcery.com>
1703
1704 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1705 agent_look_up_symbols.
1706
58b4daa5
YQ
17072012-03-03 Yao Qi <yao@codesourcery.com>
1708
1709 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1710 (linux-x86-low.o): Likewise.
1711 * server.h: Remove in_process_agent_loaded.
1712 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1713 common/agent.c.
1714 Update callers.
1715
8ffcbaaf
YQ
17162012-03-03 Yao Qi <yao@codesourcery.com>
1717
1718 * tracepoint.c (gdb_agent_capability): New global.
1719 (in_process_agent_loaded_ust): Renamed to
1720 `in_process_agent_supports_ust'.
1721 Update callers.
1722 (in_process_agent_supports_ust): Call agent_capability_check.
1723 (clear_installed_tracepoints): Assert that agent supports
1724 agent.
1725
d1feda86
YQ
17262012-03-03 Yao Qi <yao@codesourcery.com>
1727
1728 * linux-low.c (linux_supports_agent): New.
1729 (linux_target_ops): Initialize field `supports_agent' with
1730 linux_supports_agent.
1731 * target.h (struct target_ops) <supports_agent>: New.
1732 (target_supports_agent): New macro.
1733 * server.c (handle_general_set): Handle packet 'QAgent'.
1734 (handle_query): Send `QAgent+'.
1735 * Makefile.in (server.o): Depends on agent.h.
1736
2fa291ac
YQ
17372012-03-03 Yao Qi <yao@codesourcery.com>
1738
1739 * Makefile.in (OBS): Add agent.o.
1740 Add new rule for agent.o.
1741 Track dependence of tracepoint.c on agent.h.
1742 * tracepoint.c (run_inferior_command_1):
1743 (run_inferior_command): Call agent_run_command.
1744 (gdb_ust_connect_sync_socket): Deleted. Move it to
1745 common/agent.c.
1746 (resume_thread, stop_thread): Likewise.
1747 (gdb_ust_socket_init): Renamed to ...
1748 (gdb_agent_socket_init): ... New.
1749 (gdb_ust_thread): Renamed to ...
1750 (gdb_agent_helper_thread): ... New.
1751 (gdb_ust_init): Move some code to ...
1752 (gdb_agent_init): ... here. New.
1753 [HAVE_UST]: Call gdb_ust_init.
1754 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1755 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1756 * config.in, configure: Regenerated.
1757
05044653
PA
17582012-03-02 Pedro Alves <palves@redhat.com>
1759
1760 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1761 * linux-low.c (struct simple_pid_list): New.
1762 (stopped_pids): New a struct simple_pid_list pointer.
1763 (add_to_pid_list, pull_pid_from_list): New.
1764 (handle_extended_wait): Don't assume the first signal new children
1765 report is SIGSTOP. Adjust call to pull_pid_from_list.
1766 (linux_wait_for_lwp): Adjust.
1767
8d00225b
YQ
17682012-03-02 Yao Qi <yao@codesourcery.com>
1769
1770 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1771 debug log.
1772
19560ba5
YQ
17732012-03-02 Yao Qi <yao@codesourcery.com>
1774
1775 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1776 `stop_pc' and `tpoint'. Update caller.
1777
1faeff08
MR
17782012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1779
1780 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1781 * linux-low.c (use_linux_regsets): New macro.
1782 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1783 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1784 (linux_register_in_regsets): New function.
1785 (usr_fetch_inferior_registers): Skip registers covered by
1786 regsets.
1787 (usr_store_inferior_registers): Likewise.
1788 (usr_fetch_inferior_registers): New macro.
1789 (usr_store_inferior_registers): Likewise.
1790 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1791 (linux_store_registers): Likewise.
1792 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1793 prototype.
1794 (init_registers_mips64_dsp_linux): Likewise.
1795 (init_registers_mips_linux): New macro.
1796 (init_registers_mips_dsp_linux): Likewise.
1797 (mips_dsp_num_regs): Likewise.
1798 (DSP_BASE, DSP_CONTROL): New fallback macros.
1799 (mips_base_regs): New macro.
1800 (mips_regmap): Use it. Fix the size.
1801 (mips_dsp_regmap): New variable.
1802 (mips_dsp_regset_bitmap): Likewise.
1803 (mips_arch_setup): New function.
1804 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1805 than mips_regmap.
1806 (mips_cannot_store_register): Likewise.
1807 (the_low_target): Update .arch_setup, .num_regs and .regmap
1808 initializers. Add .regset_bitmap initializer.
1809 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1810 initializer.
1811 * linux-bfin-low.c (the_low_target): Likewise.
1812 * linux-cris-low.c (the_low_target): Likewise.
1813 * linux-crisv32-low.c (the_low_target): Likewise.
1814 * linux-ia64-low.c (the_low_target): Likewise.
1815 * linux-m32r-low.c (the_low_target): Likewise.
1816 * linux-m68k-low.c (the_low_target): Likewise.
1817 * linux-ppc-low.c (the_low_target): Likewise.
1818 * linux-s390-low.c (the_low_target): Likewise.
1819 * linux-sh-low.c (the_low_target): Likewise.
1820 * linux-sparc-low.c (the_low_target): Likewise.
1821 * linux-tic6x-low.c (the_low_target): Likewise.
1822 * linux-x86-low.c (the_low_target): Likewise.
1823 * linux-xtensa-low.c (the_low_target): Likewise.
1824 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1825 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1826 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1827 srv_xmlfiles.
1828 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1829 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1830
c03e6ccc
YQ
18312012-02-29 Yao Qi <yao@codesourcery.com>
1832 Pedro Alves <palves@redhat.com>
1833
1834 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1835 `step_over_finished' is true.
1836
644cebc9
PA
18372012-02-27 Pedro Alves <palves@redhat.com>
1838
1839 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1840 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1841
c14d7ab2
PA
18422012-02-27 Pedro Alves <palves@redhat.com>
1843
1844 PR server/9684
1845 * linux-low.c (pid_is_stopped): New.
1846 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1847
412c89dd
LM
18482012-02-25 Luis Machado <lgustavo@codesourcery.com>
1849
1850 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1851 of conditions.
1852
b745defe
MR
18532012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1854
1855 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1856
9f3a5c85
LM
18572012-02-24 Luis Machado <lgustavo@codesourcery>
1858
1859 * server.c (handle_query): Advertise support for target-side
1860 breakpoint condition evaluation.
1861 (process_point_options): New function.
1862 (process_serial_event): When inserting a breakpoint, check for
1863 a target-side condition that should be evaluated.
1864
1865 * mem-break.c: Include regcache.h and ax.h.
1866 (point_cond_list_t): New data structure.
1867 (breakpoint) <cond_list>: New field.
1868 (find_gdb_breakpoint_at): Make non-static.
1869 (delete_gdb_breakpoint_at): Clear any target-side
1870 conditions.
1871 (clear_gdb_breakpoint_conditions): New function.
1872 (add_condition_to_breakpoint): Likewise.
1873 (add_breakpoint_condition): Likewise.
1874 (gdb_condition_true_at_breakpoint): Likewise.
1875 (gdb_breakpoint_here): Return result directly instead
1876 of going through a local variable.
1877
1878 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1879 (clear_gdb_breakpoint_conditions): Likewise.
1880 (add_breakpoint_condition): Likewise.
1881 (gdb_condition_true_at_breakpoint): Likewise.
1882
1883 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1884 (need_step_over_p): Take target-side breakpoint condition into
1885 consideration.
1886
5e1dc496
LM
18872012-02-24 Luis Machado <lgustavo@codesourcery>
1888
1889 * server.h: Include tracepoint.h.
1890 (agent_mem_read, agent_get_trace_state_variable_value,
1891 agent_set_trace_state_variable_value,
1892 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1893 get_set_tsv_func_addr): New prototypes.
1894
1895 * ax.h: New include file.
1896 * ax.c: New source file.
1897
1898 * tracepoint.c: Include ax.h.
1899 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1900 agent_expr, eval_result_type): Move to ax.h.
1901 (parse_agent_expr): Rename to ...
1902 (gdb_parse_agent_expr): ... this, make it non-static and move
1903 to ax.h.
1904 (unparse_agent_expr) Rename to ...
1905 (gdb_unparse_agent_expr): ... this, make it non-static and move
1906 to ax.h.
1907 (eval_agent_expr): Rename to ...
1908 (eval_tracepoint_agent_expr): ... this.
1909 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1910 forward declarations.
1911 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1912 (agent_get_trace_state_variable_value): New function.
1913 (agent_set_trace_state_variable_value): New function.
1914 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1915 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1916 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1917 (condition_true_at_tracepoint): Likewise.
1918 (parse_agent_expr): Rename to ...
1919 (gdb_parse_agent_expr): ... this and move to ax.c.
1920 (unparse_agent_expr): Rename to ...
1921 (gdb_unparse_agent_expr): ... this and move to ax.c.
1922 (gdb_agent_op_name): Move to ax.c.
1923 (eval_agent_expr): Rename to ...
1924 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1925 and move to ax.c.
1926 (eval_tracepoint_agent_expr): New function.
1927 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 1928 non-static.
5e1dc496
LM
1929 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1930 ax.c.
1931 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1932 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1933 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1934 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1935 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1936 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1937 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1938 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1939 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1940 (compile_bytecodes): Remove forward declaration.
1941 (is_goto_target): Move to ax.c.
1942 (compile_bytecodes): Move to ax.c and call
1943 agent_get_trace_state_variable_value (...) and
1944 agent_set_trace_state_variable_value (...).
1945
1946 * Makefile.in: Update ax.c and IPA dependencies.
1947
277e4e52
PA
19482012-02-24 Pedro Alves <palves@redhat.com>
1949
1950 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1951 (cmd_bigqtbuffer_circular): ... this. Only handle
1952 'QTBuffer:circular:'.
1953 (handle_tracepoint_general_set): Adjust.
1954
bf4c19f7
YQ
19552012-02-16 Yao Qi <yao@codesourcery.com>
1956
1957 * inferiors.c: Move code to ...
1958 * dll.c: .... here. New.
1959 * server.h: Declare clear_dlls.
1960 * Makefile.in (SFILES): Add dll.c.
1961 (OBS): Add dll.o
1962 (dll.o): New rule.
1963
d73f2619
YQ
19642012-02-11 Yao Qi <yao@codesourcery.com>
1965
1966 * server.c: (handle_monitor_command): Add a new parameter
1967 `own_buf'.
1968 (handle_query): Update caller.
1969
f8255c2a
JB
19702012-02-09 Joel Brobecker <brobecker@adacore.com>
1971
1972 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1973 * configure, config.in: Regenerate.
1974 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1975 is not defined.
1976
da84f473
PA
19772012-02-02 Pedro Alves <palves@redhat.com>
1978
1979 Try SIGKILL first, then PTRACE_KILL.
1980 * linux-low.c (linux_kill_one_lwp): New.
1981 (linux_kill_one_lwp): Rename to ...
1982 (kill_one_lwp_callback): ... this. Use the new
1983 linux_kill_one_lwp.
1984
e886a173
PA
19852012-02-02 Pedro Alves <palves@redhat.com>
1986
1987 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1988 inferior.
1989
be07f1a2
PA
19902012-01-27 Pedro Alves <palves@redhat.com>
1991
1992 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1993 (elf_64_file_p): Make static.
1994 (linux_pid_exe_is_elf_64_file): New.
1995 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1996 Delete declarations.
1997 (linux_pid_exe_is_elf_64_file): Declare.
1998 * linux-x86-low.c (x86_arch_setup): Use
1999 linux_pid_exe_is_elf_64_file.
2000
d8301ad1
JK
20012012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2002
2003 * linux-low.c (linux_wait_for_event_1): Rename to ...
2004 (linux_wait_for_event): ... here and merge it with former
2005 linux_wait_for_event - new variable wait_ptid, use it.
2006 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2007
01b17894
PA
20082012-01-23 Pedro Alves <palves@redhat.com>
2009
2010 * server.c (main): Avoid yet another case of infinite loop while
2011 detaching/killing after a longjmp.
2012
e825046f
JK
20132012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2014
2015 Code cleanup.
2016 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2017
b9e7b9c3
UW
20182012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2019
2020 * hostio.c (handle_readlink): New function.
2021 (handle_vFile): Call it to handle "vFile:readlink" packets.
2022
901f9912
UW
20232012-01-20 Pedro Alves <palves@redhat.com>
2024 Ulrich Weigand <ulrich.weigand@linaro.org>
2025
2026 * server.c (handle_v_requests): Only support vAttach and vRun to
2027 start multiple processes when in extended protocol mode.
2028
fc1ab1a0
PA
20292012-01-17 Pedro Alves <palves@redhat.com>
2030
2031 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2032 memalign plus mprotect to allocate the scratch buffer.
2033
7d5d4e98
PA
20342012-01-13 Pedro Alves <palves@redhat.com>
2035
2036 * server.c (attach_inferior): Clear `cont_thread'.
2037
f128d5e9
PA
20382012-01-13 Pedro Alves <palves@redhat.com>
2039
2040 * server.c (main): Avoid infinite loop while detaching/killing
2041 after a longjmp.
2042
06db92f0
DE
20432012-01-09 Doug Evans <dje@google.com>
2044
2045 * server.c (start_inferior): Set last_ptid in --wrapper case.
2046
32d92999
YQ
20472012-01-06 Yao Qi <yao@codesourcery.com>
2048
2049 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2050 defined.
2051 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2052
5e0a92a9
YQ
20532012-01-04 Yao Qi <yao@codesourcery.com>
2054
2055 * tracepoint.c (cmd_qtdp): Print debug message
2056 for static tracepoint.
2057
ae639e8c
YQ
20582012-01-04 Yao Qi <yao@codesourcery.com>
2059
2060 * tracepoint.c (trace_vdebug): Differentiate debug message
2061 between gdbserver and IPA.
2062
f72429c5
YQ
20632012-01-03 Yao Qi <yao@codesourcery.com>
2064
2065 * tracepoint.c (tracepoint_was_hit): Don't collect for
2066 static tracepoint.
2067
12c3e59c
JB
20682012-01-02 Joel Brobecker <brobecker@adacore.com>
2069
2070 * terminal.h: Reformat copyright header.
2071
67827812
JB
20722012-01-02 Joel Brobecker <brobecker@adacore.com>
2073
2074 * server.c (gdbserver_version): Update copyright year.
2075 * gdbreplay.c (gdbreplay_version): Likewise.
2076
3e52c33d
JK
20772011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2078
2079 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2080
2081 Revert:
2082 2011-12-18 Hui Zhu <teawater@gmail.com>
2083 * linux-low.c (linux_create_inferior): Save return value to ret.
2084
66f1260e
HZ
20852011-12-18 Hui Zhu <teawater@gmail.com>
2086
2087 * linux-low.c (linux_create_inferior): Save return value to ret.
2088
e77616d7
DE
20892011-12-16 Doug Evans <dje@google.com>
2090
e7b06c57
DE
2091 * linux-low.c (linux_create_inferior): If stdio connection,
2092 redirect stdin from /dev/null, stdout to stderr.
2093 * remote-utils.c (remote_is_stdio): New static global.
2094 (remote_connection_is_stdio): New function.
2095 (remote_prepare): Handle stdio connection.
2096 (remote_open): Ditto.
2097 (remote_close): Don't close stdin for stdio connections.
2098 (read_prim,write_prim): New functions. Replace all calls to
2099 read/write to these.
2100 * server.c (main): Watch for "-" argument. Move call to
2101 remote_prepare before start_inferior.
2102 * server.h (STDIO_CONNECTION_NAME): New macro.
2103 (remote_connection_is_stdio): Declare.
2104
e77616d7
DE
2105 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2106 in debugging output.
2107
82067193
YQ
21082011-12-15 Yao Qi <yao@codesourcery.com>
2109
2110 * tracepoint.c: Include sys/syscall.h.
2111 (gdb_ust_thread): Remove preprocessor conditional.
2112
82bfbe7e
PA
21132011-12-14 Pedro Alves <pedro@codesourcery.com>
2114
2115 * linux-low.c (linux_detach_one_lwp): Call
2116 the_low_target.prepare_to_resume before detaching.
2117
712c6575
YQ
21182011-12-14 Yao Qi <yao@codesourcery.com>
2119
2120 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2121 of write.
2122
d54d1edf
YQ
21232011-12-14 Yao Qi <yao@codesourcery.com>
2124
2125 * i386-low.c (i386_low_stopped_data_address): Initialize local
2126 variable `control'.
2127
6210a125
PA
21282011-12-13 Pedro Alves <pedro@codesourcery.com>
2129
2130 PR remote/13492
2131
2132 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2133 DR_CONTROL unless necessary. Extend comments.
2134 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2135 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2136
2ece8244
YQ
21372011-12-13 Yao Qi <yao@codesourcery.com>
2138
2139 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2140 macros.
2141 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2142
784867a5
JK
21432011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2144
2145 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2146 Print new debug message for such case.
2147
6bf36717
JK
21482011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2149
2150 Fix overlapping memcpy.
2151 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2152 the read_inferior_memory transfer.
2153 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2154 write_inferior_memory transfer.
2155 (set_fast_tracepoint_jump): New variable buf. Use it for the
2156 read_inferior_memory and write_inferior_memory transfers.
2157 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2158 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2159 Use it for the write_inferior_memory transfer.
2160 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2161 buffers.
2162
50275556
MR
21632011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2164
2165 * linux-low.c (fetch_register, store_register): Make code
2166 consistent, fix formatting.
2167
7325beb4
MR
21682011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2169
2170 * linux-low.c (usr_store_inferior_registers): Factor out code
2171 to handle individual registers into...
2172 (store_register): ... this new function.
2173
c642a434
UW
21742011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2175
2176 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2177 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2178 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2179 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2180 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2181 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2182 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2183 (srv_xmlfiles): Add new XML files.
2184
2185 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2186 and <sys/uio.h>.
2187 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2188 (init_registers_s390_linux32v1): Add prototype.
2189 (init_registers_s390_linux32v2): Likewise.
2190 (init_registers_s390_linux64v1): Likewise.
2191 (init_registers_s390_linux64v2): Likewise.
2192 (init_registers_s390x_linux64v1): Likewise.
2193 (init_registers_s390x_linux64v2): Likewise.
2194 (s390_num_regs): Increment to 52.
2195 (s390_regmap): Add orig_r2 register.
2196 (s390_num_regs_3264): Increment to 68.
2197 (s390_regmap_3264): Add orig_r2 register.
2198 (s390_collect_ptrace_register): Handle orig_r2 register.
2199 (s390_supply_ptrace_register): Likewise.
2200 (s390_fill_last_break): New function.
2201 (s390_store_last_break): Likewise.
2202 (s390_fill_system_call): New function.
2203 (s390_store_system_call): Likewise.
2204 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2205 register sets.
2206 (s390_check_regset): New function.
2207 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2208 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2209 Update target_regsets for available register sets.
2210
2268b414
JK
22112011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2212 Jan Kratochvil <jan.kratochvil@redhat.com>
2213
2214 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2215 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2216 New.
2217 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2218 * linux-low.h (struct process_info_private): New member r_debug.
2219 * server.c (handle_qxfer_libraries): Call
2220 the_target->qxfer_libraries_svr4.
2221 (handle_qxfer_libraries_svr4): New function.
2222 (qxfer_packets): New entry "libraries-svr4".
2223 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2224 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2225 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2226 PACKET_qXfer_libraries_svr4.
2227
d6db1fab
UW
22282011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2229
2230 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2231 PSW address/mask between 8-byte and 16-byte formats.
2232 (s390_supply_ptrace_register): Likewise.
2233 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2234 basic addressing mode bit.
2235
242f5f1c
SS
22362011-11-24 Stan Shebs <stan@codesourcery.com>
2237
2238 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2239
f196051f
SS
22402011-11-17 Stan Shebs <stan@codesourcery.com>
2241
2242 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2243 (tracing_start_time): New global.
2244 (tracing_stop_time): New global.
2245 (tracing_user_name): New global.
2246 (tracing_notes): New global.
2247 (tracing_stop_note): New global.
2248 (cmd_qtstart): Set traceframe_usage, start_time.
2249 (stop_tracing): Set stop_time.
2250 (cmd_qtstatus): Report additional status.
2251 (cmd_qtp): New function.
2252 (handle_tracepoint_query): Call it.
2253 (cmd_qtnotes): New function.
2254 (handle_tracepoint_general_set): Call it.
2255 (get_timestamp): Rename from tsv_get_timestamp.
2256
405f8e94
SS
22572011-11-14 Stan Shebs <stan@codesourcery.com>
2258 Kwok Cheung Yeung <kcy@codesourcery.com>
2259
2260 * linux-x86-low.c (small_jump_insn): New.
2261 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2262 trampoline and error message, build a trampoline and issue a small
2263 jump instruction to it.
2264 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2265 trampoline and error message.
2266 (x86_get_min_fast_tracepoint_insn_len): New.
2267 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2268 * linux-low.h (struct linux_target_ops): Add arguments to
2269 install_fast_tracepoint_jump_pad operation, add new operation.
2270 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2271 arguments.
2272 (linux_get_min_fast_tracepoint_insn_len): New function.
2273 (linux_target_op): Add new operation.
2274 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2275 (gdb_trampoline_buffer_end): Ditto.
2276 (gdb_trampoline_buffer_error): Ditto.
2277 (struct ipa_sym_addresses): Add fields for new IPA variables.
2278 (symbol_list): Add entries for new IPA variables.
2279 (struct tracepoint): Add fields to hold the address range of the
2280 trampoline used by the tracepoint.
2281 (trampoline_buffer_head): New static variable.
2282 (trampoline_buffer_tail): Ditto.
2283 (claim_trampoline_space): New function.
2284 (have_fast_tracepoint_trampoline_buffer): New function.
2285 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2286 structure.
2287 (install_fast_tracepoint): Ditto, also add error buffer argument.
2288 (cmd_qtminftpilen): New function.
2289 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2290 (fast_tracepoint_from_trampoline_address): New function.
2291 (fast_tracepoint_collecting): Handle trampoline as part of jump
2292 pad space.
2293 (set_trampoline_buffer_space): New function.
2294 (initialize_tracepoint): Initialize new IPA variables.
2295 * target.h (struct target_ops): Add arguments to
2296 install_fast_tracepoint_jump_pad operation, add new
2297 get_min_fast_tracepoint_insn_len operation.
2298 (target_get_min_fast_tracepoint_insn_len): New.
2299 (install_fast_tracepoint_jump_pad): Add arguments.
2300 * server.h (IPA_BUFSIZ): Define.
2301 * linux-i386-ipa.c: Include extra header files.
2302 (initialize_fast_tracepoint_trampoline_buffer): New function.
2303 (initialize_low_tracepoint): Call it.
2304 * server.h (set_trampoline_buffer_space): Declare.
2305 (claim_trampoline_space): Ditto.
2306 (have_fast_tracepoint_trampoline_buffer): Ditto.
2307
1e4d1764
YQ
23082011-11-14 Yao Qi <yao@codesourcery.com>
2309
2310 * server.c (handle_query): Handle InstallInTrace for qSupported.
2311 * tracepoint.c (add_tracepoint): Sort list.
2312 (install_tracepoint, download_tracepoint): New.
2313 (cmd_qtdp): Call them to install and download tracepoints.
2314 (sort_tracepoints): Removed.
2315 (cmd_qtstart): Update.
2316
5c73ff4e
YQ
23172011-11-14 Yao Qi <yao@codesourcery.com>
2318
2319 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2320 * mem-break.h: Declare.
2321 * tracepoint.c (cmd_qtstart): Move some code to ...
2322 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2323 New.
2324 (download_tracepoints): Move some code to ...
2325 (download_tracepoint_1): ... here. New.
2326
86a30030
YQ
23272011-11-08 Yao Qi <yao@codesourcery.com>
2328
2329 * remote-utils.c (relocate_instruction): A comment fix.
2330
8d26e50c
JB
23312011-11-07 Joel Brobecker <brobecker@adacore.com>
2332
2333 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2334 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2335 dr_status_mirror and dr_control_mirror from debug_reg_state.
2336 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2337 (i386_initial_stuff): Remove use of deleted globals.
2338 (i386_get_thread_context, i386_set_thread_context,
2339 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2340 from debug_reg_state.
2341
a59306a3
YQ
23422011-11-05 Yao Qi <yao@codesourcery.com>
2343
2344 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2345 address as TPOINT's.
2346
3065dfb6
SS
23472011-11-02 Stan Shebs <stan@codesourcery.com>
2348
2349 * tracepoint.c (agent_mem_read_string): New function.
2350 (eval_agent_expr): Call it for tracenz.
2351 * server.c (handle_query): Report support for tracenz.
2352
fd0d8c7c
YQ
23532011-11-02 Yao Qi <yao@codesourcery.com>
2354
2355 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2356
609086b1
YQ
23572011-11-02 Yao Qi <yao@codesourcery.com>
2358
2359 * target.h: Fix a typo in comment.
2360
b9fd1791
PA
23612011-10-31 Pedro Alves <pedro@codesourcery.com>
2362
2363 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2364 clobber the breakpoints' shadows with fast tracepoint jumps.
2365 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2366 * target.c (write_inferior_memory): Also pass MYADDR down to
2367 check_mem_write.
2368
03583c20
UW
23692011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2370
2371 * configure.ac: Check support for personality routine.
2372 * configure: Regenerate.
2373 * config.in: Likewise.
2374 * linux-low.c: Include <sys/personality.h>.
2375 Define ADDR_NO_RANDOMIZE if necessary.
2376 (linux_create_inferior): Disable address space randomization when
2377 forking inferior, if requested.
2378 (linux_supports_disable_randomization): New function.
2379 (linux_target_ops): Install it.
2380 * server.h (disable_randomization): Declare.
2381 * server.c (disable_randomization): New global variable.
2382 (handle_general_set): Handle QDisableRandomization.
2383 (handle_query): Likewise for qSupported.
2384 (main): Support --disable-randomization and --no-disable-randomization
2385 command line arguments.
2386 * target.h (struct target_ops): Add supports_disable_randomization.
2387 (target_supports_disable_randomization): New macro.
2388
723b724b
MF
23892011-09-29 Mike Frysinger <vapier@gentoo.org>
2390
2391 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2392 ifdef check.
2393 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2394 [!PT_GETDSBT] (target_loadmap): New definition.
2395 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2396 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2397 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2398 and PT_GETDSBT to LINUX_LOADMAP.
2399 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2400 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2401
55329a5c 24022011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
2403
2404 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2405 (arm_linux_hwbp_cap): New static variable.
2406 (arm_linux_get_hwbp_cap): Replace by ...
2407 (arm_linux_init_hwbp_cap): ... this new function.
2408 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2409 (arm_linux_get_hw_watchpoint_count): Likewise.
2410 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2411 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2412 (arm_prepare_to_resume): Use perror_with_name instead of error.
2413
55329a5c 24142011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
2415
2416 * linux-arm-low.c: Include <signal.h>.
2417 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2418 (struct arm_linux_hwbp_cap): New data type.
2419 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2420 (struct arm_linux_hw_breakpoint): New data type.
2421 (MAX_BPTS, MAX_WPTS): Define.
2422 (struct arch_process_info, struct arch_lwp_info): New data types.
2423 (arm_linux_get_hwbp_cap): New function.
2424 (arm_linux_get_hw_breakpoint_count): Likewise.
2425 (arm_linux_get_hw_watchpoint_count): Likewise.
2426 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2427 (arm_hwbp_control_initialize): Likewise.
2428 (arm_hwbp_control_is_enabled): Likewise.
2429 (arm_hwbp_control_is_initialized): Likewise.
2430 (arm_hwbp_control_disable): Likewise.
2431 (arm_linux_hw_breakpoint_equal): Likewise.
2432 (arm_linux_hw_point_initialize): Likewise.
2433 (struct update_registers_data): New data structure.
2434 (update_registers_callback: New function.
2435 (arm_insert_point): Likewise.
2436 (arm_remove_point): Likewise.
2437 (arm_stopped_by_watchpoint): Likewise.
2438 (arm_stopped_data_address): Likewise.
2439 (arm_new_process): Likewise.
2440 (arm_new_thread): Likewise.
2441 (arm_prepare_to_resume): Likewise.
2442 (the_low_target): Register arm_insert_point, arm_remove_point,
2443 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2444 arm_new_thread, and arm_prepare_to_resume.
2445
6b9801d4
SS
24462011-09-15 Stan Shebs <stan@codesourcery.com>
2447
2448 * server.h (struct emit_ops): Add compare-goto fields.
2449 * tracepoint.c (gdb_agent_op_sizes): New table.
2450 (emit_eq_goto): New function.
2451 (emit_ne_goto): New function.
2452 (emit_lt_goto): New function.
2453 (emit_le_goto): New function.
2454 (emit_gt_goto): New function.
2455 (emit_ge_goto): New function.
2456 (is_goto_target): New function.
2457 (compile_bytecodes): Recognize special cases of compare-goto
2458 combinations and call specialized emitters for them.
2459 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2460 (amd64_emit_ne_goto): New function.
2461 (amd64_emit_lt_goto): New function.
2462 (amd64_emit_le_goto): New function.
2463 (amd64_emit_gt_goto): New function.
2464 (amd64_emit_ge_goto): New function.
2465 (amd64_emit_ops): Add the new functions.
2466 (i386_emit_eq_goto): New function.
2467 (i386_emit_ne_goto): New function.
2468 (i386_emit_lt_goto): New function.
2469 (i386_emit_le_goto): New function.
2470 (i386_emit_gt_goto): New function.
2471 (i386_emit_ge_goto): New function.
2472 (i386_emit_ops): Add the new functions.
2473
bf15cbda
SS
24742011-09-08 Stan Shebs <stan@codesourcery.com>
2475
2476 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2477 (i386_emit_epilogue): Restore %ebx.
2478
943ca1dd
JZ
24792011-08-31 Jie Zhang <jzhang918@gmail.com>
2480
2481 * server.c (step_thread): Remove definition.
2482 (process_serial_event): Don't handle Hs.
2483 * server.h (step_thread): Remove declaration.
2484 * target.c (set_desired_inferior): Remove use of step_thread.
2485
e3deef73
LM
24862011-08-24 Luis Machado <lgustavo@codesourcery.com>
2487
2488 * linux-low.c: Include linux-procfs.h.
2489 (linux_attach_lwp_1): Update comments.
2490 (linux_attach): Scan for existing threads when attaching to a
2491 process that is the tgid.
2492 * Makefile.in: Update dependencies.
2493
13da1c97
LM
24942011-08-24 Luis Machado <lgustavo@codesourcery.com>
2495
2496 * configure.srv: Add linux-procfs.o dependencies.
2497
881127c9
YQ
24982011-08-14 Yao Qi <yao@codesourcery.com>
2499
2500 * target.h (struct target_ops): Fix indent.
2501 * win32-low.c (win32_target_ops): Fix comment.
2502
58dbd541
YQ
25032011-08-14 Andrew Jenner <andrew@codesourcery.com>
2504 Yao Qi <yao@codesourcery.com>
2505
2506 * Makefile.in (clean): Remove tic6x-*.c files.
2507 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2508 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2509 (tic6x-c64xp-linux.c): Likewise.
2510 * configure.srv: Add support for tic6x-*-uclinux.
2511 * linux-tic6x-low.c: New.
2512 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2513
78d85199
YQ
25142011-08-14 Andrew Stubbs <ams@codesourcery.com>
2515 Yao Qi <yao@codesourcery.com>
2516
2517 * target.h (struct target_ops): Add read_loadmap.
2518 * linux-low.c (struct target_loadseg): New type.
2519 (struct target_loadmap): New type.
2520 (linux_read_loadmap): New function.
2521 (linux_target_ops): Add linux_read_loadmap.
2522 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
2523 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2524 to NULL.
78d85199 2525
a959a88d
EZ
25262011-08-05 Eli Zaretskii <eliz@gnu.org>
2527
2528 * win32-low.c: Include <stdint.h>.
2529
1ced966e
PA
25302011-07-22 Pedro Alves <pedro@codesourcery.com>
2531
2532 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2533 to the inferior here.
2534 (i386_remove_aligned_watchpoint): Ditto.
2535 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2536 fit part of the watchpoint in the debug registers.
2537 (i386_update_inferior_debug_regs): New.
2538 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2539 registers, and only update the inferior on success.
2540 (i386_low_remove_watchpoint): Ditto.
2541
d26e3629
KY
25422011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2543
2544 * linux-low.c (compare_ints, unique, list_threads, show_process,
2545 linux_core_of_thread): Delete.
2546 (linux_target_ops): Change linux_core_of_thread to
2547 linux_common_core_of_thread.
2548 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2549 * utils.c (malloc_failure): Change type of argument.
2550 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2551 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2552 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2553 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2554 (IPA_OBJS): Add common-utils-ipa.o.
2555 (ptid_h, linux_osdata_h): New macros.
2556 (server_h): Add common/common-utils.h, common/xml-utils.h,
2557 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2558 common/ptid.h.
2559 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2560 ptid.o, buffer.o): New rules.
2561 (linux-low.o): Add common/linux-osdata.h as a dependency.
2562 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2563 * configure.ac: Add AC_HEADER_DIRENT check.
2564 * config.in: Regenerate.
2565 * configure: Regenerate.
2566 * remote-utils.c (xml_escape_text): Delete.
2567 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2568 buffer_xml_printf): Move to common/buffer.c.
2569 * server.c (main): Remove call to initialize_inferiors.
2570 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2571 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2572 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2573 internal_error, gdb_assert, gdb_assert_fail): Delete.
2574 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2575 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2576 common/buffer.h.
2577 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2578 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2579 initialize_inferiors): Delete.
2580
2275a1a7
PA
25812011-07-20 Pedro Alves <pedro@codesourcery.com>
2582
2583 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2584 symbol error.
2585
0a5b1e09
PA
25862011-05-31 Pedro Alves <pedro@codesourcery.com>
2587
2588 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2589 assertion.
2590 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2591
6938fd34
YQ
25922011-05-26 Yao Qi <yao@codesourcery.com>
2593
2594 * Makefile.in (thread-db.o): Track dependence to
2595 common/gdb_thread_db.h.
2596 * thread-db.c: include gdb_thread_db.h from right place.
2597
b481f9e0
TT
25982011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2599
2600 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2601 __FILE__ and __LINE__ to internal_error.
2602
98a5dd13
DE
26032011-05-13 Doug Evans <dje@google.com>
2604
2605 * thread-db.c (try_thread_db_load_from_sdir): New function.
2606 (try_thread_db_load_from_dir): New function.
2607 (thread_db_load_search): Handle $sdir, ignore $pdir.
2608 Remove trying of system directories if search of
2609 libthread-db-search-path fails, that is now done via $sdir.
2610
d248b706
KY
26112011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2612
2613 * server.c (handle_query): Add EnableDisableTracepoints to the list
2614 of supported features.
43aaf8b6 2615 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 2616 tracepoints.
43aaf8b6
PA
2617 (cmd_qtenable_disable): New.
2618 (cmd_qtstart): Install tracepoints even if disabled.
2619 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2620 receiving a QTEnable or QTDisable packet.
2621 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2622 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2623 tracepoints.
2624 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 2625
84e578fb
DE
26262011-05-10 Doug Evans <dje@google.com>
2627
2628 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2629
71f55dd8
DE
26302011-05-04 Doug Evans <dje@google.com>
2631
2632 * linux-low.c (linux_join): Skip process lookup.
2633 * spu-low.c (spu_join): Ditto.
2634 * server.c (join_inferiors_callback): Delete.
2635 (process_serial_event): For 'D' packet (detach) call join_inferior
2636 directly.
2637
4d393d60
JM
26382011-05-04 Joseph Myers <joseph@codesourcery.com>
2639
2640 * README: Don't mention xscale*-*-linux*.
2641 * configure.srv (xscale*-*-linux*): Don't handle target.
2642
b00ad6ff
NF
26432011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2644
2645 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2646 casting pointers.
2647 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2648 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2649 (i386_emit_void_call_2): Likewise.
2650
af96c192
YQ
26512011-04-26 Yao Qi <yao@codesourcery.com>
2652
43aaf8b6
PA
2653 * linux-low.c: Move common macros to linux-ptrace.h.
2654 Include linux-ptrace.h.
af96c192
YQ
2655 * Makefile.in (linux_ptrace_h): New.
2656 (linux-low.o): Depends on linux-ptrace.h.
2657
03f2bd59
JK
26582011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2659
2660 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2661 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2662 (remote_prepare): New function with most of the TCP code from ...
2663 (remote_open): ... here. Detect PORT here unconditionally. Move also
2664 setting transport_is_reliable.
2665 * server.c (run_once): New variable.
2666 (gdbserver_usage): Document it.
2667 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2668 the first run if RUN_ONCE.
2669 * server.h (run_once, remote_prepare): New declarations.
2670
7a9dd1b2
TT
26712011-04-19 Tom Tromey <tromey@redhat.com>
2672
2673 * win32-low.c (handle_load_dll): Remove duplicate "the".
2674
81239425
PM
26752011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2676
2677 Remove support for old Cygwin 1.5 versions.
2678 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2679 function to avoid warning.
2680 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2681 warning.
2682
9e0627f1
PM
26832011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2684
2685 * gdbserver/server.h (Macro _): Define it if not available.
2686
588eebee
MS
26872011-03-14 Michael Snyder <msnyder@vmware.com>
2688
348af9f7 2689 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 2690
43f70d4c
JB
26912011-03-10 Joel Brobecker <brobecker@adacore.com>
2692
2693 * Makefile.in (maintainer-clean realclean distclean): Remove
2694 "make ... subdir_do" command.
2695
348af9f7
MS
26962011-03-10 Michael Snyder <msnyder@vmware.com>
2697
2698 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2699
2700 * server.c (handle_v_run): Free alloced buffer on early return.
2701
e637a4f5
YQ
27022011-03-09 Yao Qi <yao@codesourcery.com>
2703
2704 Revert:
2705 2011-03-04 Yao Qi <yao@codesourcery.com>
2706
2707 * Makefile.in: Remove GNU make feature --directory.
2708
2709 2011-03-05 Yao Qi <yao@codesourcery.com>
2710
2711 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2712 (subdir_do): New make target. Copied from gdb/Makefile.
2713 (maintainer-clean, realclean, distclean, clean): Call corresponding
2714 make targets in common/Makefile.
2715
2716 2011-02-11 Yao Qi <yao@codesourcery.com>
2717
2718 * configure.ac: Call AC_PROG_RANLIB.
2719 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2720 * configure: Regenerate.
2721
e6edda56
JK
27222011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2723
2724 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2725
e5141119
JB
27262011-03-06 Yao Qi <yao@codesourcery.com>
2727
2728 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2729
64794aa4
JB
27302011-03-05 Yao Qi <yao@codesourcery.com>
2731
2732 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2733 (subdir_do): New make target. Copied from gdb/Makefile.
2734 (maintainer-clean, realclean, distclean, clean): Call corresponding
2735 make targets in common/Makefile.
2736
7a762829
YQ
27372011-03-04 Yao Qi <yao@codesourcery.com>
2738
2739 * Makefile.in: Remove GNU make feature --directory.
2740
348af9f7
MS
27412011-03-04 Michael Snyder <msnyder@vmware.com>
2742
2743 * server.c (queue_stop_reply): Call xmalloc not malloc.
2744
27452011-03-02 Michael Snyder <msnyder@vmware.com>
2746
2747 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2748
9f72fee2
MS
27492011-02-28 Michael Snyder <msnyder@vmware.com>
2750
588eebee
MS
2751 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2752 (cmd_qtframe): Ditto.
2753 (cmd_qtbuffer): Ditto.
2754 (cmd_bigqtbuffer): Ditto.
2755
9f72fee2
MS
2756 * utils.c (decimal2str): Initialize 'width' to nine, then
2757 don't mess with it.
2758
8040bd49
UW
27592011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2760
2761 * hostio.c (require_data): Free *data, not data.
2762
7e52cbd0
JK
27632011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2764
2765 * hostio.c (require_data): Use free, not xfree.
2766
9130f83e
MS
27672011-02-27 Michael Snyder <msnyder@vmware.com>
2768
4b812f4e
MS
2769 * server.c (handle_query): Discard unused value.
2770
9130f83e
MS
2771 * hostio.c (require_data): Free malloc memory before returning
2772 error.
2773
69d37113
MS
27742011-02-26 Michael Snyder <msnyder@vmware.com>
2775
2776 * linux-low.c (list_threads): Call closedir for dirent.
2777
35f5825a
MS
27782011-02-27 Michael Snyder <msnyder@vmware.com>
2779
2a589cef
MS
2780 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2781 a case statement falls through.
2782
0adea5f7
MS
2783 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2784
35f5825a
MS
2785 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2786 in comparison.
2787
238f1c74
MS
27882011-02-26 Michael Snyder <msnyder@vmware.com>
2789
2790 * utils.c (decimal2str): Eliminate dead code and dead param.
2791 (pulongest): Drop dead param from call to decimal2str.
2792 (plongest): Ditto.
2793
633ff500
JB
27942011-02-24 Joel Brobecker <brobecker@adacore.com>
2795
2796 Revert the following patch (not approved yet):
2797 2011-02-21 Hui Zhu <teawater@gmail.com>
2798 * tracepoint.c (tp_printf): New function.
2799 (eval_agent_expr): Handle gdb_agent_op_printf.
2800
f9c6ff72
HZ
28012011-02-21 Hui Zhu <teawater@gmail.com>
2802
2803 * tracepoint.c (tp_printf): New function.
2804 (eval_agent_expr): Handle gdb_agent_op_printf.
2805
94d5e490
TT
28062011-02-18 Tom Tromey <tromey@redhat.com>
2807
2808 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2809 (tracepoint.o): Likewise.
2810 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2811 (gdb_agent_op_names): Likewise.
2812
c7f96d2b
TT
28132011-02-18 Tom Tromey <tromey@redhat.com>
2814
2815 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2816 gdb_agent_op_rot>: New constants.
2817 (gdb_agent_op_names): Add pick and roll.
2818 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2819 cases.
2820
0feedb2c
JK
28212011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2822
2823 * aclocal.m4: Regenerated with aclocal-1.11.1.
2824
b3b9301e
PA
28252011-02-14 Pedro Alves <pedro@codesourcery.com>
2826
2827 * server.c (handle_qxfer_traceframe_info): New.
2828 (qxfer_packets): Register "traceframe-info".
2829 (handle_query): Report support for qXfer:traceframe-info:read+.
2830 * tracepoint.c (match_blocktype): New.
2831 (traceframe_find_block_type): Rename to ...
2832 (traceframe_walk_blocks): ... this. Add callback filter argument,
2833 and use it.
2834 (traceframe_find_block_type): New, reimplemented on top of
2835 traceframe_walk_blocks.
2836 (build_traceframe_info_xml): New.
2837 (traceframe_read_info): New.
2838 * server.h (traceframe_read_info): Declare.
2839
4f3e6fb7
YQ
28402011-02-11 Yao Qi <yao@codesourcery.com>
2841
2842 * configure.ac: Call AC_PROG_RANLIB.
2843 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2844 * configure: Regenerate.
2845
764880b7
PA
28462011-02-07 Pedro Alves <pedro@codesourcery.com>
2847
2848 * server.c (gdb_read_memory): Change return semantics to allow
2849 partial transfers.
2850 (handle_search_memory_1): Adjust.
2851 (process_serial_event) <'m' packet>: Handle partial transfers.
2852 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2853
1c79eb8a
PA
28542011-01-28 Pedro Alves <pedro@codesourcery.com>
2855
2856 * regcache.c (init_register_cache): Initialize
2857 regcache->register_status.
2858 (free_register_cache): Release regcache->register_status.
2859 (regcache_cpy): Copy register_status.
2860 (registers_to_string): Print 'x's for unavailable registers.
2861 (supply_register): Mark the register's status valid or
2862 unavailable, depending on whether a buffer was passed in or not.
2863 (supply_register_zeroed): New.
2864 (supply_regblock): Mark the registers' status valid or
2865 unavailable, depending on whether a buffer was passed in or not.
2866 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2867 (struct regcache): New `register_status' field.
2868 (supply_register_zeroed): Declare.
2869 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2870 supply_register_zeroed, rather than passing a NULL buffer to
2871 supply_register.
2872 * tracepoint.c (fetch_traceframe_registers): Update comment.
2873
85724a0e
PA
28742011-01-28 Pedro Alves <pedro@codesourcery.com>
2875
2876 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2877 buffer explicit.
2878
d08aafef
PA
28792011-01-25 Pedro Alves <pedro@codesourcery.com>
2880
2881 * server.h (decode_xfer_write): Change prototype.
2882 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2883 and don't extract the annex here.
2884 * server.c (decode_xfer_read): Remove `annex' parameter,
2885 and don't extract the annex here.
2886 (decode_xfer): New.
2887 (struct qxfer): New.
2888 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2889 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2890 (handle_qxfer_statictrace): New functions, abstracted out from
2891 handle_query, and made to use the struct qxfer interface.
2892 (handle_threads_qxfer_proper): Rename to ...
2893 (handle_qxfer_threads_proper): ... this.
2894 (handle_threads_qxfer): Rename to ...
2895 (handle_qxfer_threads): ... this. Adjust.
2896 (qxfer_packets): New array.
2897 (handle_qxfer): New function.
2898 (handle_query): Use handle_qxfer.
2899
493e2a69
MS
29002011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2901
2902 * gdbreplay.c: Shorten lines of >= 80 columns.
2903 * linux-low.c: Ditto.
2904 * linux-ppc-low.c: Ditto.
2905 * linux-s390-low.c: Ditto.
2906 * linux-sparc-low.c: Ditto.
2907 * linux-x86-low.c: Ditto.
2908 * linux-xtensa-low.c: Ditto.
2909 * mem-break.c: Ditto.
2910 * nto-low.c: Ditto.
2911 * regcache.h: Ditto.
2912 * remote-utils.c: Ditto.
2913 * server.c: Ditto.
2914 * server.h: Ditto.
2915 * thread-db.c: Ditto.
2916 * tracepoint.c: Ditto.
2917 * utils.c: Ditto.
2918 * win32-low.h: Ditto.
2919
44944448
JB
29202011-01-05 Joel Brobecker <brobecker@adacore.com>
2921
2922 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2923 update.
2924
71ce852c
JB
29252011-01-01 Joel Brobecker <brobecker@adacore.com>
2926
2927 * server.c (gdbserver_version): Update copyright year in version
2928 output.
2929 * gdbreplay.c (gdbreplay_version): Ditto.
2930
eb826dc6
MF
29312010-12-29 Jie Zhang <jie.zhang@analog.com>
2932
2933 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2934 * linux-bfin-low.c: New file.
2935 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2936 PT_DATA_ADDR for BFIN targets.
2937 * Makefile.in (SFILES): Add linux-bfin-low.c.
2938 (clean): Remove reg-bfin.c.
2939 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2940 * README: Mention supported Blackfin targets.
2941
39ab222a
MF
29422010-12-23 Mike Frysinger <vapier@gentoo.org>
2943
2944 * .gitignore: New file.
2945
a1f2ce7d
MF
29462010-11-16 Mike Frysinger <vapier@gentoo.org>
2947
2948 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2949
f474844c
JZ
29502010-10-22 Jie Zhang <jie@codesourcery.com>
2951
2952 * Makefile.in: Add FLAGS_TO_PASS variable.
2953 (install): Remove dependency of install-only and recursively
2954 invoke make for install-only.
2955
f1048712
DE
29562010-10-04 Doug Evans <dje@google.com>
2957
2958 * Makefile.in (uninstall): Use $(DESTDIR).
2959
b53a1623
PA
29602010-09-24 Pedro Alves <pedro@codesourcery.com>
2961
e6ee044d
PA
2962 PR gdb/11842
2963
b53a1623
PA
2964 * linux-x86-low.c (compat_siginfo_from_siginfo)
2965 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2966 si_code is < 0. Check for si_code == SI_TIMER before checking for
2967 si_code < 0.
2968
fa1bd1e4
JB
29692010-09-13 Joel Brobecker <brobecker@adacore.com>
2970
2971 * lynx-i386-low.c: New file.
2972 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2973
47fac8f8
JB
29742010-09-13 Joel Brobecker <brobecker@adacore.com>
2975
2976 * lynx-low.c (ptrace_request_to_str): Remove handling for
2977 request values that have been removed in LynxOS 5.x.
2978
1adfc54d
JB
29792010-09-13 Joel Brobecker <brobecker@adacore.com>
2980
2981 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2982 <ptrace.h>
2983
c2a66c29
NS
29842010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2985
2986 * configure.ac: Add --enable-inprocess-agent option.
2987 * configure: Rebuilt.
2988
32fcada3
YQ
29892010-09-06 Yao Qi <yao@codesourcery.com>
2990
2991 * linux-low.c (linux_kill): Remove unused variable.
2992 (linux_stabilize_threads): Likewise.
2993 * server.c (start_inferior): Likewise.
2994 (queue_stop_reply_callback): Likewise.
2995 * tracepoint.c (do_action_at_tracepoint): Likewise.
2996
0cccb683
YQ
29972010-09-06 Yao Qi <yao@codesourcery.com>
2998
2999 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3000 on return.
3001
423ec54c
JK
30022010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3003
3004 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3005
12ac6819
PA
30062010-09-06 Pedro Alves <pedro@codesourcery.com>
3007
3008 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3009 "$(IPA_DEPFILES)".
3010
8ed54b31
JB
30112010-09-01 Joel Brobecker <brobecker@adacore.com>
3012
3013 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3014 gdbserver/lynx-ppc-low.c: New files.
3015 * Makefile.in (lynx_low_h): New variable.
3016 (lynx-low.o, lynx-ppc-low.o): New rules.
3017 * configure.ac: On LynxOS, link with -lnetinet.
3018 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3019 * configure: regenerate.
3020
bb0116a4
JB
30212010-09-01 Joel Brobecker <brobecker@adacore.com>
3022
3023 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3024 * configure.ac: Add check for vasprintf and vsnprintf.
3025 * configure, config.in: Regenerate.
3026 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3027
a778ab81 30282010-09-01 Joel Brobecker <brobecker@adacore.com>
3029
3030 * gdbreplay.c: Move include of alloca.h up, next to include of
3031 malloc.h.
3032 * server.h: Add include of malloc.h.
3033 * mem-break.c: Remove include of malloc.h.
3034 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3035
8b034a19 30362010-09-01 Joel Brobecker <brobecker@adacore.com>
3037
3038 * Makefile.in (memmem.o): Build with -Wno-error.
3039
30402010-09-01 Joel Brobecker <brobecker@adacore.com>
3041
3042 * utils.c (xsnprintf): Make non-static.
3043 * server.h: Add xsnprintf declaration.
3044 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3045 replace calls to snprintf by calls to xsnprintf throughout.
3046
30472010-09-01 Joel Brobecker <brobecker@adacore.com>
3048
3049 * configure.ac: Add configure check for alloca.
3050 * configure, config.in: Regenerate.
3051 * server.h: Include alloca.h if it exists.
3052 * gdbreplay.c: Include alloca.h if it exists.
3053
1a981360
PA
30542010-08-28 Pedro Alves <pedro@codesourcery.com>
3055
3056 * linux-low.c (__SIGRTMIN): Define if not already defined.
3057 (linux_create_inferior): Check for __ANDROID__ rather than
3058 __SIGRTMIN.
3059 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3060 are already deferred.
3061 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3062 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3063 stopped and already has a pending signal to report.
3064 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3065 a pending signal to report or is moving out of a jump pad.
3066 (linux_init_signals): Check for __ANDROID__ rather than
3067 __SIGRTMIN.
3068
b4d51a55
PA
30692010-08-28 Pedro Alves <pedro@codesourcery.com>
3070
3071 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3072 debug_threads check. Avoid a linear search when not doing debug
3073 output.
3074
ec48365d
PA
30752010-08-27 Pedro Alves <pedro@codesourcery.com>
3076
3077 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3078 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3079 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3080 (process_event): Change local fd's type to gdb_fildes_t.
3081 (create_file_handler): Adjust prototype.
3082 (delete_file_handler): Adjust prototype.
3083 (handle_file_event): Adjust prototype. Use pfildes.
3084 (create_file_event): Adjsut prototype.
3085 * remote-utils.c (remote_desc, listen_desc): Change type to
3086 gdb_fildes_t.
3087 * server.h: New gdb_fildes_t typedef.
3088 [USE_WIN32API]: Include winsock2.h.
3089 (delete_file_handler, add_file_handler): Adjust prototypes.
3090 (pfildes): Declare.
3091 * utils.c (pfildes): New.
3092
854d88f0
PA
30932010-08-27 Pedro Alves <pedro@codesourcery.com>
3094
3095 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3096 * configure: Regenerate.
3097
0146f85b
PA
30982010-08-27 Pedro Alves <pedro@codesourcery.com>
3099
3100 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3101 (linux_done_accessing_memory): ... this.
3102 (linux_target_ops): Adjust.
3103 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3104 * nto-low.c (nto_target_ops): Adjust comment.
3105 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3106 * spu-low.c (spu_target_ops): Adjust comment.
3107 * target.h (target_ops): Rename unprepare_to_access_memory field
3108 to done_accessing_memory.
3109 (unprepare_to_access_memory): Rename to ...
3110 (done_accessing_memory): ... this.
3111
90d74c30
PA
31122010-08-26 Pedro Alves <pedro@codesourcery.com>
3113
3114 * linux-low.c (linux_prepare_to_access_memory): New.
3115 (linux_unprepare_to_access_memory): New.
3116 (linux_target_ops): Install them.
3117 * server.c (read_memory): Rename to ...
3118 (gdb_read_memory): ... this. Use
3119 prepare_to_access_memory/prepare_to_access_memory.
3120 (write_memory): Rename to ...
3121 (gdb_write_memory): ... this. Use
3122 prepare_to_access_memory/prepare_to_access_memory.
3123 (handle_search_memory_1): Adjust.
3124 (process_serial_event): Adjust.
3125 * target.h (struct target_ops): New fields
3126 prepare_to_access_memory and unprepare_to_access_memory.
3127 (prepare_to_access_memory, unprepare_to_access_memory): New.
3128 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3129 prepare_to_access_memory/prepare_to_access_memory.
3130 * nto-low.c (nto_target_ops): Adjust.
3131 * spu-low.c (spu_target_ops): Adjust.
3132 * win32-low.c (win32_target_ops): Adjust.
3133
fd467969
PA
31342010-08-26 Pedro Alves <pedro@codesourcery.com>
3135
3136 * Makefile.in (WARN_CFLAGS): Get it from configure.
3137 (WERROR_CFLAGS): New.
3138 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3139 * configure.ac: Introduce --enable-werror, which adds -Werror to
3140 the compiler command line. Enabled by default. Disable with
3141 --disable-werror. Add -Wdeclaration-after-statement
3142 Wpointer-arith and -Wformat-nonliteral to warning flags.
3143 * configure: Regenerate.
3144
331e2f5f
PA
31452010-08-26 Pedro Alves <pedro@codesourcery.com>
3146
3147 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3148
e581f2b4
PA
31492010-08-26 Pedro Alves <pedro@codesourcery.com>
3150
3151 * gdbreplay.c (remote_error): New.
3152 (gdbchar): New.
3153 (expect): Use gdbchar. Check for error reading from GDB.
3154 Clarify sync error output.
3155 (play): Check for errors writing to GDB.
3156 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3157 * remote-utils.c (getpkt): Check for errors writing to the remote
3158 descriptor.
3159
3c11dd79
PA
31602010-08-25 Pedro Alves <pedro@codesourcery.com>
3161
3162 * linux-low.c (linux_wait_1): Move non-debugging code out of
3163 `debug_threads' control.
3164
d20a8ad9
PA
31652010-08-25 Pedro Alves <pedro@codesourcery.com>
3166
3167 * linux-low.c (linux_wait_1): Don't set last_status here.
3168 * server.c (push_event, queue_stop_reply_callback): Assert we're
3169 not pushing a TARGET_WAITKIND_IGNORE event.
3170 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3171 (myresume, handle_target_event): Set the thread's last_resume_kind
3172 and last_status from the target returned status.
3173
964e4306
PA
31742010-08-25 Pedro Alves <pedro@codesourcery.com>
3175
3176 PR threads/10729
3177
3178 * linux-x86-low.c (update_debug_registers_callback): New.
3179 (i386_dr_low_set_addr): Use it.
3180 (i386_dr_low_get_addr): New.
3181 (i386_dr_low_set_control): Use update_debug_registers_callback.
3182 (i386_dr_low_get_control): New.
3183 (i386_dr_low_get_status): Adjust.
3184 * linux-low.c (linux_stop_lwp): New.
3185 * linux-low.h (linux_stop_lwp): Declare.
3186
3187 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3188 argument instead of a i386_debug_reg_state.
3189 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3190 a i386_debug_reg_state.
3191 (i386_insert_aligned_watchpoint): Adjust.
3192 (i386_remove_aligned_watchpoint): Adjust.
3193 (i386_low_stopped_data_address): Read the debug registers from the
3194 inferior instead of from the mirrors.
3195 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3196 (i386_dr_low_get_addr): Declare.
3197 (i386_dr_low_get_control): Declare.
3198 (i386_dr_low_get_status): Change prototype.
3199
3200 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3201 (i386_dr_low_get_addr): New.
3202 (i386_dr_low_get_control): New.
3203 (i386_dr_low_get_status): Adjust prototype. Return
3204 dr_status_mirror.
3205 (i386_initial_stuff): Clear dr_status_mirror and
3206 dr_control_mirror.
3207 (i386_get_thread_context): Adjust.
3208 (i386_set_thread_context): Adjust.
3209 (i386_thread_added): Adjust.
3210
5f21a75b
PA
32112010-08-24 Pedro Alves <pedro@codesourcery.com>
3212
3213 * linux-low.h (linux_thread_area): Delete declaration.
3214
3e4c1235
TS
32152010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3216
3217 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3218 after its termination.
3219
1971b033
PA
32202010-08-09 Pedro Alves <pedro@codesourcery.com>
3221
3222 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3223 (gdb_wants_all_stopped): Delete.
3224 (linux_wait_1): Don't call them.
3225 * server.c (handle_v_cont): Tag all threads as want-stopped.
3226 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3227 stopped as "client-wants-stopped".
3228
310444ac
PA
32292010-07-31 Pedro Alves <pedro@codesourcery.com>
3230
3231 * Makefile.in (signals_h): New.
3232 (server_h): Depend on it.
3233 (server.o): Don't depend on $(signals_def).
3234 (signals.o): Depend on $(signals_def).
3235
a19cae16
JK
32362010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3237
3238 * Makefile.in (signals_def): New.
3239 (server_h): Append include/gdb/signals.h and signals_def.
3240 (server.o): Append signals_def.
3241
30d50328
JK
32422010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3243
3244 * server.c (handle_target_event): Use target_signal_to_host for
3245 resume_info.sig initialization.
3246 * target.h (struct thread_resume) <sig>: New comment.
3247
5c3216e2
OS
32482010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3249
c6f46ca0
OS
3250 * server.c (handle_query): strcpy() the returned string from paddress()
3251 instead of sprintf().
5c3216e2
OS
3252 * utils.c (paddress): Return phex_nz().
3253
6bd31874
JB
32542010-07-07 Joel Brobecker <brobecker@adacore.com>
3255
3256 * server.c (handle_v_cont): Call mourn_inferior if process
3257 just exited.
3258 (myresume): Likewise.
3259
0fb4aa4b
PA
32602010-07-01 Pedro Alves <pedro@codesourcery.com>
3261
3262 Static tracepoints, and integration with UST.
3263
3264 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3265 * mem-break.c (uninsert_all_breakpoints)
3266 (reinsert_all_breakpoints): New.
3267 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3268 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3269 (gdb_agent_ust_loaded, helper_thread_id)
3270 (gdb_agent_helper_thread_id): New macros.
3271 (struct ipa_sym_addresses): Add addr_ust_loaded,
3272 addr_helper_thread_id, addr_cmd_buf.
3273 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3274 (in_process_agent_loaded_ust): New.
3275 (write_e_ust_not_loaded): New.
3276 (maybe_write_ipa_ust_not_loaded): New.
3277 (struct collect_static_trace_data_action): New.
3278 (enum tracepoint_type) <static_tracepoint>: New.
3279 (struct tracepoint) <handle>: Mention static tracepoints.
3280 (struct static_tracepoint_ctx): New.
3281 (CMD_BUF_SIZE): New.
3282 (add_tracepoint_action): Handle static tracepoint actions.
3283 (unprobe_marker_at): New.
3284 (clear_installed_tracepoints): Handle static tracepoints.
3285 (cmd_qtdp): Handle static tracepoints.
3286 (probe_marker_at): New.
3287 (cmd_qtstart): Handle static tracepoints.
3288 (response_tracepoint): Handle static tracepoints.
3289 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3290 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3291 (get_context_regcache): Handle static tracepoints.
3292 (do_action_at_tracepoint): Handle static tracepoint actions.
3293 (traceframe_find_block_type): Handle static trace data blocks.
3294 (traceframe_read_sdata): New.
3295 (download_tracepoints): Download static tracepoint actions.
3296 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3297 (GDB_PROBE_NAME): New.
3298 (ust_ops): New.
3299 (GET_UST_SYM): New.
3300 (USTF): New.
3301 (dlsym_ust): New.
3302 (ust_marker_to_static_tracepoint): New.
3303 (gdb_probe): New.
3304 (collect_ust_data_at_tracepoint): New.
3305 (gdb_ust_probe): New.
3306 (UNIX_PATH_MAX, SOCK_DIR): New.
3307 (gdb_ust_connect_sync_socket): New.
3308 (resume_thread, stop_thread): New.
3309 (run_inferior_command): New.
3310 (init_named_socket): New.
3311 (gdb_ust_socket_init): New.
3312 (cstr_to_hexstr): New.
3313 (next_st): New.
3314 (first_marker, next_marker): New.
3315 (response_ust_marker): New.
3316 (cmd_qtfstm, cmd_qtsstm): New.
3317 (unprobe_marker_at, probe_marker_at): New.
3318 (cmd_qtstmat, gdb_ust_thread): New.
3319 (gdb_ust_init): New.
3320 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3321 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3322 (ST_REGENTRY): New.
3323 (x86_64_st_collect_regmap): New.
3324 (X86_64_NUM_ST_COLLECT_GREGS): New.
3325 (AMD64_RIP_REGNUM): New.
3326 (supply_static_tracepoint_registers): New.
3327 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3328 (ST_REGENTRY): New.
3329 (i386_st_collect_regmap): New.
3330 (i386_NUM_ST_COLLECT_GREGS): New.
3331 (supply_static_tracepoint_registers): New.
3332 * server.c (handle_query): Handle qXfer:statictrace:read.
3333 <qSupported>: Report support for StaticTracepoints, and
3334 qXfer:statictrace:read features.
3335 * server.h (traceframe_read_sdata)
3336 (supply_static_tracepoint_registers): Declare.
3337 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3338 (unpack_varlen_hex): Include in IPA build.
3339 * Makefile.in (ustlibs, ustinc): New.
3340 (IPA_OBJS): Add remote-utils-ipa.o.
3341 ($(IPA_LIB)): Link -ldl and -lpthread.
3342 (UST_CFLAGS): New.
3343 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3344 * config.in, configure: Regenerate.
3345
9e4344e5
PA
33462010-06-20 Ian Lance Taylor <iant@google.com>
3347 Pedro Alves <pedro@codesourcery.com>
3348
3349 * linux-x86-low.c (always_true): Delete.
3350 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3351 trying to fool the compiler with always_true.
3352
c6beb2cb
PA
33532010-06-20 Pedro Alves <pedro@codesourcery.com>
3354
3355 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3356 conditions in gdbserver.
3357
d2ed6730
UW
33582010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3359
3360 * spu-low.c (spu_read_memory): Wrap around local store limit.
3361 (spu_write_memory): Likewise.
3362
4e29fb54
PA
33632010-06-15 Pedro Alves <pedro@codesourcery.com>
3364
3365 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3366 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3367 LONGEST uses.
3368 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3369 uses.
3370 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3371 uses with LONGEST uses.
3372
6a271cae
PA
33732010-06-14 Stan Shebs <stan@codesourcery.com>
3374 Pedro Alves <pedro@codesourcery.com>
3375
3376 Bytecode compiler.
3377
3378 * linux-x86-low.c: Include limits.h.
3379 (add_insns): New.
3380 (always_true): New.
3381 (EMIT_ASM): New.
3382 (EMIT_ASM32): New.
3383 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3384 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3385 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3386 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3387 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3388 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3389 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3390 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3391 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3392 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3393 (amd64_emit_void_call_2): New.
3394 (amd64_emit_ops): New.
3395 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3396 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3397 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3398 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3399 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3400 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3401 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3402 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3403 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3404 (i386_emit_stack_adjust, i386_emit_int_call_1)
3405 (i386_emit_void_call_2): New.
3406 (i386_emit_ops): New.
3407 (x86_emit_ops): New.
3408 (the_low_target): Install x86_emit_ops.
3409 * server.h (struct emit_ops): New.
3410 (get_raw_reg_func_addr): Declare.
3411 (current_insn_ptr, emit_error): Declare.
3412 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3413 (set_trace_state_variable_value): New defines.
3414 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3415 addr_get_trace_state_variable_value and
3416 addr_set_trace_state_variable_value.
3417 (symbol_list): New fields for get_raw_reg,
3418 get_trace_state_variable_value and set_trace_state_variable_value.
3419 (condfn): New typedef.
3420 (struct tracepoint): New field `compiled_cond'.
3421 (do_action_at_tracepoint): Clear compiled_cond.
3422 (get_trace_state_variable_value, set_trace_state_variable_value):
3423 Export in the IPA.
3424 (condition_true_at_tracepoint): If there's a compiled condition,
3425 run that.
3426 (current_insn_ptr, emit_error): New globals.
3427 (struct bytecode_address): New.
3428 (get_raw_reg_func_addr): New.
3429 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3430 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3431 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3432 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3433 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3434 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3435 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3436 (compile_tracepoint_condition, compile_bytecodes): New.
3437 * target.h (emit_ops): Forward declare.
3438 (struct target_ops): New field emit_ops.
3439 (target_emit_ops): New.
3440 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3441 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3442 * linux-low.c (linux_emit_ops): New.
3443 (linux_target_ops): Install it.
3444 * linux-low.h (struct linux_target_ops): New field emit_ops.
3445
92b72907
UW
34462010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3447
3448 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3449 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3450
fa593d66
PA
34512010-06-01 Pedro Alves <pedro@codesourcery.com>
3452 Stan Shebs <stan@codesourcery.com>
3453
3454 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3455 (all): Depend on $(extra_libraries).
3456 (install-only): Install the IPA.
3457 (IPA_OBJS, IPA_LIB): New.
3458 (clean): Remove the IPA lib.
3459 (IPAGENT_CFLAGS): New.
3460 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3461 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3462 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3463 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3464 * configure.ac: Check for atomic builtins support in the compiler.
3465 (IPA_DEPFILES, extra_libraries): Define.
3466 * configure.srv (ipa_obj): Add description.
3467 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3468 (i[34567]86-*-linux*): Set ipa_obj.
3469 (x86_64-*-linux*): Set ipa_obj.
3470 * linux-low.c (stabilizing_threads): New.
3471 (supports_fast_tracepoints): New.
3472 (linux_detach): Stabilize threads before detaching.
3473 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3474 the lwp is either not stabilizing, or is moving out of a jump pad.
3475 (linux_fast_tracepoint_collecting): New.
3476 (maybe_move_out_of_jump_pad): New.
3477 (enqueue_one_deferred_signal): New.
3478 (dequeue_one_deferred_signal): New.
3479 (linux_wait_for_event_1): If moving out of a jump pad, defer
3480 pending signals to later.
3481 (linux_stabilize_threads): New.
3482 (linux_wait_1): Check if threads need moving out of jump pads, and
3483 do it if so.
3484 (stuck_in_jump_pad_callback): New.
3485 (move_out_of_jump_pad_callback): New.
3486 (lwp_running): New.
3487 (linux_resume_one_lwp): Handle moving out of jump pads.
3488 (linux_set_resume_request): Dequeue deferred signals.
3489 (need_step_over_p): Also step over fast tracepoint jumps.
3490 (start_step_over): Also uninsert fast tracepoint jumps.
3491 (finish_step_over): Also reinsert fast tracepoint jumps.
3492 (linux_install_fast_tracepoint_jump): New.
3493 (linux_target_ops): Install linux_stabilize_threads and
3494 linux_install_fast_tracepoint_jump_pad.
3495 * linux-low.h (linux_target_ops) <get_thread_area,
3496 install_fast_tracepoint_jump_pad>: New fields.
3497 (struct lwp_info) <collecting_fast_tracepoint,
3498 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3499 (linux_get_thread_area): Declare.
3500 * linux-x86-low.c (jump_insn): New.
3501 (x86_get_thread_area): New.
3502 (append_insns): New.
3503 (push_opcode): New.
3504 (amd64_install_fast_tracepoint_jump_pad): New.
3505 (i386_install_fast_tracepoint_jump_pad): New.
3506 (x86_install_fast_tracepoint_jump_pad): New.
3507 (the_low_target): Install x86_get_thread_area and
3508 x86_install_fast_tracepoint_jump_pad.
3509 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3510 (struct fast_tracepoint_jump): New.
3511 (fast_tracepoint_jump_insn): New.
3512 (fast_tracepoint_jump_shadow): New.
3513 (find_fast_tracepoint_jump_at): New.
3514 (fast_tracepoint_jump_here): New.
3515 (delete_fast_tracepoint_jump): New.
3516 (set_fast_tracepoint_jump): New.
3517 (uninsert_fast_tracepoint_jumps_at): New.
3518 (reinsert_fast_tracepoint_jumps_at): New.
3519 (set_breakpoint_at): Use write_inferior_memory.
3520 (uninsert_raw_breakpoint): Use write_inferior_memory.
3521 (check_mem_read): Mask out fast tracepoint jumps.
3522 (check_mem_write): Mask out fast tracepoint jumps.
3523 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3524 (set_fast_tracepoint_jump): Declare.
3525 (delete_fast_tracepoint_jump)
3526 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3527 (reinsert_fast_tracepoint_jumps_at): Declare.
3528 * regcache.c: Don't compile many functions when building the
3529 in-process agent library.
3530 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3531 the register buffer in the heap.
3532 (free_register_cache): If the register buffer isn't owned by the
3533 regcache, don't free it.
3534 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3535 pre-existing register caches.
3536 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3537 type.
3538 (convert_ascii_to_int): : Constify `from' parameter type.
3539 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3540 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3541 the needed buffer in-place.
3542 (relocate_instruction): New.
3543 * server.c (handle_query) <qSymbols>: If the target supports
3544 tracepoints, give it a chance of looking up symbols. Report
3545 support for fast tracepoints.
3546 (handle_status): Stabilize threads.
3547 (process_serial_event): Adjust.
3548 * server.h (struct fast_tracepoint_jump): Forward declare.
3549 (struct process_info) <fast_tracepoint_jumps>: New field.
3550 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3551 (decode_X_packet, decode_M_packet): Adjust.
3552 (relocate_instruction): Declare.
3553 (in_process_agent_loaded): Declare.
3554 (tracepoint_look_up_symbols): Declare.
3555 (struct fast_tpoint_collect_status): Declare.
3556 (fast_tracepoint_collecting): Declare.
3557 (force_unlock_trace_buffer): Declare.
3558 (handle_tracepoint_bkpts): Declare.
3559 (initialize_low_tracepoint)
3560 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3561 * target.h (struct target_ops) <stabilize_threads,
3562 install_fast_tracepoint_jump_pad>: New fields.
3563 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3564 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3565 [HAVE_STDINT_H]: Include stdint.h.
3566 (trace_debug_1): Rename to ...
3567 (trace_vdebug): ... this.
3568 (trace_debug): Rename to ...
3569 (trace_debug_1): ... this. Add `level' parameter.
3570 (trace_debug): New.
3571 (ATTR_USED, ATTR_NOINLINE): New.
3572 (IP_AGENT_EXPORT): New.
3573 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3574 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3575 (about_to_request_buffer_space, trace_buffer_is_full)
3576 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3577 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3578 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3579 (traceframe_write_count, traceframes_created)
3580 (trace_state_variables)
3581 New renaming defines.
3582 (struct ipa_sym_addresses): New.
3583 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3584 (symbol_list): New.
3585 (ipa_sym_addrs): New.
3586 (all_tracepoint_symbols_looked_up): New.
3587 (in_process_agent_loaded): New.
3588 (write_e_ipa_not_loaded): New.
3589 (maybe_write_ipa_not_loaded): New.
3590 (tracepoint_look_up_symbols): New.
3591 (debug_threads) [IN_PROCESS_AGENT]: New.
3592 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3593 (UNKNOWN_SIDE_EFFECTS): New.
3594 (stop_tracing): New.
3595 (flush_trace_buffer): New.
3596 (stop_tracing_bkpt): New.
3597 (flush_trace_buffer_bkpt): New.
3598 (read_inferior_integer): New.
3599 (read_inferior_uinteger): New.
3600 (read_inferior_data_pointer): New.
3601 (write_inferior_data_pointer): New.
3602 (write_inferior_integer): New.
3603 (write_inferior_uinteger): New.
3604 (struct collect_static_trace_data_action): Delete.
3605 (enum tracepoint_type): New.
3606 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
3607 <actions_str, step_actions, step_actions_str>: Only include in
3608 GDBserver.
fa593d66
PA
3609 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3610 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3611 (tracepoints): Use IP_AGENT_EXPORT.
3612 (last_tracepoint): Don't include in the IPA.
3613 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3614 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3615 (alloced_trace_state_variables): New.
3616 (trace_state_variables): Use IP_AGENT_EXPORT.
3617 (traceframe_t): Delete unused variable.
3618 (circular_trace_buffer): Don't include in the IPA.
3619 (trace_buffer_start): Delete.
3620 (struct trace_buffer_control): New.
3621 (trace_buffer_free): Delete.
3622 (struct ipa_trace_buffer_control): New.
3623 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3624 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3625 New.
3626 (trace_buffer_ctrl): New.
3627 (TRACE_BUFFER_CTRL_CURR): New.
3628 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3629 Reimplement as macros.
3630 (trace_buffer_wrap): Delete.
3631 (traceframe_write_count, traceframe_read_count)
3632 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3633 (struct tracepoint_hit_ctx) <type>: New field.
3634 (struct fast_tracepoint_ctx): New.
3635 (memory_barrier): New.
3636 (cmpxchg): New.
3637 (record_tracepoint_error): Update atomically in the IPA.
3638 (clear_inferior_trace_buffer): New.
3639 (about_to_request_buffer_space): New.
3640 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3641 updating the same buffer.
3642 (add_tracepoint): Default the tracepoint's type to trap
3643 tracepoint, and orig_size to -1.
3644 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3645 internal variables.
3646 (create_trace_state_variable): New parameter `gdb'. Handle it.
3647 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3648 (cmd_qtdp): Handle fast tracepoints.
3649 (cmd_qtdv): Adjust.
3650 (max_jump_pad_size): New.
3651 (gdb_jump_pad_head): New.
3652 (get_jump_space_head): New.
3653 (claim_jump_space): New.
3654 (sort_tracepoints): New.
3655 (MAX_JUMP_SIZE): New.
3656 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3657 IPA.
3658 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3659 support. Upload fast traceframes, and delete internal IPA
3660 breakpoints.
3661 (stop_tracing_handler): New.
3662 (flush_trace_buffer_handler): New.
3663 (cmd_qtstop): Upload fast tracepoints.
3664 (response_tracepoint): Handle fast tracepoints.
3665 (tracepoint_finished_step): Upload fast traceframes. Set the
3666 tracepoint hit context's tracepoint type.
3667 (handle_tracepoint_bkpts): New.
3668 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3669 type. Add comment about fast tracepoints.
3670 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3671 non-existing action_str field.
3672 (get_context_regcache): Handle fast tracepoints.
3673 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3674 to the regcache.
3675 (fast_tracepoint_from_jump_pad_address): New.
3676 (fast_tracepoint_from_ipa_tpoint_address): New.
3677 (collecting_t): New.
3678 (force_unlock_trace_buffer): New.
3679 (fast_tracepoint_collecting): New.
3680 (collecting): New.
3681 (gdb_collect): New.
3682 (write_inferior_data_ptr): New.
3683 (target_tp_heap): New.
3684 (target_malloc): New.
3685 (download_agent_expr): New.
3686 (UALIGN): New.
3687 (download_tracepoints): New.
3688 (download_trace_state_variables): New.
3689 (upload_fast_traceframes): New.
3690 (IPA_FIRST_TRACEFRAME): New.
3691 (IPA_NEXT_TRACEFRAME_1): New.
3692 (IPA_NEXT_TRACEFRAME): New.
3693 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3694 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3695 (gdb_jump_pad_buffer_end): New.
3696 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3697 (initialize_tracepoint): Adjust.
3698 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3699 buffer. Initialize the low module.
3700 * utils.c (PREFIX, TOOLNAME): New.
3701 (malloc_failure): Use PREFIX.
3702 (error): In the IPA, an error causes an exit.
3703 (fatal, warning): Use PREFIX.
3704 (internal_error): Use TOOLNAME.
3705 (NUMCELLS): Increase to 10.
3706 * configure, config.in: Regenerate.
3707
d149dd1d
PA
37082010-06-01 Pedro Alves <pedro@codesourcery.com>
3709
3710 * server.c (handle_query) <qSupported>: Do two passes over the
3711 qSupported string to avoid nesting strtok.
3712
f6528abd
JK
37132010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3714
3715 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3716 (CDEPS): New.
3717 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3718 -Wl,--dynamic-list.
3719 * configure: Regenerate.
3720 * proc-service.list: New.
3721
ca2a87a0
JK
37222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3723
3724 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3725 New comment.
3726
363a6e9f
OS
37272010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3728
3729 * gdbreplay.c (remote_open): Check error return from socket() call by
3730 its equality to -1 not by it being negative.
3731 * remote-utils.c (remote_open): Likewise.
3732
d23b6cb1
PA
37332010-05-23 Pedro Alves <pedro@codesourcery.com>
3734
3735 * config.h: Regenerate.
3736
28d3cf85
MK
37372010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3738
3739 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3740 doesn't provide PTRACE_GET_THREAD_AREA.
3741
fea36a59
MK
37422010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3743
3744 * linux-m68k-low.c: Include <asm/ptrace.h>
3745 (ps_get_thread_area): Implement.
3746
24b066ba
DE
37472010-05-03 Doug Evans <dje@google.com>
3748
3749 * event-loop.c (struct callback_event): New struct.
3750 (callback_list): New global.
3751 (append_callback_event, delete_callback_event): New functions.
3752 (process_callback): New function.
3753 (start_event_loop): Call it.
3754 * remote-utils.c (NOT_SCHEDULED): Define.
3755 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3756 moved out of readchar.
3757 (readchar): Rewrite. Call reschedule before returning.
3758 (reset_readchar): New function.
3759 (remote_close): Call it.
3760 (process_remaining, reschedule): New functions.
3761 * server.h (callback_handler_func): New typedef.
3762 (append_callback_event, delete_callback_event): Declare.
3763
9836d6ea
PA
37642010-05-03 Pedro Alves <pedro@codesourcery.com>
3765
3766 * proc-service.c (ps_pglobal_lookup): Use
3767 thread_db_look_up_one_symbol.
3768 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3769 parameter. Use it instead of all_symbols_looked_up.
3770 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3771 field.
3772 (all_symbols_looked_up): Don't declare.
3773 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3774 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3775 field.
3776 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3777 Set all_symbols_looked_up here.
3778 (thread_db_look_up_one_symbol): New.
3779 (thread_db_get_tls_address): Adjust.
3780 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3781 thread_db object on the heap, and tentatively set it in the
3782 process structure.
3783 (thread_db_init): Don't set all_symbols_looked_up here.
3784 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3785
7984d532
PA
37862010-05-03 Pedro Alves <pedro@codesourcery.com>
3787
3788 * linux-low.c (linux_kill, linux_detach): Adjust.
3789 (status_pending_p_callback): Remove redundant statement. Check
3790 for !TARGET_WAITIKIND_IGNORE, instead of
3791 TARGET_WAITKIND_STOPPED.
3792 (handle_tracepoints): Make sure LWP is locked. Adjust.
3793 (linux_wait_for_event_1): Adjust.
3794 (linux_cancel_breakpoints): New.
3795 (unsuspend_one_lwp): New.
3796 (unsuspend_all_lwps): New.
3797 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3798 (send_sigstop_callback): Change return type to int, add new
3799 `except' parameter and handle it.
3800 (suspend_and_send_sigstop_callback): New.
3801 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3802 pass them down. If SUSPEND, also increment the lwp's suspend
3803 count.
3804 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3805 (need_step_over_p): Don't consider suspended LWPs.
3806 (start_step_over): Adjust.
3807 (proceed_one_lwp): Change return type to int, add new `except'
3808 parameter and handle it.
3809 (unsuspend_and_proceed_one_lwp): New.
3810 (proceed_all_lwps): Use find_inferior instead of
3811 for_each_inferior.
3812 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3813 also decrement the suspend count of LWPs. Pass `except' down,
3814 instead of hacking its suspend count.
3815 (linux_pause_all): Add `freeze' parameter. Adjust.
3816 (linux_unpause_all): New.
3817 (linux_target_ops): Install linux_unpause_all.
3818 * server.c (handle_status): Adjust.
3819 * target.h (struct target_ops): New fields `unpause_all' and
3820 `cancel_breakpoints'. Add new parameter to `pause_all'.
3821 (pause_all): Add new `freeze' parameter.
3822 (unpause_all): New.
3823 (cancel_breakpoints): New.
3824 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3825 cancel breakpoints.
3826 (cmd_qtstart): Pause threads.
3827 (stop_tracing): Pause threads, and cancel breakpoints.
3828 * win32-low.c (win32_target_ops): Adjust.
3829
e471f25b
PA
38302010-05-03 Pedro Alves <pedro@codesourcery.com>
3831
3832 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3833 the inferior right away from here...
3834 (linux_wait_1): ... to here, and adjust to check the thread's
3835 last_resume_kind instead of the lwp's step or stop_expected flags.
3836
1915ef4f
PA
38372010-05-02 Pedro Alves <pedro@codesourcery.com>
3838
3839 * README: Use consistent `GDB' and `GDBserver' spellings.
3840
f9e39928
PA
38412010-05-02 Pedro Alves <pedro@codesourcery.com>
3842
3843 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3844 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3845 (linux_detach_one_lwp): Assume the lwp is stopped.
3846 (any_thread_of): Delete.
3847 (linux_detach): Stop all lwps here. Don't blindly delete all
3848 breakpoints.
3849 (delete_lwp_callback): New.
3850 (linux_mourn): Delete all lwps of the process that is gone.
3851 (linux_wait_1): Don't delete the last lwp of the process here.
3852 * mem-break.h (mark_breakpoints_out): Declare.
3853 * mem-break.c (mark_breakpoints_out): New.
3854 (free_all_breakpoints): Use it.
3855 * server.c (handle_target_event): If the process is gone, mark
3856 breakpoints out.
3857 * thread-db.c (struct thread_db) <create_bp>: New field.
3858 (thread_db_enable_reporting): Fix prototype. Store a thread event
3859 breakpoint reference in the thread_db struct.
3860 (thread_db_load_search): Clear the thread_db object.
3861 (try_thread_db_load_1): Ditto.
3862 (switch_to_process): New.
3863 (disable_thread_event_reporting): Use it.
3864 (remove_thread_event_breakpoints): New.
3865 (thread_db_detach, thread_db_mourn): Use it.
3866
1e7fc18c
PA
38672010-05-01 Pedro Alves <pedro@codesourcery.com>
3868
3869 * linux-low.c (linux_enable_event_reporting): New.
3870 (linux_wait_for_event_1, handle_extended_wait): Use it.
3871
02fc4de7
PA
38722010-04-30 Pedro Alves <pedro@codesourcery.com>
3873
3874 * linux-low.c (linux_kill_one_lwp, linux_kill)
3875 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3876 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3877 SIGSTOP even if the LWP is stopped.
3878 (send_sigstop_callback): New.
3879 (stop_all_lwps): Use send_sigstop_callback instead.
3880 (linux_resume_one_thread): Adjust.
3881 (proceed_one_lwp): Still proceed an LWP that the client has
3882 requested to stop, if we haven't reported it as stopped yet. Make
3883 sure that LWPs the client want stopped, have a pending SIGSTOP.
3884
bc3b5632
DE
38852010-04-26 Doug Evans <dje@google.com>
3886
ae1ada35
DE
3887 * server.c (handle_general_set): Make static.
3888
bc3b5632
DE
3889 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3890 Print received char after testing for error/eof instead of before.
3891 (input_interrupt): Tweak comment.
3892
65730243
DE
38932010-04-23 Doug Evans <dje@google.com>
3894
3895 * server.c (start_inferior): Print inferior argv if --debug.
3896
a8ae7dc0
AR
38972010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3898
3899 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3900 * nto-x86-low.c: Include server.h
3901
1c07cc19
PM
39022010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3903
3904 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3905 be consistent with other sources of this directory.
3906 (init_registers_amd64): Correct name of source file of this function
3907 in the comment.
3908
e0a61e09
PM
39092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3910
3911 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3912 64-bit executables.
3913
54709339
PM
39142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3915
3916 * win32-i386-low.c: Add 64-bit support.
3917 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3918 (init_registers_amd64): Declare.
3919 (mappings): Add 64-bit version of array.
3920 (init_windows_x86): New function.
3921 (the_low_target): Change init_arch field to init_windows_x86.
3922
e8f0053d
PM
39232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3924
3925 * win32-low.c: Adapt to support also 64-bit architecture.
3926 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3927 (get_image_name): Use SIZE_T type for local variable `done'.
3928 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3929 (toolhelp_get_dll_name): Idem.
3930 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3931 Use uintptr_t typecast to avoid warning.
3932 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3933 (handle_exception): Use phex_nz to avoid warning.
3934 (win32_wait): Remove unused local variable `process'.
3935
c481e77e
PM
39362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3937
3938 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3939 `amd64-avx.o'.
3940
12ea4b69
PM
39412010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3942
3943 * configure.ac: Use `ws2_32' library for srv_mingw.
3944 * configure: Regenerate.
3945 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3946 * remote-utils.c: Likewise.
3947
f6d1620c
L
39482010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3949
3950 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3951 if __x86_64__ is defined.
3952
8e642873
PM
39532010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3954
3955 * configure: Regenerate.
3956
711e434b
PM
39572010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3958
3959 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3960 * target.h (target_ops): New get_tib_address field.
3961 * win32-low.h (win32_thread_info): Add thread_local_base field.
3962 * win32-low.c (child_add_thread): Add tlb argument.
3963 Set thread_local_base field to TLB.
3964 (get_child_debug_event): Adapt to child_add_thread change.
3965 (win32_get_tib_address): New function.
3966 (win32_target_ops): Set get_tib_address field to
3967 win32_get_tib_address.
3968 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3969
505106cd
PA
39702010-04-12 Pedro Alves <pedro@codesourcery.com>
3971
505106cd
PA
3972 * linux-low.c (linux_mourn): Also remove the process.
3973 * server.c (handle_target_event): Don't remove the process here.
3974 * nto-low.c (nto_mourn): New.
3975 (nto_target_ops): Install it.
3976 * spu-low.c (spu_mourn): New.
3977 (spu_target_ops): Install it.
3978 * win32-low.c (win32_mourn): New.
3979 (win32_target_ops): Install it.
3980
e8470a06
PA
39812010-04-12 Pedro Alves <pedro@codesourcery.com>
3982
3983 * server.h (buffer_xml_printf): Remove redundant `;'.
3984
45ba0d02
PA
39852010-04-12 Pedro Alves <pedro@codesourcery.com>
3986
3987 * regcache.c (set_register_cache): Invalidate regcaches before
3988 changing the register cache layout.
3989 (regcache_invalidate_one): Allow a NULL regcache.
3990 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3991 regcaches before changing the register cache layout or the target
3992 regsets.
3993
59e04013
L
39942010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3995
3996 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3997 variable warning on Linux/x86-64.
3998
8336d594
PA
39992010-04-11 Pedro Alves <pedro@codesourcery.com>
4000
4001 GDBserver disconnected tracing support.
4002
4003 * linux-low.c (linux_remove_process): Delete.
4004 (add_lwp): Don't set last_resume_kind here.
4005 (linux_kill): Use `mourn'.
4006 (linux_detach): Use `thread_db_detach', and `mourn'.
4007 (linux_mourn): New.
4008 (linux_attach_lwp_1): Adjust comment.
4009 (linux_attach): last_resume_kind moved the thread_info; adjust.
4010 (status_pending_p_callback): Adjust.
4011 (linux_wait_for_event_1): Adjust.
4012 (count_events_callback, select_singlestep_lwp_callback)
4013 (select_event_lwp_callback, cancel_breakpoints_callback)
4014 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4015 (proceed_one_lwp): Adjust.
4016 (linux_async): Add debug output.
4017 (linux_thread_stopped): New.
4018 (linux_pause_all): New.
4019 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4020 linux_pause_all.
4021 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4022 (thread_db_free): Delete declaration.
4023 (thread_db_detach, thread_db_mourn): Declare.
4024 * thread-db.c (thread_db_init): Use thread_db_mourn.
4025 (thread_db_free): Delete, split in two.
4026 (disable_thread_event_reporting): New.
4027 (thread_db_detach): New.
4028 (thread_db_mourn): New.
4029
4030 * server.h (struct thread_info) <last_resume_kind>: New field.
4031 <attached>: Add comment.
4032 <gdb_detached>: New field.
4033 (handler_func): Change return type to int.
4034 (handle_serial_event, handle_target_event): Ditto.
4035 (gdb_connected): Declare.
4036 (tracing): Delete.
4037 (disconnected_tracing): Declare.
4038 (stop_tracing): Declare.
4039
4040 * server.c (handle_query) <qSupported>: Report support for
4041 disconnected tracing.
4042 (queue_stop_reply_callback): Account for running threads.
4043 (gdb_wants_thread_stopped): New.
4044 (gdb_wants_all_threads_stopped): New.
4045 (gdb_reattached_process): New.
4046 (handle_status): Clear the `gdb_detached' flag of all processes.
4047 In all-stop, stop all threads.
4048 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4049 (process_serial_event): If the remote connection breaks, or if an
4050 exit was forced with "monitor exit", force an event loop exit.
4051 Handle disconnected tracing on detach.
4052 (handle_serial_event): Adjust.
4053 (handle_target_event): If GDB isn't connected, forward events back
4054 to the inferior, unless the last process exited, in which case,
4055 exit gdbserver. Adjust interface.
4056
4057 * remote-utils.c (remote_open): Don't block in accept. Instead
4058 register an event loop source on the listen socket file
4059 descriptor. Refactor bits into ...
4060 (listen_desc): ... this new global.
4061 (gdb_connected): ... this new function.
4062 (enable_async_notification): ... this new function.
4063 (handle_accept_event): ... this new function.
4064 (remote_close): Clear remote_desc.
4065
4066 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4067
4068 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4069 New fields.
4070 (mourn_inferior): Define.
4071 (target_process_qsupported): Avoid the dangling else problem.
4072 (thread_stopped): Define.
4073 (pause_all): Define.
4074 (target_waitstatus_to_string): Declare.
4075 * target.c (target_waitstatus_to_string): New.
4076
4077 * tracepoint.c (tracing): Make extern.
4078 (disconnected_tracing): New.
4079 (stop_tracing): Make extern. Handle tracing stops due to GDB
4080 disconnecting.
4081 (cmd_qtdisconnected): New.
4082 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4083 (handle_tracepoint_general_set): Handle QTDisconnected.
4084
4085 * event-loop.c (event_handler_func): Change return type to int.
4086 (process_event): Bail out if the event handler wants the event
4087 loop to stop.
4088 (handle_file_event): Ditto.
4089 (start_event_loop): Bail out if the event handler wants the event
4090 loop to stop.
4091
4092 * nto-low.c (nto_target_ops): Adjust.
4093 * spu-low.c (spu_wait): Don't remove the process here.
4094 (spu_target_ops): Adjust.
4095 * win32-low.c (win32_wait): Don't remove the process here.
4096 (win32_target_ops): Adjust.
4097
5d267c4c
PA
40982010-04-11 Pedro Alves <pedro@codesourcery.com>
4099
4100 * regcache.c (realloc_register_cache): Invalidate inferior's
4101 regcache before recreating it.
4102
623ccd72
PA
41032010-04-09 Pedro Alves <pedro@codesourcery.com>
4104
4105 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4106
219f2f23
PA
41072010-04-09 Stan Shebs <stan@codesourcery.com>
4108 Pedro Alves <pedro@codesourcery.com>
4109
4110 * server.h (LONGEST): New.
4111 (struct thread_info) <while_stepping>: New field.
4112 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4113 Declare.
4114 (initialize_tracepoint, handle_tracepoint_general_set)
4115 (handle_tracepoint_query, tracepoint_finished_step)
4116 (tracepoint_was_hit, release_while_stepping_state_list):
4117 (current_traceframe): Declare.
4118 * server.c (handle_general_set): Handle tracepoint packets.
4119 (read_memory): New.
4120 (write_memory): New.
4121 (handle_search_memory_1): Use read_memory.
4122 (handle_query): Report support for conditional tracepoints, trace
4123 state variables, and tracepoint sources. Handle tracepoint
4124 queries.
4125 (main): Initialize the tracepoints module.
4126 (process_serial_event): Handle traceframe reads/writes.
4127
4128 * linux-low.c (handle_tracepoints): New.
4129 (linux_wait_1): Call it.
4130 (linux_resume_one_lwp): Handle while-stepping.
4131 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4132 (linux_target_ops): Install them.
4133 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4134 New field.
4135 * linux-x86-low.c (x86_supports_tracepoints): New.
4136 (the_low_target). Install it.
4137
4138 * mem-break.h (delete_breakpoint): Declare.
4139 * mem-break.c (delete_breakpoint): Make external.
4140
4141 * target.h (struct target_ops): Add `supports_tracepoints',
4142 `read_pc', and `write_pc' fields.
4143 (target_supports_tracepoints): Define.
4144 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4145 (phex_nz): New.
4146
4147 * regcache.h (struct regcache) <registers_owned>: New field.
4148 (init_register_cache, regcache_cpy): Declare.
4149 (regcache_read_pc, regcache_write_pc): Declare.
4150 (register_cache_size): Declare.
4151 (supply_regblock): Declare.
4152 * regcache.c (init_register_cache): New.
4153 (new_register_cache): Use it.
4154 (regcache_cpy): New.
4155 (register_cache_size): New.
4156 (supply_regblock): New.
4157 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 4158
219f2f23
PA
4159 * tracepoint.c: New.
4160
4161 * Makefile.in (OBS): Add tracepoint.o.
4162 (tracepoint.o): New rule.
4163
3a13a53b
L
41642010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4165
4166 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4167 (i386-mmx.o): New.
4168 (i386-mmx.c): Likewise.
4169 (i386-mmx-linux.o): Likewise.
4170 (i386-mmx-linux.c): Likewise.
4171
4172 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4173 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4174 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4175 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4176
4177 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4178 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4179 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4180
1570b33e
L
41812010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4182
4183 * Makefile.in (clean): Updated.
4184 (i386-avx.o): New.
4185 (i386-avx.c): Likewise.
4186 (i386-avx-linux.o): Likewise.
4187 (i386-avx-linux.c): Likewise.
4188 (amd64-avx.o): Likewise.
4189 (amd64-avx.c): Likewise.
4190 (amd64-avx-linux.o): Likewise.
4191 (amd64-avx-linux.c): Likewise.
4192
4193 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4194 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4195 (srv_amd64_regobj): Add amd64-avx.o.
4196 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4197 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4198 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4199 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4200 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4201 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4202 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4203
4204 * i387-fp.c: Include "i386-xstate.h".
4205 (i387_xsave): New.
4206 (i387_cache_to_xsave): Likewise.
4207 (i387_xsave_to_cache): Likewise.
4208 (x86_xcr0): Likewise.
4209
4210 * i387-fp.h (i387_cache_to_xsave): Likewise.
4211 (i387_xsave_to_cache): Likewise.
4212 (x86_xcr0): Likewise.
4213
4214 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4215 * linux-crisv32-low.c (target_regsets): Likewise.
4216 * linux-m68k-low.c (target_regsets): Likewise.
4217 * linux-mips-low.c (target_regsets): Likewise.
4218 * linux-ppc-low.c (target_regsets): Likewise.
4219 * linux-s390-low.c (target_regsets): Likewise.
4220 * linux-sh-low.c (target_regsets): Likewise.
4221 * linux-sparc-low.c (target_regsets): Likewise.
4222 * linux-xtensa-low.c (target_regsets): Likewise.
4223
4224 * linux-low.c: Include <sys/uio.h>.
4225 (regsets_fetch_inferior_registers): Support nt_type.
4226 (regsets_store_inferior_registers): Likewise.
4227 (linux_process_qsupported): New.
4228 (linux_target_ops): Add linux_process_qsupported.
4229
4230 * linux-low.h (regset_info): Add nt_type.
4231 (linux_target_ops): Add process_qsupported.
4232
4233 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4234 and <sys/uio.h>.
4235 (init_registers_i386_avx_linux): New.
4236 (init_registers_amd64_avx_linux): Likewise.
4237 (xmltarget_i386_linux_no_xml): Likewise.
4238 (xmltarget_amd64_linux_no_xml): Likewise.
4239 (PTRACE_GETREGSET): Likewise.
4240 (PTRACE_SETREGSET): Likewise.
4241 (x86_fill_xstateregset): Likewise.
4242 (x86_store_xstateregset): Likewise.
4243 (use_xml): Likewise.
4244 (x86_linux_update_xmltarget): Likewise.
4245 (x86_linux_process_qsupported): Likewise.
4246 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4247 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4248 init_registers_i386_linux here. Call
4249 x86_linux_update_xmltarget.
4250 (the_low_target): Add x86_linux_process_qsupported.
4251
4252 * server.c (handle_query): Call target_process_qsupported.
4253
4254 * target.h (target_ops): Add process_qsupported.
4255 (target_process_qsupported): New.
4256
fc7238bb
PA
42572010-04-03 Pedro Alves <pedro@codesourcery.com>
4258
4259 * inferiors.c (add_thread): Set last_status kind to
4260 TARGET_WAITKIND_IGNORE.
4261 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4262 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4263 (linux_wait_1): Move `thread' local definition to block that uses
4264 it. Don't NULL initialize `event_child'.
4265 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4266 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4267 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4268
bdabb078
PA
42692010-04-01 Pedro Alves <pedro@codesourcery.com>
4270
4271 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4272 an extended waitstatus, or by a watchpoint.
4273 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4274 thread was stepping or has been stopped by a watchpoint.
4275
d3bbe7a0
PA
42762010-04-01 Pedro Alves <pedro@codesourcery.com>
4277
4278 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4279 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4280 of another, then delete the previous, and validate all
4281 breakpoints.
4282 (validate_inserted_breakpoint): New.
4283 (delete_disabled_breakpoints): New.
4284 (validate_breakpoints): New.
4285 (check_mem_read): Validate breakpoints before trusting their
4286 shadow. Delete disabled breakpoints.
4287 (check_mem_write): Validate breakpoints before trusting they
4288 should be inserted. Delete disabled breakpoints.
4289 * mem-break.h (validate_breakpoints):
4290 * server.c (handle_query): Validate breakpoints when we see a
4291 qSymbol query.
4292
8b07ae33
PA
42932010-04-01 Pedro Alves <pedro@codesourcery.com>
4294
4295 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4296 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4297 if we could tell there's a GDB breakpoint at stop_pc.
4298 (need_step_over_p): Don't do a step over if we find a GDB
4299 breakpoint at the resume PC.
4300
4301 * mem-break.c (struct raw_breakpoint): New.
4302 (enum bkpt_type): New type `gdb_breakpoint'.
4303 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4304 fields. New field `raw'.
4305 (find_raw_breakpoint_at): New.
4306 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4307 breakpoint instead.
4308 (set_breakpoint_at): Adjust.
4309 (delete_raw_breakpoint): New.
4310 (release_breakpoint): New.
4311 (delete_breakpoint): Rename to...
4312 (delete_breakpoint_1): ... this. Add proc parameter. Use
4313 release_breakpoint. Return ENOENT.
4314 (delete_breakpoint): Reimplement.
4315 (find_breakpoint_at): Delete.
4316 (find_gdb_breakpoint_at): New.
4317 (delete_breakpoint_at): Delete.
4318 (set_gdb_breakpoint_at): New.
4319 (delete_gdb_breakpoint_at): New.
4320 (gdb_breakpoint_here): New.
4321 (set_reinsert_breakpoint): Use release_breakpoint.
4322 (uninsert_breakpoint): Rename to ...
4323 (uninsert_raw_breakpoint): ... this.
4324 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4325 (reinsert_raw_breakpoint): Change parameter type to
4326 raw_breakpoint.
4327 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4328 instead.
4329 (check_breakpoints): Adjust. Use release_breakpoint.
4330 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4331 (breakpoint_inserted_here): Ditto.
4332 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4333 Don't trust the breakpoint's shadow if it is not inserted.
4334 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4335 (delete_all_breakpoints): Adjust.
4336 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4337 use delete_breakpoint_1.
4338
4339 * mem-break.h (breakpoints_supported): Delete declaration.
4340 (set_gdb_breakpoint_at): Declare.
4341 (gdb_breakpoint_here): Declare.
4342 (delete_breakpoint_at): Delete.
4343 (delete_gdb_breakpoint_at): Declare.
4344
4345 * server.h (struct raw_breakpoint): Forward declare.
4346 (struct process_info): New field `raw_breakpoints'.
4347
4348 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4349 breakpoints.
4350
6bf5e0ba
PA
43512010-03-24 Pedro Alves <pedro@codesourcery.com>
4352
4353 * linux-low.c (status_pending_p_callback): Fix comment.
4354 (linux_wait_for_event_1): Move most of the internal breakpoint
4355 handling from here...
4356 (linux_wait_1): ... to here.
4357 (count_events_callback): New.
4358 (select_singlestep_lwp_callback): New.
4359 (select_event_lwp_callback): New.
4360 (cancel_breakpoints_callback): New.
4361 (select_event_lwp): New.
4362 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4363 priority to all LWPs that have had events that should be reported
4364 to the client. Cancel breakpoints when about to reporting the
4365 event to the client, not while stopping lwps. No longer cancel
4366 finished single-steps here.
4367 (cancel_finished_single_step): Delete.
4368 (cancel_finished_single_steps): Delete.
4369
414a389f
PA
43702010-03-24 Pedro Alves <pedro@codesourcery.com>
4371
4372 * mem-break.c (enum bkpt_type): New.
4373 (struct breakpoint): New field `type'.
4374 (set_breakpoint_at): Change return type to struct breakpoint
4375 pointer. Set type to `other_breakpoint' by default.
4376 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4377 in the breakpoint list.
4378 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4379 (reinsert_breakpoint): Rename to ...
4380 (reinsert_raw_breakpoint): ... this.
4381 (reinsert_breakpoints_at): Adjust.
4382 * mem-break.h (struct breakpoint): Declare.
4383 (set_breakpoint_at): Change return type to struct breakpoint
4384 pointer.
4385
2280c721
PA
43862010-03-24 Pedro Alves <pedro@codesourcery.com>
4387
4388 * server.c (handle_query): Assign, not compare.
4389
d50171e4
PA
43902010-03-24 Pedro Alves <pedro@codesourcery.com>
4391
4392 Teach linux gdbserver to step-over-breakpoints.
4393
4394 * linux-low.c (can_hardware_single_step): New.
4395 (supports_breakpoints): New.
4396 (handle_extended_wait): If stopping threads, read the stop pc of
4397 the new cloned LWP.
4398 (get_pc): New.
4399 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4400 low target doesn't support retrieving the PC.
4401 (add_lwp): Set last_resume_kind to resume_continue.
4402 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4403 (linux_attach): Don't clear stop_expected. Set the lwp's
4404 last_resume_kind to resume_stop.
4405 (linux_detach_one_lwp): Don't check for removed breakpoints.
4406 (check_removed_breakpoint): Delete.
4407 (status_pending_p): Rename to ...
4408 (status_pending_p_callback): ... this. Don't check for removed
4409 breakpoints. Don't consider threads that are stopped from GDB's
4410 perspective.
4411 (linux_wait_for_lwp): Always read the stop_pc here.
4412 (cancel_breakpoint): New.
4413 (step_over_bkpt): New global.
4414 (linux_wait_for_event_1): Implement stepping over breakpoints.
4415 (gdb_wants_lwp_stopped): New.
4416 (gdb_wants_all_stopped): New.
4417 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4418 single-step traps here. Store the thread's last reported target
4419 wait status.
4420 (send_sigstop): Don't clear stop_expected. Always set it,
4421 instead.
4422 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4423 (cancel_finished_single_step): New.
4424 (cancel_finished_single_steps): New.
4425 (wait_for_sigstop): Don't cancel finished single-step traps here.
4426 (linux_resume_one_lwp): Don't check for removed breakpoints.
4427 Don't set `step' on non-hardware step archs.
4428 (linux_set_resume_request): Ignore resume_stop requests if already
4429 stopping or stopped. Set the lwp's last_resume_kind.
4430 (resume_status_pending_p): Don't check for removed breakpoints.
4431 (need_step_over_p): New.
4432 (start_step_over): New.
4433 (finish_step_over): New.
4434 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4435 requests. Clear the thread's last reported target waitstatus.
4436 Don't use the `suspended' flag. Don't consider pending breakpoints.
4437 (linux_resume): Start a step-over if necessary.
4438 (proceed_one_lwp): New.
4439 (proceed_all_lwps): New.
4440 (unstop_all_lwps): New.
4441 * linux-low.h (struct lwp_info): Rewrite comment for the
4442 `suspended' flag. Add the `stop_pc' field. Delete the
4443 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4444 Add `'last_resume_kind' and `need_step_over' fields.
4445 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4446 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4447 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4448 (set_raw_breakpoint_at): New.
4449 (set_breakpoint_at): Rewrite to use it.
4450 (reinsert_breakpoint_handler): Delete.
4451 (set_reinsert_breakpoint): New.
4452 (reinsert_breakpoint_by_bp): Delete.
4453 (delete_reinsert_breakpoints): New.
4454 (uninsert_breakpoint): Rewrite.
4455 (uninsert_breakpoints_at): New.
4456 (reinsert_breakpoint): Rewrite.
4457 (reinsert_breakpoints_at): New.
4458 (check_breakpoints): Rewrite.
4459 (breakpoint_here): New.
4460 (breakpoint_inserted_here): New.
4461 (check_mem_read): Adjust.
4462 * mem-break.h (breakpoints_supported, breakpoint_here)
4463 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4464 (reinsert_breakpoint_by_bp): Delete declaration.
4465 (delete_reinsert_breakpoints): Declare.
4466 (reinsert_breakpoint): Delete declaration.
4467 (reinsert_breakpoints_at): Declare.
4468 (uninsert_breakpoint): Delete declaration.
4469 (uninsert_breakpoints_at): Declare.
4470 (check_breakpoints): Adjust prototype.
4471 * server.h: Adjust include order.
4472 (struct thread_info): Declare here. Add a `last_status' field.
4473
30ba68cb
MS
44742010-03-23 Michael Snyder <msnyder@vmware.com>
4475
4476 * server.c (crc32): New function.
4477 (handle_query): Add handling for 'qCRC:' request.
4478
b9a881c2
PA
44792010-03-23 Pedro Alves <pedro@codesourcery.com>
4480
4481 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4482 lwp had been stopped by a watchpoint.
4483
e92d13d5
PA
44842010-03-16 Pedro Alves <pedro@codesourcery.com>
4485
4486 * server.h (internal_error): Declare.
4487 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4488 * utils.c (internal_error): New function.
4489
64daa791
AS
44902010-03-15 Andreas Schwab <schwab@redhat.com>
4491
4492 * configure.srv: Fix typo setting srv_regobj.
4493
f52cd8cd
PA
44942010-03-15 Pedro Alves <pedro@codesourcery.com>
4495
4496 * linux-low.c (fetch_register): Avoid passing a non string literal
4497 format to `error'.
4498 (usr_store_inferior_registers): Ditto.
4499
93ae6fdc
PA
45002010-03-14 Pedro Alves <pedro@codesourcery.com>
4501
4502 * linux-low.c (linux_write_memory): Bail out early if peeking
4503 memory failed.
4504
c3adc08c
PA
45052010-03-14 Pedro Alves <pedro@codesourcery.com>
4506
4507 * linux-low.h (struct lwp_info): New fields
4508 `stopped_by_watchpoint' and `stopped_data_address'.
4509 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4510 here, and cache them in the lwp object.
4511 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4512 directly.
4513 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4514 field.
4515 (linux_stopped_by_watchpoint): Rewrite.
4516 (linux_stopped_data_address): Rewrite.
4517
bce522a2
PA
45182010-03-06 Simo Melenius <simo.melenius@iki.fi>
4519
4520 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4521 switching the current inferior, not before.
4522
90884b2b
L
45232010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4524
4525 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4526 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4527 i386-linux.c and amd64-linux.c.
4528 (reg-i386.o): Removed.
4529 (reg-i386.c): Likewise.
4530 (reg-i386-linux.o): Likewise.
4531 (reg-i386-linux.c): Likewise.
4532 (reg-x86-64.o): Likewise.
4533 (reg-x86-64.c): Likewise.
4534 (reg-x86-64-linux.o): Likewise.
4535 (reg-x86-64-linux.c): Likewise.
4536 (i386.o): New.
4537 (i386.c): Likewise.
4538 (i386-linux.o): Likewise.
4539 (i386-linux.c): Likewise.
4540 (amd64.o): Likewise.
4541 (amd64.c): Likewise.
4542 (amd64-linux.o): Likewise.
4543 (amd64-linux.c): Likewise.
4544
4545 * configure.srv (srv_i386_regobj): New.
4546 (srv_i386_linux_regobj): Likewise.
4547 (srv_amd64_regobj): Likewise.
4548 (srv_amd64_linux_regobj): Likewise.
4549 (srv_i386_32bit_xmlfiles): Likewise.
4550 (srv_i386_64bit_xmlfiles): Likewise.
4551 (srv_i386_xmlfiles): Likewise.
4552 (srv_amd64_xmlfiles): Likewise.
4553 (srv_i386_linux_xmlfiles): Likewise.
4554 (srv_amd64_linux_xmlfiles): Likewise.
4555 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4556 srv_xmlfiles to $srv_i386_xmlfiles.
4557 (i[34567]86-*-mingw32ce*): Likewise.
4558 (i[34567]86-*-mingw*): Likewise.
4559 (i[34567]86-*-nto*): Likewise.
4560 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4561 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4562 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4563 (x86_64-*-linux*): Likewise.
4564
4565 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4566 (init_registers_amd64_linux): New.
4567 (x86_arch_setup): Replace init_registers_x86_64_linux with
4568 init_registers_amd64_linux.
4569
193f13e6
MK
45702010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4571
4572 * configure.ac: Check for libdl. If it is not available link against
4573 static libthread_db.
4574 * configure: Regenerate.
4575
85d721b8
PA
45762010-02-22 Pedro Alves <pedro@codesourcery.com>
4577
4578 PR9605
4579
4580 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4581 handing a read watchpoint.
4582 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4583
6076632b
DE
45842010-02-12 Doug Evans <dje@google.com>
4585
4586 * linux-low.c (linux_supports_tracefork_flag): Document.
4587 (linux_look_up_symbols): Add comment.
4588
3327ccf7
L
45892010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4590
4591 * regcache.c (supply_register): Clear regcache if buf is NULL.
4592
0718675c 45932010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 4594 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
4595
4596 * inferiors.c (find_inferior): Add function documentation.
4597 (unloaded_dll): Handle the case where the unloaded dll has not
4598 been previously registered in the dll list.
4599
177321bd
DJ
46002010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4601
4602 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4603 (thumb2_breakpoint): New.
4604 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4605
2b009048
DJ
46062010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4607
4608 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4609 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4610 breakpoints.
4611
3be029c7
PA
46122010-01-21 Pedro Alves <pedro@codesourcery.com>
4613
4614 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4615
18f5de3b
JK
46162010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4617
4618 * linux-s390-low.c (s390_collect_ptrace_register)
4619 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4620
3743bb4f
DE
46212010-01-21 Doug Evans <dje@google.com>
4622
14ce3065
DE
4623 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4624 (PTRACE_ARG4_TYPE): New macro.
4625 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4626 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4627 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4628 (usr_store_inferior_registers): Ditto.
4629 (linux_read_memory, linux_write_memory): Ditto.
4630 (linux_test_for_tracefork): Ditto.
4631
3743bb4f
DE
4632 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4633 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4634
8b315be5
PA
46352010-01-21 Pedro Alves <pedro@codesourcery.com>
4636
4637 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4638 target.
4639
85492558
PA
46402010-01-21 Pedro Alves <pedro@codesourcery.com>
4641
4642 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4643 prototype to take a regcache. Adjust.
4644
442ea881
PA
46452010-01-20 Pedro Alves <pedro@codesourcery.com>
4646
4647 * regcache.h (struct thread_info): Forward declare.
4648 (struct regcache): New.
4649 (new_register_cache): Adjust prototype.
4650 (get_thread_regcache): Declare.
4651 (free_register_cache): Adjust prototype.
4652 (registers_to_string, registers_from_string): Ditto.
4653 (supply_register, supply_register_by_name, collect_register)
4654 (collect_register_as_string, collect_register_by_name): Ditto.
4655 * regcache.c (struct inferior_regcache_data): Delete.
4656 (get_regcache): Rename to ...
4657 (get_thread_regcache): ... this. Adjust. Switch inferior before
4658 fetching registers.
4659 (regcache_invalidate_one): Adjust.
4660 (regcache_invalidate): Fix prototype.
4661 (new_register_cache): Return the new register cache.
4662 (free_register_cache): Change prototype.
4663 (realloc_register_cache): Adjust.
4664 (registers_to_string): Change prototype to take a regcache. Adjust.
4665 (registers_from_string): Ditto.
4666 (register_data): Ditto.
4667 (supply_register): Ditto.
4668 (supply_register_by_name): Ditto.
4669 (collect_register): Ditto.
4670 (collect_register_as_string): Ditto.
4671 (collect_register_by_name): Ditto.
4672 * server.c (process_serial_event): Adjust.
4673 * linux-low.h (regset_fill_func, regset_store_func): Change
4674 prototype.
4675 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4676 Change prototype.
4677 * linux-low.c (get_stop_pc): Adjust.
4678 (check_removed_breakpoint): Adjust.
4679 (linux_wait_for_event): Adjust.
4680 (linux_resume_one_lwp): Adjust.
4681 (fetch_register): Add regcache parameter. Adjust.
4682 (usr_store_inferior_registers): Ditto.
4683 (regsets_fetch_inferior_registers): Ditto.
4684 (regsets_store_inferior_registers): Ditto.
4685 (linux_fetch_registers, linux_store_registers): Ditto.
4686 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4687 regcache. Adjust.
43aaf8b6
PA
4688 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4689 Ditto.
442ea881
PA
4690 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4691 prototype to take a regcache.
4692 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4693 * remote-utils.c (convert_ascii_to_int, outreg)
4694 (prepare_resume_reply): Change prototype to take a regcache.
4695 Adjust.
4696 * target.h (struct target_ops) <fetch_registers, store_registers>:
4697 Change prototype to take a regcache.
4698 (fetch_inferior_registers, store_inferior_registers): Change
4699 prototype to take a regcache. Adjust.
4700 * proc-service.c (ps_lgetregs): Adjust.
4701 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4702 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4703 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4704 take a regcache. Adjust.
4705 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4706 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4707 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4708 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4709 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4710 (cris_cannot_fetch_register):
4711 (cris_breakpoint_at): Change prototype to take a regcache.
4712 Adjust.
4713 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4714 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4715 to take a regcache. Adjust.
4716 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4717 Adjust.
4718 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4719 take a regcache. Adjust.
4720 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4721 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4722 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4723 * linux-mips-low.c (mips_get_pc):
4724 (mips_set_pc): Change prototype to take a regcache. Adjust.
4725 (mips_reinsert_addr): Adjust.
4726 (mips_collect_register): Change prototype to take a regcache.
4727 Adjust.
4728 (mips_supply_register):
4729 (mips_collect_register_32bit, mips_supply_register_32bit)
4730 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4731 (mips_store_fpregset): Ditto.
43aaf8b6
PA
4732 * linux-ppc-low.c (ppc_supply_ptrace_register)
4733 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
4734 (parse_spufs_run): Adjust.
4735 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4736 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4737 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4738 take a regcache. Adjust.
4739 * linux-s390-low.c (s390_collect_ptrace_register)
4740 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4741 (s390_set_pc): Change prototype to take a regcache. Adjust.
4742 (s390_arch_setup): Adjust.
4743 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4744 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4745 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4746 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4747 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4748 regcache. Adjust.
4749 (sparc_breakpoint_at): Adjust.
4750 * linux-xtensa-low.c (xtensa_fill_gregset):
4751 (xtensa_store_gregset):
4752 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4753 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4754 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4755 prototype to take a regcache. Adjust.
4756 * win32-arm-low.c (arm_fetch_inferior_register)
4757 (arm_store_inferior_register): Change prototype to take a
4758 regcache. Adjust.
4759 * win32-i386-low.c (i386_fetch_inferior_register)
4760 (i386_store_inferior_register): Change prototype to take a
4761 regcache. Adjust.
4762 * win32-low.c (child_fetch_inferior_registers)
4763 (child_store_inferior_registers): Change prototype to take a
4764 regcache. Adjust.
4765 (win32_wait): Adjust.
4766 (win32_fetch_inferior_registers): Change prototype to take a
4767 regcache. Adjust.
4768 (win32_store_inferior_registers): Adjust.
4769 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4770 store_inferior_register>: Change prototype to take a regcache.
4771
60c3d7b0
DE
47722010-01-20 Doug Evans <dje@google.com>
4773
4774 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4775 #ifdef.
4776 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 4777 (W_STOPCODE): Provide definition if missing.
60c3d7b0 4778
dc146f7c
VP
47792010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4780
4781 * linux-low.c (linux_core_of_thread): New.
4782 (compare_ints, show_process, list_threads): New.
4783 (linux_qxfer_osdata): Report threads and cores.
4784 (linux_target_op): Register linux_core_of_thread.
4785 * remote-utils.c (prepare_resume_reply): Report the core.
4786 (buffer_xml_printf): Support %d specifier.
4787 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4788 New.
4789 (handle_query): Handle qXfer:threads. Announce availability
4790 thereof.
4791 * target.h (struct target_ops): New field core_of_thread.
4792
7803799a
UW
47932010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4794
4795 * Makefile.in (clean): Remove new generated files.
4796 (reg-s390.o, reg-s390.c): Remove rules.
4797 (reg-s390x.o, reg-s390x.c): Likewise.
4798 (s390-linux32.o, s390-linux32.c): Add rules.
4799 (s390-linux64.o, s390-linux64.c): Likewise.
4800 (s390x-linux64.o, s390x-linux64.c): Likewise.
4801 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4802 * linux-s390-low.c: Include <elf.h>.
4803 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4804 (init_registers_s390): Remove prototype.
4805 (init_registers_s390x): Likewise.
4806 (init_registers_s390_linux32): Add prototype.
4807 (init_registers_s390_linux64): Likewise.
4808 (init_registers_s390x_linux64): Likewise.
4809 (s390_num_regs_3264): New define.
4810 (s390_regmap_3264): New global variable.
4811 (s390_cannot_fetch_register): Remove obsolete check.
4812 (s390_cannot_store_register): Likewise.
4813 (s390_collect_ptrace_register): Handle upper/lower register halves.
4814 (s390_supply_ptrace_register): Likewise.
4815 (s390_fill_gregset): Update to register number changes.
4816 (s390_get_hwcap): New routine.
4817 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4818 Install appropriate regmap and register set.
4819
6e7ffa39
JB
48202010-01-01 Joel Brobecker <brobecker@adacore.com>
4821
4822 * server.c (gdbserver_version): Update copyright year to 2010.
4823 * gdbreplay.c (gdbreplay_version): Likewise.
4824
957f3f49
DE
48252009-12-28 Doug Evans <dje@google.com>
4826
4827 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4828 elf/external.h. Include <elf.h> instead but only if necessary.
4829
ca5c370d
PA
48302009-12-28 Pedro Alves <pedro@codesourcery.com>
4831
4832 * linux-low.c (linux_remove_process): Remove `detaching'
4833 parameter. Don't release/detach from thread_db here.
4834 (linux_kill): Release/detach from thread_db here, ...
4835 (linux_detach): ... and here, before actually detaching.
4836 (linux_wait_1): ... and here, when a process exits.
4837 * thread-db.c (any_thread_of): New.
4838 (thread_db_free): Switch the current inferior to a thread of the
4839 passed in process.
4840
4ee62156
DE
48412009-12-21 Doug Evans <dje@google.com>
4842
d90e6a88
DE
4843 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4844
c5f62d5f
DE
4845 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4846 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4847 warning ifndef __NR_tkill. Move setting of errno there too.
4848 Delete unnecessary resetting of errno after syscall.
4849 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4850
10e86dd7
DE
4851 * configure.ac: Check for dladdr.
4852 * config.in: Regenerate.
4853 * configure: Regenerate.
4854 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4855 (try_thread_db_load): Update.
4856
4ee62156
DE
4857 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4858
00f515da
DE
48592009-12-18 Doug Evans <dje@google.com>
4860
e9464885
DE
4861 * event-loop.c: Include unistd.h if it exists.
4862
07d4f67e
DE
4863 * linux-low.c (my_waitpid): Move definition away from being in
4864 between linux_tracefork_child/linux_test_for_tracefork.
4865
00f515da
DE
4866 * gdb_proc_service.h (psaddr_t): Fix type.
4867 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4868 signature to match glibc.
4869
1de1badb
DE
48702009-12-16 Doug Evans <dje@google.com>
4871
4872 * linux-low.c (linux_read_memory): Fix argument to read.
4873
aeeb81d1
PA
48742009-11-26 Pedro Alves <pedro@codesourcery.com>
4875
4876 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4877 events, don't leave current_inferior pointing at null.
4878
10357975
PA
48792009-11-26 Pedro Alves <pedro@codesourcery.com>
4880
4881 * win32-low.c (LOG): Delete.
4882 (OUTMSG): Output to stderr.
4883 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4884 on compile time LOG macro.
4885 (win32_wait): Fix debug output.
4886
cf6e3471
PA
48872009-11-26 Pedro Alves <pedro@codesourcery.com>
4888
4889 * win32-low.c (win32_add_one_solib): If the dll name is
4890 "ntdll.dll", prepend the system directory to the dll path.
4891
0c85e18e
MK
48922009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4893
4894 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4895
9ac544ce 48962009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 4897 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
4898
4899 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4900 * configure.ac: Check for __mcoldfire__ and set
4901 gdb_cv_m68k_is_coldfire.
4902 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4903 reg-cf.o and reg-m68k.o.
4904 * configure: Regenerated.
4905
fd7dd3e6
PA
49062009-11-16 Pedro Alves <pedro@codesourcery.com>
4907
4908 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4909 Pass it to thread_db_free.
4910 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4911 proper `detaching' argument to linux_remove_process.
4912 * linux-low.h (thread_db_free): Add `detaching' parameter.
4913 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4914 to thread_db_free.
4915 (thread_db_free): Add `detaching' parameter. Only
4916 call td_ta_clear_event if detaching from process.
4917
75aa492e
MK
49182009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4919
4920 * thread-db.c (thread_db_free): Fix typo.
4921
21e1bee4
PP
49222009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4923
4924 PR gdb/10838
4925 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4926
8838b45e
NS
49272009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4928
4929 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4930 with an i686 compiler.
4931 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4932 needed.
4933 * configure: Rebuilt.
4934
8a35fb51
SL
49352009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4936
4937 PR gdb/10783
4938
4939 * server.c (handle_search_memory_1): Correct read_addr initialization
4940 in loop for searching subsequent chunks.
4941
96f15937
PP
49422009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4943
4944 * configure.ac: New --with-libthread-db option.
4945 * thread-db.c: Allow direct dependence on libthread_db.
4946 (thread_db_free): Adjust.
4947 * config.in: Regenerate.
4948 * configure: Likewise.
889bf7c5 4949
5f7d1694
PP
49502009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4951
4952 PR gdb/10757
4953 * thread-db.c (attach_thread): New function.
4954 (maybe_attach_thread): Return success/failure.
4955 (find_new_threads_callback): Adjust.
889bf7c5
PA
4956 (thread_db_find_new_threads): Loop until no new threads.
4957
88e3b899
PA
49582009-10-13 Pedro Alves <pedro@codesourcery.com>
4959
4960 * proc-service.c (ps_lgetregs): Formatting.
4961
cdbfd419
PP
49622009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4963
4964 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4965 * configure.ac: Adjust.
4966 * linux-low.h (struct process_info_private): Move members to struct
4967 thread_db.
4968 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4969 * linux-low.c (linux_remove_process): Adjust.
4970 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4971 * server.c (handle_query): Move code ...
4972 (handle_monitor_command): ... here. New function.
4973 * target.h (struct target_ops): New member.
4974 * thread-db.c (struct thread_db): New.
4975 (libthread_db_search_path): New variable.
4976 (thread_db_create_event, thread_db_enable_reporting)
4977 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4978 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4979 (try_thread_db_load_1, dladdr_to_soname): New functions.
4980 (try_thread_db_load, thread_db_load_search): New functions.
4981 (thread_db_init): Search for libthread_db.
4982 (thread_db_free): New function.
4983 (thread_db_handle_monitor_command): Likewise.
4984 * config.in: Regenerate.
4985 * configure: Regenerate.
889bf7c5 4986
4168d2d6
UW
49872009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4988
4989 * spu-low.c (spu_kill): Wait for inferior to terminate.
4990 Call clear_inferiors.
4991 (spu_detach): Call clear_inferiors.
4992
81ecdfbb
RW
49932009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4994
4995 * aclocal.m4: Regenerate.
4996 * config.in: Likewise.
4997 * configure: Likewise.
4998
0b9ff2c0
UW
49992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5000
5001 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5002 (parse_spufs_run): New function.
5003 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5004 (ppc_breakpoint_at): Handle SPU breakpoints.
5005
efcbbd14
UW
50062009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5007
5008 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5009 (SPUFS_MAGIC): Define.
5010 (spu_enumerate_spu_ids): New function.
5011 (linux_qxfer_spu): New function.
5012 (linux_target_ops): Install linux_qxfer_spu.
5013
f4d9bade
UW
50142009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5015
5016 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5017 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5018 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5019 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5020 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5021 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5022 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5023 (init_registers_powerpc_cell32l): Add prototype.
5024 (init_registers_powerpc_cell64l): Likewise.
5025 (ppc_arch_setup): Detect Cell/B.E. architecture.
5026
96e946ca
RW
50272009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5028
5029 * Makefile.in (datarootdir): New variable.
5030
58d6951d
DJ
50312009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5032
5033 * linux-low.c (linux_write_memory): Update debugging output.
5034 * Makefile.in (clean): Add new descriptions.
5035 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5036 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5037 * configure.srv: Add new files for arm*-*-linux*.
5038 * linux-arm-low.c: Add new declarations.
5039 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5040 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5041 (HWCAP_VFPv3D16): New.
5042 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5043 instead of __IWMMXT__.
5044 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5045 (arm_arch_setup): New.
5046 (target_regsets): Remove #ifdef. Add VFP regset.
5047 (the_low_target): Use arm_arch_setup.
5048
12b42a12
DJ
50492009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5050
5051 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5052 the main thread again.
5053
ac8c974e
AR
50542009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5055
5056 Adding Neutrino gdbserver.
5057 * configure: Regenerated.
5058 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5059 * configure.srv (i[34567]86-*-nto*): New target.
5060 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5061 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5062 (nto_comctrl) [__QNX__]: New function.
5063 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5064
4424e0c3 50652009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
5066
5067 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5068 srv_tgtobj.
5069
912cf4ba
PA
50702009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5071 Pedro Alves <pedro@codesourcery.com>
5072
5073 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5074 don't support CONTEXT_EXTENDED_REGISTERS.
5075 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5076 (the_low_target): Install them.
5077 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5078 failing with ERROR_PIPE_NOT_CONNECTED.
5079
aa5ca48f
DE
50802009-06-30 Doug Evans <dje@google.com>
5081 Pierre Muller <muller@ics.u-strasbg.fr>
5082
5083 Add h/w watchpoint support to x86-linux, win32-i386.
5084 * Makefile.in (SFILES): Add i386-low.c
5085 (i386_low_h): Define.
5086 (i386-low.o): Add dependencies.
5087 (linux-x86-low.o): Add i386-low.h dependency.
5088 (win32-i386-low.o): Ditto.
5089 * i386-low.c: New file.
5090 * i386-low.h: New file.
5091 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5092 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5093 * linux-low.c (linux_add_process): Initialize arch_private.
5094 (linux_remove_process): Free arch_private.
5095 (add_lwp): Initialize arch_private.
5096 (delete_lwp): Free arch_private.
5097 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5098 provided.
5099 * linux-low.h (process_info_private): New member arch_private.
5100 (lwp_info): New member arch_private.
5101 (linux_target_ops): New members new_process, new_thread,
5102 prepare_to_resume.
5103 (ptid_of): New macro.
5104 * linux-x86-low.c: Include stddef.h, i386-low.h.
5105 (arch_process_info): New struct.
5106 (arch_lwp_info): New struct.
5107 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5108 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5109 (i386_dr_low_get_status): New function.
5110 (x86_insert_point, x86_remove_point): New functions.
5111 (x86_stopped_by_watchpoint): New function.
5112 (x86_stopped_data_address): New function.
5113 (x86_linux_new_process, x86_linux_new_thread): New functions.
5114 (x86_linux_prepare_to_resume): New function.
5115 (the_low_target): Add entries for insert_point, remove_point,
5116 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5117 prepare_to_resume.
5118 * server.c (debug_hw_points): New global.
5119 (monitor_show_help): Document set debug-hw-points.
5120 (handle_query): Process "set debug-hw-points".
5121 * server.h (debug_hw_points): Declare.
5122 (paddress): Declare.
5123 * utils.c (NUMCELLS, CELLSIZE): New macros.
5124 (get_sell, xsnprintf, paddress): New functions.
5125 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5126 remove_point, stopped_by_watchpoint, stopped_data_address.
5127 * win32-i386-low.c: Include i386-low.h.
5128 (debug_reg_state): Replaces dr.
5129 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5130 (i386_dr_low_get_status): New function.
5131 (i386_insert_point, i386_remove_point): New functions.
5132 (i386_stopped_by_watchpoint): New function.
5133 (i386_stopped_data_address): New function.
5134 (i386_initial_stuff): Update.
5135 (get_thread_context,set_thread_context,i386_thread_added): Update.
5136 (the_low_target): Add entries for insert_point,
5137 remove_point, stopped_by_watchpoint, stopped_data_address.
5138 * win32-low.c (win32_insert_watchpoint): New function.
5139 (win32_remove_watchpoint): New function.
5140 (win32_stopped_by_watchpoint): New function.
5141 (win32_stopped_data_address): New function.
5142 (win32_target_ops): Add entries for insert_watchpoint,
5143 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5144 * win32-low.h (win32_target_ops): New members insert_point,
5145 remove_point, stopped_by_watchpoint, stopped_data_address.
5146
d993e290
PA
51472009-06-25 Pedro Alves <pedro@codesourcery.com>
5148
5149 * server.c (process_serial_event): Re-return unsupported, not
5150 error, if the type isn't recognized. Re-allow supporting only
5151 insert or remove packets. Also call require_running for
5152 breakpoints. Add missing break statement to default case. Tidy.
5153 * target.h (struct target_ops): Rename insert_watchpoint to
5154 insert_point, and remove_watchpoint to remove_point.
5155
5156 * linux-low.h (struct linux_target_ops): Likewise.
5157 * linux-low.c (linux_insert_watchpoint): Rename to ...
5158 (linux_insert_point): ... this. Adjust.
5159 (linux_remove_watchpoint): Rename to ...
5160 (linux_remove_point): ... this. Adjust.
5161 (linux_target_ops): Adjust.
5162 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5163 (cris_insert_point): ... this.
5164 (cris_remove_watchpoint): Rename to ...
5165 (cris_remove_point): ... this.
5166 (the_low_target): Adjust.
5167
0f54c268
PM
51682009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5169
5170 * server.c (handle_v_kill): Pass signal_pid to
5171 kill_inferior if multi_process is zero.
5172
c6314022
AR
51732009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5174
5175 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5176 * target.h (target_ops): Comment for *_watchpoint to make it clear
5177 the functions can get types '0' and '1'.
5178
4463ce24
AR
51792009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5180
5181 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5182 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5183 * regcache.c (get_regcache): Likewise.
5184 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5185 * win32-low.c (child_fetch_inferior_registers): Remove check for
5186 regno 0.
5187
cf8fd78b
PA
51882009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5189 Pedro Alves <pedro@codesourcery.com>
5190
5191 * target.h (struct target_ops) <supports_multi_process>: New
5192 callback.
5193 (target_supports_multi_process): New.
5194 * server.c (handle_query): Even if GDB reports support, only
5195 enable multi-process if the target also supports it. Report
5196 multi-process support only if the target backend supports it.
5197 * linux-low.c (linux_supports_multi_process): New function.
5198 (linux_target_ops): Install it as target_supports_multi_process
5199 callback.
5200
47c0c975
DE
52012009-05-24 Doug Evans <dje@google.com>
5202
e09875d4
DE
5203 Global renaming of find_thread_pid to find_thread_ptid.
5204 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5205 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5206 All callers updated.
5207
e27d73f6
DE
5208 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5209 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5210 directly.
5211
47c0c975
DE
5212 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5213 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5214 (linux_resume_one_lwp): Ditto.
5215
2acc282a
DE
52162009-05-23 Doug Evans <dje@google.com>
5217
5218 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5219 from struct inferior_list_entry * to struct lwp_info *.
5220 All callers updated.
5221
9f1036c1
DE
52222009-05-13 Doug Evans <dje@google.com>
5223
5224 * linux-x86-low.c: Don't include assert.h.
5225 (x86_siginfo_fixup): Use fatal, not assert.
5226 (x86_arch_setup): Fix comment.
5227
d0722149
DE
52282009-05-12 Doug Evans <dje@google.com>
5229
5230 Biarch support for i386/amd64 gdbserver.
5231 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5232 Add linux-x86-low.c.
5233 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5234 (linux-x86-low.o): Add.
5235 * linux-x86-64-low.c: Delete.
5236 * linux-i386-low.c: Delete.
5237 * linux-x86-low.c: New file.
5238 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5239 linux-x86-low.o.
5240 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5241 linux-x86-low.o.
5242 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5243 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5244 (linux_child_pid_to_exec_file): New function.
5245 (elf_64_header_p, elf_64_file_p): New functions.
5246 (siginfo_fixup): New function.
5247 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5248 give target a chance to convert layout.
5249 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5250 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5251
fdeb2a12
DE
52522009-05-07 Doug Evans <dje@google.com>
5253
5254 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5255 (regsets_store_inferior_registers): Ditto.
5256
a6dbe5df
PA
52572009-05-06 Pedro Alves <pedro@codesourcery.com>
5258
5259 PR server/10048
5260
5261 * linux-low.c (must_set_ptrace_flags): Delete.
5262 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5263 of the global.
5264 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5265 `lwp->must_set_ptrace_flags' instead.
ba42693b 5266 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
5267 (linux_wait_1): ... not here.
5268
5091eb23
DE
52692009-04-30 Doug Evans <dje@google.com>
5270
9f767825
DE
5271 * inferiors.c (started_inferior_callback): New function.
5272 (attached_inferior_callback): New function.
5273 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5274 * server.c (print_started_pid, print_attached_pid): New functions.
5275 (detach_or_kill_for_exit): New function.
5276 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5277 * server.h (have_started_inferiors_p): Declare.
5278 (have_attached_inferiors_p): Declare.
5279
5091eb23
DE
5280 * inferiors.c (remove_process): Fix memory leak, free process.
5281 * linux-low.c (linux_remove_process): New function.
5282 (linux_kill): Call it instead of remove_process.
5283 (linux_detach, linux_wait_1): Ditto.
5284
155c8968
PA
52852009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5286
5287 * configure.srv: Add x86 Windows CE target.
5288
7fe519cb
UW
52892009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5290
5291 * inferiors.c (get_thread_process): Make global.
5292 * server.h (get_thread_process): Add prototype.
5293 * thread-db.c (find_one_thread): Use get_thread_process
5294 instead of current_process.
5295 (thread_db_get_tls_address): Do not crash if called when
5296 thread layer is not yet initialized.
5297
5472f405
UW
52982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5299
5300 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5301 * spu-low.c (current_tid): Rename to ...
5302 (current_ptid): ... this.
5303 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5304 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5305 ptid_get_lwp (current_ptid) instead of current_tid.
5306 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5307 instead of current_tid. Use find_process_pid to verify pid
5308 argument is valid. Pass proper argument to remove_process.
5309 (spu_thread_alive): Compare current_ptid instead of current_tid.
5310 (spu_resume): Likewise.
5311
55ac2b99
PA
53122009-04-02 Pedro Alves <pedro@codesourcery.com>
5313
5314 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5315 variable.
5316
95954743
PA
53172009-04-01 Pedro Alves <pedro@codesourcery.com>
5318
5319 Implement the multiprocess extensions, and add linux multiprocess
5320 support.
5321
5322 * server.h (ULONGEST): Declare.
5323 (struct ptid, ptid_t): New.
5324 (minus_one_ptid, null_ptid): Declare.
5325 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5326 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5327 (struct inferior_list_entry): Change `id' type from unsigned from
5328 to ptid_t.
5329 (struct sym_cache, struct breakpoint, struct
5330 process_info_private): Forward declare.
5331 (struct process_info): Declare.
5332 (current_process): Declare.
5333 (all_processes): Declare.
5334 (initialize_inferiors): Declare.
5335 (add_thread): Adjust to use ptid_t.
5336 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5337 (add_process, remove_process, find_thread_pid): Declare.
5338 (find_inferior_id): Adjust to use ptid_t.
5339 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5340 (multi_process): Declare.
5341 (push_event): Adjust to use ptid_t.
5342 (read_ptid, write_ptid): Declare.
5343 (prepare_resume_reply): Adjust to use ptid_t.
5344 (clear_symbol_cache): Declare.
5345 * inferiors.c (all_processes): New.
5346 (null_ptid, minus_one_ptid): New.
5347 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5348 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5349 (add_thread): Change unsigned long to ptid. Remove gdb_id
5350 parameter. Adjust.
5351 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5352 (gdb_id_to_thread): Rename to ...
5353 (find_thread_pid): ... this. Change unsigned long to ptid.
5354 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5355 (loaded_dll, pull_pid_from_list): Adjust.
5356 (add_process, remove_process, find_process_pid)
5357 (get_thread_process, current_process, initialize_inferiors): New.
5358 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5359 (struct target_waitstatus) <related_pid>: Ditto.
5360 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5361 return type to int.
5362 (struct target_ops) <join>: Add `pid' argument.
5363 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5364 (struct target_ops) <wait>: Add `ptid' field. Change return type
5365 to ptid.
5366 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5367 (mywait): Add `ptid' argument. Change return type to ptid_t.
5368 (target_pid_to_str): Declare.
5369 * target.c (set_desired_inferior): Adjust to use ptids.
5370 (mywait): Add new `ptid' argument. Adjust.
5371 (target_pid_to_str): New.
5372 * mem-break.h (free_all_breakpoints): Declare.
5373 * mem-break.c (breakpoints): Delelete.
5374 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5375 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5376 to use per-process breakpoint list.
5377 (free_all_breakpoints): New.
5378 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5379 (symbol_cache, all_symbols_looked_up): Delete.
5380 (hexchars): New.
5381 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5382 read_ptid): New.
5383 (prepare_resume_reply): Change ptid argument's type from unsigned
5384 long to ptid_t. Adjust. Implement W;process and X;process.
5385 (free_sym_cache, clear_symbol_cache): New.
5386 (look_up_one_symbol): Adjust to per-process symbol cache. *
5387 * server.c (cont_thread, general_thread, step_thread): Change type
5388 to ptid_t.
5389 (attached): Delete.
5390 (multi_process): New.
5391 (last_ptid): Change type to ptid_t.
5392 (struct vstop_notif) <ptid>: Change type to ptid_t.
5393 (queue_stop_reply, push_event): Change `ptid' argument's type to
5394 ptid_t.
5395 (discard_queued_stop_replies): Add `pid' argument.
5396 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5397 changes. Don't reference the `attached' global.
5398 (attach_inferior): Adjust to mywait interface changes.
5399 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5400 features. Handle and report "multiprocess+". Handle
5401 "qAttached:PID".
5402 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5403 changes.
5404 (handle_v_kill): New.
5405 (handle_v_stopped): Adjust to use target_pid_to_str.
5406 (handle_v_requests): Allow multiple attaches and runs when
5407 multiprocess extensions are in effect. Handle "vKill".
5408 (myresume): Adjust to use ptids.
5409 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5410 (handle_status): Adjust to discard_queued_stop_replies interface
5411 change.
5412 (first_thread_of, kill_inferior_callback)
5413 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5414 (main): Call initialize_inferiors. Adjust to use ptids, killing
5415 and detaching from all inferiors. Handle multiprocess packet
5416 variants.
5417 * linux-low.h: Include gdb_proc_service.h.
5418 (struct process_info_private): New.
5419 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5420 <lwpid_of>: Use ptid_get_lwp.
5421 (get_lwp_thread): Adjust.
5422 (struct lwp_info): Add `dead' member.
5423 (find_lwp_pid): Declare.
5424 * linux-low.c (thread_db_active): Delete.
5425 (new_inferior): Adjust comment.
5426 (inferior_pid): Delete.
5427 (linux_add_process): New.
5428 (handle_extended_wait): Adjust.
5429 (add_lwp): Change unsigned long to ptid.
5430 (linux_create_inferior): Add process to processes table. Adjust
5431 to use ptids. Don't set new_inferior here.
5432 (linux_attach_lwp): Rename to ...
5433 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5434 it. Adjust to use ptids.
5435 (linux_attach_lwp): New.
5436 (linux_attach): Add process to processes table. Don't set
5437 new_inferior here.
5438 (struct counter): New.
5439 (second_thread_of_pid_p, last_thread_of_process_p): New.
5440 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5441 multiple processes.
5442 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5443 processes. Remove process from process table.
5444 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5445 to multiple processes.
5446 (any_thread_of): New.
5447 (linux_detach): Add `pid' argument, and handle it. Remove process
5448 from processes table.
5449 (linux_join): Add `pid' argument. Handle it.
5450 (linux_thread_alive): Change unsighed long argument to ptid_t.
5451 Consider dead lwps as not being alive.
5452 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5453 threads we're not interested in.
5454 (same_lwp, find_lwp_pid): New.
5455 (linux_wait_for_lwp): Change `pid' argument's type from int to
5456 ptid_t. Adjust.
5457 (linux_wait_for_event): Rename to ...
5458 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5459 from int to ptid_t. Adjust.
5460 (linux_wait_for_event): New.
5461 (linux_wait_1): Add `ptid' argument. Change return type to
5462 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5463 that exit from the process table.
5464 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5465 Adjust.
5466 (mark_lwp_dead): New.
5467 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5468 stopping all threads, mark its main lwp as dead.
5469 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5470 ptids.
5471 (fetch_register, usr_store_inferior_registers)
5472 (regsets_fetch_inferior_registers)
5473 (regsets_store_inferior_registers, linux_read_memory)
5474 (linux_write_memory): Inline `inferior_pid'.
5475 (linux_look_up_symbols): Adjust to use per-process
5476 `thread_db_active'.
5477 (linux_request_interrupt): Adjust to use ptids.
5478 (linux_read_auxv): Inline `inferior_pid'.
5479 (initialize_low): Don't reference thread_db_active.
5480 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5481 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5482 (ps_getpid): Return the pid of the current inferior.
5483 * thread-db.c (proc_handle, thread_agent): Delete.
5484 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5485 per-process data.
5486 (find_one_thread): Change argument type to ptid_t. Adjust to
5487 per-process data.
5488 (maybe_attach_thread): Adjust to per-process data and ptids.
5489 (thread_db_find_new_threads): Ditto.
5490 (thread_db_init): Ditto.
5491 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5492 processes table. Adjust to use ptids.
5493 (spu_kill, spu_detach): Adjust interface. Remove process from
5494 processes table.
5495 (spu_join, spu_thread_alive): Adjust interface.
5496 (spu_wait): Adjust interface. Remove process from processes
5497 table. Adjust to use ptids.
5498 * win32-low.c (current_inferior_tid): Delete.
5499 (current_inferior_ptid): New.
5500 (debug_event_ptid): New.
5501 (thread_rec): Take a ptid. Adjust.
5502 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5503 (child_delete_thread): Ditto.
5504 (do_initial_child_stuff): Add `attached' argument. Add process to
5505 processes table.
5506 (child_fetch_inferior_registers, child_store_inferior_registers):
5507 Adjust.
5508 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5509 (win32_attach): Pass 1 to do_initial_child_stuff.
5510 (win32_kill): Adjust interface. Remove process from processes
5511 table.
5512 (win32_detach): Ditto.
5513 (win32_join): Adjust interface.
5514 (win32_thread_alive): Take a ptid.
5515 (win32_resume): Adjust to use ptids.
5516 (get_child_debug_event): Ditto.
5517 (win32_wait): Adjust interface. Remove exiting process from
5518 processes table.
5519
bd99dc85
PA
55202009-04-01 Pedro Alves <pedro@codesourcery.com>
5521
5522 Non-stop mode support.
5523
5524 * server.h (non_stop): Declare.
5525 (gdb_client_data, handler_func): Declare.
5526 (delete_file_handler, add_file_handler, start_event_loop):
5527 Declare.
5528 (handle_serial_event, handle_target_event, push_event)
5529 (putpkt_notif): Declare.
5530 * target.h (enum resume_kind): New.
5531 (struct thread_resume): Replace `step' field by `kind' field.
5532 (TARGET_WNOHANG): Define.
5533 (struct target_ops) <wait>: Add `options' argument.
5534 <supports_non_stop, async, start_non_stop>: New fields.
5535 (target_supports_non_stop, target_async): New.
5536 (start_non_stop): Declare.
5537 (mywait): Add `options' argument.
5538 * target.c (mywait): Add `options' argument. Print child exit
5539 notifications here.
5540 (start_non_stop): New.
5541 * server.c (non_stop, own_buf, mem_buf): New globals.
5542 (struct vstop_notif): New.
5543 (notif_queue): New global.
5544 (queue_stop_reply, push_event, discard_queued_stop_replies)
5545 (send_next_stop_reply): New.
5546 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5547 interface changes.
5548 (attach_inferior): In non-stop mode, don't wait for the target
5549 here.
5550 (handle_general_set): Handle QNonStop.
5551 (handle_query): When handling qC, return the current general
5552 thread, instead of the first thread of the list.
5553 (handle_query): If the backend supports non-stop mode, include
5554 QNonStop+ in the qSupported query response.
5555 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5556 and non-stop mode.
5557 (handle_v_attach, handle_v_run): Handle non-stop mode.
5558 (handle_v_stopped): New.
5559 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5560 (myresume): Adjust to use resume_kind. Handle non-stop.
5561 (queue_stop_reply_callback): New.
5562 (handle_status): Handle non-stop mode.
5563 (main): Clear non_stop flag on reconnection. Use the event-loop.
5564 Refactor serial protocol handling from here ...
5565 (process_serial_event): ... to this new function. When GDB
5566 selects any thread, select one here. In non-stop mode, wait until
5567 GDB acks all pending events before exiting.
5568 (handle_serial_event, handle_target_event): New.
5569 * remote-utils.c (remote_open): Install remote_desc in the event
5570 loop.
5571 (remote_close): Remove remote_desc from the event loop.
5572 (putpkt_binary): Rename to...
5573 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5574 (putpkt_binary): New as wrapper around putpkt_binary_1.
5575 (putpkt_notif): New.
5576 (prepare_resume_reply): In non-stop mode, don't change the
5577 general_thread.
5578 * event-loop.c: New.
5579 * Makefile.in (OBJ): Add event-loop.o.
5580 (event-loop.o): New rule.
5581
5582 * linux-low.h (pid_of): Moved here.
5583 (lwpid_of): New.
5584 (get_lwp_thread): Use lwpid_of.
5585 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5586 * linux-low.c (pid_of): Delete.
5587 (inferior_pid): Use lwpid_of.
5588 (linux_event_pipe): New.
5589 (target_is_async_p): New.
5590 (delete_lwp): New.
5591 (handle_extended_wait): Use lwpid_of.
5592 (add_lwp): Don't set lwpid field.
5593 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5594 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5595 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5596 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5597 first. Adjust to linux_wait_for_event interface changes. Use
5598 lwpid_of.
5599 (linux_detach): Don't delete the main lwp here.
5600 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5601 (status_pending_p): Don't consider explicitly suspended lwps.
5602 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5603 pointer. Add OPTIONS argument. Change return type to int. Use
5604 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5605 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5606 pointer. Add status pointer argument. Return a pid instead of a
5607 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5608 changes. In non-stop mode, don't switch to a random thread.
5609 (linux_wait): Rename to...
5610 (linux_wait_1): ... this. Add target_options argument, and handle
5611 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5612 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5613 clean exit and signal exit code. Don't stop all threads in
5614 non-stop mode. In all-stop mode, only stop all threads when
5615 reporting a stop to GDB. Handle explicit thread stop requests.
5616 (async_file_flush, async_file_mark): New.
5617 (linux_wait): New.
5618 (send_sigstop): Use lwpid_of.
5619 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5620 interface changes. In non-stop mode, don't switch to a random
5621 thread.
5622 (linux_resume_one_lwp): Use lwpid_of.
5623 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5624 (linux_resume_one_thread): ... this. Handle resume_stop. In
5625 non-stop mode, don't look for pending flag in all threads.
5626 (resume_status_pending_p): Don't consider explicitly suspended
5627 threads.
5628 (my_waitpid): Reimplement. Emulate __WALL.
5629 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5630 Use lwpid_of.
5631 (sigchld_handler, linux_supports_non_stop, linux_async)
5632 (linux_start_non_stop): New.
5633 (linux_target_ops): Register linux_supports_non_stop, linux_async
5634 and linux_start_non_stop.
5635 (initialize_low): Install SIGCHLD handler.
5636 * thread-db.c (thread_db_create_event, find_one_thread)
5637 (thread_db_get_tls_address): Use lwpid_of.
5638 * win32-low.c (win32_detach): Adjust to use resume_kind.
5639 (win32_wait): Add `options' argument.
5640 * spu-low.c (spu_resume): Adjust to use resume_kind.
5641 (spu_wait): Add `options' argument.
5642
5b1c542e
PA
56432009-04-01 Pedro Alves <pedro@codesourcery.com>
5644
5645 Decouple target code from remote protocol.
5646
5647 * target.h (enum target_waitkind): New.
5648 (struct target_waitstatus): New.
5649 (struct target_ops) <wait>: Return an unsigned long. Take a
5650 target_waitstatus pointer instead of a char pointer.
5651 (mywait): Likewise.
5652 * target.c (mywait): Change prototype to return an unsigned long.
5653 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5654 * server.h (thread_from_wait, old_thread_from_wait): Delete
5655 declarations.
5656 (prepare_resume_reply): Change prototype to take a
5657 target_waitstatus.
5658 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5659 (last_status, last_ptid): New.
5660 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5661 pid instead of a signal.
5662 (attach_inferior): Remove "status" and "signal" parameters.
5663 Adjust.
5664 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5665 not as an address.
5666 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5667 (handle_v_requests, myresume): Remove "status" and "signal"
5668 parameters. Adjust.
5669 (handle_status): New.
5670 (main): Delete local `status'. Adjust.
5671 * remote-utils.c: Include target.h.
5672 (prepare_resume_reply): Change prototype to take a
5673 target_waitstatus. Adjust.
5674
5675 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5676 interface.
5677 * spu-low.c (spu_wait): Adjust.
5678 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5679 Delete.
5680 (win32_wait): Adjust.
5681
2bd7c093
PA
56822009-04-01 Pedro Alves <pedro@codesourcery.com>
5683
5684 * target.h (struct thread_resume): Delete leave_stopped member.
5685 (struct target_ops): Add a `n' argument to the `resume' callback.
5686 * server.c (start_inferior): Adjust.
5687 (handle_v_cont, myresume): Adjust.
5688 * linux-low.c (check_removed_breakpoint): Adjust to resume
5689 interface change, and to removed leave_stopped field.
5690 (resume_ptr): Delete.
5691 (struct thread_resume_array): New.
5692 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5693 resume interface change.
5694 (linux_continue_one_thread, linux_queue_one_thread)
5695 (resume_status_pending_p): Check if the resume field is NULL
5696 instead of checking the leave_stopped member.
5697 (linux_resume): Adjust to the target resume interface change.
5698 * spu-low.c (spu_resume): Adjust to the target resume interface
5699 change.
5700 * win32-low.c (win32_detach, win32_resume): Ditto.
5701
c35fafde
PA
57022009-04-01 Pedro Alves <pedro@codesourcery.com>
5703
5704 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5705 flag.
5706 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5707 pending.
5708 (linux_continue_one_thread): Only preserve the stepping flag if
5709 there's a pending breakpoint.
5710
0a59d50b
PA
57112009-03-31 Pedro Alves <pedro@codesourcery.com>
5712
5713 * server.c (main): After the inferior having exited, call
5714 remote_close before exiting gdbserver.
5715
f04c6d38
TJB
57162009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5717
5718 Fix size of FPSCR in Power 7 processors.
5719 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5720 (PPC_FEATURE_HAS_DFP): New #define.
5721 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5722 size of the FPSCR.
5723
78e5cee6
PA
57242009-03-23 Pedro Alves <pedro@codesourcery.com>
5725
5726 * server.c (handle_query) Whitespace and formatting.
5727
1b3f6016
PA
57282009-03-22 Pedro Alves <pedro@codesourcery.com>
5729
5730 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5731 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5732 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5733 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5734 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5735 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5736 Makefile.in, configure.ac: Fix whitespace throughout.
5737 * configure: Regenerate.
5738
a07b2135
PA
57392009-03-22 Pedro Alves <pedro@codesourcery.com>
5740
5741 * inferiors.c (find_inferior): Make it safe for the callback
5742 function to delete the currently iterated inferior.
5743
67cc2626
PA
57442009-03-22 Pedro Alves <pedro@codesourcery.com>
5745
5746 * Makefile.in (linuw_low_h): Move higher.
5747 (thread-db.o): Depend on $(linux_low_h).
5748
54a0b537
PA
57492009-03-17 Pedro Alves <pedro@codesourcery.com>
5750
5751 Rename "process" to "lwp" throughout.
5752
5753 * linux-low.c (all_processes): Rename to...
5754 (all_lwps): ... this.
5755 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5756 (add_process): Rename to ...
5757 (add_lwp): ... this. Adjust.
5758 (linux_create_inferior): Adjust.
5759 (linux_attach_lwp): Adjust.
5760 (linux_attach): Adjust.
5761 (linux_kill_one_process): Rename to ...
5762 (linux_kill_one_lwp): ... this. Adjust.
5763 (linux_kill): Adjust.
5764 (linux_detach_one_process): Rename to ...
5765 (linux_detach_one_lwp): ... this. Adjust.
5766 (linux_detach): Adjust.
5767 (check_removed_breakpoint): Adjust.
5768 (status_pending_p): Adjust.
5769 (linux_wait_for_process): Rename to ...
5770 (linux_wait_for_lwp): ... this. Adjust.
5771 (linux_wait_for_event): Adjust.
5772 (send_sigstop): Adjust.
5773 (wait_for_sigstop): Adjust.
5774 (stop_all_processes): Rename to ...
5775 (stop_all_lwps): ... this.
5776 (linux_resume_one_process): Rename to ...
5777 (linux_resume_one_lwp): ... this. Adjust.
5778 (linux_set_resume_request, linux_continue_one_thread)
5779 (linux_queue_one_thread, resume_status_pending_p)
5780 (usr_store_inferior_registers, regsets_store_inferior_registers)
5781 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5782 Adjust.
5783 * linux-low.h (get_process): Rename to ...
5784 (get_lwp): ... this. Adjust.
5785 (get_thread_process): Rename to ...
5786 (get_thread_lwp): ... this. Adjust.
5787 (get_process_thread): Rename to ...
5788 (get_lwp_thread): ... this. Adjust.
5789 (struct process_info): Rename to ...
5790 (struct lwp_info): ... this.
5791 (all_processes): Rename to ...
5792 (all_lwps): ... this.
5793 * proc-service.c (ps_lgetregs): Adjust.
5794 * thread-db.c (thread_db_create_event, find_one_thread)
5795 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5796
0b16c5cf
PA
57972009-03-14 Pedro Alves <pedro@codesourcery.com>
5798
5799 * server.c (handle_query): Handle "qAttached".
5800
32de4b9d
NS
58012009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5802
5803 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5804 GPLv3, update license URL.
5805
2aecd87f
DE
58062009-03-01 Doug Evans <dje@google.com>
5807
93efd302 5808 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
5809 (server_h): Add gdb_signals.h.
5810 (signals.o): Update.
5811 * server.h (target_signal_from_host,target_signal_to_host_p)
5812 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5813
86b1f9c5
PM
58142009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5815
5816 * remote-utils.c (getpkt): Also generate remote-debug
5817 information if noack_mode is set.
5818
4aa995e1
PA
58192009-02-06 Pedro Alves <pedro@codesourcery.com>
5820
5821 * server.c (handle_query): Report qXfer:siginfo:read and
5822 qXfer:siginfo:write as supported and handle them.
5823 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5824 * linux-low.c (linux_xfer_siginfo): New.
5825 (linux_target_ops): Set it.
5826
62709adf
PA
58272009-01-26 Pedro Alves <pedro@codesourcery.com>
5828
5829 * server.c (gdbserver_usage): Mention --remote-debug.
5830 (main): Accept '--remote-debug' switch.
5831
aef93bd7
DE
58322009-01-18 Doug Evans <dje@google.com>
5833
5834 * regcache.c (new_register_cache): No need to check result of xcalloc.
5835 * server.c (handle_search_memory): Back out calls to xmalloc,
5836 result is checked and error is returned to user upon failure.
5837 (handle_query): Ditto. Add more checks for result of malloc.
5838 (handle_v_cont): Check result of malloc, report error back to
5839 user upon failure.
5840 (handle_v_run): Ditto. Call freeargv.
5841 * server.h (freeargv): Declare.
5842 * utils.c (freeargv): New fn.
5843
54363045
DE
58442009-01-15 Doug Evans <dje@google.com>
5845
f626972c
DE
5846 * gdbreplay.c (perror_with_name): Make arg const char *.
5847 * server.h (target_signal_to_name): Make return type const char *.
0842e787 5848 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 5849 * utils.c (perror_with_name): Make arg const char *.
54363045 5850
18aae699
PA
58512009-01-14 Pedro Alves <pedro@codesourcery.com>
5852
5853 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5854 when handling a EXIT_PROCESS_DEBUG_EVENT.
5855
ff703abe
JB
58562009-01-06 Joel Brobecker <brobecker@adacore.com>
5857
5858 * gdbreplay.c (gdbreplay_version): Update copyright year.
5859 * server.c (gdbserver_version): Likewise.
5860
f21cc1a2 58612009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
5862
5863 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 5864 (handle_extended_wait): Improve comment.
0e21c1ec 5865
bca929d3
DE
58662008-12-13 Doug Evans <dje@google.com>
5867
5868 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5869 * server.h (ATTR_MALLOC): New macro.
5870 (xmalloc,xcalloc,xstrdup): Declare.
5871 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5872 * inferiors.c: Ditto.
5873 * linux-low.c: Ditto.
5874 * mem-break.c: Ditto.
5875 * regcache.c: Ditto.
5876 * remote-utils.c: Ditto.
5877 * server.c: Ditto.
5878 * target.c: Ditto.
5879 * win32-low.c: Ditto.
5880
97438e3f
DE
58812008-12-12 Doug Evans <dje@google.com>
5882
896c7fbb
DE
5883 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5884 in debugging printf.
5885
97438e3f
DE
5886 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5887
e3b886f8
DE
58882008-12-09 Doug Evans <dje@google.com>
5889
5890 * linux-low.h (struct process_info): Delete member tid, unused.
5891 * thread-db.c (find_one_thread): Update.
5892 (maybe_attach_thread): Update.
5893
07e059b5
VP
58942008-12-02 Pedro Alves <pedro@codesourcery.com>
5895
889bf7c5
PA
5896 * target.h (struct target_ops): Add qxfer_osdata member.
5897 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5898 and dirent.h.
5899 (linux_qxfer_osdata): New functions.
5900 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5901 callback.
5902 * server.c (handle_query): Handle "qXfer:osdata:read:".
5903 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5904 (buffer_xml_printf): New functions.
5905 * server.h (struct buffer): New.
5906 (buffer_grow_str, buffer_grow_str0): New macros.
5907 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5908 (buffer_xml_printf): Declare.
07e059b5 5909
4cab47ab
DE
59102008-11-24 Doug Evans <dje@google.com>
5911
5912 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5913
f142445f
DJ
59142008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5915
5916 * server.c (handle_v_run): Always use the supplied argument list.
5917
d0107bb6 59182008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 5919
d0107bb6
BW
5920 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5921 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 5922
2c4ad781
TJB
59232008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5924
5925 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5926 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5927 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5928 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5929 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5930 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5931 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5932 XML target descriptions.
5933 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5934 when inferior is running on an ISA 2.05 or later processor. Add
5935 special case to return offset for full 64-bit slot of FPSCR when
5936 in 32-bits.
5937
dfb64f85
DJ
59382008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5939
5940 * Makefile.in (SFILES, clean): Added sparc64 files.
5941 (reg-sparc64.o, reg-sparc64.c): New.
5942 * configure.srv (sparc*-*-linux*): New configuration.
5943 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5944 syscall arguments for SPARC.
5945 (regsets_store_inferior_registers): Likewise.
5946 * linux-sparc-low.c: New file.
5947
66b6e1dd
DE
59482008-10-21 Doug Evans <dje@google.com>
5949
5950 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5951 (READLINE_DIR,READLINE_DEP): Delete.
5952 (INTERNAL_CFLAGS): Update.
5953 (LINTFLAGS): Update.
5954
9b710a42
PA
59552008-10-10 Pedro Alves <pedro@codesourcery.com>
5956
5957 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5958 whole argv from the last run, not just argv[0].
5959
5822d809
PA
59602008-09-08 Pedro Alves <pedro@codesourcery.com>
5961
5962 * regcache.c (new_register_cache): Return NULL if the register
5963 cache size isn't known yet.
5964 (free_register_cache): Avoid dereferencing a NULL regcache.
5965
74aac56f
DJ
59662008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5967
5968 * configure.srv: Merge MIPS and MIPS64.
5969
400b20f5
MR
59702008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5971
5972 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5973
677c5bb1
LM
59742008-08-18 Luis Machado <luisgpm@br.ibm.com>
5975
5976 * Makefile.in: Add required vsx dependencies.
5977
5978 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5979 Declare init_registers_powerpc_vsx32l.
5980 Declare init_registers_powerpc_vsx64l.
5981 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5982 (ppc_arch_setup): Check for VSX in hwcap.
5983 (ppc_fill_vsxregset): New function.
5984 (ppc_store_vsxregset): New function.
5985 Add new VSX entry in regset_info target_regsets.
5986
5987 * configure.srv: Add new VSX dependencies.
5988
a6f3e723
SL
59892008-08-12 Pedro Alves <pedro@codesourcery.com>
5990
5991 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5992 (remote_open): Set or clear transport_is_reliable.
5993 (putpkt_binary): Don't expect acks in noack mode.
5994 (getpkt): Don't send ack/nac in noack mode.
5995 * server.c (handle_general_set): Handle QStartNoAckMode.
5996 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5997 qSupported.
5998 (main): Reset noack_mode on every connection.
5999 * server.h (noack_mode): Declare.
6000
a417dc56
RW
60012008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6002
6003 * Makefile.in (GDBREPLAY_OBS): New variable.
6004 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6005
3221518c
UW
60062008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6007 Daniel Jacobowitz <dan@codesourcery.com>
6008
6009 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6010 (usr_store_inferior_registers): Likewise.
6011 (regsets_store_inferior_registers): Likewise.
6012
ec56be1b
PA
60132008-07-31 Rolf Jansen <rj@surtec.com>
6014 Pedro Alves <pedro@codesourcery.com>
6015
6016 * configure.ac: Check for memmem declaration.
6017 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6018 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6019 (disable_packet_qfThreadInfo): Unconditionally compile.
6020 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6021 * configure, config.in: Regenerate.
6022
2fe5e3ff
DE
60232008-07-28 Doug Kwan <dougkwan@google.com>
6024
6025 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6026 (linux_write_memory): Remove declaration of errno.
6027
836acd6d
UW
60282008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6029
6030 * linux-low.c (handle_extended_wait): Do not use "status"
6031 variable uninitialized.
6032
aeba519e
PA
60332008-07-07 Pedro Alves <pedro@codesourcery.com>
6034
6035 * server.c (handle_v_attach): Inhibit reporting dll changes.
6036
db42f210
PA
60372008-06-27 Pedro Alves <pedro@codesourcery.com>
6038
6039 * remote-utils.c (prepare_resume_reply): If requested, don't
6040 output "thread:TID" in the T stop reply.
6041
6042 * server.c (disable_packet_vCont, disable_packet_Tthread)
6043 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6044 (handle_query): If requested, disable support for qC, qfThreadInfo
6045 and qsThreadInfo.
6046 (handle_v_requests): If requested, disable support for vCont.
6047 (gdbserver_show_disableable): New.
6048 (main): Handle --disable-packet and --disable-packet=LIST.
6049
6050 * server.h (disable_packet_vCont, disable_packet_Tthread)
6051 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6052
8e4c5421
CD
60532008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6054
6055 * server.c (gdbserver_usage): Mention --version.
6056
6e23a804
DJ
60572008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6058
6059 * Makefile.in (gdbreplay.o): New rule.
6060
90aa6a40
JM
60612008-06-06 Joseph Myers <joseph@codesourcery.com>
6062
6063 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6064 message, not gdbserver.
6065
c16158bc 60662008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
6067 Nathan Sidwell <nathan@codesourcery.com>
6068 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
6069
6070 * acinclude.m4: Include ../../config/acx.m4.
6071 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6072 * configure, config.in: Regenerate.
6073 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6074 * server.c (gdbserver_version): Print PKGVERSION.
6075 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6076 (main): Adjust gdbserver_usage calls.
6077 * gdbreplay.c (version, host_name): Add declarations.
6078 (gdbreplay_version, gdbreplay_usage): New.
6079 (main): Accept --version and --help options.
6080
aeb75bf5
DJ
60812008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6082
6083 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6084 (arm_breakpoint_at): Handle Thumb.
6085 (the_low_target): Add comment.
6086
76b233dd
UW
60872008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6088
6089 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6090
08388c79
DE
60912008-05-09 Doug Evans <dje@google.com>
6092
a3c83fae
DE
6093 * server.h (decode_search_memory_packet): Declare.
6094 * remote-utils.c (decode_search_memory_packet): New fn.
6095 * server.c (handle_search_memory_1): New fn.
08388c79
DE
6096 (handle_search_memory): New fn.
6097 (handle_query): Process qSearch:memory packets.
6098
bb9c3d36
UW
60992008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6100
6101 * regcache.c (registers_length): Remove.
6102 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6103 full register packet.
6104 * regcache.h (registers_length): Remove prototype.
6105 * server.h (PBUFSIZ): Define to 16384.
6106
7284e1be
UW
61072008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6108
6109 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6110 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6111 powerpc-64l.o, and powerpc-altivec64l.o.
6112 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6113 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6114 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6115 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6116 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6117 to srv_xmlfiles.
6118
6119 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6120 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6121 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6122 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6123 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6124 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6125 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6126 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6127 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6128 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6129 (clean): Update.
6130
6131 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6132 (init_registers_powerpc_32l): ... this new prototype.
6133 (init_registers_powerpc_32): Remove, replace by ...
6134 (init_registers_powerpc_altivec32l): ... this new prototype.
6135 (init_registers_powerpc_e500): Remove, replace by ...
6136 (init_registers_powerpc_e500l): ... this new prototype.
6137 (init_registers_ppc64): Remove, replace by ...
6138 (init_registers_powerpc_64l): ... this new prototype.
6139 (init_registers_powerpc_64): Remove, replace by ...
6140 (init_registers_powerpc_altivec64l): ... this new prototype.
6141 (ppc_num_regs): Set to 73.
6142 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6143 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6144 (ppc_cannot_store_register): Handle orig_r3 and trap.
6145 (ppc_arch_setup): Update init_registers_... calls.
6146 (ppc_fill_gregset): Handle orig_r3 and trap.
6147
6148 * inferiors.c (clear_inferiors): Reset current_inferior.
6149
fdc59709
PB
61502008-04-23 Paolo Bonzini <bonzini@gnu.org>
6151
889bf7c5
PA
6152 * acinclude.m4: Add override.m4.
6153 * configure: Regenerate.
fdc59709 6154
c9b2f845
UW
61552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6156
6157 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6158 initial call to init_register_ppc64.
6159
550512b8
UW
61602008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6161
43aaf8b6
PA
6162 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6163 single powerpc*-*-linux* case.
550512b8
UW
6164 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6165
b6430ec3
UW
61662008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6167
6168 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 6169 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
6170 from reg_xmlfiles.
6171 * linux-ppc-low.c: Include <elf.h>.
6172 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6173 (ppc_hwcap): New global variable.
6174 (ppc_regmap): Remove __SPE__ #ifdef sections.
6175 (ppc_regmap_e500): New global variable.
6176 (ppc_cannot_store_register): Update __SPE__ special case.
6177 (ppc_get_hwcap): New function.
6178 (ppc_arch_setup): Use it to determine whether inferior supports
6179 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6180 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6181 Do not access registers if target does not support AltiVec.
6182 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6183 Do not access registers if target does not support SPE.
6184 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6185
52fa2412
UW
61862008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6187
6188 * linux-low.c (disabled_regsets, num_regsets): New.
6189 (use_regsets_p): Delete.
6190 (linux_wait_for_process): Clear disabled_regsets.
6191 (regsets_fetch_inferior_registers): Check and set it.
6192 (regsets_store_inferior_registers): Likewise.
6193 (linux_fetch_registers, linux_store_registers): Do not use
6194 use_regsets_p.
6195 (initialize_low): Allocate disabled_regsets.
6196
e28b3332
DJ
61972008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6198
6199 * Makefile.in (LIBOBJS): New.
6200 (OBS): Use LIBOBJS.
6201 (memmem.o): New rule.
6202 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6203 * configure: Regenerated.
6204
4536995d
UW
62052008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6206
6207 * server.c (handle_query): Never return "unsupported" for
6208 qXfer:features:read queries.
6209
221c031f
UW
62102008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6211
6212 * server.c (get_features_xml): Fix inverted condition.
6213 (handle_query): Always support qXfer:feature:read.
6214
ccd213ac
DJ
62152008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6216
6217 * server.c (wrapper_argv): New.
6218 (start_inferior): Handle wrapper_argv. If set, expect an extra
6219 trap.
6220 (gdbserver_usage): Document --wrapper.
6221 (main): Parse --wrapper.
6222
6fe305f7
UW
62232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6224
6225 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6226 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6227 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6228 (ppc_set_pc): Likewise.
6229 (ppc_arch_setup): New function.
6230 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6231 of collect_register.
889bf7c5 6232 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 6233
5b0a002e
UW
62342008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6235
6236 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6237 instead of linux-ppc64-low.o.
6238 * linux-ppc64-low.c: Remove file.
6239 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6240 (linux-ppc64-low.o): Remove rule.
6241
6242 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6243 (init_registers_powerpc_64): Likewise.
6244 (ppc_regmap): Conditionally define depending on __powerpc64__.
6245 (ppc_cannot_store_register): Do not special-case "fpscr" when
6246 compiled on __powerpc64__.
6247 (ppc_collect_ptrace_register): New function.
6248 (ppc_supply_ptrace_register): New function.
6249 (ppc_breakpoint): Change type to "unsigned int".
6250 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6251 (the_low_target): Conditionally provide initializers for the
889bf7c5 6252 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
6253 collect_ptrace_register and supply_ptrace_register members.
6254
9b4b61c8
UW
62552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6256
6257 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6258 * server.c (gdbserver_xmltarget): Define.
6259 (get_features_xml): Use it to replace "target.xml" and arch_string.
6260
6261 * configure.srv: Remove srv_xmltarget. Add XML files that were
6262 mentioned there to srv_xmlfiles instead. Remove conditional tests
6263 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6264 srv_xmlfiles and srv_regobj to include all possible choices.
6265 * configure.ac (srv_xmltarget): Remove.
6266 (srv_xmlfiles): Do not add "target.xml".
6267 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6268 checks for supplementary target information.
6269 * configure: Regenerate.
6270 * Makefile.in (XML_TARGET): Remove.
6271 (target.xml): Remove rule.
6272 (clean): Do not clean up target.xml.
6273 (.PRECIOUS): Do not mention target.xml.
6274
6275 * target.h (struct target_ops): Remove arch_string member.
6276 * linux-low.c (linux_arch_string): Remove.
6277 (linux_target_ops): Remove arch_string initializer.
6278 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6279 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6280 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6281 * spu-low.c (spu_arch_string): Remove.
6282 (spu_target_ops): Remove arch_string initializer.
6283 * win32-low.c (win32_arch_string): Remove.
6284 (win32_target_ops): Remove arch_string initializer.
6285 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6286 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6287 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6288
ee1a7ae4
UW
62892008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6290
6291 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6292 by collect_ptrace_register and supply_ptrace_register hooks.
6293 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6294 instead of checking for the_low_target.left_pad_xfer.
6295 (usr_store_inferior_registers): Use collect_ptrace_register callback
6296 instead of checking for the_low_target.left_pad_xfer.
6297
6298 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6299 (s390_supply_ptrace_register): Likewise.
6300 (s390_fill_gregset): Call s390_collect_ptrace_register.
6301 (the_low_target): Update.
6302
6303 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6304 (ppc_supply_ptrace_register): Likewise.
6305 (the_low_target): Update.
6306
6307 * linux-i386-low.c (the_low_target): Update.
6308 * linux-x86-64-low.c (the_low_target): Update.
6309
d61ddec4
UW
63102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6311
6312 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6313 reg-s390.o and reg-s390x.o.
6314
6315 * linux-low.c (new_inferior): New global variable.
6316 (linux_create_inferior, linux_attach): Set it.
6317 (linux_wait_for_process): Call the_low_target.arch_setup after the
6318 target has stopped for the first time.
6319 (initialize_low): Do not call the_low_target.arch_setup.
6320
6321 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6322 (s390_set_pc): Likewise.
6323 (s390_arch_setup): New function.
6324 (the_low_target): Use s390_arch_setup as arch_setup routine.
6325
6326 * regcache.c (realloc_register_cache): New function.
6327 (set_register_cache): Call it for each existing regcache.
6328
d05b4ac3
UW
63292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6330
6331 * server.h (init_registers): Remove prototype.
6332
6333 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6334 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6335 instead of init_registers ().
6336 * linux-arm-low.c (init_registers_arm): Add prototype.
6337 (init_registers_arm_with_iwmmxt): Likewise.
6338 (the_low_target): Add initializer for arch_setup field.
6339 * linux-cris-low.c (init_registers_cris): Add prototype.
6340 (the_low_target): Add initializer for arch_setup field.
6341 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6342 (the_low_target): Add initializer for arch_setup field.
6343 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6344 (the_low_target): Add initializer for arch_setup field.
6345 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6346 (the_low_target): Add initializer for arch_setup field.
6347 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6348 (the_low_target): Add initializer for arch_setup field.
6349 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6350 (the_low_target): Add initializer for arch_setup field.
6351 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6352 (init_registers_mips64_linux): Likewise.
6353 (the_low_target): Add initializer for arch_setup field.
6354 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6355 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6356 (the_low_target): Add initializer for arch_setup field.
6357 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6358 (init_registers_powerpc_64): Likewise.
6359 (the_low_target): Add initializer for arch_setup field.
6360 * linux-s390-low.c (init_registers_s390): Add prototype.
6361 (init_registers_s390x): Likewise.
6362 (the_low_target): Add initializer for arch_setup field.
6363 * linux-sh-low.c (init_registers_sh): Add prototype.
6364 (the_low_target): Add initializer for arch_setup field.
6365 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6366 (the_low_target): Add initializer for arch_setup field.
6367 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6368 (the_low_target): Add initializer for arch_setup field.
6369
6370 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6371 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6372 instead of init_registers ().
6373 * win32-arm-low.c (init_registers_arm): Add prototype.
6374 (the_low_target): Add initializer for arch_setup field.
6375 * win32-i386-low.c (init_registers_i386): Add prototype.
6376 (the_low_target): Add initializer for arch_setup field.
6377
6378 * spu-low.c (init_registers_spu): Add prototype.
6379 (initialize_low): Call initialie_registers_spu () instead of
6380 initialize_registers ().
6381
fd96d250
PA
63822008-02-19 Pedro Alves <pedro@codesourcery.com>
6383
6384 * server.c (handle_v_requests): When handling the vRun and vAttach
6385 packets, if already debugging a process, don't kill it. Return an
6386 error instead.
6387
d41b6bb4
DJ
63882008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6389
6390 * server.c (handle_query): Correct length check.
6391
5ac588cf
PA
63922008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6393
6394 * win32-low.c (do_initial_child_stuff): Add process handle
6395 parameter. Set current_process_handle and current_process_id from the
6396 parameters. Clear globals.
6397 (win32_create_inferior): Don't set current_process_handle and
6398 current_process_id here. Instead pass them on the call to
6399 do_initial_child_stuff.
6400 (win32_attach): Likewise.
6401 (win32_clear_inferiors): New.
6402 (win32_kill): Don't close the current process handle or the
6403 current thread handle here. Instead call win32_clear_inferiors.
6404 (win32_detach): Don't open a new handle to the process. Call
6405 win32_clear_inferiors.
6406 (win32_join): Don't rely on current_process_handle; open a new
6407 handle using the process id.
6408 (win32_wait): Call win32_clear_inferiors when the inferior process
6409 has exited.
6410
ecd7ecbc
DJ
64112008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6412
6413 * server.c (monitor_show_help): Add "exit".
6414
1525d545
MG
64152008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6416
ecd7ecbc 6417 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
6418 (clean): Add reg-xtensa.c.
6419 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
6420 * configure.srv (xtensa*-*-linux*) New target.
6421 * linux-xtensa-low.c: New.
6422 * xtensa-xtregs.c: New.
1525d545 6423
59a016f0
PA
64242008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6425
6426 * hostio.c: Don't include errno.h.
6427 (errno_to_fileio_errno): Move to hostio-errno.
6428 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6429 error number outputting to the target->hostio_last_error callback.
6430 (hostio_packet_error): Use FILEIO_EINVAL directly.
6431 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6432 calls to hostio_error.
6433 * hostio-errno.c: New.
6434 * server.h (hostio_last_error_from_errno): Declare.
6435 * target.h (target_ops): Add hostio_last_error member.
6436 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6437 as hostio_last_error handler.
889bf7c5 6438 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
6439 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6440 (wince_hostio_last_error): New functions.
6441 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6442 as hostio_last_error handler.
6443 (win32_target_ops) [!_WIN32_WCE]: Register
6444 hostio_last_error_from_errno as hostio_last_error handler.
6445 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6446 (hostio-errno.o): New rule.
6447 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6448 * configure.srv (srv_hostio_err_objs): New variable. Default to
6449 hostio-errno.o.
6450 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6451 * configure: Regenerate.
6452
2d717e4f
DJ
64532008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6454
6455 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6456 (linux_kill, linux_detach): Clean up the process list.
6457 * remote-utils.c (remote_open): Improve port number parsing.
6458 (putpkt_binary, input_interrupt): Only send interrupts if the target
6459 is running.
6460 * server.c (extended_protocol): Make static.
6461 (attached): Define earlier.
6462 (exit_requested, response_needed, program_argv): New variables.
6463 (target_running): New.
6464 (start_inferior): Clear attached here.
6465 (attach_inferior): Set attached here.
6466 (require_running): Define.
6467 (handle_query): Use require_running and target_running. Implement
6468 "monitor exit".
6469 (handle_v_attach, handle_v_run): New.
6470 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6471 (gdbserver_usage): Update.
6472 (main): Redo argument parsing. Handle --debug and --multi. Handle
6473 --attach along with other options or after the port. Save
6474 program_argv. Support no initial program. Resynchronize
6475 communication with GDB after an error. Handle "monitor exit".
6476 Use require_running and target_running. Always allow the extended
6477 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6478 restart in extended mode.
6479 * README: Refer to the GDB manual. Update --attach usage.
6480
7407e2de
AS
64812007-12-20 Andreas Schwab <schwab@suse.de>
6482
6483 * linux-low.c (STACK_SIZE): Define.
6484 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6485 (linux_test_for_tracefork): Likewise.
6486
b65d95c5
DJ
64872007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6488
6489 * linux-low.c (linux_wait_for_event): Update messages. Do not
6490 reinsert auto-delete breakpoints.
6491 * mem-break.c (struct breakpoint): Change return type of handler to
6492 int.
6493 (set_breakpoint_at): Update handler type.
6494 (reinsert_breakpoint_handler): Return 1 instead of calling
6495 delete_breakpoint.
6496 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6497 setting a new one.
6498 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6499 * mem-break.h (set_breakpoint_at): Update handler type.
6500 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6501 * win32-low.c (auto_delete_breakpoint): New.
6502 (get_child_debug_event): Use it.
6503
4e799345
DJ
65042007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6505
6506 * configure.ac: Check for pread and pwrite.
6507 * hostio.c (handle_pread): Fall back to lseek and read.
6508 (handle_pwrite): Fall back to lseek and write.
6509 * config.in, configure: Regenerated.
6510
27524b67
DJ
65112007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6512
6513 * server.c (myresume): Add own_buf argument.
6514 (main): Update calls.
6515
a20d5e98
DJ
65162007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6517
6518 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6519 * remote-utils.c (remote_open): Do not call disable_async_io.
6520 (block_async_io): Delete.
6521 (unblock_async_io): Make static.
6522 (initialize_async_io): New.
6523 * server.c (handle_v_cont): Handle async I/O here.
6524 (myresume): Likewise. Move other common resume tasks here...
6525 (main): ... from here. Call initialize_async_io. Disable async
6526 I/O before the main loop.
6527 * server.h (initialize_async_io): Declare.
6528 (block_async_io, unblock_async_io): Delete prototypes.
6529 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6530
b79d787e
DJ
65312007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6532
6533 * remote-utils.c (readchar): Allow binary data in received messages.
6534
d97903b2
PA
65352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6536
6537 * win32-low.c (attaching): New global.
6538 (win32_create_inferior): Clear the `attaching' global.
6539 (win32_attach): Set the `attaching' global.
6540 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6541 attaching. Only set a breakpoint at the entry point if not
6542 attaching.
6543
311de423
PA
65442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6545
6546 * server.c (main): Don't report dll events on the initial
6547 connection on attaches.
6548
6c2d16d2
PA
65492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6550
6551 * server.c (main): Relax numerical bases supported for the pid of
6552 the --attach command line argument.
6553
5ca906e6
PA
65542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6555
6556 * win32-low.c (win32_attach): Call OpenProcess before
6557 DebugActiveProcess, not after. Add last error output to error
6558 call.
6559
9c6c8194
PA
65602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6561
6562 * win32-low.c (win32_get_thread_context)
6563 (win32_set_thread_context): New functions.
6564 (thread_rec): Use win32_get_thread_context.
6565 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6566 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6567 field.
6568
4d5d1aaa
PA
65692007-12-03 Leo Zayas
6570 Pedro Alves <pedro_alves@portugalmail.pt>
6571
6572 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6573 global variables.
6574 (child_add_thread): Minor cleanup.
6575 (child_continue): Resume artificially suspended threads before
6576 calling ContinueDebugEvent.
6577 (suspend_one_thread): New.
6578 (fake_breakpoint_event): New.
6579 (get_child_debug_event): Change return type to int. Check here if
6580 gdb sent an interrupt request. If a soft interrupt was requested,
6581 fake a breakpoint event. Return 0 if there is no event to handle,
6582 and 1 otherwise.
6583 (win32_wait): Don't check here if gdb sent an interrupt request.
6584 Ensure there is a valid event to handle.
6585 (win32_request_interrupt): Add soft interruption method as last
6586 resort.
6587
c436e841
PA
65882007-12-03 Leo Zayas
6589 Pedro Alves <pedro_alves@portugalmail.pt>
6590
6591 * win32-low.h (win32_thread_info): Add descriptions to the
6592 structure members. Replace `suspend_count' counter by a
6593 `suspended' flag.
6594 * win32-low.c (thread_rec): Update condition of when to get the
6595 context from the inferior. Rely on ContextFlags being set if it
6596 has already been retrieved. Only suspend the inferior thread if
6597 we haven't already. Warn if that fails.
6598 (continue_one_thread): s/suspend_count/suspended/. Only call
6599 ResumeThread once. Warn if that fails.
6600
e7b5fa67
PA
66012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6602
6603 * win32-low.c (win32_wait): Don't read from the inferior when it
6604 has already exited.
6605
a385171d
PA
66062007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6607
6608 * Makefile.in (win32_low_h): New variable.
6609 (win32-low.o): Add dependency on $(win32_low_h).
6610 (win32-arm-low.o, win32-i386-low.o): New rules.
6611
f80c84b3
DJ
66122007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6613
6614 * hostio.c: Correct copyright year.
6615
a6b151f1
DJ
66162007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6617
6618 * Makefile.in (OBS): Add hostio.o.
6619 (hostio.o): New rule.
6620 * server.h (handle_vFile): Declare.
6621 * hostio.c: New file.
6622 * server.c (handle_v_requests): Take packet_len and new_packet_len
6623 for binary packets. Call handle_vFile.
6624 (main): Update call to handle_v_requests.
6625
f9387fc3
DJ
66262007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6627
6628 * linux-low.c: Include <sched.h>.
6629
51c2684e
DJ
66302007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6631
6632 * linux-low.c (linux_tracefork_grandchild): New.
6633 (linux_tracefork_child): Use clone.
6634 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6635
75f83163
JB
66362007-10-31 Joel Brobecker <brobecker@adacore.com>
6637
6638 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6639
da5898ce
DJ
66402007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6641
6642 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6643
24a09b5f
DJ
66442007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6645
6646 * inferiors.c (change_inferior_id): Delete.
6647 (add_pid_to_list, pull_pid_from_list): New.
6648 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6649 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6650 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6651 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6652 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6653 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6654 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6655 (using_threads): Always set to 1.
6656 (handle_extended_wait): New.
6657 (add_process): Do not set TID.
6658 (linux_create_inferior): Set must_set_ptrace_flags.
6659 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6660 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6661 (linux_thread_alive): Rename TID argument to LWPID.
6662 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6663 (linux_wait_for_event): Do not use TID or check using_threads. Update
6664 call to dead_thread_notify. Call handle_extended_wait.
6665 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6666 (send_sigstop): Delete sigstop_sent.
6667 (wait_for_sigstop): Avoid TID.
6668 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6669 (linux_test_for_tracefork): New.
6670 (linux_lookup_signals): Use thread_db_active and
6671 linux_supports_tracefork_flag.
6672 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6673 * linux-low.h (get_process_thread): Avoid TID.
6674 (struct process_ifo): Move thread_known and tid to the end. Remove
6675 sigstop_sent.
6676 (linux_attach_lwp, thread_db_init): Update prototypes.
6677 * server.h (change_inferior_id): Delete prototype.
6678 (add_pid_to_list, pull_pid_from_list): New prototypes.
6679 * thread-db.c (thread_db_use_events): New.
6680 (find_first_thread): Rename to...
6681 (find_one_thread): ...this. Update callers and messages. Do not
6682 call fatal. Check thread_db_use_events. Do not call
6683 change_inferior_id or new_thread_notify.
6684 (maybe_attach_thread): Update. Do not call new_thread_notify.
6685 (thread_db_init): Set thread_db_use_events. Check use_events.
6686 * utils.c (fatal, warning): Correct message prefix.
6687
30ed0a8f
DJ
66882007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6689
6690 * Makefile.in (clean): Remove new files.
6691 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6692 (powerpc-64.o, powerpc-64.c): New rules.
6693 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6694 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6695 with SPE.
6696 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6697 SPE targets.
6698 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6699 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6700 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6701 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6702 (target_regsets): Add AltiVec and SPE register sets.
6703 * configure.ac: Check for AltiVec and SPE.
6704 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6705 (ppc_fill_vrregset, ppc_store_vrregset): New.
6706 (target_regsets): Add AltiVec register set.
6707 * configure: Regenerated.
6708
fd462a61
DJ
67092007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6710
6711 * linux-low.c (O_LARGEFILE): Define.
6712 (linux_read_memory): Use /proc/PID/mem.
6713 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6714 * configure, config.in: Regenerated.
6715
69f223ed
DJ
67162007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6717
6718 * linux-low.c (linux_wait_for_event): Do not pass signals while
6719 single-stepping.
6720
aec18585
PA
67212007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6722
6723 * win32-low.c (create_process): New.
6724 (win32_create_inferior): Use create_process instead of
6725 CreateProcess. If create_process failed retry appending an ".exe"
6726 suffix. Store the GetLastError result immediatelly after
6727 create_process calls and use it on the call to error.
6728
34d86ddd
PA
67292007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6730
6731 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6732
5a0e3bd0
JB
67332007-08-23 Joel Brobecker <brobecker@adacore.com>
6734
6735 * configure.ac: Switch license to GPLv3.
6736
f88c79e6
MS
67372007-08-01 Michael Snyder <msnyder@access-company.com>
6738
6739 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6740
6b3d9b83
PA
67412007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6742
6743 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6744 typedef.
6745 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6746 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6747 CloseToolhelp32Snapshot.
6748 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6749 CloseToolhelp32Snapshot.
6750
c588c53c
MS
67512007-07-27 Michael Snyder <michael.snyder@access-company.com>
6752
6753 * server.c (main): Check for inferior exit before main loop.
6754
aa0403d9
PA
67552007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6756
6757 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6758 instead of on tmp_desc.
6759
255e7678
DJ
67602007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6761 Daniel Jacobowitz <dan@codesourcery.com>
6762
6763 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6764 (add_thread): Minor cleanups.
6765 (clear_inferiors): Move lower in the file. Clear the DLL
6766 list.
6767 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6768 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6769 (xml_escape_text): New.
6770 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6771 for qSupported.
6772 (handle_v_cont): Report errors.
6773 (gdbserver_version): Update.
6774 (main): Correct size of own_buf. Do not report initial DLL events.
6775 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6776 (unloaded_dll, xml_escape_text): New.
6777 * win32-low.c (enum target_waitkind): Update comments.
6778 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6779 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6780 (win32_EnumProcessModules, win32_GetModuleInformation)
6781 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6782 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6783 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6784 (win32_Module32First, win32_Module32Next, load_toolhelp)
6785 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6786 (get_child_debug_event): Handle DLL events.
6787 (win32_wait): Likewise.
6788
0d37add9
DJ
67892007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6790
6791 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6792 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6793
45e2715e
PA
67942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6795
6796 * win32-low.c (handle_output_debug_string): Ignore event if not
6797 waiting.
6798
c5674cf1
PA
67992007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6800
6801 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6802
2bbe3cc1
DJ
68032007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6804
6805 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6806
ae13219e
DJ
68072007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6808
6809 * inferiors.c (change_inferior_id): Add comment.
6810 * linux-low.c (check_removed_breakpoint): Add an early
6811 prototype. Improve debug output.
6812 (linux_attach): Doc update.
6813 (linux_detach_one_process, linux_detach): Clean up before releasing
6814 each process.
6815 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6816 * linux-low.h (struct process_info): Doc improvement.
6817 * mem-break.c (delete_all_breakpoints): New.
6818 * mem-break.h (delete_all_breakpoints): New prototype.
6819 * thread-db.c (find_first_thread): New.
6820 (thread_db_create_event): Call it instead of
6821 thread_db_find_new_threads. Clean up unused variables.
6822 (maybe_attach_thread): Remove first thread handling.
6823 (thread_db_find_new_threads): Use find_first_thread.
6824 (thread_db_get_tls_address): Likewise.
6825
4105de34
DJ
68262007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6827
6828 * thread-db.c (thread_db_find_new_threads): Add prototype.
6829 (thread_db_create_event): Check for the main thread before adding
6830 a new thread.
6831 (maybe_attach_thread): Only enable event reporting if TID == 0.
6832 (thread_db_get_tls_address): Check for new threads.
6833
2b876972
DJ
68342007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6835
6836 * linux-low.c (linux_create_inferior): Try execv before execvp.
6837 * spu-low.c (spu_create_inferior): Likewise.
6838
7a245884
DJ
68392007-06-13 Mike Frysinger <vapier@gentoo.org>
6840
6841 * linux-low.c (linux_create_inferior): Change execv to execvp.
6842 * spu-low.c (spu_create_inferior): Likewies.
6843
117ce543
DJ
68442007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6845
6846 * Makefile.in (clean): Clean new files instead of deleted ones.
6847 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6848 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6849 rules.
6850 * configure.srv: Specify XML files and new regformats for MIPS and
6851 MIPS64 GNU/Linux.
6852 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6853 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6854 an entry for the restart register.
6855 (mips_cannot_fetch_register, mips_cannot_store_register)
6856 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6857 register names to match the XML descriptions.
6858 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6859 restart register instead of $0.
6860
0e7f50da
UW
68612007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6862 Markus Deuling <deuling@de.ibm.com>
6863
6864 * remote-utils.c (decode_xfer_write): New function.
6865 * server.h (decode_xfer_write): Add prototype.
6866 * server.c (handle_query): Add PACKET_LEN argument. Support
6867 qXfer:spu:read and qXfer:spu:write packets.
6868 (main): Pass packet_len to handle_query.
6869 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6870 * target.h (target_ops): Add qxfer_spu.
6871
374c1d38
UW
68722007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6873
6874 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6875 accessing non-seekable spufs files.
6876
bb63802a
UW
68772007-05-16 Markus Deuling <deuling@de.ibm.com>
6878
889bf7c5 6879 * server.c (handle_query): Add reply for qC packet.
bb63802a 6880
7390519e
PA
68812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6882 Leo Zayas <lerele@champenstudios@com>
6883
6884 * server.h (check_remote_input_interrupt_request): New function.
6885 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6886 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6887 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6888 (check_remote_input_interrupt_request): New function.
6889 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 6890 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
6891 winapi_GenerateConsoleCtrlEvent): New typedefs.
6892 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6893 to 250 ms.
6894 (win32_wait): Check for remote interrupt request
6895 with check_remote_input_interrupt_request.
6896 (win32_request_interrupt): New function.
6897 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6898
34b34921
PA
68992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6900
6901 * win32-low.c (debug_registers_changed,
6902 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6903 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6904 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6905 (thread_rec): Get context using the low target.
6906 (child_add_thread): Call thread_added on the low target,
6907 which does the same thing.
6908 (regptr): Delete.
6909 (do_initial_child_stuff): Remove debug registers references.
6910 Set context using the low target. Resume threads after
6911 setting the contexts.
6912 (child_continue): Remove dead variable. Remove debug
6913 registers references.
6914 (child_fetch_inferior_registers): Go through the low target.
6915 (do_child_store_inferior_registers): Remove.
6916 (child_store_inferior_registers): Go through the low target.
6917 (win32_resume): Remove debug registers references.
6918 Set context using the low target.
6919 (handle_exception): Change return type to void. Don't record
6920 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6921 first chance exception.
889bf7c5 6922 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
6923 goto loop. Always return after waiting for debug event.
6924 (win32_wait): Convert to switch statement. Handle spurious
6925 events.
6926
6927 * win32-i386-low.c (debug_registers_changed,
6928 debug_registers_used): New.
6929 (initial_stuff): Rename to ...
6930 (i386_initial_stuff): ... this. Clear debug registers
6931 state variables.
6932 (store_debug_registers): Delete.
6933 (i386_get_thread_context): New.
6934 (load_debug_registers): Delete.
6935 (i386_set_thread_context): New.
6936 (i386_thread_added): New.
6937 (single_step): Rename to ...
6938 (i386_single_step): ... this.
6939 (do_fetch_inferior_registers): Rename to ...
6940 (i386_fetch_inferior_register): ... this.
6941 (i386_store_inferior_register): New.
6942 (the_low_target): Adapt to new interface.
6943
6944 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6945 (arm_get_thread_context): New.
6946 (arm_set_thread_context): New.
6947 (regptr): New.
6948 (do_fetch_inferior_registers): Rename to ...
6949 (arm_fetch_inferior_register): ... this.
6950 (arm_store_inferior_register): New.
6951 (arm_wince_breakpoint): Reimplement as unsigned long.
6952 (arm_wince_breakpoint_len): Define.
6953 (the_low_target): Adapt to new interface.
6954
6955 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6956 load_debug_registers. Add get_thread_context, set_thread_context,
6957 thread_added and store_inferior_register. Rename
6958 fetch_inferior_registers to fetch_inferior_register.
6959 (regptr): Remove declaration.
6960
dd6953e1
PA
69612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6962
6963 * linux-low.c (linux_detach): Change return type to int. Return 0.
6964 * spu-low.c (spu_detach): Likewise.
6965
444d6139
PA
69662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6967
6968 * target.h (target_ops): Change return type of detach to int.
6969 Add join.
6970 (join_inferior): New.
6971 * server.c (main): Don't skip detach support on mingw32.
6972 If the inferior doesn't support detaching return error.
6973 Call join_inferior instead of using waitpid.
6974 * linux-low.c (linux_join): New.
6975 (linux_target_op): Add linux_join.
6976 * spu-low.c (spu_join): New.
6977 (spu_target_ops): Add spu_join.
6978 * win32-low.c (win32_detach): Adapt to new interface.
6979 Reopen current_process_handle before detaching. Issue a child
6980 resume before detaching.
6981 (win32_join): New.
6982 (win32_target_op): Add win32_join.
6983
1d5315fe
PA
69842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6985
6986 * win32-low.c (win32-attach): Fix return value.
6987 * target.h (target_ops): Describe ATTACH return values.
6988
bf914831
PA
69892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6990
6991 * win32-low.c (GETPROCADDRESS): Define.
6992 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6993 (winapi_DebugSetProcessKillOnExit): Likewise.
6994 (win32_create_inferior): Force usage of ansi CreateProcessA.
6995 (win32_attach): Use GETPROCADDRESS.
6996 (win32_detach): Likewise.
6997
f72f3e60
PA
69982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6999
7000 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7001
ed50f18f
PA
70022007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7003
7004 * win32-low.c: Commit leftover changes from 2007-03-29.
7005
0c2ead7e
DJ
70062007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7007
7008 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7009 fields short instead of int. Add explicit padding.
7010 (i387_cache_to_fsave): Remove unnecessary casts.
7011 (i387_fsave_to_cache): Doc fix.
7012 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7013
73725ff3
DJ
70142007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7015
7016 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7017 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7018
d99f33d8
PA
70192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7020
7021 * configure.srv (arm*-*-mingw32ce*): Move near the other
7022 arm targets.
7023
68070c10
PA
70242007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7025
2482afc6 7026 * configure.ac: Add errno checking.
68070c10
PA
7027 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7028 sys/file.h and malloc.h.
7029 (AC_CHECK_DECLS): Add perror.
7030 (srv_mingwce): Handle.
2482afc6 7031 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
7032 win32-i386-low.o to srv_tgtobj.
7033 (i[34567]86-*-mingw*): Likewise.
7034 (arm*-*-mingw32ce*): Add case.
7035 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7036 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7037 [__MINGW32CE__] (strerror): New function.
7038 [__MINGW32CE__] (errno): Define to GetLastError.
7039 [__MINGW32CE__] (COUNTOF): New macro.
7040 (remote_open): Remove extra close call.
7041 * mem-break.c (delete_breakpoint_at): New function.
7042 * mem-break.h (delete_breakpoint_at): Declare.
7043 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7044 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7045 [USE_WIN32API] (read, write): Add char* casts.
7046 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7047 * server.h: Include wincecompat.h on Windows CE.
7048 [HAVE_ERRNO_H]: Check.
7049 (perror): Declare if not declared.
7050 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7051 (perror_with_name): Remove errno declaration.
7052 * wincecompat.h: New.
7053 * wincecompat.c: New.
7054 * win32-low.h: New.
7055 * win32-arm-low.c: New.
7056 * win32-i386-low.c: New.
7057 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7058 (OUTMSG2): Make it safe.
7059 (_T): New macro.
7060 (COUNTOF): New macro.
7061 (NUM_REGS): Get it from the low target.
7062 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7063 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7064 (thread_rec): Let low target handle debug registers.
7065 (child_add_thread): Likewise.
7066 (child_init_thread_list): Likewise.
7067 (continue_one_thread): Likewise.
7068 (regptr): New.
7069 (do_child_fetch_inferior_registers): Move to ...
7070 * win32-i386-low.c: ... here, and rename to ...
7071 (do_fetch_inferior_registers): ... this.
889bf7c5 7072 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
7073 Go through the low target.
7074 (do_child_store_inferior_registers): Use regptr.
7075 (strwinerror): New function.
7076 (win32_create_inferior): Handle Windows CE.
7077 Use strwinerror instead of strerror on Windows error
7078 codes. Add program to the error output.
7079 Don't close the main thread handle on Windows CE.
7080 (win32_attach): Use coredll.dll on Windows CE.
7081 (win32_kill): Close current process and current
7082 thread handles.
7083 (win32_detach): Use coredll.dll on Windows CE.
7084 (win32_resume): Let low target handle debug registers, and
7085 step request.
7086 (handle_exception): Add/Remove initial breakpoint. Avoid
7087 non-existant WSTOPSIG on Windows CE.
7088 (win32_read_inferior_memory): Cast to remove warning.
7089 (win32_arch_string): Go through the low target.
7090 (initialize_low): Call set_breakpoint_data with the low
7091 target's breakpoint.
7092 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7093 FOP_REGNUM, mappings): Move to ...
7094 * win32-i386-low.c: ... here.
7095 * win32-low.c (win32_thread_info): Move to ...
7096 * win32-low.h: ... here.
7097 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7098 win32-arm-low.c and wincecompat.c.
7099 (all:): Add $EXEEXT.
7100 (install-only:): Likewise.
7101 (gdbserver:): Likewise.
7102 (gdbreplay:): Likewise.
7103 * config.in: Regenerate.
7104 * configure: Regenerate.
7105
41093d81
PA
71062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7107
7108 * win32-low.c: Rename typedef thread_info to
7109 win32_thread_info throughout.
7110
544afa54
PA
71112007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7112
7113 * win32-i386-low.c: Rename to ...
7114 * win32-low.c: ... this.
7115 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7116 * Makefile.in: Likewise.
7117
bce7165d
PA
71182007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7119
7120 * remote-utils.c (monitor_output): Constify msg parameter.
7121 * server.h (monitor_output): Likewise.
7122 * win32-i386-low.c (handle_output_debug_string): New.
7123 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7124 handle_output_debug_string.
7125 (get_child_debug_event): Likewise.
7126
506c7aa0
DJ
71272007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7128
7129 * server.c (main): Correct strtoul check.
7130
42c81e2a
DJ
71312007-03-27 Jon Ringle <jon@ringle.org>
7132
7133 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7134
9453113a
DJ
71352007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7136
7137 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7138
64a69107
DJ
71392007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7140
7141 * terminal.h: Check HAVE_SGTTY_H.
7142
71432007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
7144
7145 * remote-utils.c (remote_open): Print out the assigned port number.
7146
c74d0ad8
DJ
71472007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7148
7149 * remote-utils.c (monitor_output): New function.
7150 * server.c (debug_threads): Define here.
7151 (monitor_show_help): New function.
7152 (handle_query): Handle qRcmd.
7153 (main): Do not handle 'd' packet.
7154 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7155 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7156 of debug_threads.
7157
de7c3b4a
PA
71582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7159
7160 * Makefile.in (EXEEXT): New.
7161 (clean): Use $(EXEEXT).
7162
ef57601b
PA
71632007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7164
7165 * target.h (target_ops): Rename send_signal to request_interrupt,
7166 and remove enum target_signal parameter.
7167 * linux-low.c (linux_request_interrupt): Rename from
7168 linux_send_signal, and always send SIGINT.
7169 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7170 and always send SIGINT.
7171 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7172 of send_signal.
7173 (input_interrupt): Likewise.
7174
820f2bda
PA
71752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7176
7177 * server.c (get_features_xml): Check if target implemented
7178 arch_string.
7179 * win32-i386-low.c (win32_arch_string): New.
7180 (win32_target_ops): Add win32_arch_string as arch_string member.
7181
ab39bf24
UW
71822007-02-22 Markus Deuling <deuling@de.ibm.com>
7183
7184 * spu-low.c (spu_arch_string): New.
7185 (spu_target_ops): Add spu_arch_string.
7186
61ff6e04
DJ
71872007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7188
7189 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7190 * configure.ac: Do not check for terminal.h.
7191 * configure, config.in: Regenerated.
7192
fb1e4ffc
DJ
71932007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7194
7195 * Makefile.in (OBS): Add $(XML_BUILTIN).
7196 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7197 (clean): Update.
7198 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7199 (arm-with-iwmmxt.c): New.
7200 * config.in, configure: Regenerate.
7201 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7202 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7203 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7204 (arm*-*-linux*): Add iWMMXt and regset support.
7205 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7206 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7207 (arm_store_wmmxregset, target_regsets): New.
7208 * server.c (get_features_xml): Take annex argument. Check builtin
7209 XML documents.
7210 (handle_query): Handle multiple annexes.
7211
0f48aa01
DJ
72122007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7213
7214 * remote-utils.c [USE_WIN32API] (read, write): Define.
7215 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7216 write.
7217
23181151
DJ
72182007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7219
7220 * linux-i386-low.c (the_low_target): Set arch_string.
7221 * linux-x86-64-low.c (the_low_target): Likewise.
7222 * linux-low.c (linux_arch_string): New.
7223 (linux_target_ops): Add it.
7224 * linux-low.h (struct linux_target_ops): Add arch_string.
7225 * server.c (write_qxfer_response): Use const void * for DATA.
7226 (get_features_xml): New.
7227 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7228 * target.h (struct target_ops): Add arch_string method.
7229
9d606399
DJ
72302007-01-03 Denis Pilat <denis.pilat@st.com>
7231 Daniel Jacobowitz <dan@codesourcery.com>
7232
7233 * linux-low.c (linux_kill): Handle being called with no threads.
7234 * win32-i386-low.c (win32_kill): Likewise.
7235 (get_child_debug_event): Clear current_process_handle.
7236
72372006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
7238 Daniel Jacobowitz <dan@codesourcery.com>
7239
7240 * remote-utils.c (remote_open): Check the type of specified
7241 serial port devices before opening them.
7242 * server.c (main): Kill the inferior if an error occurs during
7243 the first remote_open.
7244
a5e13d24
DJ
72452006-12-05 Markus Deuling <deuling@de.ibm.com>
7246
7247 * README: Update supported targets.
7248
186947f7
DJ
72492006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7250
7251 * Makefile.in (clean): Remove reg-mips64.c.
7252 (reg-mips64.c, reg-mips64.o): New rules.
7253 * configure.srv: Handle mips64. Include regset support for mips.
7254 * linux-mips-low.c (union mips_register): New.
7255 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7256 (mips_breakpoint, mips_breakpoint_at): Use int.
7257 (mips_collect_register, mips_supply_register)
7258 (mips_collect_register_32bit, mips_supply_register_32bit)
7259 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7260 (mips_store_fpregset, target_regsets): New.
7261 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7262
a13e2c95
UW
72632006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7264
7265 * configure.srv: Add target "spu*-*-*".
7266 * Makefile.in (clean): Remove reg-spu.c.
7267 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7268 * spu-low.c: New file.
7269
cb7283db
DJ
72702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7271
7272 * configure.ac: Correct td_thr_tls_get_addr test.
7273 * configure: Regenerated.
7274
89be2091
DJ
72752006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7276
7277 * linux-low.c (linux_wait_for_event): Reformat. Use the
7278 pass_signals array.
7279 * remote-utils.c (decode_address_to_semicolon): New.
7280 * server.c (pass_signals, handle_general_set): New.
7281 (handle_query): Mention QPassSignals for qSupported.
7282 (main): Call handle_general_set.
7283 * server.h (pass_signals, decode_address_to_semicolon): New.
7284
000ef4f0
DJ
72852006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7286
7287 * server.c (handle_query): Correct error handling for read_auxv.
7288
b7149293
UW
72892005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7290
7291 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7292 and srv_linux_thread_db to yes.
7293 * linux-s390-low.c (s390_fill_gregset): New function.
7294 (target_regsets): Define data structure.
7295
dae5f5cf
DJ
72962006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7297
7298 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7299 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7300 * config.in, configure: Regenerated.
7301 * inferiors.c (gdb_id_to_thread): New function.
7302 (gdb_id_to_thread_id): Use it.
7303 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7304 * linux-low.h (struct process_info): Add th member.
7305 (thread_db_get_tls_address): New prototype.
7306 * remote-utils.c (decode_address): Make non-static.
7307 * server.c (handle_query): Handle qGetTLSAddr.
7308 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7309 * target.h (struct target_ops): Add get_tls_address.
7310 * thread-db.c (maybe_attach_thread): Save the thread handle.
7311 (thread_db_get_tls_address): New.
7312
32ca6d61
DJ
73132006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7314
7315 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7316 (linux_resume_one_process): Take a siginfo_t *. Update all
7317 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7318 (struct pending_signals): Add a siginfo_t.
7319 (linux_wait_for_process): Always set last_status.
7320 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7321 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7322 * linux-low.h (struct process_info): Add last_status.
7323
5ffff7c1
DJ
73242006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7325
7326 * remote-utils.c (try_rle): New function.
7327 (putpkt_binary): Use it.
7328
8695c747
DJ
73292006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7330
7331 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7332 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7333 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7334 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7335 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7336 point registers.
7337
290fadea
RS
73382006-08-08 Richard Sandiford <richard@codesourcery.com>
7339
7340 * server.c (terminal_fd): New variable.
7341 (old_foreground_pgrp): Likewise.
7342 (restore_old_foreground_pgrp): New function.
7343 (start_inferior): Record the terminal file descriptor in terminal_fd
7344 and its original foreground group in old_foreground_pgrp. Register
7345 restore_old_foreground_pgrp with atexit().
7346
9f2e1e63
DJ
73472006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7348
7349 * server.c (handle_query): Correct qPart to qXfer.
7350
b80864fb
DJ
73512006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7352
7353 * configure.ac: Check for more headers which are missing on
7354 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7355 * configure.srv: Add Cygwin and mingw32.
7356 * remote-utils.c: Don't include headers unconditionally which
7357 are missing on mingw32. Include <winsock.h> for mingw32.
7358 (remote_open): Adjust for mingw32 support. Flush
7359 standard error after writing to it.
7360 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7361 (unblock_async_io, enable_async_io, disable_async_io)
7362 (readchar, getpkt): Update for Winsock support.
7363 (prepare_resume_reply): Expect a protocol signal number.
7364 * server.c: Disable <sys/wait.h> on mingw32.
7365 (start_inferior): Adjust for mingw32 support. Flush
7366 standard error after writing to it.
7367 (attach_inferior): Likewise. Use protocol signal
7368 numbers.
7369 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7370 and names.
7371 * win32-i386-low.c: New file.
7372 * Makefile.in (XM_CLIBS): Set.
7373 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7374 (win32-i386-low.o): New dependency rule.
7375 * linux-low.c (linux_wait): Use target signal numbers.
7376 * target.h (struct target_ops): Doc fix.
7377 * server.h (target_signal_to_name): New prototype.
7378 * gdbreplay.c: Don't include headers unconditionally which
7379 are missing on mingw32. Include <winsock.h> for mingw32.
7380 (remote_close, remote_open): Adjust for Winsock support.
7381 * configure, config.in: Regenerated.
7382
0876f84a
DJ
73832006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7384
7385 * server.c (decode_xfer_read, write_qxfer_response): New.
7386 (handle_query): Take a packet length argument. Handle
7387 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7388 the qSupported response.
7389 (main): Update call to handle_query.
7390
01f9e8fa
DJ
73912006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7392
7393 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7394 (putpkt_binary): Renamed from putpkt and adjusted for binary
7395 data.
7396 (putpkt): New wrapper for putpkt_binary.
7397 (readchar): Don't mask off the high bit.
7398 (decode_X_packet): New function.
7399 * server.c (main): Call putpkt_binary if a handler sets the packet
7400 length. Save the length of the incoming packet. Handle 'X'.
7401 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7402
be2a5f71
DJ
74032006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7404
7405 * server.c (handle_query): Handle qSupported.
7406
ea025f5f
DJ
74072006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7408
7409 * remote-utils.c (all_symbols_looked_up): New variable.
7410 (look_up_one_symbol): Check it.
7411 * server.h (look_up_one_symbol): New declaration.
7412 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7413
9308fc88
DJ
74142006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7415
7416 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 7417 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
7418 (PTRACE_GET_THREAD_AREA): Define.
7419 (ps_get_thread_area): New function.
7420
52fb6437
NS
74212006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7422
7423 * configure.srv (m68k*-*-uclinux*): New target.
7424 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7425 (linux_resume_one_process): Remove extraneous cast.
7426 (linux_read_offsets): New.
7427 (linux_target_op): Add linux_read_offsets on mmuless systems.
7428 * server.c (handle_query): Add qOffsets logic.
7429 * target.h (struct target_ops): Add read_offsets.
7430
21b0f40c
DJ
74312006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7432
7433 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7434 (PTRACE_GET_THREAD_AREA): Define.
7435 (ps_get_thread_area): New function.
7436 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7437 (linux-x86-64-low.o): Update.
7438
0050a760
DJ
74392006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7440
7441 * configure.ac: Remove checks for prfpregset_t.
7442 * gdb_proc_service.h: New file.
7443 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7444 new "gdb_proc_service.h".
7445 * proc-service.c: Likewise.
7446 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7447 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7448 * Makefile.in (gdb_proc_service_h): Updated.
7449 * configure, config.in: Regenerated.
7450
b92a518e
DJ
74512006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7452
7453 * remote-utils.c (prepare_resume_reply): Move declaration
7454 of gdb_id_from_wait to the top of the block.
7455
545587ee
DJ
74562006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7457
7458 * linux-low.c (regsets_store_inferior_registers): Read the regset
7459 from the target before filling it.
7460
9db87ebd
DJ
74612006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7462
7463 * server.c (attach_inferior): Return SIGTRAP for a successful
7464 attach.
7465
dd24457d
DJ
74662006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7467
7468 * Makefile.in (OBS): Add version.o.
7469 (STAGESTUFF): Delete.
7470 (version.o): Add dependencies.
7471 (version.c): Replace rule.
7472 (clean): Remove version.c.
7473 * server.c (gdbserver_version): New.
7474 (gdbserver_usage): Use printf.
7475 (main): Handle --version and --help.
7476 * server.h (version, host_name): Add declarations.
7477
6f0f660e
EZ
74782005-12-23 Eli Zaretskii <eliz@gnu.org>
7479
889bf7c5
PA
7480 * linux-arm-low.c:
7481 * linux-arm-low.c:
7482 * inferiors.c:
7483 * i387-fp.h:
7484 * i387-fp.c:
7485 * gdbreplay.c:
7486 * regcache.c:
7487 * proc-service.c:
7488 * mem-break.h:
7489 * mem-break.c:
7490 * linux-x86-64-low.c:
7491 * linux-sh-low.c:
7492 * linux-s390-low.c:
7493 * linux-ppc64-low.c:
7494 * linux-ppc-low.c:
7495 * linux-mips-low.c:
7496 * linux-m68k-low.c:
7497 * linux-m32r-low.c:
7498 * linux-low.h:
7499 * linux-low.c:
7500 * linux-ia64-low.c:
7501 * linux-i386-low.c:
7502 * linux-crisv32-low.c:
7503 * thread-db.c:
7504 * terminal.h:
7505 * target.h:
7506 * target.c:
7507 * server.h:
7508 * server.c:
7509 * remote-utils.c:
7510 * regcache.h:
7511 * utils.c:
7512 * Makefile.in:
7513 * configure.ac:
6f0f660e
EZ
7514 * gdbserver.1: Add (C) after Copyright. Update the FSF
7515 address.
7516
9d1fb177
DJ
75172005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7518
7519 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7520 (arm_breakpoint_at): Recognize both breakpoints.
7521 (the_low_target): Use the correct breakpoint instruction.
7522
011a70c2
DJ
75232005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7524
7525 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7526 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7527 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7528 (the_low_target): Update.
7529
7fb85e41
AS
75302005-10-25 Andreas Schwab <schwab@suse.de>
7531
7532 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7533
7534 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7535 (ia64_num_regs): Reduce to 462.
7536
3db0444b
DJ
75372005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7538
7539 * acinclude.m4: Correct quoting.
7540 * aclocal.m4: Regenerated.
7541
7542 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7543 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7544 (thread_db_init): Call thread_db_err_str.
7545 * configure.ac: Check for TD_VERSION.
7546 * config.in, configure: Regenerated.
7547
bee0189a
DJ
75482005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7549
7550 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7551
e9d25b98
DJ
75522005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7553
7554 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7555 is not available. Define HAVE_PTRACE_GETREGS if it is.
7556 * config.in, configure: Regenerated.
7557 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7558 * linux-i386-low.c, linux-m68k-low.c: Update to use
7559 HAVE_PTRACE_GETREGS.
7560 * linux-low.c (regsets_fetch_inferior_registers)
7561 (regsets_store_inferior_registers): Only return 0 if we processed
7562 GENERAL_REGS.
7563 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7564 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7565
a06660f7
DJ
75662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7567
7568 * inferiors.c (struct thread_info): Add gdb_id.
7569 (add_thread): Add gdb_id argument.
7570 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7571 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7572 calls to add_thread.
7573 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7574 * server.c (handle_query): Use thread_to_gdb_id.
7575 (handle_v_cont, main): Use gdb_id_to_thread_id.
7576 * server.h (add_thread): Update prototype.
7577 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7578 prototypes.
7579
5a1f5858
DJ
75802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7581
7582 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7583 left-padded registers.
7584 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7585 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7586
e122f1f5
SE
75872005-07-01 Steve Ellcey <sje@cup.hp.com>
7588
7589 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7590 * configure: Regenerate.
7591 * config.in: Regenerate.
7592 * server.h (NEED_DECLARATION_STRERROR):
7593 Replace with !HAVE_DECL_STRERROR.
7594
d592fa2f
DJ
75952005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7596
7597 * linux-low.c (linux_wait, linux_send_signal): Don't test
7598 an unsigned long variable for > 0 if it could be MAX_ULONG.
7599 * server.c (myresume): Likewise.
7600 * target.c (set_desired_inferior): Likewise.
7601
ccbd4912
MK
76022005-06-13 Mark Kettenis <kettenis@gnu.org>
7603
7604 * configure.ac: Simplify and improve check for socklen_t.
7605 * configure, config.in: Regenerate.
7606
f450004a
DJ
76072005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7608
7609 * acconfig.h: Remove.
7610 * configure.ac: Add a test for socklen_t. Use three-argument
7611 AC_DEFINE throughout.
7612 * config.in: Regenerated using autoheader 2.59.
7613 * configure: Regenerated.
7614
7615 * gdbreplay.c (socklen_t): Provide a default.
7616 (remote_open): Use socklen_t.
7617 * remote-utils.c (socklen_t): Provide a default.
7618 (remote_open): Use socklen_t.
7619 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7620 unsigned char.
7621
7622 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7623 char for buffers.
7624 * linux-low.c (linux_read_memory, linux_write_memory)
7625 (linux_read_auxv): Likewise.
7626 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7627 (check_mem_write): Likewise.
7628 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7629 Likewise.
7630 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7631 (registers_from_string, register_data): Likewise.
7632 * server.c (handle_query, main): Likewise.
7633 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7634 (decode_M_packet): Likewise.
7635 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7636 * target.h (struct target_ops): Update read_memory, write_memory,
7637 and read_auxv.
7638 (read_inferior_memory, write_inferior_memory): Update.
7639 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7640 to unsigned char *.
7641 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7642 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7643 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7644 linux-s390-low.c, linux-sh-low.c: Update for changes in
7645 read_inferior_memory and the_low_target->breakpoint.
7646
eee84df1
DJ
76472005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7648
7649 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7650 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7651 * configure.srv: Add powerpc64-*-linux*.
7652 * linux-ppc64-low.c: New file.
7653
45b134e5
OF
76542005-05-23 Orjan Friberg <orjanf@axis.com>
7655
7656 * linux-cris-low.c: New file with support for CRIS.
7657 * linux-crisv32-low.c: Ditto for CRISv32.
7658 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7659 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 7660 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
7661 reg-crisv32.o, and reg-crisv32.c to make rules.
7662 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7663 recognized targets.
7664
48d93c75
UW
76652005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7666
7667 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7668 of sizeof (PTRACE_XFER_TYPE).
7669 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7670
e013ee27
OF
76712005-05-12 Orjan Friberg <orjanf@axis.com>
7672
889bf7c5 7673 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
7674 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7675 pointers for hardware watchpoint support.
7676 * linux-low.h (struct linux_target_ops): Ditto.
7677 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7678 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7679 to linux_target_ops.
7680 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7681 reply packet.
7682 * server.c (main): Recognize 'Z' and 'z' packets.
7683
b0ded00b
UW
76842005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7685
7686 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7687 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7688 (the_low_target): Add new members.
7689
8643e2ad
DJ
76902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7691
7692 * proc-service.c (ps_lgetregs): Search all_processes instead of
7693 all_threads.
7694
fc620387
DJ
76952005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7696
7697 * server.c (start_inferior): Change return type to int.
7698 (attach_inferior): Change sigptr to int *.
7699 (handle_v_cont, handle_v_requests): Change signal to int *.
7700 (main): Change signal to int.
7701
77022005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
7703
7704 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7705 * configure.srv: Add m32r*-*-linux*.
7706 * linux-m32r-low.c: New file.
7707
e0e76420
DJ
77082005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7709
7710 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7711
a1928bad
DJ
77122005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7713
7714 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7715 Take unsigned long arguments for PIDs.
7716 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7717 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7718 (wait_for_sigstop, linux_resume_one_process)
7719 (regsets_fetch_inferior_registers, linux_send_signal)
7720 (linux_read_auxv): Likewise. Update the types of variables holding
7721 PIDs. Update format string specifiers.
7722 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7723 * remote-utils.c (prepare_resume_reply): Likewise.
7724 * server.c (cont_thread, general_thread, step_thread)
7725 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7726 unsigned long.
7727 (handle_query): Update format specifiers.
7728 (handle_v_cont, main): Use strtoul for thread IDs.
7729 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7730 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7731 (general_thread, step_thread, thread_from_wait)
7732 (old_thread_from_wait): Update.
7733 * target.h (struct thread_resume): Use unsigned long for THREAD.
7734 (struct target_ops): Use unsigned long for arguments to attach and
7735 thread_alive.
7736
dcdb98d2
DJ
77372005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7738
7739 * acinclude.m4: Include bfd/bfd.m4 directly.
7740 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7741 <agriffis@toolchain.org>.
7742 * aclocal.m4, configure: Regenerated.
7743
bec39cab
AC
77442005-01-07 Andrew Cagney <cagney@gnu.org>
7745
7746 * configure.ac: Rename configure.in, require autoconf 2.59.
7747 * configure: Re-generate.
7748
434c4c77
DJ
77492004-12-08 Daniel Jacobowitz <dan@debian.org>
7750
7751 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7752 LIBS when finished.
7753 * aclocal.m4: Regenerated.
7754 * configure: Regenerated.
7755
db1d3e1b
AS
77562004-11-21 Andreas Schwab <schwab@suse.de>
7757
7758 * linux-m68k-low.c (m68k_num_gregs): Define.
7759 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7760 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7761 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7762 (m68k_breakpoint_at): New. Add to the_low_target.
7763
7764 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7765 srv_linux_thread_db to yes.
7766
43360365
JB
77672004-10-20 Joel Brobecker <brobecker@gnat.com>
7768
7769 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7770 (ARCH_SET_FS): Likewise.
7771 (ARCH_GET_FS): Likewise.
7772 (ARCH_GET_GS): Likewise.
7773
fd500816
DJ
77742004-10-16 Daniel Jacobowitz <dan@debian.org>
7775
7776 * linux-i386-low.c (ps_get_thread_area): New.
7777 * linux-x86-64-low.c (ps_get_thread_area): New.
7778 * linux-low.c: Include <sys/syscall.h>.
7779 (linux_kill_one_process): Don't kill the first thread here.
7780 (linux_kill): Kill the first thread here.
7781 (kill_lwp): New function.
7782 (send_sigstop, linux_send_signal): Use it.
7783 * proc-service.c: Clean up #ifdefs.
7784 (fpregset_info): Delete.
7785 (ps_lgetregs): Update and enable implementation.
7786 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7787 implementations.
7788 * remote-utils.c (struct sym_cache, symbol_cache): New.
7789 (input_interrupt): Print a clearer message.
7790 (async_io_enabled): New variable.
7791 (enable_async_io, disable_async_io): Use it. Update comments.
7792 (look_up_one_symbol): Use the symbol cache.
7793 * thread-db.c (thread_db_look_up_symbols): New function.
7794 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7795
f6de3c42
DJ
77962004-10-16 Daniel Jacobowitz <dan@debian.org>
7797
7798 * configure.in: Test for -rdynamic.
7799 * configure: Regenerated.
7800 * Makefile (INTERNAL_LDFLAGS): New.
7801 (gdbserver, gdbreplay): Use it.
7802
2c0fc042
AC
78032004-09-02 Andrew Cagney <cagney@gnu.org>
7804
7805 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7806
075b3282
DJ
78072004-03-23 Daniel Jacobowitz <drow@mvista.com>
7808
7809 * linux-low.c (linux_wait): Clear all_processes list also.
7810
fa6a77dc
DJ
78112004-03-12 Daniel Jacobowitz <drow@mvista.com>
7812
7813 * linux-low.c: Include <errno.h>. Remove extern declaration of
7814 errno.
7815
6d782a97
DJ
78162004-03-12 Daniel Jacobowitz <drow@mvista.com>
7817
7818 * gdbreplay.c, server.h, utils.c: Update copyright years.
7819
3a7fb99b
DJ
78202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7821
7822 * server.c (main): Print child status or termination signal from
7823 variable 'signal', not 'sig'.
7824
c3e735a6
DJ
78252004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7826
7827 * linux-low.c (linux_read_memory): Change return type to
7828 int. Check for and return error from ptrace().
7829 * target.c (read_inferior_memory): Change return type to int. Pass
7830 back return status from the_target->read_memory().
7831 * target.h (struct target_ops): Adapt *read_memory() prototype.
7832 Update comment.
7833 (read_inferior_memory): Adapt prototype.
7834 * server.c (main): Return an error packet if
7835 read_inferior_memory() returns an error.
7836
a59d1c82
DJ
78372004-03-04 Daniel Jacobowitz <drow@mvista.com>
7838
7839 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7840 Unify with other clean targets.
7841
dc3f8883
DJ
78422004-02-29 Daniel Jacobowitz <drow@mvista.com>
7843
7844 * server.c (handle_v_cont): Call set_desired_inferior.
7845
89a208da
DJ
78462004-02-29 Daniel Jacobowitz <drow@mvista.com>
7847
7848 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7849
62ea82f5
DJ
78502004-02-29 Daniel Jacobowitz <drow@mvista.com>
7851
7852 * linux-low.c (linux_wait): Unblock async I/O.
7853 (linux_resume): Block and enable async I/O.
7854 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7855 * server.h (block_async_io, unblock_async_io): Add prototypes.
7856
6910d122
DJ
78572004-02-29 Daniel Jacobowitz <drow@mvista.com>
7858
7859 * remote-utils.c (remote_open): Print a status notice after
7860 opening a TCP port.
7861 * server.c (attach_inferior): Print a status notice after
7862 attaching.
7863
78642004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
7865
7866 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7867
c89dc5d4
DJ
78682004-02-26 Daniel Jacobowitz <drow@mvista.com>
7869
7870 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7871 error packet.
7872 * server.c, target.h: Update copyright years.
7873
4b8dad4a
RM
78742004-02-25 Roland McGrath <roland@redhat.com>
7875
7876 * target.h (struct target_ops): New member `read_auxv'.
7877 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7878 * linux-low.c (linux_read_auxv): New function.
7879 (linux_target_ops): Initialize `read_auxv' member to that.
7880
d7446758
JB
78812004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7882
7883 Committed by Jim Blandy <jimb@redhat.com>.
7884
7885 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 7886 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
7887 instead of GPR_SIZE to distiguish s390 and s390x targets.
7888
5544ad89
DJ
78892004-01-31 Daniel Jacobowitz <drow@mvista.com>
7890
7891 * linux-low.c: Update copyright year.
7892 (check_removed_breakpoint): Clear pending_is_breakpoint.
7893 (linux_set_resume_request, linux_queue_one_thread)
7894 (resume_status_pending_p): New functions.
7895 (linux_continue_one_thread): Use process->resume.
7896 (linux_resume): Only resume threads if there are no pending events.
7897 * linux-low.h (struct process_info): Add resume request
7898 pointer.
7899
2a68b70e
DJ
79002004-01-30 Daniel Jacobowitz <drow@mvista.com>
7901
7902 * regcache.c (new_register_cache): Clear the allocated register
7903 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7904
64386c31
DJ
79052003-10-13 Daniel Jacobowitz <drow@mvista.com>
7906
7907 * linux-low.c (linux_resume): Take a struct thread_resume *
7908 argument.
7909 (linux_wait): Update call.
7910 (resume_ptr): New static variable.
7911 (linux_continue_one_thread): Renamed from
7912 linux_continue_one_process. Use resume_ptr.
7913 (linux_resume): Use linux_continue_one_thread.
7914 * server.c (handle_v_cont, handle_v_requests): New functions.
7915 (myresume): New function.
7916 (main): Handle 'v' case.
7917 * target.h (struct thread_resume): New type.
7918 (struct target_ops): Change argument of "resume" to struct
7919 thread_resume *.
7920 (myresume): Delete macro.
7921
c938e9b0
L
79222003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7923
7924 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7925 (uninstall): Support DESTDIR.
7926
7f313d07
BC
7927Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7928
7929 * configure.srv: Add xscale*linux copy of arm*linux entry.
7930
3b2fc2ea
DJ
79312003-07-24 Daniel Jacobowitz <drow@mvista.com>
7932
7933 * linux-arm-low.c (arm_reinsert_addr): New function.
7934 (the_low_target): Add arm_reinsert_addr.
7935
1c0a559e
MK
79362003-07-08 Mark Kettenis <kettenis@gnu.org>
7937
7938 * mem-break.c: Remove whitespace at end of file.
7939
43d5792c
DJ
79402003-06-28 Daniel Jacobowitz <drow@mvista.com>
7941
7942 * configure.in: Check whether we need to prototype strerror.
7943 * server.h: Optionally prototype strerror.
7944 * gdbreplay.c (perror_with_name): Use strerror.
7945 * linux-low.c (linux_attach_lwp): Use strerror.
7946 * utils.c (perror_with_name): Use strerror.
7947 * config.in, configure: Regenerated.
7948
c8a86edf
DJ
79492003-06-28 Daniel Jacobowitz <drow@mvista.com>
7950
7951 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7952 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7953
73d37363
DJ
79542003-06-20 Daniel Jacobowitz <drow@mvista.com>
7955
7956 * Makefile.in (SFILES): Update.
7957 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7958 low-sun3.c: Remove files.
7959
6ad8ae5c
DJ
79602003-06-17 Daniel Jacobowitz <drow@mvista.com>
7961
7962 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7963 (linux_detach_one_process, linux_detach): New functions.
7964 (linux_target_ops): Add linux_detach.
7965 * server.c (main): Handle 'D' packet.
7966 * target.h (struct target_ops): Add "detach" member.
7967 (detach_inferior): Define.
7968
1581182a
MK
79692003-06-13 Mark Kettenis <kettenis@gnu.org>
7970
7971 From Kelley Cook <kelleycook@wideopenwest.com>:
7972 * configure.srv: Accept i[34567]86 variants.
7973
e5379b03
DJ
79742003-06-05 Daniel Jacobowitz <drow@mvista.com>
7975
7976 * linux-low.c (linux_wait_for_event): Correct comment typos.
7977 (linux_resume_one_process): Call check_removed_breakpoint.
7978 (linux_send_signal): New function.
7979 (linux_target_ops): Add linux_send_signal.
7980 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7981 of kill.
7982 * target.h (struct target_ops): Add send_signal.
7983
2ff29de4
JB
79842003-05-29 Jim Blandy <jimb@redhat.com>
7985
7986 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7987 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7988 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7989 away part of the register's value.
7990
254787d4
DJ
79912003-03-26 Daniel Jacobowitz <drow@mvista.com>
7992
7993 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7994 (linux_wait_for_event, linux_init_signals): Likewise.
7995
94e10508
DJ
79962003-03-17 Daniel Jacobowitz <drow@mvista.com>
7997
7998 * configure.in: Check for stdlib.h.
7999 * configure: Regenerated.
8000 * config.in: Regenerated.
8001
4c0711e0
DJ
80022003-01-04 Andreas Schwab <schwab@suse.de>
8003
8004 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8005
ef66e766
AC
80062003-01-02 Andrew Cagney <ac131313@redhat.com>
8007
8008 * Makefile.in: Remove obsolete code.
8009
a1358604
DJ
80102002-11-20 Daniel Jacobowitz <drow@mvista.com>
8011
8012 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8013 defined(PT_FPR0_HI).
8014
23ce3b1c
DJ
80152002-11-17 Stuart Hughes <seh@zee2.com>
8016
8017 * linux-arm-low.c (arm_num_regs): Increase.
8018 (arm_regmap): Include status register.
8019
80202002-11-17 Daniel Jacobowitz <drow@mvista.com>
8021
8022 * linux-low.c (register_addr): Remove incorrect -1 check.
8023
a9fa9f7d
DJ
80242002-08-29 Daniel Jacobowitz <drow@mvista.com>
8025
8026 * linux-low.c (linux_create_inferior): Call setpgid. Return
8027 the new PID.
8028 (unstopped_p, linux_signal_pid): Remove.
8029 (linux_target_ops): Remove linux_signal_pid.
8030 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8031 global instead of target method.
8032 * target.h (struct target_ops): Remove signal_pid. Update comment
8033 for create_inferior.
8034 * server.c (signal_pid): New variable.
8035 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 8036 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
8037 (attach_inferior): Set signal_pid.
8038
17574093
DJ
80392002-08-23 Daniel Jacobowitz <drow@mvista.com>
8040
8041 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8042
80432002-08-20 Jim Blandy <jimb@redhat.com>
8044
8045 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8046 default for this.
8047
80482002-08-01 Andrew Cagney <cagney@redhat.com>
8049
8050 * Makefile.in: Make chill references obsolete.
8051
80522002-07-24 Kevin Buettner <kevinb@redhat.com>
8053
8054 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8055 * configure: Regenerate.
8056 * config.in: Regenerate.
8057
80582002-07-09 David O'Brien <obrien@FreeBSD.org>
8059
8060 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8061 (perror_with_name, remote_close, remote_open, expect, play): Static.
8062
80632002-07-04 Michal Ludvig <mludvig@suse.cz>
8064
4b8dad4a 8065 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
8066 byte offsets instead of an array of indexes.
8067 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8068
80692002-06-13 Daniel Jacobowitz <drow@mvista.com>
8070
8071 * regcache.c: Add comment.
8072
80732002-06-11 Daniel Jacobowitz <drow@mvista.com>
8074
8075 * thread-db.c: New file.
8076 * proc-service.c: New file.
8077 * acinclude.m4: New file.
8078 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8079 proc-service.o, and thread-db.o.
8080 (linux-low.o): Add USE_THREAD_DB.
8081 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8082 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8083 * aclocal.m4: Regenerated.
8084 * config.in: Regenerated.
8085 * configure: Regenerated.
8086 * configure.in: Check for proc_service.h, sys/procfs.h,
8087 thread_db.h, and linux/elf.h headrs.
8088 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8089 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8090 Check for -lthread_db and thread support.
8091 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8092 PowerPC, and SuperH.
8093 * i387-fp.c: Constify arguments.
8094 * i387-fp.h: Likewise.
8095 * inferiors.c: (struct thread_info): Renamed from
8096 `struct inferior_info'. Remove PID member. Use generic inferior
8097 list header. All uses updated.
8098 (inferiors, signal_pid): Removed.
8099 (all_threads): New variable.
8100 (get_thread): Define.
8101 (add_inferior_to_list): New function.
8102 (for_each_inferior): New function.
8103 (change_inferior_id): New function.
8104 (add_inferior): Removed.
8105 (remove_inferior): New function.
8106 (add_thread): New function.
8107 (free_one_thread): New function.
8108 (remove_thread): New function.
8109 (clear_inferiors): Use for_each_inferior and free_one_thread.
8110 (find_inferior): New function.
8111 (find_inferior_id): New function.
8112 (inferior_target_data): Update argument type.
8113 (set_inferior_target_data): Likewise.
8114 (inferior_regcache_data): Likewise.
8115 (set_inferior_regcache_data): Likewise.
8116 * linux-low.c (linux_bp_reinsert): Remove.
8117 (all_processes, stopping_threads, using_thrads)
8118 (struct pending_signals, debug_threads, pid_of): New.
8119 (inferior_pid): Replace with macro.
8120 (struct inferior_linux_data): Remove.
8121 (get_stop_pc, add_process): New functions.
8122 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8123 Use add_process and add_thread.
8124 (linux_attach_lwp): New function, based on old linux_attach. Use
8125 add_process and add_thread. Set stop_expected for new threads.
8126 (linux_attach): New function.
8127 (linux_kill_one_process): New function.
8128 (linux_kill): Kill all LWPs.
8129 (linux_thread_alive): Use find_inferior_id.
8130 (check_removed_breakpoints, status_pending_p): New functions.
8131 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8132 Update. Use WNOHANG. Wait for cloned processes also. Update process
8133 struct for the found process.
8134 (linux_wait_for_event): New function.
8135 (linux_wait): Use it. Support LWPs.
8136 (send_sigstop, wait_for_sigstop, stop_all_processes)
8137 (linux_resume_one_process, linux_continue_one_process): New functions.
8138 (linux_resume): Support LWPs.
8139 (REGISTER_RAW_SIZE): Remove.
8140 (fetch_register): Use register_size instead. Call supply_register.
8141 (usr_store_inferior_registers): Likewise. Call collect_register.
8142 Fix recursive case.
8143 (regsets_fetch_inferior_registers): Improve error message.
8144 (regsets_store_inferior_registers): Add debugging.
8145 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8146 (unstopped_p, linux_signal_pid): New functions.
8147 (linux_target_ops): Add linux_signal_pid.
8148 (linux_init_signals): New function.
8149 (initialize_low): Call it. Initialize using_threads.
8150 * regcache.c (inferior_regcache_data): Add valid
8151 flag.
8152 (get_regcache): Fetch registers lazily. Add fetch argument
8153 and update all callers.
8154 (regcache_invalidate_one, regcache_invalidate): New
8155 functions.
8156 (new_register_cache): Renamed from create_register_cache.
8157 Return the new regcache.
8158 (free_register_cache): Change argument to a void *.
8159 (registers_to_string, registers_from_string): Call get_regcache
8160 with fetch flag set.
8161 (register_data): Make static. Pass fetch flag to get_regcache.
8162 (supply_register): Call get_regcache with fetch flag clear.
8163 (collect_register): Call get_regcache with fetch flag set.
8164 (collect_register_as_string): New function.
8165 * regcache.h: Update.
8166 * remote-utils.c (putpkt): Flush after debug output and use
8167 stderr.
8168 Handle input interrupts while waiting for an ACK.
8169 (input_interrupt): Use signal_pid method.
8170 (getpkt): Flush after debug output and use stderr.
8171 (outreg): Use collect_register_as_string.
8172 (new_thread_notify, dead_thread_notify): New functions.
8173 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8174 and general_thread.
8175 (look_up_one_symbol): Flush after debug output.
8176 * server.c (step_thread, server_waiting): New variables.
8177 (start_inferior): Don't use signal_pid. Update call to mywait.
8178 (attach_inferior): Update call to mywait.
8179 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8180 (main): Don't fetch/store registers explicitly. Use
8181 set_desired_inferior. Support proposed ``Hs'' packet. Update
8182 calls to mywait.
8183 * server.h: Update.
8184 (struct inferior_list, struct_inferior_list_entry): New.
8185 * target.c (set_desired_inferior): New.
8186 (write_inferior_memory): Constify.
8187 (mywait): New function.
8188 * target.h: Update.
8189 (struct target_ops): New signal_pid method.
8190 (mywait): Removed macro, added prototype.
8191
8192 * linux-low.h (regset_func): Removed.
8193 (regset_fill_func, regset_store_func): New.
8194 (enum regset_type): New.
8195 (struct regset_info): Add type field. Use new operation types.
8196 (struct linux_target_ops): stop_pc renamed to get_pc.
8197 Add decr_pc_after_break and breakpoint_at.
8198 (get_process, get_thread_proess, get_process_thread)
8199 (strut process_info, all_processes, linux_attach_lwp)
8200 (thread_db_init): New.
8201
8202 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8203 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8204 (the_low_target): Add new members.
8205 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8206 (i386_store_fpxregset): Constify.
8207 (target_regsets): Add new kind identifier.
8208 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8209 (i386_set_pc): Add debugging.
8210 (i386_breakpoint_at): New function.
8211 (the_low_target): Add new members.
8212 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8213 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8214 (mips_breakpoint_at): New.
8215 (the_low_target): Add new members.
8216 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8217 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8218 (the_low_target): Add new members.
8219 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8220 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8221 (the_low_target): Add new members.
8222 * linux-x86-64-low.c (target_regsets): Add new kind
8223 identifier.
8224
82252002-05-15 Daniel Jacobowitz <drow@mvista.com>
8226
8227 From Martin Pool <mbp@samba.org>:
8228 * server.c (gdbserver_usage): New function.
8229 (main): Call it.
8230
82312002-05-14 Daniel Jacobowitz <drow@mvista.com>
8232
8233 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8234 stop_at -> stop_pc.
8235
82362002-05-04 Andrew Cagney <ac131313@redhat.com>
8237
8238 * Makefile.in: Remove obsolete code.
8239
82402002-04-24 Michal Ludvig <mludvig@suse.cz>
8241
8242 * linux-low.c (regsets_fetch_inferior_registers),
8243 (regsets_store_inferior_registers): Removed cast to int from
8244 ptrace() calls.
8245 * regcache.h: Added declaration of struct inferior_info.
8246
82472002-04-20 Daniel Jacobowitz <drow@mvista.com>
8248
8249 * inferiors.c (struct inferior_info): Add regcache_data.
8250 (add_inferior): Call create_register_cache.
8251 (clear_inferiors): Call free_register_cache.
8252 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8253 * regcache.c (struct inferior_regcache_data): New.
8254 (registers): Remove.
8255 (get_regcache): New function.
8256 (create_register_cache, free_register_cache): New functions.
8257 (set_register_cache): Don't initialize the register cache here.
8258 (registers_to_string, registers_from_string, register_data): Call
8259 get_regcache.
8260 * regcache.h: Add prototypes.
8261 * server.h: Likewise.
8262
82632002-04-20 Daniel Jacobowitz <drow@mvista.com>
8264
8265 * mem-break.c: New file.
8266 * mem-break.h: New file.
8267 * Makefile.in: Add mem-break.o rule; update server.h
8268 dependencies.
8269 * inferiors.c (struct inferior_info): Add target_data
8270 member.
8271 (clear_inferiors): Free target_data member if set.
8272 (inferior_target_data, set_inferior_target_data): New functions.
8273 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8274 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8275 * linux-low.c (linux_bp_reinsert): New variable.
8276 (struct inferior_linux_data): New.
8277 (linux_create_inferior): Use set_inferior_target_data.
8278 (linux_attach): Likewise. Call add_inferior.
8279 (linux_wait_for_one_inferior): New function.
8280 (linux_wait): Call it.
8281 (linux_write_memory): Add const.
8282 (initialize_low): Call set_breakpoint_data.
8283 * linux-low.h (struct linux_target_ops): Add breakpoint
8284 handling members.
8285 * server.c (attach_inferior): Remove extra add_inferior
8286 call.
8287 * server.h: Include mem-break.h. Update inferior.c
8288 prototypes.
8289 * target.c (read_inferior_memory)
8290 (write_inferior_memory): New functions.
8291 * target.h (read_inferior_memory)
8292 (write_inferior_memory): Change macros to prototypes.
8293 (struct target_ops): Update comments. Add const to write_memory
8294 definition.
8295
82962002-04-11 Daniel Jacobowitz <drow@mvista.com>
8297
8298 * linux-low.c (usr_store_inferior_registers): Support
8299 registers which are allowed to fail to store.
8300 * linux-low.h (linux_target_ops): Likewise.
8301 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8302 (ppc_cannot_store_register): FPSCR may not be storable.
8303
83042002-04-09 Daniel Jacobowitz <drow@mvista.com>
8305
8306 * server.h: Include <string.h> if HAVE_STRING_H.
8307 * ChangeLog: Correct paths in last ChangeLog entry.
8308
83092002-04-09 Daniel Jacobowitz <drow@mvista.com>
8310
8311 * linux-low.h: Remove obsolete prototypes.
8312 (struct linux_target_ops): New.
8313 (extern the_low_target): New.
8314 * linux-low.c (num_regs, regmap): Remove declarations.
8315 (register_addr): Use the_low_target explicitly.
8316 (fetch_register): Likewise.
8317 (usr_fetch_inferior_registers): Likewise.
8318 (usr_store_inferior_registers): Likewise.
8319 * linux-arm-low.c (num_regs): Remove.
8320 (arm_num_regs): Define.
8321 (arm_regmap): Renamed from regmap, made static.
8322 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8323 made static.
8324 (arm_cannot_store_register): Renamed from cannot_store_register,
8325 made static.
8326 (the_low_target): New.
8327 * linux-i386-low.c (num_regs): Remove.
8328 (i386_num_regs): Define.
8329 (i386_regmap): Renamed from regmap, made static.
8330 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8331 made static.
8332 (i386_cannot_store_register): Renamed from cannot_store_register,
8333 made static.
8334 (the_low_target): New.
8335 * linux-ia64-low.c (num_regs): Remove.
8336 (ia64_num_regs): Define.
8337 (ia64_regmap): Renamed from regmap, made static.
8338 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8339 made static.
8340 (ia64_cannot_store_register): Renamed from cannot_store_register,
8341 made static.
8342 (the_low_target): New.
8343 * linux-m68k-low.c (num_regs): Remove.
8344 (m68k_num_regs): Define.
8345 (m68k_regmap): Renamed from regmap, made static.
8346 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8347 made static.
8348 (m68k_cannot_store_register): Renamed from cannot_store_register,
8349 made static.
8350 (the_low_target): New.
8351 * linux-mips-low.c (num_regs): Remove.
8352 (mips_num_regs): Define.
8353 (mips_regmap): Renamed from regmap, made static.
8354 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8355 made static.
8356 (mips_cannot_store_register): Renamed from cannot_store_register,
8357 made static.
8358 (the_low_target): New.
8359 * linux-ppc-low.c (num_regs): Remove.
8360 (ppc_num_regs): Define.
8361 (ppc_regmap): Renamed from regmap, made static.
8362 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8363 made static.
8364 (ppc_cannot_store_register): Renamed from cannot_store_register,
8365 made static.
8366 (the_low_target): New.
8367 * linux-s390-low.c (num_regs): Remove.
8368 (s390_num_regs): Define.
8369 (s390_regmap): Renamed from regmap, made static.
8370 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8371 made static.
8372 (s390_cannot_store_register): Renamed from cannot_store_register,
8373 made static.
8374 (the_low_target): New.
8375 * linux-sh-low.c (num_regs): Remove.
8376 (sh_num_regs): Define.
8377 (sh_regmap): Renamed from regmap, made static.
8378 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8379 made static.
8380 (sh_cannot_store_register): Renamed from cannot_store_register,
8381 made static.
8382 (the_low_target): New.
8383 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8384 (the_low_target): New.
8385
83862002-04-09 Daniel Jacobowitz <drow@mvista.com>
8387
8388 * Makefile.in: Add stamp-h target.
8389 * configure.in: Create stamp-h.
8390 * configure: Regenerated.
8391
83922002-04-09 Daniel Jacobowitz <drow@mvista.com>
8393
8394 * inferiors.c: New file.
8395 * target.c: New file.
8396 * target.h: New file.
8397 * Makefile.in: Add target.o and inferiors.o. Update
8398 dependencies.
8399 * linux-low.c (inferior_pid): New static variable,
8400 moved from server.c.
8401 (linux_create_inferior): Renamed from create_inferior.
8402 Call add_inferior. Return 0 on success instead of a PID.
8403 (linux_attach): Renamed from myattach.
8404 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8405 (linux_thread_alive): Renamed from mythread_alive.
8406 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8407 child dies.
8408 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8409 (regsets_store_inferior_registers): Correct error message.
8410 Add missing ``return 0''.
8411 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8412 (linux_store_registers): Renamed from store_inferior_registers.
8413 (linux_read_memory): Renamed from read_inferior_memory.
8414 (linux_write_memory): Renamed from write_inferior_memory.
8415 (linux_target_ops): New structure.
8416 (initialize_low): Call set_target_ops ().
8417 * remote-utils.c (unhexify): New function.
8418 (hexify): New function.
8419 (input_interrupt): Send signals to ``signal_pid''.
8420 * server.c (inferior_pid): Remove.
8421 (start_inferior): Update create_inferior call.
8422 (attach_inferior): Call add_inferior.
8423 (handle_query): New function.
8424 (main): Call handle_query for `q' packets.
8425 * server.h: Include "target.h". Remove obsolete prototypes.
8426 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8427
84282002-04-09 Daniel Jacobowitz <drow@mvista.com>
8429
8430 * Makefile.in: Add WARN_CFLAGS. Update configury
8431 dependencies.
8432 * configure.in: Check for <string.h>
8433 * configure: Regenerate.
8434 * config.in: Regenerate.
8435 * gdbreplay.c: Include needed system headers.
8436 (remote_open): Remove strchr prototype.
8437 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8438 * regcache.c (supply_register): Change buf argument to const void *.
8439 (supply_register_by_name): Likewise.
8440 (collect_register): Change buf argument to void *.
8441 (collect_register_by_name): Likewise.
8442 * regcache.h: Add missing prototypes.
8443 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8444 * server.c (handle_query): New function.
8445 (attached): New static variable, moved out of main.
8446 (main): Quiet longjmp clobber warnings.
8447 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8448 * utils.c (error): Remove NORETURN.
8449 (fatal): Likewise.